/*! For license information please see main.4f59e370.js.LICENSE.txt */
(()=>{var e={983(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case h:case m:case g:case l:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===c},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},763(e,t,n){"use strict";e.exports=n(983)},497(e,t,n){"use strict";var r=n(218);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){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 t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},173(e,t,n){e.exports=n(497)()},218(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},634(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},994(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},893(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},139(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()}};const t={};function n(r){const i=t[r];if(void 0!==i)return i.exports;const o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.m=e,n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},(()=>{const e=Object.getPrototypeOf;let t;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}const o=Object.create(null);n.r(o);const a={};t||=[null,e({}),e([]),e(e)];for(var s=2&i&&r;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],o=t[r++],a=0===o?{enumerable:!0,value:t[r++]}:{enumerable:!0,get:o};n.o(e,i)||Object.defineProperty(e,i,a)}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+".11390c53.chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="front:";n.l=(r,i,o,a)=>{if(e[r])return void e[r].push(i);let s,l;if(void 0!==o){const e=document.getElementsByTagName("script");for(var u=0;u<e.length;u++){const n=e[u];if(n.getAttribute("src")==r||n.getAttribute("data-webpack")==t+o){s=n;break}}}s||(l=!0,s=document.createElement("script"),s.charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];const c=(t,n)=>{s.onerror=s.onload=null,clearTimeout(d);const i=e[r];if(delete e[r],s.parentNode?.removeChild(s),i?.forEach(e=>e(n)),t)return t(n)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=c.bind(null,s.onerror),s.onload=c.bind(null,s.onload),l&&document.head.appendChild(s)}})(),n.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},n.p="/",(()=>{const e={792:0};n.f.j=(t,r)=>{let i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{const o=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=o);const a=new Error,s=r=>{if(n.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",a.name="ChunkLoadError",a.type=e,a.request=n,a.event=r,i[1](a)}};n.l(n.p+n.u(t),s,"chunk-"+t,t)}};const t=(t,r)=>{let[i,o,a]=r;var s,l,u=0;if(i.some(t=>0!==e[t])){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(a)a(n)}for(t&&t(r);u<i.length;u++)l=i[u],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0},r=globalThis.webpackChunkfront||=[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e=n.cw(function(e,t){n.d(t,{A:()=>d});var r=function(e,t,n){for(var r=0,i=0;r=i,i=(0,Ot().se)(),38===r&&12===i&&(t[n]=1),!(0,Ot().Sh)(i);)(0,Ot().K2)();return(0,Ot().di)(e,Ot().G1)},i=function(e,t){return(0,Ot().VF)(function(e,t){var n=-1,i=44;do{switch((0,Ot().Sh)(i)){case 0:38===i&&12===(0,Ot().se)()&&(t[n]=1),e[n]+=r(Ot().G1-1,t,n);break;case 2:e[n]+=(0,Ot().Tb)(i);break;case 4:if(44===i){e[++n]=58===(0,Ot().se)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,zt().HT)(i)}}while(i=(0,Ot().K2)());return e}((0,Ot().c4)(e),t))},o=new WeakMap,a=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||o.get(n))&&!r){o.set(e,!0);for(var a=[],s=i(t,a),l=n.props,u=0,c=0;u<s.length;u++)for(var d=0;d<l.length;d++,c++)e.props[c]=a[u]?s[u].replace(/&\f/g,l[d]):l[d]+" "+s[u]}}},s=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function u(e,t){switch((0,zt().tW)(e,t)){case 5103:return Lt().j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Lt().j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Lt().j+e+Lt().vd+e+Lt().MS+e+e;case 6828:case 4268:return Lt().j+e+Lt().MS+e+e;case 6165:return Lt().j+e+Lt().MS+"flex-"+e+e;case 5187:return Lt().j+e+(0,zt().HC)(e,/(\w+).+(:[^]+)/,Lt().j+"box-$1$2"+Lt().MS+"flex-$1$2")+e;case 5443:return Lt().j+e+Lt().MS+"flex-item-"+(0,zt().HC)(e,/flex-|-self/,"")+e;case 4675:return Lt().j+e+Lt().MS+"flex-line-pack"+(0,zt().HC)(e,/align-content|flex-|-self/,"")+e;case 5548:return Lt().j+e+Lt().MS+(0,zt().HC)(e,"shrink","negative")+e;case 5292:return Lt().j+e+Lt().MS+(0,zt().HC)(e,"basis","preferred-size")+e;case 6060:return Lt().j+"box-"+(0,zt().HC)(e,"-grow","")+Lt().j+e+Lt().MS+(0,zt().HC)(e,"grow","positive")+e;case 4554:return Lt().j+(0,zt().HC)(e,/([^-])(transform)/g,"$1"+Lt().j+"$2")+e;case 6187:return(0,zt().HC)((0,zt().HC)((0,zt().HC)(e,/(zoom-|grab)/,Lt().j+"$1"),/(image-set)/,Lt().j+"$1"),e,"")+e;case 5495:case 3959:return(0,zt().HC)(e,/(image-set\([^]*)/,Lt().j+"$1$`$1");case 4968:return(0,zt().HC)((0,zt().HC)(e,/(.+:)(flex-)?(.*)/,Lt().j+"box-pack:$3"+Lt().MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Lt().j+e+e;case 4095:case 3583:case 4068:case 2532:return(0,zt().HC)(e,/(.+)-inline(.+)/,Lt().j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,zt().b2)(e)-1-t>6)switch((0,zt().wN)(e,t+1)){case 109:if(45!==(0,zt().wN)(e,t+4))break;case 102:return(0,zt().HC)(e,/(.+:)(.+)-([^]+)/,"$1"+Lt().j+"$2-$3$1"+Lt().vd+(108==(0,zt().wN)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,zt().K5)(e,"stretch")?u((0,zt().HC)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,zt().wN)(e,t+1))break;case 6444:switch((0,zt().wN)(e,(0,zt().b2)(e)-3-(~(0,zt().K5)(e,"!important")&&10))){case 107:return(0,zt().HC)(e,":",":"+Lt().j)+e;case 101:return(0,zt().HC)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Lt().j+(45===(0,zt().wN)(e,14)?"inline-":"")+"box$3$1"+Lt().j+"$2$3$1"+Lt().MS+"$2box$3")+e}break;case 5936:switch((0,zt().wN)(e,t+11)){case 114:return Lt().j+e+Lt().MS+(0,zt().HC)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Lt().j+e+Lt().MS+(0,zt().HC)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Lt().j+e+Lt().MS+(0,zt().HC)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Lt().j+e+Lt().MS+e+e}return e}var c=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lt().LU:e.return=u(e.value,e.length);break;case Lt().Sv:return(0,Nt().l)([(0,Ot().C)(e,{value:(0,zt().HC)(e.value,"@","@"+Lt().j)})],r);case Lt().XZ:if(e.length)return(0,zt().kg)(e.props,function(t){switch((0,zt().YW)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,Nt().l)([(0,Ot().C)(e,{props:[(0,zt().HC)(t,/:(read-\w+)/,":"+Lt().vd+"$1")]})],r);case"::placeholder":return(0,Nt().l)([(0,Ot().C)(e,{props:[(0,zt().HC)(t,/:(plac\w+)/,":"+Lt().j+"input-$1")]}),(0,Ot().C)(e,{props:[(0,zt().HC)(t,/:(plac\w+)/,":"+Lt().vd+"$1")]}),(0,Ot().C)(e,{props:[(0,zt().HC)(t,/:(plac\w+)/,Lt().MS+"input-$1")]})],r)}return""})}}],d=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||c,u={},d=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)u[t[n]]=!0;d.push(e)});var h,p=[a,s],f=[Nt().A,(0,Rt().MY)(function(e){h.insert(e)})],g=(0,Rt().r1)(p.concat(o,f));i=function(e,t,n,r){var i;h=n,i=e?e+"{"+t.styles+"}":t.styles,(0,Nt().l)((0,Et().wE)(i),g),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new(l().v)({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:u,registered:{},insert:i};return m.sheet.hydrate(d),m}}),t=n.cw(function(e,t){function r(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}n.d(t,{A:()=>r})}),r=n.cw(function(e,t){n.d(t,{A:()=>o});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=(0,i().A)(function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})}),i=n.cw(function(e,t){function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})}),o=n.cw(function(t,r){n.d(r,{C:()=>o,E:()=>g,T:()=>l,c:()=>d,h:()=>u,w:()=>a}),_t(),h();var i=St().createContext("undefined"!==typeof HTMLElement?(0,e().A)({key:"css"}):null),o=i.Provider,a=function(e){return(0,St().forwardRef)(function(t,n){var r=(0,St().useContext)(i);return e(t,r,n)})},l=St().createContext({});var u={}.hasOwnProperty,c="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",d=function(e,t){var n={};for(var r in t)u.call(t,r)&&(n[r]=t[r]);return n[c]=e,n},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,p().SF)(t,n,r),(0,h().s)(function(){return(0,p().sk)(t,n,r)}),null},g=a(function(e,t,n){var r=e.css;"string"===typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[c],o=[r],a="";"string"===typeof e.className?a=(0,p().Rk)(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var d=(0,s().J)(o,void 0,St().useContext(l));a+=t.key+"-"+d.name;var h={};for(var g in e)u.call(e,g)&&"css"!==g&&g!==c&&(h[g]=e[g]);return h.className=a,n&&(h.ref=n),St().createElement(St().Fragment,null,St().createElement(f,{cache:t,serialized:d,isStringTag:"string"===typeof i}),St().createElement(i,h))})}),a=n.cw(function(e,t){n.d(t,{AH:()=>a,i7:()=>l,mL:()=>i}),_t(),h(),gt();var r=function(e,t){var n=arguments;if(null==t||!o().h.call(t,"css"))return St().createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=o().E,i[1]=(0,o().c)(e,t);for(var a=2;a<r;a++)i[a]=n[a];return St().createElement.apply(null,i)};!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(r||(r={}));var i=(0,o().w)(function(e,t){var n=e.styles,r=(0,s().J)([n],void 0,St().useContext(o().T)),i=St().useRef();return(0,h().i)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),i.current=[n,o],function(){n.flush()}},[t]),(0,h().i)(function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&(0,p().sk)(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)}},[t,r.name]),null});function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s().J)(t)}function l(){var e=a.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}}),s=n.cw(function(e,r){n.d(r,{J:()=>v});var o=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!==typeof e},c=(0,i().A)(function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()}),h=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,function(e,t,n){return g={name:t,styles:n,next:g},t})}return 1===d().A[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},p="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function f(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return g={name:i.name,styles:i.styles,next:g},i.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)g={name:s.name,styles:s.styles,next:g},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=f(e,t,n[i])+";";else for(var a in n){var s=n[a];if("object"!==typeof s){var l=s;null!=t&&void 0!==t[l]?r+=a+"{"+t[l]+"}":u(l)&&(r+=c(a)+":"+h(a,l)+";")}else{if("NO_COMPONENT_SELECTOR"===a&&o)throw new Error(p);if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var d=f(e,t,s);switch(a){case"animation":case"animationName":r+=c(a)+":"+d+";";break;default:r+=a+"{"+d+"}"}}else for(var g=0;g<s.length;g++)u(s[g])&&(r+=c(a)+":"+h(a,s[g])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=g,d=n(e);return g=l,f(e,t,d)}}var m=n;if(null==t)return m;var v=t[m];return void 0!==v?v:m}var g,m=/label:\s*([^\s;{]+)\s*(;|$)/g;function v(e,n,r){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i=!0,o="";g=void 0;var a=e[0];null==a||void 0===a.raw?(i=!1,o+=f(r,n,a)):o+=a[0];for(var s=1;s<e.length;s++){if(o+=f(r,n,e[s]),i)o+=a[s]}m.lastIndex=0;for(var l,u="";null!==(l=m.exec(o));)u+="-"+l[1];return{name:(0,t().A)(o)+u,styles:o,next:g}}}),l=n.cw(function(e,t){n.d(t,{v:()=>r});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}()}),u=n.cw(function(e,t){n.d(t,{A:()=>d}),h(),_t();var i=r().A,a=function(e){return"theme"!==e},l=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?i:a},u=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},c=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,p().SF)(t,n,r),(0,h().s)(function(){return(0,p().sk)(t,n,r)}),null},d=function e(t,n){var r,i,a=t.__emotion_real===t,d=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var h=u(t,n,a),f=h||l(d),g=!f("as");return function(){var m=arguments,v=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&v.push("label:"+r+";"),null==m[0]||void 0===m[0].raw)v.push.apply(v,m);else{var y=m[0];v.push(y[0]);for(var x=m.length,b=1;b<x;b++)v.push(m[b],y[b])}var w=(0,o().w)(function(e,t,n){var r=g&&e.as||d,a="",u=[],m=e;if(null==e.theme){for(var y in m={},e)m[y]=e[y];m.theme=St().useContext(o().T)}"string"===typeof e.className?a=(0,p().Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var x=(0,s().J)(v.concat(u),t.registered,m);a+=t.key+"-"+x.name,void 0!==i&&(a+=" "+i);var b=g&&void 0===h?l(r):f,w={};for(var S in e)g&&"as"===S||b(S)&&(w[S]=e[S]);return w.className=a,n&&(w.ref=n),St().createElement(St().Fragment,null,St().createElement(c,{cache:t,serialized:x,isStringTag:"string"===typeof r}),St().createElement(r,w))});return w.displayName=void 0!==r?r:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",w.defaultProps=t.defaultProps,w.__emotion_real=w,w.__emotion_base=d,w.__emotion_styles=v,w.__emotion_forwardProp=h,Object.defineProperty(w,"toString",{value:function(){return"."+i}}),w.withComponent=function(t,r){return e(t,(0,Dt().A)({},n,r,{shouldForwardProp:u(w,r,!0)})).apply(void 0,v)},w}}}),c=n.cw(function(e,t){n.d(t,{A:()=>r}),u(),h(),_t();var r=u().A.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){r[e]=r(e)})}),d=n.cw(function(e,t){n.d(t,{A:()=>r});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}}),h=n.cw(function(e,t){n.d(t,{i:()=>o,s:()=>i}),_t();var r=!!Ft().useInsertionEffect&&Ft().useInsertionEffect,i=r||function(e){return e()},o=r||St().useLayoutEffect}),p=n.cw(function(e,t){n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}}),f=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")}),g=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")}),m=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")}),v=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")}),y=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")}),x=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")}),b=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")}),w=n.cw(function(e,t){var n=It();t.A=void 0;var r=n(S()),i=At();t.A=(0,r.default)((0,i.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")}),S=n.cw(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=K()}),_=n.cw(function(e,t){n.d(t,{b:()=>r}),_t(),At();function r(e){return(0,ge().b)(e)}}),A=n.cw(function(e,t){_t(),At();const r=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],i=(0,H().Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,U().A)(n.color)}`],t[`fontSize${(0,U().A)(n.fontSize)}`]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,u,c,d,h,p,f,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(u=l.pxToRem)?void 0:u.call(l,24))||"1.5rem",large:(null==(c=t.typography)||null==(d=c.pxToRem)?void 0:d.call(c,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(g=(t.vars||t).palette)||null==(g=g.action)?void 0:g.disabled,inherit:void 0}[n.color]}}),o=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:p="0 0 24 24"}=n,f=(0,jt().A)(n,r),g=St().isValidElement(o)&&"svg"===o.type,m=(0,Dt().A)({},n,{color:s,component:l,fontSize:u,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:g}),v={};d||(v.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,U().A)(t)}`,`fontSize${(0,U().A)(n)}`]};return(0,$e().A)(i,k().E,r)})(m);return(0,wt().jsxs)(i,(0,Dt().A)({as:l,className:(0,Pt().A)(y.root,a),focusable:"false",color:c,"aria-hidden":!h||void 0,role:h?"img":void 0,ref:t},v,f,g&&o.props,{ownerState:m,children:[g?o.props.children:o,h?(0,wt().jsx)("title",{children:h}):null]}))});o.muiName="SvgIcon";const a=o;n.d(t,["A",0,a])}),k=n.cw(function(e,t){function r(e){return(0,qe().Ay)("MuiSvgIcon",e)}n.d(t,{E:()=>r});(0,Ze().A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"])}),C=n.cw(function(e,t){const r={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};n.d(t,["A",0,r])}),M=n.cw(function(e,t){const r={black:"#000",white:"#fff"};n.d(t,["A",0,r])}),I=n.cw(function(e,t){const r={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};n.d(t,["A",0,r])}),T=n.cw(function(e,t){const r={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};n.d(t,["A",0,r])}),D=n.cw(function(e,t){const r={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};n.d(t,["A",0,r])}),j=n.cw(function(e,t){const r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};n.d(t,["A",0,r])}),P=n.cw(function(e,t){const r={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};n.d(t,["A",0,r])}),L=n.cw(function(e,t){const r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};n.d(t,["A",0,r])}),R=n.cw(function(e,t){function r(e,t){return(0,Dt().A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}n.d(t,{A:()=>r})}),E=n.cw(function(e,t){n.d(t,{Ay:()=>s});const r=["mode","contrastThreshold","tonalOffset"],i={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:M().A.white,default:M().A.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},o={text:{primary:M().A.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:M().A.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function a(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,pe().a)(e.main,i):"dark"===t&&(e.dark=(0,pe().e$)(e.main,o)))}function s(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,jt().A)(e,r),u=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:C().A[200],light:C().A[50],dark:C().A[400]}:{main:C().A[700],light:C().A[400],dark:C().A[800]}}(t),c=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:P().A[200],light:P().A[50],dark:P().A[400]}:{main:P().A[500],light:P().A[300],dark:P().A[700]}}(t),d=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:L().A[500],light:L().A[300],dark:L().A[700]}:{main:L().A[700],light:L().A[400],dark:L().A[800]}}(t),h=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:D().A[400],light:D().A[300],dark:D().A[700]}:{main:D().A[700],light:D().A[500],dark:D().A[900]}}(t),p=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:I().A[400],light:I().A[300],dark:I().A[700]}:{main:I().A[800],light:I().A[500],dark:I().A[900]}}(t),f=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:j().A[400],light:j().A[300],dark:j().A[700]}:{main:"#ed6c02",light:j().A[500],dark:j().A[900]}}(t);function g(e){return(0,pe().eM)(e,o.text.primary)>=n?o.text.primary:i.text.primary}const m=e=>{let{color:t,name:n,mainShade:r=500,lightShade:i=300,darkShade:o=700}=e;if(t=(0,Dt().A)({},t),!t.main&&t[r]&&(t.main=t[r]),!t.hasOwnProperty("main"))throw new Error((0,Xe().A)(11,n?` (${n})`:"",r));if("string"!==typeof t.main)throw new Error((0,Xe().A)(12,n?` (${n})`:"",JSON.stringify(t.main)));return a(t,"light",i,s),a(t,"dark",o,s),t.contrastText||(t.contrastText=g(t.main)),t},v={dark:o,light:i};return(0,He().A)((0,Dt().A)({common:(0,Dt().A)({},M().A),mode:t,primary:m({color:u,name:"primary"}),secondary:m({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:d,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:h,name:"info"}),success:m({color:p,name:"success"}),grey:T().A,contrastThreshold:n,getContrastText:g,augmentColor:m,tonalOffset:s},v[t]),l)}}),N=n.cw(function(e,t){const r=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:i={},typography:o={}}=e,a=(0,jt().A)(e,r);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,Xe().A)(18));const s=(0,E().Ay)(n),l=(0,Se().A)(e);let u=(0,He().A)(l,{mixins:(0,R().A)(l.breakpoints,t),palette:s,shadows:V().A.slice(),typography:(0,z().A)(s,o),transitions:(0,O().Ay)(i),zIndex:(0,Dt().A)({},G().A)});u=(0,He().A)(u,a);for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h<c;h++)d[h-1]=arguments[h];return u=d.reduce((e,t)=>(0,He().A)(e,t),u),u.unstable_sxConfig=(0,Dt().A)({},Pe().A,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return(0,Ee().A)({sx:e,theme:this})},u}const o=i;n.d(t,["A",0,o])}),O=n.cw(function(e,t){n.d(t,{Ay:()=>l});const r=["duration","easing","delay"],i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(e){return`${Math.round(e)}ms`}function s(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function l(e){const t=(0,Dt().A)({},i,e.easing),n=(0,Dt().A)({},o,e.duration);return(0,Dt().A)({getAutoHeightDuration:s,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:s=t.easeInOut,delay:l=0}=i;(0,jt().A)(i,r);return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"===typeof o?o:a(o)} ${s} ${"string"===typeof l?l:a(l)}`).join(",")}},e,{easing:t,duration:n})}n.d(t,["p0",0,o])}),z=n.cw(function(e,t){n.d(t,{A:()=>a});const r=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const i={textTransform:"uppercase"},o='"Roboto", "Helvetica", "Arial", sans-serif';function a(e,t){const n="function"===typeof t?t(e):t,{fontFamily:a=o,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,g=(0,jt().A)(n,r);const m=s/14,v=f||(e=>e/h*m+"rem"),y=(e,t,n,r,i)=>{return(0,Dt().A)({fontFamily:a,fontWeight:e,fontSize:v(t),lineHeight:n},a===o?{letterSpacing:(s=r/t,Math.round(1e5*s)/1e5)+"em"}:{},i,p);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(u,48,1.167,0),h4:y(u,34,1.235,.25),h5:y(u,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(u,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(u,16,1.5,.15),body2:y(u,14,1.43,.15),button:y(c,14,1.75,.4,i),caption:y(u,12,1.66,.4),overline:y(u,12,2.66,1,i),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,He().A)((0,Dt().A)({htmlFontSize:h,pxToRem:v,fontFamily:a,fontSize:s,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:d},x),g,{clone:!1})}}),B=n.cw(function(e,t){const r=(0,N().A)();n.d(t,["A",0,r])}),F=n.cw(function(e,t){n.d(t,["A",0,"$$material"])}),$=n.cw(function(e,t){const r=e=>(0,W().A)(e)&&"classes"!==e;n.d(t,["A",0,r])}),V=n.cw(function(e,t){function r(){return[`${arguments.length<=0?void 0:arguments[0]}px ${arguments.length<=1?void 0:arguments[1]}px ${arguments.length<=2?void 0:arguments[2]}px ${arguments.length<=3?void 0:arguments[3]}px rgba(0,0,0,0.2)`,`${arguments.length<=4?void 0:arguments[4]}px ${arguments.length<=5?void 0:arguments[5]}px ${arguments.length<=6?void 0:arguments[6]}px ${arguments.length<=7?void 0:arguments[7]}px rgba(0,0,0,0.14)`,`${arguments.length<=8?void 0:arguments[8]}px ${arguments.length<=9?void 0:arguments[9]}px ${arguments.length<=10?void 0:arguments[10]}px ${arguments.length<=11?void 0:arguments[11]}px rgba(0,0,0,0.12)`].join(",")}const i=["none",r(0,2,1,-1,0,1,1,0,0,1,3,0),r(0,3,1,-2,0,2,2,0,0,1,5,0),r(0,3,3,-2,0,3,4,0,0,1,8,0),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)];n.d(t,["A",0,i])}),W=n.cw(function(e,t){const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e};n.d(t,["A",0,r])}),H=n.cw(function(e,t){const r=(0,fe().Ay)({themeId:F().A,defaultTheme:B().A,rootShouldForwardProp:$().A});n.d(t,["Ay",0,r])}),G=n.cw(function(e,t){const r={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};n.d(t,["A",0,r])}),U=n.cw(function(e,t){const r=Oe().A;n.d(t,["A",0,r])}),X=n.cw(function(e,t){const r=Ve().A;n.d(t,["A",0,r])}),Y=n.cw(function(e,t){function r(e,t){function n(n,r){return(0,wt().jsx)(A().A,(0,Dt().A)({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=A().A.muiName,St().memo(St().forwardRef(n))}n.d(t,{A:()=>r}),_t(),At()}),q=n.cw(function(e,t){const r=We().A;n.d(t,["A",0,r])}),Z=n.cw(function(e,t){const r=Ue().A;n.d(t,["A",0,r])}),K=n.cw(function(e,t){n.r(t),n.d(t,{capitalize:()=>U().A,createChainedFunction:()=>X().A,createSvgIcon:()=>Y().A,debounce:()=>q().A,deprecatedPropType:()=>Z().A,isMuiElement:()=>Q().A,ownerDocument:()=>J().A,ownerWindow:()=>ee().A,requirePropFactory:()=>te().A,setRef:()=>ne().A,unstable_useEnhancedEffect:()=>oe().A,unstable_useId:()=>le().A,unsupportedProp:()=>re().A,useControlled:()=>ie().A,useEventCallback:()=>ae().A,useForkRef:()=>se().A,useIsFocusVisible:()=>ue().A});const r={configure:e=>{Ne().A.configure(e)}};n.d(t,["unstable_ClassNameGenerator",0,r])}),Q=n.cw(function(e,t){const r=Je().A;n.d(t,["A",0,r])}),J=n.cw(function(e,t){const r=et().A;n.d(t,["A",0,r])}),ee=n.cw(function(e,t){const r=tt().A;n.d(t,["A",0,r])}),te=n.cw(function(e,t){const r=nt().A;n.d(t,["A",0,r])}),ne=n.cw(function(e,t){const r=it().A;n.d(t,["A",0,r])}),re=n.cw(function(e,t){const r=ot().A;n.d(t,["A",0,r])}),ie=n.cw(function(e,t){const r=at().A;n.d(t,["A",0,r])}),oe=n.cw(function(e,t){const r=st().A;n.d(t,["A",0,r])}),ae=n.cw(function(e,t){const r=lt().A;n.d(t,["A",0,r])}),se=n.cw(function(e,t){const r=ut().A;n.d(t,["A",0,r])}),le=n.cw(function(e,t){const r=ct().A;n.d(t,["A",0,r])}),ue=n.cw(function(e,t){const r=dt().A;n.d(t,["A",0,r])}),ce=n.cw(function(e,t){function r(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,wt().jsx)(a().mL,{styles:r})}n.d(t,{A:()=>r}),_t(),At()}),de=n.cw(function(t,r){n.d(r,{A:()=>a}),_t(),At();const i=new Map;function a(t){const{injectFirst:n,enableCssLayer:r,children:a}=t,s=St().useMemo(()=>{const t=`${n}-${r}`;if("object"===typeof document&&i.has(t))return i.get(t);const o=function(t,n){const r=(0,e().A)({key:"css",prepend:t});if(n){const e=r.insert;r.insert=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n[1].styles.match(/^@layer\s+[^{]*$/)||(n[1].styles=`@layer mui {${n[1].styles}}`),e(...n)}}return r}(n,r);return i.set(t,o),o},[n,r]);return n||r?(0,wt().jsx)(o().C,{value:s,children:a}):a}}),he=n.cw(function(e,t){function r(e,t){return(0,c().A)(e,t)}n.r(t),n.d(t,{GlobalStyles:()=>ce().A,StyledEngineProvider:()=>de().A,ThemeContext:()=>o().T,css:()=>a().AH,default:()=>r,internal_serializeStyles:()=>l,keyframes:()=>a().i7}),c();const i=[];function l(e){return i[0]=e,(0,s().J)(i)}n.d(t,["internal_processStyles",0,(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}])}),pe=n.cw(function(e,t){var n=It();t.X4=h,t.e$=p,t.tL=g,t.eM=function(e,t){const n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=f;var r=n(Ye()),i=n(Fe());function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,i.default)(e,t,n)}function a(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(a(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.default)(9,e));let i,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),i=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.default)(10,i))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:i}}const l=e=>{const t=s(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function c(e){e=s(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let l="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",c.push(t[3])),u({type:l,values:c})}function d(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(c(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=s(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,u(e)}function p(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function f(e,t){if(e=s(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?p(e,t):f(e,t)}}),fe=n.cw(function(e,t){var n=It();t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:s=p,slotShouldForwardProp:u=p}=e,c=e=>(0,l.default)((0,r.default)({},e,{theme:v((0,r.default)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:h,slot:f,skipVariantsResolver:g,skipSx:b,overridesResolver:w=y(m(f))}=l,S=(0,i.default)(l,d),_=h&&h.startsWith("Mui")||f?"components":"custom",A=void 0!==g?g:f&&"Root"!==f&&"root"!==f||!1,k=b||!1;let C=p;"Root"===f||"root"===f?C=s:f?C=u:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const M=(0,o.default)(e,(0,r.default)({shouldForwardProp:C,label:void 0},S)),I=e=>"function"===typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?i=>{const o=v({theme:i.theme,defaultTheme:n,themeId:t});return x(e,(0,r.default)({},i,{theme:o}),o.modularCssLayers?_:void 0)}:e,T=function(i){let o=I(i);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const u=s?s.map(I):[];h&&w&&u.push(e=>{const i=v((0,r.default)({},e,{defaultTheme:n,themeId:t}));if(!i.components||!i.components[h]||!i.components[h].styleOverrides)return null;const o=i.components[h].styleOverrides,a={};return Object.entries(o).forEach(t=>{let[n,o]=t;a[n]=x(o,(0,r.default)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),w(e,a)}),h&&!A&&u.push(e=>{var i;const o=v((0,r.default)({},e,{defaultTheme:n,themeId:t}));return x({variants:null==o||null==(i=o.components)||null==(i=i[h])?void 0:i.variants},(0,r.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),k||u.push(c);const d=u.length-s.length;if(Array.isArray(i)&&d>0){const e=new Array(d).fill("");o=[...i,...e],o.raw=[...i.raw,...e]}const p=M(o,...u);return e.muiName&&(p.muiName=e.muiName),p};return M.withConfig&&(T.withConfig=M.withConfig),T}};var r=n(Mt()),i=n(Tt()),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(he()),a=Ge(),s=(n(ze()),n(Qe()),n(_e())),l=n(Re());const u=["ownerState"],c=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const g=(0,s.default)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function y(e){return e?(t,n)=>n[e]:null}function x(e,t,n){let{ownerState:a}=t,s=(0,i.default)(t,u);const l="function"===typeof e?e((0,r.default)({ownerState:a},s)):e;if(Array.isArray(l))return l.flatMap(e=>x(e,(0,r.default)({ownerState:a},s),n));if(l&&"object"===typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,i.default)(l,c);return e.forEach(e=>{let i=!0;if("function"===typeof e.props?i=e.props((0,r.default)({ownerState:a},s,a)):Object.keys(e.props).forEach(t=>{(null==a?void 0:a[t])!==e.props[t]&&s[t]!==e.props[t]&&(i=!1)}),i){Array.isArray(t)||(t=[t]);const i="function"===typeof e.style?e.style((0,r.default)({ownerState:a},s,a)):e.style;t.push(n?f((0,o.internal_serializeStyles)(i),n):i)}}),t}return n?f((0,o.internal_serializeStyles)(l),n):l}}),ge=n.cw(function(e,t){n.d(t,{b:()=>i}),_t(),At();const r=St().createContext(void 0);function i(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,rt().A)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,rt().A)(i,r)}({props:t,name:n,theme:{components:St().useContext(r)}})}}),me=n.cw(function(e,t){function r(e){return"number"!==typeof e?e:`${e}px solid`}function i(e,t){return(0,je().Ay)({prop:e,themeKey:"borders",transform:t})}n.d(t,{t0:()=>r});const o=i("border",r),a=i("borderTop",r),s=i("borderRight",r),l=i("borderBottom",r),u=i("borderLeft",r),c=i("borderColor"),d=i("borderTopColor"),h=i("borderRightColor"),p=i("borderBottomColor"),f=i("borderLeftColor"),g=i("outline",r),m=i("outlineColor"),v=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,De().MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,De()._W)(t,e)});return(0,ve().NI)(e,e.borderRadius,n)}return null};v.propTypes={},v.filterProps=["borderRadius"];(0,ye().A)(o,a,s,l,u,c,d,h,p,f,v,g,m);n.d(t,["Vq",0,v])}),ve=n.cw(function(e,t){n.d(t,{EU:()=>a,NI:()=>o,iZ:()=>l,kW:()=>u,vf:()=>s});const r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function o(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||i;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"===typeof t){const e=o.breakpoints||i;return Object.keys(t).reduce((i,o)=>{if(-1!==Object.keys(e.values||r).indexOf(o)){i[e.up(o)]=n(t[o],o)}else{const e=o;i[e]=t[e]}return i},{})}return n(t)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function s(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function l(e){const t=a(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const o=[t,...r].reduce((e,t)=>(0,He().A)(e,t),{});return s(Object.keys(t),o)}function u(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e),{})}n.d(t,["zu",0,r])}),ye=n.cw(function(e,t){const r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>r[n]?(0,Me().A)(t,r[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};n.d(t,["A",0,r])}),xe=n.cw(function(e,t){function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})}),be=n.cw(function(e,t){n.d(t,{A:()=>o});const r=["values","unit","step"],i=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,Dt().A)({},e,{[t.key]:t.val}),{})};function o(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,a=(0,jt().A)(e,r),s=i(t),l=Object.keys(s);function u(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function c(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-o/100}${n})`}function d(e,r){const i=l.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[l[i]]?t[l[i]]:r)-o/100}${n})`}return(0,Dt().A)({keys:l,values:s,up:u,down:c,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(e,l[l.indexOf(e)+1]):u(e)},not:function(e){const t=l.indexOf(e);return 0===t?u(l[1]):t===l.length-1?c(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},a)}}),we=n.cw(function(e,t){function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,De().LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map(e=>{const n=t(e);return"number"===typeof n?`${n}px`:n}).join(" ")};return n.mui=!0,n}n.d(t,{A:()=>r})}),Se=n.cw(function(e,t){const r=["breakpoints","palette","spacing","shape"];const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:i,shape:o={}}=e,a=(0,jt().A)(e,r),s=(0,be().A)(t),l=(0,we().A)(i);let u=(0,He().A)({breakpoints:s,direction:"ltr",components:{},palette:(0,Dt().A)({mode:"light"},n),spacing:l,shape:(0,Dt().A)({},Ae().A,o)},a);u.applyStyles=xe().A;for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h<c;h++)d[h-1]=arguments[h];return u=d.reduce((e,t)=>(0,He().A)(e,t),u),u.unstable_sxConfig=(0,Dt().A)({},Pe().A,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return(0,Ee().A)({sx:e,theme:this})},u};n.d(t,["A",0,i])}),_e=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Se().A,private_createBreakpoints:()=>be().A,unstable_applyStyles:()=>xe().A})}),Ae=n.cw(function(e,t){const r={borderRadius:4};n.d(t,["A",0,r])}),ke=n.cw(function(e,t){const r=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,De().MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,De()._W)(t,e)});return(0,ve().NI)(e,e.gap,n)}return null};r.propTypes={},r.filterProps=["gap"];const i=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,De().MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,De()._W)(t,e)});return(0,ve().NI)(e,e.columnGap,n)}return null};i.propTypes={},i.filterProps=["columnGap"];const o=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,De().MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,De()._W)(t,e)});return(0,ve().NI)(e,e.rowGap,n)}return null};o.propTypes={},o.filterProps=["rowGap"];const a=(0,je().Ay)({prop:"gridColumn"}),s=(0,je().Ay)({prop:"gridRow"}),l=(0,je().Ay)({prop:"gridAutoFlow"}),u=(0,je().Ay)({prop:"gridAutoColumns"}),c=(0,je().Ay)({prop:"gridAutoRows"}),d=(0,je().Ay)({prop:"gridTemplateColumns"}),h=(0,je().Ay)({prop:"gridTemplateRows"}),p=(0,je().Ay)({prop:"gridTemplateAreas"}),f=(0,je().Ay)({prop:"gridArea"});(0,ye().A)(r,i,o,a,s,l,u,c,d,h,p,f);n.d(t,["Dv",0,i,"pe",0,o,"rQ",0,r])}),Ce=n.cw(function(e,t){function r(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}n.d(t,{A:()=>r})}),Me=n.cw(function(e,t){const r=function(e,t){return t?(0,He().A)(e,t,{clone:!1}):e};n.d(t,["A",0,r])}),Ie=n.cw(function(e,t){function r(e,t){return"grey"===t?t:e}n.d(t,{Sm:()=>r});const i=(0,je().Ay)({prop:"color",themeKey:"palette",transform:r}),o=(0,je().Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:r}),a=(0,je().Ay)({prop:"backgroundColor",themeKey:"palette",transform:r});(0,ye().A)(i,o,a)}),Te=n.cw(function(e,t){function r(e){return e<=1&&0!==e?100*e+"%":e}n.d(t,{LL:()=>r});const i=(0,je().Ay)({prop:"width",transform:r}),o=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,i;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||ve().zu[t];return o?"px"!==(null==(i=e.theme)||null==(i=i.breakpoints)?void 0:i.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:r(t)}};return(0,ve().NI)(e,e.maxWidth,t)}return null};o.filterProps=["maxWidth"];const a=(0,je().Ay)({prop:"minWidth",transform:r}),s=(0,je().Ay)({prop:"height",transform:r}),l=(0,je().Ay)({prop:"maxHeight",transform:r}),u=(0,je().Ay)({prop:"minHeight",transform:r}),c=((0,je().Ay)({prop:"size",cssProperty:"width",transform:r}),(0,je().Ay)({prop:"size",cssProperty:"height",transform:r}),(0,je().Ay)({prop:"boxSizing"}));(0,ye().A)(i,o,a,s,l,u,c);n.d(t,["JX",0,o])}),De=n.cw(function(e,t){n.d(t,{LX:()=>d,Lc:()=>g,MA:()=>c,Ms:()=>m,_W:()=>h});const r={m:"margin",p:"padding"},i={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},o={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},a=(0,Ce().A)(e=>{if(e.length>2){if(!o[e])return[e];e=o[e]}const[t,n]=e.split(""),a=r[t],s=i[n]||"";return Array.isArray(s)?s.map(e=>a+e):[a+s]}),s=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],l=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],u=[...s,...l];function c(e,t,n,r){var i;const o=null!=(i=(0,je().Yn)(e,t,!1))?i:n;return"number"===typeof o?e=>"string"===typeof e?e:o*e:Array.isArray(o)?e=>"string"===typeof e?e:o[e]:"function"===typeof o?o:()=>{}}function d(e){return c(e,"spacing",8)}function h(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function p(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=h(t,n),e),{})}(a(n),r),o=e[n];return(0,ve().NI)(e,o,i)}function f(e,t){const n=d(e.theme);return Object.keys(e).map(r=>p(e,t,r,n)).reduce(Me().A,{})}function g(e){return f(e,s)}function m(e){return f(e,l)}function v(e){return f(e,u)}g.propTypes={},g.filterProps=s,m.propTypes={},m.filterProps=l,v.propTypes={},v.filterProps=u}),je=n.cw(function(e,t){function r(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function i(e,t,n){let i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return i="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:r(e,n)||o,t&&(i=t(i,o,e)),i}n.d(t,{BO:()=>i,Yn:()=>r});const o=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:a}=e,s=e=>{if(null==e[t])return null;const s=e[t],l=r(e.theme,o)||{};return(0,ve().NI)(e,s,e=>{let r=i(l,a,e);return e===r&&"string"===typeof e&&(r=i(l,a,`${t}${"default"===e?"":(0,Oe().A)(e)}`,e)),!1===n?r:{[n]:r}})};return s.propTypes={},s.filterProps=[t],s};n.d(t,["Ay",0,o])}),Pe=n.cw(function(e,t){const r={border:{themeKey:"borders",transform:me().t0},borderTop:{themeKey:"borders",transform:me().t0},borderRight:{themeKey:"borders",transform:me().t0},borderBottom:{themeKey:"borders",transform:me().t0},borderLeft:{themeKey:"borders",transform:me().t0},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:me().t0},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:me().Vq},color:{themeKey:"palette",transform:Ie().Sm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ie().Sm},backgroundColor:{themeKey:"palette",transform:Ie().Sm},p:{style:De().Ms},pt:{style:De().Ms},pr:{style:De().Ms},pb:{style:De().Ms},pl:{style:De().Ms},px:{style:De().Ms},py:{style:De().Ms},padding:{style:De().Ms},paddingTop:{style:De().Ms},paddingRight:{style:De().Ms},paddingBottom:{style:De().Ms},paddingLeft:{style:De().Ms},paddingX:{style:De().Ms},paddingY:{style:De().Ms},paddingInline:{style:De().Ms},paddingInlineStart:{style:De().Ms},paddingInlineEnd:{style:De().Ms},paddingBlock:{style:De().Ms},paddingBlockStart:{style:De().Ms},paddingBlockEnd:{style:De().Ms},m:{style:De().Lc},mt:{style:De().Lc},mr:{style:De().Lc},mb:{style:De().Lc},ml:{style:De().Lc},mx:{style:De().Lc},my:{style:De().Lc},margin:{style:De().Lc},marginTop:{style:De().Lc},marginRight:{style:De().Lc},marginBottom:{style:De().Lc},marginLeft:{style:De().Lc},marginX:{style:De().Lc},marginY:{style:De().Lc},marginInline:{style:De().Lc},marginInlineStart:{style:De().Lc},marginInlineEnd:{style:De().Lc},marginBlock:{style:De().Lc},marginBlockStart:{style:De().Lc},marginBlockEnd:{style:De().Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ke().rQ},rowGap:{style:ke().pe},columnGap:{style:ke().Dv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Te().LL},maxWidth:{style:Te().JX},minWidth:{transform:Te().LL},height:{transform:Te().LL},maxHeight:{transform:Te().LL},minHeight:{transform:Te().LL},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};n.d(t,["A",0,r])}),Le=n.cw(function(e,t){n.d(t,{A:()=>o});const r=["sx"],i=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:Pe().A;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function o(e){const{sx:t}=e,n=(0,jt().A)(e,r),{systemProps:o,otherProps:a}=i(n);let s;return s=Array.isArray(t)?[o,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,He().Q)(e)?(0,Dt().A)({},o,e):o}:(0,Dt().A)({},o,t),(0,Dt().A)({},a,{sx:s})}}),Re=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Ee().A,extendSxProp:()=>Le().A,unstable_createStyleFunctionSx:()=>Ee().k,unstable_defaultSxConfig:()=>Pe().A})}),Ee=n.cw(function(e,t){function r(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:u}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=(0,je().Yn)(n,s)||{};if(u)return u(i);return(0,ve().NI)(i,t,t=>{let n=(0,je().BO)(c,l,t);return t===n&&"string"===typeof t&&(n=(0,je().BO)(c,l,`${e}${"default"===t?"":(0,Oe().A)(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){var r;const{sx:i,theme:o={},nested:a}=n||{};if(!i)return null;const s=null!=(r=o.unstable_sxConfig)?r:Pe().A;function l(n){let r=n;if("function"===typeof n)r=n(o);else if("object"!==typeof n)return n;if(!r)return null;const i=(0,ve().EU)(o.breakpoints),l=Object.keys(i);let u=i;return Object.keys(r).forEach(n=>{const i=(a=r[n],l=o,"function"===typeof a?a(l):a);var a,l;if(null!==i&&void 0!==i)if("object"===typeof i)if(s[n])u=(0,Me().A)(u,e(n,i,o,s));else{const e=(0,ve().NI)({theme:o},i,e=>({[n]:e}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(r);return t.every(e=>i.size===Object.keys(e).length)}(e,i)?u=(0,Me().A)(u,e):u[n]=t({sx:i,theme:o,nested:!0})}else u=(0,Me().A)(u,e(n,i,o,s))}),!a&&o.modularCssLayers?{"@layer sx":(0,ve().vf)(l,u)}:(0,ve().vf)(l,u)}return Array.isArray(i)?i.map(l):l(i)}}n.d(t,{k:()=>r});const i=r();i.filterProps=["sx"];const o=i;n.d(t,["A",0,o])}),Ne=n.cw(function(e,t){const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})();n.d(t,["A",0,i])}),Oe=n.cw(function(e,t){function r(e){if("string"!==typeof e)throw new Error((0,Xe().A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}n.d(t,{A:()=>r})}),ze=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Oe().A})}),Be=n.cw(function(e,t){const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))};n.d(t,["A",0,r])}),Fe=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Be().A})}),$e=n.cw(function(e,t){function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{A:()=>r})}),Ve=n.cw(function(e,t){function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)},()=>{})}n.d(t,{A:()=>r})}),We=n.cw(function(e,t){function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(()=>{e.apply(this,i)},n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})}),He=n.cw(function(e,t){function r(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i(e){if(St().isValidElement(e)||!r(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=i(e[n])}),t}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const a=n.clone?(0,Dt().A)({},e):e;return r(e)&&r(t)&&Object.keys(t).forEach(s=>{St().isValidElement(t[s])?a[s]=t[s]:r(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&r(e[s])?a[s]=o(e[s],t[s],n):n.clone?a[s]=r(t[s])?i(t[s]):t[s]:a[s]=t[s]}),a}n.d(t,{A:()=>o,Q:()=>r}),_t()}),Ge=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>He().A,isPlainObject:()=>He().Q})}),Ue=n.cw(function(e,t){function r(e,t){return()=>null}n.d(t,{A:()=>r})}),Xe=n.cw(function(e,t){function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})}),Ye=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Xe().A})}),qe=n.cw(function(e,t){n.d(t,{Ay:()=>i});const r={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=r[t];return i?`${n}-${i}`:`${Ne().A.generate(e)}-${t}`}}),Ze=n.cw(function(e,t){function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r={};return t.forEach(t=>{r[t]=(0,qe().Ay)(e,t,n)}),r}n.d(t,{A:()=>r})}),Ke=n.cw(function(e,t){n.d(t,{A:()=>s,q:()=>i});const r=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t=`${e}`.match(r);return t&&t[1]||""}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function a(e,t,n){const r=o(t);return e.displayName||(""!==r?`${n}(${r})`:n)}function s(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return o(e,"Component");if("object"===typeof e)switch(e.$$typeof){case bt().vM:return a(e,e.render,"ForwardRef");case bt().lD:return a(e,e.type,"memo");default:return}}}}),Qe=n.cw(function(e,t){n.r(t),n.d(t,{default:()=>Ke().A,getFunctionName:()=>Ke().q})}),Je=n.cw(function(e,t){function r(e,t){var n,r;return St().isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)}n.d(t,{A:()=>r}),_t()}),et=n.cw(function(e,t){function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})}),tt=n.cw(function(e,t){function r(e){return(0,et().A)(e).defaultView||window}n.d(t,{A:()=>r})}),nt=n.cw(function(e,t){function r(e,t){return()=>null}n.d(t,{A:()=>r})}),rt=n.cw(function(e,t){function r(e,t){const n=(0,Dt().A)({},t);return Object.keys(e).forEach(i=>{if(i.toString().match(/^(components|slots)$/))n[i]=(0,Dt().A)({},e[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const o=e[i]||{},a=t[i];n[i]={},a&&Object.keys(a)?o&&Object.keys(o)?(n[i]=(0,Dt().A)({},a),Object.keys(o).forEach(e=>{n[i][e]=r(o[e],a[e])})):n[i]=a:n[i]=o}else void 0===n[i]&&(n[i]=e[i])}),n}n.d(t,{A:()=>r})}),it=n.cw(function(e,t){function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})}),ot=n.cw(function(e,t){function r(e,t,n,r,i){return null}n.d(t,{A:()=>r})}),at=n.cw(function(e,t){function r(e){let{controlled:t,default:n,name:r,state:i="value"}=e;const{current:o}=St().useRef(void 0!==t),[a,s]=St().useState(n);return[o?t:a,St().useCallback(e=>{o||s(e)},[])]}n.d(t,{A:()=>r}),_t()}),st=n.cw(function(e,t){_t();const r="undefined"!==typeof window?St().useLayoutEffect:St().useEffect;n.d(t,["A",0,r])}),lt=n.cw(function(e,t){_t();const r=function(e){const t=St().useRef(e);return(0,st().A)(()=>{t.current=e}),St().useRef(function(){return(0,t.current)(...arguments)}).current};n.d(t,["A",0,r])}),ut=n.cw(function(e,t){function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return St().useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,it().A)(t,e)})},t)}n.d(t,{A:()=>r}),_t()}),ct=n.cw(function(e,t){n.d(t,{A:()=>o}),_t();let r=0;const i=Ft()["useId".toString()];function o(e){if(void 0!==i){const t=i();return null!=e?e:t}return function(e){const[t,n]=St().useState(e),i=e||t;return St().useEffect(()=>{null==t&&(r+=1,n(`mui-${r}`))},[t]),i}(e)}}),dt=n.cw(function(e,t){n.d(t,{A:()=>d}),_t();let r=!0,i=!1;const o=new(ft().E),a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){e.metaKey||e.altKey||e.ctrlKey||(r=!0)}function l(){r=!1}function u(){"hidden"===this.visibilityState&&i&&(r=!0)}function c(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return r||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function d(){const e=St().useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",s,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("touchstart",l,!0),t.addEventListener("visibilitychange",u,!0))},[]),t=St().useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!c(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(i=!0,o.start(100,()=>{i=!1}),t.current=!1,!0)},ref:e}}}),ht=n.cw(function(e,t){n.d(t,{A:()=>i}),_t();const r={};function i(e,t){const n=St().useRef(r);return n.current===r&&(n.current=e(t)),n}}),pt=n.cw(function(e,t){n.d(t,{A:()=>i}),_t();const r=[];function i(e){St().useEffect(e,r)}}),ft=n.cw(function(e,t){n.d(t,{A:()=>i,E:()=>r});class r{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new r}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function i(){const e=(0,ht().A)(r.create).current;return(0,pt().A)(e.disposeEffect),e}}),gt=n.cw(function(e,t){var n=mt(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function s(e){return n.isMemo(e)?o:a[e.$$typeof]||r}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);c&&(a=a.concat(c(n)));for(var f=s(t),g=s(n),m=0;m<a.length;++m){var v=a[m];if(!i[v]&&(!r||!r[v])&&(!g||!g[v])&&(!f||!f[v])){var y=d(n,v);try{l(t,v,y)}catch(x){}}}}return t}}),mt=()=>n(763),vt=n.cw(function(e,t){var n=_t(),r=Ct();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function s(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(a[e]=t,e=0;e<t.length;e++)o.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var m=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!c.call(p,e)||!c.call(h,e)&&(d.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(m,v);g[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(m,v);g[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(m,v);g[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var x=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),C=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),j=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function R(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=L&&e[L]||e["@@iterator"])?e:null}var E,N=Object.assign;function O(e){if(void 0===E)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);E=t&&t[1]||""}return"\n"+E+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?O(e):""}function F(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case w:return"Portal";case A:return"Profiler";case _:return"StrictMode";case I:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function U(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=H(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function K(e,t){Z(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?J(e,t.type,n):t.hasOwnProperty("defaultValue")&&J(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Q(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function J(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ee=Array.isArray;function te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return N({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(ee(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ie(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,ce=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=fe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach(function(e){pe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var me=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xe=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Se=null,_e=null;function Ae(e){if(e=bi(e)){if("function"!==typeof we)throw Error(i(280));var t=e.stateNode;t&&(t=Si(t),we(e.stateNode,e.type,t))}}function ke(e){Se?_e?_e.push(e):_e=[e]:Se=e}function Ce(){if(Se){var e=Se,t=_e;if(_e=Se=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Me(e,t){return e(t)}function Ie(){}var Te=!1;function De(e,t,n){if(Te)return e(t,n);Te=!0;try{return Me(e,t,n)}finally{Te=!1,(null!==Se||null!==_e)&&(Ie(),Ce())}}function je(e,t){var n=e.stateNode;if(null===n)return null;var r=Si(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Pe=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Pe=!1}function Re(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ee=!1,Ne=null,Oe=!1,ze=null,Be={onError:function(e){Ee=!0,Ne=e}};function Fe(e,t,n,r,i,o,a,s,l){Ee=!1,Ne=null,Re.apply(Be,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if($e(e)!==e)throw Error(i(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return We(o),e;if(a===r)return We(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var Ue=r.unstable_scheduleCallback,Xe=r.unstable_cancelCallback,Ye=r.unstable_shouldYield,qe=r.unstable_requestPaint,Ze=r.unstable_now,Ke=r.unstable_getCurrentPriorityLevel,Qe=r.unstable_ImmediatePriority,Je=r.unstable_UserBlockingPriority,et=r.unstable_NormalPriority,tt=r.unstable_LowPriority,nt=r.unstable_IdlePriority,rt=null,it=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/st|0)|0},at=Math.log,st=Math.LN2;var lt=64,ut=4194304;function ct(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ct(s):0!==(o&=a)&&(r=ct(o))}else 0!==(a=n&~i)?r=ct(a):0!==o&&(r=ct(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function xt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var bt,wt,St,At,kt,Mt=!1,It=[],Tt=null,Dt=null,jt=null,Pt=new Map,Lt=new Map,Rt=[],Et="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Dt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Ot(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function zt(e){var t=xi(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void kt(e.priority,function(){St(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Ft(e,t,n){Bt(e)&&n.delete(t)}function $t(){Mt=!1,null!==Tt&&Bt(Tt)&&(Tt=null),null!==Dt&&Bt(Dt)&&(Dt=null),null!==jt&&Bt(jt)&&(jt=null),Pt.forEach(Ft),Lt.forEach(Ft)}function Vt(e,t){e.blockedOn===t&&(e.blockedOn=null,Mt||(Mt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,$t)))}function Wt(e){function t(t){return Vt(t,e)}if(0<It.length){Vt(It[0],e);for(var n=1;n<It.length;n++){var r=It[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Vt(Tt,e),null!==Dt&&Vt(Dt,e),null!==jt&&Vt(jt,e),Pt.forEach(t),Lt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)zt(n),null===n.blockedOn&&Rt.shift()}var Ht=x.ReactCurrentBatchConfig,Gt=!0;function Ut(e,t,n,r){var i=yt,o=Ht.transition;Ht.transition=null;try{yt=1,Yt(e,t,n,r)}finally{yt=i,Ht.transition=o}}function Xt(e,t,n,r){var i=yt,o=Ht.transition;Ht.transition=null;try{yt=4,Yt(e,t,n,r)}finally{yt=i,Ht.transition=o}}function Yt(e,t,n,r){if(Gt){var i=Zt(e,t,n,r);if(null===i)Gr(e,t,r,qt,n),Nt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Ot(Tt,e,t,n,r,i),!0;case"dragenter":return Dt=Ot(Dt,e,t,n,r,i),!0;case"mouseover":return jt=Ot(jt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Pt.set(o,Ot(Pt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Lt.set(o,Ot(Lt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Nt(e,r),4&t&&-1<Et.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&bt(o),null===(o=Zt(e,t,n,r))&&Gr(e,t,r,qt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Gr(e,t,r,null,n)}}var qt=null;function Zt(e,t,n,r){if(qt=null,null!==(e=xi(e=be(r))))if(null===(t=$e(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ke()){case Qe:return 1;case Je:return 4;case et:case tt:return 16;case nt:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,en=null;function tn(){if(en)return en;var e,t,n=Jt,r=n.length,i="value"in Qt?Qt.value:Qt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return en=i.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function on(){return!1}function an(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rn:on,this.isPropagationStopped=on,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn,ln,un,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=an(cn),hn=N({},cn,{view:0,detail:0}),pn=an(hn),fn=N({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(sn=e.screenX-un.screenX,ln=e.screenY-un.screenY):ln=sn=0,un=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),gn=an(fn),mn=an(N({},fn,{dataTransfer:0})),vn=an(N({},hn,{relatedTarget:0})),yn=an(N({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=N({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(xn),wn=an(N({},cn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},An={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=An[e])&&!!t[e]}function Cn(){return kn}var Mn=N({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=an(Mn),Tn=an(N({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dn=an(N({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),jn=an(N({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=N({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=an(Pn),Rn=[9,13,27,32],En=u&&"CompositionEvent"in window,Nn=null;u&&"documentMode"in document&&(Nn=document.documentMode);var On=u&&"TextEvent"in window&&!Nn,zn=u&&(!En||Nn&&8<Nn&&11>=Nn),Bn=String.fromCharCode(32),Fn=!1;function $n(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Un(e,t,n,r){ke(r),0<(t=Xr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,Yn=null;function qn(e){Br(e,0)}function Zn(e){if(U(wi(e)))return e}function Kn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Jn;if(u){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"===typeof tr.oninput}Jn=er}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function nr(){Xn&&(Xn.detachEvent("onpropertychange",rr),Yn=Xn=null)}function rr(e){if("value"===e.propertyName&&Zn(Yn)){var t=[];Un(t,Yn,e,be(e)),De(qn,t)}}function ir(e,t,n){"focusin"===e?(nr(),Yn=n,(Xn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Yn)}function ar(e,t){if("click"===e)return Zn(t)}function sr(e,t){if("input"===e||"change"===e)return Zn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function ur(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!c.call(t,i)||!lr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function gr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dr(n,o);var a=dr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,xr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==X(r)||("selectionStart"in(r=vr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},xr&&ur(xr,r)||(xr=r,0<(r=Xr(yr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionend:Sr("Transition","TransitionEnd")},Ar={},kr={};function Cr(e){if(Ar[e])return Ar[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return Ar[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Mr=Cr("animationend"),Ir=Cr("animationiteration"),Tr=Cr("animationstart"),Dr=Cr("transitionend"),jr=new Map,Pr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lr(e,t){jr.set(e,t),s(t,[e])}for(var Rr=0;Rr<Pr.length;Rr++){var Er=Pr[Rr];Lr(Er.toLowerCase(),"on"+(Er[0].toUpperCase()+Er.slice(1)))}Lr(Mr,"onAnimationEnd"),Lr(Ir,"onAnimationIteration"),Lr(Tr,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(Dr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function zr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,l,u){if(Fe.apply(this,arguments),Ee){if(!Ee)throw Error(i(198));var c=Ne;Ee=!1,Ne=null,Oe||(Oe=!0,ze=c)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;zr(i,s,u),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;zr(i,s,u),o=l}}}if(Oe)throw e=ze,Oe=!1,ze=null,e}function Fr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function $r(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function Wr(e){if(!e[Vr]){e[Vr]=!0,o.forEach(function(t){"selectionchange"!==t&&(Or.has(t)||$r(t,!1,e),$r(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Vr]||(t[Vr]=!0,$r("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Kt(t)){case 1:var i=Ut;break;case 4:i=Xt;break;default:i=Yt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Gr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=xi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}De(function(){var r=o,i=be(n),a=[];e:{var s=jr.get(e);if(void 0!==s){var l=dn,u=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=In;break;case"focusin":u="focus",l=vn;break;case"focusout":u="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Dn;break;case Mr:case Ir:case Tr:l=yn;break;case Dr:l=jn;break;case"scroll":l=pn;break;case"wheel":l=Ln;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=0!==(4&t),d=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=je(f,h))&&c.push(Ur(f,g,p)))),d)break;f=f.return}0<c.length&&(s=new l(s,u,null,n,i),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xe||!(u=n.relatedTarget||n.fromElement)||!xi(u)&&!u[gi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?xi(u):null)&&(u!==(d=$e(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=gn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:wi(l),p=null==u?s:wi(u),(s=new c(g,f+"leave",l,n,i)).target=d,s.relatedTarget=p,g=null,xi(i)===r&&((c=new c(h,f+"enter",u,n,i)).target=p,c.relatedTarget=d,g=c),d=g,l&&u)e:{for(h=u,f=0,p=c=l;p;p=Yr(p))f++;for(p=0,g=h;g;g=Yr(g))p++;for(;0<f-p;)c=Yr(c),f--;for(;0<p-f;)h=Yr(h),p--;for(;f--;){if(c===h||null!==h&&c===h.alternate)break e;c=Yr(c),h=Yr(h)}c=null}else c=null;null!==l&&qr(a,s,l,c,!1),null!==u&&null!==d&&qr(a,d,u,c,!0)}if("select"===(l=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Kn;else if(Gn(s))if(Qn)m=sr;else{m=or;var v=ir}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ar);switch(m&&(m=m(e,r))?Un(a,m,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&J(s,"number",s.value)),v=r?wi(r):window,e){case"focusin":(Gn(v)||"true"===v.contentEditable)&&(vr=v,yr=r,xr=null);break;case"focusout":xr=yr=vr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":wr(a,n,i)}var y;if(En)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Wn?$n(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(zn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Wn&&(y=tn()):(Jt="value"in(Qt=i)?Qt.value:Qt.textContent,Wn=!0)),0<(v=Xr(r,x)).length&&(x=new wn(x,e,null,n,i),a.push({event:x,listeners:v}),y?x.data=y:null!==(y=Vn(n))&&(x.data=y))),(y=On?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!En&&$n(e,t)?(e=tn(),en=Jt=Qt=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Xr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Br(a,t)})}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=je(e,n))&&r.unshift(Ur(e,o,i)),null!=(o=je(e,t))&&r.push(Ur(e,o,i))),e=e.return}return r}function Yr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function qr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=je(n,o))&&a.unshift(Ur(n,l,s)):i||null!=(l=je(n,o))&&a.push(Ur(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Kr,"")}function Jr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(i(425))}function ei(){}var ti=null,ni=null;function ri(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ii="function"===typeof setTimeout?setTimeout:void 0,oi="function"===typeof clearTimeout?clearTimeout:void 0,ai="function"===typeof Promise?Promise:void 0,si="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ai?function(e){return ai.resolve(null).then(e).catch(li)}:ii;function li(e){setTimeout(function(){throw e})}function ui(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Wt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Wt(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function di(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hi=Math.random().toString(36).slice(2),pi="__reactFiber$"+hi,fi="__reactProps$"+hi,gi="__reactContainer$"+hi,mi="__reactEvents$"+hi,vi="__reactListeners$"+hi,yi="__reactHandles$"+hi;function xi(e){var t=e[pi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gi]||n[pi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=di(e);null!==e;){if(n=e[pi])return n;e=di(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[pi]||e[gi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function Si(e){return e[fi]||null}var _i=[],Ai=-1;function ki(e){return{current:e}}function Ci(e){0>Ai||(e.current=_i[Ai],_i[Ai]=null,Ai--)}function Mi(e,t){Ai++,_i[Ai]=e.current,e.current=t}var Ii={},Ti=ki(Ii),Di=ki(!1),ji=Ii;function Pi(e,t){var n=e.type.contextTypes;if(!n)return Ii;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Li(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ri(){Ci(Di),Ci(Ti)}function Ei(e,t,n){if(Ti.current!==Ii)throw Error(i(168));Mi(Ti,t),Mi(Di,n)}function Ni(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,V(e)||"Unknown",o));return N({},n,r)}function Oi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ii,ji=Ti.current,Mi(Ti,e),Mi(Di,Di.current),!0}function zi(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Ni(e,t,ji),r.__reactInternalMemoizedMergedChildContext=e,Ci(Di),Ci(Ti),Mi(Ti,e)):Ci(Di),Mi(Di,n)}var Bi=null,Fi=!1,$i=!1;function Vi(e){null===Bi?Bi=[e]:Bi.push(e)}function Wi(){if(!$i&&null!==Bi){$i=!0;var e=0,t=yt;try{var n=Bi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,Fi=!1}catch(i){throw null!==Bi&&(Bi=Bi.slice(e+1)),Ue(Qe,Wi),i}finally{yt=t,$i=!1}}return null}var Hi=[],Gi=0,Ui=null,Xi=0,Yi=[],qi=0,Zi=null,Ki=1,Qi="";function Ji(e,t){Hi[Gi++]=Xi,Hi[Gi++]=Ui,Ui=e,Xi=t}function eo(e,t,n){Yi[qi++]=Ki,Yi[qi++]=Qi,Yi[qi++]=Zi,Zi=e;var r=Ki;e=Qi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var o=32-ot(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ki=1<<32-ot(t)+i|n<<i|r,Qi=o+e}else Ki=1<<o|n<<i|r,Qi=e}function to(e){null!==e.return&&(Ji(e,1),eo(e,1,0))}function no(e){for(;e===Ui;)Ui=Hi[--Gi],Hi[Gi]=null,Xi=Hi[--Gi],Hi[Gi]=null;for(;e===Zi;)Zi=Yi[--qi],Yi[qi]=null,Qi=Yi[--qi],Yi[qi]=null,Ki=Yi[--qi],Yi[qi]=null}var ro=null,io=null,oo=!1,ao=null;function so(e,t){var n=Pu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function lo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,io=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zi?{id:Ki,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ro=e,io=null,!0);default:return!1}}function uo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(oo){var t=io;if(t){var n=t;if(!lo(e,t)){if(uo(e))throw Error(i(418));t=ci(n.nextSibling);var r=ro;t&&lo(e,t)?so(r,n):(e.flags=-4097&e.flags|2,oo=!1,ro=e)}}else{if(uo(e))throw Error(i(418));e.flags=-4097&e.flags|2,oo=!1,ro=e}}}function ho(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function po(e){if(e!==ro)return!1;if(!oo)return ho(e),oo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ri(e.type,e.memoizedProps)),t&&(t=io)){if(uo(e))throw fo(),Error(i(418));for(;t;)so(e,t),t=ci(t.nextSibling)}if(ho(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){io=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}io=null}}else io=ro?ci(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=io;e;)e=ci(e.nextSibling)}function go(){io=ro=null,oo=!1}function mo(e){null===ao?ao=[e]:ao.push(e)}var vo=x.ReactCurrentBatchConfig;function yo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function xo(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ru(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=zu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===j&&bo(i)===t.type)?((r=o(t,n.props)).ref=yo(e,t,n),r.return=e,r):((r=Eu(n.type,n.key,n.props,null,e.mode,r)).ref=yo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Nu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=zu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case b:return(n=Eu(t.type,t.key,t.props,null,e.mode,n)).ref=yo(e,null,t),n.return=e,n;case w:return(t=Bu(t,e.mode,n)).return=e,t;case j:return h(e,(0,t._init)(t._payload),n)}if(ee(t)||R(t))return(t=Nu(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===i?u(e,t,n,r):null;case w:return n.key===i?c(e,t,n,r):null;case j:return p(e,t,(i=n._init)(n._payload),r)}if(ee(n)||R(n))return null!==i?null:d(e,t,n,r,null);xo(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case b:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case j:return f(e,t,n,(0,r._init)(r._payload),i)}if(ee(r)||R(r))return d(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function g(i,o,s,l){for(var u=null,c=null,d=o,g=o=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(i,d,s[g],l);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,g),null===c?u=v:c.sibling=v,c=v,d=m}if(g===s.length)return n(i,d),oo&&Ji(i,g),u;if(null===d){for(;g<s.length;g++)null!==(d=h(i,s[g],l))&&(o=a(d,o,g),null===c?u=d:c.sibling=d,c=d);return oo&&Ji(i,g),u}for(d=r(i,d);g<s.length;g++)null!==(m=f(d,i,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),o=a(m,o,g),null===c?u=m:c.sibling=m,c=m);return e&&d.forEach(function(e){return t(i,e)}),oo&&Ji(i,g),u}function m(o,s,l,u){var c=R(l);if("function"!==typeof c)throw Error(i(150));if(null==(l=c.call(l)))throw Error(i(151));for(var d=c=null,g=s,m=s=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var x=p(o,g,y.value,u);if(null===x){null===g&&(g=v);break}e&&g&&null===x.alternate&&t(o,g),s=a(x,s,m),null===d?c=x:d.sibling=x,d=x,g=v}if(y.done)return n(o,g),oo&&Ji(o,m),c;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(o,y.value,u))&&(s=a(y,s,m),null===d?c=y:d.sibling=y,d=y);return oo&&Ji(o,m),c}for(g=r(o,g);!y.done;m++,y=l.next())null!==(y=f(g,o,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?c=y:d.sibling=y,d=y);return e&&g.forEach(function(e){return t(o,e)}),oo&&Ji(o,m),c}return function e(r,i,a,l){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var u=a.key,c=i;null!==c;){if(c.key===u){if((u=a.type)===S){if(7===c.tag){n(r,c.sibling),(i=o(c,a.props.children)).return=r,r=i;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===j&&bo(u)===c.type){n(r,c.sibling),(i=o(c,a.props)).ref=yo(r,c,a),i.return=r,r=i;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===S?((i=Nu(a.props.children,r.mode,l,a.key)).return=r,r=i):((l=Eu(a.type,a.key,a.props,null,r.mode,l)).ref=yo(r,i,a),l.return=r,r=l)}return s(r);case w:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Bu(a,r.mode,l)).return=r,r=i}return s(r);case j:return e(r,i,(c=a._init)(a._payload),l)}if(ee(a))return g(r,i,a,l);if(R(a))return m(r,i,a,l);xo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=zu(a,r.mode,l)).return=r,r=i),s(r)):n(r,i)}}var So=wo(!0),_o=wo(!1),Ao=ki(null),ko=null,Co=null,Mo=null;function Io(){Mo=Co=ko=null}function To(e){var t=Ao.current;Ci(Ao),e._currentValue=t}function Do(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jo(e,t){ko=e,Mo=Co=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Po(e){var t=e._currentValue;if(Mo!==e)if(e={context:e,memoizedValue:t,next:null},null===Co){if(null===ko)throw Error(i(308));Co=e,ko.dependencies={lanes:0,firstContext:e}}else Co=Co.next=e;return t}var Lo=null;function Ro(e){null===Lo?Lo=[e]:Lo.push(e)}function Eo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Oo=!1;function zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $o(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return null===(i=r.interleaved)?(t.next=t,Ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function Vo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Wo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var i=e.updateQueue;Oo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,c=u=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"===typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=g.payload)?f.call(p,d,h):f)||void 0===h)break e;d=N({},d,h);break e;case 2:Oo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ol|=a,e.lanes=a,e.memoizedState=d}}function Go(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var Uo={},Xo=ki(Uo),Yo=ki(Uo),qo=ki(Uo);function Zo(e){if(e===Uo)throw Error(i(174));return e}function Ko(e,t){switch(Mi(qo,t),Mi(Yo,e),Mi(Xo,Uo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ci(Xo),Mi(Xo,t)}function Qo(){Ci(Xo),Ci(Yo),Ci(qo)}function Jo(e){Zo(qo.current);var t=Zo(Xo.current),n=se(t,e.type);t!==n&&(Mi(Yo,e),Mi(Xo,n))}function ea(e){Yo.current===e&&(Ci(Xo),Ci(Yo))}var ta=ki(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function ia(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=x.ReactCurrentDispatcher,aa=x.ReactCurrentBatchConfig,sa=0,la=null,ua=null,ca=null,da=!1,ha=!1,pa=0,fa=0;function ga(){throw Error(i(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function va(e,t,n,r,o,a){if(sa=a,la=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?es:ts,e=n(r,o),ha){a=0;do{if(ha=!1,pa=0,25<=a)throw Error(i(301));a+=1,ca=ua=null,t.updateQueue=null,oa.current=ns,e=n(r,o)}while(ha)}if(oa.current=Ja,t=null!==ua&&null!==ua.next,sa=0,ca=ua=la=null,da=!1,t)throw Error(i(300));return e}function ya(){var e=0!==pa;return pa=0,e}function xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?la.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===ua){var e=la.alternate;e=null!==e?e.memoizedState:null}else e=ua.next;var t=null===ca?la.memoizedState:ca.next;if(null!==t)ca=t,ua=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ua=e).memoizedState,baseState:ua.baseState,baseQueue:ua.baseQueue,queue:ua.queue,next:null},null===ca?la.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"===typeof t?t(e):t}function Sa(e){var t=ba(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ua,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=s=null,u=null,c=a;do{var d=c.lane;if((sa&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=r):u=u.next=h,la.lanes|=d,Ol|=d}c=c.next}while(null!==c&&c!==a);null===u?s=r:u.next=l,lr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,la.lanes|=a,Ol|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _a(e){var t=ba(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);lr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Aa(){}function ka(e,t){var n=la,r=ba(),o=t(),a=!lr(r.memoizedState,o);if(a&&(r.memoizedState=o,bs=!0),r=r.queue,Oa(Ia.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Pa(9,Ma.bind(null,n,r,o,t),void 0,null),null===Dl)throw Error(i(349));0!==(30&sa)||Ca(n,t,o)}return o}function Ca(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ma(e,t,n,r){t.value=n,t.getSnapshot=r,Ta(t)&&Da(e)}function Ia(e,t,n){return n(function(){Ta(t)&&Da(e)})}function Ta(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function Da(e){var t=No(e,1);null!==t&&ru(t,e,1,-1)}function ja(e){var t=xa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=qa.bind(null,la,e),[t.memoizedState,e]}function Pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function La(){return ba().memoizedState}function Ra(e,t,n,r){var i=xa();la.flags|=e,i.memoizedState=Pa(1|t,n,void 0,void 0===r?null:r)}function Ea(e,t,n,r){var i=ba();r=void 0===r?null:r;var o=void 0;if(null!==ua){var a=ua.memoizedState;if(o=a.destroy,null!==r&&ma(r,a.deps))return void(i.memoizedState=Pa(t,n,o,r))}la.flags|=e,i.memoizedState=Pa(1|t,n,o,r)}function Na(e,t){return Ra(8390656,8,e,t)}function Oa(e,t){return Ea(2048,8,e,t)}function za(e,t){return Ea(4,2,e,t)}function Ba(e,t){return Ea(4,4,e,t)}function Fa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function $a(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ea(4,4,Fa.bind(null,t,e),n)}function Va(){}function Wa(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ga(e,t,n){return 0===(21&sa)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(lr(n,t)||(n=ft(),la.lanes|=n,Ol|=n,e.baseState=!0),t)}function Ua(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{yt=n,aa.transition=r}}function Xa(){return ba().memoizedState}function Ya(e,t,n){var r=nu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Za(e))Ka(t,n);else if(null!==(n=Eo(e,t,n,r))){ru(n,e,r,tu()),Qa(n,t,r)}}function qa(e,t,n){var r=nu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Za(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,lr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ro(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=Eo(e,t,i,r))&&(ru(n,e,r,i=tu()),Qa(n,t,r))}}function Za(e){var t=e.alternate;return e===la||null!==t&&t===la}function Ka(e,t){ha=da=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Ja={readContext:Po,useCallback:ga,useContext:ga,useEffect:ga,useImperativeHandle:ga,useInsertionEffect:ga,useLayoutEffect:ga,useMemo:ga,useReducer:ga,useRef:ga,useState:ga,useDebugValue:ga,useDeferredValue:ga,useTransition:ga,useMutableSource:ga,useSyncExternalStore:ga,useId:ga,unstable_isNewReconciler:!1},es={readContext:Po,useCallback:function(e,t){return xa().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:Na,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ra(4194308,4,Fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ra(4,2,e,t)},useMemo:function(e,t){var n=xa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ya.bind(null,la,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xa().memoizedState=e},useState:ja,useDebugValue:Va,useDeferredValue:function(e){return xa().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=Ua.bind(null,e[1]),xa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=la,o=xa();if(oo){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Dl)throw Error(i(349));0!==(30&sa)||Ca(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Na(Ia.bind(null,r,a,e),[e]),r.flags|=2048,Pa(9,Ma.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xa(),t=Dl.identifierPrefix;if(oo){var n=Qi;t=":"+t+"R"+(n=(Ki&~(1<<32-ot(Ki)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ts={readContext:Po,useCallback:Wa,useContext:Po,useEffect:Oa,useImperativeHandle:$a,useInsertionEffect:za,useLayoutEffect:Ba,useMemo:Ha,useReducer:Sa,useRef:La,useState:function(){return Sa(wa)},useDebugValue:Va,useDeferredValue:function(e){return Ga(ba(),ua.memoizedState,e)},useTransition:function(){return[Sa(wa)[0],ba().memoizedState]},useMutableSource:Aa,useSyncExternalStore:ka,useId:Xa,unstable_isNewReconciler:!1},ns={readContext:Po,useCallback:Wa,useContext:Po,useEffect:Oa,useImperativeHandle:$a,useInsertionEffect:za,useLayoutEffect:Ba,useMemo:Ha,useReducer:_a,useRef:La,useState:function(){return _a(wa)},useDebugValue:Va,useDeferredValue:function(e){var t=ba();return null===ua?t.memoizedState=e:Ga(t,ua.memoizedState,e)},useTransition:function(){return[_a(wa)[0],ba().memoizedState]},useMutableSource:Aa,useSyncExternalStore:ka,useId:Xa,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function is(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Fo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(ru(t,e,i,r),Vo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Fo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(ru(t,e,i,r),Vo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),i=Fo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=$o(e,i,r))&&(ru(t,e,r,n),Vo(t,e,r))}};function as(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(i,o))}function ss(e,t,n){var r=!1,i=Ii,o=t.contextType;return"object"===typeof o&&null!==o?o=Po(o):(i=Li(t)?ji:Ti.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Pi(e,i):Ii),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ls(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function us(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},zo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Po(o):(o=Li(t)?ji:Ti.current,i.context=Pi(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(is(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&os.enqueueReplaceState(i,i.state,null),Ho(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=F(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ps="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Fo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gl||(Gl=!0,Ul=r),hs(0,t)},n}function gs(e,t,n){(n=Fo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Xl?Xl=new Set([this]):Xl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Fo(-1,1)).tag=2,$o(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xs=x.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?_o(t,null,n,r):So(t,e.child,n,r)}function Ss(e,t,n,r,i){n=n.render;var o=t.ref;return jo(t,i),r=va(e,t,n,r,o,i),n=ya(),null===e||bs?(oo&&n&&to(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function _s(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Lu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Eu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,As(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(a,r)&&e.ref===t.ref)return Gs(e,t,i)}return t.flags|=1,(e=Ru(o,r)).ref=t.ref,e.return=t,t.child=e}function As(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(ur(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Gs(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return Ms(e,t,n,r,i)}function ks(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mi(Rl,Ll),Ll|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mi(Rl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Mi(Rl,Ll),Ll|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Mi(Rl,Ll),Ll|=r;return ws(e,t,i,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ms(e,t,n,r,i){var o=Li(n)?ji:Ti.current;return o=Pi(t,o),jo(t,i),n=va(e,t,n,r,o,i),r=ya(),null===e||bs?(oo&&r&&to(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function Is(e,t,n,r,i){if(Li(n)){var o=!0;Oi(t)}else o=!1;if(jo(t,i),null===t.stateNode)Hs(e,t),ss(t,n,r),us(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=Po(u):u=Pi(t,u=Li(n)?ji:Ti.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ls(t,a,r,u),Oo=!1;var h=t.memoizedState;a.state=h,Ho(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Di.current||Oo?("function"===typeof c&&(is(t,n,c,r),l=t.memoizedState),(s=Oo||as(t,n,s,r,h,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Bo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:rs(t.type,s),a.props=u,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Po(l):l=Pi(t,l=Li(n)?ji:Ti.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ls(t,a,r,l),Oo=!1,h=t.memoizedState,a.state=h,Ho(t,r,a,i);var f=t.memoizedState;s!==d||h!==f||Di.current||Oo?("function"===typeof p&&(is(t,n,p,r),f=t.memoizedState),(u=Oo||as(t,n,u,r,h,f,l)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ts(e,t,n,r,o,i)}function Ts(e,t,n,r,i,o){Cs(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&zi(t,n,!1),Gs(e,t,o);r=t.stateNode,xs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=So(t,e.child,null,o),t.child=So(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&zi(t,n,!0),t.child}function Ds(e){var t=e.stateNode;t.pendingContext?Ei(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ei(0,t.context,!1),Ko(e,t.containerInfo)}function js(e,t,n,r,i){return go(),mo(i),t.flags|=256,ws(e,t,n,r),t.child}var Ps,Ls,Rs,Es,Ns={dehydrated:null,treeContext:null,retryLane:0};function Os(e){return{baseLanes:e,cachePool:null,transitions:null}}function zs(e,t,n){var r,o=t.pendingProps,a=ta.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Mi(ta,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ou(l,o,0,null),e=Nu(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Os(n),t.memoizedState=Ns,e):Bs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,Fs(e,t,s,r=ds(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Ou({mode:"visible",children:r.children},o,0,null),(a=Nu(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&So(t,e.child,null,s),t.child.memoizedState=Os(s),t.memoizedState=Ns,a);if(0===(1&t.mode))return Fs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Fs(e,t,s,r=ds(a=Error(i(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Dl)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,No(e,o),ru(r,e,o,-1))}return mu(),Fs(e,t,s,r=ds(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Iu.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,io=ci(o.nextSibling),ro=t,oo=!0,ao=null,null!==e&&(Yi[qi++]=Ki,Yi[qi++]=Qi,Yi[qi++]=Zi,Ki=e.id,Qi=e.overflow,Zi=t),t=Bs(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,a,n);if(s){s=o.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:o.children};return 0===(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=Ru(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Ru(r,s):(s=Nu(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Os(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ns,o}return e=(s=e.child).sibling,o=Ru(s,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bs(e,t){return(t=Ou({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fs(e,t,n,r){return null!==r&&mo(r),So(t,e.child,null,n),(e=Bs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $s(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Do(e.return,t,n)}function Vs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ws(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=ta.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$s(e,n,t);else if(19===e.tag)$s(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mi(ta,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===na(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vs(t,!0,n,null,o);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ol|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Ru(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ru(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Us(e,t){if(!oo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ys(e,t,n){var r=t.pendingProps;switch(no(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xs(t),null;case 1:case 17:return Li(t.type)&&Ri(),Xs(t),null;case 3:return r=t.stateNode,Qo(),Ci(Di),Ci(Ti),ia(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ao&&(su(ao),ao=null))),Ls(e,t),Xs(t),null;case 5:ea(t);var o=Zo(qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Rs(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Xs(t),null}if(e=Zo(Xo.current),po(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[pi]=t,r[fi]=s,e=0!==(1&t.mode),n){case"dialog":Fr("cancel",r),Fr("close",r);break;case"iframe":case"object":case"embed":Fr("load",r);break;case"video":case"audio":for(o=0;o<Nr.length;o++)Fr(Nr[o],r);break;case"source":Fr("error",r);break;case"img":case"image":case"link":Fr("error",r),Fr("load",r);break;case"details":Fr("toggle",r);break;case"input":q(r,s),Fr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Fr("invalid",r);break;case"textarea":re(r,s),Fr("invalid",r)}for(var l in ve(n,s),o=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"===typeof u?r.textContent!==u&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,u,e),o=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,u,e),o=["children",""+u]):a.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Fr("scroll",r)}switch(n){case"input":G(r),Q(r,s,!0);break;case"textarea":G(r),oe(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=ei)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[pi]=t,e[fi]=r,Ps(e,t,!1,!1),t.stateNode=e;e:{switch(l=ye(n,r),n){case"dialog":Fr("cancel",e),Fr("close",e),o=r;break;case"iframe":case"object":case"embed":Fr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Nr.length;o++)Fr(Nr[o],e);o=r;break;case"source":Fr("error",e),o=r;break;case"img":case"image":case"link":Fr("error",e),Fr("load",e),o=r;break;case"details":Fr("toggle",e),o=r;break;case"input":q(e,r),o=Y(e,r),Fr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=N({},r,{value:void 0}),Fr("invalid",e);break;case"textarea":re(e,r),o=ne(e,r),Fr("invalid",e)}for(s in ve(n,o),u=o)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ge(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&ce(e,c):"children"===s?"string"===typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"===typeof c&&de(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Fr("scroll",e):null!=c&&y(e,s,c,l))}switch(n){case"input":G(e),Q(e,r,!1);break;case"textarea":G(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?te(e,!!r.multiple,s,!1):null!=r.defaultValue&&te(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=ei)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xs(t),null;case 6:if(e&&null!=t.stateNode)Es(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=Zo(qo.current),Zo(Xo.current),po(t)){if(r=t.stateNode,n=t.memoizedProps,r[pi]=t,(s=r.nodeValue!==n)&&null!==(e=ro))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[pi]=t,t.stateNode=r}return Xs(t),null;case 13:if(Ci(ta),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oo&&null!==io&&0!==(1&t.mode)&&0===(128&t.flags))fo(),go(),t.flags|=98560,s=!1;else if(s=po(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(i(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(i(317));s[pi]=t}else go(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xs(t),s=!1}else null!==ao&&(su(ao),ao=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ta.current)?0===El&&(El=3):mu())),null!==t.updateQueue&&(t.flags|=4),Xs(t),null);case 4:return Qo(),Ls(e,t),null===e&&Wr(t.stateNode.containerInfo),Xs(t),null;case 10:return To(t.type._context),Xs(t),null;case 19:if(Ci(ta),null===(s=t.memoizedState))return Xs(t),null;if(r=0!==(128&t.flags),null===(l=s.rendering))if(r)Us(s,!1);else{if(0!==El||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=na(e))){for(t.flags|=128,Us(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Mi(ta,1&ta.current|2),t.child}e=e.sibling}null!==s.tail&&Ze()>Wl&&(t.flags|=128,r=!0,Us(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=na(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Us(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!oo)return Xs(t),null}else 2*Ze()-s.renderingStartTime>Wl&&1073741824!==n&&(t.flags|=128,r=!0,Us(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ze(),t.sibling=null,n=ta.current,Mi(ta,r?1&n|2:1&n),t):(Xs(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ll)&&(Xs(t),6&t.subtreeFlags&&(t.flags|=8192)):Xs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function qs(e,t){switch(no(t),t.tag){case 1:return Li(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qo(),Ci(Di),Ci(Ti),ia(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(Ci(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));go()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ci(ta),null;case 4:return Qo(),null;case 10:return To(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}Ps=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ls=function(){},Rs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zo(Xo.current);var o,s=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),s=[];break;case"select":i=N({},i,{value:void 0}),r=N({},r,{value:void 0}),s=[];break;case"textarea":i=ne(e,i),r=ne(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=ei)}for(c in ve(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Fr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Es=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,Ks=!1,Qs="function"===typeof WeakSet?WeakSet:Set,Js=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){ku(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){ku(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&tl(t,n,o)}i=i.next}while(i!==r)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pi],delete t[fi],delete t[mi],delete t[vi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=ei));else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,hl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(rt,n)}catch(s){}switch(n.tag){case 5:Ks||el(n,t);case 6:var r=dl,i=hl;dl=null,pl(e,t,n),hl=i,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),Wt(e)):ui(dl,n.stateNode));break;case 4:r=dl,i=hl,dl=n.stateNode.containerInfo,hl=!0,pl(e,t,n),dl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&tl(n,t,a),i=i.next}while(i!==r)}pl(e,t,n);break;case 1:if(!Ks&&(el(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ku(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,pl(e,t,n),Ks=r):pl(e,t,n);break;default:pl(e,t,n)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach(function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,hl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===dl)throw Error(i(160));fl(a,s,o),dl=null,hl=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(c){ku(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),yl(e),4&r){try{rl(3,e,e.return),il(3,e)}catch(m){ku(e,e.return,m)}try{rl(5,e,e.return)}catch(m){ku(e,e.return,m)}}break;case 1:ml(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(ml(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var o=e.stateNode;try{de(o,"")}catch(m){ku(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&Z(o,a),ye(l,s);var c=ye(l,a);for(s=0;s<u.length;s+=2){var d=u[s],h=u[s+1];"style"===d?ge(o,h):"dangerouslySetInnerHTML"===d?ce(o,h):"children"===d?de(o,h):y(o,d,h,c)}switch(l){case"input":K(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?te(o,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?te(o,!!a.multiple,a.defaultValue,!0):te(o,!!a.multiple,a.multiple?[]:"",!1))}o[fi]=a}catch(m){ku(e,e.return,m)}}break;case 6:if(ml(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){ku(e,e.return,m)}}break;case 3:if(ml(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wt(t.containerInfo)}catch(m){ku(e,e.return,m)}break;case 4:default:ml(t,e),yl(e);break;case 13:ml(t,e),yl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Vl=Ze())),4&r&&gl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(c=Ks)||d,ml(t,e),Ks=c):ml(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(f=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:el(p,p.return);var g=p.stateNode;if("function"===typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){ku(r,n,m)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){Sl(h);continue}}null!==f?(f.return=p,Js=f):Sl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{o=h.stateNode,c?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(u=h.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=fe("display",s))}catch(m){ku(e,e.return,m)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){ku(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),yl(e),4&r&&gl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(de(o,""),r.flags&=-33),cl(e,ll(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;ul(e,ll(e),a);break;default:throw Error(i(161))}}catch(s){ku(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e,t,n){Js=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var i=Js,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Zs;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Zs;var u=Ks;if(Zs=a,(Ks=l)&&!u)for(Js=i;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?_l(i):null!==l?(l.return=a,Js=l):_l(i);for(;null!==o;)Js=o,bl(o,t,n),o=o.sibling;Js=i,Zs=s,Ks=u}wl(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Js=o):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||il(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:rs(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Go(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Go(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Wt(h)}}}break;default:throw Error(i(163))}Ks||512&t.flags&&ol(t)}catch(p){ku(t,t.return,p)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function _l(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(l){ku(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){ku(t,i,l)}}var o=t.return;try{ol(t)}catch(l){ku(t,o,l)}break;case 5:var a=t.return;try{ol(t)}catch(l){ku(t,a,l)}}}catch(l){ku(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Al,kl=Math.ceil,Cl=x.ReactCurrentDispatcher,Ml=x.ReactCurrentOwner,Il=x.ReactCurrentBatchConfig,Tl=0,Dl=null,jl=null,Pl=0,Ll=0,Rl=ki(0),El=0,Nl=null,Ol=0,zl=0,Bl=0,Fl=null,$l=null,Vl=0,Wl=1/0,Hl=null,Gl=!1,Ul=null,Xl=null,Yl=!1,ql=null,Zl=0,Kl=0,Ql=null,Jl=-1,eu=0;function tu(){return 0!==(6&Tl)?Ze():-1!==Jl?Jl:Jl=Ze()}function nu(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Pl?Pl&-Pl:null!==vo.transition?(0===eu&&(eu=ft()),eu):0!==(e=yt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function ru(e,t,n,r){if(50<Kl)throw Kl=0,Ql=null,Error(i(185));mt(e,n,r),0!==(2&Tl)&&e===Dl||(e===Dl&&(0===(2&Tl)&&(zl|=n),4===El&&lu(e,Pl)),iu(e,r),1===n&&0===Tl&&0===(1&t.mode)&&(Wl=Ze()+500,Fi&&Wi()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-ot(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=dt(e,e===Dl?Pl:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Fi=!0,Vi(e)}(uu.bind(null,e)):Vi(uu.bind(null,e)),si(function(){0===(6&Tl)&&Wi()}),n=null;else{switch(xt(r)){case 1:n=Qe;break;case 4:n=Je;break;case 16:default:n=et;break;case 536870912:n=nt}n=Du(n,ou.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ou(e,t){if(Jl=-1,eu=0,0!==(6&Tl))throw Error(i(327));var n=e.callbackNode;if(_u()&&e.callbackNode!==n)return null;var r=dt(e,e===Dl?Pl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vu(e,r);else{t=r;var o=Tl;Tl|=2;var a=gu();for(Dl===e&&Pl===t||(Hl=null,Wl=Ze()+500,pu(e,t));;)try{xu();break}catch(l){fu(e,l)}Io(),Cl.current=a,Tl=o,null!==jl?t=0:(Dl=null,Pl=0,t=El)}if(0!==t){if(2===t&&(0!==(o=pt(e))&&(r=o,t=au(e,o))),1===t)throw n=Nl,pu(e,0),lu(e,r),iu(e,Ze()),n;if(6===t)lu(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!lr(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vu(e,r))&&(0!==(a=pt(e))&&(r=a,t=au(e,a))),1===t))throw n=Nl,pu(e,0),lu(e,r),iu(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Su(e,$l,Hl);break;case 3:if(lu(e,r),(130023424&r)===r&&10<(t=Vl+500-Ze())){if(0!==dt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ii(Su.bind(null,e,$l,Hl),t);break}Su(e,$l,Hl);break;case 4:if(lu(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-ot(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kl(r/1960))-r)){e.timeoutHandle=ii(Su.bind(null,e,$l,Hl),r);break}Su(e,$l,Hl);break;default:throw Error(i(329))}}}return iu(e,Ze()),e.callbackNode===n?ou.bind(null,e):null}function au(e,t){var n=Fl;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=vu(e,t))&&(t=$l,$l=n,null!==t&&su(t)),e}function su(e){null===$l?$l=e:$l.push.apply($l,e)}function lu(e,t){for(t&=~Bl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(0!==(6&Tl))throw Error(i(327));_u();var t=dt(e,0);if(0===(1&t))return iu(e,Ze()),null;var n=vu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=Nl,pu(e,0),lu(e,t),iu(e,Ze()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Su(e,$l,Hl),iu(e,Ze()),null}function cu(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Wl=Ze()+500,Fi&&Wi())}}function du(e){null!==ql&&0===ql.tag&&0===(6&Tl)&&_u();var t=Tl;Tl|=1;var n=Il.transition,r=yt;try{if(Il.transition=null,yt=1,e)return e()}finally{yt=r,Il.transition=n,0===(6&(Tl=t))&&Wi()}}function hu(){Ll=Rl.current,Ci(Rl)}function pu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oi(n)),null!==jl)for(n=jl.return;null!==n;){var r=n;switch(no(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ri();break;case 3:Qo(),Ci(Di),Ci(Ti),ia();break;case 5:ea(r);break;case 4:Qo();break;case 13:case 19:Ci(ta);break;case 10:To(r.type._context);break;case 22:case 23:hu()}n=n.return}if(Dl=e,jl=e=Ru(e.current,null),Pl=Ll=t,El=0,Nl=null,Bl=zl=Ol=0,$l=Fl=null,null!==Lo){for(t=0;t<Lo.length;t++)if(null!==(r=(n=Lo[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Lo=null}return e}function fu(e,t){for(;;){var n=jl;try{if(Io(),oa.current=Ja,da){for(var r=la.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}da=!1}if(sa=0,ca=ua=la=null,ha=!1,pa=0,Ml.current=null,null===n||null===n.return){El=1,Nl=t,jl=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Pl,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=vs(s);if(null!==f){f.flags&=-257,ys(f,s,l,0,t),1&f.mode&&ms(a,c,t),u=c;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(0===(1&t)){ms(a,c,t),mu();break e}u=Error(i(426))}else if(oo&&1&l.mode){var v=vs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),ys(v,s,l,0,t),mo(cs(u,l));break e}}a=u=cs(u,l),4!==El&&(El=2),null===Fl?Fl=[a]:Fl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Wo(a,fs(0,u,t));break e;case 1:l=u;var y=a.type,x=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xl||!Xl.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t,Wo(a,gs(a,l,t));break e}}a=a.return}while(null!==a)}wu(n)}catch(b){t=b,jl===n&&null!==n&&(jl=n=n.return);continue}break}}function gu(){var e=Cl.current;return Cl.current=Ja,null===e?Ja:e}function mu(){0!==El&&3!==El&&2!==El||(El=4),null===Dl||0===(268435455&Ol)&&0===(268435455&zl)||lu(Dl,Pl)}function vu(e,t){var n=Tl;Tl|=2;var r=gu();for(Dl===e&&Pl===t||(Hl=null,pu(e,t));;)try{yu();break}catch(o){fu(e,o)}if(Io(),Tl=n,Cl.current=r,null!==jl)throw Error(i(261));return Dl=null,Pl=0,El}function yu(){for(;null!==jl;)bu(jl)}function xu(){for(;null!==jl&&!Ye();)bu(jl)}function bu(e){var t=Al(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?wu(e):jl=t,Ml.current=null}function wu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ys(n,t,Ll)))return void(jl=n)}else{if(null!==(n=qs(n,t)))return n.flags&=32767,void(jl=n);if(null===e)return El=6,void(jl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(jl=t);jl=t=e}while(null!==t);0===El&&(El=5)}function Su(e,t,n){var r=yt,o=Il.transition;try{Il.transition=null,yt=1,function(e,t,n,r){do{_u()}while(null!==ql);if(0!==(6&Tl))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Dl&&(jl=Dl=null,Pl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Yl||(Yl=!0,Du(et,function(){return _u(),null})),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Il.transition,Il.transition=null;var s=yt;yt=1;var l=Tl;Tl|=4,Ml.current=null,function(e,t){if(ti=Gt,fr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==o&&3!==h.nodeType||(l=s+o),h!==a||0!==r&&3!==h.nodeType||(u=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===o&&(l=s),p===a&&++d===r&&(u=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ni={focusedElem:e,selectionRange:n},Gt=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:rs(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(i(163))}}catch(w){ku(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}g=nl,nl=!1}(e,n),vl(n,e),gr(ni),Gt=!!ti,ni=ti=null,e.current=n,xl(n,e,o),qe(),Tl=l,yt=s,Il.transition=a}else e.current=n;if(Yl&&(Yl=!1,ql=e,Zl=o),a=e.pendingLanes,0===a&&(Xl=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(rt,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),iu(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gl)throw Gl=!1,e=Ul,Ul=null,e;0!==(1&Zl)&&0!==e.tag&&_u(),a=e.pendingLanes,0!==(1&a)?e===Ql?Kl++:(Kl=0,Ql=e):Kl=0,Wi()}(e,t,n,r)}finally{Il.transition=o,yt=r}return null}function _u(){if(null!==ql){var e=xt(Zl),t=Il.transition,n=yt;try{if(Il.transition=null,yt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Zl=0,0!==(6&Tl))throw Error(i(331));var o=Tl;for(Tl|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Js=c;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:rl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var p=(d=Js).sibling,f=d.return;if(al(d),d===c){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var x=e.current;for(Js=x;null!==Js;){var b=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Js=b;else e:for(s=x;null!==Js;){if(0!==(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(S){ku(l,l.return,S)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Tl=o,Wi(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(rt,e)}catch(S){}r=!0}return r}finally{yt=n,Il.transition=t}}return!1}function Au(e,t,n){e=$o(e,t=fs(0,t=cs(n,t),1),1),t=tu(),null!==e&&(mt(e,1,t),iu(e,t))}function ku(e,t,n){if(3===e.tag)Au(e,e,n);else for(;null!==t;){if(3===t.tag){Au(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xl||!Xl.has(r))){t=$o(t,e=gs(t,e=cs(n,e),1),1),e=tu(),null!==t&&(mt(t,1,e),iu(t,e));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,Dl===e&&(Pl&n)===n&&(4===El||3===El&&(130023424&Pl)===Pl&&500>Ze()-Vl?pu(e,0):Bl|=n),iu(e,t)}function Mu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tu();null!==(e=No(e,t))&&(mt(e,t,n),iu(e,n))}function Iu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mu(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Mu(e,n)}function Du(e,t){return Ue(e,t)}function ju(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pu(e,t,n,r){return new ju(e,t,n,r)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ru(e,t){var n=e.alternate;return null===n?((n=Pu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Eu(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)Lu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Nu(n.children,o,a,t);case _:s=8,o|=8;break;case A:return(e=Pu(12,n,t,2|o)).elementType=A,e.lanes=a,e;case I:return(e=Pu(13,n,t,o)).elementType=I,e.lanes=a,e;case T:return(e=Pu(19,n,t,o)).elementType=T,e.lanes=a,e;case P:return Ou(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case k:s=10;break e;case C:s=9;break e;case M:s=11;break e;case D:s=14;break e;case j:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Pu(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Nu(e,t,n,r){return(e=Pu(7,e,r,t)).lanes=n,e}function Ou(e,t,n,r){return(e=Pu(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function zu(e,t,n){return(e=Pu(6,e,null,t)).lanes=n,e}function Bu(e,t,n){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $u(e,t,n,r,i,o,a,s,l){return e=new Fu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Pu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zo(o),e}function Vu(e){if(!e)return Ii;e:{if($e(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Li(n))return Ni(e,n,t)}return t}function Wu(e,t,n,r,i,o,a,s,l){return(e=$u(n,r,!0,e,0,o,0,s,l)).context=Vu(null),n=e.current,(o=Fo(r=tu(),i=nu(n))).callback=void 0!==t&&null!==t?t:null,$o(n,o,i),e.current.lanes=i,mt(e,i,r),iu(e,r),e}function Hu(e,t,n,r){var i=t.current,o=tu(),a=nu(i);return n=Vu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Fo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=$o(i,t,a))&&(ru(e,i,a,o),Vo(e,i,a)),a}function Gu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Uu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xu(e,t){Uu(e,t),(e=e.alternate)&&Uu(e,t)}Al=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Di.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ds(t),go();break;case 5:Jo(t);break;case 1:Li(t.type)&&Oi(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Mi(Ao,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Mi(ta,1&ta.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zs(e,t,n):(Mi(ta,1&ta.current),null!==(e=Gs(e,t,n))?e.sibling:null);Mi(ta,1&ta.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mi(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Gs(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,oo&&0!==(1048576&t.flags)&&eo(t,Xi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var o=Pi(t,Ti.current);jo(t,n),o=va(null,t,r,e,o,n);var a=ya();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Li(r)?(a=!0,Oi(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,zo(t),o.updater=os,t.stateNode=o,o._reactInternals=t,us(t,r,e,n),t=Ts(null,t,r,!0,a,n)):(t.tag=0,oo&&a&&to(t),ws(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Lu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===M)return 11;if(e===D)return 14}return 2}(r),e=rs(r,e),o){case 0:t=Ms(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=_s(null,t,r,rs(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ms(e,t,r,o=t.elementType===r?o:rs(r,o),n);case 1:return r=t.type,o=t.pendingProps,Is(e,t,r,o=t.elementType===r?o:rs(r,o),n);case 3:e:{if(Ds(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Bo(e,t),Ho(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=js(e,t,r,n,o=cs(Error(i(423)),t));break e}if(r!==o){t=js(e,t,r,n,o=cs(Error(i(424)),t));break e}for(io=ci(t.stateNode.containerInfo.firstChild),ro=t,oo=!0,ao=null,n=_o(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(go(),r===o){t=Gs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Jo(t),null===e&&co(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,ri(r,o)?s=null:null!==a&&ri(r,a)&&(t.flags|=32),Cs(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return zs(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=So(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ss(e,t,r,o=t.elementType===r?o:rs(r,o),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Mi(Ao,r._currentValue),r._currentValue=s,null!==a)if(lr(a.value,s)){if(a.children===o.children&&!Di.current){t=Gs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Fo(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Do(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Do(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jo(t,n),r=r(o=Po(o)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return o=rs(r=t.type,t.pendingProps),_s(e,t,r,o=rs(r.type,o),n);case 15:return As(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:rs(r,o),Hs(e,t),t.tag=1,Li(r)?(e=!0,Oi(t)):e=!1,jo(t,n),ss(t,r,o),us(t,r,o,n),Ts(null,t,r,!0,e,n);case 19:return Ws(e,t,n);case 22:return ks(e,t,n)}throw Error(i(156,t.tag))};var Yu="function"===typeof reportError?reportError:function(e){console.error(e)};function qu(e){this._internalRoot=e}function Zu(e){this._internalRoot=e}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=Gu(a);s.call(e)}}Hu(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=Gu(a);o.call(e)}}var a=Wu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=a,e[gi]=a.current,Wr(8===e.nodeType?e.parentNode:e),du(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Gu(l);s.call(e)}}var l=$u(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[gi]=l.current,Wr(8===e.nodeType?e.parentNode:e),du(function(){Hu(t,l,n,r)}),l}(n,t,e,i,r);return Gu(a)}Zu.prototype.render=qu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Hu(e,t,null,null)},Zu.prototype.unmount=qu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;du(function(){Hu(null,e,null,null)}),t[gi]=null}},Zu.prototype.unstable_scheduleHydration=function(e){if(e){var t=At();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&zt(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ct(t.pendingLanes);0!==n&&(vt(t,1|n),iu(t,Ze()),0===(6&Tl)&&(Wl=Ze()+500,Wi()))}break;case 13:du(function(){var t=No(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}}),Xu(e,1)}},wt=function(e){if(13===e.tag){var t=No(e,134217728);if(null!==t)ru(t,e,134217728,tu());Xu(e,134217728)}},St=function(e){if(13===e.tag){var t=nu(e),n=No(e,t);if(null!==n)ru(n,e,t,tu());Xu(e,t)}},At=function(){return yt},kt=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},we=function(e,t,n){switch(t){case"input":if(K(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Si(r);if(!o)throw Error(i(90));U(r),K(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&te(e,!!n.multiple,t,!1)}},Me=cu,Ie=du;var tc={usingClientEntryPoint:!1,Events:[bi,wi,Si,ke,Ce,cu]},nc={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{rt=ic.inject(rc),it=ic}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Ku(e))throw Error(i(299));var n=!1,r="",o=Yu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=$u(e,1,!1,null,0,n,0,r,o),e[gi]=t.current,Wr(8===e.nodeType?e.parentNode:e),new qu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return du(e)},t.hydrate=function(e,t,n){if(!Qu(t))throw Error(i(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Ku(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Yu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wu(t,null,e,1,null!=n?n:null,o,0,a,s),e[gi]=t.current,Wr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Zu(t)},t.render=function(e,t,n){if(!Qu(t))throw Error(i(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qu(e))throw Error(i(40));return!!e._reactRootContainer&&(du(function(){ec(null,null,e,!1,function(){e._reactRootContainer=null,e[gi]=null})}),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qu(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return ec(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"}),yt=n.cw(function(e,t){var n=xt();t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot}),xt=n.cw(function(e,t){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=vt()}),bt=n.cw(function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function m(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e.type){case i:case a:case o:case c:case d:case f:return e;default:switch(e&&e.$$typeof){case l:case u:case p:case h:case s:return e;default:return t}}case r:return t}}}t.vM=u,t.lD=h}),wt=n.cw(function(e,t){var n=_t(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var i,l={},u=null,c=null;for(i in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,i)&&!s.hasOwnProperty(i)&&(l[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===l[i]&&(l[i]=t[i]);return{$$typeof:r,type:e,key:u,ref:c,props:l,_owner:a.current}}t.Fragment=i,t.jsx=l,t.jsxs=l}),St=n.cw(function(e,t){var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=x.prototype=new y;b.constructor=x,g(b,v.prototype),b.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,_={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,i)&&!A.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:_.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var M=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function T(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+I(l,0):o,w(a)?(i="",null!=e&&(i=e.replace(M,"$&/")+"/"),T(a,t,i,"",function(e){return e})):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",w(e))for(var u=0;u<e.length;u++){var c=o+I(s=e[u],u);l+=T(s,t,i,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=T(s=s.value,t,i,c=o+I(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",function(e){return t.call(n,e,i++)}),r}function j(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},L={transition:null},R={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:L,ReactCurrentOwner:_};function E(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=x,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=E,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=_.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)S.call(t,u)&&!A.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=E,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"}),_t=n.cw(function(e,t){e.exports=St()}),At=n.cw(function(e,t){e.exports=wt()}),kt=n.cw(function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(m=!1,b(e),!g)if(null!==r(u))g=!0,L(S);else{var t=r(c);null!==t&&R(w,t.startTime-e)}}function S(e,n){g=!1,m&&(m=!1,y(C),C=-1),f=!0;var o=p;try{for(b(n),h=r(u);null!==h&&(!(h.expirationTime>n)||e&&!T());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(u)&&i(u),b(n)}else i(u);h=r(u)}if(null!==h)var l=!0;else{var d=r(c);null!==d&&R(w,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,A=!1,k=null,C=-1,M=5,I=-1;function T(){return!(t.unstable_now()-I<M)}function D(){if(null!==k){var e=t.unstable_now();I=e;var n=!0;try{n=k(!0,e)}finally{n?_():(A=!1,k=null)}}else A=!1}if("function"===typeof x)_=function(){x(D)};else if("undefined"!==typeof MessageChannel){var j=new MessageChannel,P=j.port2;j.port1.onmessage=D,_=function(){P.postMessage(null)}}else _=function(){v(D,0)};function L(e){k=e,A||(A=!0,_())}function R(e,n){C=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,L(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(m?(y(C),C=-1):m=!0,R(w,o-a))):(e.sortIndex=s,n(u,e),g||f||(g=!0,L(S))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}),Ct=n.cw(function(e,t){e.exports=kt()}),Mt=()=>n(634),It=()=>n(994),Tt=()=>n(893),Dt=n.cw(function(e,t){function r(){return r=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},r.apply(null,arguments)}n.d(t,{A:()=>r})}),jt=n.cw(function(e,t){function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})}),Pt=n.cw(function(e,t){function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}const i=function(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i};n.d(t,["A",0,i])}),Lt=n.cw(function(e,t){n.d(t,{IO:()=>d,LU:()=>l,MS:()=>r,Sv:()=>c,XZ:()=>s,YK:()=>a,j:()=>o,vd:()=>i,yE:()=>u});var r="-ms-",i="-moz-",o="-webkit-",a="comm",s="rule",l="decl",u="@import",c="@keyframes",d="@layer"}),Rt=n.cw(function(e,t){function r(e){var t=(0,zt().FK)(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function i(e){return function(t){t.root||(t=t.return)&&e(t)}}n.d(t,{MY:()=>i,r1:()=>r})}),Et=n.cw(function(e,t){function r(e){return(0,Ot().VF)(i("",null,null,null,[""],e=(0,Ot().c4)(e),0,[0],e))}function i(e,t,n,r,l,u,c,d,h){for(var p=0,f=0,g=c,m=0,v=0,y=0,x=1,b=1,w=1,S=0,_="",A=l,k=u,C=r,M=_;b;)switch(y=S,S=(0,Ot().K2)()){case 40:if(108!=y&&58==(0,zt().wN)(M,g-1)){-1!=(0,zt().K5)(M+=(0,zt().HC)((0,Ot().Tb)(S),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:M+=(0,Ot().Tb)(S);break;case 9:case 10:case 13:case 32:M+=(0,Ot().mw)(y);break;case 92:M+=(0,Ot().Nc)((0,Ot().OW)()-1,7);continue;case 47:switch((0,Ot().se)()){case 42:case 47:(0,zt().BC)(a((0,Ot().nf)((0,Ot().K2)(),(0,Ot().OW)()),t,n),h);break;default:M+="/"}break;case 123*x:d[p++]=(0,zt().b2)(M)*w;case 125*x:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+f:-1==w&&(M=(0,zt().HC)(M,/\f/g,"")),v>0&&(0,zt().b2)(M)-g&&(0,zt().BC)(v>32?s(M+";",r,n,g-1):s((0,zt().HC)(M," ","")+";",r,n,g-2),h);break;case 59:M+=";";default:if((0,zt().BC)(C=o(M,t,n,p,f,l,d,_,A=[],k=[],g),u),123===S)if(0===f)i(M,t,C,C,A,u,g,d,k);else switch(99===m&&110===(0,zt().wN)(M,3)?100:m){case 100:case 108:case 109:case 115:i(e,C,C,r&&(0,zt().BC)(o(e,C,C,0,0,l,d,_,l,A=[],g),k),l,k,g,d,r?A:k);break;default:i(M,C,C,C,[""],k,0,d,k)}}p=f=v=0,x=w=1,_=M="",g=c;break;case 58:g=1+(0,zt().b2)(M),v=y;default:if(x<1)if(123==S)--x;else if(125==S&&0==x++&&125==(0,Ot().YL)())continue;switch(M+=(0,zt().HT)(S),S*x){case 38:w=f>0?1:(M+="\f",-1);break;case 44:d[p++]=((0,zt().b2)(M)-1)*w,w=1;break;case 64:45===(0,Ot().se)()&&(M+=(0,Ot().Tb)((0,Ot().K2)())),m=(0,Ot().se)(),f=g=(0,zt().b2)(_=M+=(0,Ot().Cv)((0,Ot().OW)())),S++;break;case 45:45===y&&2==(0,zt().b2)(M)&&(x=0)}}return u}function o(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,h=0===i?o:[""],p=(0,zt().FK)(h),f=0,g=0,m=0;f<r;++f)for(var v=0,y=(0,zt().c1)(e,d+1,d=(0,zt().tn)(g=a[f])),x=e;v<p;++v)(x=(0,zt().Bq)(g>0?h[v]+" "+y:(0,zt().HC)(y,/&\f/g,h[v])))&&(l[m++]=x);return(0,Ot().rH)(e,t,n,0===i?Lt().XZ:s,l,u,c)}function a(e,t,n){return(0,Ot().rH)(e,t,n,Lt().YK,(0,zt().HT)((0,Ot().Tp)()),(0,zt().c1)(e,2,-2),0)}function s(e,t,n,r){return(0,Ot().rH)(e,t,n,Lt().LU,(0,zt().c1)(e,0,r),(0,zt().c1)(e,r+1,-1),r)}n.d(t,{wE:()=>r})}),Nt=n.cw(function(e,t){function r(e,t){for(var n="",r=(0,zt().FK)(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function i(e,t,n,i){switch(e.type){case Lt().IO:if(e.children.length)break;case Lt().yE:case Lt().LU:return e.return=e.return||e.value;case Lt().YK:return"";case Lt().Sv:return e.return=e.value+"{"+r(e.children,i)+"}";case Lt().XZ:e.value=e.props.join(",")}return(0,zt().b2)(n=r(e.children,i))?e.return=e.value+"{"+n+"}":""}n.d(t,{A:()=>i,l:()=>r})}),Ot=n.cw(function(e,t){n.d(t,{C:()=>c,Cv:()=>k,G1:()=>a,K2:()=>p,Nc:()=>S,OW:()=>g,Sh:()=>v,Tb:()=>b,Tp:()=>d,VF:()=>x,YL:()=>h,c4:()=>y,di:()=>m,mw:()=>w,nf:()=>A,rH:()=>u,se:()=>f});var r=1,i=1,o=0,a=0,s=0,l="";function u(e,t,n,o,a,s,l){return{value:e,root:t,parent:n,type:o,props:a,children:s,line:r,column:i,length:l,return:""}}function c(e,t){return(0,zt().kp)(u("",null,null,"",null,null,0),e,{length:-e.length},t)}function d(){return s}function h(){return s=a>0?(0,zt().wN)(l,--a):0,i--,10===s&&(i=1,r--),s}function p(){return s=a<o?(0,zt().wN)(l,a++):0,i++,10===s&&(i=1,r++),s}function f(){return(0,zt().wN)(l,a)}function g(){return a}function m(e,t){return(0,zt().c1)(l,e,t)}function v(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function y(e){return r=i=1,o=(0,zt().b2)(l=e),a=0,[]}function x(e){return l="",e}function b(e){return(0,zt().Bq)(m(a-1,_(91===e?e+2:40===e?e+1:e)))}function w(e){for(;(s=f())&&s<33;)p();return v(e)>2||v(s)>3?"":" "}function S(e,t){for(;--t&&p()&&!(s<48||s>102||s>57&&s<65||s>70&&s<97););return m(e,g()+(t<6&&32==f()&&32==p()))}function _(e){for(;p();)switch(s){case e:return a;case 34:case 39:34!==e&&39!==e&&_(s);break;case 40:41===e&&_(e);break;case 92:p()}return a}function A(e,t){for(;p()&&e+s!==57&&(e+s!==84||47!==f()););return"/*"+m(t,a-1)+"*"+(0,zt().HT)(47===e?e:p())}function k(e){for(;!v(f());)p();return m(e,a)}}),zt=n.cw(function(e,t){n.d(t,{BC:()=>g,Bq:()=>s,FK:()=>f,HC:()=>u,HT:()=>i,K5:()=>c,YW:()=>l,b2:()=>p,c1:()=>h,kg:()=>m,kp:()=>o,tW:()=>a,tn:()=>r,wN:()=>d});var r=Math.abs,i=String.fromCharCode,o=Object.assign;function a(e,t){return 45^d(e,0)?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}function s(e){return e.trim()}function l(e,t){return(e=t.exec(e))?e[0]:e}function u(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function h(e,t,n){return e.slice(t,n)}function p(e){return e.length}function f(e){return e.length}function g(e,t){return t.push(e),e}function m(e,t){return e.map(t).join("")}}),Bt={};function Ft(){return Ft.c||(Ft.c=n.t(_t(),2))}n.r(Bt),n.d(Bt,{Arc:()=>mM,BezierCurve:()=>pM,BoundingRect:()=>Xp,Circle:()=>TC,CompoundPath:()=>vM,Ellipse:()=>PC,Group:()=>Zm,Image:()=>Wx,IncrementalDisplayable:()=>IM,Line:()=>lM,LinearGradient:()=>xM,OrientedBoundingRect:()=>CM,Path:()=>Nx,Point:()=>zp,Polygon:()=>tM,Polyline:()=>iM,RadialGradient:()=>bM,Rect:()=>Kx,Ring:()=>KC,Sector:()=>YC,Text:()=>pb,applyTransform:()=>UM,clipPointsByRect:()=>ZM,clipRectByRect:()=>KM,createIcon:()=>QM,extendPath:()=>RM,extendShape:()=>PM,getShapeClass:()=>NM,getTransform:()=>GM,groupTransition:()=>qM,initProps:()=>mw,isElementRemoved:()=>vw,lineLineIntersect:()=>eI,linePolygonIntersect:()=>JM,makeImage:()=>zM,makePath:()=>OM,mergePath:()=>FM,registerShape:()=>EM,removeElement:()=>yw,removeElementWithFadeOut:()=>bw,resizePath:()=>$M,setTooltipConfig:()=>nI,subPixelOptimize:()=>HM,subPixelOptimizeLine:()=>VM,subPixelOptimizeRect:()=>WM,transformDirection:()=>XM,traverseElements:()=>iI,updateProps:()=>gw}),_t(),xt(),yt();function $t(){return $t=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},$t.apply(null,arguments)}var Vt;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Vt||(Vt={}));const Wt="popstate";function Ht(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function Gt(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Ut(e,t){return{usr:e.state,key:e.key,idx:t}}function Xt(e,t,n,r){return void 0===n&&(n=null),$t({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?qt(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Yt(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function qt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Zt(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Vt.Pop,l=null,u=c();function c(){return(a.state||{idx:null}).idx}function d(){s=Vt.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:p.location,delta:t})}function h(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:Yt(e);return n=n.replace(/ $/,"%20"),Ht(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,a.replaceState($t({},a.state,{idx:u}),""));let p={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Wt,d),l=e,()=>{i.removeEventListener(Wt,d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=Vt.Push;let r=Xt(p.location,e,t);n&&n(r,e),u=c()+1;let d=Ut(r,u),h=p.createHref(r);try{a.pushState(d,"",h)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;i.location.assign(h)}o&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s=Vt.Replace;let r=Xt(p.location,e,t);n&&n(r,e),u=c();let i=Ut(r,u),d=p.createHref(r);a.replaceState(i,"",d),o&&l&&l({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}var Kt;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Kt||(Kt={}));const Qt=new Set(["lazy","caseSensitive","path","id","index","children"]);function Jt(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map((e,i)=>{let o=[...n,String(i)],a="string"===typeof e.id?e.id:o.join("-");if(Ht(!0!==e.index||!e.children,"Cannot specify children on an index route"),Ht(!r[a],'Found a route id collision on id "'+a+"\".  Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=$t({},e,t(e),{id:a});return r[a]=n,n}{let n=$t({},e,t(e),{id:a,children:void 0});return r[a]=n,e.children&&(n.children=Jt(e.children,t,o,r)),n}})}function en(e,t,n){return void 0===n&&(n="/"),tn(e,t,n,!1)}function tn(e,t,n,r){let i=gn(("string"===typeof t?qt(t):t).pathname||"/",n);if(null==i)return null;let o=nn(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let a=null,s=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Gt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(i);for(let l=0;null==a&&l<o.length;++l)a=pn(o[l],s,r);return a}function nn(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(Ht(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=Sn([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(Ht(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),nn(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:hn(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of rn(e.path))i(e,t,r);else i(e,t)}),t}function rn(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=rn(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const on=/^:[\w-]+$/,an=3,sn=2,ln=1,un=10,cn=-2,dn=e=>"*"===e;function hn(e,t){let n=e.split("/"),r=n.length;return n.some(dn)&&(r+=cn),t&&(r+=sn),n.filter(e=>!dn(e)).reduce((e,t)=>e+(on.test(t)?an:""===t?ln:un),r)}function pn(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=fn({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=fn({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),a.push({params:i,pathname:Sn([o,c.pathname]),pathnameBase:_n(Sn([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Sn([o,c.pathnameBase]))}return a}function fn(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);Gt("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function gn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function mn(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function vn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function yn(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function xn(e,t){let n=yn(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function bn(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=qt(e):(i=$t({},e),Ht(!i.pathname||!i.pathname.includes("?"),vn("?","pathname","search",i)),Ht(!i.pathname||!i.pathname.includes("#"),vn("#","pathname","hash",i)),Ht(!i.search||!i.search.includes("#"),vn("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let n,{pathname:r,search:i="",hash:o=""}="string"===typeof e?qt(e):e;return r?(r=wn(r),n=r.startsWith("/")?mn(r.substring(1),"/"):mn(r,t)):n=t,{pathname:n,search:An(i),hash:kn(o)}}(i,o),u=s&&"/"!==s&&s.endsWith("/"),c=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const wn=e=>e.replace(/\/\/+/g,"/"),Sn=e=>wn(e.join("/")),_n=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),An=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",kn=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class Cn{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Mn(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const In=["post","put","patch","delete"],Tn=new Set(In),Dn=["get",...In],jn=new Set(Dn),Pn=new Set([301,302,303,307,308]),Ln=new Set([307,308]),Rn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},En={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nn={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},On=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zn=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Bn="remix-router-transitions";function Fn(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,n="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,r=!n;let i;if(Ht(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=zn;let o,a,s,l={},u=Jt(e.routes,i,void 0,l),c=e.basename||"/",d=e.dataStrategy||Zn,h=e.patchRoutesOnNavigation,p=$t({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,g=new Set,m=null,v=null,y=null,x=null!=e.hydrationData,b=en(u,e.history.location,c),w=!1,S=null;if(null==b&&!h){let t=cr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ur(u);b=n,S={[r.id]:t}}if(b&&!e.hydrationData){fe(b,u,e.history.location.pathname).active&&(b=null)}if(b)if(b.some(e=>e.route.lazy))a=!1;else if(b.some(e=>e.route.loader))if(p.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=b.findIndex(e=>void 0!==n[e.route.id]);a=b.slice(0,e+1).every(e=>!Gn(e.route,t,n))}else a=b.every(e=>!Gn(e.route,t,n))}else a=null!=e.hydrationData;else a=!0;else if(a=!1,b=[],p.v7_partialHydration){let t=fe(null,u,e.history.location.pathname);t.active&&t.matches&&(w=!0,b=t.matches)}let _,A,k={historyAction:e.history.action,location:e.history.location,matches:b,initialized:a,navigation:Rn,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},C=Vt.Pop,M=!1,I=!1,T=new Map,D=null,j=!1,P=!1,L=[],R=new Set,E=new Map,N=0,O=-1,z=new Map,B=new Set,F=new Map,$=new Map,V=new Set,W=new Map,H=new Map;function G(e,t){void 0===t&&(t={}),k=$t({},k,e);let n=[],r=[];p.v7_fetcherPersist&&k.fetchers.forEach((e,t)=>{"idle"===e.state&&(V.has(t)?r.push(t):n.push(t))}),V.forEach(e=>{k.fetchers.has(e)||E.has(e)||r.push(e)}),[...g].forEach(e=>e(k,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),p.v7_fetcherPersist?(n.forEach(e=>k.fetchers.delete(e)),r.forEach(e=>ne(e))):r.forEach(e=>V.delete(e))}function U(t,n,r){var i,a;let s,{flushSync:l}=void 0===r?{}:r,c=null!=k.actionData&&null!=k.navigation.formMethod&&br(k.navigation.formMethod)&&"loading"===k.navigation.state&&!0!==(null==(i=t.state)?void 0:i._isRedirect);s=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:c?k.actionData:null;let d=n.loaderData?ar(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,h=k.blockers;h.size>0&&(h=new Map(h),h.forEach((e,t)=>h.set(t,Nn)));let p,f=!0===M||null!=k.navigation.formMethod&&br(k.navigation.formMethod)&&!0!==(null==(a=t.state)?void 0:a._isRedirect);if(o&&(u=o,o=void 0),j||C===Vt.Pop||(C===Vt.Push?e.history.push(t,t.state):C===Vt.Replace&&e.history.replace(t,t.state)),C===Vt.Pop){let e=T.get(k.location.pathname);e&&e.has(t.pathname)?p={currentLocation:k.location,nextLocation:t}:T.has(t.pathname)&&(p={currentLocation:t,nextLocation:k.location})}else if(I){let e=T.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),T.set(k.location.pathname,e)),p={currentLocation:k.location,nextLocation:t}}G($t({},n,{actionData:s,loaderData:d,historyAction:C,location:t,initialized:!0,navigation:Rn,revalidation:"idle",restoreScrollPosition:pe(t,n.matches||k.matches),preventScrollReset:f,blockers:h}),{viewTransitionOpts:p,flushSync:!0===l}),C=Vt.Pop,M=!1,I=!1,j=!1,P=!1,L=[]}async function X(t,n,r){_&&_.abort(),_=null,C=t,j=!0===(r&&r.startUninterruptedRevalidation),function(e,t){if(m&&y){let n=he(e,t);m[n]=y()}}(k.location,k.matches),M=!0===(r&&r.preventScrollReset),I=!0===(r&&r.enableViewTransition);let i=o||u,a=r&&r.overrideNavigation,s=null!=r&&r.initialHydration&&k.matches&&k.matches.length>0&&!w?k.matches:en(i,n,c),l=!0===(r&&r.flushSync);if(s&&k.initialized&&!P&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(k.location,n)&&!(r&&r.submission&&br(r.submission.formMethod)))return void U(n,{matches:s},{flushSync:l});let d=fe(s,i,n.pathname);if(d.active&&d.matches&&(s=d.matches),!s){let{error:e,notFoundMatches:t,route:r}=ce(n.pathname);return void U(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:l})}_=new AbortController;let h,f=tr(e.history,n,_.signal,r&&r.submission);if(r&&r.pendingError)h=[lr(s).route.id,{type:Kt.error,error:r.pendingError}];else if(r&&r.submission&&br(r.submission.formMethod)){let t=await async function(t,n,r,i,o,a){void 0===a&&(a={});Q();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,r);if(G({navigation:l},{flushSync:!0===a.flushSync}),o){let e=await ge(i,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=lr(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:Kt.error,error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=ce(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:Kt.error,error:t}]}}i=e.matches}let u=kr(i,n);if(u.route.action||u.route.lazy){if(s=(await Z("action",k,t,[u],i,null))[u.route.id],t.signal.aborted)return{shortCircuited:!0}}else s={type:Kt.error,error:cr(405,{method:t.method,pathname:n.pathname,routeId:u.route.id})};if(mr(s)){let n;if(a&&null!=a.replace)n=a.replace;else{n=er(s.response.headers.get("Location"),new URL(t.url),c,e.history)===k.location.pathname+k.location.search}return await q(t,s,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(fr(s))throw cr(400,{type:"defer-action"});if(gr(s)){let e=lr(i,u.route.id);return!0!==(a&&a.replace)&&(C=Vt.Push),{matches:i,pendingActionResult:[e.route.id,s]}}return{matches:i,pendingActionResult:[u.route.id,s]}}(f,n,r.submission,s,d.active,{replace:r.replace,flushSync:l});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(gr(r)&&Mn(r.error)&&404===r.error.status)return _=null,void U(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}s=t.matches||s,h=t.pendingActionResult,a=Mr(n,r.submission),l=!1,d.active=!1,f=tr(e.history,f.url,f.signal)}let{shortCircuited:g,matches:v,loaderData:x,errors:b}=await async function(t,n,r,i,a,s,l,d,h,f,g){let m=a||Mr(n,s),v=s||l||Cr(m),y=!j&&(!p.v7_partialHydration||!h);if(i){if(y){let e=Y(g);G($t({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ge(r,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=lr(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=ce(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}r=e.matches}let x=o||u,[b,w]=Hn(e.history,k,r,v,n,p.v7_partialHydration&&!0===h,p.v7_skipActionErrorRevalidation,P,L,R,V,F,B,x,c,g);if(de(e=>!(r&&r.some(t=>t.route.id===e))||b&&b.some(t=>t.route.id===e)),O=++N,0===b.length&&0===w.length){let e=oe();return U(n,$t({matches:r,loaderData:{},errors:g&&gr(g[1])?{[g[0]]:g[1].error}:null},sr(g),e?{fetchers:new Map(k.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(y){let e={};if(!i){e.navigation=m;let t=Y(g);void 0!==t&&(e.actionData=t)}w.length>0&&(e.fetchers=function(e){return e.forEach(e=>{let t=k.fetchers.get(e.key),n=Ir(void 0,t?t.data:void 0);k.fetchers.set(e.key,n)}),new Map(k.fetchers)}(w)),G(e,{flushSync:f})}w.forEach(e=>{re(e.key),e.controller&&E.set(e.key,e.controller)});let S=()=>w.forEach(e=>re(e.key));_&&_.signal.addEventListener("abort",S);let{loaderResults:A,fetcherResults:C}=await K(k,r,b,w,t);if(t.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",S);w.forEach(e=>E.delete(e.key));let M=dr(A);if(M)return await q(t,M.result,!0,{replace:d}),{shortCircuited:!0};if(M=dr(C),M)return B.add(M.key),await q(t,M.result,!0,{replace:d}),{shortCircuited:!0};let{loaderData:I,errors:T}=or(k,r,A,g,w,C,W);W.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&W.delete(t)})}),p.v7_partialHydration&&h&&k.errors&&(T=$t({},k.errors,T));let D=oe(),z=ae(O),$=D||z||w.length>0;return $t({matches:r,loaderData:I,errors:T},$?{fetchers:new Map(k.fetchers)}:{})}(f,n,s,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&!0===r.initialHydration,l,h);g||(_=null,U(n,$t({matches:v||s},sr(h),{loaderData:x,errors:b})))}function Y(e){return e&&!gr(e[1])?{[e[0]]:e[1].data}:k.actionData?0===Object.keys(k.actionData).length?null:k.actionData:void 0}async function q(r,i,o,a){let{submission:s,fetcherSubmission:l,preventScrollReset:u,replace:d}=void 0===a?{}:a;i.response.headers.has("X-Remix-Revalidate")&&(P=!0);let h=i.response.headers.get("Location");Ht(h,"Expected a Location header on the redirect Response"),h=er(h,new URL(r.url),c,e.history);let p=Xt(k.location,h,{_isRedirect:!0});if(n){let n=!1;if(i.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(On.test(h)){const r=e.history.createURL(h);n=r.origin!==t.location.origin||null==gn(r.pathname,c)}if(n)return void(d?t.location.replace(h):t.location.assign(h))}_=null;let f=!0===d||i.response.headers.has("X-Remix-Replace")?Vt.Replace:Vt.Push,{formMethod:g,formAction:m,formEncType:v}=k.navigation;!s&&!l&&g&&m&&v&&(s=Cr(k.navigation));let y=s||l;if(Ln.has(i.response.status)&&y&&br(y.formMethod))await X(f,p,{submission:$t({},y,{formAction:h}),preventScrollReset:u||M,enableViewTransition:o?I:void 0});else{let e=Mr(p,s);await X(f,p,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||M,enableViewTransition:o?I:void 0})}}async function Z(e,t,n,r,o,a){let s,u={};try{s=await Kn(d,e,t,n,r,o,a,l,i)}catch(h){return r.forEach(e=>{u[e.route.id]={type:Kt.error,error:h}}),u}for(let[i,l]of Object.entries(s))if(pr(l)){let e=l.result;u[i]={type:Kt.redirect,response:Jn(e,n,i,o,c,p.v7_relativeSplatPath)}}else u[i]=await Qn(l);return u}async function K(t,n,r,i,o){let a=t.matches,s=Z("loader",t,o,r,n,null),l=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await Z("loader",t,tr(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:Kt.error,error:cr(404,{pathname:n.path})}})})),u=await s,c=(await l).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([wr(n,u,o.signal,a,t.loaderData),Sr(n,c,i)]),{loaderResults:u,fetcherResults:c}}function Q(){P=!0,L.push(...de()),F.forEach((e,t)=>{E.has(t)&&R.add(t),re(t)})}function J(e,t,n){void 0===n&&(n={}),k.fetchers.set(e,t),G({fetchers:new Map(k.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ee(e,t,n,r){void 0===r&&(r={});let i=lr(k.matches,t);ne(e),G({errors:{[i.route.id]:n},fetchers:new Map(k.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function te(e){return $.set(e,($.get(e)||0)+1),V.has(e)&&V.delete(e),k.fetchers.get(e)||En}function ne(e){let t=k.fetchers.get(e);!E.has(e)||t&&"loading"===t.state&&z.has(e)||re(e),F.delete(e),z.delete(e),B.delete(e),p.v7_fetcherPersist&&V.delete(e),R.delete(e),k.fetchers.delete(e)}function re(e){let t=E.get(e);t&&(t.abort(),E.delete(e))}function ie(e){for(let t of e){let e=Tr(te(t).data);k.fetchers.set(t,e)}}function oe(){let e=[],t=!1;for(let n of B){let r=k.fetchers.get(n);Ht(r,"Expected fetcher: "+n),"loading"===r.state&&(B.delete(n),e.push(n),t=!0)}return ie(e),t}function ae(e){let t=[];for(let[n,r]of z)if(r<e){let e=k.fetchers.get(n);Ht(e,"Expected fetcher: "+n),"loading"===e.state&&(re(n),z.delete(n),t.push(n))}return ie(t),t.length>0}function se(e){k.blockers.delete(e),H.delete(e)}function le(e,t){let n=k.blockers.get(e)||Nn;Ht("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(k.blockers);r.set(e,t),G({blockers:r})}function ue(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===H.size)return;H.size>1&&Gt(!1,"A router only supports one blocker at a time");let i=Array.from(H.entries()),[o,a]=i[i.length-1],s=k.blockers.get(o);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?o:void 0}function ce(e){let t=cr(404,{pathname:e}),n=o||u,{matches:r,route:i}=ur(n);return de(),{notFoundMatches:r,route:i,error:t}}function de(e){let t=[];return W.forEach((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),W.delete(r))}),t}function he(e,t){if(v){return v(e,t.map(e=>function(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}(e,k.loaderData)))||e.key}return e.key}function pe(e,t){if(m){let n=he(e,t),r=m[n];if("number"===typeof r)return r}return null}function fe(e,t,n){if(h){if(!e){return{active:!0,matches:tn(t,n,c,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:tn(t,n,c,!0)}}}return{active:!1,matches:null}}async function ge(e,t,n,r){if(!h)return{type:"success",matches:e};let a=e;for(;;){let e=null==o,d=o||u,p=l;try{await h({signal:n,path:t,matches:a,fetcherKey:r,patch:(e,t)=>{n.aborted||Yn(e,t,d,p,i)}})}catch(s){return{type:"error",error:s,partialMatches:a}}finally{e&&!n.aborted&&(u=[...u])}if(n.aborted)return{type:"aborted"};let f=en(d,t,c);if(f)return{type:"success",matches:f};let g=tn(d,t,c,!0);if(!g||a.length===g.length&&a.every((e,t)=>e.route.id===g[t].route.id))return{type:"success",matches:null};a=g}}return s={get basename(){return c},get future(){return p},get state(){return k},get routes(){return u},get window(){return t},initialize:function(){if(f=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(A)return A(),void(A=void 0);Gt(0===H.size||null!=i,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=ue({currentLocation:k.location,nextLocation:r,historyAction:n});if(o&&null!=i){let t=new Promise(e=>{A=e});return e.history.go(-1*i),void le(o,{state:"blocked",location:r,proceed(){le(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(k.blockers);e.set(o,Nn),G({blockers:e})}})}return X(n,r)}),n){!function(e,t){try{let n=e.sessionStorage.getItem(Bn);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(n){}}(t,T);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(Bn,JSON.stringify(r))}catch(n){Gt(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}(t,T);t.addEventListener("pagehide",e),D=()=>t.removeEventListener("pagehide",e)}return k.initialized||X(Vt.Pop,k.location,{initialHydration:!0}),s},subscribe:function(e){return g.add(e),()=>g.delete(e)},enableScrollRestoration:function(e,t,n){if(m=e,y=t,v=n||null,!x&&k.navigation===Rn){x=!0;let e=pe(k.location,k.matches);null!=e&&G({restoreScrollPosition:e})}return()=>{m=null,y=null,v=null}},navigate:async function t(n,r){if("number"===typeof n)return void e.history.go(n);let i=$n(k.location,k.matches,c,p.v7_prependBasename,n,p.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:a,error:s}=Vn(p.v7_normalizeFormMethod,!1,i,r),l=k.location,u=Xt(k.location,o,r&&r.state);u=$t({},u,e.history.encodeLocation(u));let d=r&&null!=r.replace?r.replace:void 0,h=Vt.Push;!0===d?h=Vt.Replace:!1===d||null!=a&&br(a.formMethod)&&a.formAction===k.location.pathname+k.location.search&&(h=Vt.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,g=!0===(r&&r.flushSync),m=ue({currentLocation:l,nextLocation:u,historyAction:h});if(!m)return await X(h,u,{submission:a,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:g});le(m,{state:"blocked",location:u,proceed(){le(m,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,r)},reset(){let e=new Map(k.blockers);e.set(m,Nn),G({blockers:e})}})},fetch:function(t,n,i,a){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");re(t);let s=!0===(a&&a.flushSync),l=o||u,d=$n(k.location,k.matches,c,p.v7_prependBasename,i,p.v7_relativeSplatPath,n,null==a?void 0:a.relative),h=en(l,d,c),f=fe(h,l,d);if(f.active&&f.matches&&(h=f.matches),!h)return void ee(t,n,cr(404,{pathname:d}),{flushSync:s});let{path:g,submission:m,error:v}=Vn(p.v7_normalizeFormMethod,!0,d,a);if(v)return void ee(t,n,v,{flushSync:s});let y=kr(h,g),x=!0===(a&&a.preventScrollReset);m&&br(m.formMethod)?async function(t,n,r,i,a,s,l,d,h){function f(e){if(!e.route.action&&!e.route.lazy){let e=cr(405,{method:h.formMethod,pathname:r,routeId:n});return ee(t,n,e,{flushSync:l}),!0}return!1}if(Q(),F.delete(t),!s&&f(i))return;let g=k.fetchers.get(t);J(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(h,g),{flushSync:l});let m=new AbortController,v=tr(e.history,r,m.signal,h);if(s){let e=await ge(a,new URL(v.url).pathname,v.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ee(t,n,e.error,{flushSync:l});if(!e.matches)return void ee(t,n,cr(404,{pathname:r}),{flushSync:l});if(f(i=kr(a=e.matches,r)))return}E.set(t,m);let y=N,x=await Z("action",k,v,[i],a,t),b=x[i.route.id];if(v.signal.aborted)return void(E.get(t)===m&&E.delete(t));if(p.v7_fetcherPersist&&V.has(t)){if(mr(b)||gr(b))return void J(t,Tr(void 0))}else{if(mr(b))return E.delete(t),O>y?void J(t,Tr(void 0)):(B.add(t),J(t,Ir(h)),q(v,b,!1,{fetcherSubmission:h,preventScrollReset:d}));if(gr(b))return void ee(t,n,b.error)}if(fr(b))throw cr(400,{type:"defer-action"});let w=k.navigation.location||k.location,S=tr(e.history,w,m.signal),A=o||u,M="idle"!==k.navigation.state?en(A,k.navigation.location,c):k.matches;Ht(M,"Didn't find any matches after fetcher action");let I=++N;z.set(t,I);let T=Ir(h,b.data);k.fetchers.set(t,T);let[D,j]=Hn(e.history,k,M,h,w,!1,p.v7_skipActionErrorRevalidation,P,L,R,V,F,B,A,c,[i.route.id,b]);j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=k.fetchers.get(t),r=Ir(void 0,n?n.data:void 0);k.fetchers.set(t,r),re(t),e.controller&&E.set(t,e.controller)}),G({fetchers:new Map(k.fetchers)});let $=()=>j.forEach(e=>re(e.key));m.signal.addEventListener("abort",$);let{loaderResults:H,fetcherResults:X}=await K(k,M,D,j,S);if(m.signal.aborted)return;m.signal.removeEventListener("abort",$),z.delete(t),E.delete(t),j.forEach(e=>E.delete(e.key));let Y=dr(H);if(Y)return q(S,Y.result,!1,{preventScrollReset:d});if(Y=dr(X),Y)return B.add(Y.key),q(S,Y.result,!1,{preventScrollReset:d});let{loaderData:te,errors:ne}=or(k,M,H,void 0,j,X,W);if(k.fetchers.has(t)){let e=Tr(b.data);k.fetchers.set(t,e)}ae(I),"loading"===k.navigation.state&&I>O?(Ht(C,"Expected pending action"),_&&_.abort(),U(k.navigation.location,{matches:M,loaderData:te,errors:ne,fetchers:new Map(k.fetchers)})):(G({errors:ne,loaderData:ar(k.loaderData,te,M,ne),fetchers:new Map(k.fetchers)}),P=!1)}(t,n,g,y,h,f.active,s,x,m):(F.set(t,{routeId:n,path:g}),async function(t,n,r,i,o,a,s,l,u){let c=k.fetchers.get(t);J(t,Ir(u,c?c.data:void 0),{flushSync:s});let d=new AbortController,h=tr(e.history,r,d.signal);if(a){let e=await ge(o,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ee(t,n,e.error,{flushSync:s});if(!e.matches)return void ee(t,n,cr(404,{pathname:r}),{flushSync:s});i=kr(o=e.matches,r)}E.set(t,d);let p=N,f=await Z("loader",k,h,[i],o,t),g=f[i.route.id];fr(g)&&(g=await _r(g,h.signal,!0)||g);E.get(t)===d&&E.delete(t);if(h.signal.aborted)return;if(V.has(t))return void J(t,Tr(void 0));if(mr(g))return O>p?void J(t,Tr(void 0)):(B.add(t),void await q(h,g,!1,{preventScrollReset:l}));if(gr(g))return void ee(t,n,g.error);Ht(!fr(g),"Unhandled fetcher deferred data"),J(t,Tr(g.data))}(t,n,g,y,h,f.active,s,x,m))},revalidate:function(){Q(),G({revalidation:"loading"}),"submitting"!==k.navigation.state&&("idle"!==k.navigation.state?X(C||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:!0===I}):X(k.historyAction,k.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:te,deleteFetcher:function(e){let t=($.get(e)||0)-1;t<=0?($.delete(e),V.add(e),p.v7_fetcherPersist||ne(e)):$.set(e,t),G({fetchers:new Map(k.fetchers)})},dispose:function(){f&&f(),D&&D(),g.clear(),_&&_.abort(),k.fetchers.forEach((e,t)=>ne(t)),k.blockers.forEach((e,t)=>se(t))},getBlocker:function(e,t){let n=k.blockers.get(e)||Nn;return H.get(e)!==t&&H.set(e,t),n},deleteBlocker:se,patchRoutes:function(e,t){let n=null==o;Yn(e,t,o||u,l,i),n&&(u=[...u],G({}))},_internalFetchControllers:E,_internalActiveDeferreds:W,_internalSetRoutes:function(e){l={},o=Jt(e,i,void 0,l)}},s}Symbol("deferred");function $n(e,t,n,r,i,o,a,s){let l,u;if(a){l=[];for(let e of t)if(l.push(e),e.route.id===a){u=e;break}}else l=t,u=t[t.length-1];let c=bn(i||".",xn(l,o),gn(e.pathname,n)||e.pathname,"path"===s);if(null==i&&(c.search=e.search,c.hash=e.hash),(null==i||""===i||"."===i)&&u){let e=Ar(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();c.search=n?"?"+n:""}}return r&&"/"!==n&&(c.pathname="/"===c.pathname?n:Sn([n,c.pathname])),Yt(c)}function Vn(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!xr(r.formMethod))return{path:n,error:cr(405,{method:r.formMethod})};let i,o,a=()=>({path:n,error:cr(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),u=hr(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!br(l))return a();let e="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!br(l))return a();try{let e="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(h){return a()}}}if(Ht("function"===typeof FormData,"FormData is not available in this environment"),r.formData)i=nr(r.formData),o=r.formData;else if(r.body instanceof FormData)i=nr(r.body),o=r.body;else if(r.body instanceof URLSearchParams)i=r.body,o=rr(i);else if(null==r.body)i=new URLSearchParams,o=new FormData;else try{i=new URLSearchParams(r.body),o=rr(i)}catch(h){return a()}let c={formMethod:l,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(br(c.formMethod))return{path:n,submission:c};let d=qt(n);return t&&d.search&&Ar(d.search)&&i.append("index",""),d.search="?"+i,{path:Yt(d),submission:c}}function Wn(e,t,n){void 0===n&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Hn(e,t,n,r,i,o,a,s,l,u,c,d,h,p,f,g){let m=g?gr(g[1])?g[1].error:g[1].data:void 0,v=e.createURL(t.location),y=e.createURL(i),x=n;o&&t.errors?x=Wn(n,Object.keys(t.errors)[0],!0):g&&gr(g[1])&&(x=Wn(n,g[0]));let b=g?g[1].statusCode:void 0,w=a&&b&&b>=400,S=x.filter((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(null==i.loader)return!1;if(o)return Gn(i,t.loaderData,t.errors);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,i=void 0===e[n.route.id];return r||i}(t.loaderData,t.matches[n],e)||l.some(t=>t===e.route.id))return!0;let a=t.matches[n],u=e;return Xn(e,$t({currentUrl:v,currentParams:a.params,nextUrl:y,nextParams:u.params},r,{actionResult:m,actionStatus:b,defaultShouldRevalidate:!w&&(s||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||Un(a,u))}))}),_=[];return d.forEach((e,i)=>{if(o||!n.some(t=>t.route.id===e.routeId)||c.has(i))return;let a=en(p,e.path,f);if(!a)return void _.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let l=t.fetchers.get(i),d=kr(a,e.path),g=!1;h.has(i)?g=!1:u.has(i)?(u.delete(i),g=!0):g=l&&"idle"!==l.state&&void 0===l.data?s:Xn(d,$t({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:m,actionStatus:b,defaultShouldRevalidate:!w&&s})),g&&_.push({key:i,routeId:e.routeId,path:e.path,matches:a,match:d,controller:new AbortController})}),[S,_]}function Gn(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],i=null!=n&&void 0!==n[e.id];return!(!r&&i)&&("function"===typeof e.loader&&!0===e.loader.hydrate||!r&&!i)}function Un(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Xn(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}function Yn(e,t,n,r,i){var o;let a;if(e){let t=r[e];Ht(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),a=t.children}else a=n;let s=Jt(t.filter(e=>!a.some(t=>qn(e,t))),i,[e||"_","patch",String((null==(o=a)?void 0:o.length)||"0")],r);a.push(...s)}function qn(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every((e,n)=>{var r;return null==(r=t.children)?void 0:r.some(t=>qn(e,t))}))}async function Zn(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function Kn(e,t,n,r,i,o,a,s,l,u){let c=o.map(e=>e.route.lazy?async function(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Ht(i,"No route found in manifest");let o={};for(let a in r){let e=void 0!==i[a]&&"hasErrorBoundary"!==a;Gt(!e,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||Qt.has(a)||(o[a]=r[a])}Object.assign(i,o),Object.assign(i,$t({},t(i),{lazy:void 0}))}(e.route,l,s):void 0),d=o.map((e,n)=>{let o=c[n],a=i.some(t=>t.route.id===e.route.id);return $t({},e,{shouldLoad:a,resolve:async n=>(n&&"GET"===r.method&&(e.route.lazy||e.route.loader)&&(a=!0),a?async function(e,t,n,r,i,o){let a,s,l=r=>{let a,l=new Promise((e,t)=>a=t);s=()=>a(),t.signal.addEventListener("abort",s);let u=i=>"function"!==typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:o},...void 0!==i?[i]:[]),c=(async()=>{try{return{type:"data",result:await(i?i(e=>u(e)):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let i=n.route[e];if(r)if(i){let e,[t]=await Promise.all([l(i).catch(t=>{e=t}),r]);if(void 0!==e)throw e;a=t}else{if(await r,i=n.route[e],!i){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw cr(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:Kt.data,result:void 0}}a=await l(i)}else{if(!i){let e=new URL(t.url);throw cr(404,{pathname:e.pathname+e.search})}a=await l(i)}Ht(void 0!==a.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(u){return{type:Kt.error,result:u}}finally{s&&t.signal.removeEventListener("abort",s)}return a}(t,r,e,o,n,u):Promise.resolve({type:Kt.data,result:void 0}))})}),h=await e({matches:d,request:r,params:o[0].params,fetcherKey:a,context:u});try{await Promise.all(c)}catch(p){}return h}async function Qn(e){let{result:t,type:n}=e;if(yr(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(d){return{type:Kt.error,error:d}}return n===Kt.error?{type:Kt.error,error:new Cn(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:Kt.data,data:e,statusCode:t.status,headers:t.headers}}var r,i,o,a,s,l,u,c;return n===Kt.error?vr(t)?t.data instanceof Error?{type:Kt.error,error:t.data,statusCode:null==(o=t.init)?void 0:o.status,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:Kt.error,error:new Cn((null==(r=t.init)?void 0:r.status)||500,void 0,t.data),statusCode:Mn(t)?t.status:void 0,headers:null!=(i=t.init)&&i.headers?new Headers(t.init.headers):void 0}:{type:Kt.error,error:t,statusCode:Mn(t)?t.status:void 0}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(t)?{type:Kt.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:vr(t)?{type:Kt.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:Kt.data,data:t}}function Jn(e,t,n,r,i,o){let a=e.headers.get("Location");if(Ht(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!On.test(a)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=$n(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function er(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(On.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(i.includes(o.protocol))throw new Error("Invalid redirect location");let a=null!=gn(o.pathname,n);if(o.origin===t.origin&&a)return wn(o.pathname)+o.search+o.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw new Error("Invalid redirect location")}catch(o){}return e}function tr(e,t,n,r){let i=e.createURL(hr(t)).toString(),o={signal:n};if(r&&br(r.formMethod)){let{formMethod:e,formEncType:t}=r;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(r.json)):"text/plain"===t?o.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?o.body=nr(r.formData):o.body=r.formData}return new Request(i,o)}function nr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"===typeof r?r:r.name);return t}function rr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function ir(e,t,n,r,i){let o,a={},s=null,l=!1,u={},c=n&&gr(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,h=t[d];if(Ht(!mr(h),"Cannot handle redirect results in processLoaderData"),gr(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),s=s||{},i)s[d]=t;else{let n=lr(e,d);null==s[n.route.id]&&(s[n.route.id]=t)}a[d]=void 0,l||(l=!0,o=Mn(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else fr(h)?(r.set(d,h.deferredData),a[d]=h.deferredData.data,null==h.statusCode||200===h.statusCode||l||(o=h.statusCode),h.headers&&(u[d]=h.headers)):(a[d]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(o=h.statusCode),h.headers&&(u[d]=h.headers))}),void 0!==c&&n&&(s={[n[0]]:c},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:u}}function or(e,t,n,r,i,o,a){let{loaderData:s,errors:l}=ir(t,n,r,a,!1);return i.forEach(t=>{let{key:n,match:r,controller:i}=t,a=o[n];if(Ht(a,"Did not find corresponding fetcher result"),!i||!i.signal.aborted)if(gr(a)){let t=lr(e.matches,null==r?void 0:r.route.id);l&&l[t.route.id]||(l=$t({},l,{[t.route.id]:a.error})),e.fetchers.delete(n)}else if(mr(a))Ht(!1,"Unhandled fetcher revalidation redirect");else if(fr(a))Ht(!1,"Unhandled fetcher deferred data");else{let t=Tr(a.data);e.fetchers.set(n,t)}}),{loaderData:s,errors:l}}function ar(e,t,n,r){let i=$t({},t);for(let o of n){let n=o.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(i[n]=t[n]):void 0!==e[n]&&o.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function sr(e){return e?gr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function lr(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function ur(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function cr(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Cn(e||500,s,new Error(l),!0)}function dr(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[e,r]=t[n];if(mr(r))return{key:e,result:r}}}function hr(e){return Yt($t({},"string"===typeof e?qt(e):e,{hash:""}))}function pr(e){return yr(e.result)&&Pn.has(e.result.status)}function fr(e){return e.type===Kt.deferred}function gr(e){return e.type===Kt.error}function mr(e){return(e&&e.type)===Kt.redirect}function vr(e){return"object"===typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function yr(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function xr(e){return jn.has(e.toLowerCase())}function br(e){return Tn.has(e.toLowerCase())}async function wr(e,t,n,r,i){let o=Object.entries(t);for(let a=0;a<o.length;a++){let[s,l]=o[a],u=e.find(e=>(null==e?void 0:e.route.id)===s);if(!u)continue;let c=r.find(e=>e.route.id===u.route.id),d=null!=c&&!Un(c,u)&&void 0!==(i&&i[u.route.id]);fr(l)&&d&&await _r(l,n,!1).then(e=>{e&&(t[s]=e)})}}async function Sr(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:o,controller:a}=n[r],s=t[i];e.find(e=>(null==e?void 0:e.route.id)===o)&&(fr(s)&&(Ht(a,"Expected an AbortController for revalidating fetcher deferred result"),await _r(s,a.signal,!0).then(e=>{e&&(t[i]=e)})))}}async function _r(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Kt.data,data:e.deferredData.unwrappedData}}catch(r){return{type:Kt.error,error:r}}return{type:Kt.data,data:e.deferredData.data}}}function Ar(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function kr(e,t){let n="string"===typeof t?qt(t).search:t.search;if(e[e.length-1].route.index&&Ar(n||""))return e[e.length-1];let r=yn(e);return r[r.length-1]}function Cr(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(t&&n&&r)return null!=i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i}:null!=o?{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function Mr(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ir(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Dr(){return Dr=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},Dr.apply(null,arguments)}const jr=St().createContext(null);const Pr=St().createContext(null);const Lr=St().createContext(null);const Rr=St().createContext(null);const Er=St().createContext({outlet:null,matches:[],isDataRoute:!1});const Nr=St().createContext(null);function Or(){return null!=St().useContext(Rr)}function zr(){return Or()||Ht(!1),St().useContext(Rr).location}function Br(e){St().useContext(Lr).static||St().useLayoutEffect(e)}function Fr(){let{isDataRoute:e}=St().useContext(Er);return e?function(){let{router:e}=Qr(Zr.UseNavigateStable),t=ei(Kr.UseNavigateStable),n=St().useRef(!1);return Br(()=>{n.current=!0}),St().useCallback(function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Dr({fromRouteId:t},i)))},[e,t])}():function(){Or()||Ht(!1);let e=St().useContext(jr),{basename:t,future:n,navigator:r}=St().useContext(Lr),{matches:i}=St().useContext(Er),{pathname:o}=zr(),a=JSON.stringify(xn(i,n.v7_relativeSplatPath)),s=St().useRef(!1);return Br(()=>{s.current=!0}),St().useCallback(function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"===typeof n)return void r.go(n);let l=bn(n,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Sn([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[t,r,a,o,e])}()}const $r=St().createContext(null);function Vr(){let{matches:e}=St().useContext(Er),t=e[e.length-1];return t?t.params:{}}function Wr(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=St().useContext(Lr),{matches:i}=St().useContext(Er),{pathname:o}=zr(),a=JSON.stringify(xn(i,r.v7_relativeSplatPath));return St().useMemo(()=>bn(e,JSON.parse(a),o,"path"===n),[e,a,o,n])}function Hr(e,t,n,r){Or()||Ht(!1);let{navigator:i}=St().useContext(Lr),{matches:o}=St().useContext(Er),a=o[o.length-1],s=a?a.params:{},l=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,c=zr();if(t){var d;let e="string"===typeof t?qt(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||Ht(!1),u=e}else u=c;let h=u.pathname||"/",p=h;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=en(e,{pathname:p});let g=qr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Sn([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Sn([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,r);return t&&g?St().createElement(Rr.Provider,{value:{location:Dr({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Vt.Pop}},g):g}function Gr(){let e=function(){var e;let t=St().useContext(Nr),n=Jr(Kr.UseRouteError),r=ei(Kr.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=Mn(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return St().createElement(St().Fragment,null,St().createElement("h2",null,"Unexpected Application Error!"),St().createElement("h3",{style:{fontStyle:"italic"}},t),n?St().createElement("pre",{style:i},n):null,null)}const Ur=St().createElement(Gr,null);class Xr extends St().Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?St().createElement(Er.Provider,{value:this.props.routeContext},St().createElement(Nr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yr(e){let{routeContext:t,match:n,children:r}=e,i=St().useContext(jr);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),St().createElement(Er.Provider,{value:t},r)}function qr(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||Ht(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let e=a[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let o,c=!1,d=null,h=null;var p;n&&(o=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||Ur,l&&(u<0&&0===i?(p="route-fallback",!1||ti[p]||(ti[p]=!0),c=!0,h=null):u===i&&(c=!0,h=r.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,i+1)),g=()=>{let t;return t=o?d:c?h:r.route.Component?St().createElement(r.route.Component,null):r.route.element?r.route.element:e,St().createElement(Yr,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?St().createElement(Xr,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):g()},null)}var Zr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zr||{}),Kr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Kr||{});function Qr(e){let t=St().useContext(jr);return t||Ht(!1),t}function Jr(e){let t=St().useContext(Pr);return t||Ht(!1),t}function ei(e){let t=function(){let e=St().useContext(Er);return e||Ht(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||Ht(!1),n.route.id}const ti={};function ni(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}Ft().startTransition;function ri(e){return function(e){let t=St().useContext(Er).outlet;return t?St().createElement($r.Provider,{value:e},t):t}(e.context)}function ii(e){Ht(!1)}function oi(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Vt.Pop,navigator:o,static:a=!1,future:s}=e;Or()&&Ht(!1);let l=t.replace(/^\/*/,"/"),u=St().useMemo(()=>({basename:l,navigator:o,static:a,future:Dr({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);"string"===typeof r&&(r=qt(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,g=St().useMemo(()=>{let e=gn(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}},[l,c,d,h,p,f,i]);return null==g?null:St().createElement(Lr.Provider,{value:u},St().createElement(Rr.Provider,{children:n,value:g}))}new Promise(()=>{});St().Component;function ai(e,t){void 0===t&&(t=[]);let n=[];return St().Children.forEach(e,(e,r)=>{if(!St().isValidElement(e))return;let i=[...t,r];if(e.type===St().Fragment)return void n.push.apply(n,ai(e.props.children,i));e.type!==ii&&Ht(!1),e.props.index&&e.props.children&&Ht(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=ai(e.props.children,i)),n.push(o)}),n}function si(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:St().createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:St().createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:St().createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function li(){return li=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},li.apply(null,arguments)}function ui(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function ci(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const di=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hi=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(oae){}function pi(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=li({},t,{errors:fi(t.errors)})),t}function fi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&"RouteErrorResponse"===i.__type)n[r]=new Cn(i.status,i.statusText,i.data,!0===i.internal);else if(i&&"Error"===i.__type){if(i.__subType){let e=window[i.__subType];if("function"===typeof e)try{let t=new e(i.message);t.stack="",n[r]=t}catch(oae){}}if(null==n[r]){let e=new Error(i.message);e.stack="",n[r]=e}}else n[r]=i;return n}const gi=St().createContext({isTransitioning:!1});const mi=St().createContext(new Map);const vi=Ft().startTransition,yi=function e(){return e.c||(e.c=n.t(xt(),2))}().flushSync;Ft().useId;function xi(e){yi?yi(e):e()}class bi{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function wi(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=St().useState(n.state),[a,s]=St().useState(),[l,u]=St().useState({isTransitioning:!1}),[c,d]=St().useState(),[h,p]=St().useState(),[f,g]=St().useState(),m=St().useRef(new Map),{v7_startTransition:v}=r||{},y=St().useCallback(e=>{v?function(e){vi?vi(e):e()}(e):e()},[v]),x=St().useCallback((e,t)=>{let{deletedFetchers:r,flushSync:i,viewTransitionOpts:a}=t;e.fetchers.forEach((e,t)=>{void 0!==e.data&&m.current.set(t,e.data)}),r.forEach(e=>m.current.delete(e));let l=null==n.window||null==n.window.document||"function"!==typeof n.window.document.startViewTransition;if(a&&!l){if(i){xi(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:a.currentLocation,nextLocation:a.nextLocation})});let t=n.window.document.startViewTransition(()=>{xi(()=>o(e))});return t.finished.finally(()=>{xi(()=>{d(void 0),p(void 0),s(void 0),u({isTransitioning:!1})})}),void xi(()=>p(t))}h?(c&&c.resolve(),h.skipTransition(),g({state:e,currentLocation:a.currentLocation,nextLocation:a.nextLocation})):(s(e),u({isTransitioning:!0,flushSync:!1,currentLocation:a.currentLocation,nextLocation:a.nextLocation}))}else i?xi(()=>o(e)):y(()=>o(e))},[n.window,h,c,m,y]);St().useLayoutEffect(()=>n.subscribe(x),[n,x]),St().useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new bi)},[l]),St().useEffect(()=>{if(c&&a&&n.window){let e=a,t=c.promise,r=n.window.document.startViewTransition(async()=>{y(()=>o(e)),await t});r.finished.finally(()=>{d(void 0),p(void 0),s(void 0),u({isTransitioning:!1})}),p(r)}},[y,a,c,n.window]),St().useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),St().useEffect(()=>{!l.isTransitioning&&f&&(s(f.state),u({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),g(void 0))},[l.isTransitioning,f]),St().useEffect(()=>{},[]);let b=St().useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}),[n]),w=n.basename||"/",S=St().useMemo(()=>({router:n,navigator:b,static:!1,basename:w}),[n,b,w]),_=St().useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return St().useEffect(()=>ni(r,n.future),[r,n.future]),St().createElement(St().Fragment,null,St().createElement(jr.Provider,{value:S},St().createElement(Pr.Provider,{value:i},St().createElement(mi.Provider,{value:m.current},St().createElement(gi.Provider,{value:l},St().createElement(oi,{basename:w,location:i.location,navigationType:i.historyAction,navigator:b,future:_},i.initialized||n.future.v7_partialHydration?St().createElement(Si,{routes:n.routes,future:n.future,state:i}):t))))),null)}const Si=St().memo(_i);function _i(e){let{routes:t,future:n,state:r}=e;return Hr(t,void 0,r,n)}const Ai="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,ki=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ci=St().forwardRef(function(e,t){let n,{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,h=ui(e,di),{basename:p}=St().useContext(Lr),f=!1;if("string"===typeof u&&ki.test(u)&&(n=u,Ai))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=gn(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:f=!0}catch(oae){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;Or()||Ht(!1);let{basename:r,navigator:i}=St().useContext(Lr),{hash:o,pathname:a,search:s}=Wr(e,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:Sn([r,a])),i.createHref({pathname:l,search:s,hash:o})}(u,{relative:i}),m=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=void 0===t?{}:t,l=Fr(),u=zr(),c=Wr(e,{relative:a});return St().useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:Yt(u)===Yt(c);l(e,{replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[u,l,c,r,i,n,e,o,a,s])}(u,{replace:a,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:d});return St().createElement("a",li({},h,{href:n||g,onClick:f||o?r:function(e){r&&r(e),e.defaultPrevented||m(e)},ref:t,target:l}))});const Mi=St().forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:o=!1,style:a,to:s,viewTransition:l,children:u}=e,c=ui(e,hi),d=Wr(s,{relative:c.relative}),h=zr(),p=St().useContext(Pr),{navigator:f,basename:g}=St().useContext(Lr),m=null!=p&&function(e,t){void 0===t&&(t={});let n=St().useContext(gi);null==n&&Ht(!1);let{basename:r}=Di(Ii.useViewTransitionState),i=Wr(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=gn(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=gn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=fn(i.pathname,a)||null!=fn(i.pathname,o)}(d)&&!0===l,v=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,y=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(y=y.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&g&&(x=gn(x,g)||x);const b="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,S=y===v||!o&&y.startsWith(v)&&"/"===y.charAt(b),_=null!=x&&(x===v||!o&&x.startsWith(v)&&"/"===x.charAt(v.length)),A={isActive:S,isPending:_,isTransitioning:m},k=S?n:void 0;w="function"===typeof i?i(A):[i,S?"active":null,_?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let C="function"===typeof a?a(A):a;return St().createElement(Ci,li({},c,{"aria-current":k,className:w,ref:t,style:C,to:s,viewTransition:l}),"function"===typeof u?u(A):u)});var Ii,Ti;function Di(e){let t=St().useContext(jr);return t||Ht(!1),t}function ji(e){let t=St().useRef(ci(e)),n=St().useRef(!1),r=zr(),i=St().useMemo(()=>function(e,t){let n=ci(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),o=Fr(),a=St().useCallback((e,t)=>{const r=ci("function"===typeof e?e(i):e);n.current=!0,o("?"+r,t)},[o,i]);return[i,a]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ii||(Ii={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ti||(Ti={}));function Pi(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,rt().A)(t.components[n].defaultProps,r):r}const Li=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=St().useContext(o().T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Ri=(0,Se().A)();const Ei=function(){return Li(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ri)};function Ni(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=Ei(r);i&&(o=o[i]||o);return Pi({theme:o,name:n,props:t})}At();const Oi=["ownerState"],zi=["variants"],Bi=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Fi(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function $i(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const Vi=(0,Se().A)(),Wi=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function Hi(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function Gi(e){return e?(t,n)=>n[e]:null}function Ui(e,t,n){let{ownerState:r}=t,i=(0,jt().A)(t,Oi);const o="function"===typeof e?e((0,Dt().A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>Ui(e,(0,Dt().A)({ownerState:r},i),n));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,jt().A)(o,zi);return e.forEach(e=>{let o=!0;if("function"===typeof e.props?o=e.props((0,Dt().A)({ownerState:r},i,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"===typeof e.style?e.style((0,Dt().A)({ownerState:r},i,r)):e.style;t.push(n?$i((0,he().internal_serializeStyles)(o),n):o)}}),t}return n?$i((0,he().internal_serializeStyles)(o),n):o}const Xi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=Vi,rootShouldForwardProp:r=Fi,slotShouldForwardProp:i=Fi}=e,o=e=>(0,Ee().A)((0,Dt().A)({},e,{theme:Hi((0,Dt().A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,he().internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:u,skipSx:c,overridesResolver:d=Gi(Wi(l))}=a,h=(0,jt().A)(a,Bi),p=s&&s.startsWith("Mui")||l?"components":"custom",f=void 0!==u?u:l&&"Root"!==l&&"root"!==l||!1,g=c||!1;let m=Fi;"Root"===l||"root"===l?m=r:l?m=i:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const v=(0,he().default)(e,(0,Dt().A)({shouldForwardProp:m,label:void 0},h)),y=e=>"function"===typeof e&&e.__emotion_real!==e||(0,He().Q)(e)?r=>{const i=Hi({theme:r.theme,defaultTheme:n,themeId:t});return Ui(e,(0,Dt().A)({},r,{theme:i}),i.modularCssLayers?p:void 0)}:e,x=function(r){let i=y(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];const c=l?l.map(y):[];s&&d&&c.push(e=>{const r=Hi((0,Dt().A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach(t=>{let[n,i]=t;o[n]=Ui(i,(0,Dt().A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),d(e,o)}),s&&!f&&c.push(e=>{var r;const i=Hi((0,Dt().A)({},e,{defaultTheme:n,themeId:t}));return Ui({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,Dt().A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),g||c.push(o);const h=c.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=v(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return v.withConfig&&(x.withConfig=v.withConfig),x}}(),Yi=["className","component","disableGutters","fixed","maxWidth","classes"],qi=(0,Se().A)(),Zi=Xi("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,Oe().A)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),Ki=e=>Ni({props:e,name:"MuiContainer",defaultTheme:qi});const Qi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=Zi,useThemeProps:n=Ki,componentName:r="MuiContainer"}=e,i=t(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})},e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce((e,n)=>{const r=n,i=t.breakpoints.values[r];return 0!==i&&(e[t.breakpoints.up(r)]={maxWidth:`${i}${t.breakpoints.unit}`}),e},{})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`}})}),o=St().forwardRef(function(e,t){const o=n(e),{className:a,component:s="div",disableGutters:l=!1,fixed:u=!1,maxWidth:c="lg"}=o,d=(0,jt().A)(o,Yi),h=(0,Dt().A)({},o,{component:s,disableGutters:l,fixed:u,maxWidth:c}),p=((e,t)=>{const{classes:n,fixed:r,disableGutters:i,maxWidth:o}=e,a={root:["root",o&&`maxWidth${(0,Oe().A)(String(o))}`,r&&"fixed",i&&"disableGutters"]};return(0,$e().A)(a,e=>(0,qe().Ay)(t,e),n)})(h,r);return(0,wt().jsx)(i,(0,Dt().A)({as:s,ownerState:h,className:(0,Pt().A)(p.root,a),ref:t},d))});return o}({createStyledComponent:(0,H().Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,U().A)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,_().b)({props:e,name:"MuiContainer"})}),Ji=Qi;const eo=function(e){return"string"===typeof e},to=["onChange","maxRows","minRows","style","value"];function no(e){return parseInt(e,10)||0}const ro={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function io(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const oo=St().forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,jt().A)(e,to),{current:l}=St().useRef(null!=a),u=St().useRef(null),c=(0,ut().A)(t,u),d=St().useRef(null),h=St().useRef(null),p=St().useCallback(()=>{const t=u.current,n=h.current;if(!t||!n)return;const o=(0,tt().A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=no(o.paddingBottom)+no(o.paddingTop),l=no(o.borderBottomWidth)+no(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-c)<=1}},[r,i,e.placeholder]),f=(0,lt().A)(()=>{const e=u.current,t=p();if(!e||!t||io(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),g=St().useCallback(()=>{const e=u.current,t=p();if(!e||!t||io(t))return;const n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[p]),m=St().useRef(-1);(0,st().A)(()=>{const e=(0,We().A)(g),t=null==u?void 0:u.current;if(!t)return;const n=(0,tt().A)(t);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(r=new ResizeObserver(()=>{f()&&(r.unobserve(t),cancelAnimationFrame(m.current),g(),m.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(m.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[p,g,f]),(0,st().A)(()=>{g()});return(0,wt().jsxs)(St().Fragment,{children:[(0,wt().jsx)("textarea",(0,Dt().A)({value:a,onChange:e=>{l||g(),n&&n(e)},ref:c,rows:i,style:o},s)),(0,wt().jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:(0,Dt().A)({},ro,o,{paddingTop:0,paddingBottom:0})})]})});function ao(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e),{})}const so=St().createContext(void 0);function lo(){return St().useContext(so)}function uo(e){const t=(0,he().internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}const co=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=Ei(r),o=n&&i[n]||i;let a="function"===typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>uo("function"===typeof e?e(o):e)):uo(a)),(0,wt().jsx)(ce().A,{styles:a})};const ho=function(e){return(0,wt().jsx)(co,(0,Dt().A)({},e,{defaultTheme:B().A,themeId:F().A}))};function po(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function fo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(po(e.value)&&""!==e.value||t&&po(e.defaultValue)&&""!==e.defaultValue)}function go(e){return(0,qe().Ay)("MuiInputBase",e)}const mo=(0,Ze().A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),vo=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],yo=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,U().A)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},xo=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},bo=(0,H().Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:yo})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${mo.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,Dt().A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),wo=(0,H().Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:xo})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,Dt().A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,Dt().A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${mo.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${mo.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})}),So=(0,wt().jsx)(ho,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),_o=St().forwardRef(function(e,t){var n;const r=(0,_().b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:u={},defaultValue:c,disabled:d,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:f=!1,id:g,inputComponent:m="input",inputProps:v={},inputRef:y,maxRows:x,minRows:b,multiline:w=!1,name:S,onBlur:A,onChange:k,onClick:C,onFocus:M,onKeyDown:I,onKeyUp:T,placeholder:D,readOnly:j,renderSuffix:P,rows:L,slotProps:R={},slots:E={},startAdornment:N,type:O="text",value:z}=r,B=(0,jt().A)(r,vo),F=null!=v.value?v.value:z,{current:$}=St().useRef(null!=F),V=St().useRef(),W=St().useCallback(e=>{0},[]),H=(0,se().A)(V,y,v.ref,W),[G,X]=St().useState(!1),Y=lo();const q=ao({props:r,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=Y?Y.focused:G,St().useEffect(()=>{!Y&&d&&G&&(X(!1),A&&A())},[Y,d,G,A]);const Z=Y&&Y.onFilled,K=Y&&Y.onEmpty,Q=St().useCallback(e=>{fo(e)?Z&&Z():K&&K()},[Z,K]);(0,oe().A)(()=>{$&&Q({value:F})},[F,Q,$]);St().useEffect(()=>{Q(V.current)},[]);let J=m,ee=v;w&&"input"===J&&(ee=L?(0,Dt().A)({type:void 0,minRows:L,maxRows:L},ee):(0,Dt().A)({type:void 0,maxRows:x,minRows:b},ee),J=oo);St().useEffect(()=>{Y&&Y.setAdornedStart(Boolean(N))},[Y,N]);const te=(0,Dt().A)({},r,{color:q.color||"primary",disabled:q.disabled,endAdornment:p,error:q.error,focused:q.focused,formControl:Y,fullWidth:f,hiddenLabel:q.hiddenLabel,multiline:w,size:q.size,startAdornment:N,type:O}),ne=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:h,startAdornment:p,type:f}=e,g={root:["root",`color${(0,U().A)(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&`size${(0,U().A)(h)}`,c&&"multiline",p&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",c&&"inputMultiline","small"===h&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return(0,$e().A)(g,go,t)})(te),re=E.root||l.Root||bo,ie=R.root||u.root||{},ae=E.input||l.Input||wo;return ee=(0,Dt().A)({},ee,null!=(n=R.input)?n:u.input),(0,wt().jsxs)(St().Fragment,{children:[!h&&So,(0,wt().jsxs)(re,(0,Dt().A)({},ie,!eo(re)&&{ownerState:(0,Dt().A)({},te,ie.ownerState)},{ref:t,onClick:e=>{V.current&&e.currentTarget===e.target&&V.current.focus(),C&&C(e)}},B,{className:(0,Pt().A)(ne.root,ie.className,s,j&&"MuiInputBase-readOnly"),children:[N,(0,wt().jsx)(so.Provider,{value:null,children:(0,wt().jsx)(ae,(0,Dt().A)({ownerState:te,"aria-invalid":q.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:c,disabled:q.disabled,id:g,onAnimationStart:e=>{Q("mui-auto-fill-cancel"===e.animationName?V.current:{value:"x"})},name:S,placeholder:D,readOnly:j,required:q.required,rows:L,value:F,onKeyDown:I,onKeyUp:T,type:O},ee,!eo(ae)&&{as:J,ownerState:(0,Dt().A)({},te,ee.ownerState)},{ref:H,className:(0,Pt().A)(ne.input,ee.className,j&&"MuiInputBase-readOnly"),onBlur:e=>{A&&A(e),v.onBlur&&v.onBlur(e),Y&&Y.onBlur?Y.onBlur(e):X(!1)},onChange:function(e){if(!$){const t=e.target||V.current;if(null==t)throw new Error((0,Xe().A)(1));Q({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),k&&k(e,...n)},onFocus:e=>{q.disabled?e.stopPropagation():(M&&M(e),v.onFocus&&v.onFocus(e),Y&&Y.onFocus?Y.onFocus(e):X(!0))}}))}),p,P?P((0,Dt().A)({},q,{startAdornment:N})):null]}))]})}),Ao=_o;function ko(e){return(0,qe().Ay)("MuiInput",e)}const Co=(0,Dt().A)({},mo,(0,Ze().A)("MuiInput",["root","underline","input"])),Mo=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Io=(0,H().Ay)(bo,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yo(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),(0,Dt().A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Co.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Co.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Co.disabled}, .${Co.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Co.disabled}:before`]:{borderBottomStyle:"dotted"}})}),To=(0,H().Ay)(wo,{name:"MuiInput",slot:"Input",overridesResolver:xo})({}),Do=St().forwardRef(function(e,t){var n,r,i,o;const a=(0,_().b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:u,fullWidth:c=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:g="text"}=a,m=(0,jt().A)(a,Mo),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,$e().A)(r,ko,t);return(0,Dt().A)({},t,i)})(a),y={root:{ownerState:{disableUnderline:s}}},x=(null!=p?p:u)?(0,He().A)(null!=p?p:u,y):y,b=null!=(n=null!=(r=f.root)?r:l.Root)?n:Io,w=null!=(i=null!=(o=f.input)?o:l.Input)?i:To;return(0,wt().jsx)(Ao,(0,Dt().A)({slots:{root:b,input:w},slotProps:x,fullWidth:c,inputComponent:d,multiline:h,ref:t,type:g},m,{classes:v}))});Do.muiName="Input";const jo=Do;function Po(e){return(0,qe().Ay)("MuiFilledInput",e)}const Lo=(0,Dt().A)({},mo,(0,Ze().A)("MuiFilledInput",["root","underline","input"])),Ro=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Eo=(0,H().Ay)(bo,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yo(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,Dt().A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},[`&.${Lo.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},[`&.${Lo.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Lo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Lo.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Lo.disabled}, .${Lo.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Lo.disabled}:before`]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,Dt().A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),No=(0,H().Ay)(wo,{name:"MuiFilledInput",slot:"Input",overridesResolver:xo})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),Oo=St().forwardRef(function(e,t){var n,r,i,o;const a=(0,_().b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:u=!1,inputComponent:c="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,g=(0,jt().A)(a,Ro),m=(0,Dt().A)({},a,{fullWidth:u,inputComponent:c,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,$e().A)(r,Po,t);return(0,Dt().A)({},t,i)})(a),y={root:{ownerState:m},input:{ownerState:m}},x=(null!=h?h:l)?(0,He().A)(y,null!=h?h:l):y,b=null!=(n=null!=(r=p.root)?r:s.Root)?n:Eo,w=null!=(i=null!=(o=p.input)?o:s.Input)?i:No;return(0,wt().jsx)(Ao,(0,Dt().A)({slots:{root:b,input:w},componentsProps:x,fullWidth:u,inputComponent:c,multiline:d,ref:t,type:f},g,{classes:v}))});Oo.muiName="Input";const zo=Oo;var Bo;const Fo=["children","classes","className","label","notched"],$o=(0,H().Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:$().A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Vo=(0,H().Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:$().A})(e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,Dt().A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))});function Wo(e){return(0,qe().Ay)("MuiOutlinedInput",e)}const Ho=(0,Dt().A)({},mo,(0,Ze().A)("MuiOutlinedInput",["root","notchedOutline","input"])),Go=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Uo=(0,H().Ay)(bo,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:yo})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,Dt().A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Ho.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ho.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${Ho.focused} .${Ho.notchedOutline}`]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},[`&.${Ho.error} .${Ho.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Ho.disabled} .${Ho.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,Dt().A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),Xo=(0,H().Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,jt().A)(e,Fo),o=null!=n&&""!==n,a=(0,Dt().A)({},e,{notched:r,withLabel:o});return(0,wt().jsx)($o,(0,Dt().A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,wt().jsx)(Vo,{ownerState:a,children:o?(0,wt().jsx)("span",{children:n}):Bo||(Bo=(0,wt().jsx)("span",{className:"notranslate",children:"\u200b"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}}),Yo=(0,H().Ay)(wo,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:xo})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})}),qo=St().forwardRef(function(e,t){var n,r,i,o,a;const s=(0,_().b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:u=!1,inputComponent:c="input",label:d,multiline:h=!1,notched:p,slots:f={},type:g="text"}=s,m=(0,jt().A)(s,Go),v=(e=>{const{classes:t}=e,n=(0,$e().A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Wo,t);return(0,Dt().A)({},t,n)})(s),y=lo(),x=ao({props:s,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b=(0,Dt().A)({},s,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:h,size:x.size,type:g}),w=null!=(n=null!=(r=f.root)?r:l.Root)?n:Uo,S=null!=(i=null!=(o=f.input)?o:l.Input)?i:Yo;return(0,wt().jsx)(Ao,(0,Dt().A)({slots:{root:w,input:S},renderSuffix:e=>(0,wt().jsx)(Xo,{ownerState:b,className:v.notchedOutline,label:null!=d&&""!==d&&x.required?a||(a=(0,wt().jsxs)(St().Fragment,{children:[d,"\u2009","*"]})):d,notched:"undefined"!==typeof p?p:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:c,multiline:h,ref:t,type:g},m,{classes:(0,Dt().A)({},v,{notchedOutline:null})}))});qo.muiName="Input";const Zo=qo;function Ko(e){return(0,qe().Ay)("MuiFormLabel",e)}const Qo=(0,Ze().A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Jo=["children","className","color","component","disabled","error","filled","focused","required"],ea=(0,H().Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Dt().A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Qo.focused}`]:{color:(t.vars||t).palette[n.color].main},[`&.${Qo.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Qo.error}`]:{color:(t.vars||t).palette.error.main}})}),ta=(0,H().Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{[`&.${Qo.error}`]:{color:(t.vars||t).palette.error.main}}}),na=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,jt().A)(n,Jo),s=ao({props:n,muiFormControl:lo(),states:["color","required","focused","disabled","error","filled"]}),l=(0,Dt().A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),u=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root",`color${(0,U().A)(n)}`,i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,$e().A)(l,Ko,t)})(l);return(0,wt().jsxs)(ea,(0,Dt().A)({as:o,ownerState:l,className:(0,Pt().A)(u.root,i),ref:t},a,{children:[r,s.required&&(0,wt().jsxs)(ta,{ownerState:l,"aria-hidden":!0,className:u.asterisk,children:["\u2009","*"]})]}))});function ra(e){return(0,qe().Ay)("MuiInputLabel",e)}(0,Ze().A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const ia=["disableAnimation","margin","shrink","variant","className"],oa=(0,H().Ay)(na,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Qo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,Dt().A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,Dt().A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,Dt().A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))}),aa=St().forwardRef(function(e,t){const n=(0,_().b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,jt().A)(n,ia),s=lo();let l=i;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const u=ao({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),c=(0,Dt().A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&`size${(0,U().A)(r)}`,a],asterisk:[s&&"asterisk"]},u=(0,$e().A)(l,ra,t);return(0,Dt().A)({},t,u)})(c);return(0,wt().jsx)(oa,(0,Dt().A)({"data-shrink":l,ownerState:c,ref:t,className:(0,Pt().A)(d.root,o)},a,{classes:d}))});function sa(e){return(0,qe().Ay)("MuiFormControl",e)}(0,Ze().A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const la=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ua=(0,H().Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Dt().A)({},t.root,t[`margin${(0,U().A)(n.margin)}`],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})}),ca=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:u,fullWidth:c=!1,hiddenLabel:d=!1,margin:h="none",required:p=!1,size:f="medium",variant:g="outlined"}=n,m=(0,jt().A)(n,la),v=(0,Dt().A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:c,hiddenLabel:d,margin:h,required:p,size:f,variant:g}),y=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&`margin${(0,U().A)(n)}`,r&&"fullWidth"]};return(0,$e().A)(i,sa,t)})(v),[x,b]=St().useState(()=>{let e=!1;return r&&St().Children.forEach(r,t=>{if(!(0,Q().A)(t,["Input","Select"]))return;const n=(0,Q().A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[w,S]=St().useState(()=>{let e=!1;return r&&St().Children.forEach(r,t=>{(0,Q().A)(t,["Input","Select"])&&(fo(t.props,!0)||fo(t.props.inputProps,!0))&&(e=!0)}),e}),[A,k]=St().useState(!1);s&&A&&k(!1);const C=void 0===u||s?A:u;let M;const I=St().useMemo(()=>({adornedStart:x,setAdornedStart:b,color:o,disabled:s,error:l,filled:w,focused:C,fullWidth:c,hiddenLabel:d,size:f,onBlur:()=>{k(!1)},onEmpty:()=>{S(!1)},onFilled:()=>{S(!0)},onFocus:()=>{k(!0)},registerEffect:M,required:p,variant:g}),[x,o,s,l,w,C,c,d,M,p,f,g]);return(0,wt().jsx)(so.Provider,{value:I,children:(0,wt().jsx)(ua,(0,Dt().A)({as:a,ownerState:v,className:(0,Pt().A)(y.root,i),ref:t},m,{children:r}))})});function da(e){return(0,qe().Ay)("MuiFormHelperText",e)}const ha=(0,Ze().A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var pa;const fa=["children","className","component","disabled","error","filled","focused","margin","required","variant"],ga=(0,H().Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,U().A)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ha.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${ha.error}`]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),ma=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,jt().A)(n,fa),s=ao({props:n,muiFormControl:lo(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,Dt().A)({},n,{component:o,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),u=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,u={root:["root",i&&"disabled",o&&"error",r&&`size${(0,U().A)(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,$e().A)(u,da,t)})(l);return(0,wt().jsx)(ga,(0,Dt().A)({as:o,ownerState:l,className:(0,Pt().A)(u.root,i),ref:t},a,{children:" "===r?pa||(pa=(0,wt().jsx)("span",{className:"notranslate",children:"\u200b"})):r}))});function va(e){var t;return parseInt(St().version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}const ya=St().createContext();const xa=()=>{const e=St().useContext(ya);return null!=e&&e};const ba=function(e,t,n){return void 0===e||eo(e)?t:(0,Dt().A)({},t,{ownerState:(0,Dt().A)({},t.ownerState,n)})};const wa=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n};const Sa=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t])).forEach(n=>{t[n]=e[n]}),t};const _a=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=(0,Pt().A)(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,Dt().A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,Dt().A)({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=wa((0,Dt().A)({},i,r)),s=Sa(r),l=Sa(i),u=t(a),c=(0,Pt().A)(null==u?void 0:u.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=(0,Dt().A)({},null==u?void 0:u.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),h=(0,Dt().A)({},u,n,l,s);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}};const Aa=function(e,t,n){return"function"===typeof e?e(t,n):e},ka=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const Ca=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,jt().A)(e,ka),s=o?{}:Aa(r,i),{props:l,internalRef:u}=_a((0,Dt().A)({},a,{externalSlotProps:s})),c=(0,ut().A)(u,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return ba(n,(0,Dt().A)({},l,{ref:c}),i)};const Ma=St().createContext({});function Ia(e){return(0,qe().Ay)("MuiList",e)}(0,Ze().A)("MuiList",["root","padding","dense","subheader"]);const Ta=["children","className","component","dense","disablePadding","subheader"],Da=(0,H().Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),ja=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,u=(0,jt().A)(n,Ta),c=St().useMemo(()=>({dense:a}),[a]),d=(0,Dt().A)({},n,{component:o,dense:a,disablePadding:s}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,o={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,$e().A)(o,Ia,t)})(d);return(0,wt().jsx)(Ma.Provider,{value:c,children:(0,wt().jsxs)(Da,(0,Dt().A)({as:o,className:(0,Pt().A)(h.root,i),ref:t,ownerState:d},u,{children:[l,r]}))})});function Pa(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const La=Pa,Ra=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Ea(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Na(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Oa(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function za(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Oa(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const Ba=St().forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:u,variant:c="selectedMenu"}=e,d=(0,jt().A)(e,Ra),h=St().useRef(null),p=St().useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,oe().A)(()=>{r&&h.current.focus()},[r]),St().useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&r){const t=`${La((0,J().A)(e))}px`;h.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,h.current.style.width=`calc(100% + ${t})`}return h.current}}),[]);const f=(0,se().A)(h,t);let g=-1;St().Children.forEach(o,(e,t)=>{St().isValidElement(e)?(e.props.disabled||("selectedMenu"===c&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))):g===t&&(g+=1,g>=o.length&&(g=-1))});const m=St().Children.map(o,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===c&&(t.tabIndex=0),St().cloneElement(e,t)}return e});return(0,wt().jsx)(ja,(0,Dt().A)({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=h.current,n=e.key,r=(0,J().A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),za(t,r,l,s,Ea);else if("ArrowUp"===n)e.preventDefault(),za(t,r,l,s,Na);else if("Home"===n)e.preventDefault(),za(t,null,l,s,Ea);else if("End"===n)e.preventDefault(),za(t,null,l,s,Na);else if(1===n.length){const i=p.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const l=r&&!i.repeating&&Oa(r,i);i.previousKeyMatched&&(l||za(t,r,!1,s,Ea,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},d,{children:m}))}),Fa=Ba;function $a(e,t){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$a(e,t)}function Va(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$a(e,t)}const Wa=!1,Ha=St().createContext(null);var Ga="unmounted",Ua="exited",Xa="entering",Ya="entered",qa="exiting",Za=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Ua,r.appearStatus=Xa):i=Ya:i=t.unmountOnExit||t.mountOnEnter?Ga:Ua,r.state={status:i},r.nextCallback=null,r}Va(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ga?{status:Ua}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Xa&&n!==Ya&&(t=Xa):n!==Xa&&n!==Ya||(t=qa)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Xa){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:vt().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ua&&this.setState({status:Ga})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[vt().findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Wa?this.safeSetState({status:Ya},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:Xa},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Ya},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:vt().findDOMNode(this);t&&!Wa?(this.props.onExit(r),this.safeSetState({status:qa},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ua},function(){e.props.onExited(r)})})})):this.safeSetState({status:Ua},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:vt().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ga)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,jt().A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return St().createElement(Ha.Provider,{value:null},"function"===typeof n?n(e,r):St().cloneElement(St().Children.only(n),r))},t}(St().Component);function Ka(){}Za.contextType=Ha,Za.propTypes={},Za.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ka,onEntering:Ka,onEntered:Ka,onExit:Ka,onExiting:Ka,onExited:Ka},Za.UNMOUNTED=Ga,Za.EXITED=Ua,Za.ENTERING=Xa,Za.ENTERED=Ya,Za.EXITING=qa;const Qa=Za;function Ja(){const e=Ei(B().A);return e[F().A]||e}const es=e=>e.scrollTop;function ts(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"===typeof o?o[t.mode]:o,delay:a.transitionDelay}}const ns=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function rs(e){return`scale(${e}, ${e**2})`}const is={entering:{opacity:1,transform:rs(1)},entered:{opacity:1,transform:"none"}},os="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),as=St().forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:u,onExit:c,onExited:d,onExiting:h,style:p,timeout:f="auto",TransitionComponent:g=Qa}=e,m=(0,jt().A)(e,ns),v=(0,ft().A)(),y=St().useRef(),x=Ja(),b=St().useRef(null),w=(0,se().A)(b,va(i),t),S=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},_=S(u),A=S((e,t)=>{es(e);const{duration:n,delay:r,easing:i}=ts({style:p,timeout:f,easing:o},{mode:"enter"});let a;"auto"===f?(a=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:r}),x.transitions.create("transform",{duration:os?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),k=S(l),C=S(h),M=S(e=>{const{duration:t,delay:n,easing:r}=ts({style:p,timeout:f,easing:o},{mode:"exit"});let i;"auto"===f?(i=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:os?i:.666*i,delay:os?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=rs(.75),c&&c(e)}),I=S(d);return(0,wt().jsx)(g,(0,Dt().A)({appear:r,in:a,nodeRef:b,onEnter:A,onEntered:k,onEntering:_,onExit:M,onExited:I,onExiting:C,addEndListener:e=>{"auto"===f&&v.start(y.current||0,e),n&&n(b.current,e)},timeout:"auto"===f?null:f},m,{children:(e,t)=>St().cloneElement(i,(0,Dt().A)({style:(0,Dt().A)({opacity:0,transform:rs(.75),visibility:"exited"!==e||a?void 0:"hidden"},is[e],p,i.props.style),ref:w},t))}))});as.muiSupportAuto=!0;const ss=as,ls=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function us(e){const t=[],n=[];return Array.from(e.querySelectorAll(ls)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function cs(){return!0}const ds=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=us,isEnabled:a=cs,open:s}=e,l=St().useRef(!1),u=St().useRef(null),c=St().useRef(null),d=St().useRef(null),h=St().useRef(null),p=St().useRef(!1),f=St().useRef(null),g=(0,ut().A)(va(t),f),m=St().useRef(null);St().useEffect(()=>{s&&f.current&&(p.current=!n)},[n,s]),St().useEffect(()=>{if(!s||!f.current)return;const e=(0,et().A)(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),St().useEffect(()=>{if(!s||!f.current)return;const e=(0,et().A)(f.current),t=t=>{m.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(l.current=!0,c.current&&c.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==c.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!p.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==c.current||(n=o(f.current)),n.length>0){var i,s;const e=Boolean((null==(i=m.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=m.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const v=e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0};return(0,wt().jsxs)(St().Fragment,{children:[(0,wt().jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),St().cloneElement(t,{ref:g,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,wt().jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelEnd"})]})};const hs=St().forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=St().useState(null),s=(0,ut().A)(St().isValidElement(n)?va(n):null,t);if((0,st().A)(()=>{i||a(function(e){return"function"===typeof e?e():e}(r)||document.body)},[r,i]),(0,st().A)(()=>{if(o&&!i)return(0,it().A)(t,o),()=>{(0,it().A)(t,null)}},[t,o,i]),i){if(St().isValidElement(n)){const e={ref:s};return St().cloneElement(n,e)}return(0,wt().jsx)(St().Fragment,{children:n})}return(0,wt().jsx)(St().Fragment,{children:o?vt().createPortal(n,o):o})}),ps=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],fs={entering:{opacity:1},entered:{opacity:1}},gs=St().forwardRef(function(e,t){const n=Ja(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:u,onEntered:c,onEntering:d,onExit:h,onExited:p,onExiting:f,style:g,timeout:m=r,TransitionComponent:v=Qa}=e,y=(0,jt().A)(e,ps),x=St().useRef(null),b=(0,se().A)(x,va(a),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=w(d),_=w((e,t)=>{es(e);const r=ts({style:g,timeout:m,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),A=w(c),k=w(f),C=w(e=>{const t=ts({style:g,timeout:m,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)}),M=w(p);return(0,wt().jsx)(v,(0,Dt().A)({appear:o,in:l,nodeRef:x,onEnter:_,onEntered:A,onEntering:S,onExit:C,onExited:M,onExiting:k,addEndListener:e=>{i&&i(x.current,e)},timeout:m},y,{children:(e,t)=>St().cloneElement(a,(0,Dt().A)({style:(0,Dt().A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},fs[e],g,a.props.style),ref:b},t))}))});function ms(e){return(0,qe().Ay)("MuiBackdrop",e)}(0,Ze().A)("MuiBackdrop",["root","invisible"]);const vs=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ys=(0,H().Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})}),xs=St().forwardRef(function(e,t){var n,r,i;const o=(0,_().b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:u={},componentsProps:c={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:g=gs,transitionDuration:m}=o,v=(0,jt().A)(o,vs),y=(0,Dt().A)({},o,{component:l,invisible:d}),x=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,$e().A)(r,ms,t)})(y),b=null!=(n=p.root)?n:c.root;return(0,wt().jsx)(g,(0,Dt().A)({in:h,timeout:m},v,{children:(0,wt().jsx)(ys,(0,Dt().A)({"aria-hidden":!0},b,{as:null!=(r=null!=(i=f.root)?i:u.Root)?r:l,className:(0,Pt().A)(x.root,s,null==b?void 0:b.className),ownerState:(0,Dt().A)({},y,null==b?void 0:b.ownerState),classes:x,ref:t,children:a}))}))});function bs(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ws(e){return parseInt((0,tt().A)(e).getComputedStyle(e).paddingRight,10)||0}function Ss(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&bs(e,i)})}function _s(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function As(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,et().A)(e);return t.body===e?(0,tt().A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Pa((0,et().A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ws(r)+e}px`;const t=(0,et().A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${ws(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,et().A)(r).body;else{const t=r.parentElement,n=(0,tt().A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}const ks=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&bs(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Ss(t,e.mount,e.modalRef,r,!0);const i=_s(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=_s(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=As(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=_s(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&bs(e.modalRef,t),Ss(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&bs(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const Cs=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=ks,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:d}=e,h=St().useRef({}),p=St().useRef(null),f=St().useRef(null),g=(0,ut().A)(f,d),[m,v]=St().useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const b=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),w=()=>{i.mount(b(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=(0,lt().A)(()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,et().A)(p.current).body;i.add(b(),e),f.current&&w()}),_=St().useCallback(()=>i.isTopModal(b()),[i]),A=(0,lt().A)(e=>{p.current=e,e&&(c&&_()?w():f.current&&bs(f.current,x))}),k=St().useCallback(()=>{i.remove(b(),x)},[x,i]);St().useEffect(()=>()=>{k()},[k]),St().useEffect(()=>{c?S():y&&o||k()},[c,k,y,o,S]);const C=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&_()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},M=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=wa(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,Dt().A)({},n,t);return(0,Dt().A)({role:"presentation"},r,{onKeyDown:C(r),ref:g})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Dt().A)({"aria-hidden":!0},e,{onClick:M(e),open:c})},getTransitionProps:()=>({onEnter:(0,Ve().A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,Ve().A)(()=>{v(!0),s&&s(),o&&k()},null==l?void 0:l.props.onExited)}),rootRef:g,portalRef:A,isTopModal:_,exited:m,hasTransition:y}};function Ms(e){return(0,qe().Ay)("MuiModal",e)}(0,Ze().A)("MuiModal",["root","hidden","backdrop"]);const Is=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Ts=(0,H().Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),Ds=(0,H().Ay)(xs,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),js=St().forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,_().b)({name:"MuiModal",props:e}),{BackdropComponent:u=Ds,BackdropProps:c,className:d,closeAfterTransition:h=!1,children:p,container:f,component:g,components:m={},componentsProps:v={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:A=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:M,open:I,slotProps:T,slots:D}=l,j=(0,jt().A)(l,Is),P=(0,Dt().A)({},l,{closeAfterTransition:h,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:w,disableRestoreFocus:S,disableScrollLock:A,hideBackdrop:k,keepMounted:C}),{getRootProps:L,getBackdropProps:R,getTransitionProps:E,portalRef:N,isTopModal:O,exited:z,hasTransition:B}=Cs((0,Dt().A)({},P,{rootRef:t})),F=(0,Dt().A)({},P,{exited:z}),$=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,$e().A)(i,Ms,r)})(F),V={};if(void 0===p.props.tabIndex&&(V.tabIndex="-1"),B){const{onEnter:e,onExited:t}=E();V.onEnter=e,V.onExited=t}const W=null!=(n=null!=(r=null==D?void 0:D.root)?r:m.Root)?n:Ts,H=null!=(i=null!=(o=null==D?void 0:D.backdrop)?o:m.Backdrop)?i:u,G=null!=(a=null==T?void 0:T.root)?a:v.root,U=null!=(s=null==T?void 0:T.backdrop)?s:v.backdrop,X=Ca({elementType:W,externalSlotProps:G,externalForwardedProps:j,getSlotProps:L,additionalProps:{ref:t,as:g},ownerState:F,className:(0,Pt().A)(d,null==G?void 0:G.className,null==$?void 0:$.root,!F.open&&F.exited&&(null==$?void 0:$.hidden))}),Y=Ca({elementType:H,externalSlotProps:U,additionalProps:c,getSlotProps:e=>R((0,Dt().A)({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,Pt().A)(null==U?void 0:U.className,null==c?void 0:c.className,null==$?void 0:$.backdrop),ownerState:F});return C||I||B&&!z?(0,wt().jsx)(hs,{ref:N,container:f,disablePortal:w,children:(0,wt().jsxs)(W,(0,Dt().A)({},X,{children:[!k&&u?(0,wt().jsx)(H,(0,Dt().A)({},Y)):null,(0,wt().jsx)(ds,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:S,isEnabled:O,open:I,children:St().cloneElement(p,V)})]}))}):null}),Ps=js,Ls=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Rs(e){return(0,qe().Ay)("MuiPaper",e)}(0,Ze().A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Es=["className","component","elevation","square","variant"],Ns=(0,H().Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(e=>{let{theme:t,ownerState:n}=e;var r;return(0,Dt().A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===n.variant&&(0,Dt().A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${(0,pe().X4)("#fff",Ls(n.elevation))}, ${(0,pe().X4)("#fff",Ls(n.elevation))})`},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),Os=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,jt().A)(n,Es),u=(0,Dt().A)({},n,{component:i,elevation:o,square:a,variant:s}),c=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,$e().A)(o,Rs,i)})(u);return(0,wt().jsx)(Ns,(0,Dt().A)({as:i,ownerState:u,className:(0,Pt().A)(c.root,r),ref:t},l))});function zs(e){return(0,qe().Ay)("MuiPopover",e)}(0,Ze().A)("MuiPopover",["root","paper"]);const Bs=["onEntering"],Fs=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],$s=["slotProps"];function Vs(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ws(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Hs(e){return[e.horizontal,e.vertical].map(e=>"number"===typeof e?`${e}px`:e).join(" ")}function Gs(e){return"function"===typeof e?e():e}const Us=(0,H().Ay)(Ps,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Xs=(0,H().Ay)(Os,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Ys=St().forwardRef(function(e,t){var n,r,i;const o=(0,_().b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:d,className:h,container:p,elevation:f=8,marginThreshold:g=16,open:m,PaperProps:v={},slots:y,slotProps:x,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:w=ss,transitionDuration:S="auto",TransitionProps:{onEntering:A}={},disableScrollLock:k=!1}=o,C=(0,jt().A)(o.TransitionProps,Bs),M=(0,jt().A)(o,Fs),I=null!=(n=null==x?void 0:x.paper)?n:v,T=St().useRef(),D=(0,se().A)(T,I.ref),j=(0,Dt().A)({},o,{anchorOrigin:l,anchorReference:c,elevation:f,marginThreshold:g,externalPaperSlotProps:I,transformOrigin:b,TransitionComponent:w,transitionDuration:S,TransitionProps:C}),P=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"],paper:["paper"]},zs,t)})(j),L=St().useCallback(()=>{if("anchorPosition"===c)return u;const e=Gs(s),t=(e&&1===e.nodeType?e:(0,J().A)(T.current).body).getBoundingClientRect();return{top:t.top+Vs(t,l.vertical),left:t.left+Ws(t,l.horizontal)}},[s,l.horizontal,l.vertical,u,c]),R=St().useCallback(e=>({vertical:Vs(e,b.vertical),horizontal:Ws(e,b.horizontal)}),[b.horizontal,b.vertical]),E=St().useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=R(t);if("none"===c)return{top:null,left:null,transformOrigin:Hs(n)};const r=L();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,u=(0,ee().A)(Gs(s)),d=u.innerHeight-g,h=u.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(l>h){const e=l-h;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:Hs(n)}},[s,c,L,R,g]),[N,O]=St().useState(m),z=St().useCallback(()=>{const e=T.current;if(!e)return;const t=E(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)},[E]);St().useEffect(()=>(k&&window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z)),[s,k,z]);St().useEffect(()=>{m&&z()}),St().useImperativeHandle(a,()=>m?{updatePosition:()=>{z()}}:null,[m,z]),St().useEffect(()=>{if(!m)return;const e=(0,q().A)(()=>{z()}),t=(0,ee().A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,m,z]);let B=S;"auto"!==S||w.muiSupportAuto||(B=void 0);const F=p||(s?(0,J().A)(Gs(s)).body:void 0),$=null!=(r=null==y?void 0:y.root)?r:Us,V=null!=(i=null==y?void 0:y.paper)?i:Xs,W=Ca({elementType:V,externalSlotProps:(0,Dt().A)({},I,{style:N?I.style:(0,Dt().A)({},I.style,{opacity:0})}),additionalProps:{elevation:f,ref:D},ownerState:j,className:(0,Pt().A)(P.paper,null==I?void 0:I.className)}),H=Ca({elementType:$,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:M,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:m},ownerState:j,className:(0,Pt().A)(P.root,h)}),{slotProps:G}=H,U=(0,jt().A)(H,$s);return(0,wt().jsx)($,(0,Dt().A)({},U,!eo($)&&{slotProps:G,disableScrollLock:k},{children:(0,wt().jsx)(w,(0,Dt().A)({appear:!0,in:m,onEntering:(e,t)=>{A&&A(e,t),z()},onExited:()=>{O(!1)},timeout:B},C,{children:(0,wt().jsx)(V,(0,Dt().A)({},W,{children:d}))}))}))});function qs(e){return(0,qe().Ay)("MuiMenu",e)}(0,Ze().A)("MuiMenu",["root","paper","list"]);const Zs=["onEntering"],Ks=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Qs={vertical:"top",horizontal:"right"},Js={vertical:"top",horizontal:"left"},el=(0,H().Ay)(Ys,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tl=(0,H().Ay)(Xs,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),nl=(0,H().Ay)(Fa,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),rl=St().forwardRef(function(e,t){var n,r;const i=(0,_().b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:u={},onClose:c,open:d,PaperProps:h={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:g}={},variant:m="selectedMenu",slots:v={},slotProps:y={}}=i,x=(0,jt().A)(i.TransitionProps,Zs),b=(0,jt().A)(i,Ks),w=xa(),S=(0,Dt().A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:u,onEntering:g,PaperProps:h,transitionDuration:f,TransitionProps:x,variant:m}),A=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"],paper:["paper"],list:["list"]},qs,t)})(S),k=o&&!l&&d,C=St().useRef(null);let M=-1;St().Children.map(a,(e,t)=>{St().isValidElement(e)&&(e.props.disabled||("selectedMenu"===m&&e.props.selected||-1===M)&&(M=t))});const I=null!=(n=v.paper)?n:tl,T=null!=(r=y.paper)?r:h,D=Ca({elementType:v.root,externalSlotProps:y.root,ownerState:S,className:[A.root,s]}),j=Ca({elementType:I,externalSlotProps:T,ownerState:S,className:A.paper});return(0,wt().jsx)(el,(0,Dt().A)({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Qs:Js,slots:{paper:I,root:v.root},slotProps:{root:D,paper:j},open:d,ref:t,transitionDuration:f,TransitionProps:(0,Dt().A)({onEntering:(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:S},b,{classes:p,children:(0,wt().jsx)(nl,(0,Dt().A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:C,autoFocus:o&&(-1===M||l),autoFocusItem:k,variant:m},u,{className:(0,Pt().A)(A.list,u.className),children:a}))}))});function il(e){return(0,qe().Ay)("MuiNativeSelect",e)}const ol=(0,Ze().A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),al=["className","disabled","error","IconComponent","inputRef","variant"],sl=e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,Dt().A)({},n.vars?{backgroundColor:`rgba(${n.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${ol.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},ll=(0,H().Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:$().A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${ol.multiple}`]:t.multiple}]}})(sl),ul=e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,[`&.${ol.disabled}`]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},cl=(0,H().Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,U().A)(n.variant)}`],n.open&&t.iconOpen]}})(ul),dl=St().forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,jt().A)(e,al),u=(0,Dt().A)({},e,{disabled:r,variant:s,error:i}),c=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${(0,U().A)(n)}`,o&&"iconOpen",r&&"disabled"]};return(0,$e().A)(s,il,t)})(u);return(0,wt().jsxs)(St().Fragment,{children:[(0,wt().jsx)(ll,(0,Dt().A)({ownerState:u,className:(0,Pt().A)(c.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,wt().jsx)(cl,{as:o,ownerState:u,className:c.icon})]})});function hl(e){return(0,qe().Ay)("MuiSelect",e)}const pl=(0,Ze().A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var fl;const gl=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],ml=(0,H().Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${pl.select}`]:t.select},{[`&.${pl.select}`]:t[n.variant]},{[`&.${pl.error}`]:t.error},{[`&.${pl.multiple}`]:t.multiple}]}})(sl,{[`&.${pl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),vl=(0,H().Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,U().A)(n.variant)}`],n.open&&t.iconOpen]}})(ul),yl=(0,H().Ay)("input",{shouldForwardProp:e=>(0,W().A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function xl(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function bl(e){return null==e||"string"===typeof e&&!e.trim()}const wl=St().forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:h,error:p=!1,IconComponent:f,inputRef:g,labelId:m,MenuProps:v={},multiple:y,name:x,onBlur:b,onChange:w,onClose:S,onFocus:_,onOpen:A,open:k,readOnly:C,renderValue:M,SelectDisplayProps:I={},tabIndex:T,value:D,variant:j="standard"}=e,P=(0,jt().A)(e,gl),[L,R]=(0,ie().A)({controlled:D,default:c,name:"Select"}),[E,N]=(0,ie().A)({controlled:k,default:u,name:"Select"}),O=St().useRef(null),z=St().useRef(null),[B,F]=St().useState(null),{current:$}=St().useRef(null!=k),[V,W]=St().useState(),H=(0,se().A)(t,g),G=St().useCallback(e=>{z.current=e,e&&F(e)},[]),X=null==B?void 0:B.parentNode;St().useImperativeHandle(H,()=>({focus:()=>{z.current.focus()},node:O.current,value:L}),[L]),St().useEffect(()=>{u&&E&&B&&!$&&(W(a?null:X.clientWidth),z.current.focus())},[B,a]),St().useEffect(()=>{o&&z.current.focus()},[o]),St().useEffect(()=>{if(!m)return;const e=(0,J().A)(z.current).getElementById(m);if(e){const t=()=>{getSelection().isCollapsed&&z.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[m]);const Y=(e,t)=>{e?A&&A(t):S&&S(t),$||(W(a?null:X.clientWidth),N(e))},q=St().Children.toArray(s),Z=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(L)?L.slice():[];const t=L.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),L!==n&&(R(n),w)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:x}}),w(i,e)}y||Y(!1,t)}},K=null!==B&&E;let Q,ee;delete P["aria-invalid"];const te=[];let ne=!1,re=!1;(fo({value:L})||h)&&(M?Q=M(L):ne=!0);const oe=q.map(e=>{if(!St().isValidElement(e))return null;let t;if(y){if(!Array.isArray(L))throw new Error((0,Xe().A)(2));t=L.some(t=>xl(t,e.props.value)),t&&ne&&te.push(e.props.children)}else t=xl(L,e.props.value),t&&ne&&(ee=e.props.children);return t&&(re=!0),St().cloneElement(e,{"aria-selected":t?"true":"false",onClick:Z(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});ne&&(Q=y?0===te.length?null:te.reduce((e,t,n)=>(e.push(t),n<te.length-1&&e.push(", "),e),[]):ee);let ae,le=V;!a&&$&&B&&(le=X.clientWidth),ae="undefined"!==typeof T?T:d?null:0;const ue=I.id||(x?`mui-component-select-${x}`:void 0),ce=(0,Dt().A)({},e,{variant:j,value:L,open:K,error:p}),de=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${(0,U().A)(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,$e().A)(s,hl,t)})(ce),he=(0,Dt().A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),pe=(0,ct().A)();return(0,wt().jsxs)(St().Fragment,{children:[(0,wt().jsx)(ml,(0,Dt().A)({ref:G,tabIndex:ae,role:"combobox","aria-controls":pe,"aria-disabled":d?"true":void 0,"aria-expanded":K?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[m,ue].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:d||C?null:e=>{0===e.button&&(e.preventDefault(),z.current.focus(),Y(!0,e))},onBlur:e=>{!K&&b&&(Object.defineProperty(e,"target",{writable:!0,value:{value:L,name:x}}),b(e))},onFocus:_},I,{ownerState:ce,className:(0,Pt().A)(I.className,de.select,l),id:ue,children:bl(Q)?fl||(fl=(0,wt().jsx)("span",{className:"notranslate",children:"\u200b"})):Q})),(0,wt().jsx)(yl,(0,Dt().A)({"aria-invalid":p,value:Array.isArray(L)?L.join(","):L,name:x,ref:O,"aria-hidden":!0,onChange:e=>{const t=q.find(t=>t.props.value===e.target.value);void 0!==t&&(R(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:d,className:de.nativeInput,autoFocus:o,ownerState:ce},P)),(0,wt().jsx)(vl,{as:f,className:de.icon,ownerState:ce}),(0,wt().jsx)(rl,(0,Dt().A)({id:`menu-${x||""}`,anchorEl:X,open:K,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,Dt().A)({"aria-labelledby":m,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:pe},v.MenuListProps),slotProps:(0,Dt().A)({},v.slotProps,{paper:(0,Dt().A)({},he,{style:(0,Dt().A)({minWidth:le},null!=he?he.style:null)})}),children:oe}))]})}),Sl=wl,_l=(0,Y().A)((0,wt().jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Al=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],kl=["root"],Cl={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,$().A)(e)&&"variant"!==e,slot:"Root"},Ml=(0,H().Ay)(jo,Cl)(""),Il=(0,H().Ay)(Zo,Cl)(""),Tl=(0,H().Ay)(zo,Cl)(""),Dl=St().forwardRef(function(e,t){const n=(0,_().b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:u=_l,id:c,input:d,inputProps:h,label:p,labelId:f,MenuProps:g,multiple:m=!1,native:v=!1,onClose:y,onOpen:x,open:b,renderValue:w,SelectDisplayProps:S,variant:A="outlined"}=n,k=(0,jt().A)(n,Al),C=v?dl:Sl,M=ao({props:n,muiFormControl:lo(),states:["variant","error"]}),I=M.variant||A,T=(0,Dt().A)({},n,{variant:I,classes:o}),D=(e=>{const{classes:t}=e;return t})(T),j=(0,jt().A)(D,kl),P=d||{standard:(0,wt().jsx)(Ml,{ownerState:T}),outlined:(0,wt().jsx)(Il,{label:p,ownerState:T}),filled:(0,wt().jsx)(Tl,{ownerState:T})}[I],L=(0,se().A)(t,va(P));return(0,wt().jsx)(St().Fragment,{children:St().cloneElement(P,(0,Dt().A)({inputComponent:C,inputProps:(0,Dt().A)({children:i,error:M.error,IconComponent:u,variant:I,type:void 0,multiple:m},v?{id:c}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:f,MenuProps:g,onClose:y,onOpen:x,open:b,renderValue:w,SelectDisplayProps:(0,Dt().A)({id:c},S)},h,{classes:h?(0,He().A)(j,h.classes):j},d?d.props.inputProps:{})},(m&&v||l)&&"outlined"===I?{notched:!0}:{},{ref:L,className:(0,Pt().A)(P.props.className,a,D.root)},!d&&{variant:I},k))})});Dl.muiName="Select";const jl=Dl;function Pl(e){return(0,qe().Ay)("MuiTextField",e)}(0,Ze().A)("MuiTextField",["root"]);const Ll=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Rl={standard:jo,filled:zo,outlined:Zo},El=(0,H().Ay)(ca,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Nl=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:g,inputProps:m,InputProps:v,inputRef:y,label:x,maxRows:b,minRows:w,multiline:S=!1,name:A,onBlur:k,onChange:C,onFocus:M,placeholder:I,required:T=!1,rows:D,select:j=!1,SelectProps:P,type:L,value:R,variant:E="outlined"}=n,N=(0,jt().A)(n,Ll),O=(0,Dt().A)({},n,{autoFocus:i,color:s,disabled:u,error:c,fullWidth:h,multiline:S,required:T,select:j,variant:E}),z=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},Pl,t)})(O);const B={};"outlined"===E&&(g&&"undefined"!==typeof g.shrink&&(B.notched=g.shrink),B.label=x),j&&(P&&P.native||(B.id=void 0),B["aria-describedby"]=void 0);const F=(0,ct().A)(f),$=p&&F?`${F}-helper-text`:void 0,V=x&&F?`${F}-label`:void 0,W=Rl[E],H=(0,wt().jsx)(W,(0,Dt().A)({"aria-describedby":$,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:h,multiline:S,name:A,rows:D,maxRows:b,minRows:w,type:L,value:R,id:F,inputRef:y,onBlur:k,onChange:C,onFocus:M,placeholder:I,inputProps:m},B,v));return(0,wt().jsxs)(El,(0,Dt().A)({className:(0,Pt().A)(z.root,a),disabled:u,error:c,fullWidth:h,ref:t,required:T,color:s,variant:E,ownerState:O},N,{children:[null!=x&&""!==x&&(0,wt().jsx)(aa,(0,Dt().A)({htmlFor:F,id:V},g,{children:x})),j?(0,wt().jsx)(jl,(0,Dt().A)({"aria-describedby":$,id:F,labelId:V,value:R,input:H},P,{children:o})):H,p&&(0,wt().jsx)(ma,(0,Dt().A)({id:$},d,{children:p}))]}))});function Ol(e,t){var n=Object.create(null);return e&&St().Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,St().isValidElement)(e)?t(e):e}(e)}),n}function zl(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Bl(e,t,n){var r=Ol(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if((0,St().isValidElement)(a)){var s=o in t,l=o in r,u=t[o],c=(0,St().isValidElement)(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&(0,St().isValidElement)(u)&&(i[o]=(0,St().cloneElement)(a,{onExited:n.bind(null,a),in:u.props.in,exit:zl(a,"exit",e),enter:zl(a,"enter",e)})):i[o]=(0,St().cloneElement)(a,{in:!1}):i[o]=(0,St().cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:zl(a,"exit",e),enter:zl(a,"enter",e)})}}),i}var Fl=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},$l=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Va(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Ol(n.children,function(e){return(0,St().cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:zl(e,"appear",n),enter:zl(e,"enter",n),exit:zl(e,"exit",n)})})):Bl(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Ol(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,Dt().A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,jt().A)(e,["component","childFactory"]),i=this.state.contextValue,o=Fl(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?St().createElement(Ha.Provider,{value:i},o):St().createElement(Ha.Provider,{value:i},St().createElement(t,r,o))},t}(St().Component);$l.propTypes={},$l.defaultProps={component:"div",childFactory:function(e){return e}};const Vl=$l;const Wl=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:u}=e,[c,d]=St().useState(!1),h=(0,Pt().A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},f=(0,Pt().A)(n.child,c&&n.childLeaving,r&&n.childPulsate);return s||c||d(!0),St().useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,u);return()=>{clearTimeout(e)}}},[l,s,u]),(0,wt().jsx)("span",{className:h,style:p,children:(0,wt().jsx)("span",{className:f})})};const Hl=(0,Ze().A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Gl=["center","classes","className"];let Ul,Xl,Yl,ql,Zl=e=>e;const Kl=(0,a().i7)(Ul||(Ul=Zl`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),Ql=(0,a().i7)(Xl||(Xl=Zl`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),Jl=(0,a().i7)(Yl||(Yl=Zl`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),eu=(0,H().Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),tu=(0,H().Ay)(Wl,{name:"MuiTouchRipple",slot:"Ripple"})(ql||(ql=Zl`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),Hl.rippleVisible,Kl,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Hl.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},Hl.child,Hl.childLeaving,Ql,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Hl.childPulsate,Jl,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),nu=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,jt().A)(n,Gl),[s,l]=St().useState([]),u=St().useRef(0),c=St().useRef(null);St().useEffect(()=>{c.current&&(c.current(),c.current=null)},[s]);const d=St().useRef(!1),h=(0,ft().A)(),p=St().useRef(null),f=St().useRef(null),g=St().useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,wt().jsx)(tu,{classes:{ripple:(0,Pt().A)(i.ripple,Hl.ripple),rippleVisible:(0,Pt().A)(i.rippleVisible,Hl.rippleVisible),ripplePulsate:(0,Pt().A)(i.ripplePulsate,Hl.ripplePulsate),child:(0,Pt().A)(i.child,Hl.child),childLeaving:(0,Pt().A)(i.childLeaving,Hl.childLeaving),childPulsate:(0,Pt().A)(i.childPulsate,Hl.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,c.current=a},[i]),m=St().useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:f.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,m;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(o)m=Math.sqrt((2*l.width**2+l.height**2)/3),m%2===0&&(m+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;m=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{g({pulsate:i,rippleX:u,rippleY:c,rippleSize:m,cb:n})},h.start(80,()=>{p.current&&(p.current(),p.current=null)})):g({pulsate:i,rippleX:u,rippleY:c,rippleSize:m,cb:n})},[r,g,h]),v=St().useCallback(()=>{m({},{pulsate:!0})},[m]),y=St().useCallback((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void h.start(0,()=>{y(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),c.current=t},[h]);return St().useImperativeHandle(t,()=>({pulsate:v,start:m,stop:y}),[v,m,y]),(0,wt().jsx)(eu,(0,Dt().A)({className:(0,Pt().A)(Hl.root,i.root,o),ref:f},a,{children:(0,wt().jsx)(Vl,{component:null,exit:!0,children:s})}))}),ru=nu;function iu(e){return(0,qe().Ay)("MuiButtonBase",e)}const ou=(0,Ze().A)("MuiButtonBase",["root","disabled","focusVisible"]),au=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],su=(0,H().Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ou.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),lu=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:p,onClick:f,onContextMenu:g,onDragLeave:m,onFocus:v,onFocusVisible:y,onKeyDown:x,onKeyUp:b,onMouseDown:w,onMouseLeave:S,onMouseUp:A,onTouchEnd:k,onTouchMove:C,onTouchStart:M,tabIndex:I=0,TouchRippleProps:T,touchRippleRef:D,type:j}=n,P=(0,jt().A)(n,au),L=St().useRef(null),R=St().useRef(null),E=(0,se().A)(R,D),{isFocusVisibleRef:N,onFocus:O,onBlur:z,ref:B}=(0,ue().A)(),[F,$]=St().useState(!1);l&&F&&$(!1),St().useImperativeHandle(r,()=>({focusVisible:()=>{$(!0),L.current.focus()}}),[]);const[V,W]=St().useState(!1);St().useEffect(()=>{W(!0)},[]);const H=V&&!u&&!l;function G(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;return(0,ae().A)(r=>{t&&t(r);return!n&&R.current&&R.current[e](r),!0})}St().useEffect(()=>{F&&d&&!u&&V&&R.current.pulsate()},[u,d,F,V]);const U=G("start",w),X=G("stop",g),Y=G("stop",m),q=G("stop",A),Z=G("stop",e=>{F&&e.preventDefault(),S&&S(e)}),K=G("start",M),Q=G("stop",k),J=G("stop",C),ee=G("stop",e=>{z(e),!1===N.current&&$(!1),p&&p(e)},!1),te=(0,ae().A)(e=>{L.current||(L.current=e.currentTarget),O(e),!0===N.current&&($(!0),y&&y(e)),v&&v(e)}),ne=()=>{const e=L.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},re=St().useRef(!1),ie=(0,ae().A)(e=>{d&&!re.current&&F&&R.current&&" "===e.key&&(re.current=!0,R.current.stop(e,()=>{R.current.start(e)})),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!l&&(e.preventDefault(),f&&f(e))}),oe=(0,ae().A)(e=>{d&&" "===e.key&&R.current&&F&&!e.defaultPrevented&&(re.current=!1,R.current.stop(e,()=>{R.current.pulsate(e)})),b&&b(e),f&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&f(e)});let le=s;"button"===le&&(P.href||P.to)&&(le=h);const ce={};"button"===le?(ce.type=void 0===j?"button":j,ce.disabled=l):(P.href||P.to||(ce.role="button"),l&&(ce["aria-disabled"]=l));const de=(0,se().A)(t,B,L);const he=(0,Dt().A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:I,focusVisible:F}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,$e().A)(o,iu,i);return n&&r&&(a.root+=` ${r}`),a})(he);return(0,wt().jsxs)(su,(0,Dt().A)({as:le,className:(0,Pt().A)(pe.root,a),ownerState:he,onBlur:ee,onClick:f,onContextMenu:X,onFocus:te,onKeyDown:ie,onKeyUp:oe,onMouseDown:U,onMouseLeave:Z,onMouseUp:q,onDragLeave:Y,onTouchEnd:Q,onTouchMove:J,onTouchStart:K,ref:de,tabIndex:l?-1:I,type:j},ce,P,{children:[o,H?(0,wt().jsx)(ru,(0,Dt().A)({ref:E,center:i},T)):null]}))});function uu(e){return(0,qe().Ay)("MuiButton",e)}const cu=(0,Ze().A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const du=St().createContext({});const hu=St().createContext(void 0),pu=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],fu=e=>(0,Dt().A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),gu=(0,H().Ay)(lu,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,U().A)(n.color)}`],t[`size${(0,U().A)(n.size)}`],t[`${n.variant}Size${(0,U().A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,Dt().A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,Dt().A)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:`1px solid ${(t.vars||t).palette[n.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,Dt().A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${cu.focusVisible}`]:(0,Dt().A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${cu.disabled}`]:(0,Dt().A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${(0,pe().X4)(t.palette[n.color].main,.5)}`},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cu.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cu.disabled}`]:{boxShadow:"none"}}}),mu=(0,H().Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,U().A)(n.size)}`]]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},fu(t))}),vu=(0,H().Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,U().A)(n.size)}`]]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},fu(t))}),yu=St().forwardRef(function(e,t){const n=St().useContext(du),r=St().useContext(hu),i=(0,rt().A)(n,e),o=(0,_().b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:u,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:g=!1,size:m="medium",startIcon:v,type:y,variant:x="text"}=o,b=(0,jt().A)(o,pu),w=(0,Dt().A)({},o,{color:s,component:l,disabled:c,disableElevation:d,disableFocusRipple:h,fullWidth:g,size:m,type:y,variant:x}),S=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,`${o}${(0,U().A)(t)}`,`size${(0,U().A)(i)}`,`${o}Size${(0,U().A)(i)}`,`color${(0,U().A)(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,U().A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,U().A)(i)}`]},l=(0,$e().A)(s,uu,a);return(0,Dt().A)({},a,l)})(w),A=v&&(0,wt().jsx)(mu,{className:S.startIcon,ownerState:w,children:v}),k=p&&(0,wt().jsx)(vu,{className:S.endIcon,ownerState:w,children:p}),C=r||"";return(0,wt().jsxs)(gu,(0,Dt().A)({ownerState:w,className:(0,Pt().A)(n.className,S.root,u,C),component:l,disabled:c,focusRipple:!h,focusVisibleClassName:(0,Pt().A)(S.focusVisible,f),ref:t,type:y},b,{classes:S,children:[A,a,k]}))}),xu=new Set(["double sell buy"]);function bu(e,t){var n,r;const i=e.isSell?(null===(n=e.sellSignal)||void 0===n?void 0:n.timestamp)||0:e.buySignal.timestamp,o=t.isSell?(null===(r=t.sellSignal)||void 0===r?void 0:r.timestamp)||0:t.buySignal.timestamp;return i!==o?i-o:e.isSell!==t.isSell?e.isSell?-1:1:-e.price+t.price}function wu(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5?arguments[5]:void 0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,s=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(0===n)return[e,[]];var l=t[0];const u=t[1],c=new Map,d=[];var h=null;const p=new Map,f=[];return[e.sort(bu).map(e=>({...e})).filter(e=>{const t=Math.floor(e.buySignal.timestamp/Cu);if(l<=0)return!1;if(null!=o&&!o.has(t))return!1;var g;const m=e.symbol+e.buySignal.strategy+e.buySignal.timestamp,v=Iu(e.symbol),y=null!=a?a:Du(v),x=!0!==e.reverse&&e.price<Tu?0:y;if(e.isSell){const n=!0===e.reverse?-1:1,r=c.get(m);if(null!=r){const i=r[0];r[2]-=e.volume,g=0,0===r[2]?(g=r[1],r[1]-=g):(g=v?Math.floor(e.volume*i):100*Math.floor(e.volume*i/100),r[1]-=g);const o=(e.price*n-x)*g;l+=o,e.volume=g,0===d.length||d[d.length-1][0]<t?d.push([t,o]):d[d.length-1][1]+=o;const a=(n*(e.price-e.buyPrice)-x)*g;if(r[4]+=a,0===r[1]){const e=r[3]>0?r[4]/r[3]:0,n=f.length;0===n||f[n-1][0]<t?f.push([t,e]):f[n-1][1]+=e}else console.log("no zero");return!0}}else{const o=!0===e.reverse?-1:1,a=e.buySignal.strategy+e.buySignal.timestamp;var b=n;if(i){const t=e.buySignal.extra;null!=t&&"betPercent"in t&&(b*=t.betPercent)}if(r&&d.length>1){const e=d.length,t=d[e-1],n=d[e-2];t[1]>0&&n[1]>0?b/=2:t[1]<0&&n[1]<0&&(b=Math.min(1,2*b))}var w=l*b/100;if(u&&(w/=Math.log10(l/1e4)),null!=h&&h[0]===a&&l>h[1]&&(w=h[1]),g=v?Math.floor(w/e.price):100*Math.floor(w/e.price/100),null!=h&&h[0]===a){const t=e.symbol.length;if(t>9){var S=null;if(s){const e=Array.from(p.values());if(e.length>0){g=e[0][1]}}else S=p.get(e.symbol[t-9]);null!=S&&([g]=S)}}if(g>0){const n=g/e.volume,r=e.price*o*g;c.set(m,[n,g,e.volume,Math.abs(r),0]),e.volume=g,l-=r,0===d.length||d[d.length-1][0]<t?d.push([t,-r]):d[d.length-1][1]-=r,null!=h&&h[0]===a||(p.clear(),h=[a,w,g]);const i=e.symbol.length;if(i>9){const t=e.symbol[i-9];p.has(t)||p.set(e.symbol[i-9],[g,e.volume])}return!0}}return!1}),f]}function Su(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const l=wu(e,[t,!1],n,r,i,null,a,null,s);if(o){return wu(e,[t,!1],n,r,i,new Set(l[1].filter(e=>e[1]>0).map(e=>e[0])),a,null,s)[0]}return l[0]}function _u(e,t){var n=0,r=0;const i=[];for(;n<e.length&&r<t.length;){const o=e[n],a=t[r];o[0]===a[0]?(i.push([o[0],[...a[1],...o[1]]]),n++,r++):o[0]<a[0]?(i.push(o),n++):(i.push([a[0],a[1]]),r++)}for(;n<e.length;)i.push(e[n++]);for(;r<t.length;){const e=t[r];i.push([e[0],e[1]]),r++}return i}const Au="manual buy";function ku(e){const t=new Map,n=[];return e.forEach(e=>{const n=e.runner,r=e.symbol.startsWith("O:")?100:1,i=t.get(n),o=0===e.side?e.qty*r*e.buyPrice:0,a=0===e.side?e.qty*r*(e.price-e.buyPrice):0,s=(1===e.side?1:-1)*e.qty;if(null==i){const r=n.split(":");t.set(n,[[o,a,s,parseFloat(r[r.length-3])],[e]])}else i[0][0]+=o,i[0][1]+=a,i[0][2]+=s,i[1].push(e)}),t.forEach((e,t)=>{const[r,i,o,a]=e[0];0===o&&n.push([[r,i,a],e[1]])}),n.sort((e,t)=>t[0][2]-e[0][2]),n}const Cu=864e5;function Mu(e,t){const n=t/390,r=e*(.5556+.4444*n)*(t>20?1:(80+t)/100)/n;return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?r/1e7:r}function Iu(e){return!e.startsWith("O:")}const Tu=.06;function Du(e){return e?.01:1.4/100}function ju(e,t,n){return e>0&&t>0?1e3*n/e/t:0}function Pu(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=[],o=e.length;if(o>0){var a=e[0],s=t(a);const d=Sc(null!=r?r:t(e[0])),h=null!=r?r:d+378e5;var l=d-198e5,u=1;if(s<l){for(var c=0;c<o;){const n=e[c];if(t(n)>=l){s=t(a=n),u=c+1;break}c++}c===o&&(u=c)}for(;l<s;)i.push(n(a,l)),l+=6e4;for(l=s;l<=h;){const a=e[u-1],s=u<o?e[u]:null;if(null==s||l<t(s))i.push(n(a,l));else if(i.push(s),u++,null!=r&&l>=r)break;l+=6e4}return i}return e}function Lu(e,t){return Pu(e,e=>e.t,(e,t)=>({o:e.o,c:e.o,h:e.o,l:e.o,t:t,v:0,vw:e.o}),t&&e.length>0?e[e.length-1].t:null)}function Ru(e){return"string"===typeof e?e:e+""}function Eu(){try{const e=localStorage.getItem("token");if(null!=e){const t=e.split("@"),n=JSON.parse(atob(t[0]));if("level"in n&&"expireAt"in n){const e=n.expireAt;if((new Date).getTime()/1e3<e){return n.level}}}}catch(oae){}return-1}const Nu="isWide";function Ou(){document.cookie="authorization=",localStorage.removeItem("token")}function zu(e){if("now2"in e)return e.now2;{const t=Object.entries(e);if(t.length>0){const e=function(e){if("number"===typeof e)return e;if("object"===typeof e&&"c"in e)return e.c;return 0}(t[0][1]);return e}return null}}const Bu=.001;function Fu(e){var t=null;return e.map(e=>{const n=Math.floor(e.t/Cu);return(null==t||t[0]<n)&&(t=[n,Sc(e.t),0]),e.t>=t[1]&&e.t<t[1]+234e5?(t[2]+=e.v,Mu(t[2],Math.floor((e.t-t[1])/6e4)+1,!1)):0})}const $u=new Map;function Vu(e){const t=new Date(e+"-04:00");if(!isNaN(t.getDay())){const e=t.getTime();return Ac(e)?e:e+36e5}return null}function Wu(e,t,n){const r=e.length;return r>t?e.slice(0,t):r<t?e.concat(Array.from({length:r-t}).map(e=>n())):e}function Hu(e,t){return t.reduce((e,t)=>{if(null!=e){if(t in e){const n=e[t];return"object"===typeof n?n:null}return null}return null},e)}async function Gu(e,t,n){const r=new URLSearchParams;r.set("command",e),r.set("params",t);const i=`${qu}/task?${r.toString()}`,o=await tc(i,n);return o}async function Uu(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=e.split(":"),o={taskId:e,strategy:i[i.length-1],subtype:"api clean",extra:{percent:n,symbol:t}},a=await Gu("clean_position",JSON.stringify(o),r);if("err"in a)return!1;if("s"in a)return!0===a.s;{const e=Hu(a,["d","data"]);return null!=e&&"s"in e&&!0===e.s}}async function Xu(e){return new Promise((t,n)=>setTimeout(()=>t(1),e))}const Yu=new class{constructor(){this.callbacks=new Map,this.uid=0}addCallBack(e){this.uid++;const t="u-"+this.uid;return this.callbacks.set(t,e),t}removeCallback(e){this.callbacks.has(e)&&this.callbacks.delete(e)}notifyCallbacks(){Array.from(this.callbacks.values()).forEach(e=>{e()})}},qu="",Zu=window.location.host;function Ku(e){return e}async function Qu(e,t,n){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const i=`${qu}/historyData?symbol=${e}&startDate=${t}&endDate=${n}&num=${arguments.length>3&&void 0!==arguments[3]?arguments[3]:1}&unit=${arguments.length>4&&void 0!==arguments[4]?arguments[4]:"day"}`,o=await tc(i,r);if("err"in o)return o;{const t=o;return e.startsWith("I:")?{...t,results:t.results.map(e=>({...e,v:1}))}:t}}async function Ju(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var r;const i=e;return r=null==t?{signal:n,method:"GET"}:{signal:n,method:"POST",body:t},await fetch(i,r).then(t=>{const n=t.status;return n>=200&&n<300?t.json().catch(t=>(console.error(`error decode json:${t},url:${e}`),{err:Ru(t)})):n>401?(Yu.notifyCallbacks(),{err:"unauthorized"}):{err:"status code error:"+n}}).catch(t=>(t instanceof DOMException||console.error(`fetch data error:${t},url:${e}`,t),{err:Ru(t)}))}async function ec(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return await Ju(e,t,n)}async function tc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await Ju(e,null,t)}const nc=new Intl.DateTimeFormat("en-US",{timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});function rc(e){const t=e.length;if(t>17&&("C"===e[t-9]||"P"===e[t-9])){const n=e.substring(2,t-15),r=e.substring(t-15,t-9);return[n,"20"+r.substring(0,2)+"-"+r.substring(2,4)+"-"+r.substring(4)]}return null}async function ic(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=new URLSearchParams;r.set("date",e),r.set("task",t),r.set("analysis","1");const i=`${qu}/signals?${r.toString()}`,o=await tc(i,n);return o}async function oc(e,t){const n=rc(e);if(null!=n){const[r,i]=n,o=await Qu(r,t,i,1,"minute");if("err"in o)return o;{const n=await Qu(e,t,i,1,"minute"),r=await async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=`${qu}/optionCache?contract=${e}&startDate=${t}`;return await tc(r,n)}(e,t);return"err"in n?n:{stock:o,option:n,cacheOption:"err"in r?{results:[]}:r}}}return{err:"invalid option contract:"+e}}function ac(e,t){for(var n=0;n<e.length;n++)if(e[n]<t[n].length)return!1;return!0}function sc(){const e=[],t=[],n=[];for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.forEach(n=>{e.push(0),t.push([])});const a=10*(new Date).getTime();for(;!ac(e,i);){for(var s=a,l=0;l<e.length;l++){const t=i[l],n=e[l];n<t.length&&t[n][0]<s&&(s=t[n][0])}for(n.push(s),l=0;l<e.length;l++){const n=i[l],r=e[l];r<n.length&&n[r][0]===s?(t[l].push(n[r][1]),e[l]++):t[l].push("-")}}return[n,t]}function lc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=e.toString();for(var r=n,i=0;i<t-n.length;i++)r="0"+r;return r}const uc=["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"];function cc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=null==e?(new Date).getTime():e,o=new Date(i),a=n?" "+lc(r?o.getUTCHours():o.getHours())+":"+lc(r?o.getUTCMinutes():o.getMinutes())+":"+lc(r?o.getUTCSeconds():o.getSeconds()):"";return`${r?o.getUTCFullYear():o.getFullYear()}-${lc((r?o.getUTCMonth():o.getMonth())+1)}-${lc(r?o.getUTCDate():o.getDate())}`+(t?" "+uc[r?o.getUTCDay():o.getDay()]:"")+a}function dc(e){const t=[],n=new Map;return e.forEach(e=>{var t;if(null==e.buySignal.symbol||0===e.buySignal.symbol.length){const t=rc(e.symbol);e.buySignal.symbol=t[0]}let r=e.buySignal.symbol+e.buySignal.strategy+e.buySignal.timestamp;n.has(r)||n.set(r,[]),null===(t=n.get(r))||void 0===t||t.push(e)}),Array.from(n.keys()).forEach(e=>{const r=n.get(e);if(null!=r&&r.length>0){const e=r[0].buySignal;t.push([e,r.sort((e,t)=>e.symbol===t.symbol?e.timestamp-t.timestamp:e.symbol>t.symbol?1:e.symbol<t.symbol?-1:0)])}}),t}async function hc(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if("new"===e){if(null==r||null==o)return!1}else if("update"===e&&null==r&&null==o&&null==a)return!1;const u=Object.entries({stocks:[t],buyAlgorithm:n,sellAlgorithm:i}),c=[];null!=r&&c.push(["buyParams",r]),null!=o&&c.push(["sellParams",o]),c.push(["sellParamsEnd",a]);const d=Object.fromEntries(u.concat(c)),h=`${qu}/${l?"task":"controlSubmit"}`;var p;p=null!=s?{command:e,params:d,name:`${t}-${n}`,taskId:s}:{command:e,params:d,name:`${t}-${n}`};const f=await ec(h,JSON.stringify(p));if("err"in f)return!1;if("status"in f){return"ok"===f.status}return!1}(new Date).getTime();async function pc(e){const t=`${qu}/config?type=stock&command=list`;return await tc(t,e)}async function fc(e){const t=`${qu}/config?type=strategy&command=list`;return await tc(t,e)}async function gc(e,t){const n=`${qu}/backtest?command=get&uid=${e}`,r=await tc(n,t);return"err"in r?r:"data"in r?r.data:{err:"data not found"}}async function mc(e,t,n){const r=await gc(e,n);if("err"in r)return r;if(!t)return[r.positions,[],[],null];const i=r.config.configs[0].stocks[0],o=await Ec(e,i,r.config.startDate,r.config.endDate,n);if("err"in o)return o;var a=null;return null!=r.filterData&&(a=new Map,r.filterData.forEach(e=>{var t;const n=`${Math.floor(e[2]/wc)}-${e[1]}-${e[0]}`;null===(t=a)||void 0===t||t.set(n,e[3])})),[r.positions,r.positionsFake||[],o,a]}const vc="@Color";function yc(e){const t=[];return e.forEach(e=>{var n;if(e.isSell){const t=e.sellSignal;if(n=`${vc}3red@@sell`,null!=t){const e=t.subtype;e.search("acumulate clean;")>-1?n=`${vc}0purple@@acumulate sell`:e.search("event-peek-increase\\(2\\)")>-1?n=`${vc}0orange@@sparse event sell`:e.search("clean position when predict result is 0")>-1?n=`${vc}2blue@@xkk sell`:e.search("density new sell")>-1?n=`${vc}1yellow@@density new sell`:e.search("dense-event happened")>-1&&(n=`${vc}1brown@@dense event sell`)}}else{var r=0;const t=e.buySignal.extra;null!=t&&"iv"in t&&(r=t.iv.toFixed(4));var i=0;const a=rc(e.symbol);if(null!=a){const t=e.timestamp,n=new Date(a[1]).getTime();i=Math.floor((n-t)/wc)+1}var o;o="C"===e.symbol[e.symbol.length-9]?"green":"blue",o=e.buySignal.subtype.search("realtime reverse buy")?"dark"+o:"light"+o,n=`${vc}3${o}@@(symbol:${e.symbol},iv:${r},days:${i})buy`}const a=6e4*Math.floor(e.timestamp/6e4);0===t.length||t[t.length-1][0]<a?t.push([a,[n]]):t[t.length-1][1].push(n)}),t}async function xc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=null!=t&&t.length>0?{configs:e.configs,name:e.name,desc:e.desc,dates:t,startDate:t[0],endDate:t[t.length-1]}:{startDate:e.startDate,endDate:e.endDate,configs:e.configs,name:e.name,desc:e.desc};const r=`${qu}/backtestSubmit`,i=await ec(r,JSON.stringify(n));return!("err"in i)&&("status"in i&&"ok"===i.status)}const bc=new Map,wc=864e5;function Sc(e){return Math.floor(e/wc)*wc+(Ac(e)?0:36e5)+468e5+18e5}function _c(e){return Math.floor(e/wc)*wc+(Ac(e)?0:36e5)+72e6}function Ac(e){const t=cc(e),n=t.slice(0,4),r=t.slice(5),i=bc.get(n);if(null!=i){const[e,t]=i;return r>e&&r<t}{const e=new Date(n+"-03-01"),t=e.getUTCDay(),i=new Date(n+"-11-01"),o=i.getUTCDay(),a=cc(e.getTime()+(14-t)%14*864e5).slice(5),s=cc(i.getTime()+(7-o)%7*864e5).slice(5);return bc.set(n,[a,s]),r>a&&r<s}}function kc(e){return cc(e-36e5*(Ac(e)?4:5),!1,!0)}function Cc(e){const t=new Map;return Object.keys(e).forEach(n=>{t.set(n,e[n])}),t}async function Mc(e,t){const n=`${qu}/position_new?command=zvPositions&aid=${e}`,r=await tc(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}async function Ic(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new URLSearchParams;r.set("command","accounts"),null!=e&&r.set("aid",e),n&&r.set("group","1");const i=`${qu}/position_new?${r.toString()}`,o=await tc(i,t);return"err"in o?o:"d"in o?o.d:{err:"fail to get data by key:d"}}async function Tc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new URLSearchParams;i.set("command","positions"),i.set("accountId",e),null!=t&&i.set("runner",t),r&&i.set("isMain","true");const o=`${qu}/position_new?${i.toString()}`,a=await tc(o,n);return"err"in a?a:"d"in a?a.d:{err:"fail to get data by key:d"}}async function Dc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new URLSearchParams;i.set("command","trades"),null!=e&&i.set("accountId",e),null!=t&&i.set("orderId",t),r&&i.set("isMain","true");const o=`${qu}/position_new?${i.toString()}`,a=await tc(o,n);return"err"in a?a:"d"in a?a.d:{err:"fail to get data by key:d"}}async function jc(e,t,n,r,i){const o=new URLSearchParams;o.set("command","update_account");const a={symbol:e,strategy:t,totalMoney:n,betPercent:r,desc:i};o.set("params",JSON.stringify(a));const s=`${qu}/task?${o.toString()}`;return!("err"in await tc(s))}async function Pc(e,t,n,r,i){const o=`${qu}/position_new?startDate=${n}&endDate=${r}&aid=${e}&tp=${t}&command=profit_history`,a=await tc(o,i);if("err"in a)return a;if("d"in a&&"t"in a){return a}return{err:"data not found"}}async function Lc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;n.set("command","analysis_data"),n.set("uid",e);const r=`${qu}/backtest?${n.toString()}`,i=await tc(r,t);return i}async function Rc(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("symbol",t),a.set("startDate",r),a.set("endDate",i),a.set("strategy",n),a.set("command","signals"),a.set("uid",e);const s=`${qu}/backtest?${a.toString()}`,l=await tc(s,o);return"err"in l?l:Array.isArray(l)?l.map(e=>({...e,extra:JSON.parse(e.extra)})):{err:"wrong type"}}async function Ec(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=await Rc(e,t,"bigtradedensity",n,r,i);if("err"in o)return o;{const a=await Rc(e,t,"limitreversetime",n,r,i);return"err"in a?a:[["density",new Set(o.map(e=>Math.floor(e.timestamp/wc)))],["reverse",new Set(a.map(e=>Math.floor(e.timestamp/wc)))]]}}async function Nc(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const s=new URLSearchParams;var l;s.set("symbol",e),s.set("command","qqqPosition"),s.set("strategy",t),s.set("startDate",r),s.set("endDate",i),l=a?"position_new":"position";const u=await tc(`${qu}/${l}?${s.toString()}`,o);if("err"in u)return u;if("d"in u){const t=u.d,i=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=new URLSearchParams;o.set("stock",e),i&&o.set("obj","1"),null!=n&&o.set("strategy",n),null!=r&&o.set("date",r);const a=`${qu}/signals?${o.toString()}`;return await tc(a,t)}(e,o,n,r,!0);if("err"in i)return i;return[t,i.map(e=>({...e,extra:JSON.parse(e.extra)}))]}return{err:"no key:d found"}}async function Oc(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=new URLSearchParams;o.set("uid",e),o.set("command","manualsell"),o.set("symbol",t),n?o.set("percent",r+""):o.set("volume",r+"");const a=`${qu}/control?${o.toString()}`,s=await tc(a,i);return!("err"in s)&&("timeout"in s&&!s.timeout)}async function zc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/control?command=list2`,n=await tc(t,e);if("err"in n)return n;if("r"in n){const e=n;return null==e.r.result?{err:"empty result"}:e.r.result}return{err:"no key named:r"}}async function Bc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/position_new?command=realAccounts`,n=await tc(t,e);return"err"in n?n:"d"in n?n.d:{err:"no key named:d"}}async function Fc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=new URLSearchParams;r.set("uid",e),r.set("command","updatemanualsell"),r.set("params",JSON.stringify(t));const i=`${qu}/control?${r.toString()}`,o=await tc(i,n);return!("err"in o)&&("timeout"in o&&!o.timeout)}async function $c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=`${qu}/control?command=get2&uid=${e}`,r=await tc(n,t);if("err"in r)return r;if("result"in r){const e=r.result;return null!=e&&"params"in e?e.params:{err:"result is null or no key named: params"}}return{err:"no key named result"}}async function Vc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=`${qu}/control?command=synclog&symbol=${e}&strategy=${t}`,i=await tc(r,n);return"err"in i?i:"r"in i?i.r:{err:"no key named:r found"}}async function Wc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=`${qu}/qqqAggWithVol?startDate=${e}&endDate=${t}${arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&5min=1":""}&symbol=${n}`,o=await tc(i,r);return"err"in o?o:"results"in o?o.results:{err:"no key named:r found"}}async function Hc(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("command","onekey"),a.set("symbol",t),a.set("sub",e),r?a.set("group",n):a.set("strategy",n),null===i||void 0===i||i.forEach(e=>a.set(e[0],e[1]));const s=`${qu}/control?${a.toString()}`,l=await tc(s,o);if(!("err"in l)&&"s"in l){const e=l.s;if("boolean"===typeof e)return e}return!1}async function Gc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=`${qu}/control?command=onekeysell&${null!=e?`strategy=${e}`:`group=${Uc}`}&${t?"percent":"volume"}=${n}`,o=await tc(i,r);if(!("err"in o)&&"s"in o){const e=o.s;if("boolean"===typeof e)return e}return!1}const Uc="g_big_volume";async function Xc(e,t){const n=new URLSearchParams;n.set("command",e),t.forEach(e=>{n.set(e[0],e[1])});const r=`${qu}/position_new?${n.toString()}`,i=await tc(r);if("err"in i)return i;if("s"in i){const e=i.s;if(e)return e;if("d"in i){const e=i.d;if(null!=e)return{err:e}}return!1}return{err:"fail to get data by key:s"}}async function Yc(e,t){const n=`${qu}/position_new?command=accountgroup&mainId=${e}`,r=await tc(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}async function qc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;n.set("command","blockConfig"),n.set("desc",e.desc),n.set("value",JSON.stringify(e.value)),null!=e.rowid?(n.set("rowid",e.rowid+""),n.set("sub","update")):(n.set("name",e.name),n.set("config",e.config),n.set("sub","insert"));const r=`${qu}/control?${n.toString()}`,i=await tc(r,t);return!("err"in i)&&("status"in i&&!0===i.status)}async function Zc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=`${qu}/qqqVolData?dt=${e}&dayIv=1`,r=await tc(n,t);return r}async function Kc(e,t){const n=(new Date).getTime(),r=cc(n-5*wc),i=cc(n);for(var o=3;o-- >0;){const n=await Qu(e,r,i,1,"day",t);if(!("err"in n)){const e=n.results;if(e.length>0){const t=e[e.length-1];if(cc(t.t)!==i)return t.c;if(e.length>1){return e[e.length-2].c}}}await Xu(500)}return null}async function Qc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;var r,i=null,o=null;"string"===typeof e?(r="summary",i=e):null==e?r="list_date":(r=e[2],i=e[0],o=e[1]),n.set("command",r),null!=i&&("quote"===r?n.set("startTime",i):n.set("date",i)),null!=o&&n.set("contract",o);const a=`${qu}/net_flow?${n.toString()}`,s=await tc(a,t);return"err"in s?s:"d"in s?s.d:{err:"data not found"}}async function Jc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/task?command=list`,n=await tc(t,e);if("err"in n)return n;if("d"in n){const e=n.d;if("object"===typeof e&&null!=e&&"data"in e)return e.data}return{err:"data not found"}}const ed="username",td="password";function nd(e){let{loginCB:t}=e;const[n,r]=(0,St().useState)(localStorage.getItem(ed)||""),[i,o]=(0,St().useState)(localStorage.getItem(td)||"");return(0,wt().jsx)("main",{children:(0,wt().jsx)(Ji,{maxWidth:"xl",children:(0,wt().jsxs)("div",{className:"Container",children:[(0,wt().jsx)("img",{src:"/riches-booster-640.jpg",alt:"riches booster",style:{width:"640px",aspectRatio:"4/3"}}),(0,wt().jsx)(Nl,{required:!0,id:"filled-required",onChange:e=>{r(e.target.value)},label:"User Name",defaultValue:n,variant:"filled"}),(0,wt().jsx)(Nl,{id:"filled-password-input",label:"Password",type:"password",autoComplete:"current-password",defaultValue:i,onChange:e=>o(e.target.value),variant:"filled"}),(0,wt().jsx)("br",{}),(0,wt().jsx)(yu,{variant:"contained",onClick:()=>{n.length>0&&i.length>0&&async function(e,t){const n=`${qu}/login`,r={user:e,password:t},i=await Ju(n,JSON.stringify(r));if("userLevel"in i){const e=i.userLevel;if("token"in i){const e=i.token;localStorage.setItem("token",e)}return e}return 1}(n,i).then(e=>{e>0&&(localStorage.setItem(ed,n),localStorage.setItem(td,i),t())})},children:"\u767b\u5f55"})]})})})}function rd(e){return(0,qe().Ay)("MuiButtonGroup",e)}const id=(0,Ze().A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),od=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],ad=(0,H().Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${id.grouped}`]:t.grouped},{[`& .${id.grouped}`]:t[`grouped${(0,U().A)(n.orientation)}`]},{[`& .${id.grouped}`]:t[`grouped${(0,U().A)(n.variant)}`]},{[`& .${id.grouped}`]:t[`grouped${(0,U().A)(n.variant)}${(0,U().A)(n.orientation)}`]},{[`& .${id.grouped}`]:t[`grouped${(0,U().A)(n.variant)}${(0,U().A)(n.color)}`]},{[`& .${id.firstButton}`]:t.firstButton},{[`& .${id.lastButton}`]:t.lastButton},{[`& .${id.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[2]},n.disableElevation&&{boxShadow:"none"},n.fullWidth&&{width:"100%"},"vertical"===n.orientation&&{flexDirection:"column"},{[`& .${id.grouped}`]:(0,Dt().A)({minWidth:40,"&:hover":(0,Dt().A)({},"contained"===n.variant&&{boxShadow:"none"})},"contained"===n.variant&&{boxShadow:"none"}),[`& .${id.firstButton},& .${id.middleButton}`]:(0,Dt().A)({},"horizontal"===n.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===n.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===n.variant&&"horizontal"===n.orientation&&{borderRight:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${id.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}},"text"===n.variant&&"vertical"===n.orientation&&{borderBottom:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${id.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}},"text"===n.variant&&"inherit"!==n.color&&{borderColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:(0,pe().X4)(t.palette[n.color].main,.5)},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"transparent"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"transparent"},"contained"===n.variant&&"horizontal"===n.orientation&&{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${id.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}},"contained"===n.variant&&"vertical"===n.orientation&&{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${id.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}},"contained"===n.variant&&"inherit"!==n.color&&{borderColor:(t.vars||t).palette[n.color].dark},{"&:hover":(0,Dt().A)({},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"currentColor"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"currentColor"})}),[`& .${id.lastButton},& .${id.middleButton}`]:(0,Dt().A)({},"horizontal"===n.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===n.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===n.variant&&"horizontal"===n.orientation&&{marginLeft:-1},"outlined"===n.variant&&"vertical"===n.orientation&&{marginTop:-1})})}),sd=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:c=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:f="outlined"}=n,g=(0,jt().A)(n,od),m=(0,Dt().A)({},n,{color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,orientation:h,size:p,variant:f}),v=(e=>{const{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,"vertical"===a&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${(0,U().A)(a)}`,`grouped${(0,U().A)(s)}`,`grouped${(0,U().A)(s)}${(0,U().A)(a)}`,`grouped${(0,U().A)(s)}${(0,U().A)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,$e().A)(l,rd,t)})(m),y=St().useMemo(()=>({className:v.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,size:p,variant:f}),[o,s,l,u,c,d,p,f,v.grouped]),x=function(e){return St().Children.toArray(e).filter(e=>St().isValidElement(e))}(r),b=x.length,w=e=>{const t=0===e,n=e===b-1;return t&&n?"":t?v.firstButton:n?v.lastButton:v.middleButton};return(0,wt().jsx)(ad,(0,Dt().A)({as:a,role:"group",className:(0,Pt().A)(v.root,i),ref:t,ownerState:m},g,{children:(0,wt().jsx)(du.Provider,{value:y,children:x.map((e,t)=>(0,wt().jsx)(hu.Provider,{value:w(t),children:e},t))})}))});function ld(e){return(0,qe().Ay)("MuiCircularProgress",e)}(0,Ze().A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const ud=["className","color","disableShrink","size","style","thickness","value","variant"];let cd,dd,hd,pd,fd=e=>e;const gd=44,md=(0,a().i7)(cd||(cd=fd`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),vd=(0,a().i7)(dd||(dd=fd`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),yd=(0,H().Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,U().A)(n.color)}`]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,a().AH)(hd||(hd=fd`
      animation: ${0} 1.4s linear infinite;
    `),md)}),xd=(0,H().Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),bd=(0,H().Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,U().A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,a().AH)(pd||(pd=fd`
      animation: ${0} 1.4s ease-in-out infinite;
    `),vd)}),wd=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:u=0,variant:c="indeterminate"}=n,d=(0,jt().A)(n,ud),h=(0,Dt().A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:u,variant:c}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,U().A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,U().A)(n)}`,i&&"circleDisableShrink"]};return(0,$e().A)(o,ld,t)})(h),f={},g={},m={};if("determinate"===c){const e=2*Math.PI*((gd-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(u),f.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,wt().jsx)(yd,(0,Dt().A)({className:(0,Pt().A)(p.root,r),style:(0,Dt().A)({width:a,height:a},g,s),ownerState:h,ref:t,role:"progressbar"},m,d,{children:(0,wt().jsx)(xd,{className:p.svg,ownerState:h,viewBox:"22 22 44 44",children:(0,wt().jsx)(bd,{className:p.circle,style:f,ownerState:h,cx:gd,cy:gd,r:(gd-l)/2,fill:"none",strokeWidth:l})})}))});function Sd(e){const[t,n]=(0,St().useState)(null),{getter:r,interval:i,debugKey:o,onLoad:a}=e,s=(0,St().useCallback)(()=>{null!=a&&a()},[a]),[l]=(0,St().useState)(new AbortController),[u,c]=(0,St().useState)(0);return console.log("debug LoadableContentAsyncNew,key:"+o),(0,St().useEffect)(()=>{null==t||"err"in t||s()},[t]),(0,St().useEffect)(()=>{if((null==i||i>3e3)&&r(l.signal).then(e=>{l.signal.aborted||n(e)}),null!=i){const e=setInterval(()=>{r(l.signal).then(e=>{l.signal.aborted||n(e)})},i);return()=>{clearInterval(e)}}},[r,l,i,u]),(0,St().useEffect)(()=>()=>{l.abort()},[l]),null==t?(0,wt().jsx)(wd,{}):"err"in t?(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("p",{children:["Error:",Ru(t.err)]}),(0,wt().jsx)("button",{onClick:()=>{n(null),c(e=>e+1)},children:"Refresh"})]}):e.cvt(t)}const _d=[1,2,3,4];var Ad=function(e,t){return Ad=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ad(e,t)};function kd(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ad(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var Cd=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Md=new function(){this.browser=new Cd,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!==typeof window};"object"===typeof wx&&"function"===typeof wx.getSystemInfoSync?(Md.wxa=!0,Md.touchEventsSupported=!0):"undefined"===typeof document&&"undefined"!==typeof self?Md.worker=!0:!Md.hasGlobalWindow||"Deno"in window?(Md.node=!0,Md.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!==typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!==typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Md);const Id=Md;var Td="sans-serif",Dd="12px "+Td;var jd=function(e){var t={};if("undefined"===typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Pd={createCanvas:function(){return"undefined"!==typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,r){if(!e){var i=Pd.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==r&&(t=e.font=r||Dd),e.measureText(n);n=n||"";var o=/((?:\d+)?\.?\d*)px/.exec(r=r||Dd),a=o&&+o[1]||12,s=0;if(r.indexOf("mono")>=0)s=a*n.length;else for(var l=0;l<n.length;l++){var u=jd[n[l]];s+=null==u?a:u*a}return{width:s}}}(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}};var Ld=rh(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),Rd=rh(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ed=Object.prototype.toString,Nd=Array.prototype,Od=Nd.forEach,zd=Nd.filter,Bd=Nd.slice,Fd=Nd.map,$d=function(){}.constructor,Vd=$d?$d.prototype:null,Wd="__proto__",Hd=2311;function Gd(){return Hd++}function Ud(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!==typeof console&&console.error.apply(console,e)}function Xd(e){if(null==e||"object"!==typeof e)return e;var t=e,n=Ed.call(e);if("[object Array]"===n){if(!Ih(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=Xd(e[r])}}else if(Rd[n]){if(!Ih(e)){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Ld[n]&&!Ih(e)&&!mh(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==Wd&&(t[a]=Xd(e[a]));return t}function Yd(e,t,n){if(!ph(t)||!ph(e))return n?Xd(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Wd){var i=e[r],o=t[r];!ph(o)||!ph(i)||lh(o)||lh(i)||mh(o)||mh(i)||fh(o)||fh(i)||Ih(o)||Ih(i)?!n&&r in e||(e[r]=Xd(t[r])):Yd(i,o,n)}return e}function qd(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=Yd(n,e[r],t);return n}function Zd(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Wd&&(e[n]=t[n]);return e}function Kd(e,t,n){for(var r=oh(t),i=0,o=r.length;i<o;i++){var a=r[i];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}Pd.createCanvas;function Qd(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Jd(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else Kd(e,t,n)}function eh(e){return!!e&&("string"!==typeof e&&"number"===typeof e.length)}function th(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Od)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function nh(e,t,n){if(!e)return[];if(!t)return Sh(e);if(e.map&&e.map===Fd)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function rh(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function ih(e,t,n){if(!e)return[];if(!t)return Sh(e);if(e.filter&&e.filter===zd)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function oh(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var ah=Vd&&uh(Vd.bind)?Vd.call.bind(Vd.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Bd.call(arguments)))}};function sh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Bd.call(arguments)))}}function lh(e){return Array.isArray?Array.isArray(e):"[object Array]"===Ed.call(e)}function uh(e){return"function"===typeof e}function ch(e){return"string"===typeof e}function dh(e){return"[object String]"===Ed.call(e)}function hh(e){return"number"===typeof e}function ph(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function fh(e){return!!Ld[Ed.call(e)]}function gh(e){return!!Rd[Ed.call(e)]}function mh(e){return"object"===typeof e&&"number"===typeof e.nodeType&&"object"===typeof e.ownerDocument}function vh(e){return null!=e.colorStops}function yh(e){return e!==e}function xh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function bh(e,t){return null!=e?e:t}function wh(e,t,n){return null!=e?e:null!=t?t:n}function Sh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Bd.apply(e,t)}function _h(e){if("number"===typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function Ah(e,t){if(!e)throw new Error(t)}function kh(e){return null==e?null:"function"===typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Ch="__ec_primitive__";function Mh(e){e[Ch]=!0}function Ih(e){return e[Ch]}var Th=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return oh(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Dh="function"===typeof Map;var jh=function(){function e(t){var n=lh(t);this.data=Dh?new Map:new Th;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&th(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Dh?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Ph(e){return new jh(e)}function Lh(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}function Rh(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&Zd(n,t),n}function Eh(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Nh(e,t){return e.hasOwnProperty(t)}function Oh(){}var zh=180/Math.PI;function Bh(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function Fh(e,t){return e[0]=t[0],e[1]=t[1],e}function $h(e){return[e[0],e[1]]}function Vh(e,t,n){return e[0]=t,e[1]=n,e}function Wh(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Hh(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Gh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Uh(e){return Math.sqrt(Xh(e))}function Xh(e){return e[0]*e[0]+e[1]*e[1]}function Yh(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function qh(e,t){var n=Uh(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Zh(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Kh=Zh;var Qh=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function Jh(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function ep(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function tp(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function np(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var rp=function(e,t){this.target=e,this.topTarget=t&&t.topTarget};const ip=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new rp(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new rp(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new rp(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new rp(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new rp(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new rp(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}();const op=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"===typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}();var ap=Math.log(2);function sp(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/ap);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;f&i||(d+=(p%2?-1:1)*e[n][h]*sp(e,t-1,c,u,i|f,o),p++)}return o[a]=d,d}function lp(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=sp(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*sp(n,7,0===a?1:0,1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var up="___zrEVENTSAVED",cp=[];function dp(e,t,n,r,i){if(t.getBoundingClientRect&&Id.domSupported&&!hp(t)){var o=t[up]||(t[up]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),s=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&o&&h===o[d]&&p===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?lp(s,a):lp(a,s))}(a,o,i);if(s)return s(e,n,r),!0}return!1}function hp(e){return"CANVAS"===e.nodeName.toUpperCase()}var pp=/([&<>"'])/g,fp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function gp(e){return null==e?"":(e+"").replace(pp,function(e,t){return fp[t]})}var mp=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,vp=[],yp=Id.browser.firefox&&+Id.browser.version.split(".")[0]<39;function xp(e,t,n,r){return n=n||{},r?bp(e,t,n):yp&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):bp(e,t,n),n}function bp(e,t,n){if(Id.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(hp(e)){var o=e.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(dp(vp,e,r,i))return n.zrX=vp[0],void(n.zrY=vp[1])}n.zrX=n.zrY=0}function wp(e){return e||window.event}function Sp(e,t,n){if(null!=(t=wp(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&xp(e,i,t,n)}else{xp(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&mp.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function _p(e,t,n,r){e.addEventListener(t,n,r)}function Ap(e,t,n,r){e.removeEventListener(t,n,r)}var kp=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Cp(e){return 2===e.which||3===e.which}var Mp=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=xp(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Tp)if(Tp.hasOwnProperty(t)){var n=Tp[t](this._track,e);if(n)return n}},e}();function Ip(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Tp={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=Ip(i)/Ip(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Dp(){return[1,0,0,1,0,0]}function jp(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Pp(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Lp(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function Rp(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Ep(e,t,n,r){void 0===r&&(r=[0,0]);var i=t[0],o=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*c,e[1]=-i*c+s*d,e[2]=o*d+l*c,e[3]=-o*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function Np(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Op(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}const zp=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}();var Bp=Math.min,Fp=Math.max,$p=new zp,Vp=new zp,Wp=new zp,Hp=new zp,Gp=new zp,Up=new zp;const Xp=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=Bp(e.x,this.x),n=Bp(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Fp(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Fp(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=[1,0,0,1,0,0];return Rp(i,i,[-t.x,-t.y]),Np(i,i,[n,r]),Rp(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(o<l||u<i||s<c||d<a);if(n){var p=1/0,f=0,g=Math.abs(o-l),m=Math.abs(u-i),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(g,m),b=Math.min(v,y);o<l||u<i?x>f&&(f=x,g<m?zp.set(Up,-g,0):zp.set(Up,m,0)):x<p&&(p=x,g<m?zp.set(Gp,g,0):zp.set(Gp,-m,0)),s<c||d<a?b>f&&(f=b,v<y?zp.set(Up,0,-v):zp.set(Up,0,y)):x<p&&(p=x,v<y?zp.set(Gp,0,v):zp.set(Gp,0,-y))}return n&&zp.copy(n,h?Gp:Up),h},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}$p.x=Wp.x=n.x,$p.y=Hp.y=n.y,Vp.x=Hp.x=n.x+n.width,Vp.y=Wp.y=n.y+n.height,$p.transform(r),Hp.transform(r),Vp.transform(r),Wp.transform(r),t.x=Bp($p.x,Vp.x,Wp.x,Hp.x),t.y=Bp($p.y,Vp.y,Wp.y,Hp.y);var l=Fp($p.x,Vp.x,Wp.x,Hp.x),u=Fp($p.y,Vp.y,Wp.y,Hp.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}();var Yp="silent";function qp(){kp(this.event)}var Zp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return kd(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(op),Kp=function(e,t){this.x=e,this.y=t},Qp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Jp=new Xp(0,0,0,0),ef=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new Kp(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new Zp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new ip(a),a}return kd(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(th(Qp,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=rf(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new Kp(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Kp(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:qp}}(t,e,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"===typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Kp(e,t);if(nf(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Xp(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(Jp.copy(c.getBoundingRect()),c.transform&&Jp.applyTransform(c.transform),Jp.intersect(l)&&o.push(c))}if(o.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d){if(nf(o,i,e+p*Math.cos(f),t+p*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Mp);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new Kp;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(op);function tf(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s||r.parent}return!i||Yp}return!1}function nf(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=tf(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Yp)){t.target=a;break}}}function rf(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}th(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){ef.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=rf(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Kh(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});const of=ef;function af(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function sf(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)i(a,e[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function lf(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(e,t[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function uf(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])<0){for(s=i+1;l<s&&o(e,t[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function cf(e,t){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var h=uf(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=lf(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=o,d=n;if(e[d++]=e[c++],0===--s){for(l=0;l<r;l++)e[d+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var h,p,f,g=i;for(;;){h=0,p=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],p++,h=0,0===--s){f=!0;break}}else if(e[d++]=a[u++],h++,p=0,1===--r){f=!0;break}}while((h|p)<g);if(f)break;do{if(0!==(h=uf(e[c],a,u,r,0,t))){for(l=0;l<h;l++)e[d+l]=a[u+l];if(d+=h,u+=h,(r-=h)<=1){f=!0;break}}if(e[d++]=e[c++],0===--s){f=!0;break}if(0!==(p=lf(a[u],e,c,s,0,t))){for(l=0;l<p;l++)e[d+l]=e[c+l];if(d+=p,c+=p,0===(s-=p)){f=!0;break}}if(e[d++]=a[u++],1===--r){f=!0;break}g--}while(h>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,d=o+s-1,h=0,p=0;if(e[d--]=e[u--],0===--r){for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l];return}if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=i;for(;;){var g=0,m=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,m=0,0===--r){v=!0;break}}else if(e[d--]=a[c--],m++,g=0,1===--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=r-uf(a[c],e,n,r,r-1,t))){for(r-=g,p=(d-=g)+1,h=(u-=g)+1,l=g-1;l>=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1===--s){v=!0;break}if(0!==(m=s-lf(e[u],a,0,s,s-1,t))){for(s-=m,p=(d-=m)+1,h=(c-=m)+1,l=0;l<m;l++)e[p+l]=a[h+l];if(s<=1){v=!0;break}}if(e[d--]=e[u--],0===--r){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}function df(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32)sf(e,n,r,n+(o=af(e,n,r,t)),t);else{var a=cf(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=af(e,n,r,t))<s){var l=i;l>s&&(l=s),sf(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var hf=!1;function pf(){hf||(hf=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ff(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var gf=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ff}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,df(n,ff)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(pf(),u.z=0),isNaN(u.z2)&&(pf(),u.z2=0),isNaN(u.zlevel)&&(pf(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=Qd(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const mf=gf;const vf=Id.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var yf={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-yf.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*yf.bounceIn(2*e):.5*yf.bounceOut(2*e-1)+.5}};const xf=yf;var bf=Math.pow,wf=Math.sqrt,Sf=1e-8,_f=1e-4,Af=wf(3),kf=1/3,Cf=Bh(),Mf=Bh(),If=Bh();function Tf(e){return e>-1e-8&&e<Sf}function Df(e){return e>Sf||e<-1e-8}function jf(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function Pf(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function Lf(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(Tf(c)&&Tf(d)){if(Tf(s))o[0]=0;else(A=-l/s)>=0&&A<=1&&(o[p++]=A)}else{var f=d*d-4*c*h;if(Tf(f)){var g=d/c,m=-g/2;(A=-s/a+g)>=0&&A<=1&&(o[p++]=A),m>=0&&m<=1&&(o[p++]=m)}else if(f>0){var v=wf(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(A=(-s-((y=y<0?-bf(-y,kf):bf(y,kf))+(x=x<0?-bf(-x,kf):bf(x,kf))))/(3*a))>=0&&A<=1&&(o[p++]=A)}else{var b=(2*c*s-3*a*d)/(2*wf(c*c*c)),w=Math.acos(b)/3,S=wf(c),_=Math.cos(w),A=(-s-2*S*_)/(3*a),k=(m=(-s+S*(_+Af*Math.sin(w)))/(3*a),(-s+S*(_-Af*Math.sin(w)))/(3*a));A>=0&&A<=1&&(o[p++]=A),m>=0&&m<=1&&(o[p++]=m),k>=0&&k<=1&&(o[p++]=k)}}return p}function Rf(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Tf(a)){if(Df(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(Tf(u))i[0]=-o/(2*a);else if(u>0){var c,d=wf(u),h=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}function Ef(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,d=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=r}function Nf(e,t,n,r,i,o,a,s,l,u,c){var d,h,p,f,g,m=.005,v=1/0;Cf[0]=l,Cf[1]=u;for(var y=0;y<1;y+=.05)Mf[0]=jf(e,n,i,a,y),Mf[1]=jf(t,r,o,s,y),(f=Qh(Cf,Mf))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<_f);x++)h=d-m,p=d+m,Mf[0]=jf(e,n,i,a,h),Mf[1]=jf(t,r,o,s,h),f=Qh(Mf,Cf),h>=0&&f<v?(d=h,v=f):(If[0]=jf(e,n,i,a,p),If[1]=jf(t,r,o,s,p),g=Qh(If,Cf),p<=1&&g<v?(d=p,v=g):m*=.5);return c&&(c[0]=jf(e,n,i,a,d),c[1]=jf(t,r,o,s,d)),wf(v)}function Of(e,t,n,r,i,o,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,g=jf(e,n,i,a,f),m=jf(t,r,o,s,f),v=g-u,y=m-c;d+=Math.sqrt(v*v+y*y),u=g,c=m}return d}function zf(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Bf(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Ff(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function $f(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function Vf(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Cf[0]=a,Cf[1]=s;for(var h=0;h<1;h+=.05){Mf[0]=zf(e,n,i,h),Mf[1]=zf(t,r,o,h),(m=Qh(Cf,Mf))<d&&(u=h,d=m)}d=1/0;for(var p=0;p<32&&!(c<_f);p++){var f=u-c,g=u+c;Mf[0]=zf(e,n,i,f),Mf[1]=zf(t,r,o,f);var m=Qh(Mf,Cf);if(f>=0&&m<d)u=f,d=m;else{If[0]=zf(e,n,i,g),If[1]=zf(t,r,o,g);var v=Qh(If,Cf);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=zf(e,n,i,u),l[1]=zf(t,r,o,u)),wf(d)}function Wf(e,t,n,r,i,o,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=zf(e,n,i,h),f=zf(t,r,o,h),g=p-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=p,l=f}return u}var Hf=/cubic-bezier\(([0-9,\.e ]+)\)/;function Gf(e){var t=e&&Hf.exec(e);if(t){var n=t[1].split(","),r=+kh(n[0]),i=+kh(n[1]),o=+kh(n[2]),a=+kh(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Lf(0,r,o,1,e,s)&&jf(0,i,a,1,s[0])}}}const Uf=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Oh,this.ondestroy=e.ondestroy||Oh,this.onrestart=e.onrestart||Oh,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=uh(e)?e:xf[e]||Gf(e)},e}();var Xf=function(e){this.value=e},Yf=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Xf(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}();const qf=function(){function e(e){this._list=new Yf,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Xf(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();var Zf={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Kf(e){return(e=Math.round(e))<0?0:e>255?255:e}function Qf(e){return e<0?0:e>1?1:e}function Jf(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Kf(parseFloat(t)/100*255):Kf(parseInt(t,10))}function eg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Qf(parseFloat(t)/100):Qf(parseFloat(t))}function tg(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function ng(e,t,n){return e+(t-e)*n}function rg(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function ig(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var og=new qf(20),ag=null;function sg(e,t){ag&&ig(ag,t),ag=og.put(e,ag||t.slice())}function lg(e,t){if(e){t=t||[];var n=og.get(e);if(n)return ig(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Zf)return ig(t,Zf[r]),sg(e,t),t;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(rg(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),sg(e,t),t):void rg(t,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(rg(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),sg(e,t),t):void rg(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?rg(t,+u[0],+u[1],+u[2],1):rg(t,0,0,0,1);c=eg(u.pop());case"rgb":return u.length>=3?(rg(t,Jf(u[0]),Jf(u[1]),Jf(u[2]),3===u.length?c:eg(u[3])),sg(e,t),t):void rg(t,0,0,0,1);case"hsla":return 4!==u.length?void rg(t,0,0,0,1):(u[3]=eg(u[3]),ug(u,t),sg(e,t),t);case"hsl":return 3!==u.length?void rg(t,0,0,0,1):(ug(u,t),sg(e,t),t);default:return}}rg(t,0,0,0,1)}}function ug(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=eg(e[1]),i=eg(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return rg(t=t||[],Kf(255*tg(a,o,n+1/3)),Kf(255*tg(a,o,n)),Kf(255*tg(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function cg(e,t){var n=lg(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return gg(n,4===n.length?"rgba":"rgb")}}function dg(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=t[i],s=t[o],l=r-i;return n[0]=Kf(ng(a[0],s[0],l)),n[1]=Kf(ng(a[1],s[1],l)),n[2]=Kf(ng(a[2],s[2],l)),n[3]=Qf(ng(a[3],s[3],l)),n}}function hg(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=lg(t[i]),s=lg(t[o]),l=r-i,u=gg([Kf(ng(a[0],s[0],l)),Kf(ng(a[1],s[1],l)),Kf(ng(a[2],s[2],l)),Qf(ng(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}function pg(e,t,n,r){var i,o=lg(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-o)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+c-h:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(o),null!=t&&(o[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=eg(n)),null!=r&&(o[2]=eg(r)),gg(ug(o),"rgba")}function fg(e,t){var n=lg(e);if(n&&null!=t)return n[3]=Qf(t),gg(n,"rgba")}function gg(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function mg(e,t){var n=lg(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var vg=new qf(100);function yg(e){if(ch(e)){var t=vg.get(e);return t||(t=cg(e,-.1),vg.put(e,t)),t}if(vh(e)){var n=Zd({},e);return n.colorStops=nh(e.colorStops,function(e){return{offset:e.offset,color:cg(e.color,-.1)}}),n}return e}var xg=Math.round;function bg(e){var t;if(e&&"transparent"!==e){if("string"===typeof e&&e.indexOf("rgba")>-1){var n=lg(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var wg=1e-4;function Sg(e){return e<wg&&e>-1e-4}function _g(e){return xg(1e3*e)/1e3}function Ag(e){return xg(1e4*e)/1e4}var kg={left:"start",right:"end",center:"middle",middle:"middle"};function Cg(e){return e&&!!e.image}function Mg(e){return Cg(e)||function(e){return e&&!!e.svgElement}(e)}function Ig(e){return"linear"===e.type}function Tg(e){return"radial"===e.type}function Dg(e){return e&&("linear"===e.type||"radial"===e.type)}function jg(e){return"url(#"+e+")"}function Pg(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Lg(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*zh,i=bh(e.scaleX,1),o=bh(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===i&&1===o||l.push("scale("+i+","+o+")"),(a||s)&&l.push("skew("+xg(a*zh)+"deg, "+xg(s*zh)+"deg)"),l.join(" ")}var Rg=Id.hasGlobalWindow&&uh(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!==typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},Eg=Array.prototype.slice;function Ng(e,t,n){return(t-e)*n+e}function Og(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=Ng(t[o],n[o],r);return e}function zg(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function Bg(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function Fg(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}function $g(e,t,n){var r=e,i=t;if(r.push&&i.push){var o=r.length,a=i.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===n?i[s]:Eg.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function Vg(e){if(eh(e)){var t=e.length;if(eh(e[0])){for(var n=[],r=0;r<t;r++)n.push(Eg.call(e[r]));return n}return Eg.call(e)}return e}function Wg(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function Hg(e){return 4===e||5===e}function Gg(e){return 1===e||2===e}var Ug=[0,0,0,0],Xg=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(eh(t)){var l=function(e){return eh(e&&e[0])?2:1}(t);a=l,(1===l&&!hh(t[0])||2===l&&!hh(t[0][0]))&&(o=!0)}else if(hh(t)&&!yh(t))a=0;else if(ch(t))if(isNaN(+t)){var u=lg(t);u&&(s=u,a=3)}else a=0;else if(vh(t)){var c=Zd({},s);c.colorStops=nh(t.colorStops,function(e){return{offset:e.offset,color:lg(e.color)}}),Ig(t)?a=4:Tg(t)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=uh(n)?n:xf[n]||Gf(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=Gg(r),l=Hg(r),u=0;u<i;u++){var c=n[u],d=c.value,h=o.value;c.percent=c.time/e,a||(s&&u!==i-1?$g(d,h,r):l&&Fg(d.colorStops,h.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-p:3===r?n[u].additiveValue=zg([],n[u].value,p,-1):Gg(r)&&(n[u].additiveValue=1===r?zg([],n[u].value,p,-1):Bg([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(l[n].percent>t);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,g=0===f?1:p((t-r.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var m=o?this._additiveValue:d?Ug:e[c];if(!Gg(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:i.rawValue;else if(Gg(s))1===s?Og(m,r[a],i[a],g):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=Ng(t[a][s],n[a][s],r)}}(m,r[a],i[a],g);else if(Hg(s)){var v=r[a],y=i[a],x=4===s;e[c]={type:x?"linear":"radial",x:Ng(v.x,y.x,g),y:Ng(v.y,y.y,g),colorStops:nh(v.colorStops,function(e,t){var n=y.colorStops[t];return{offset:Ng(e.offset,n.offset,g),color:Wg(Og([],e.color,n.color,g))}}),global:y.global},x?(e[c].x2=Ng(v.x2,y.x2,g),e[c].y2=Ng(v.y2,y.y2,g)):e[c].r=Ng(v.r,y.r,g)}else if(d)Og(m,r[a],i[a],g),o||(e[c]=Wg(m));else{var b=Ng(r[a],i[a],g);o?this._additiveValue=b:e[c]=b}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(lg(e[n],Ug),zg(Ug,Ug,r,1),e[n]=Wg(Ug)):1===t?zg(e[n],e[n],r,1):2===t&&Bg(e[n],e[n],r,1)},e}();const Yg=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Ud("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,oh(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new Xg(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=Wg(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,Vg(l),r),this._trackKeys.push(a)}s.addKeyframe(e,Vg(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new Uf({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return nh(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=Vg(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||oh(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function qg(){return(new Date).getTime()}const Zg=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return kd(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=qg()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,vf(function t(){e._running&&(vf(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=qg(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=qg(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=qg()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Yg(e,t.loop);return this.addAnimator(n),n},t}(op);var Kg=Id.domSupported,Qg=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:["touchstart","touchend","touchmove"],pointer:nh(e,function(e){var n=e.replace("mouse","pointer");return t.hasOwnProperty(n)?n:e})}}(),Jg=["mousemove","mouseup"],em=["pointermove","pointerup"],tm=!1;function nm(e){var t=e.pointerType;return"pen"===t||"touch"===t}function rm(e){e&&(e.zrByTouch=!0)}function im(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var om=function(e,t){this.stopPropagation=Oh,this.stopImmediatePropagation=Oh,this.preventDefault=Oh,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},am={mousedown:function(e){e=Sp(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Sp(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Sp(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){im(this,(e=Sp(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){tm=!0,e=Sp(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){tm||(e=Sp(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){rm(e=Sp(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),am.mousemove.call(this,e),am.mousedown.call(this,e)},touchmove:function(e){rm(e=Sp(this.dom,e)),this.handler.processGesture(e,"change"),am.mousemove.call(this,e)},touchend:function(e){rm(e=Sp(this.dom,e)),this.handler.processGesture(e,"end"),am.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&am.click.call(this,e)},pointerdown:function(e){am.mousedown.call(this,e)},pointermove:function(e){nm(e)||am.mousemove.call(this,e)},pointerup:function(e){am.mouseup.call(this,e)},pointerout:function(e){nm(e)||am.mouseout.call(this,e)}};th(["click","dblclick","contextmenu"],function(e){am[e]=function(t){t=Sp(this.dom,t),this.trigger(e,t)}});var sm={pointermove:function(e){nm(e)||sm.mousemove.call(this,e)},pointerup:function(e){sm.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function lm(e,t){var n=t.domHandlers;Id.pointerEventsSupported?th(Qg.pointer,function(r){cm(t,r,function(t){n[r].call(e,t)})}):(Id.touchEventsSupported&&th(Qg.touch,function(r){cm(t,r,function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}(t)})}),th(Qg.mouse,function(r){cm(t,r,function(i){i=wp(i),t.touching||n[r].call(e,i)})}))}function um(e,t){function n(n){cm(t,n,function(r){r=wp(r),im(e,r.target)||(r=function(e,t){return Sp(e.dom,new om(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))},{capture:!0})}Id.pointerEventsSupported?th(em,n):Id.touchEventsSupported||th(Jg,n)}function cm(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,_p(e.domTarget,t,n,r)}function dm(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Ap(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var hm=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};const pm=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new hm(t,am),Kg&&(r._globalHandlerScope=new hm(document,sm)),lm(r,r._localHandlerScope),r}return kd(t,e),t.prototype.dispose=function(){dm(this._localHandlerScope),Kg&&dm(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Kg&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?um(this,t):dm(t)}},t}(op);var fm=1;Id.hasGlobalWindow&&(fm=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var gm=fm,mm="#333",vm="#ccc",ym=jp,xm=5e-5;function bm(e){return e>xm||e<-5e-5}var wm=[],Sm=[],_m=[1,0,0,1,0,0],Am=Math.abs,km=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return bm(this.rotation)||bm(this.x)||bm(this.y)||bm(this.scaleX-1)||bm(this.scaleY-1)||bm(this.skewX)||bm(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):ym(n),e&&(t?Lp(n,e,n):Pp(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(ym(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(wm);var n=wm[0]<0?-1:1,r=wm[1]<0?-1:1,i=((wm[0]-n)*t+n)/wm[0]||0,o=((wm[1]-r)*t+r)/wm[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Op(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],Lp(Sm,e.invTransform,t),t=Sm);var n=this.originX,r=this.originY;(n||r)&&(_m[4]=n,_m[5]=r,Lp(Sm,t,_m),Sm[4]-=n,Sm[5]-=r,t=Sm),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&ep(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&ep(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Am(e[0]-1)>1e-10&&Am(e[3]-1)>1e-10?Math.sqrt(Am(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Mm(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;t[4]=-p*i-d*f*o,t[5]=-f*o-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=d*o,l&&Ep(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Cm=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Mm(e,t){for(var n=0;n<Cm.length;n++){var r=Cm[n];e[r]=t[r]}}const Im=km;var Tm={};function Dm(e,t){var n=Tm[t=t||Dd];n||(n=Tm[t]=new qf(500));var r=n.get(e);return null==r&&(r=Pd.measureText(e,t).width,n.put(e,r)),r}function jm(e,t,n,r){var i=Dm(e,t),o=Em(t),a=Lm(0,i,n),s=Rm(0,o,r);return new Xp(a,s,i,o)}function Pm(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return jm(i[0],t,n,r);for(var o=new Xp(0,0,0,0),a=0;a<i.length;a++){var s=jm(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function Lm(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Rm(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Em(e){return Dm("\u56fd",e)}function Nm(e,t){return"string"===typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Om(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Nm(r[0],n.width),u+=Nm(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+a,u+=s,d="middle";break;case"top":l+=a/2,u-=i,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=a-i,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,d="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var zm="__zr_normal__",Bm=Cm.concat(["ignore"]),Fm=rh(Cm,function(e,t){return e[t]=!0,e},{ignore:!1}),$m={},Vm=new Xp(0,0,0,0),Wm=function(){function e(e){this.id=Gd(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){var u=Vm;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition($m,n,u):Om($m,n,u),i.x=$m.x,i.y=$m.y,o=$m.align,a=$m.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=Nm(c[0],u.width),h=Nm(c[1],u.height)),l=!0,i.originX=-i.x+d+(r?0:u.x),i.originY=-i.y+h+(r?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],l||(i.originX=-p[0],i.originY=-p[1]));var f=null==n.inside?"string"===typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vm:mm},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"===typeof t&&lg(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,gg(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Zd(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"===typeof e)this.attrKV(e,t);else if(ph(e))for(var n=oh(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==zm)){var o=r.targetName,a=o?t[o]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Bm)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(zm,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===zm;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(Qd(o,e)>=0)||!t&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||i){i||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}Ud("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=Qd(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Qd(r,e),o=Qd(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];Zd(n,i),i.textConfig&&Zd(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=Zd({},r?this.textConfig:n.textConfig),Zd(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Bm.length;u++){var c=Bm[u],d=i&&Fm[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Im,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Zd(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this;var i=new Yg(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=Qd(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Hm(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Hm(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Hm(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;function n(e,n,r,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||o(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}})}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function Hm(e,t,n,r,i){var o=[];Xm(e,"",e,t,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(e,t){n.during(t)});for(var h=0;h<o.length;h++){var p=o[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function Gm(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Um(e,t,n){if(eh(t[n]))if(eh(e[n])||(e[n]=[]),gh(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Gm(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(eh(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?Gm(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else Gm(o,i,a);o.length=i.length}else e[n]=t[n]}function Xm(e,t,n,r,i,o,a,s){for(var l=oh(r),u=i.duration,c=i.delay,d=i.additive,h=i.setToFinal,p=!ph(o),f=e.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=r[v];if(null!=y&&null!=n[v]&&(p||o[v]))if(!ph(y)||eh(y)||vh(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}Xm(e,v,n[v],y,i,o&&o[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),g.push(v))}var x=g.length;if(!d&&x)for(var b=0;b<f.length;b++){if((S=f[b]).targetName===t)if(S.stopTracks(g)){var w=Qd(f,S);f.splice(w,1)}}if(i.force||(g=ih(g,function(e){return t=r[e],i=n[e],!(t===i||eh(t)&&eh(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,i));var t,i}),x=g.length),x>0||i.force&&!a.length){var S,_=void 0,A=void 0,k=void 0;if(s){A={},h&&(_={});for(b=0;b<x;b++){A[v=g[b]]=n[v],h?_[v]=r[v]:n[v]=r[v]}}else if(h){k={};for(b=0;b<x;b++){k[v=g[b]]=Vg(n[v]),Um(n,r,v)}}(S=new Yg(n,!1,!1,d?ih(f,function(e){return e.targetName===t}):null)).targetName=t,i.scope&&(S.scope=i.scope),h&&_&&S.whenWithKeys(0,_,g),k&&S.whenWithKeys(0,k,g),S.whenWithKeys(null==u?500:u,s?A:r,g).delay(c||0),e.addAnimator(S,t),a.push(S)}}Jd(Wm,op),Jd(Wm,Im);const Ym=Wm;var qm=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return kd(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Qd(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Qd(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new Xp(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(Xp.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(Ym);qm.prototype.type="group";const Zm=qm;var Km={},Qm={};var Jm,ev=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 mf,o=n.renderer||"canvas";Km[o]||(o=oh(Km)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new Km[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Id.node||Id.worker||s?null:new pm(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Id.touchEventsSupported:!!c)&&(l=bh(n.pointerSize,44)),this.handler=new of(i,a,u,a.root,l),this.animation=new Zg({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(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 mg(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=mg(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){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=qg();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=qg();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._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Zm&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){var e;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete Qm[e])},e}();function tv(e,t){var n=new ev(Gd(),e,t);return Qm[n.id]=n,n}var nv=1e-4;function rv(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 iv(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 ch(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function ov(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function av(e){return e.sort(function(e,t){return e-t}),e}function sv(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 lv(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 uv(e,t){var n=rh(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var r=Math.pow(10,t),i=nh(e,function(e){return(isNaN(e)?0:e)/n*r*100}),o=100*r,a=nh(i,function(e){return Math.floor(e)}),s=rh(a,function(e,t){return e+t},0),l=nh(i,function(e,t){return e-a[t]});s<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,h=l.length;d<h;++d)l[d]>u&&(u=l[d],c=d);++a[c],l[c]=0,++s}return nh(a,function(e){return e/r})}function cv(e,t){var n=Math.max(sv(e),sv(t)),r=e+t;return n>20?r:ov(r,n)}var dv=9007199254740991;function hv(e){var t=2*Math.PI;return(e%t+t)%t}function pv(e){return e>-1e-4&&e<nv}var fv=/^(?:(\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 gv(e){if(e instanceof Date)return e;if(ch(e)){var t=fv.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 mv(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 vv(e,t){var n=mv(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 yv(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i}function xv(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,o=e[r].close,a=0;a<2;a++)i[a]<=t&&(i[a]=t,o[a]=a?1:1-n),t=i[a],n=o[a];i[0]===i[1]&&o[0]*o[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function bv(e){var t=parseFloat(e);return t==e&&(0!==t||!ch(e)||e.indexOf("x")<=0)?t:NaN}function wv(e){return!isNaN(bv(e))}function Sv(){return Math.round(9*Math.random())}function _v(e,t){return 0===t?e:_v(t,e%t)}function Av(e,t){return null==e?t:null==t?e:e*t/_v(e,t)}function kv(e,t,n){return(t-e)*n+e}var Cv="series\0",Mv="\0_ec_\0";function Iv(e){return e instanceof Array?e:null==e?[]:[e]}function Tv(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 Dv=["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 jv(e){return!ph(e)||lh(e)||e instanceof Date?e:e.value}function Pv(e){return ph(e)&&!(e instanceof Array)}function Lv(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Ph();th(t,function(e,n){ph(e)||(t[n]=null)});var s=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||zv(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){th(r,function(i,o){if(i&&null!=i.id){var a=Ev(i.id),s=n.get(a);if(null!=s){var l=e[s];Ah(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}})}(s,e,a,t),r&&function(e,t){th(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)&&!zv(n)&&!zv(o)&&Rv("name",o,n))return e[i].newOption=n,void(t[r]=null)}})}(s,t),r||i?function(e,t,n){th(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||zv(r.existing)||r.existing&&null!=t.id&&!Rv("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}(s,t,i):o&&function(e,t){th(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}(s,t),function(e){var t=Ph();th(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),th(e,function(e){var n=e.newOption;Ah(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),th(e,function(e,n){var r=e.existing,i=e.newOption,o=e.keyInfo;if(ph(i)){if(o.name=null!=i.name?Ev(i.name):r?r.name:Cv+n,r)o.id=Ev(r.id);else if(null!=i.id)o.id=Ev(i.id);else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(t.get(o.id))}t.set(o.id,e)}})}(s),s}function Rv(e,t,n){var r=Nv(t[e],null),i=Nv(n[e],null);return null!=r&&null!=i&&r===i}function Ev(e){return Nv(e,"")}function Nv(e,t){return null==e?t:ch(e)?e:hh(e)||dh(e)?e+"":t}function Ov(e){var t=e.name;return!(!t||!t.indexOf(Cv))}function zv(e){return e&&null!=e.id&&0===Ev(e.id).indexOf(Mv)}function Bv(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?lh(t.dataIndex)?nh(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?lh(t.name)?nh(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Fv(){var e="__ec_inner_"+$v++;return function(t){return t[e]||(t[e]={})}}var $v=Sv();function Vv(e,t,n){var r=Wv(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=Uv(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 Wv(e,t){var n;if(ch(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Ph(),o={},a=!1;return th(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&&Qd(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 Hv={useDefault:!0,enableAll:!1,enableNone:!1},Gv={useDefault:!1,enableAll:!0,enableNone:!0};function Uv(e,t,n,r){r=r||Hv;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?(Ah(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(Ah(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 Xv(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Yv(e,t){var n=Ph(),r=[];return th(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function qv(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(hh(r))return ov(f=kv(n||0,r,i),o?Math.max(sv(n||0),sv(r)):t);if(ch(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 h=s&&s[c]?s[c]:0,p=l[c],f=kv(h,p,i);a[c]=ov(f,o?Math.max(sv(h),sv(p)):t)}}return a}var Zv="___EC__COMPONENT__CONTAINER___",Kv="___EC__EXTENDED_CLASS___";function Qv(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Jv(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return uh(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return kd(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)),Zd(t.prototype,e),t[Kv]=!0,t.extend=this.extend,t.superCall=ny,t.superApply=ry,t.superClass=r,t}}function ey(e,t){e.extend=t.extend}var ty=Math.round(10*Math.random());function ny(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 ry(e,t,n){return this.superClass.prototype[t].apply(e,n)}function iy(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){Ah(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=Qv(r);if(i.sub){if(i.sub!==Zv){var o=function(e){var n=t[e.main];n&&n[Zv]||((n=t[e.main]={})[Zv]=!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[Zv]&&(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=Qv(e),r=[],i=t[n.main];return i&&i[Zv]?th(i,function(e,t){t!==Zv&&r.push(e)}):r.push(i),r},e.hasClass=function(e){var n=Qv(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return th(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=Qv(e),r=t[n.main];return r&&r[Zv]}}function oy(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&&Qd(r,s)>=0||i&&Qd(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var ay=oy([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),sy=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return ay(this,e,t)},e}(),ly=new qf(50);function uy(e){if("string"===typeof e){var t=ly.get(e);return t&&t.image}return e}function cy(e,t,n,r,i){if(e){if("string"===typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=ly.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!hy(t=o.image)&&o.pending.push(a):((t=Pd.loadImage(e,dy,dy)).__zrImageSrc=e,ly.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function dy(){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 hy(e){return e&&e.width&&e.height}var py=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function fy(e,t,n,r,i,o){if(!n)return e.text="",void(e.isTruncated=!1);var a=(t+"").split("\n");o=gy(n,r,i,o);for(var s=!1,l={},u=0,c=a.length;u<c;u++)my(l,a[u],o),a[u]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}function gy(e,t,n,r){var i=Zd({},r=r||{});i.font=t,n=bh(n,"..."),i.maxIterations=bh(r.maxIterations,2);var o=i.minChar=bh(r.minChar,0);i.cnCharWidth=Dm("\u56fd",t);var a=i.ascCharWidth=Dm("a",t);i.placeholder=bh(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Dm(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 my(e,t,n){var r=n.containerWidth,i=n.font,o=n.contentWidth;if(!r)return e.textLine="",void(e.isTruncated=!1);var a=Dm(t,i);if(a<=r)return e.textLine=t,void(e.isTruncated=!1);for(var s=0;;s++){if(a<=o||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?vy(t,o,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Dm(t=t.substr(0,l),i)}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function vy(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 yy=function(){},xy=function(e){this.tokens=[],e&&(this.tokens=e)},by=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function wy(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 h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Nm(l.width,r.width)+p;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=Ay(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+p,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 yy;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"===typeof l.width?y.width=l.width:y.width=a?a[m]:Dm(v,c),m||d)u.push(new xy([y]));else{var x=(u[u.length-1]||(u[0]=new xy)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=y:(v||!b||s)&&x.push(y)}}}var Sy=rh(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function _y(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)||!!Sy[e]}function Ay(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"!==h){var p=Dm(h,t),f=!r&&!_y(h);(o.length?c+p>n:i+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=h,c=p)):f?(o.push(l),a.push(u),l=h,u=p):(o.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}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 ky="__zr_style_"+Math.round(10*Math.random()),Cy={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},My={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Cy[ky]=!0;var Iy=["z","z2","invisible"],Ty=["invisible"],Dy=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype._init=function(t){for(var n=oh(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){jy.copy(e.getBoundingRect()),e.transform&&jy.applyTransform(e.transform);return Py.width=t,Py.height=n,!jy.intersect(Py)}(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 Xp(0,0,0,0)),t?Xp.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 Xp(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:Zd(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 Rh(Cy,e)},t.prototype.useStyle=function(e){e[ky]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[ky]},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,Iy)},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=oh(u),d=0;d<c.length;d++){(p=c[d])in s&&(s[p]=s[p],this.style[p]=u[p])}var h=oh(s);for(d=0;d<h.length;d++){var p=h[d];this.style[p]=this.style[p]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Ty:Iy;for(d=0;d<f.length;d++){p=f[d];n&&null!=n[p]?this[p]=n[p]:l&&null!=r[p]&&(this[p]=r[p])}},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 Zd(e,t),e},t.prototype.getAnimationStyleProps=function(){return My},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3}(),t}(Ym),jy=new Xp(0,0,0,0),Py=new Xp(0,0,0,0);const Ly=Dy;var Ry=Math.min,Ey=Math.max,Ny=Math.sin,Oy=Math.cos,zy=2*Math.PI,By=Bh(),Fy=Bh(),$y=Bh();function Vy(e,t,n){if(0!==e.length){for(var r=e[0],i=r[0],o=r[0],a=r[1],s=r[1],l=1;l<e.length;l++)r=e[l],i=Ry(i,r[0]),o=Ey(o,r[0]),a=Ry(a,r[1]),s=Ey(s,r[1]);t[0]=i,t[1]=a,n[0]=o,n[1]=s}}function Wy(e,t,n,r,i,o){i[0]=Ry(e,n),i[1]=Ry(t,r),o[0]=Ey(e,n),o[1]=Ey(t,r)}var Hy=[],Gy=[];function Uy(e,t,n,r,i,o,a,s,l,u){var c=Rf,d=jf,h=c(e,n,i,a,Hy);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,i,a,Hy[p]);l[0]=Ry(f,l[0]),u[0]=Ey(f,u[0])}h=c(t,r,o,s,Gy);for(p=0;p<h;p++){var g=d(t,r,o,s,Gy[p]);l[1]=Ry(g,l[1]),u[1]=Ey(g,u[1])}l[0]=Ry(e,l[0]),u[0]=Ey(e,u[0]),l[0]=Ry(a,l[0]),u[0]=Ey(a,u[0]),l[1]=Ry(t,l[1]),u[1]=Ey(t,u[1]),l[1]=Ry(s,l[1]),u[1]=Ey(s,u[1])}function Xy(e,t,n,r,i,o,a,s){var l=Ff,u=zf,c=Ey(Ry(l(e,n,i),1),0),d=Ey(Ry(l(t,r,o),1),0),h=u(e,n,i,c),p=u(t,r,o,d);a[0]=Ry(e,i,h),a[1]=Ry(t,o,p),s[0]=Ey(e,i,h),s[1]=Ey(t,o,p)}function Yy(e,t,n,r,i,o,a,s,l){var u=tp,c=np,d=Math.abs(i-o);if(d%zy<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(By[0]=Oy(i)*n+e,By[1]=Ny(i)*r+t,Fy[0]=Oy(o)*n+e,Fy[1]=Ny(o)*r+t,u(s,By,Fy),c(l,By,Fy),(i%=zy)<0&&(i+=zy),(o%=zy)<0&&(o+=zy),i>o&&!a?o+=zy:i<o&&a&&(i+=zy),a){var h=o;o=i,i=h}for(var p=0;p<o;p+=Math.PI/2)p>i&&($y[0]=Oy(p)*n+e,$y[1]=Ny(p)*r+t,u(s,$y,s),c(l,$y,l))}var qy={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zy=[],Ky=[],Qy=[],Jy=[],ex=[],tx=[],nx=Math.min,rx=Math.max,ix=Math.cos,ox=Math.sin,ax=Math.abs,sx=Math.PI,lx=2*sx,ux="undefined"!==typeof Float32Array,cx=[];function dx(e){return Math.round(e/sx*1e8)/1e8%2*sx}function hx(e,t){var n=dx(e[0]);n<0&&(n+=lx);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=lx?i=n+lx:t&&n-i>=lx?i=n-lx:!t&&n>i?i=n+(lx-dx(n-i)):t&&n<i&&(i=n-(lx-dx(i-n))),e[0]=n,e[1]=i}var px=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=ax(n/gm/e)||0,this._uy=ax(n/gm/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(qy.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=ax(e-this._xi),r=ax(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(qy.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(qy.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(qy.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(),cx[0]=r,cx[1]=i,hx(cx,o),r=cx[0];var a=(i=cx[1])-r;return this.addData(qy.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=ix(i)*n+e,this._yi=ox(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(qy.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(qy.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||!ux||(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();ux&&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,ux&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Qy[0]=Qy[1]=ex[0]=ex[1]=Number.MAX_VALUE,Jy[0]=Jy[1]=tx[0]=tx[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 qy.M:n=i=t[e++],r=o=t[e++],ex[0]=i,ex[1]=o,tx[0]=i,tx[1]=o;break;case qy.L:Wy(n,r,t[e],t[e+1],ex,tx),n=t[e++],r=t[e++];break;case qy.C:Uy(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],ex,tx),n=t[e++],r=t[e++];break;case qy.Q:Xy(n,r,t[e++],t[e++],t[e],t[e+1],ex,tx),n=t[e++],r=t[e++];break;case qy.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];s&&(i=ix(h)*c+l,o=ox(h)*d+u),Yy(l,u,c,d,h,p,f,ex,tx),n=ix(p)*c+l,r=ox(p)*d+u;break;case qy.R:Wy(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],ex,tx);break;case qy.Z:n=i,r=o}tp(Qy,Qy,ex),np(Jy,Jy,tx)}return 0===e&&(Qy[0]=Qy[1]=Jy[0]=Jy[1]=0),new Xp(Qy[0],Qy[1],Jy[0]-Qy[0],Jy[1]-Qy[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 h=e[d++],p=1===d;p&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(h){case qy.M:i=a=e[d++],o=s=e[d++];break;case qy.L:var g=e[d++],m=(x=e[d++])-o;(ax(T=g-i)>n||ax(m)>r||d===t-1)&&(f=Math.sqrt(T*T+m*m),i=g,o=x);break;case qy.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),b=e[d++],w=e[d++];f=Of(i,o,v,y,g,x,b,w,10),i=b,o=w;break;case qy.Q:f=Wf(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case qy.A:var S=e[d++],_=e[d++],A=e[d++],k=e[d++],C=e[d++],M=e[d++],I=M+C;d+=1,p&&(a=ix(C)*A+S,s=ox(C)*k+_),f=rx(A,k)*nx(lx,Math.abs(M)),i=ix(I)*A+S,o=ox(I)*k+_;break;case qy.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case qy.Z:var T=a-i;m=s-o;f=Math.sqrt(T*T+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,h=this.data,p=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 b=0;b<g;){var w=h[b++],S=1===b;switch(S&&(n=i=h[b],r=o=h[b+1]),w!==qy.L&&x>0&&(e.lineTo(c,d),x=0),w){case qy.M:n=i=h[b++],r=o=h[b++],e.moveTo(i,o);break;case qy.L:a=h[b++],s=h[b++];var _=ax(a-i),A=ax(s-o);if(_>p||A>f){if(m){if(v+(Y=l[y++])>u){var k=(u-v)/Y;e.lineTo(i*(1-k)+a*k,o*(1-k)+s*k);break e}v+=Y}e.lineTo(a,s),i=a,o=s,x=0}else{var C=_*_+A*A;C>x&&(c=a,d=s,x=C)}break;case qy.C:var M=h[b++],I=h[b++],T=h[b++],D=h[b++],j=h[b++],P=h[b++];if(m){if(v+(Y=l[y++])>u){Ef(i,M,T,j,k=(u-v)/Y,Zy),Ef(o,I,D,P,k,Ky),e.bezierCurveTo(Zy[1],Ky[1],Zy[2],Ky[2],Zy[3],Ky[3]);break e}v+=Y}e.bezierCurveTo(M,I,T,D,j,P),i=j,o=P;break;case qy.Q:M=h[b++],I=h[b++],T=h[b++],D=h[b++];if(m){if(v+(Y=l[y++])>u){$f(i,M,T,k=(u-v)/Y,Zy),$f(o,I,D,k,Ky),e.quadraticCurveTo(Zy[1],Ky[1],Zy[2],Ky[2]);break e}v+=Y}e.quadraticCurveTo(M,I,T,D),i=T,o=D;break;case qy.A:var L=h[b++],R=h[b++],E=h[b++],N=h[b++],O=h[b++],z=h[b++],B=h[b++],F=!h[b++],$=E>N?E:N,V=ax(E-N)>.001,W=O+z,H=!1;if(m)v+(Y=l[y++])>u&&(W=O+z*(u-v)/Y,H=!0),v+=Y;if(V&&e.ellipse?e.ellipse(L,R,E,N,B,O,W,F):e.arc(L,R,$,O,W,F),H)break e;S&&(n=ix(O)*E+L,r=ox(O)*N+R),i=ix(W)*E+L,o=ox(W)*N+R;break;case qy.R:n=i=h[b],r=o=h[b+1],a=h[b++],s=h[b++];var G=h[b++],U=h[b++];if(m){if(v+(Y=l[y++])>u){var X=u-v;e.moveTo(a,s),e.lineTo(a+nx(X,G),s),(X-=G)>0&&e.lineTo(a+G,s+nx(X,U)),(X-=U)>0&&e.lineTo(a+rx(G-X,0),s+U),(X-=G)>0&&e.lineTo(a,s+rx(U-X,0));break e}v+=Y}e.rect(a,s,G,U);break;case qy.Z:if(m){var Y;if(v+(Y=l[y++])>u){k=(u-v)/Y;e.lineTo(i*(1-k)+n*k,o*(1-k)+r*k);break e}v+=Y}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=qy,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();const fx=px;function gx(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 mx(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;return!(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)&&Nf(e,t,n,r,i,o,a,s,u,c,null)<=d/2}function vx(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;return!(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)&&Vf(e,t,n,r,i,o,s,l,null)<=u/2}var yx=2*Math.PI;function xx(e){return(e%=yx)<0&&(e+=yx),e}var bx=2*Math.PI;function Sx(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)%bx<1e-4)return!0;if(o){var d=r;r=xx(i),i=xx(d)}else r=xx(r),i=xx(i);r>i&&(i+=bx);var h=Math.atan2(l,s);return h<0&&(h+=bx),h>=r&&h<=i||h+bx>=r&&h+bx<=i}function _x(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 Ax=fx.CMD,kx=2*Math.PI;var Cx=[-1,-1,-1],Mx=[-1,-1];function Ix(){var e=Mx[0];Mx[0]=Mx[1],Mx[1]=e}function Tx(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=Lf(t,r,o,s,u,Cx);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<c;g++){var m=Cx[g],v=0===m||1===m?.5:1;jf(e,n,i,a,m)<l||(h<0&&(h=Rf(t,r,o,s,Mx),Mx[1]<Mx[0]&&h>1&&Ix(),p=jf(t,r,o,s,Mx[0]),h>1&&(f=jf(t,r,o,s,Mx[1]))),2===h?m<Mx[0]?d+=p<t?v:-v:m<Mx[1]?d+=f<p?v:-v:d+=s<f?v:-v:m<Mx[0]?d+=p<t?v:-v:d+=s<p?v:-v)}return d}function Dx(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(Tf(o))Df(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Tf(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=wf(u),h=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),h>=0&&h<=1&&(i[l++]=h)}}return l}(t,r,o,s,Cx);if(0===l)return 0;var u=Ff(t,r,o);if(u>=0&&u<=1){for(var c=0,d=zf(t,r,o,u),h=0;h<l;h++){var p=0===Cx[h]||1===Cx[h]?.5:1;zf(e,n,i,Cx[h])<a||(Cx[h]<u?c+=d<t?p:-p:c+=o<d?p:-p)}return c}p=0===Cx[0]||1===Cx[0]?.5:1;return zf(e,n,i,Cx[0])<a?0:o<t?p:-p}function jx(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Cx[0]=-l,Cx[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=kx-1e-4){r=0,i=kx;var c=o?1:-1;return a>=Cx[0]+e&&a<=Cx[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=kx,i+=kx);for(var h=0,p=0;p<2;p++){var f=Cx[p];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=kx+g),(g>=r&&g<=i||g+kx>=r&&g+kx<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),h+=c)}}return h}function Px(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,h=0,p=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===Ax.M&&m>1&&(n||(d+=_x(h,p,f,g,r,i))),y&&(f=h=u[m],g=p=u[m+1]),v){case Ax.M:h=f=u[m++],p=g=u[m++];break;case Ax.L:if(n){if(gx(h,p,u[m],u[m+1],t,r,i))return!0}else d+=_x(h,p,u[m],u[m+1],r,i)||0;h=u[m++],p=u[m++];break;case Ax.C:if(n){if(mx(h,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=Tx(h,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;h=u[m++],p=u[m++];break;case Ax.Q:if(n){if(vx(h,p,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=Dx(h,p,u[m++],u[m++],u[m],u[m+1],r,i)||0;h=u[m++],p=u[m++];break;case Ax.A:var x=u[m++],b=u[m++],w=u[m++],S=u[m++],_=u[m++],A=u[m++];m+=1;var k=!!(1-u[m++]);o=Math.cos(_)*w+x,a=Math.sin(_)*S+b,y?(f=o,g=a):d+=_x(h,p,o,a,r,i);var C=(r-x)*S/w+x;if(n){if(Sx(x,b,S,_,_+A,k,t,C,i))return!0}else d+=jx(x,b,S,_,_+A,k,C,i);h=Math.cos(_+A)*w+x,p=Math.sin(_+A)*S+b;break;case Ax.R:if(f=h=u[m++],g=p=u[m++],o=f+u[m++],a=g+u[m++],n){if(gx(f,g,o,g,t,r,i)||gx(o,g,o,a,t,r,i)||gx(o,a,f,a,t,r,i)||gx(f,a,f,g,t,r,i))return!0}else d+=_x(o,g,o,a,r,i),d+=_x(f,a,f,g,r,i);break;case Ax.Z:if(n){if(gx(h,p,f,g,t,r,i))return!0}else d+=_x(h,p,f,g,r,i);h=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(d+=_x(h,p,f,g,r,i)||0),0!==d}var Lx=Kd({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Cy),Rx={style:Kd({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},My.style)},Ex=Cm.concat(["invisible","culling","z","z2","zlevel","parent"]);const Nx=function(e){function t(t){return e.call(this,t)||this}return kd(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<Ex.length;++s)i[Ex[s]]=this[Ex[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=oh(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?Zd(this.style,a):this.useStyle(a):"shape"===o?Zd(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(ch(e)){var t=mg(e,0);return t>.5?mm:t>.2?"#eee":vm}if(e)return vm}return mm},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(ch(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===mg(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 fx(!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 Px(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Px(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:Zd(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Rh(Lx,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=Zd({},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=Zd({},r.shape),Zd(s,n.shape)):(s=Zd({},i?this.shape:r.shape),Zd(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=Zd({},this.shape);for(var u={},c=oh(s),d=0;d<c.length;d++){var h=c[d];"object"===typeof s[h]?this.shape[h]=s[h]:u[h]=s[h]}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 Rx},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 kd(n,t),n.prototype.getDefaultStyle=function(){return Xd(e.style)},n.prototype.getDefaultShape=function(){return Xd(e.shape)},n}(t);for(var r in e)"function"===typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7}(),t}(Ly);var Ox=Kd({strokeFirst:!0,font:Dd,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Lx),zx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(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 Rh(Ox,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=Pm(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}(Ly);zx.prototype.type="tspan";const Bx=zx;var Fx=Kd({x:0,y:0},Cy),$x={style:Kd({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},My.style)};var Vx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.createStyle=function(e){return Rh(Fx,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,i=(r=t.image)&&"string"!==typeof r&&r.width&&r.height?t.image:this.__image;if(!i)return 0;var o="width"===e?"height":"width",a=t[o];return null==a?i[e]:i[e]/i[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return $x},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Xp(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Ly);Vx.prototype.type="image";const Wx=Vx;var Hx=Math.round;function Gx(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?(Hx(2*r)===Hx(2*i)&&(e.x1=e.x2=Xx(r,s,!0)),Hx(2*o)===Hx(2*a)&&(e.y1=e.y2=Xx(o,s,!0)),e):e}}function Ux(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=Xx(r,s,!0),e.y=Xx(i,s,!0),e.width=Math.max(Xx(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Xx(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Xx(e,t,n){if(!t)return e;var r=Hx(2*e);return(r+Hx(t))%2===0?r/2:(r+(n?1:-1))/2}var Yx=function(){this.x=0,this.y=0,this.width=0,this.height=0},qx={},Zx=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new Yx},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Ux(qx,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}(Nx);Zx.prototype.type="rect";const Kx=Zx;var Qx={fill:"#000"},Jx={style:Kd({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},My.style)},eb=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Qx,n.attr(t),n}return kd(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,sb(e=this.style),th(e.rich,sb),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 Xp(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||Qx},t.prototype.setTextContent=function(e){0},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return Zd(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=oh(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},Zd(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Jx},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||Dd,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=Em(o),l=bh(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=!1,h=t.width,p=(n=null==h||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?Ay(e,t.font,h,"breakAll"===r,0).lines:[]).length*l,f=bh(t.height,p);if(p>f&&c){var g=Math.floor(f/l);d=d||n.length>g,n=n.slice(0,g)}if(e&&a&&null!=h)for(var m=gy(h,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v={},y=0;y<n.length;y++)my(v,n[y],m),n[y]=v.textLine,d=d||v.isTruncated;var x=f,b=0;for(y=0;y<n.length;y++)b=Math.max(Dm(n[y],o),b);null==h&&(h=b);var w=b;return i&&(x+=i[0]+i[2],w+=i[1]+i[3],h+=i[1]+i[3]),u&&(w=h),{lines:n,height:f,outerWidth:w,outerHeight:x,lineHeight:l,calculatedLineHeight:s,contentWidth:b,contentHeight:p,width:h,isTruncated:d}}(db(e),e),i=hb(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle;this.isTruncated=!!r.isTruncated;var h=e.x||0,p=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=h,v=Rm(p,r.contentHeight,g);if(i||n){var y=Lm(h,s,f),x=Rm(p,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=cb(h,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var b=0,w=!1,S=(ub("fill"in e?e.fill:(w=!0,d.fill))),_=(lb("stroke"in e?e.stroke:o||d.autoStroke&&!w?null:(b=2,d.stroke))),A=e.textShadowBlur>0,k=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),C=r.calculatedLineHeight,M=0;M<u.length;M++){var I=this._getOrCreateChild(Bx),T=I.createStyle();I.useStyle(T),T.text=u[M],T.x=m,T.y=v,f&&(T.textAlign=f),T.textBaseline="middle",T.opacity=e.opacity,T.strokeFirst=!0,A&&(T.shadowBlur=e.textShadowBlur||0,T.shadowColor=e.textShadowColor||"transparent",T.shadowOffsetX=e.textShadowOffsetX||0,T.shadowOffsetY=e.textShadowOffsetY||0),T.stroke=_,T.fill=S,_&&(T.lineWidth=e.lineWidth||b,T.lineDash=e.lineDash,T.lineDashOffset=e.lineDashOffset||0),T.font=t,ob(T,e),v+=c,k&&I.setBoundingRect(new Xp(Lm(T.x,l,T.textAlign),Rm(T.y,C,T.textBaseline),l,C))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new by;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=py.lastIndex=0;null!=(r=py.exec(e));){var u=r.index;u>l&&wy(n,e.substring(l,u),t,s),wy(n,r[2],t,s,r[1]),l=py.lastIndex}l<e.length&&wy(n,e.substring(l,e.length),t,s);var c=[],d=0,h=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow,m={};function v(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}e:for(var y=0;y<n.lines.length;y++){for(var x=n.lines[y],b=0,w=0,S=0;S<x.tokens.length;S++){var _=(R=x.tokens[S]).styleName&&t.rich[R.styleName]||{},A=R.textPadding=_.padding,k=A?A[1]+A[3]:0,C=R.font=_.font||t.font;R.contentHeight=Em(C);var M=bh(_.height,R.contentHeight);if(R.innerHeight=M,A&&(M+=A[0]+A[2]),R.height=M,R.lineHeight=wh(_.lineHeight,t.lineHeight,M),R.align=_&&_.align||t.align,R.verticalAlign=_&&_.verticalAlign||"middle",g&&null!=o&&d+R.lineHeight>o){var I=n.lines.length;S>0?(x.tokens=x.tokens.slice(0,S),v(x,w,b),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y),n.isTruncated=n.isTruncated||n.lines.length<I;break e}var T=_.width,D=null==T||"auto"===T;if("string"===typeof T&&"%"===T.charAt(T.length-1))R.percentWidth=T,c.push(R),R.contentWidth=Dm(R.text,C);else{if(D){var j=_.backgroundColor,P=j&&j.image;P&&hy(P=uy(P))&&(R.width=Math.max(R.width,P.width*M/P.height))}var L=f&&null!=i?i-w:null;null!=L&&L<R.width?!D||L<k?(R.text="",R.width=R.contentWidth=0):(fy(m,R.text,L-k,C,t.ellipsis,{minChar:t.truncateMinChar}),R.text=m.text,n.isTruncated=n.isTruncated||m.isTruncated,R.width=R.contentWidth=Dm(R.text,C)):R.contentWidth=Dm(R.text,C)}R.width+=k,w+=R.width,_&&(b=Math.max(b,R.lineHeight))}v(x,w,b)}for(n.outerWidth=n.width=bh(i,h),n.outerHeight=n.height=bh(o,d),n.contentHeight=d,n.contentWidth=h,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),y=0;y<c.length;y++){var R,E=(R=c[y]).percentWidth;R.width=parseInt(E,10)/100*n.width}return n}(db(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;this.isTruncated=!!t.isTruncated;var d=Lm(a,r,u),h=Rm(s,i,c),p=d,f=h;o&&(p+=o[3],f+=o[0]);var g=p+n;hb(e)&&this._renderBackground(e,e,d,h,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,b=x.length,w=y.lineHeight,S=y.width,_=0,A=p,k=g,C=b-1,M=void 0;_<b&&(!(M=x[_]).align||"left"===M.align);)this._placeToken(M,e,w,f,A,"left",m),S-=M.width,A+=M.width,_++;for(;C>=0&&"right"===(M=x[C]).align;)this._placeToken(M,e,w,f,k,"right",m),S-=M.width,k-=M.width,C--;for(A+=(n-(A-p)-(g-k)-S)/2;_<=C;)M=x[_],this._placeToken(M,e,w,f,A+M.width/2,"center",m),A+=M.width,_++;f+=w}},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&&hb(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=cb(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(Bx),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=ub("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=lb("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;p.text=e.text,p.x=i,p.y=u,x&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=e.font||Dd,p.opacity=wh(s.opacity,t.opacity,1),ob(p,s),y&&(p.lineWidth=wh(s.lineWidth,t.lineWidth,m),p.lineDash=bh(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var b=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new Xp(Lm(p.x,b,p.textAlign),Rm(p.y,w,p.textBaseline),b,w))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,g=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(Kx)).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(p)(l=a.style).fill=u||null,l.fillOpacity=bh(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(Wx)).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=bh(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=wh(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return ab(e)&&(t=[e.fontStyle,e.fontWeight,ib(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&kh(t)||e.textFont||e.font},t}(Ly),tb={left:!0,right:1,center:1},nb={top:1,bottom:1,middle:1},rb=["fontStyle","fontWeight","fontSize","fontFamily"];function ib(e){return"string"!==typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function ob(e,t){for(var n=0;n<rb.length;n++){var r=rb[n],i=t[r];null!=i&&(e[r]=i)}}function ab(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function sb(e){if(e){e.font=eb.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||tb[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||nb[n]?n:"top",e.padding&&(e.padding=_h(e.padding))}}function lb(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ub(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function cb(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function db(e){var t=e.text;return null!=t&&(t+=""),t}function hb(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}const pb=eb;var fb=Fv(),gb=function(e,t,n,r){if(r){var i=fb(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart","group"===r.type&&r.traverse(function(r){var i=fb(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType="chart"})}},mb=1,vb={},yb=Fv(),xb=Fv(),bb=["emphasis","blur","select"],wb=["normal","emphasis","blur","select"],Sb=10,_b="highlight",Ab="downplay",kb="select",Cb="unselect",Mb="toggleSelect";function Ib(e){return null!=e&&"none"!==e}function Tb(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Db(e){Tb(e,"emphasis",2)}function jb(e){2===e.hoverState&&Tb(e,"normal",0)}function Pb(e){Tb(e,"blur",1)}function Lb(e){1===e.hoverState&&Tb(e,"normal",0)}function Rb(e){e.selected=!0}function Eb(e){e.selected=!1}function Nb(e,t,n){t(e,n)}function Ob(e,t,n){Nb(e,t,n),e.isGroup&&e.traverse(function(e){Nb(e,t,n)})}function zb(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 Bb(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&Qd(n,"select")>=0,o=!1;if(e instanceof Nx){var a=yb(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(Ib(s)||Ib(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=Zd({},r),(u=Zd({},u)).fill=s):!Ib(u.fill)&&Ib(s)?(o=!0,r=Zd({},r),(u=Zd({},u)).fill=yg(s)):!Ib(u.stroke)&&Ib(l)&&(o||(r=Zd({},r),u=Zd({},u)),u.stroke=yg(l)),r.style=u}}if(r&&null==r.z2){o||(r=Zd({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:Sb)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=Qd(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=Zd({},n),a=Zd({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=Zd({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function Fb(e){e.stateProxy=Bb;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bb),n&&(n.stateProxy=Bb)}function $b(e,t){!qb(e,t)&&!e.__highByOuter&&Ob(e,Db)}function Vb(e,t){!qb(e,t)&&!e.__highByOuter&&Ob(e,jb)}function Wb(e,t){e.__highByOuter|=1<<(t||0),Ob(e,Db)}function Hb(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ob(e,jb)}function Gb(e){Ob(e,Pb)}function Ub(e){Ob(e,Lb)}function Xb(e){Ob(e,Rb)}function Yb(e){Ob(e,Eb)}function qb(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zb(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var o=xb(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse(function(e){Lb(e)}),a&&n.push(i)),o.isBlured=!1}),th(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Kb(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&&Ub(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||Pb(e)}),eh(t))o(e.getData(),t);else if(ph(t))for(var c=oh(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),xb(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 Qb(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){xb(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Pb(e)})}}}function Jb(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"===fb(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function ew(e){th(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Xb(t):Yb(t)})})}function tw(e){var t=[];return e.eachSeries(function(e){th(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 nw(e,t,n){lw(e,!0),Ob(e,Fb),iw(e,t,n)}function rw(e,t,n,r){r?function(e){lw(e,!1)}(e):nw(e,t,n)}function iw(e,t,n){var r=fb(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var ow=["emphasis","blur","select"],aw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function sw(e,t,n,r){n=n||"itemStyle";for(var i=0;i<ow.length;i++){var o=ow[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[aw[n]]()}}function lw(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 uw(e){return!(!e||!e.__highDownDispatcher)}function cw(e){var t=e.type;return t===kb||t===Cb||t===Mb}function dw(e){var t=e.type;return t===_b||t===Ab}var hw=Fv();function pw(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=bh(r.duration,200),u=bh(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)),uh(c)&&(c=c(n,i)),uh(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}function fw(e,t,n,r,i,o,a){var s,l=!1;uh(i)?(a=o,o=i,i=null):ph(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=pw(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 gw(e,t,n,r,i,o){fw("update",e,t,n,r,i,o)}function mw(e,t,n,r,i,o){fw("enter",e,t,n,r,i,o)}function vw(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 yw(e,t,n,r,i,o){vw(e)||fw("leave",e,t,n,r,i,o)}function xw(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),yw(e,{style:{opacity:0}},t,n,r)}function bw(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||xw(e,t,n,r)}):xw(e,t,n,r)}function ww(e){hw(e).oldStyle=e.style}var Sw={};function _w(e,t){for(var n=0;n<bb.length;n++){var r=bb[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)}function Aw(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=uh(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<bb.length;u++){var c=bb[u],d=t[c];l[c]=bh(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function kw(e,t,n,r){n=n||Sw;for(var i=e instanceof pb,o=!1,a=0;a<wb.length;a++){if((h=t[wb[a]])&&h.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new pb,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=Aw(n,t),u=t.normal,c=!!u.getShallow("show"),d=Mw(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(Iw(u,n,!1));for(a=0;a<bb.length;a++){var h,p=bb[a];if(h=t[p]){var f=s.ensureState(p),g=!!bh(h.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=Mw(h,r&&r[p],n,!0,!i),f.style.text=l[p],!i)e.ensureState(p).textConfig=Iw(h,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&&(Rw(s).setLabelText=function(e){var r=Aw(n,t,e);_w(s,r)})}else s&&(s.ignore=!0);e.dirty()}function Cw(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<bb.length;r++){var i=bb[r];n[i]=e.getModel([i,t])}return n}function Mw(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||Sw;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||Sw).rich;if(n){t=t||{};for(var r=oh(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]);Pw(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h);Pw(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&Zd(o,t),o}function Iw(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=bh(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 Tw=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Dw=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],jw=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Pw(e,t,n,r,i,o,a,s){n=!i&&n||Sw;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=bh(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 h=bh(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=bh(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=bh(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<Tw.length;g++){var m=Tw[g];null!=(y=bh(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<Dw.length;g++){m=Dw[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<jw.length;g++){var y;m=jw[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)}}function Lw(e,t){var n=t&&t.getModel("textStyle");return kh([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 Rw=Fv();function Ew(e,t,n,r){if(e){var i=Rw(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)}}function Nw(e,t,n,r,i){var o=Rw(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=bh(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?mw:gw)(e,{percent:1},r,t,null,function(r){var u=qv(n,o.precision,s,l,r);o.interpolatedValue=1===r?null:u;var c=Aw({labelDataIndex:t,labelFetcher:i,defaultText:a?a(u):u+""},o.statesModels,u);_w(e,c)})}}var Ow=["textStyle","color"],zw=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Bw=new pb;const Fw=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Ow):null)},e.prototype.getFont=function(){return Lw({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<zw.length;n++)t[zw[n]]=this.getShallow(zw[n]);return Bw.useStyle(t),Bw.update(),Bw.getBoundingRect()},e}();var $w=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Vw=oy($w),Ww=function(){function e(){}return e.prototype.getLineStyle=function(e){return Vw(this,e)},e}(),Hw=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Gw=oy(Hw),Uw=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Gw(this,e,t)},e}(),Xw=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){Yd(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)(Xd(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(!Id.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}();Jv(Xw),function(e){var t=["__\0is_clz",ty++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}(Xw),Jd(Xw,Ww),Jd(Xw,Uw),Jd(Xw,sy),Jd(Xw,Fw);const Yw=Xw;var qw=Math.round(10*Math.random());function Zw(e){return[e||"",qw++].join("_")}function Kw(e,t){return Yd(Yd({},e,!0),t,!0)}var Qw="ZH",Jw="EN",eS=Jw,tS={},nS={},rS=Id.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||eS).toUpperCase().indexOf(Qw)>-1?Qw:eS;function iS(e,t){e=e.toUpperCase(),nS[e]=new Yw(t),tS[e]=t}function oS(e){return nS[e]}iS(Jw,{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",custom:"Custom chart",chart:"Chart"}},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:". "}}}}),iS(Qw,{time:{month:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],dayOfWeekAbbr:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53cd\u9009"}},toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe",custom:"\u81ea\u5b9a\u4e49\u56fe\u8868",chart:"\u56fe\u8868"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}});var aS=1e3,sS=6e4,lS=36e5,uS=864e5,cS=31536e6,dS={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}"},hS="{yyyy}-{MM}-{dd}",pS={year:"{yyyy}",month:"{yyyy}-{MM}",day:hS,hour:hS+" "+dS.hour,minute:hS+" "+dS.minute,second:hS+" "+dS.second,millisecond:dS.none},fS=["year","month","day","hour","minute","second","millisecond"],gS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mS(e,t){return"0000".substr(0,t-(e+="").length)+e}function vS(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 yS(e){return e===vS(e)}function xS(e,t,n,r){var i=gv(e),o=i[SS(n)](),a=i[_S(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[AS(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[kS(n)](),d=(c-1)%12+1,h=i[CS(n)](),p=i[MS(n)](),f=i[IS(n)](),g=c>=12?"pm":"am",m=g.toUpperCase(),v=(r instanceof Yw?r:oS(r||rS)||nS[eS]).getModel("time"),y=v.get("month"),x=v.get("monthAbbr"),b=v.get("dayOfWeek"),w=v.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,mS(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,mS(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,mS(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,mS(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,mS(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,mS(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,mS(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,mS(f,3)).replace(/{S}/g,f+"")}function bS(e,t){var n=gv(e),r=n[_S(t)]()+1,i=n[AS(t)](),o=n[kS(t)](),a=n[CS(t)](),s=n[MS(t)](),l=0===n[IS(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,h=d&&1===i;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function wS(e,t,n){var r=hh(e)?gv(e):e;switch(t=t||bS(e,n)){case"year":return r[SS(n)]();case"half-year":return r[_S(n)]()>=6?1:0;case"quarter":return Math.floor((r[_S(n)]()+1)/4);case"month":return r[_S(n)]();case"day":return r[AS(n)]();case"half-day":return r[kS(n)]()/24;case"hour":return r[kS(n)]();case"minute":return r[CS(n)]();case"second":return r[MS(n)]();case"millisecond":return r[IS(n)]()}}function SS(e){return e?"getUTCFullYear":"getFullYear"}function _S(e){return e?"getUTCMonth":"getMonth"}function AS(e){return e?"getUTCDate":"getDate"}function kS(e){return e?"getUTCHours":"getHours"}function CS(e){return e?"getUTCMinutes":"getMinutes"}function MS(e){return e?"getUTCSeconds":"getSeconds"}function IS(e){return e?"getUTCMilliseconds":"getMilliseconds"}function TS(e){return e?"setUTCFullYear":"setFullYear"}function DS(e){return e?"setUTCMonth":"setMonth"}function jS(e){return e?"setUTCDate":"setDate"}function PS(e){return e?"setUTCHours":"setHours"}function LS(e){return e?"setUTCMinutes":"setMinutes"}function RS(e){return e?"setUTCSeconds":"setSeconds"}function ES(e){return e?"setUTCMilliseconds":"setMilliseconds"}function NS(e){if(!wv(e))return ch(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function OS(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 zS=_h;function BS(e,t,n){function r(e){return e&&kh(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?gv(e):e;if(!isNaN(+s))return xS(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return dh(e)?r(e):hh(e)&&i(e)?e+"":"-";var l=bv(e);return i(l)?NS(l):dh(e)?r(e):"boolean"===typeof e?e+"":"-"}var FS=["a","b","c","d","e","f","g"],$S=function(e,t){return"{"+e+(null==t?"":t)+"}"};function VS(e,t,n){lh(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=FS[o];e=e.replace($S(a),$S(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($S(FS[l],s),n?gp(u):u)}return e}function WS(e,t){return t=t||"transparent",ch(e)?e:ph(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function HS(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var GS=th,US=["left","right","top","bottom","width","height"],XS=[["width","left","right"],["height","top","bottom"]];function YS(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,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)})}var qS=YS;sh(YS,"vertical"),sh(YS,"horizontal");function ZS(e,t,n){n=zS(n||0);var r=t.width,i=t.height,o=iv(e.left,r),a=iv(e.top,i),s=iv(e.right,r),l=iv(e.bottom,i),u=iv(e.width,r),c=iv(e.height,i),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-o),isNaN(c)&&(c=i-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=r-s-u-h),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-h}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-h-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new Xp(o+n[3],a+n[0],u,c);return f.margin=n,f}function KS(e,t,n,r,i,o){var a,s=!i||!i.hv||i.hv[0],l=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if((o=o||e).x=e.x,o.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new Xp(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=ZS(Kd({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(o.x=h,o.y=p):(o.x+=h,o.y+=p),o===e&&e.markRedraw(),!0}function QS(e){var t=e.layoutMode||e.constructor.layoutMode;return ph(t)?t:t?{type:t}:null}function JS(e,t,n){var r=n&&n.ignoreSize;!lh(r)&&(r=[r,r]);var i=a(XS[0],0),o=a(XS[1],1);function a(n,i){var o={},a=0,u={},c=0;if(GS(n,function(t){u[t]=e[t]}),GS(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 h=n[d];if(!s(o,h)&&s(e,h)){o[h]=e[h];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){GS(e,function(e){t[e]=n[e]})}u(XS[0],e,i),u(XS[1],e,o)}function e_(e){return t_({},e)}function t_(e,t){return t&&e&&GS(US,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var n_=Fv(),r_=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Zw("ec_cpt_model"),i}return kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=QS(this),r=n?e_(e):{};Yd(e,t.getTheme().get(this.mainType)),Yd(e,this.getDefaultOption()),n&&JS(e,r,n)},t.prototype.mergeOption=function(e,t){Yd(this.option,e,!0);var n=QS(this);n&&JS(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Kv])}(e))return e.defaultOption;var t=n_(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=Yd(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Uv(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}(Yw);ey(r_,Yw),iy(r_),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Qv(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=Qv(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(r_),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 th(e,function(o){var a=n(r,o),s=function(e,t){var n=[];return th(e,function(e){Qd(t,e)>=0&&n.push(e)}),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),th(s,function(e){Qd(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);Qd(t.successor,e)<0&&t.successor.push(o)})}),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(th(e,function(e){u[e]=!0});l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),th(d.successor,h?f:p)}th(u,function(){throw new Error("")})}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(r_,function(e){var t=[];th(r_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=nh(t,function(e){return Qv(e).main}),"dataset"!==e&&Qd(t,"dataset")<=0&&t.unshift("dataset");return t});const i_=r_;var o_="";"undefined"!==typeof navigator&&(o_=navigator.platform||"");var a_="rgba(0, 0, 0, 0.2)";const s_={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:a_,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:a_,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:a_,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:a_,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:a_,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:a_,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:o_.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};var l_=Ph(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),u_="original",c_="arrayRows",d_="objectRows",h_="keyedColumns",p_="typedArray",f_="unknown",g_="column",m_="row",v_=1,y_=2,x_=3,b_=Fv();function w_(e,t,n){var r={},i=__(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=b_(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;th(e=e.slice(),function(t,n){var i=ph(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]});var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(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 th(e,function(e,t){var n=e.name,i=f(e);if(null==o){var a=h.valueWayDim;p(r[n],a,i),p(l,a,i),h.valueWayDim+=i}else if(o===t)p(r[n],0,i),p(s,0,i);else{a=h.categoryWayDim;p(r[n],a,i),p(l,a,i),h.categoryWayDim+=i}}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function S_(e,t,n){var r={};if(!__(e))return r;var i,o=t.sourceFormat,a=t.dimensionsDefine;o!==d_&&o!==h_||th(a,function(e,t){"name"===(ph(e)?e.name:e)&&(i=t)});var s=function(){for(var e={},r={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=k_(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var d=c===x_;if(d&&null==e.v&&l!==i&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===x_)&&(e.n=l),h(e)&&s[e.n]!==x_)return e;d||(c===y_&&null==r.v&&l!==i&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(r)?r:null}();if(s){r.value=[s.v];var l=null!=i?i:s.n;r.itemName=[l],r.seriesName=[l]}return r}function __(e){if(!e.get("data",!0))return Uv(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Hv).models[0]}function A_(e,t){return k_(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function k_(e,t,n,r,i,o){var a,s,l;if(gh(e))return x_;if(r){var u=r[o];ph(u)?(s=u.name,l=u.type):ch(u)&&(s=u)}if(null!=l)return"ordinal"===l?v_:x_;if(t===c_){var c=e;if(n===m_){for(var d=c[o],h=0;h<(d||[]).length&&h<5;h++)if(null!=(a=y(d[i+h])))return a}else for(h=0;h<c.length&&h<5;h++){var p=c[i+h];if(p&&null!=(a=y(p[o])))return a}}else if(t===d_){var f=e;if(!s)return x_;for(h=0;h<f.length&&h<5;h++){if((m=f[h])&&null!=(a=y(m[s])))return a}}else if(t===h_){if(!s)return x_;if(!(d=e[s])||gh(d))return x_;for(h=0;h<d.length&&h<5;h++)if(null!=(a=y(d[h])))return a}else if(t===u_){var g=e;for(h=0;h<g.length&&h<5;h++){var m,v=jv(m=g[h]);if(!lh(v))return x_;if(null!=(a=y(v[o])))return a}}function y(e){var t=ch(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?y_:x_:t&&"-"!==e?v_:void 0}return x_}var C_=Ph();var M_,I_,T_,D_=Fv(),j_=Fv(),P_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Iv(this.get("color",!0)),i=this.get("colorLayer",!0);return R_(this,D_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){var e,t;(t=D_)(e=this).paletteIdx=0,t(e).paletteNameMap={}},e}();function L_(e,t,n,r){var i=Iv(e.get(["aria","decal","decals"]));return R_(e,j_,i,null,t,n,r)}function R_(e,t,n,r,i,o,a){var s=t(o=o||e),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.length){var d=c[l];return i&&(u[i]=d),s.paletteIdx=(l+1)%c.length,d}}var E_="\0_ec_inner";var N_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new Yw(r),this._locale=new Yw(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=B_(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,B_(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):T_(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&&th(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=Ph(),s=t&&t.replaceMergeMainTypeMap;b_(this).datasetMap=Ph(),th(e,function(e,t){null!=e&&(i_.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?Xd(e):Yd(n[t],e,!0))}),s&&s.each(function(e,t){i_.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),i_.topologicalTravel(o,i_.getAllClassMainTypes(),function(t){var o=function(e,t,n){var r=C_.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Iv(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=Lv(a,o,l);(function(e,t,n){th(e,function(e){var r=e.newOption;ph(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,i_),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],h=[],p=0;th(u,function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=i_.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=Zd({componentIndex:n},e.keyInfo);Zd(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),h.push(r),p++):(d.push(void 0),h.push(void 0))},this),n[t]=d,r.set(t,h),i.set(t,p),"series"===t&&M_(this)},this),this._seriesIndices||M_(this)},t.prototype.getOption=function(){var e=Xd(this.option);return th(e,function(t,n){if(i_.hasClass(n)){for(var r=Iv(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!zv(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}}),delete e[E_],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=[],th(Iv(r),function(e){a[e]&&n.push(a[e])})):n=null!=i?O_("id",i,a):null!=o?O_("name",o,a):ih(a,function(e){return!!e}),z_(n,e)):[]},t.prototype.findComponents=function(e){var t,n=e.query,r=e.mainType,i=function(e){var t=r+"Index",n=r+"Id",i=r+"Name";return!e||null==e[t]&&null==e[n]&&null==e[i]?null:{mainType:r,index:e[t],id:e[n],name:e[i]}}(n),o=i?this.queryComponents(i):ih(this._componentsMap.get(r),function(e){return!!e});return t=z_(o,e),e.filter?ih(t,e.filter):t},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(uh(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=ch(e)?r.get(e):ph(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=Nv(e,null);return ih(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 ih(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return ih(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){I_(this),th(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){th(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){I_(this),th(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 th(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return I_(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){I_(this);var n=[];th(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=Ph(n)},t.prototype.restoreData=function(e){M_(this);var t=this._componentsMap,n=[];t.each(function(e,t){i_.hasClass(t)&&n.push(t)}),i_.topologicalTravel(n,i_.getAllClassMainTypes(),function(n){th(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=(M_=function(e){var t=e._seriesIndices=[];th(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Ph(t)},I_=function(e){},void(T_=function(e,t){e.option={},e.option[E_]=1,e._componentsMap=Ph({series:[]}),e._componentsCount=Ph();var n=t.aria;ph(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;th(t,function(t,r){"colorLayer"===r&&n||i_.hasClass(r)||("object"===typeof t?e[r]=e[r]?Yd(e[r],t,!1):Xd(t):null==e[r]&&(e[r]=t))})}(t,e._theme.option),Yd(t,s_,!1),e._mergeOption(t,null)})),t}(Yw);function O_(e,t,n){if(lh(t)){var r=Ph();return th(t,function(e){null!=e&&(null!=Nv(e,null)&&r.set(e,!0))}),ih(n,function(t){return t&&r.get(t[e])})}var i=Nv(t,null);return ih(n,function(t){return t&&null!=i&&t[e]===i})}function z_(e,t){return t.hasOwnProperty("subType")?ih(e,function(e){return e&&e.subType===t.subType}):e}function B_(e){var t=Ph();return e&&th(Iv(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Jd(N_,P_);const F_=N_;var $_=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const V_=function(e){th($_,function(t){this[t]=ah(e[t],e)},this)};var W_={},H_=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];th(W_,function(r,i){var o=r.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){th(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){W_[e]=t},e.get=function(e){return W_[e]},e}();const G_=H_;var U_=/^(min|max)?(.+)$/,X_=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(th(Iv(e.series),function(e){e&&e.data&&gh(e.data)&&Mh(e.data)}),th(Iv(e.dataset),function(e){e&&e.source&&gh(e.source)&&Mh(e.source)})),e=Xd(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&&lh(u)&&th(u,function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))});function h(e){th(t,function(t){t(e,n)})}return h(i),th(l,function(e){return h(e)}),th(o,function(e){return h(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=[],Xd(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=Xd(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++)Y_(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=nh(s,function(e){return Xd(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}();function Y_(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return th(e,function(e,t){var n=t.match(U_);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}const q_=X_;var Z_=th,K_=ph,Q_=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function J_(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Q_.length;n<r;n++){var i=Q_[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?Yd(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?Yd(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function eA(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,Kd(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 tA(e){eA(e,"itemStyle"),eA(e,"lineStyle"),eA(e,"areaStyle"),eA(e,"label"),eA(e,"labelLine"),eA(e,"upperLabel"),eA(e,"edgeLabel")}function nA(e,t){var n=K_(e)&&e[t],r=K_(n)&&n.textStyle;if(r){0;for(var i=0,o=Dv.length;i<o;i++){var a=Dv[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}}function rA(e){e&&(tA(e),nA(e,"label"),e.emphasis&&nA(e.emphasis,"label"))}function iA(e){return lh(e)?e:e?[e]:[]}function oA(e){return(lh(e)?e[0]:e)||{}}function aA(e,t){Z_(iA(e.series),function(e){K_(e)&&function(e){if(K_(e)){J_(e),tA(e),nA(e,"label"),nA(e,"upperLabel"),nA(e,"edgeLabel"),e.emphasis&&(nA(e.emphasis,"label"),nA(e.emphasis,"upperLabel"),nA(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(J_(t),rA(t));var n=e.markLine;n&&(J_(n),rA(n));var r=e.markArea;r&&rA(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!gh(o))for(var a=0;a<o.length;a++)rA(o[a]);th(e.categories,function(e){tA(e)})}if(i&&!gh(i))for(a=0;a<i.length;a++)rA(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)rA(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)lh(l[a])?(rA(l[a][0]),rA(l[a][1])):rA(l[a])}"gauge"===e.type?(nA(e,"axisLabel"),nA(e,"title"),nA(e,"detail")):"treemap"===e.type?(eA(e.breadcrumb,"itemStyle"),th(e.levels,function(e){tA(e)})):"tree"===e.type&&tA(e.leaves)}}(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Z_(n,function(t){Z_(iA(e[t]),function(e){e&&(nA(e,"axisLabel"),nA(e.axisPointer,"label"))})}),Z_(iA(e.parallel),function(e){var t=e&&e.parallelAxisDefault;nA(t,"axisLabel"),nA(t&&t.axisPointer,"label")}),Z_(iA(e.calendar),function(e){eA(e,"itemStyle"),nA(e,"dayLabel"),nA(e,"monthLabel"),nA(e,"yearLabel")}),Z_(iA(e.radar),function(e){nA(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)}),Z_(iA(e.geo),function(e){K_(e)&&(rA(e),Z_(iA(e.regions),function(e){rA(e)}))}),Z_(iA(e.timeline),function(e){rA(e),eA(e,"label"),eA(e,"itemStyle"),eA(e,"controlStyle",!0);var t=e.data;lh(t)&&th(t,function(e){ph(e)&&(eA(e,"label"),eA(e,"itemStyle"))})}),Z_(iA(e.toolbox),function(e){eA(e,"iconStyle"),Z_(e.feature,function(e){eA(e,"iconStyle")})}),nA(oA(e.axisPointer),"label"),nA(oA(e.tooltip).axisPointer,"label")}function sA(e){e&&th(lA,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var lA=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],uA=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],cA=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function dA(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<cA.length;n++){var r=cA[n][1],i=cA[n][0];null!=t[r]&&(t[i]=t[r])}}function hA(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function pA(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function fA(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&fA(e[n].children,t)}function gA(e,t){aA(e,t),e.series=Iv(e.series),th(e.series,function(e){if(ph(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),hA(e.label),(i=e.data)&&!gh(i))for(var n=0;n<i.length;n++)hA(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(dA(e),dA(e.backgroundStyle),dA(e.emphasis),(i=e.data)&&!gh(i))for(n=0;n<i.length;n++)"object"===typeof i[n]&&(dA(i[n]),dA(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)),pA(e),fA(e.data,pA)}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&&Kd(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),sA(e)}}),e.dataRange&&(e.visualMap=e.dataRange),th(uA,function(t){var n=e[t];n&&(lh(n)||(n=[n]),th(n,function(e){sA(e)}))})}function mA(e){th(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,h,p=a.get(t.stackedDimension,c);if(isNaN(p))return i;s?h=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||(h=m.data.rawIndexOf(m.stackedByDimension,d)),h>=0){var v=m.data.getByRawIndex(m.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=cv(p,v),f=v;break}}}return r[0]=p,r[1]=f,r})})}var vA,yA,xA,bA,wA,SA=function(e){this.data=e.data||(e.sourceFormat===h_?{}:[]),this.sourceFormat=e.sourceFormat||f_,this.seriesLayoutBy=e.seriesLayoutBy||g_,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&&A_(this,n)===v_&&(r.type="ordinal")}};function _A(e){return e instanceof SA}function AA(e,t,n){n=n||CA(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:MA(i),startIndex:a,dimensionsDetectedCount:o};if(t===c_){var s=e;"auto"===r||null==r?IA(function(e){null!=e&&"-"!==e&&(ch(e)?null==a&&(a=1):a=0)},n,s,10):a=hh(r)?r:r?1:0,i||1!==a||(i=[],IA(function(e,t){i[t]=null!=e?e+"":""},n,s,1/0)),o=i?i.length:n===m_?s.length:s[0]?s[0].length:null}else if(t===d_)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return oh(t)}(e));else if(t===h_)i||(i=[],th(e,function(e,t){i.push(t)}));else if(t===u_){var l=jv(e[0]);o=lh(l)&&l.length||1}return{startIndex:a,dimensionsDefine:MA(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new SA({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Xd(t)})}function kA(e){return new SA({data:e,sourceFormat:gh(e)?p_:u_})}function CA(e){var t=f_;if(gh(e))t=p_;else if(lh(e)){0===e.length&&(t=c_);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(lh(i)||gh(i)){t=c_;break}if(ph(i)){t=d_;break}}}}else if(ph(e))for(var o in e)if(Nh(e,o)&&eh(e[o])){t=h_;break}return t}function MA(e){if(e){var t=Ph();return nh(e,function(e,n){var r={name:(e=ph(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 IA(e,t,n,r){if(t===m_)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 TA(e){var t=e.sourceFormat;return t===d_||t===h_}var DA=function(){function e(e,t){var n=_A(e)?e:kA(e);this._source=n;var r=this._data=n.data;n.sourceFormat===p_&&(this._offset=0,this._dimSize=t,this._data=r),wA(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;wA=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(Zd(e,bA[FA(a,s)]),a===p_)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=LA(a,s);e.getItem=ah(c,null,i,l,u);var d=NA(a,s);e.count=ah(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],h=0;h<c;h++){var p=i[h*o+a];d[e+h]=p,p<l&&(l=p),p>u&&(u=p)}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={})[c_+"_"+g_]={pure:!0,appendData:i},e[c_+"_"+m_]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[d_]={pure:!0,appendData:i},e[h_]={pure:!0,appendData:function(e){var t=this._data;th(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[u_]={appendData:i},e[p_]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},bA=e}(),e}(),jA=function(e,t,n,r){return e[r]},PA=((vA={})[c_+"_"+g_]=function(e,t,n,r){return e[r+t]},vA[c_+"_"+m_]=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},vA[d_]=jA,vA[h_]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){0;var s=e[n[a].name];o[a]=s?s[r]:null}return o},vA[u_]=jA,vA);function LA(e,t){return PA[FA(e,t)]}var RA=function(e,t,n){return e.length},EA=((yA={})[c_+"_"+g_]=function(e,t,n){return Math.max(0,e.length-t)},yA[c_+"_"+m_]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},yA[d_]=RA,yA[h_]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},yA[u_]=RA,yA);function NA(e,t){return EA[FA(e,t)]}var OA=function(e,t,n){return e[t]},zA=((xA={})[c_]=OA,xA[d_]=function(e,t,n){return e[n]},xA[h_]=OA,xA[u_]=function(e,t,n){var r=jv(e);return r instanceof Array?r[t]:r},xA[p_]=OA,xA);function BA(e){return zA[e]}function FA(e,t){return e===c_?e+"_"+t:e}function $A(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 BA(o)(r,a,s)}var l=r;return o===u_&&(l=jv(r)),l}}}var VA=/\{@(.+?)\}/g,WA=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,h=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:h?h.fullDimensions:null,encode:h?h.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&&lh(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return uh(i)?(s.status=t,s.dimensionIndex=r,i(s)):ch(i)?VS(i,s).replace(VA,function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=$A(a,e,i);if(o&&lh(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 $A(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function HA(e){var t,n;return ph(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function GA(e){return new UA(e)}var UA=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 h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||h<p)){var f=this._progress;if(lh(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],h,p,l,u);else this._doProgress(f,h,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;0,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){XA.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:XA.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),lh(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}(),XA=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}}();"undefined"!==typeof console&&console.warn&&console.log;function YA(e){0}function qA(e){throw new Error(e)}function ZA(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||hh(e)||null==e||"-"===e||(e=+gv(e)),null==e||""===e?NaN:Number(e))}var KA=Ph({number:function(e){return parseFloat(e)},time:function(e){return+gv(e)},trim:function(e){return ch(e)?kh(e):e}});function QA(e){return KA.get(e)}var JA={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},ek=function(){function e(e,t){if(!hh(t)){0,qA("")}this._opFn=JA[e],this._rvalFloat=bv(t)}return e.prototype.evaluate=function(e){return hh(e)?this._opFn(e,this._rvalFloat):this._opFn(bv(e),this._rvalFloat)},e}(),tk=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=hh(e)?e:bv(e),r=hh(t)?t:bv(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=ch(e),s=ch(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),nk=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=bv(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=bv(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function rk(e,t){return"eq"===e||"ne"===e?new nk("eq"===e,t):Nh(JA,e)?new ek(e,t):null}var ik=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 ZA(e,t)},e}();function ok(e){if(!dk(e.sourceFormat)){0,qA("")}return e.data}function ak(e){var t=e.sourceFormat,n=e.data;if(!dk(t)){0,qA("")}if(t===c_){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===d_){for(r=[],i=0,o=n.length;i<o;i++)r.push(Zd({},n[i]));return r}}function sk(e,t,n){if(null!=n)return hh(n)||!isNaN(n)&&!Nh(t,n)?e[n]:Nh(t,n)?t[n]:void 0}function lk(e){return Xd(e)}var uk=Ph();function ck(e,t,n,r){t.length||qA(""),ph(e)||qA("");var i=e.type,o=uk.get(i);o||qA("");var a=nh(t,function(e){return function(e,t){var n=new ik,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==g_&&qA("");var a=[],s={},l=e.dimensionsDefine;if(l)th(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(Nh(s,n)&&qA(""),s[n]=r)});else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=LA(i,g_);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=ah(ok,null,e)),n.cloneRawData=ah(ak,null,e);var d=NA(i,g_);n.count=ah(d,null,r,o,a);var h=BA(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return p(n,t)};var p=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?h(e,t,n.name):void 0}};return n.getDimensionInfo=ah(sk,null,a,s),n.cloneAllDimensionInfo=ah(lk,null,a),n}(e,o)});return nh(Iv(o.transform({upstream:a[0],upstreamList:a,config:Xd(e.config)})),function(e,n){var r;ph(e)||qA(""),e.data||qA(""),dk(CA(e.data))||qA("");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:g_,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:g_,sourceHeader:0,dimensions:e.dimensions};return AA(e.data,r,null)})}function dk(e){return e===c_||e===d_}var hk,pk="undefined",fk=typeof Uint32Array===pk?Array:Uint32Array,gk=typeof Uint16Array===pk?Array:Uint16Array,mk=typeof Int32Array===pk?Array:Int32Array,vk=typeof Float64Array===pk?Array:Float64Array,yk={float:vk,int:mk,ordinal:Array,number:Array,time:vk};function xk(e){return e>65535?fk:gk}function bk(){return[1/0,-1/0]}function wk(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Sk(e,t,n,r,i){var o=yk[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 _k=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ph()}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=hk[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];TA(r);this._dimensions=nh(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 yk[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++){Sk(n,l,(p=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,h=0;h<i;h++){var p=r[h],f=hk.arrayRows.call(this,e[d]||u,p.property,d,h);n[h][c]=f;var g=o[h];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=nh(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=bk()),Sk(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],h=e;h<t;h++){d=r.getItem(h,d);for(var p=0;p<a;p++){var f=i[p],g=this._dimValueGetter(d,l[p],h,p);f[h]=g;var m=s[p];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=xk(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(xk(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][h],c)}else{for(var p=0;p<a;p++)o[p]=u[e[p]][h];o[p]=c,d=t.apply(null,o)}d&&(i[s++]=h)}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=oh(e),i=r.length;if(!i)return this;var o=t.count(),a=new(xk(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=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++]=p),p++}h=!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],b=m[g];(x>=u&&x<=c||isNaN(x))&&(b>=v&&b<=y||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===i)for(g=0;g<o;g++){var w=t.getRawIndex(g);((x=d[r[0]][w])>=u&&x<=c||isNaN(x))&&(a[s++]=w)}else for(g=0;g<o;g++){for(var S=!0,_=(w=t.getRawIndex(g),0);_<i;_++){var A=r[_];((x=d[A][w])<e[A][0]||x>e[A][1])&&(S=!1)}S&&(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]]=bk();for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),h=0;h<o;h++)s[h]=r[t[h]][d];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!==typeof p&&(i[0]=p,p=i);for(u=0;u<p.length;u++){var f=t[u],g=p[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(xk(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=a[k=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-p;var x=h,b=Math.min(h+u,s),w=h-1,S=a[c];n=-1,i=x;var _=-1,A=0;for(v=x;v<b;v++){var k;y=a[k=this.getRawIndex(v)];isNaN(y)?(A++,_<0&&(_=k)):(r=Math.abs((w-g)*(y-S)-(w-v)*(m-S)))>n&&(n=r,i=k)}A>0&&A<b-x&&(d[l++]=Math.min(_,i),i=Math.max(_,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.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),o=r[e],a=this.count(),s=new(xk(this._rawCount))(2*Math.ceil(a/i)),l=0,u=0;u<a;u+=i){var c=u,d=o[this.getRawIndex(c)],h=u,p=o[this.getRawIndex(h)],f=i;u+i>a&&(f=a-u);for(var g=0;g<f;g++){var m=o[this.getRawIndex(u+g)];m<d&&(d=m,c=u+g),m>p&&(p=m,h=u+g)}var v=this.getRawIndex(c),y=this.getRawIndex(h);c<h?(s[l++]=v,s[l++]=y):(s[l++]=y,s[l++]=v)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},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(xk(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(p+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[h++]=v}return i._count=h,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=new e,i=this._chunks,o=t&&rh(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<i.length;a++)r._chunks[a]=o[a]?wk(i[a]):i[a];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Xd(this._extent),e._rawExtent=Xd(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 ZA(e[r],this._dimensions[r])}hk={arrayRows:e,objectRows:function(e,t,n,r){return ZA(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return ZA(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}();const Ak=_k;var kk=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(Mk(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=gh(a=o.get("data",!0))?p_:u_,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=bh(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=bh(c.sourceHeader,d.sourceHeader),f=bh(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!==!!d.sourceHeader||f?[AA(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[AA(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&&Ik("")}var o,a=[],s=[];return th(e,function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||Ik(""),a.push(t),s.push(e._getVersionSign())}),r?t=function(e,t){var n=Iv(e),r=n.length;r||qA("");for(var i=0,o=r;i<o;i++)t=ck(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,a,n.componentIndex):null!=i&&(t=[(o=a[0],new SA({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:Xd(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:s}},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];Mk(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new Ak).initData(new DA(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Mk(e)){var t=__(e);return t?[t.getSourceManager()]:[]}return nh(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Uv(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Hv).models:[]}(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(Mk(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 Ck(e){e.option.transform&&Mh(e.option.transform)}function Mk(e){return"series"===e.mainType}function Ik(e){throw new Error(e)}function Tk(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+gp(t+"")+"px"}function Dk(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:"+gp(r+"")+"px;color:"+gp(n)+";font-weight:"+gp(i+""),valueStyle:"font-size:"+gp(a+"")+"px;color:"+gp(o)+";font-weight:"+gp(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var jk=[0,10,20,30],Pk=["","\n","\n\n","\n\n\n"];function Lk(e,t){return t.type=e,t}function Rk(e){return"section"===e.type}function Ek(e){return Rk(e)?Ok:zk}function Nk(e){if(Rk(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return th(e.blocks,function(e){var n=Nk(e);n>=t&&(t=n+ +(r&&(!n||Rk(e)&&!e.noHeader)))}),t}return 0}function Ok(e,t,n,r){var i,o=t.noHeader,a=(i=Nk(t),{html:jk[i],richText:Pk[i]}),s=[],l=t.blocks||[];Ah(!l||lh(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Nh(c,u)){var d=new tk(c[u],null);l.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}th(l,function(n,i){var o=t.valueFormatter,l=Ek(n)(o?Zd(Zd({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)});var h="richText"===e.renderMode?s.join(a.richText):Fk(r,s.join(""),o?n:a.html);if(o)return h;var p=BS(t.header,"ordinal",e.useUTC),f=Dk(r,e.renderMode).nameStyle,g=Tk(r);return"richText"===e.renderMode?$k(e,p,f)+a.richText+h:Fk(r,'<div style="'+f+";"+g+';">'+gp(p)+"</div>"+h,n)}function zk(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 nh(e=lh(e)?e:[e],function(e,t){return BS(e,lh(p)?p[t]:p,u)})};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),h=o?"":BS(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!o,m=!s&&o,v=Dk(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":$k(e,h,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(lh(t)?t.join("  "):t,o)}(e,f,g,m,x)):Fk(r,(s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+gp(e)+"</span>"}(h,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=lh(e)?e:[e],'<span style="'+o+";"+r+'">'+nh(e,function(e){return gp(e)}).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function Bk(e,t,n,r,i,o){if(e)return Ek(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function Fk(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+Tk(e)+';">'+t+'<div style="clear:both"></div></div>'}function $k(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Vk(e,t){return WS(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function Wk(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Hk=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Sv()}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=ch(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:'+gp(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+gp(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 ch(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};lh(t)?th(t,function(e){return Zd(n,e)}):Zd(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function Gk(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),h=lh(d),p=Vk(o,a);if(c>1||h&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=rh(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(Lk("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?th(r,function(e){c($A(o,n,e),e)}):th(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=$A(l,a,u[0]),n=g.type}else i=t=h?d[0]:d;var m=Ov(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return Lk("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[Lk("nameValue",{markerType:"item",markerColor:p,name:x,noName:!kh(x),value:t,valueType:n,dataIndex:a})].concat(r||[])})}var Uk=Fv();function Xk(e,t){return e.getName(t)||e.getId(t)}var Yk="__universalTransitionEnabled",qk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return kd(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=GA({count:Kk,reset:Qk}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Uk(this).sourceManager=new kk(this)).prepareSource();var r=this.getInitialData(e,n);eC(r,this),this.dataTask.context.data=r,Uk(this).dataBeforeProcessed=r,Zk(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=QS(this),r=n?e_(e):{},i=this.subType;i_.hasClass(i)&&(i+="Series"),Yd(e,t.getTheme().get(this.subType)),Yd(e,this.getDefaultOption()),Tv(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&JS(e,r,n)},t.prototype.mergeOption=function(e,t){e=Yd(this.option,e,!0),this.fillDataTextStyle(e.data);var n=QS(this);n&&JS(this.option,e,n);var r=Uk(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);eC(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Uk(this).dataBeforeProcessed=i,Zk(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!gh(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Tv(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=nC(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return Uk(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=nC(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Uk(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Ph(e)},t.prototype.getSourceManager=function(){return Uk(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Uk(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 Gk({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Id.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=P_.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=Xk(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=oh(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[Xk(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Yk])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){ph(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=Xk(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=Xk(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 i_.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}(i_);function Zk(e){var t=e.name;Ov(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return th(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(" ")}(e)||t)}function Kk(e){return e.model.getRawData().count()}function Qk(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Jk}function Jk(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function eC(e,t){th(Lh(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,sh(tC,t))})}function tC(e,t){var n=nC(e);return n&&n.setOutputEnd((t||this).count()),t}function nC(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}}Jd(qk,WA),Jd(qk,P_),ey(qk,i_);const rC=qk;var iC=function(){function e(){this.group=new Zm,this.uid=Zw("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}();Jv(iC),iy(iC);const oC=iC;function aC(){var e=Fv();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 sC=fx.CMD,lC=[[],[],[]],uC=Math.sqrt,cC=Math.atan2;function dC(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=sC.M,d=sC.C,h=sC.L,p=sC.R,f=sC.A,g=sC.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case h:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=uC(t[0]*t[0]+t[1]*t[1]),x=uC(t[2]*t[2]+t[3]*t[3]),b=cC(-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++]+=b,l[i++]+=b,o=i+=2;break;case p:s[0]=l[i++],s[1]=l[i++],ep(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],ep(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var w=lC[a];w[0]=l[i++],w[1]=l[i++],ep(w,w,t),l[o++]=w[0],l[o++]=w[1]}}e.increaseVersion()}}var hC=Math.sqrt,pC=Math.sin,fC=Math.cos,gC=Math.PI;function mC(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function vC(e,t){return(e[0]*t[0]+e[1]*t[1])/(mC(e)*mC(t))}function yC(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(vC(e,t))}function xC(e,t,n,r,i,o,a,s,l,u,c){var d=l*(gC/180),h=fC(d)*(e-n)/2+pC(d)*(t-r)/2,p=-1*pC(d)*(e-n)/2+fC(d)*(t-r)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=hC(f),s*=hC(f));var g=(i===o?-1:1)*hC((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,m=g*a*p/s,v=g*-s*h/a,y=(e+n)/2+fC(d)*m-pC(d)*v,x=(t+r)/2+pC(d)*m+fC(d)*v,b=yC([1,0],[(h-m)/a,(p-v)/s]),w=[(h-m)/a,(p-v)/s],S=[(-1*h-m)/a,(-1*p-v)/s],_=yC(w,S);if(vC(w,S)<=-1&&(_=gC),vC(w,S)>=1&&(_=0),_<0){var A=Math.round(_/gC*1e6)/1e6;_=2*gC+A%2*gC}c.addData(u,y,x,a,s,b,_,d,o)}var bC=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,wC=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var SC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.applyTransform=function(e){},t}(Nx);function _C(e){return null!=e.setData}function AC(e,t){var n=function(e){var t=new fx;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=fx.CMD,l=e.match(bC);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,p=c.match(wC)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0,_=void 0,A=r,k=i,C=void 0,M=void 0;switch(d){case"l":r+=p[m++],i+=p[m++],h=s.L,t.addData(h,r,i);break;case"L":r=p[m++],i=p[m++],h=s.L,t.addData(h,r,i);break;case"m":r+=p[m++],i+=p[m++],h=s.M,t.addData(h,r,i),o=r,a=i,d="l";break;case"M":r=p[m++],i=p[m++],h=s.M,t.addData(h,r,i),o=r,a=i,d="L";break;case"h":r+=p[m++],h=s.L,t.addData(h,r,i);break;case"H":r=p[m++],h=s.L,t.addData(h,r,i);break;case"v":i+=p[m++],h=s.L,t.addData(h,r,i);break;case"V":i=p[m++],h=s.L,t.addData(h,r,i);break;case"C":h=s.C,t.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),r=p[m-2],i=p[m-1];break;case"c":h=s.C,t.addData(h,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i),r+=p[m-2],i+=p[m-1];break;case"S":v=r,y=i,C=t.len(),M=t.data,n===s.C&&(v+=r-M[C-4],y+=i-M[C-3]),h=s.C,A=p[m++],k=p[m++],r=p[m++],i=p[m++],t.addData(h,v,y,A,k,r,i);break;case"s":v=r,y=i,C=t.len(),M=t.data,n===s.C&&(v+=r-M[C-4],y+=i-M[C-3]),h=s.C,A=r+p[m++],k=i+p[m++],r+=p[m++],i+=p[m++],t.addData(h,v,y,A,k,r,i);break;case"Q":A=p[m++],k=p[m++],r=p[m++],i=p[m++],h=s.Q,t.addData(h,A,k,r,i);break;case"q":A=p[m++]+r,k=p[m++]+i,r+=p[m++],i+=p[m++],h=s.Q,t.addData(h,A,k,r,i);break;case"T":v=r,y=i,C=t.len(),M=t.data,n===s.Q&&(v+=r-M[C-4],y+=i-M[C-3]),r=p[m++],i=p[m++],h=s.Q,t.addData(h,v,y,r,i);break;case"t":v=r,y=i,C=t.len(),M=t.data,n===s.Q&&(v+=r-M[C-4],y+=i-M[C-3]),r+=p[m++],i+=p[m++],h=s.Q,t.addData(h,v,y,r,i);break;case"A":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],xC(A=r,k=i,r=p[m++],i=p[m++],S,_,x,b,w,h=s.A,t);break;case"a":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],xC(A=r,k=i,r+=p[m++],i+=p[m++],S,_,x,b,w,h=s.A,t)}}"z"!==d&&"Z"!==d||(h=s.Z,t.addData(h),r=o,i=a),n=h}return t.toStatic(),t}(e),r=Zd({},t);return r.buildPath=function(e){if(_C(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){dC(n,e),this.dirtyShape()},r}function kC(e,t){return new SC(AC(e,t))}function CC(e,t){t=t||{};var n=new Nx;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?dC(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var MC=function(){this.cx=0,this.cy=0,this.r=0},IC=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new MC},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}(Nx);IC.prototype.type="circle";const TC=IC;var DC=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},jC=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new DC},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}(Nx);jC.prototype.type="ellipse";const PC=jC;var LC=Math.PI,RC=2*LC,EC=Math.sin,NC=Math.cos,OC=Math.acos,zC=Math.atan2,BC=Math.abs,FC=Math.sqrt,$C=Math.max,VC=Math.min,WC=1e-4;function HC(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/FC(s*s+l*l),c=u*l,d=-u*s,h=e+c,p=t+d,f=n+c,g=r+d,m=(h+f)/2,v=(p+g)/2,y=f-h,x=g-p,b=y*y+x*x,w=i-o,S=h*g-f*p,_=(x<0?-1:1)*FC($C(0,w*w*b-S*S)),A=(S*x-y*_)/b,k=(-S*y-x*_)/b,C=(S*x+y*_)/b,M=(-S*y+x*_)/b,I=A-m,T=k-v,D=C-m,j=M-v;return I*I+T*T>D*D+j*j&&(A=C,k=M),{cx:A,cy:k,x0:-c,y0:-d,x1:A*(i/w-1),y1:k*(i/w-1)}}function GC(e,t){var n,r=$C(t.r,0),i=$C(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,h=BC(l-s),p=h>RC&&h%RC;if(p>WC&&(h=p),r>WC)if(h>RC-WC)e.moveTo(u+r*NC(s),c+r*EC(s)),e.arc(u,c,r,s,l,!d),i>WC&&(e.moveTo(u+i*NC(l),c+i*EC(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,b=void 0,w=void 0,S=void 0,_=void 0,A=void 0,k=void 0,C=void 0,M=void 0,I=void 0,T=void 0,D=r*NC(s),j=r*EC(s),P=i*NC(l),L=i*EC(l),R=h>WC;if(R){var E=t.cornerRadius;E&&(f=(n=function(e){var t;if(lh(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}(E))[0],g=n[1],m=n[2],v=n[3]);var N=BC(r-i)/2;if(y=VC(N,m),x=VC(N,v),b=VC(N,f),w=VC(N,g),A=S=$C(y,x),k=_=$C(b,w),(S>WC||_>WC)&&(C=r*NC(l),M=r*EC(l),I=i*NC(s),T=i*EC(s),h<LC)){var O=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,h=d*l-c*u;if(!(h*h<WC))return[e+(h=(c*(t-o)-d*(e-i))/h)*l,t+h*u]}(D,j,I,T,C,M,P,L);if(O){var z=D-O[0],B=j-O[1],F=C-O[0],$=M-O[1],V=1/EC(OC((z*F+B*$)/(FC(z*z+B*B)*FC(F*F+$*$)))/2),W=FC(O[0]*O[0]+O[1]*O[1]);A=VC(S,(r-W)/(V+1)),k=VC(_,(i-W)/(V-1))}}}if(R)if(A>WC){var H=VC(m,A),G=VC(v,A),U=HC(I,T,D,j,r,H,d),X=HC(C,M,P,L,r,G,d);e.moveTo(u+U.cx+U.x0,c+U.cy+U.y0),A<S&&H===G?e.arc(u+U.cx,c+U.cy,A,zC(U.y0,U.x0),zC(X.y0,X.x0),!d):(H>0&&e.arc(u+U.cx,c+U.cy,H,zC(U.y0,U.x0),zC(U.y1,U.x1),!d),e.arc(u,c,r,zC(U.cy+U.y1,U.cx+U.x1),zC(X.cy+X.y1,X.cx+X.x1),!d),G>0&&e.arc(u+X.cx,c+X.cy,G,zC(X.y1,X.x1),zC(X.y0,X.x0),!d))}else e.moveTo(u+D,c+j),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+j);if(i>WC&&R)if(k>WC){H=VC(f,k),U=HC(P,L,C,M,i,-(G=VC(g,k)),d),X=HC(D,j,I,T,i,-H,d);e.lineTo(u+U.cx+U.x0,c+U.cy+U.y0),k<_&&H===G?e.arc(u+U.cx,c+U.cy,k,zC(U.y0,U.x0),zC(X.y0,X.x0),!d):(G>0&&e.arc(u+U.cx,c+U.cy,G,zC(U.y0,U.x0),zC(U.y1,U.x1),!d),e.arc(u,c,i,zC(U.cy+U.y1,U.cx+U.x1),zC(X.cy+X.y1,X.cx+X.x1),d),H>0&&e.arc(u+X.cx,c+X.cy,H,zC(X.y1,X.x1),zC(X.y0,X.x0),!d))}else e.lineTo(u+P,c+L),e.arc(u,c,i,l,s,d);else e.lineTo(u+P,c+L)}else e.moveTo(u,c);e.closePath()}}}var UC=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},XC=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new UC},t.prototype.buildPath=function(e,t){GC(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Nx);XC.prototype.type="sector";const YC=XC;var qC=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},ZC=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new qC},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}(Nx);ZC.prototype.type="ring";const KC=ZC;function QC(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 h=0,p=e.length;h<p;h++)tp(a,a,e[h]),np(s,s,e[h]);tp(a,a,r[0]),np(s,s,r[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)i=e[h?h-1:p-1],o=e[(h+1)%p];else{if(0===h||h===p-1){l.push($h(e[h]));continue}i=e[h-1],o=e[h+1]}Gh(u,o,i),Yh(u,u,t);var g=Zh(f,i),m=Zh(f,o),v=g+m;0!==v&&(g/=v,m/=v),Yh(c,u,-g),Yh(d,u,m);var y=Wh([],f,c),x=Wh([],f,d);r&&(np(y,y,a),tp(y,y,s),np(x,x,a),tp(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 JC=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},eM=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new JC},t.prototype.buildPath=function(e,t){QC(e,t,!0)},t}(Nx);eM.prototype.type="polygon";const tM=eM;var nM=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},rM=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nM},t.prototype.buildPath=function(e,t){QC(e,t,!1)},t}(Nx);rM.prototype.type="polyline";const iM=rM;var oM={},aM=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},sM=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aM},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Gx(oM,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}(Nx);sM.prototype.type="line";const lM=sM;var uM=[],cM=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function dM(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Pf:jf)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Pf:jf)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Bf:zf)(e.x1,e.cpx1,e.x2,t),(n?Bf:zf)(e.y1,e.cpy1,e.y2,t)]}var hM=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cM},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&&($f(n,a,i,c,uM),a=uM[1],i=uM[2],$f(r,s,o,c,uM),s=uM[1],o=uM[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Ef(n,a,l,i,c,uM),a=uM[1],l=uM[2],i=uM[3],Ef(r,s,u,o,c,uM),s=uM[1],u=uM[2],o=uM[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return dM(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=dM(this.shape,e,!0);return qh(t,t)},t}(Nx);hM.prototype.type="bezier-curve";const pM=hM;var fM=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},gM=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fM},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}(Nx);gM.prototype.type="arc";const mM=gM;const vM=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return kd(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),Nx.prototype.getBoundingRect.call(this)},t}(Nx);const yM=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();const xM=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 kd(t,e),t}(yM);const bM=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 kd(t,e),t}(yM);var wM=[0,0],SM=[0,0],_M=new zp,AM=new zp,kM=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new zp;for(n=0;n<2;n++)this._axes[n]=new zp;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);zp.sub(r[0],n[1],n[0]),zp.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 _M.set(1/0,1/0),AM.set(0,0),!this._intersectCheckOneSide(this,e,_M,AM,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,_M,AM,r,-1)&&(n=!1,r)||r||zp.copy(t,n?_M:AM),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,wM),this._getProjMinMaxOnAxis(s,t._corners,SM),wM[1]<SM[0]||wM[0]>SM[1]){if(a=!1,i)return a;var u=Math.abs(SM[0]-wM[1]),c=Math.abs(wM[0]-SM[1]);Math.min(u,c)>r.len()&&(u<c?zp.scale(r,l,-u*o):zp.scale(r,l,c*o))}else if(n){u=Math.abs(SM[0]-wM[1]),c=Math.abs(wM[0]-SM[1]);Math.min(u,c)<n.len()&&(u<c?zp.scale(n,l,u*o):zp.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}();const CM=kM;var MM=[];const IM=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 kd(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 Xp(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(MM)),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}(Ly);var TM=Math.max,DM=Math.min,jM={};function PM(e){return Nx.extend(e)}var LM=function(e,t){var n=AC(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 kd(t,e),t}(SC)};function RM(e,t){return LM(e,t)}function EM(e,t){jM[e]=t}function NM(e){if(jM.hasOwnProperty(e))return jM[e]}function OM(e,t,n,r){var i=kC(e,t);return n&&("center"===r&&(n=BM(n,i.getBoundingRect())),$M(i,n)),i}function zM(e,t,n){var r=new Wx({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(BM(t,i))}}});return r}function BM(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 FM=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 Nx(t);return a.createPathProxy(),a.buildPath=function(e){if(_C(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function $M(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function VM(e,t){return Gx(e,e,{lineWidth:t}),e}function WM(e){return Ux(e.shape,e.shape,e.style),e}var HM=Xx;function GM(e,t){for(var n=jp([]);e&&e!==t;)Lp(n,e.getLocalTransform(),n),e=e.parent;return n}function UM(e,t,n){return t&&!eh(t)&&(t=Im.getLocalTransform(t)),n&&(t=Op([],t)),ep([],e,t)}function XM(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=UM(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function YM(e){return!e.isGroup}function qM(e,t,n){if(e&&t){var r=function(e){var t={};return e.traverse(function(e){YM(e)&&e.anid&&(t[e.anid]=e)}),t}(e);t.traverse(function(e){if(YM(e)&&e.anid){var t=r[e.anid];if(t){var o=i(e);e.attr(i(t)),gw(e,o,n,fb(e).dataIndex)}}})}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=Zd({},e.shape)),t}}function ZM(e,t){return nh(e,function(e){var n=e[0];n=TM(n,t.x),n=DM(n,t.x+t.width);var r=e[1];return r=TM(r,t.y),[n,r=DM(r,t.y+t.height)]})}function KM(e,t){var n=TM(e.x,t.x),r=DM(e.x+e.width,t.x+t.width),i=TM(e.y,t.y),o=DM(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function QM(e,t,n){var r=Zd({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),Kd(i,n),new Wx(r)):OM(e.replace("path://",""),r,n,"center")}function JM(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(eI(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function eI(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,h=s-o,p=tI(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=tI(f,g,u,c)/p;if(m<0||m>1)return!1;var v=tI(f,g,d,h)/p;return!(v<0||v>1)}function tI(e,t,n,r){return e*r-n*t}function nI(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=ch(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&&th(oh(l),function(e){Nh(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=fb(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:Kd({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function rI(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function iI(e,t){if(e)if(lh(e))for(var n=0;n<e.length;n++)rI(e[n],t);else rI(e,t)}EM("circle",TC),EM("ellipse",PC),EM("sector",YC),EM("ring",KC),EM("polygon",tM),EM("polyline",iM),EM("rect",Kx),EM("line",lM),EM("bezierCurve",pM),EM("arc",mM);var oI=Fv(),aI=aC(),sI=function(){function e(){this.group=new Zm,this.uid=Zw("viewChart"),this.renderTask=GA({plan:cI,reset:dI}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){0},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&uI(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&uI(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){iI(this.group,e)},e.markUpdateMethod=function(e,t){oI(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function lI(e,t,n){e&&uw(e)&&("emphasis"===t?Wb:Hb)(e,n)}function uI(e,t,n){var r=Bv(e,t),i=t&&null!=t.highlightKey?function(e){var t=vb[e];return null==t&&mb<=32&&(t=vb[e]=mb++),t}(t.highlightKey):null;null!=r?th(Iv(r),function(t){lI(e.getItemGraphicEl(t),n,i)}):e.eachItemGraphicEl(function(e){lI(e,n,i)})}function cI(e){return aI(e.model)}function dI(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&oI(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),hI[l]}Jv(sI),iy(sI);var hI={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)}}};const pI=sI;var fI="\0__throttleOriginMethod",gI="\0__throttleRate",mI="\0__throttleType";function vI(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 h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];r=(new Date).getTime(),o=this,a=e;var p=s||t,f=s||n;s=null,i=r-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):i>=0?d():c=setTimeout(d,-i),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function yI(e,t,n,r){var i=e[t];if(i){var o=i[fI]||i,a=i[mI];if(i[gI]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=vI(o,n,"debounce"===r))[fI]=o,i[mI]=r,i[gI]=n}return i}}function xI(e,t){var n=e[t];n&&n[fI]&&(n.clear&&n.clear(),e[t]=n[fI])}var bI=Fv(),wI={itemStyle:oy(Hw,!0),lineStyle:oy($w,!0)},SI={lineStyle:"stroke",itemStyle:"fill"};function _I(e,t){var n=e.visualStyleMapper||wI[t];return n||(console.warn("Unknown style type '"+t+"'."),wI.itemStyle)}function AI(e,t){var n=e.visualDrawType||SI[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var kI={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=_I(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=AI(e,r),l=o[s],u=uh(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||uh(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||uh(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=Zd({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},CI=new Yw,MI={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=_I(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){CI.option=n[r];var a=i(CI);Zd(e.ensureUniqueItemVisual(t,"style"),a),CI.option.decal&&(e.setItemVisual(t,"decal",CI.option.decal),CI.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},II={performRawSeries:!0,overallReset:function(e){var t=Ph();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)),bI(e).scope=i}}),e.eachSeries(function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=bI(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=AI(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)}})}})}},TI=Math.PI;var DI=function(){function e(e,t,n,r){this._stageTaskMap=Ph(),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=Ph();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;th(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Ah(!(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))}th(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,h=c.agentStubMap;h.each(function(e){a(r,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);h.each(function(e){e.perform(p)}),c.perform(p)&&(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=Ph(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||GA({plan:EI,reset:NI,count:BI}));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||GA({reset:jI});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Ph(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,GA({reset:PI,onDirty:RI})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}Ah(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,th(n.getSeries(),h)),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 uh(e)&&(e={overallReset:e,seriesType:FI(e)}),e.uid=Zw("stageHandler"),t&&(e.visualType=t),e},e}();function jI(e){e.overallReset(e.ecModel,e.api,e.payload)}function PI(e){return e.overallProgress&&LI}function LI(){this.agent.dirty(),this.getDownstream().dirty()}function RI(){this.agent&&this.agent.dirty()}function EI(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function NI(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Iv(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?nh(t,function(e,t){return zI(t)}):OI}var OI=zI(0);function zI(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 BI(e){return e.data.count()}function FI(e){$I=null;try{e(VI,WI)}catch(oae){}return $I}var $I,VI={},WI={};function HI(e,t){for(var n in t.prototype)e[n]=Oh}HI(VI,F_),HI(WI,V_),VI.eachSeriesByType=VI.eachRawSeriesByType=function(e){$I=e},VI.eachComponent=function(e){"series"===e.mainType&&e.subType&&($I=e.subType)};const GI=DI;var UI=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const XI={color:UI,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],UI]};var YI="#B9B8CE",qI="#100C2A",ZI=function(){return{axisLine:{lineStyle:{color:YI}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},KI=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],QI={darkMode:!0,color:KI,backgroundColor:qI,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:YI},pageTextStyle:{color:YI}},textStyle:{color:YI},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:YI}},dataZoom:{borderColor:"#71708A",textStyle:{color:YI},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:YI}},timeline:{lineStyle:{color:YI},label:{color:YI},controlStyle:{color:YI,borderColor:YI}},calendar:{itemStyle:{color:qI},dayLabel:{color:YI},monthLabel:{color:YI},yearLabel:{color:YI}},timeAxis:ZI(),logAxis:ZI(),valueAxis:ZI(),categoryAxis:ZI(),line:{symbol:"circle"},graph:{color:KI},gauge:{title:{color:YI},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:YI},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};QI.categoryAxis.splitLine.show=!1;const JI=QI;var eT=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(ch(e)){var i=Qv(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};th(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}(),tT=["symbol","symbolSize","symbolRotate","symbolOffset"],nT=tT.concat(["symbolKeepAspect"]),rT={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<tT.length;a++){var s=tT[a],l=e.get(s);uh(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(Zd({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=oh(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}}}}},iT={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<nT.length;r++){var i=nT[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function oT(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 aT(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)}}function sT(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)}}function lT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:"series",subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}th([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(e){t(e[0],function(t,r,i){t=Zd({},t),i.dispatchAction(Zd(t,{type:e[1],seriesIndex:n(r,t)}))})})}function uT(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=Bv(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:lh(u)?l.getName(u[0]):l.getName(u),selected:ch(r)?r:Zd({},r)})}})}function cT(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var dT=Math.round(9*Math.random()),hT="function"===typeof Object.defineProperty;const pT=function(){function e(){this._id="__ec_inner_"+dT++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return hT?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}();var fT=Nx.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()}}),gT=Nx.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()}}),mT=Nx.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),h=Math.cos(u),p=.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*p,l+s+h*p,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*p,l+s+h*p,n-c,l+s),e.closePath()}}),vT=Nx.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()}}),yT={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}},xT={};th({line:lM,rect:Kx,roundRect:Kx,square:Kx,circle:TC,diamond:gT,pin:mT,arrow:vT,triangle:fT},function(e,t){xT[t]=new e});var bT=Nx.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Om(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=xT[r];i||(i=xT[r="rect"]),yT[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function wT(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 ST(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://")?zM(e.slice(8),new Xp(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?OM(e.slice(7),{},new Xp(t,n,r,i),a?"center":"cover"):new bT({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=wT,o&&s.setColor(o),s}function _T(e){return lh(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function AT(e,t){if(null!=e)return lh(e)||(e=[e,e]),[iv(e[0],t[0])||0,iv(bh(e[1],e[0]),t[1])||0]}function kT(e){return isFinite(e)}function CT(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=kT(a)?a:.5,s=kT(s)?s:.5,l=l>=0&&kT(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=kT(r)?r:0,i=kT(i)?i:1,o=kT(o)?o:0,a=kT(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 MT(e){return parseInt(e,10)}function IT(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]||MT(s[r])||MT(e.style[r]))-(MT(s[o])||0)-(MT(s[a])||0)|0}function TT(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]:hh(t)?[t]:lh(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=nh(i,function(e){return e/a}),o/=a)}return[i,o]}var DT=new fx(!0);function jT(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function PT(e){return"string"===typeof e&&"none"!==e}function LT(e){var t=e.fill;return null!=t&&"none"!==t}function RT(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 ET(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 NT(e,t,n){var r=cy(t.image,t.__image,n);if(hy(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)*zh),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var OT=["shadowBlur","shadowOffsetX","shadowOffsetY"],zT=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function BT(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){VT(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?Cy.opacity:a}(r||t.blend!==n.blend)&&(o||(VT(e,i),o=!0),e.globalCompositeOperation=t.blend||Cy.blend);for(var s=0;s<OT.length;s++){var l=OT[s];(r||t[l]!==n[l])&&(o||(VT(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(VT(e,i),o=!0),e.shadowColor=t.shadowColor||Cy.shadowColor),o}function FT(e,t,n,r,i){var o=WT(t,i.inHover),a=r?null:n&&WT(n,i.inHover)||{};if(o===a)return!1;var s=BT(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(VT(e,i),s=!0),PT(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(VT(e,i),s=!0),PT(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(VT(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||(VT(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<zT.length;u++){var c=zT[u],d=c[0];(r||o[d]!==a[d])&&(s||(VT(e,i),s=!0),e[d]=o[d]||c[1])}return s}function $T(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 VT(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function WT(e,t){return t&&e.__hoverStyle||e.style}function HT(e,t){GT(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function GT(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&&(VT(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(VT(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(),$T(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,h=t instanceof Nx&&t.autoBatch&&function(e){var t=LT(e),n=jT(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)?(VT(e,n),$T(e,t)):h||VT(e,n);var p=WT(t,n.inHover);t instanceof Nx?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),FT(e,t,u,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=jT(n),a=LT(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||DT,d=t.__dirty;if(!r){var h=n.fill,p=n.stroke,f=a&&!!h.colorStops,g=o&&!!p.colorStops,m=a&&!!h.image,v=o&&!!p.image,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0;(f||g)&&(S=t.getBoundingRect()),f&&(y=d?CT(e,h,S):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?CT(e,p,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(b=d||!t.__canvasFillPattern?NT(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=b),v&&(w=d||!t.__canvasStrokePattern?NT(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),f?e.fillStyle=y:m&&(b?e.fillStyle=b:a=!1),g?e.strokeStyle=x:v&&(w?e.strokeStyle=w:o=!1)}var _,A,k=t.getGlobalScale();c.setScale(k[0],k[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(_=(i=TT(t))[0],A=i[1]);var C=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),C=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),C&&c.rebuildPath(e,l?s:1),_&&(e.setLineDash(_),e.lineDashOffset=A),r||(n.strokeFirst?(o&&ET(e,n),a&&RT(e,n)):(a&&RT(e,n),o&&ET(e,n))),_&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof Bx?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),FT(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||Dd,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=TT(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(jT(n)&&e.strokeText(i,n.x,n.y),LT(n)&&e.fillText(i,n.x,n.y)):(LT(n)&&e.fillText(i,n.x,n.y),jT(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,p)):t instanceof Wx?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){BT(e,WT(t,i.inHover),n&&WT(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=cy(n.image,t.__image,t,t.onload);if(r&&hy(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),h=s-(c=n.sy);e.drawImage(r,u,c,d,h,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,p)):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(),GT(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(),GT(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)),h&&r&&VT(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var UT=new pT,XT=new qf(100),YT=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function qT(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&UT.delete(e);var o=UT.get(e);if(o)return o;var a=Kd(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<YT.length;++l){var u=a[YT[l]];if(null!=u&&!lh(u)&&!ch(u)&&!hh(u)&&"boolean"!==typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=XT.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,h=KT(a.dashArrayX),p=function(e){if(!e||"object"===typeof e&&0===e.length)return[0,0];if(hh(e)){var t=Math.ceil(e);return[t,t]}var n=nh(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=ZT(a.symbol),g=(b=h,nh(b,function(e){return QT(e)})),m=QT(p),v=!i&&Pd.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Av(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=Av(r,f[t].length);e*=r;var i=m*g.length*f.length;0;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var b;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<p.length;++t)e+=p[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,b=0,w=0;g<2*x.width;){var S=0;for(t=0;t<h[u].length;++t)S+=h[u][t];if(S<=0)break;if(b%2===0){var _=.5*(1-a.symbolSize),A=g+h[u][b]*_,k=o+p[s]*_,C=h[u][b]*a.symbolSize,M=p[s]*a.symbolSize,I=w/2%f[c].length;T(A,k,C,M,f[c][I])}g+=h[u][b],++w,++b===h[u].length&&(b=0)}++u===h.length&&(u=0)}o+=p[s],++l,++s===p.length&&(s=0)}function T(e,t,o,s,l){var u=i?1:n,c=ST(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var h=r.painter.renderOneToVNode(c);h&&y.children.push(h)}else HT(d,c)}})(),s&&XT.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,UT.set(e,s),e.dirty=!1,s}function ZT(e){if(!e||0===e.length)return[["rect"]];if(ch(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!ch(e[n])){t=!1;break}if(t)return ZT([e]);var r=[];for(n=0;n<e.length;++n)ch(e[n])?r.push([e[n]]):r.push(e[n]);return r}function KT(e){if(!e||0===e.length)return[[0,0]];if(hh(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!hh(e[n])){t=!1;break}if(t)return KT([e]);var r=[];for(n=0;n<e.length;++n)if(hh(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=nh(e[n],function(e){return Math.ceil(e)})).length%2===1?r.push(i.concat(i)):r.push(i)}return r}function QT(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2===1?2*t:t}const JT=new op;var eD={};var tD=2e3,nD=4500,rD={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:tD,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:nD,ARIA:6e3,DECAL:7e3}},iD="__flagInMainProcess",oD="__pendingUpdate",aD="__needsUpdateStatus",sD=/^[a-zA-Z0-9_]+$/,lD="__connectUpdateStatus";function uD(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return dD(this,e,t);ED(this.id)}}function cD(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return dD(this,e,t)}}function dD(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),op.prototype[t].apply(e,n)}var hD,pD,fD,gD,mD,vD,yD,xD,bD,wD,SD,_D,AD,kD,CD,MD,ID,TD,DD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t}(op),jD=DD.prototype;jD.on=cD("on"),jD.off=cD("off");var PD=function(e){function t(t,n,r){var i=e.call(this,new eT)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},ch(n)&&(n=$D[n]),i._dom=t;r.ssr&&(Jm=function(e){var t=fb(e),n=t.dataIndex;if(null!=n){var r=Ph();return r.set("series_index",t.seriesIndex),r.set("data_index",n),t.ssrType&&r.set("ssr_type",t.ssrType),r}});var o=i._zr=tv(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:bh(r.useDirtyRect,!1),useCoarsePointer:bh(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=vI(ah(o.flush,o),17),(n=Xd(n))&&gA(n,!0),i._theme=n,i._locale=function(e){if(ch(e)){var t=tS[e.toUpperCase()]||{};return e===Qw||e===Jw?Xd(t):Yd(Xd(t),Xd(tS[eS]),!1)}return Yd(Xd(e),Xd(tS[eS]),!1)}(r.locale||rS),i._coordSysMgr=new G_;var a=i._api=CD(i);function s(e,t){return e.__prio-t.__prio}return df(FD,s),df(zD,s),i._scheduler=new GI(i,a,zD,FD),i._messageCenter=new DD,i._initEvents(),i.resize=ah(i.resize,i),o.animation.on("frame",i._onframe,i),wD(o,i),SD(o,i),Mh(i),i}return kd(t,e),t.prototype._onframe=function(){if(!this._disposed){TD(this);var e=this._scheduler;if(this[oD]){var t=this[oD].silent;this[iD]=!0;try{hD(this),gD.update.call(this,null,this[oD].updateParams)}catch(oae){throw this[iD]=!1,this[oD]=null,oae}this._zr.flush(),this[iD]=!1,this[oD]=null,xD.call(this,t),bD.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),vD(this,r),e.performVisualTasks(r),kD(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[iD])if(this._disposed)ED(this.id);else{var r,i,o;if(ph(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[iD]=!0,!this._model||t){var a=new q_(this._api),s=this._theme,l=this._model=new F_;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},BD);var u={seriesTransition:o,optionChanged:!0};if(n)this[oD]={silent:r,updateParams:u},this[iD]=!1,this.getZr().wakeUp();else{try{hD(this),gD.update.call(this,null,u)}catch(oae){throw this[oD]=null,this[iD]=!1,oae}this._ssr||this._zr.flush(),this[oD]=null,this[iD]=!1,xD.call(this,r),bD.call(this,r)}}},t.prototype.setTheme=function(){YA()},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||Id.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(Id.svgSupported){var e=this._zr;return th(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;th(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 th(r,function(e){e.group.ignore=!1}),o}ED(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(HD[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();th(WD,function(o,d){if(o.group===n){var h=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(Xd(e)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}});var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=Pd.createCanvas(),g=tv(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),t){var m="";return th(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 Kx({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),th(c,function(e){var t=new Wx({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)}ED(this.id)},t.prototype.convertToPixel=function(e,t){return mD(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return mD(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return th(Vv(this._model,e),function(e,r){r.indexOf("Models")>=0&&th(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))}else 0},this)},this),!!n;ED(this.id)},t.prototype.getVisual=function(e,t){var n=Vv(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?oT(r,i,t):aT(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;th(RD,function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&cT(o,function(e){var t=fb(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=Zd({},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];0,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)}),th(OD,function(e,t){r._messageCenter.on(t,function(e){this.trigger(t,e)},r)}),th(["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?(uT("map","selectchanged",t,r,e),uT("pie","selectchanged",t,r,e)):"select"===e.fromAction?(uT("map","selected",t,r,e),uT("pie","selected",t,r,e)):"unselect"===e.fromAction&&(uT("map","unselected",t,r,e),uT("pie","unselected",t,r,e))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?ED(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)ED(this.id);else{this._disposed=!0,this.getDom()&&Xv(this.getDom(),UD,"");var e=this,t=e._api,n=e._model;th(e._componentsViews,function(e){e.dispose(n,t)}),th(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 WD[e.id]}},t.prototype.resize=function(e){if(!this[iD])if(this._disposed)ED(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[oD]&&(null==r&&(r=this[oD].silent),n=!0,this[oD]=null),this[iD]=!0;try{n&&hD(this),gD.update.call(this,{type:"resize",animation:Zd({duration:0},e&&e.animation)})}catch(oae){throw this[iD]=!1,oae}this[iD]=!1,xD.call(this,r),bD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)ED(this.id);else if(ph(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),VD[e]){var n=VD[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?ED(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Zd({},e);return t.type=OD[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)ED(this.id);else if(ph(t)||(t={silent:!!t}),ND[e.type]&&this._model)if(this[iD])this._pendingActions.push(e);else{var n=t.silent;yD.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Id.browser.weChat&&this._throttledZrFlush(),xD.call(this,n),bD.call(this,n)}},t.prototype.updateLabelLayout=function(){JT.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)ED(this.id);else{var t=e.seriesIndex;0,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(!vw(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(vw(e))return;if(e instanceof Nx&&function(e){var t=yb(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)}})}hD=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),pD(e,!0),pD(e,!1),t.plan()},pD=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=Qv(e.type);0,(c=new(t?oC.getClass(d.main,d.sub):pI.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)}},fD=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=Ph(),th(Iv(u),function(e){var t=Nv(e,null);null!=t&&l.set(t,!0)})),o&&o.eachComponent(s,function(t){if(!(l&&null!=l.get(t.id)))if(dw(n))if(t instanceof rC)n.type!==_b||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Bv(i,t);o=(lh(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=fb(a);Kb(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Kb(r,c,d,n)}}}(t,n,e._api);else{var r=Jb(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===_b&&i&&!n.notBlur&&Qb(t.mainType,t.componentIndex,e._api),o&&th(o,function(e){n.type===_b?Wb(e):Hb(e)})}else cw(n)&&t instanceof rC&&(!function(e,t){if(cw(t)){var n=t.dataType,r=Bv(e.getData(n),t);lh(r)||(r=[r]),e[t.type===Mb?"toggleSelect":t.type===kb?"select":"unselect"](r,n)}}(t,n,e._api),ew(t),ID(e))},e),o&&o.eachComponent(s,function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else th([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},gD={prepareAndUpdate:function(e){hD(this),gD.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),vD(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),_D(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),JT.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=Ph();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}),kD(this,r,i,t,{},a),JT.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),pI.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),_D(this,n,this._api,t,{}),JT.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()}),pI.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)}),JT.trigger("afterupdate",r,this._api))},updateLayout:function(e){gD.update.call(this,e)}},mD=function(e,t,n,r){if(e._disposed)ED(e.id);else{for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Vv(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}0}},vD=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},yD=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=ND[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Qv(l[0]);this[iD]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=nh(e.batch,function(t){return(t=Kd(Zd({},t),e)).batch=null,t}));var p,f=[],g=cw(e),m=dw(e);if(m&&Zb(this._api),th(d,function(t){if((p=(p=a.action(t,n._model,n._api))||Zd({},t)).type=s.event||p.type,f.push(p),m){var r=Wv(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";fD(n,u,t,o),ID(n)}else g?(fD(n,u,t,"series"),ID(n)):c&&fD(n,u,t,c.main,c.sub)}),"none"!==u&&!m&&!g&&!c)try{this[oD]?(hD(this),gD.update.call(this,e),this[oD]=null):gD[u].call(this,e)}catch(oae){throw this[iD]=!1,oae}if(p=h?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[iD]=!1,!t){var v=this._messageCenter;if(v.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:o,selected:tw(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},xD=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();yD.call(this,n,e)}},bD=function(e){!e&&this.trigger("updated")},wD=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[oD]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},SD=function(e,t){e.on("mouseover",function(e){var n=cT(e.target,uw);n&&(!function(e,t,n){var r=fb(e),i=Jb(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Qb(r.componentMainType,r.componentIndex,n),th(o,function(e){return $b(e,t)})):(Kb(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Qb(r.componentMainType,r.componentIndex,n),$b(e,t))}(n,e,t._api),ID(t))}).on("mouseout",function(e){var n=cT(e.target,uw);n&&(!function(e,t,n){Zb(n);var r=fb(e),i=Jb(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?th(i,function(e){return Vb(e,t)}):Vb(e,t)}(n,e,t._api),ID(t))}).on("click",function(e){var n=cT(e.target,function(e){return null!=fb(e).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",i=fb(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},_D=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);df(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),th(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),AD(e,t,n,r,i),th(e._chartsViews,function(e){e.__alive=!1}),kD(e,t,n,r,i),th(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},AD=function(e,t,r,a,s,l){th(l||e._componentsViews,function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)})},kD=function(e,t,r,a,s,l){var u=e._scheduler;s=Zd(s||{},{updatedSeries:t.getSeries()}),JT.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),ew(t)}),u.unfinished=c||u.unfinished,JT.trigger("series:layoutlabels",t,r,s),JT.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")&&!Id.node&&!Id.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),JT.trigger("series:afterupdate",t,r,s)},ID=function(e){e[aD]=!0,e.getZr().wakeUp()},TD=function(e){e[aD]&&(e.getZr().storage.traverse(function(e){vw(e)||t(e)}),e[aD]=!1)},CD=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return kd(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){Wb(t,n),ID(e)},n.prototype.leaveEmphasis=function(t,n){Hb(t,n),ID(e)},n.prototype.enterBlur=function(t){Gb(t),ID(e)},n.prototype.leaveBlur=function(t){Ub(t),ID(e)},n.prototype.enterSelect=function(t){Xb(t),ID(e)},n.prototype.leaveSelect=function(t){Yb(t),ID(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}(V_))(e)},MD=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][lD]=t}}th(OD,function(n,r){e._messageCenter.on(r,function(n){if(HD[e.group]&&0!==e[lD]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];th(WD,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),th(i,function(e){1!==e[lD]&&e.dispatchAction(r)}),t(i,2)}})})}}(),t}(op),LD=PD.prototype;LD.on=uD("on"),LD.off=uD("off"),LD.one=function(e,t,n){var r=this;YA(),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 RD=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ED(e){0}var ND={},OD={},zD=[],BD=[],FD=[],$D={},VD={},WD={},HD={},GD=+new Date-0,UD=(new Date,"_echarts_instance_");function XD(e,t,n){var r=!(n&&n.ssr);if(r){0;var i=YD(e);if(i)return i;0}var o=new PD(e,t,n);return o.id="ec_"+GD++,WD[o.id]=o,r&&Xv(e,UD,o.id),MD(o),JT.trigger("afterinit",o),o}function YD(e){return WD[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,UD)]}function qD(e,t){$D[e]=t}function ZD(e){Qd(BD,e)<0&&BD.push(e)}function KD(e,t){nj(zD,e,t,2e3)}function QD(e,t){JT.on(e,t)}function JD(e,t,n){uh(t)&&(n=t,t="");var r=ph(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,OD[t]||(Ah(sD.test(r)&&sD.test(t)),ND[r]||(ND[r]={action:n,actionInfo:e}),OD[t]=r)}function ej(e,t){nj(FD,e,t,3e3,"visual")}var tj=[];function nj(e,t,n,r,i){if((uh(t)||ph(t))&&(n=t,t=r),!(Qd(tj,n)>=0)){tj.push(n);var o=GI.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function rj(e,t){VD[e]=t}var ij=function(e){var t=(e=Xd(e)).type;t||qA("");var n=t.split(":");2!==n.length&&qA("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,uk.set(t,e)};ej(tD,kI),ej(nD,MI),ej(nD,II),ej(tD,rT),ej(nD,iT),ej(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=qT(n,t))});var i=r.getVisual("decal");if(i)r.getVisual("style").decal=qT(i,t)}})}),ZD(gA),KD(900,function(e){var t=Ph();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(mA)}),rj("default",function(e,t){Kd(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 Zm,r=new Kx({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new pb({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 Kx({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new mM({shape:{startAngle:-TI/2,endAngle:-TI/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*TI/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*TI/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}),JD({type:_b,event:_b,update:_b},Oh),JD({type:Ab,event:Ab,update:Ab},Oh),JD({type:kb,event:kb,update:kb},Oh),JD({type:Cb,event:Cb,update:Cb},Oh),JD({type:Mb,event:Mb,update:Mb},Oh),qD("light",XI),qD("dark",JI);var oj=[],aj={registerPreprocessor:ZD,registerProcessor:KD,registerPostInit:function(e){QD("afterinit",e)},registerPostUpdate:function(e){QD("afterupdate",e)},registerUpdateLifecycle:QD,registerAction:JD,registerCoordinateSystem:function(e,t){G_.register(e,t)},registerLayout:function(e,t){nj(FD,e,t,1e3,"layout")},registerVisual:ej,registerTransform:ij,registerLoading:rj,registerMap:function(e,t,n){var r=eD["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){eD[e]=t},PRIORITY:rD,ComponentModel:i_,ComponentView:oC,SeriesModel:rC,ChartView:pI,registerComponentModel:function(e){i_.registerClass(e)},registerComponentView:function(e){oC.registerClass(e)},registerSeriesModel:function(e){rC.registerClass(e)},registerChartView:function(e){pI.registerClass(e)},registerSubTypeDefaulter:function(e,t){i_.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Km[e]=n}};function sj(e){lh(e)?th(e,function(e){sj(e)}):Qd(oj,e)>=0||(oj.push(e),uh(e)&&(e={install:e}),e.install(aj))}var lj=2*Math.PI,uj=fx.CMD,cj=["top","right","bottom","left"];function dj(e,t,n,r,i){var o=n.width,a=n.height;switch(e){case"top":r.set(n.x+o/2,n.y-t),i.set(0,-1);break;case"bottom":r.set(n.x+o/2,n.y+a+t),i.set(0,1);break;case"left":r.set(n.x-t,n.y+a/2),i.set(-1,0);break;case"right":r.set(n.x+o+t,n.y+a/2),i.set(1,0)}}function hj(e,t,n,r,i,o,a,s,l){a-=e,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+e,d=(s/=u)*n+t;if(Math.abs(r-i)%lj<1e-4)return l[0]=c,l[1]=d,u-n;if(o){var h=r;r=xx(i),i=xx(h)}else r=xx(r),i=xx(i);r>i&&(i+=lj);var p=Math.atan2(s,a);if(p<0&&(p+=lj),p>=r&&p<=i||p+lj>=r&&p+lj<=i)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(r)+e,g=n*Math.sin(r)+t,m=n*Math.cos(i)+e,v=n*Math.sin(i)+t,y=(f-a)*(f-a)+(g-s)*(g-s),x=(m-a)*(m-a)+(v-s)*(v-s);return y<x?(l[0]=f,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(x))}function pj(e,t,n,r,i,o,a,s){var l=i-e,u=o-t,c=n-e,d=r-t,h=Math.sqrt(c*c+d*d),p=(l*(c/=h)+u*(d/=h))/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var f=a[0]=e+p*c,g=a[1]=t+p*d;return Math.sqrt((f-i)*(f-i)+(g-o)*(g-o))}function fj(e,t,n,r,i,o,a){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,l=t+r,u=a[0]=Math.min(Math.max(i,e),s),c=a[1]=Math.min(Math.max(o,t),l);return Math.sqrt((u-i)*(u-i)+(c-o)*(c-o))}var gj=[];function mj(e,t,n){var r=fj(t.x,t.y,t.width,t.height,e.x,e.y,gj);return n.set(gj[0],gj[1]),r}function vj(e,t,n){for(var r,i,o=0,a=0,s=0,l=0,u=1/0,c=t.data,d=e.x,h=e.y,p=0;p<c.length;){var f=c[p++];1===p&&(s=o=c[p],l=a=c[p+1]);var g=u;switch(f){case uj.M:o=s=c[p++],a=l=c[p++];break;case uj.L:g=pj(o,a,c[p],c[p+1],d,h,gj,!0),o=c[p++],a=c[p++];break;case uj.C:g=Nf(o,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],d,h,gj),o=c[p++],a=c[p++];break;case uj.Q:g=Vf(o,a,c[p++],c[p++],c[p],c[p+1],d,h,gj),o=c[p++],a=c[p++];break;case uj.A:var m=c[p++],v=c[p++],y=c[p++],x=c[p++],b=c[p++],w=c[p++];p+=1;var S=!!(1-c[p++]);r=Math.cos(b)*y+m,i=Math.sin(b)*x+v,p<=1&&(s=r,l=i),g=hj(m,v,x,b,b+w,S,(d-m)*x/y+m,h,gj),o=Math.cos(b+w)*y+m,a=Math.sin(b+w)*x+v;break;case uj.R:g=fj(s=o=c[p++],l=a=c[p++],c[p++],c[p++],d,h,gj);break;case uj.Z:g=pj(o,a,s,l,d,h,gj,!0),o=s,a=l}g<u&&(u=g,n.set(gj[0],gj[1]))}return u}var yj=new zp,xj=new zp,bj=new zp,wj=new zp,Sj=new zp;function _j(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=i.candidates||cj,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var l=1/0,u=i.anchor,c=e.getComputedTransform(),d=c&&Op([],c),h=t.get("length2")||0;u&&bj.copy(u);for(var p=0;p<a.length;p++){dj(a[p],0,s,yj,wj),zp.scaleAndAdd(xj,yj,wj,h),xj.transform(d);var f=e.getBoundingRect(),g=u?u.distance(xj):e instanceof Nx?vj(xj,e.path,bj):mj(xj,f,bj);g<l&&(l=g,xj.transform(c),bj.transform(c),bj.toArray(o[0]),xj.toArray(o[1]),yj.toArray(o[2]))}Cj(o,t.get("minTurnAngle")),n.setShape({points:o})}}}var Aj=[],kj=new zp;function Cj(e,t){if(t<=180&&t>0){t=t/180*Math.PI,yj.fromArray(e[0]),xj.fromArray(e[1]),bj.fromArray(e[2]),zp.sub(wj,yj,xj),zp.sub(Sj,bj,xj);var n=wj.len(),r=Sj.len();if(!(n<.001||r<.001)){wj.scale(1/n),Sj.scale(1/r);var i=wj.dot(Sj);if(Math.cos(t)<i){var o=pj(xj.x,xj.y,bj.x,bj.y,yj.x,yj.y,Aj,!1);kj.fromArray(Aj),kj.scaleAndAdd(Sj,o/Math.tan(Math.PI-t));var a=bj.x!==xj.x?(kj.x-xj.x)/(bj.x-xj.x):(kj.y-xj.y)/(bj.y-xj.y);if(isNaN(a))return;a<0?zp.copy(kj,xj):a>1&&zp.copy(kj,bj),kj.toArray(e[1])}}}}function Mj(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,yj.fromArray(e[0]),xj.fromArray(e[1]),bj.fromArray(e[2]),zp.sub(wj,xj,yj),zp.sub(Sj,bj,xj);var r=wj.len(),i=Sj.len();if(!(r<.001||i<.001))if(wj.scale(1/r),Sj.scale(1/i),wj.dot(t)<Math.cos(n)){var o=pj(xj.x,xj.y,bj.x,bj.y,yj.x,yj.y,Aj,!1);kj.fromArray(Aj);var a=Math.PI/2,s=a+Math.acos(Sj.dot(t))-n;if(s>=a)zp.copy(kj,bj);else{kj.scaleAndAdd(Sj,o/Math.tan(Math.PI/2-s));var l=bj.x!==xj.x?(kj.x-xj.x)/(bj.x-xj.x):(kj.y-xj.y)/(bj.y-xj.y);if(isNaN(l))return;l<0?zp.copy(kj,xj):l>1&&zp.copy(kj,bj)}kj.toArray(e[1])}}}function Ij(e,t,n,r){var i="normal"===n,o=i?e:e.ensureState(n);o.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?e.useStyle(s):o.style=s}function Tj(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Kh(r[0],r[1]),o=Kh(r[1],r[2]);if(!i||!o)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(i,o)*n,s=Jh([],r[1],r[0],a/i),l=Jh([],r[1],r[2],a/o),u=Jh([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c<r.length;c++)e.lineTo(r[c][0],r[c][1])}function Dj(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(i){for(var o=t.normal,a=o.get("show"),s=i.ignore,l=0;l<wb.length;l++){var u=wb[l],c=t[u],d="normal"===u;if(c){var h=c.get("show");if((d?s:bh(i.states[u]&&i.states[u].ignore,s))||!bh(h,a)){var p=d?r:r&&r.states[u];p&&(p.ignore=!0),r&&Ij(r,!0,u,c);continue}r||(r=new iM,e.setTextGuideLine(r),d||!s&&a||Ij(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),Ij(r,!1,u,c)}}if(r){Kd(r.style,n),r.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=Tj}}else r&&e.removeTextGuideLine()}function jj(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<bb.length;r++){var i=bb[r];n[i]=e.getModel([i,t])}return n}function Pj(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 CM(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}function Lj(e,t,n,r,i,o){var a=e.length;if(!(a<2)){e.sort(function(e,n){return e.rect[t]-n.rect[t]});for(var s,l=0,u=!1,c=[],d=0,h=0;h<a;h++){var p=e[h],f=p.rect;(s=f[t]-l)<0&&(f[t]-=s,p.label[t]-=s,u=!0);var g=Math.max(-s,0);c.push(g),d+=g,l=f[t]+f[n]}d>0&&o&&S(-d/a,0,a);var m,v,y=e[0],x=e[a-1];return b(),m<0&&_(-m,.8),v<0&&_(v,.8),b(),w(m,v,1),w(v,m,-1),b(),m<0&&A(-m),v<0&&A(v),u}function b(){m=y.rect[t]-r,v=i-x.rect[t]-x.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&_(-i*n,1)}else _(-e*n,1)}}function S(n,r,i){0!==n&&(u=!0);for(var o=r;o<i;o++){var a=e[o];a.rect[t]+=n,a.label[t]+=n}}function _(r,i){for(var o=[],s=0,l=1;l<a;l++){var u=e[l-1].rect,c=Math.max(e[l].rect[t]-u[t]-u[n],0);o.push(c),s+=c}if(s){var d=Math.min(Math.abs(r)/s,i);if(r>0)for(l=0;l<a-1;l++){S(o[l]*d,0,l+1)}else for(l=a-1;l>0;l--){S(-(o[l-1]*d),l,a)}}}function A(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),(e-=n)<=0)return}}function Rj(e,t,n,r){return Lj(e,"y","height",t,n,r)}function Ej(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new Xp(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,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new CM(f.localRect,f.transform)),d||(d=new CM(s,l)),d.intersect(f.obb)){h=!0;break}}}h?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}function Nj(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function Oj(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:Nj(r&&r.shape.points)}}var zj=["align","verticalAlign","width","height","fontSize"],Bj=new Im,Fj=Fv(),$j=Fv();function Vj(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null!=t[i]&&(e[i]=t[i])}}var Wj=["x","y","rotation"];const Hj=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,i){var o=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),l=r.getBoundingRect().plain();Xp.applyTransform(l,l,s),s?Bj.setLocalTransform(s):(Bj.x=Bj.y=Bj.rotation=Bj.originX=Bj.originY=0,Bj.scaleX=Bj.scaleY=1),Bj.rotation=xx(Bj.rotation);var u,c=r.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();Xp.applyTransform(u,u,d)}var h=u&&c.getTextGuideLine();this._labelList.push({label:r,labelLine:h,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:h&&h.ignore,x:Bj.x,y:Bj.y,scaleX:Bj.scaleX,scaleY:Bj.scaleY,rotation:Bj.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get("labelLayout");(uh(r)||oh(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),o=fb(e);i&&!i.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,n,i,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){_j(e,t)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],a=o.label,s=a.__hostTarget,l=o.defaultAttr,u=void 0;u=(u=uh(o.layoutOption)?o.layoutOption(Oj(o,s)):o.layoutOption)||{},o.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var d=!1;if(null!=u.x?(a.x=iv(u.x,t),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=iv(u.y,n),a.setStyle("y",0),d=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),d=!1)}Fj(a).needsUpdateLabelLine=d,a.rotation=null!=u.rotate?u.rotate*c:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<zj.length;p++){var f=zj[p];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var g=o.seriesModel;if(null!=o.dataIndex)g=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);a.on("drag",r(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},e.prototype.layout=function(e){var t,n=e.getWidth(),r=e.getHeight(),i=Pj(this._labelList),o=ih(i,function(e){return"shiftX"===e.layoutOption.moveOverlap}),a=ih(i,function(e){return"shiftY"===e.layoutOption.moveOverlap});Lj(o,"x","width",0,n,t),Rj(a,0,r),Ej(ih(i,function(e){return e.layoutOption.hideOverlap}))},e.prototype.processLabelsOverall=function(){var e=this;th(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var o=!r,a=t.getTextContent();!o&&a&&(o=Fj(a).needsUpdateLabelLine),o&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=fb(e),i=r.dataIndex;if(n&&null!=i){var o=t.getData(r.dataType),a=o.getItemModel(i),s={},l=o.getItemVisual(i,"style");if(l){var u=o.getVisual("drawType");s.stroke=l[u]}var c=a.getModel("labelLine");Dj(e,jj(a),s),_j(e,c)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!vw(e))){var i=(p=Fj(n)).oldLayout,o=fb(e),a=o.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(i){n.attr(i);var u=e.prevStates;u&&(Qd(u,"select")>=0&&n.attr(p.oldLayoutSelect),Qd(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),gw(n,s,t,a)}else if(n.attr(s),!Rw(n).valueAnimation){var c=bh(n.style.opacity,1);n.style.opacity=0,mw(n,{style:{opacity:c}},t,a)}if(p.oldLayout=s,n.states.select){var d=p.oldLayoutSelect={};Vj(d,s,Wj),Vj(d,n.states.select,Wj)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};Vj(h,s,Wj),Vj(h,n.states.emphasis,Wj)}Nw(n,a,l,t,t)}if(r&&!r.ignore&&!r.invisible){i=(p=$j(r)).oldLayout;var p,f={points:r.shape.points};i?(r.attr({shape:i}),gw(r,{shape:f},t)):(r.setShape(f),r.style.strokePercent=0,mw(r,{style:{strokePercent:1}},t)),p.oldLayout=f}},e}();var Gj=Fv();function Uj(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var r=Gj(t).labelManager;r||(r=Gj(t).labelManager=new Hj),r.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var r=Gj(t).labelManager;n.updatedSeries.forEach(function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}function Xj(e,t,n){var r=Pd.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}sj(Uj);var Yj=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||gm,"string"===typeof t?i=Xj(t,n,r):ph(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Eh(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return kd(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=Xj("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 Xp(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new Xp(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 Xp(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 h=e.width*e.height,p=c.width*c.height,f=l.width*l.height-h-p;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new Xp(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=e[c]){var d=p.shouldBePainted(n,r,!0,!0);(f=p.__isRendered&&(1&p.__dirty||!d)?p.getPrevPaintRect():null)&&u(f);var h=d&&(1&p.__dirty||!p.__isRendered)?p.getPaintRect():null;h&&u(h)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,f;d=(p=t[c])&&p.shouldBePainted(n,r,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered)(f=p.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 h(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(vh(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||CT(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=NT(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?h(0,0,o,a):n.length&&th(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(op);const qj=Yj;var Zj=1e5,Kj=314159,Qj=.01;var Jj=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=Zd({},n||{}),this.dpr=n.devicePixelRatio||gm,this._singleCanvas=i,this.root=e,e.style&&(Eh(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 qj(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=Kj,o.push(Kj),this._domRoot=e}else{this._width=IT(e,0,n),this._height=IT(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(Zj)),r||(r=n.ctx).save(),GT(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(Zj)},e.prototype.paintOne=function(e,t){HT(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;vf(function(){s._paintList(e,t,n,r)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(Kj).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,p=o&&l.createRepaintRects(e,t,h._width,h._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,p)}-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(p)if(0===p.length)s=l.__endIndex;else for(var b=h.dpr,w=0;w<p.length;++w){var S=p[w];d.save(),d.beginPath(),d.rect(S.x*b,S.y*b,S.width*b,S.height*b),d.clip(),x(S),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},h=this,p=0;p<i.length;p++)d(p);return Id.wxa&&th(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))&&(GT(a,e,i,o),e.setPrevPaintRect(s))}else GT(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Kj);var n=this._layers[e];return n||((n=new qj("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Yd(n,this._layerConfig[e],!0):this._layerConfig[e-Qj]&&Yd(n,this._layerConfig[e-Qj],!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||(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?Qj:0),this._needsManuallyCompositing),u.__builtin__||Ud("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,th(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Yd(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+Qj)Yd(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(Qd(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=IT(i,0,r),t=IT(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(Kj).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 qj("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];GT(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();const eP=Jj;var tP=Math.sin,nP=Math.cos,rP=Math.PI,iP=2*Math.PI,oP=180/rP;const aP=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=Sg(c-iP)||(u?l>=iP:-l>=iP),h=l>0?l%iP:l%iP+iP,p=!1;p=!!d||!Sg(c)&&h>=rP===!!u;var f=e+n*nP(o),g=t+r*tP(o);this._start&&this._add("M",f,g);var m=Math.round(i*oP);if(d){var v=1/this._p,y=(u?1:-1)*(iP-v);this._add("A",n,r,m,1,+u,e+n*nP(o+y),t+r*tP(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*nP(a),b=t+r*tP(a);this._add("A",n,r,m,+p,+u,x,b)}},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 h=arguments[d];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*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}();var sP="none",lP=Math.round;var uP=["lineCap","miterLimit","lineJoin"],cP=nh(uP,function(e){return"stroke-"+e.toLowerCase()});function dP(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof Wx)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==sP}(t)){var o=bg(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",sP);if(function(e){var t=e.stroke;return null!=t&&t!==sP}(t)){var s=bg(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 h=TT(n),p=h[0],f=h[1];p&&(f=lP(f||0),e("stroke-dasharray",p.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",sP);for(var g=0;g<uP.length;g++){var m=uP[g];if(r||t[m]!==Lx[m]){var v=t[m]||Lx[m];v&&e(cP[g],v)}}}else r&&e("stroke",sP)}}var hP="http://www.w3.org/2000/svg",pP="http://www.w3.org/1999/xlink",fP="ecmeta_";function gP(e){return document.createElementNS(hP,e)}function mP(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function vP(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?gp(a):a||"")+(r?""+n+nh(r,function(t){return e(t)}).join(n)+n:"")+("</"+i+">")}(e)}function yP(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function xP(e,t,n,r){return mP("svg","root",{width:e,height:t,xmlns:hP,"xmlns:xlink":pP,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var bP=0;function wP(){return bP++}var SP={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"},_P="transform-origin";function AP(e,t,n){var r=Zd({},e.shape);Zd(r,t),e.buildPath(n,r);var i=new aP;return i.reset(Pg(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function kP(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[_P]=n+"px "+r+"px")}var CP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function MP(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function IP(e){return ch(e)?SP[e]?"cubic-bezier("+SP[e]+")":Gf(e)?e:"":""}function TP(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof vM){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(th(o,function(e){var t=yP(n.zrId);t.animation=!0,TP(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=oh(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var h=c[d];a[d]=a[d]||{d:""},a[d].d+=h.d||""}for(var p in s){var f=s[p].animation;f.indexOf(i)>=0&&(r=f)}}}),r){t.d=!1;var s=MP(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"],h=IP(c.getClip().easing),p=c.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/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 h(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],h=Math.round(c.time/i*100)+"%",p=IP(c.easing),f=c.rawValue;(ch(f)||hh(f))&&(t[h]=t[h]||{},t[h][l]=c.rawValue,p&&(t[h][d]=p))}}}}for(var p=0;p<s;p++){(_=(S=a[p]).targetName)?"shape"===_&&h(S,u):!r&&h(S,l)}for(var f in l){var g={};Mm(g,e),Zd(g,l[f]);var m=Lg(g),v=l[f][d];c[f]=m?{transform:m}:{},kP(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 fx);var b=o.len();o.reset(),c[f].d=AP(e,u[f],o);var w=o.len();if(!x&&b!==w){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(p=0;p<s;p++){var S,_;"style"===(_=(S=a[p]).targetName)&&h(S,c,function(e){return CP[e]})}var A,k=oh(c),C=!0;for(p=1;p<k.length;p++){var M=k[p-1],I=k[p];if(c[M][_P]!==c[I][_P]){C=!1;break}A=c[M][_P]}if(C&&A){for(var f in c)c[f][_P]&&delete c[f][_P];t[_P]=A}if(ih(k,function(e){return oh(c[e]).length>0}).length)return MP(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-"+wP();n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}function DP(e,t,n,r){var i=JSON.stringify(e),o=n.cssStyleCache[i];o||(o=n.zrId+"-cls-"+wP(),n.cssStyleCache[i]=o,n.cssNodes["."+o+(r?":hover":"")]=e),t.class=t.class?t.class+" "+o:o}var jP=Math.round;function PP(e){return e&&ch(e.src)}function LP(e){return e&&uh(e.toDataURL)}function RP(e,t,n,r){dP(function(i,o){var a="fill"===i||"stroke"===i;a&&Dg(o)?WP(t,e,i,r):a&&Mg(o)?HP(n,e,i,r):e[i]=o,a&&r.ssr&&"none"===o&&(e["pointer-events"]="visible")},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,h=r.shadowBlur,p=bg(r.shadowColor),f=p.opacity,g=p.color,m=h/2/l+" "+h/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=mP("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[mP("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=jg(a)}}(n,e,r)}function EP(e,t){var n=function(e){if("function"===typeof Jm)return Jm(e)}(t);n&&(n.each(function(t,n){null!=t&&(e[(fP+n).toLowerCase()]=t+"")}),t.isSilent()&&(e[fP+"silent"]="true"))}function NP(e){return Sg(e[0]-1)&&Sg(e[1])&&Sg(e[2])&&Sg(e[3]-1)}function OP(e,t,n){if(t&&(!function(e){return Sg(e[4])&&Sg(e[5])}(t)||!NP(t))){var r=n?10:1e4;e.transform=NP(t)?"translate("+jP(t[4]*r)/r+" "+jP(t[5]*r)/r+")":function(e){return"matrix("+_g(e[0])+","+_g(e[1])+","+_g(e[2])+","+_g(e[3])+","+Ag(e[4])+","+Ag(e[5])+")"}(t)}}function zP(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(jP(r[o][0]*n)/n),i.push(jP(r[o][1]*n)/n);t.points=i.join(" ")}function BP(e){return!e.smooth}var FP={circle:[function(e){var t=nh(e,function(e){return"string"===typeof e?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var o=t[i],a=e[o[0]];null!=a&&(n[o[1]]=jP(a*r)/r)}}}(["cx","cy","r"])],polyline:[zP,BP],polygon:[zP,BP]};function $P(e,t){var n=e.style,r=e.shape,i=FP[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&Pg(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 h=d.getVersion(),p=e,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&l===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new aP),f.reset(u),d.rebuildPath(f,l),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return OP(o,e.transform),RP(o,n,e,t),EP(o,e),t.animation&&TP(e,o,t),t.emphasis&&function(e,t,n){if(!e.ignore)if(e.isSilent())DP(u={"pointer-events":"none"},t,n,!0);else{var r=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=r.fill;if(!i){var o=e.style&&e.style.fill,a=e.states.select&&e.states.select.style&&e.states.select.style.fill,s=e.currentStates.indexOf("select")>=0&&a||o;s&&(i=yg(s))}var l=r.lineWidth;l&&(l/=!r.strokeNoScale&&e.transform?e.transform[0]:1);var u={cursor:"pointer"};i&&(u.fill=i),r.stroke&&(u.stroke=r.stroke),l&&(u["stroke-width"]=l),DP(u,t,n,!0)}}(e,o,t),mP(s,e.id+"",o)}function VP(e,t){return e instanceof Nx?$P(e,t):e instanceof Wx?function(e,t){var n=e.style,r=n.image;if(r&&!ch(r)&&(PP(r)?r=r.src:LP(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),OP(a,e.transform),RP(a,n,e,t),EP(a,e),t.animation&&TP(e,a,t),mP("image",e.id+"",a)}}(e,t):e instanceof Bx?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||Dd,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Em(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":kg[n.textAlign]||n.textAlign};if(ab(n)){var l="",u=n.fontStyle,c=ib(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Td,h=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),h&&"normal"!==h&&(l+="font-weight:"+h+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),OP(s,e.transform),RP(s,n,e,t),EP(s,e),t.animation&&TP(e,s,t),mP("text",e.id+"",s,void 0,r)}}(e,t):void 0}function WP(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Ig(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Tg(o))return void 0;i="radialGradient",a.cx=bh(o.x,.5),a.cy=bh(o.y,.5),a.r=bh(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Ag(s[u].offset)+"%",h=bg(s[u].color),p=h.color,f=h.opacity,g={offset:d};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(mP("stop",u+"",g))}var m=vP(mP(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]=mP(i,y,a,l)),t[n]=jg(y)}function HP(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(Cg(o)){var h=o.imageWidth,p=o.imageHeight,f=void 0,g=o.image;if(ch(g)?f=g:PP(g)?f=g.src:LP(g)&&(f=g.toDataURL()),"undefined"===typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";Ah(h,m),Ah(p,m)}else if(null==h||null==p){var v=function(e,t){if(e){var n=e.elm,r=h||t.width,i=p||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=cy(f,null,e,function(e){u||v(S,e),v(i,e)});y&&y.width&&y.height&&(h=h||y.width,p=p||y.height)}i=mP("image","img",{href:f,width:h,height:p}),s.width=h,s.height=p}else o.svgElement&&(i=Xd(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,b;u?x=b=1:c?(b=1,x=s.width/a.width):d?(x=1,b=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==b||isNaN(b)||(s.height=b);var w=Lg(o);w&&(s.patternTransform=w);var S=mP("pattern","",s,[i]),_=vP(S),A=r.patternCache,k=A[_];k||(k=r.zrId+"-p"+r.patternIdx++,A[_]=k,s.id=k,S=r.defs[k]=mP("pattern",k,s,[i])),t[n]=jg(k)}}function GP(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]=mP("clipPath",o,a,[$P(e,n)])}t["clip-path"]=jg(o)}function UP(e){return document.createTextNode(e)}function XP(e,t,n){e.insertBefore(t,n)}function YP(e,t){e.removeChild(t)}function qP(e,t){e.appendChild(t)}function ZP(e){return e.parentNode}function KP(e){return e.nextSibling}function QP(e,t){e.textContent=t}var JP=mP("","");function eL(e){return void 0===e}function tL(e){return void 0!==e}function nL(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 rL(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function iL(e){var t,n=e.children,r=e.tag;if(tL(r)){var i=e.elm=gP(r);if(sL(JP,e),lh(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&qP(i,iL(o))}else tL(e.text)&&!ph(e.text)&&qP(i,UP(e.text))}else e.elm=UP(e.text);return e.elm}function oL(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&XP(e,iL(o),t)}}function aL(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(tL(i.tag))YP(ZP(i.elm),i.elm);else YP(e,i.elm)}}function sL(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):"style"===n?r.style.cssText=a: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(pP,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function lL(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(sL(e,t),eL(t.text)?tL(r)&&tL(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,h=n[0],p=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==h?h=n[++s]:null==p?p=n[--d]:rL(u,h)?(lL(u,h),u=t[++a],h=n[++s]):rL(c,p)?(lL(c,p),c=t[--l],p=n[--d]):rL(u,p)?(lL(u,p),XP(e,u.elm,KP(c.elm)),u=t[++a],p=n[--d]):rL(c,h)?(lL(c,h),XP(e,c.elm,u.elm),c=t[--l],h=n[++s]):(eL(r)&&(r=nL(t,a,l)),eL(i=r[h.key])||(o=t[i]).tag!==h.tag?XP(e,iL(h),u.elm):(lL(o,h),t[i]=void 0,XP(e,o.elm,u.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?oL(e,null==n[d+1]?null:n[d+1].elm,n,s,d):aL(e,t,a,l))}(n,r,i):tL(i)?(tL(e.text)&&QP(n,""),oL(n,null,i,0,i.length-1)):tL(r)?aL(n,r,0,r.length-1):tL(e.text)&&QP(n,""):e.text!==t.text&&(tL(r)&&aL(n,r,0,r.length-1),QP(n,t.text)))}var uL=0,cL=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=t,this._opts=n=Zd({},n),this.root=e,this._id="zr"+uL++,this._oldVNode=xP(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=gP("svg");sL(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(rL(e,t))lL(e,t);else{var n=e.elm,r=ZP(n);iL(t),null!==r&&(XP(r,t.elm,KP(n)),aL(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return VP(e,yP(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=yP(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=mP("rect","bg",{width:e,height:t,x:"0",y:"0"}),Dg(n))WP({fill:n},i.attrs,"fill",r);else if(Mg(n))HP({style:{fill:n},dirty:Oh,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=bg(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=mP("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=nh(oh(i.defs),function(e){return i.defs[e]});if(l.length&&o.push(mP("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=nh(oh(e),function(t){return t+i+nh(oh(e[t]),function(n){return n+":"+e[t][n]+";"}).join(r)+o}).join(r),s=nh(oh(t),function(e){return"@keyframes "+e+i+nh(oh(t[e]),function(n){return n+i+nh(oh(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=mP("style","stl",{},[],u);o.push(c)}}return xP(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},vP(this.renderToVNode({animation:bh(e.cssAnimation,!0),emphasis:bh(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:bh(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,h=d&&d.length||0,p=i&&i.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=p-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<h;m++){var v={};GP(d[m],v,t);var y=mP("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=VP(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=IT(r,0,n),t=IT(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(Mg(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=Rg(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();const dL=cL;function hL(e){return null==e?0:e.length||1}function pL(e){return e}const fL=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||pL,this._newKeyGetter=r||pL,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=hL(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=hL(l),d=hL(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 h=0;h<c;h++)this._remove&&this._remove(l[h]);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=hL(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=hL(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}();var gL=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 mL(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function vL(e){return"category"===e?"ordinal":"time"===e?"time":"float"}const yL=function(e){this.otherDims={},null!=e&&Zd(this,e)};var xL=Fv(),bL={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},wL=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=AL(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return bh(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=TA(this.source),n=!kL(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+=bL[l]||"f",u&&(r+=u.uid),r+="$"}var h=this.source;return{dimensions:i,hash:[h.seriesLayoutBy,h.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 SL(e){return e instanceof wL}function _L(e){for(var t=Ph(),n=0;n<(e||[]).length;n++){var r=e[n],i=ph(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function AL(e){var t=xL(e);return t.dimNameMap||(t.dimNameMap=_L(e.dimensionsDefine))}function kL(e){return e>30}var CL,ML,IL,TL,DL,jL,PL,LL=ph,RL=nh,EL="undefined"===typeof Int32Array?Array:Int32Array,NL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],OL=["_approximateExtent"],zL=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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;SL(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=ch(c)?new yL({name:c}):c instanceof yL?c:new yL(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),i[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.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=Ph();th(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(hh(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 Ak&&(r=e),!r){var o=this.dimensions,a=_A(e)||eh(e)?new DA(e,o.length):e;r=new Ak;var s=RL(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=Ph(),o=[],a=[],s={};th(e.dimensions,function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;mL(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),mL(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}l_.each(function(e,t){var n=mL(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=nh(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 gL(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&&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&&PL(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!==p_&&!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===u_&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Pv(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Nv(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Nv(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)PL(this,a);CL(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){LL(e)?Zd(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=IL(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 ML(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 lh(e)?r.getValues(RL(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];var r=n&&n[t];return null==r||isNaN(r)?-1:r},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){uh(e)&&(n=t,t=e,e=[]);var r=n||this,i=RL(TL(e),this._getStoreDimIndex,this);this._store.each(i,r?ah(t,r):t)},e.prototype.filterSelf=function(e,t,n){uh(e)&&(n=t,t=e,e=[]);var r=n||this,i=RL(TL(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?ah(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=oh(e),i=[];return th(r,function(r){var o=t._getStoreDimIndex(r);n[o]=e[r],i.push(o)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){uh(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=RL(TL(e),this._getStoreDimIndex,this),a=jL(this);return a._store=this._store.map(o,i?ah(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this;var o=RL(TL(e),this._getStoreDimIndex,this);this._store.modify(o,i?ah(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=jL(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=jL(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=jL(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 Yw(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new fL(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return ML(e,t)},function(e){return ML(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||{},LL(e)?Zd(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&&(lh(i=this.getVisual(t))?i=i.slice():LL(i)&&(i=Zd({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,LL(t)?Zd(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){LL(e)?Zd(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?Zd(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;gb(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){th(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:RL(this.dimensions,this._getDimInfo,this),this.hostModel)),DL(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];uh(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Sh(arguments)))})},e.internalField=(CL=function(e){var t=e._invertedIndicesMap;th(t,function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new EL(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}})},IL=function(e,t,n){return Nv(e._getCategory(t,n),null)},ML=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=IL(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},TL=function(e){return lh(e)||(e=null!=e?[e]:[]),e},jL=function(t){var n=new e(t._schema?t._schema:RL(t.dimensions,t._getDimInfo,t),t.hostModel);return DL(n,t),n},DL=function(e,t){th(NL.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,th(OL,function(n){e[n]=Xd(t[n])}),e._calculationInfo=Zd({},t._calculationInfo)},void(PL=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=IL(e,i,t)),null==s&&null!=o&&(r[t]=s=IL(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}();const BL=zL;function FL(e,t){_A(e)||(e=kA(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Ph(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return th(t,function(e){var t;ph(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&kL(a),l=r===e.dimensionsDefine,u=l?AL(e):_L(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Ph(c),h=new mk(a),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=r[e],i=ph(n)?n:{name:n},a=new yL,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 h[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(p=0;p<a;p++)f(p);d.each(function(e,t){var n=Iv(e).slice();if(1===n.length&&!ch(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);th(n,function(e,n){var i=ch(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!=l_.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}th(n,function(e){var t,n,r,i;if(ch(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=Zd({},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=Iv(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++)}th(s,function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(Kd(a,i),t,o),null==a.name&&n){var s=n[o];!ph(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&Kd(a.otherDims,r)})}});var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var b=v||"value";function w(e){null==e.name&&(e.name=e.coordDim)}if(s)th(o,function(e){w(e)}),o.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<a;S++){var _=f(S);null==_.coordDim&&(_.coordDim=$L(b,i,x),_.coordDimIndex=0,(!v||y<=0)&&(_.isExtraCoord=!0),y--),w(_),null!=_.type||A_(e,S)!==v_&&(!_.isExtraCoord||null==_.otherDims.itemName&&null==_.otherDims.seriesName)||(_.type="ordinal")}return function(e){for(var t=Ph(),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 wL({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function $L(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 VL=function(e){this.coordSysDims=[],this.axisMap=Ph(),this.categoryAxisMap=Ph(),this.coordSysName=e};var WL={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Hv).models[0],o=e.getReferringComponents("yAxis",Hv).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),HL(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),HL(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Hv).models[0];t.coordSysDims=["single"],n.set("single",i),HL(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Hv).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),HL(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),HL(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();th(o.parallelAxisIndex,function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),HL(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function HL(e){return"category"===e.get("type")}function GL(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!SL(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(th(r,function(e,t){ch(e)&&(r[t]=e={name:e}),h&&!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 p=u.coordDim,f=u.type,g=0;th(r,function(e){e.coordDim===p&&g++});var m={name:c,coordDim:p,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 UL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function XL(e,t){return UL(e,t)?e.getCalculationInfo("stackResultDimension"):t}const YL=function(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=kA(e)):o=(r=i.getSource()).sourceFormat===u_;var a=function(e){var t=e.get("coordinateSystem"),n=new VL(t),r=WL[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=G_.get(r);return t&&t.coordSysDims&&(n=nh(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=vL(i)}return n})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=uh(l)?l:l?sh(w_,s,t):null,c=FL(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&th(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),h=o?null:i.getSharedDataStore(c),p=GL(t,{schema:c,store:h}),f=new BL(c,t);f.setCalculationInfo(p);var g=null!=d&&function(e){if(e.sourceFormat===u_){return!lh(jv(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:h,null,g),f};const qL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return kd(t,e),t.prototype.getInitialData=function(e){return YL(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Zm,n=ST("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=ST(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}(rC);function ZL(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=$A(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push($A(e,t,n[a]));return o.join(" ")}}function KL(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!lh(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(" ")}function QL(e,t){this.parent.drift(e,t)}const JL=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return kd(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=ST(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=QL,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(){Wb(this.childAt(0))},t.prototype.downplay=function(){Hb(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{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):gw(h,d,a,n),ww(h)}if(this._updateCommon(e,n,s,r,i),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,mw(h,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,h,p,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,h=r.hoverScale,p=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=Cw(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=AT(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var b=e.getItemVisual(t,"style"),w=b.fill;if(f instanceof Wx){var S=f.style;f.useStyle(Zd({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else f.__isEmptyBrush?f.useStyle(Zd({},b)):f.useStyle(b),f.style.decal=null,f.setColor(w,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var _=e.getItemVisual(t,"liftZ"),A=this._z2;null!=_?null==A&&(this._z2=f.z2,f.z2+=_):null!=A&&(f.z2=A,this._z2=null);var k=i&&i.useNameLabel;kw(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return k?e.getName(t):ZL(e,t)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=f.ensureState("emphasis");C.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var M=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;C.scaleX=this._sizeX*M,C.scaleY=this._sizeY*M,this.setSymbolScale(1),rw(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=fb(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&yw(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();yw(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return _T(e.getItemVisual(t,"symbolSize"))},t}(Zm);function eR(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 tR(e){return null==e||ph(e)||(e={isIgnore:e}),e||{}}function nR(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:Cw(t),cursorStyle:t.get("cursor")}}const rR=function(){function e(e){this.group=new Zm,this._SymbolCtor=e||JL}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=tR(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=nR(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(eR(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 h=i.getItemGraphicEl(d),p=u(c);if(eR(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new o(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var m={x:p[0],y:p[1]};a?h.attr(m):gw(h,m,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)}).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=nR(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=tR(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(eR(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){iI(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}();function iR(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]:hh(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=nh(e.dimensions,function(e){return t.mapDimension(e)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return UL(t,d[0])&&(h=!0,d[0]=p),UL(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function oR(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 aR="undefined"!==typeof Float32Array,sR=aR?Float32Array:Array;function lR(e){return lh(e)?aR?new Float32Array(e):e:new sR(e)}var uR=Math.min,cR=Math.max;function dR(e,t){return isNaN(e)||isNaN(t)}function hR(e,t,n,r,i,o,a,s,l){for(var u,c,d,h,p,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(dR(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var x=v-u,b=y-c;if(x*x+b*b<.5){g+=o;continue}if(a>0){for(var w=g+o,S=t[2*w],_=t[2*w+1];S===v&&_===y&&m<r;)m++,g+=o,S=t[2*(w+=o)],_=t[2*w+1],x=(v=t[2*g])-u,b=(y=t[2*g+1])-c;var A=m+1;if(l)for(;dR(S,_)&&A<r;)A++,S=t[2*(w+=o)],_=t[2*w+1];var k=.5,C=0,M=0,I=void 0,T=void 0;if(A>=r||dR(S,_))p=v,f=y;else{C=S-u,M=_-c;var D=v-u,j=S-v,P=y-c,L=_-y,R=void 0,E=void 0;if("x"===s){var N=C>0?1:-1;p=v-N*(R=Math.abs(D))*a,f=y,I=v+N*(E=Math.abs(j))*a,T=y}else if("y"===s){var O=M>0?1:-1;p=v,f=y-O*(R=Math.abs(P))*a,I=v,T=y+O*(E=Math.abs(L))*a}else R=Math.sqrt(D*D+P*P),p=v-C*a*(1-(k=(E=Math.sqrt(j*j+L*L))/(E+R))),f=y-M*a*(1-k),T=y+M*a*k,I=uR(I=v+C*a*k,cR(S,v)),T=uR(T,cR(_,y)),I=cR(I,uR(S,v)),f=y-(M=(T=cR(T,uR(_,y)))-y)*R/E,p=uR(p=v-(C=I-v)*R/E,cR(u,v)),f=uR(f,cR(c,y)),I=v+(C=v-(p=cR(p,uR(u,v))))*E/R,T=y+(M=y-(f=cR(f,uR(c,y))))*E/R}e.bezierCurveTo(d,h,p,f,v,y),d=I,h=T}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var pR=function(){this.smooth=0,this.smoothConstraint=!0},fR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new pR},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&dR(n[2*i-2],n[2*i-1]);i--);for(;r<i&&dR(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=hR(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=fx.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=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++],h=i[l++],p=i[l++],f=i[l++];var v=a?Lf(n,u,d,p,e,s):Lf(r,c,h,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?jf(r,c,h,f,x):jf(n,u,d,p,x);return a?[e,m]:[m,e]}}n=p,r=f}}},t}(Nx),gR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t}(pR),mR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new gR},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&&dR(n[2*o-2],n[2*o-1]);o--);for(;i<o&&dR(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=hR(e,n,i,o,o,1,t.smooth,a,t.connectNulls);hR(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(Nx);function vR(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"])||0;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new Kx({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=uh(i)?function(e){i(e,d)}:null;mw(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function yR(e,t,n){var r=e.getArea(),i=ov(r.r0,1),o=ov(r.r,1),a=new YC({shape:{cx:ov(e.cx,1),cy:ov(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,mw(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function xR(e,t,n,r,i){return e?"polar"===e.type?yR(e,t,n):"cartesian2d"===e.type?vR(e,t,n,r,i):null:null}function bR(e,t){return e.type===t}function wR(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function SR(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 _R(e,t){var n=SR(e),r=n[0],i=n[1],o=SR(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 AR(e){return hh(e)?e:e?.5:0}function kR(e,t,n,r,i){var o=n.getBaseAxis(),a="x"===o.dim||"radius"===o.dim?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(i){for(l=0;l<e.length;l+=2){var p=t||e;isNaN(p[l])||isNaN(p[l+1])||h.push(e[l],e[l+1])}e=h}for(l=0;l<e.length-2;l+=2)switch(d[0]=e[l+2],d[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),r){case"end":u[a]=d[a],u[1-a]=c[1-a],s.push(u[0],u[1]);break;case"middle":var f=(c[a]+d[a])/2,g=[];u[a]=g[a]=f,u[1-a]=c[1-a],g[1-a]=d[1-a],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[a]=c[a],u[1-a]=d[1-a],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function CR(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=nh(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 h=function(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:hg((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}(u,"x"===i?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,g=h[p-1].coord+10,m=g-f;if(m<.001)return"transparent";th(h,function(e){e.offset=(e.coord-f)/m}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new xM(0,0,0,0,h,!0);return v[i]=f,v[i+"2"]=g,v}}}function MR(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*JL.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return th(o.getViewLabels(),function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function IR(e,t){return isNaN(e)||isNaN(t)}function TR(e,t){return[e[2*t],e[2*t+1]]}function DR(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<bb.length;t++)if(e.get([bb[t],"endLabel","show"]))return!0;return!1}function jR(e,t,n,r){if(bR(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=DR(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=vR(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,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return yR(t,n,r)}var PR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.init=function(){var e=new Zm,t=new rR;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=ah(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,o=e.getData(),a=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=o.getLayout("points")||[],u="polar"===r.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,f=this._lineGroup,g=!t.ssr&&e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=iR(r,o,v),x=m&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=lR(2*r),o=0;o<r;o++){var a=oR(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(r,o,y),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!u&&MR(e,o,r),_=this._data;_&&_.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),_.setItemGraphicEl(t,null))}),b||d.remove(),i.add(f);var A,k=!u&&e.get("step");r&&r.getArea&&e.get("clip",!0)&&(null!=(A=r.getArea()).width?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var C=CR(o,r,n)||o.getVisual("style")[o.getVisual("drawType")];if(h&&c.type===r.type&&k===this._step){m&&!p?p=this._newPolygon(l,x):p&&!m&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,WS(C));var M=f.getClipPath();if(M)mw(M,{shape:jR(this,r,!1,e).shape},e);else f.setClipPath(jR(this,r,!0,e));b&&d.updateData(o,{isIgnore:S,clipShape:A,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),wR(this._stackedOnPoints,x)&&wR(this._points,l)||(g?this._doUpdateAnimation(o,x,r,n,k,v,w):(k&&(x&&(x=kR(x,l,r,k,w)),l=kR(l,null,r,k,w)),h.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:x})))}else b&&d.updateData(o,{isIgnore:S,clipShape:A,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),g&&this._initSymbolLabelAnimation(o,r,A),k&&(x&&(x=kR(x,l,r,k,w)),l=kR(l,null,r,k,w)),h=this._newPolyline(l),m?p=this._newPolygon(l,x):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,WS(C)),f.setClipPath(jR(this,r,!0,e));var I=e.getModel("emphasis"),T=I.get("focus"),D=I.get("blurScope"),j=I.get("disabled");(h.useStyle(Kd(a.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),sw(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);fb(h).seriesIndex=e.seriesIndex,rw(h,T,D,j);var P=AR(e.get("smooth")),L=e.get("smoothMonotone");if(h.setShape({smooth:P,smoothMonotone:L,connectNulls:w}),p){var R=o.getCalculationInfo("stackedOnSeries"),E=0;p.useStyle(Kd(s.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),R&&(E=AR(R.get("smooth"))),p.setShape({smooth:P,stackedOnSmooth:E,smoothMonotone:L,connectNulls:w}),sw(p,e,"areaStyle"),fb(p).seriesIndex=e.seriesIndex,rw(p,T,D,j)}var N=this._changePolyState;o.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=N)}),this._polyline.onHoverStateChange=N,this._data=o,this._coordSys=r,this._stackedOnPoints=x,this._points=l,this._step=k,this._valueOrigin=v,e.get("triggerLineEvent")&&(this.packEventData(e,h),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){fb(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=Bv(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 JL(i,o)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else pI.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Bv(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 pI.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;zb(this._polyline,e),t&&zb(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new fR({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 mR({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");uh(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=uh(u)?u(null):u;e.eachItemGraphicEl(function(e,o){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(h=g.startAngle,p=g.endAngle,f=-m[1]/180*Math.PI):(h=g.r0,p=g.r,f=m[0])}else{var v=n;r?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var x=uh(u)?u(o):l*y+c,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(DR(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 pb({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t=e.length/2;t>0&&IR(e[2*t-2],e[2*t-1]);t--);return t-1}(a);l>=0&&(kw(o,Cw(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?KL(i,n):ZL(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"),h=o.get("precision"),p=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?p:0)*(m?-1:1),b=(g?0:-p)*(m?-1:1),w=g?"x":"y",S=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,w),_=S.range,A=_[1]-_[0],k=void 0;if(A>=1){if(A>1&&!d){var C=TR(u,_[0]);s.attr({x:C[0]+x,y:C[1]+b}),i&&(k=c.getRawValue(_[0]))}else{(C=l.getPointOn(y,w))&&s.attr({x:C[0]+x,y:C[1]+b});var M=c.getRawValue(_[0]),I=c.getRawValue(_[1]);i&&(k=qv(n,h,M,I,S.t))}r.lastFrameIndex=_[0]}else{var T=1===e||r.lastFrameIndex>0?_[0]:0;C=TR(u,T);i&&(k=c.getRawValue(T)),s.attr({x:C[0]+x,y:C[1]+b})}if(i){var D=Rw(s);"function"===typeof D.setLabelText&&D.setLabelText(k)}}},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=[],h=[],p=[],f=[],g=iR(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],b=!0,w=void 0,S=void 0;switch(x.cmd){case"=":w=2*x.idx,S=2*x.idx1;var _=m[w],A=m[w+1],k=v[S],C=v[S+1];(isNaN(_)||isNaN(A))&&(_=k,A=C),l.push(_,A),u.push(k,C),c.push(n[w],n[w+1]),d.push(r[S],r[S+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var M=x.idx,I=g.dataDimsForPoint,T=i.dataToPoint([t.get(I[0],M),t.get(I[1],M)]);S=2*M,l.push(T[0],T[1]),u.push(v[S],v[S+1]);var D=oR(g,i,t,M);c.push(D[0],D[1]),d.push(r[S],r[S+1]),f.push(t.getRawIndex(M));break;case"-":b=!1}b&&(h.push(x),p.push(p.length))}p.sort(function(e,t){return f[e]-f[t]});var j=l.length,P=lR(j),L=lR(j),R=lR(j),E=lR(j),N=[];for(y=0;y<p.length;y++){var O=p[y],z=2*y,B=2*O;P[z]=l[B],P[z+1]=l[B+1],L[z]=u[B],L[z+1]=u[B+1],R[z]=c[B],R[z+1]=c[B+1],E[z]=d[B],E[z+1]=d[B+1],N[y]=h[O]}return{current:P,next:L,stackedOnCurrent:R,stackedOnNext:E,status:N}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(i&&(h=kR(c.stackedOnCurrent,c.current,n,i,a),d=kR(c.current,null,n,i,a),f=kR(c.stackedOnNext,c.next,n,i,a),p=kR(c.next,null,n,i,a)),_R(d,p)>3e3||l&&_R(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),gw(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),gw(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}(pI);const LR=PR;function RR(e,t){return{seriesType:e,plan:aC(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=nh(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");UL(n,a[0])&&(a[0]=l),UL(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&&lR(n*s),a=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var g=u.get(c,h);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,h),a[1]=u.get(d,h),f=r.dataToPoint(a,null,l);o?(i[p++]=f[0],i[p++]=f[1]):t.setItemLayout(h,f.slice())}o&&t.setLayout("points",i)}}}}}}var ER={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]}},NR=function(e){return Math.round(e.length/2)};function OR(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),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===i?e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h)):"minmax"===i&&e.setData(r.minmaxDownSample(r.mapDimension(l.dim),1/h));var p=void 0;ch(i)?p=ER[i]:uh(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,NR))}}}}}var zR="__ec_stack_";function BR(e){return e.get("stack")||zR+e.seriesIndex}function FR(e){return e.dim+e.index}function $R(e,t){var n=[];return t.eachSeriesByType(e,function(e){UR(e)&&n.push(e)}),n}function VR(e){var t=function(e){var t={};th(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 th(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 h=iv(e.get("barWidth"),r),p=iv(e.get("barMaxWidth"),r),f=iv(e.get("barMinWidth")||(XR(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:FR(i),stackId:BR(e)})}),WR(n)}function WR(e){var t={};th(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 h=e.barCategoryGap;null!=h&&(o.categoryGap=h)});var n={};return th(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=oh(r).length;o=Math.max(35-4*a,15)+"%"}var s=iv(o,i),l=iv(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),th(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 h,p=0;th(r,function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)}),h&&(p-=h.width*l);var f=-p/2;th(r,function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function HR(e,t){var n=$R(e,t),r=VR(n);th(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=BR(e),o=r[FR(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function GR(e){return{seriesType:e,plan:aC(),reset:function(e){if(UR(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=UL(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=function(e,t){var n=t.model.get("startValue");n||(n=0);return t.toGlobalCoord(t.dataToCoord("log"===t.type?n>0?n:1:n))}(0,i),p=XR(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=p&&lR(3*i),u=p&&s&&lR(3*i),y=p&&lR(i),x=n.master.getRect(),b=d?x.width:x.height,w=t.getStore(),S=0;null!=(r=e.next());){var _=w.get(c?g:o,r),A=w.get(a,r),k=h,C=void 0;c&&(C=+_-w.get(o,r));var M=void 0,I=void 0,T=void 0,D=void 0;if(d){var j=n.dataToPoint([_,A]);if(c)k=n.dataToPoint([C,A])[0];M=k,I=j[1]+v,T=j[0]-k,D=m,Math.abs(T)<f&&(T=(T<0?-1:1)*f)}else{j=n.dataToPoint([A,_]);if(c)k=n.dataToPoint([A,C])[1];M=j[0]+v,I=k,T=m,D=j[1]-k,Math.abs(D)<f&&(D=(D<=0?-1:1)*f)}p?(l[S]=M,l[S+1]=I,l[S+2]=d?T:D,u&&(u[S]=d?x.x:M,u[S+1]=d?I:x.y,u[S+2]=b),y[r]=r):t.setItemLayout(r,{x:M,y:I,width:T,height:D}),S+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}function UR(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function XR(e){return e.pipelineContext&&e.pipelineContext.large}var YR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.getInitialData=function(e,t){return YL(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)th(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<r.length;h++){var p=r[h].coord,f=h===r.length-1?r[h-1].tickValue+d:r[h].tickValue;if(f===s){c=p;break}if(f<s)u=p;else if(null!=u&&f>s){c=(p+u)/2;break}1===h&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),o[n]=e.toGlobalCoord(c)}});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}(rC);rC.registerClass(YR);const qR=YR;const ZR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.getInitialData=function(){return YL(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=Kw(qR.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}(qR);var KR=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},QR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new KR},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,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);h?(e.moveTo(p*i+n,f*i+r),e.arc(p*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(p*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}(Nx);const JR=QR;function eE(e,t,n){return t*Math.sin(e)*(n?-1:1)}function tE(e,t,n){return t*Math.cos(e)*(n?1:-1)}function nE(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;lh(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:nh(r,function(e){return Nm(e,i)})}}var rE=Math.max,iE=Math.min;var oE=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return kd(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){iI(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();0;if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(bR(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,b=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t=pE[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?YC:Kx;return new r({shape:bE(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=pE[l.type](a,t,n);if(g&&S(t),a.hasValue(t)&&hE[l.type](r)){var s=!1;h&&(s=aE[l.type](p,r));var m=sE[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),gE(m,a,t,n,r,e,i,"polar"===l.type),b?m.attr({shape:r}):d?lE(d,c,m,r,t,i,!1,!1):mw(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}}).update(function(t,n){var r=a.getItemModel(t),_=pE[l.type](a,t,r);if(g){var A=void 0;0===x.length?A=S(n):((A=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?A.setShape("r",v):A.setShape("cornerRadius",v),y[t]=A);var k=pE[l.type](a,t);gw(A,{shape:bE(i,k,l)},c,t)}var C=s.getItemGraphicEl(n);if(a.hasValue(t)&&hE[l.type](_)){var M=!1;if(h&&(M=aE[l.type](p,_))&&o.remove(C),C?ww(C):C=sE[l.type](e,a,t,_,i,c,u.model,!!C,f),d&&(C.forceLabelAnimation=!0),w){var I=C.getTextContent();if(I){var T=Rw(I);null!=T.prevValue&&(T.prevValue=T.value)}}else gE(C,a,t,r,_,e,i,"polar"===l.type);b?C.attr({shape:_}):d?lE(d,c,C,_,t,i,!0,w):gw(C,{shape:_},e,t,null),a.setItemGraphicEl(t,C),C.ignore=M,o.add(C)}else o.remove(C)}).remove(function(t){var n=s.getItemGraphicEl(t);n&&bw(n,e,t)}).execute();var _=this._backgroundGroup||(this._backgroundGroup=new Zm);_.removeAll();for(var A=0;A<y.length;++A)_.add(y[A]);o.add(_),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),yE(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),yE(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&xR(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:nh(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){bw(t,e,fb(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}(pI),aE={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=rE(t.x,e.x),s=iE(t.x+t.width,i),l=rE(t.y,e.y),u=iE(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=iE(t.r,e.r),o=rE(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}},sE={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new Kx({shape:Zd({},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?JR:YC,c=new u({shape:r,z2:1});c.name="item";var d=fE(i);if(c.calculateTextPosition=function(e,t){var n=(t=t||{}).isRoundCap;return function(t,r,i){var o=r.position;if(!o||o instanceof Array)return Om(t,r,i);var a=e(o),s=null!=r.distance?r.distance:5,l=this.shape,u=l.cx,c=l.cy,d=l.r,h=l.r0,p=(d+h)/2,f=l.startAngle,g=l.endAngle,m=(f+g)/2,v=n?Math.abs(d-h)/2:0,y=Math.cos,x=Math.sin,b=u+d*y(f),w=c+d*x(f),S="left",_="top";switch(a){case"startArc":b=u+(h-s)*y(m),w=c+(h-s)*x(m),S="center",_="top";break;case"insideStartArc":b=u+(h+s)*y(m),w=c+(h+s)*x(m),S="center",_="bottom";break;case"startAngle":b=u+p*y(f)+eE(f,s+v,!1),w=c+p*x(f)+tE(f,s+v,!1),S="right",_="middle";break;case"insideStartAngle":b=u+p*y(f)+eE(f,-s+v,!1),w=c+p*x(f)+tE(f,-s+v,!1),S="left",_="middle";break;case"middle":b=u+p*y(m),w=c+p*x(m),S="center",_="middle";break;case"endArc":b=u+(d+s)*y(m),w=c+(d+s)*x(m),S="center",_="bottom";break;case"insideEndArc":b=u+(d-s)*y(m),w=c+(d-s)*x(m),S="center",_="top";break;case"endAngle":b=u+p*y(g)+eE(g,s+v,!0),w=c+p*x(g)+tE(g,s+v,!0),S="left",_="middle";break;case"insideEndAngle":b=u+p*y(g)+eE(g,-s+v,!0),w=c+p*x(g)+tE(g,-s+v,!0),S="right",_="middle";break;default:return Om(t,r,i)}return(t=t||{}).x=b,t.y=w,t.align=S,t.verticalAlign=_,t}}(d,{isRoundCap:u===JR}),o){var h=i?"r":"endAngle",p={};c.shape[h]=i?r.r0:r.startAngle,p[h]=r[h],(s?gw:mw)(c,{shape:p},o)}return c}};function lE(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?gw:mw)(n,{shape:l},t,i,null),(a?gw:mw)(n,{shape:u},t?e.baseAxis.model:null,i)}function uE(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var cE=["x","y","width","height"],dE=["cx","cy","r","startAngle","endAngle"],hE={cartesian2d:function(e){return!uE(e,cE)},polar:function(e){return!uE(e,dE)}},pE={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 fE(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 gE(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;Zd(u,nE(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 h=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",p=Cw(r);kw(e,p,{labelFetcher:o,labelDataIndex:n,defaultText:ZL(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});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(hh(r))e.setTextConfig({rotation:r});else if(lh(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?h:g,fE(a),r.get(["label","rotate"]))}Ew(f,p,o.getRawValue(n),function(e){return KL(t,e)});var m=r.getModel(["emphasis"]);rw(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),sw(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",th(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var mE=function(){},vE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new mE},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}(Nx);function yE(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 vE({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 vE({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")),d.style.stroke=null,fb(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",xE),d.on("mousemove",xE)),n&&n.push(d)}var xE=vI(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 h=3*c;if(l[r]=u,l[i]=o[h+2],s[r]=o[h+r],s[i]=o[h+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);fb(this).dataIndex=t>=0?t:null},30,!1);function bE(e,t,n){if(bR(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}}const wE=oE;var SE=2*Math.PI,_E=Math.PI/180;function AE(e,t){return ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function kE(e,t){var n=AE(e,t),r=e.get("center"),i=e.get("radius");lh(i)||(i=[0,i]);var o,a,s=iv(n.width,t.getWidth()),l=iv(n.height,t.getHeight()),u=Math.min(s,l),c=iv(i[0],u/2),d=iv(i[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(r);o=p[0]||0,a=p[1]||0}else lh(r)||(r=[r,r]),o=iv(r[0],s)+n.x,a=iv(r[1],l)+n.y;return{cx:o,cy:a,r0:c,r:d}}function CE(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension("value"),i=AE(e,n),o=kE(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*_E,d=e.get("endAngle"),h=e.get("padAngle")*_E;d="auto"===d?c-SE:-d*_E;var p=e.get("minAngle")*_E+h,f=0;t.each(r,function(e){!isNaN(e)&&f++});var g=t.getSum(r),m=Math.PI/(g||f)*2,v=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),b=t.getDataExtent(r);b[0]=0;var w=v?1:-1,S=[c,d],_=w*h/2;hx(S,!v),c=S[0],d=S[1];var A=ME(e);A.startAngle=c,A.endAngle=d,A.clockwise=v;var k=Math.abs(d-c),C=k,M=0,I=c;if(t.setLayout({viewRect:i,r:l}),t.each(r,function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(r="area"!==y?0===g&&x?m:e*m:k/f)<p?(r=p,C-=p):M+=e;var i=I+w*r,o=0,c=0;h>r?c=o=I+w*r/2:(o=I+_,c=i-_),t.setItemLayout(n,{angle:r,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?rv(e,b,[u,l]):l}),I=i}}),C<SE&&f)if(C<=.001){var T=k/f;t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=T;var i=0,o=0;T<h?o=i=c+w*(n+.5)*T:(i=c+w*n*T+_,o=c+w*(n+1)*T-_),r.startAngle=i,r.endAngle=o}})}else m=C/M,I=c,t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),i=r.angle===p?p:e*m,o=0,a=0;i<h?a=o=I+w*i/2:(o=I+_,a=I+w*i-_),r.startAngle=o,r.endAngle=a,I+=w*i}})})}var ME=Fv();function IE(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}var TE=Math.PI/180;function DE(e,t,n,r,i,o,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;d<c;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var h=e[d].label.x-u;e[d].linePoints[1][0]+=h,e[d].label.x=u}Rj(e,l,l+a)&&function(e){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],u=l.label.y>n?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*i,h=r+l.len,f=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h;u.rB=f,u.maxY=c}u.list.push(l)}p(o),p(a)}(e)}function p(e){for(var o=e.rB,a=o*o,s=0;s<e.list.length;s++){var l=e.list[s],u=Math.abs(l.label.y-n),c=r+l.len,d=c*c,h=Math.sqrt(Math.abs((1-u*u/a)*d)),p=t+(h+l.len2)*i,f=p-l.label.x;jE(l,l.targetTextWidth-f*i,!0),l.label.x=p}}}function jE(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var r=e.label,i=r.style,o=e.rect,a=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=o.width+(a?0:l);if(t<c||n){var d=o.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var h=r.getBoundingRect();r.setStyle("width",Math.ceil(h.width)),r.setStyle("backgroundColor",a)}else{var p=t-l,f=t<c?p:n?p>e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var g=r.getBoundingRect();o.width=g.width;var m=(r.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-d)/2}}}function PE(e){return"center"===e.position}function LE(e){var t,n,r=e.getData(),i=[],o=!1,a=(e.get("minShowLabelAngle")||0)*TE,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each(function(e){var s=r.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),g=r.getItemModel(e),m=g.getModel("label"),v=m.get("position")||g.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),x=m.get("alignTo"),b=iv(m.get("edgeDistance"),u),w=m.get("bleedMargin"),S=g.getModel("labelLine"),_=S.get("length");_=iv(_,u);var A=S.get("length2");if(A=iv(A,u),Math.abs(d.endAngle-d.startAngle)<a)return th(h.states,p),h.ignore=!0,void(f&&(th(f.states,p),f.ignore=!0));if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(h)){var k,C,M,I,T=(d.startAngle+d.endAngle)/2,D=Math.cos(T),j=Math.sin(T);t=d.cx,n=d.cy;var P="inside"===v||"inner"===v;if("center"===v)k=d.cx,C=d.cy,I="center";else{var L=(P?(d.r+d.r0)/2*D:d.r*D)+t,R=(P?(d.r+d.r0)/2*j:d.r*j)+n;if(k=L+3*D,C=R+3*j,!P){var E=L+D*(_+l-d.r),N=R+j*(_+l-d.r),O=E+(D<0?-1:1)*A;k="edge"===x?D<0?c+b:c+u-b:O+(D<0?-y:y),C=N,M=[[L,R],[E,N],[O,N]]}I=P?"center":"edge"===x?D>0?"right":"left":D>0?"left":"right"}var z=Math.PI,B=0,F=m.get("rotate");if(hh(F))B=F*(z/180);else if("center"===v)B=0;else if("radial"===F||!0===F){B=D<0?-T+z:-T}else if("tangential"===F&&"outside"!==v&&"outer"!==v){var $=Math.atan2(D,j);$<0&&($=2*z+$),j>0&&($=z+$),B=$-z}if(o=!!B,h.x=k,h.y=C,h.rotation=B,h.setStyle({verticalAlign:"middle"}),P){h.setStyle({align:I});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var W=h.getBoundingRect().clone();W.applyTransform(h.getComputedTransform());var H=(h.style.margin||0)+2.1;W.y-=H/2,W.height+=H,i.push({label:h,labelLine:f,position:v,len:_,len2:A,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new zp(D,j),linePoints:M,textAlign:I,labelDistance:y,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:W,unconstrainedWidth:W.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,r,i,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<e.length;h++){var p=e[h].label;PE(e[h])||(p.x<t?(c=Math.min(c,p.x),l.push(e[h])):(d=Math.max(d,p.x),u.push(e[h])))}for(h=0;h<e.length;h++)if(!PE(m=e[h])&&m.linePoints){if(null!=m.labelStyleWidth)continue;p=m.label;var f=m.linePoints,g=void 0;g="edge"===m.labelAlignTo?p.x<t?f[2][0]-m.labelDistance-a-m.edgeDistance:a+i-m.edgeDistance-f[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?p.x<t?c-a-m.bleedMargin:a+i-d-m.bleedMargin:p.x<t?p.x-a-m.bleedMargin:a+i-p.x-m.bleedMargin,m.targetTextWidth=g,jE(m,g)}for(DE(u,t,n,r,1,0,o,0,s,d),DE(l,t,n,r,-1,0,o,0,s,c),h=0;h<e.length;h++){var m;if(!PE(m=e[h])&&m.linePoints){p=m.label,f=m.linePoints;var v="edge"===m.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,b=p.style.backgroundColor?0:x,w=m.rect.width+b,S=f[1][0]-f[2][0];v?p.x<t?f[2][0]=a+m.edgeDistance+w+m.labelDistance:f[2][0]=a+i-m.edgeDistance-w-m.labelDistance:(p.x<t?f[2][0]=p.x+m.labelDistance:f[2][0]=p.x-m.labelDistance,f[1][0]=f[2][0]+S),f[1][1]=f[2][1]=p.y}}}(i,t,n,l,u,h,c,d);for(var f=0;f<i.length;f++){var g=i[f],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(th(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(v){var b=g.linePoints;y||!b?(th(v.states,p),v.ignore=!0):(Cj(b,g.minTurnAngle),Mj(b,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new zp(b[0][0],b[0][1])})}}}var RE=function(e){function t(t,n,r){var i=e.call(this)||this;i.z2=2;var o=new pb;return i.setTextContent(o),i.updateData(t,n,r,!0),i}return kd(t,e),t.prototype.updateData=function(e,t,n,r){var i=this,o=e.hostModel,a=e.getItemModel(t),s=a.getModel("emphasis"),l=e.getItemLayout(t),u=Zd(nE(a.getModel("itemStyle"),l,!0),l);if(isNaN(u.startAngle))i.setShape(u);else{if(r){i.setShape(u);var c=o.getShallow("animationType");o.ecModel.ssr?(mw(i,{scaleX:0,scaleY:0},o,{dataIndex:t,isFrom:!0}),i.originX=u.cx,i.originY=u.cy):"scale"===c?(i.shape.r=l.r0,mw(i,{shape:{r:l.r}},o,t)):null!=n?(i.setShape({startAngle:n,endAngle:n}),mw(i,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},o,t)):(i.shape.endAngle=l.startAngle,gw(i,{shape:{endAngle:l.endAngle}},o,t))}else ww(i),gw(i,{shape:u},o,t);i.useStyle(e.getItemVisual(t,"style")),sw(i,a);var d=(l.startAngle+l.endAngle)/2,h=o.get("selectedOffset"),p=Math.cos(d)*h,f=Math.sin(d)*h,g=a.getShallow("cursor");g&&i.attr("cursor",g),this._updateLabel(o,e,t),i.ensureState("emphasis").shape=Zd({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},nE(s.getModel("itemStyle"),l)),Zd(i.ensureState("select"),{x:p,y:f,shape:nE(a.getModel(["select","itemStyle"]),l)}),Zd(i.ensureState("blur"),{shape:nE(a.getModel(["blur","itemStyle"]),l)});var m=i.getTextGuideLine(),v=i.getTextContent();m&&Zd(m.ensureState("select"),{x:p,y:f}),Zd(v.ensureState("select"),{x:p,y:f}),rw(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),o=i.getModel("labelLine"),a=t.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;kw(r,Cw(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var u=r.getTextContent();r.setTextConfig({position:null,rotation:null}),u.attr({z2:10});var c=e.get(["label","position"]);if("outside"!==c&&"outer"!==c)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new iM,this.setTextGuideLine(d)),Dj(this,jj(i),{stroke:s,opacity:wh(o.get(["lineStyle","opacity"]),l,1)})}},t}(YC);const EE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return kd(t,e),t.prototype.render=function(e,t,n,r){var i,o=e.getData(),a=this._data,s=this.group;if(!a&&o.count()>0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<o.count();++u)l=o.getItemLayout(u);l&&(i=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")){var c=ME(e),d=new YC({shape:Zd(kE(e,n),c)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}o.diff(a).add(function(e){var t=new RE(o,e,i);o.setItemGraphicEl(e,t),s.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(o,e,i),n.off("click"),s.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){bw(a.getItemGraphicEl(t),e,t)}).execute(),LE(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="pie",t}(pI);function NE(e,t,n){t=lh(t)&&{coordDimensions:t}||Zd({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=FL(r,t).dimensions,o=new BL(i,e);return o.initData(r,n),o}var OE=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}();const zE=OE;var BE=Fv();const FE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zE(ah(this.getData,this),ah(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return NE(this,{coordDimensions:["value"],encodeDefaulter:sh(S_,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=BE(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(e){o.push(e)}),i=r.seats=uv(o,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=i[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){Tv(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(rC);const $E=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return kd(t,e),t.prototype.getInitialData=function(e,t){return YL(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(rC);var VE=function(){},WE=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return kd(t,e),t.prototype.getDefaultShape=function(){return new VE},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,i=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&i[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<r.length;){var c=r[n++],d=r[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-i[0]/2,a.y=d-i[1]/2,a.width=i[0],a.height=i[1],o.buildPath(e,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,r=t.size,i=this._ctx,o=this.softClipShape;if(i){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];isNaN(a)||isNaN(s)||(o&&!o.contain(a,s)||i.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,o=Math.max(i[0],4),a=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,u=r[l]-o/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+o&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],o=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),u=Math.max(h,u)}e=this._rect=new Xp(a-i/2,s-o/2,l-a+i,u-s+o)}return e},t}(Nx);const HE=function(){function e(){this.group=new Zm}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],i=t.getLayout("points"),o=r&&r.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+i.length);s.set(o),s.set(i,a),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:i}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new WE({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=ST(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=fb(e);l.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();const GE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=RR("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new HE:new rR,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(pI);const UE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(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}(i_);var XE=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),YE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Hv).models[0]},t.type="cartesian2dAxis",t}(i_);Jd(YE,XE);var qE={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,showMinLine:!0,showMaxLine:!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)"]}}},ZE=Yd({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qE),KE=Yd({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}}},qE);const QE={category:ZE,value:KE,time:Yd({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},KE),log:Kd({logBase:10},KE)};var JE=0;function eN(e){return ph(e)&&null!=e.value?e.value:e+""}const tN=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++JE}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&nh(r,eN);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(!ch(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=Ph(this.categories))},e}();var nN={value:1,category:1,time:1,log:1};function rN(e,t,n,r){th(nN,function(i,o){var a=Yd(Yd({},QE[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 kd(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=QS(this),r=n?e_(e):{};Yd(e,t.getTheme().get(o+"Axis")),Yd(e,this.getDefaultOption()),e.type=iN(e),n&&JS(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=tN.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",iN)}function iN(e){return e.type||(e.data?"category":"value")}var oN=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}();iy(oN);const aN=oN;function sN(e){return"interval"===e.type||"log"===e.type}function lN(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=vv(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=cN(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),dN(e,0,t),dN(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[ov(Math.ceil(e[0]/a)*a,s),ov(Math.floor(e[1]/a)*a,s)],e),i}function uN(e){var t=Math.pow(10,mv(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ov(n*t)}function cN(e){return sv(e)+2}function dN(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function hN(e,t){return e>=t[0]&&e<=t[1]}function pN(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function fN(e,t){return e*(t[1]-t[0])+t[0]}var gN=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new tN({})),lh(r)&&(r=new tN({categories:nh(r,function(e){return ph(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return kd(t,e),t.prototype.parse=function(e){return null==e?NaN:ch(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return hN(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return pN(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(fN(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}(aN);aN.registerClass(gN);const mN=gN;var vN=ov,yN=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 kd(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return hN(e,this._extent)},t.prototype.normalize=function(e){return pN(e,this._extent)},t.prototype.scale=function(e){return fN(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=cN(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:vN(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=vN(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:vN(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=vN(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=sv(e.value)||0:"auto"===n&&(n=this._intervalPrecision),NS(vN(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=lN(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]=vN(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=vN(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(aN);aN.registerClass(yN);const xN=yN;var bN=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return kd(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return xS(e.value,pS[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(vS(this._minLevelUnit))]||pS.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(ch(n))o=n;else if(uh(n))o=n(e.value,t,{level:e.level});else{var a=Zd({},dS);if(e.level>0)for(var s=0;s<fS.length;++s)a[fS[s]]="{primary|"+a[fS[s]]+"}";var l=n?!1===n.inherit?n:Kd(n,a):a,u=bS(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=gS.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(lh(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 xS(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=gS,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=gv(t),o=gv(n),a=function(e){return wS(i,e,r)===wS(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")},h=function(){return d()&&a("second")},p=function(){return h()&&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 h();case"millisecond":return p()}}(vS(e),r[0],r[1],n)){l&&(i=[{value:MN(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 h=void 0,p=void 0,f=void 0,g=!1;switch(e){case"year":h=Math.max(1,Math.round(t/uS/365)),p=SS(n),f=TS(n);break;case"half-year":case"quarter":case"month":h=_N(t),p=_S(n),f=DS(n);break;case"week":case"half-week":case"day":h=SN(t,31),p=AS(n),f=jS(n),g=!0;break;case"half-day":case"quarter-day":case"hour":h=AN(t),p=kS(n),f=PS(n);break;case"minute":h=kN(t,!0),p=CS(n),f=LS(n);break;case"second":h=kN(t,!1),p=MS(n),f=RS(n);break;case"millisecond":h=CN(t),p=IS(n),f=ES(n)}s(h,c,d,p,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-h})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,h=0,p=0;p<o.length&&a++<i;++p){var f=vS(o[p]);if(yS(o[p]))if(l(o[p],u[u.length-1]||[],c),f!==(o[p+1]?vS(o[p+1]):null)){if(c.length){h=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&&h>y/1.5)break;if(u.push(g),d>y||e===o[p])break}c=[]}}0;var x=ih(nh(u,function(e){return ih(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),b=[],w=x.length-1;for(p=0;p<x.length;++p)for(var S=x[p],_=0;_<S.length;++_)b.push({value:S[_].value,level:w-p});b.sort(function(e,t){return e.value-t.value});var A=[];for(p=0;p<b.length;++p)0!==p&&b[p].value===b[p-1].value||A.push(b[p]);return A}(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]-=uS,t[1]+=uS),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]-uS}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=wN.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}(wN,this._approxInterval,0,o),o-1);this._interval=wN[a][1],this._minLevelUnit=wN[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return hh(e)?e:+gv(e)},t.prototype.contain=function(e){return hN(this.parse(e),this._extent)},t.prototype.normalize=function(e){return pN(this.parse(e),this._extent)},t.prototype.scale=function(e){return fN(e,this._extent)},t.type="time",t}(xN),wN=[["second",aS],["minute",sS],["hour",lS],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",cS/2],["year",cS]];function SN(e,t){return(e/=uS)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function _N(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function AN(e){return(e/=lS)>12?12:e>6?6:e>3.5?4:e>2?2:1}function kN(e,t){return(e/=t?sS:aS)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function CN(e){return vv(e,!0)}function MN(e,t,n){var r=new Date(e);switch(vS(t)){case"year":case"month":r[DS(n)](0);case"day":r[jS(n)](1);case"hour":r[PS(n)](0);case"minute":r[LS(n)](0);case"second":r[RS(n)](0),r[ES(n)](0)}return r.getTime()}aN.registerClass(bN);const IN=bN;var TN=aN.prototype,DN=xN.prototype,jN=ov,PN=Math.floor,LN=Math.ceil,RN=Math.pow,EN=Math.log,NN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new xN,t._interval=0,t}return kd(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return nh(DN.getTicks.call(this,e),function(e){var t=e.value,i=ov(RN(this.base,t));return i=t===n[0]&&this._fixMin?zN(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?zN(i,r[1]):i}},this)},t.prototype.setExtent=function(e,t){var n=EN(this.base);e=EN(Math.max(0,e))/n,t=EN(Math.max(0,t))/n,DN.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=TN.getExtent.call(this);t[0]=RN(e,t[0]),t[1]=RN(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=zN(t[0],n[0])),this._fixMax&&(t[1]=zN(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=EN(e[0])/EN(t),e[1]=EN(e[1])/EN(t),TN.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,mv(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[ov(LN(t[0]/i)*i),ov(PN(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){DN.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 hN(e=EN(e)/EN(this.base),this._extent)},t.prototype.normalize=function(e){return pN(e=EN(e)/EN(this.base),this._extent)},t.prototype.scale=function(e){return e=fN(e,this._extent),RN(this.base,e)},t.type="log",t}(aN),ON=NN.prototype;function zN(e,t){return jN(e,sv(t))}ON.getMinorTicks=DN.getMinorTicks,ON.getLabel=DN.getLabel,aN.registerClass(NN);const BN=NN;var FN=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=t.get("min",!0);null==i&&(i=t.get("startValue",!0));var o=this._modelMinRaw=i;uh(o)?this._modelMinNum=HN(e,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=HN(e,o));var a=this._modelMaxRaw=t.get("max",!0);if(uh(a)?this._modelMaxNum=HN(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=HN(e,a)),r)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=lh(s)?s:[s||0,s||0];"boolean"===typeof l[0]||"boolean"===typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Nm(l[0],1),Nm(l[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=yh(a)||yh(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[VN[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[$N[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),$N={min:"_determinedMin",max:"_determinedMax"},VN={min:"_dataMin",max:"_dataMax"};function WN(e,t,n){var r=e.rawExtentInfo;return r||(r=new FN(e,t,n),e.rawExtentInfo=r,r)}function HN(e,t){return null==t?null:yh(t)?NaN:e.parse(t)}function GN(e,t){var n=e.type,r=WN(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=$R("bar",a),l=!1;if(th(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=VR(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=Math.abs(i[1]-i[0]),a=function(e,t,n){if(e&&t){var r=e[FR(t)];return null!=r&&null!=n?r[BR(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;th(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;th(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 UN(e,t){var n=t,r=GN(e,n),i=r.extent,o=n.get("splitNumber");e instanceof BN&&(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 XN(e,t){if(t=t||e.get("type"))switch(t){case"category":return new mN({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new IN({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(aN.getClass(t)||xN)}}function YN(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)}):ch(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):uh(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(qN(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function qN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function ZN(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 Xp(e.x,e.y,o,a)}function KN(e){var t=e.get("interval");return null==t?"auto":t}function QN(e){return"category"===e.type&&0===KN(e.getLabelModel())}function JN(e,t){var n={};return th(e.mapDimensionsAll(t),function(t){n[XL(e,t)]=!0}),oh(n)}var eO=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 nh(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ih(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}();var tO=["x","y"];function nO(e){return"interval"===e.type||"time"===e.type}const rO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=tO,t}return kd(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(nO(e)&&nO(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,h=this._transform=[l,0,0,u,c,d];this._invTransform=Op([],h)}}},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 Xp(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 ep(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 ep(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(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e,o=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-i+e;return new Xp(r,i,o,a)},t}(eO);var iO=Fv();function oO(e,t){var n=nh(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function aO(e){var t=e.getLabelModel().get("customValues");if(t){var n=YN(e),r=e.scale.getExtent();return{labels:nh(ih(oO(e,t),function(e){return e>=r[0]&&e<=r[1]}),function(t){var r={value:t};return{formattedLabel:n(r),rawLabel:e.scale.getLabel(r),tickValue:t}})}}return"category"===e.type?function(e){var t=e.getLabelModel(),n=lO(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=YN(e);return{labels:nh(t,function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}(e)}function sO(e,t){var n=e.getTickModel().get("customValues");if(n){var r=e.scale.getExtent();return{ticks:ih(oO(e,n),function(e){return e>=r[0]&&e<=r[1]})}}return"category"===e.type?function(e,t){var n,r,i=uO(e,"ticks"),o=KN(t),a=cO(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(uh(o))n=pO(e,o,!0);else if("auto"===o){var s=lO(e,e.getLabelModel());r=s.labelCategoryInterval,n=nh(s.labels,function(e){return e.tickValue})}else n=hO(e,r=o,!0);return dO(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:nh(e.scale.getTicks(),function(e){return e.value})}}function lO(e,t){var n,r,i=uO(e,"labels"),o=KN(t),a=cO(i,o);return a||(uh(o)?n=pO(e,o):(r="auto"===o?function(e){var t=iO(e).autoInterval;return null!=t?t:iO(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=hO(e,r)),dO(i,o,{labels:n,labelCategoryInterval:r}))}function uO(e,t){return iO(e)[t]||(iO(e)[t]=[])}function cO(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function dO(e,t,n){return e.push({key:t,value:n}),n}function hO(e,t,n){var r=YN(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=QN(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&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 p&&f-l!==o[1]&&g(o[1]),s}function pO(e,t,n){var r=e.scale,i=YN(e),o=[];return th(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 fO=[0,1],gO=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 lv(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&&mO(n=n.slice(),r.count()),rv(e,fO,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&mO(n=n.slice(),r.count());var i=rv(e,n,fO,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=nh(sO(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],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;th(t,function(e){e.coord-=u/2});var c=e.scale.getExtent();a=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a,tickValue:c[1]+1},t.push(o)}var d=s[0]>s[1];h(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]});h(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&h(o.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=ov(e),t=ov(t),d?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),nh(this.scale.getMinorTicks(e),function(e){return nh(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return aO(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=YN(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)),h=0,p=0;l<=o[1];l+=s){var f,g,m=Pm(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var v=h/c,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),b=iO(e.model),w=e.getExtent(),S=b.lastAutoInterval,_=b.lastTickCount;return null!=S&&null!=_&&Math.abs(S-x)<=1&&Math.abs(_-a)<=1&&S>x&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?x=S:(b.lastTickCount=a,b.lastAutoInterval=x,b.axisExtent0=w[0],b.axisExtent1=w[1]),x}(this)},e}();function mO(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}const vO=gO;var 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 kd(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}(vO);const xO=yO;function bO(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],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[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[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),xh(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 wO(e){return"cartesian2d"===e.get("coordinateSystem")}function SO(e){var t={xAxisModel:null,yAxisModel:null};return th(t,function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,Hv).models[0];t[r]=o}),t}var _O=Math.log;function AO(e,t,n){var r=xN.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=GN(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=_O(e.base);u=[_O(u[0])/h,_O(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[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=uN(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=uN(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=uN(f));var v=f*a;(g=ov((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=ov(v)):m>0&&u[1]<=0&&(m=0,g=-ov(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)}var kO=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=tO,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=oh(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;sN(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(UN(l,s),sN(l)&&(t=a))}i.length&&(t||UN((t=i.pop()).scale,t.model),th(i,function(e){AO(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};th(n.x,function(e){MO(n,"y",e,i)}),th(n.y,function(e){MO(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=ZS(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){th(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&&(th(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 mN?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=YN(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),h=ZN(s.getTextRect(d),s.get("rotate")||0);a?a.union(h):a=h}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()),th(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]}ph(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",Hv).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",Hv).models[0],a=e.gridModel,s=this._coordsList;if(r)Qd(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(CO(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 xO(t,XN(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,th(a.x,function(t,n){th(a.y,function(i,o){var a="x"+n+"y"+o,s=new rO(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){th(JN(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}th(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(wO(e)){var r=SO(e),i=r.xAxisModel,o=r.yAxisModel;if(!CO(i,t)||!CO(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 th(this.getCartesians(),function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);Qd(t,i)<0&&t.push(i),Qd(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(wO(e)){var t=SO(e),n=t.xAxisModel,r=t.yAxisModel;0;var i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=tO,e}();function CO(e,t){return e.getCoordSysModel()===t}function MO(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)IO(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&IO(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function IO(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)}const TO=kO;var DO=Math.PI,jO=function(){function e(e,t){this.group=new Zm,this.opt=t,this.axisModel=e,Kd(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Zm({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!PO[e]},e.prototype.add=function(e){PO[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=hv(t-e);return pv(o)?(i=n>0?"top":"bottom",r="center"):pv(o-DO)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<DO?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}(),PO={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&&(ep(s,s,a),ep(l,l,a));var c=Zd({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new lM({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});VM(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);ch(h)&&(h=[h,h]),(ch(p)||hh(p))&&(p=[p,p]);var f=AT(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];th([{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"!==h[r]&&null!=h[r]){var i=ST(h[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=NO(i.getTicksCoords(),t.transform,l,Kd(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=xh(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=(xh(r.labelRotate,a.get("rotate"))||0)*DO/180,c=jO.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=jO.isLabelSilent(n),f=n.get("triggerEvent");return th(l,function(o,u){var g="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,m=o.formattedLabel,v=o.rawLabel,y=a;if(d&&d[g]){var x=d[g];ph(x)&&x.textStyle&&(y=new Yw(x.textStyle,a,n.ecModel))}var b=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(g),S=y.getShallow("align",!0)||c.textAlign,_=bh(y.getShallow("alignMinLabel",!0),S),A=bh(y.getShallow("alignMaxLabel",!0),S),k=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||c.textVerticalAlign,C=bh(y.getShallow("verticalAlignMinLabel",!0),k),M=bh(y.getShallow("verticalAlignMaxLabel",!0),k),I=new pb({x:w,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:p,z2:10+(o.level||0),style:Mw(y,{text:m,align:0===u?_:u===l.length-1?A:S,verticalAlign:0===u?C:u===l.length-1?M:k,fill:uh(b)?b("category"===i.type?v:"value"===i.type?g+"":g,u):b})});if(I.anid="label_"+g,nI({el:I,componentModel:n,itemName:m,formatterParamsExtra:{isTruncated:function(){return I.isTruncated},value:v,tickIndex:u}}),f){var T=jO.makeAxisEventDataBase(n);T.targetType="axisLabel",T.value=v,T.tickIndex=u,"category"===i.type&&(T.dataIndex=g),fb(I).eventData=T}t.add(I),I.updateTransform(),h.push(I),e.add(I),I.decomposeTransform()}),h}(n,r,t,e);(function(e,t,n){if(QN(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],h=n[n.length-2];!1===r?(LO(o),LO(u)):RO(o,a)&&(r?(LO(a),LO(c)):(LO(o),LO(u)));!1===i?(LO(s),LO(d)):RO(l,s)&&(i?(LO(l),LO(h)):(LO(s),LO(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=Kd(s.getLineStyle(),Kd(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=NO(a[c],t.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)e.add(d[h])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&Ej(Pj(nh(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var i=xh(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(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,EO(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*DO/180),EO(s)?o=jO.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=hv(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;pv(a-DO/2)?(o=l?"bottom":"top",i="center"):pv(a-1.5*DO)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*DO&&a>DO/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=xh(e.nameTruncateMaxWidth,m.maxWidth,a),x=new pb({x:p[0],y:p[1],rotation:o.rotation,silent:jO.isLabelSilent(t),style:Mw(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(nI({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var b=jO.makeAxisEventDataBase(t);b.targetType="axisName",b.name=i,fb(x).eventData=b}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function LO(e){e&&(e.ignore=!0)}function RO(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=jp([]);return Ep(i,i,-e.rotation),n.applyTransform(Lp([],i,e.getLocalTransform())),r.applyTransform(Lp([],i,t.getLocalTransform())),n.intersect(r)}}function EO(e){return"middle"===e||"center"===e}function NO(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&&(ep(a,a,t),ep(s,s,t));var c=new lM({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});VM(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}const OO=jO;function zO(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=[];th(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=VO(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(th(n.getAxes(),sh(p,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&th(h.baseAxes,sh(p,!d||"cross",c)),d&&th(h.otherAxes,sh(p,"cross",!1))}}function p(r,s,c){var d=c.model.getModel("axisPointer",i),h=d.get("show");if(h&&("auto"!==h||r||$O(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};th(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=Xd(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&&Kd(l,c.textStyle)}}return e.model.getModel("axisPointer",new Yw(s,n,r))}(c,u,i,t,r,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),g=VO(c.model),m=s||p||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:$O(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(BO(o[r+"AxisId"],n.id)||BO(o[r+"AxisIndex"],n.componentIndex)||BO(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)&&th(e.coordSysAxesInfo[VO(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 BO(e,t){return"all"===e||lh(e)&&Qd(e,t)>=0||e===t}function FO(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[VO(e)]}function $O(e){return!!e.get(["handle","show"])}function VO(e){return e.type+"||"+e.id}var WO={},HO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=FO(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=$O(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=FO(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){WO[e]=t},t.getAxisPointerClass=function(e){return e&&WO[e]},t.type="axis",t}(oC);const GO=HO;var UO=Fv();function XO(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=UO(e).splitAreaColors,h=Ph(),p=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();s=lh(s)?s:[s];for(f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,b=void 0,w=void 0,S=void 0;i.isHorizontal()?(x=m,b=l.y,w=y-x,S=l.height,m=x+w):(x=l.x,b=m,w=l.width,m=b+(S=y-b));var _=u[f-1].tickValue;null!=_&&h.set(_,p),t.add(new Kx({anid:null!=_?"area_"+_:null,shape:{x:x,y:b,width:w,height:S},style:Kd({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}UO(e).splitAreaColors=h}}}function YO(e){UO(e).splitAreaColors=null}var qO=["axisLine","axisTickLabel","axisName"],ZO=["splitArea","splitLine","minorSplitLine"],KO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return kd(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Zm,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=bO(a,t),l=new OO(t,Zd({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(sN(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));th(qO,l.add,l),this._axisGroup.add(l.getGroup()),th(ZO,function(e){t.get([e,"show"])&&QO[e](this,this._axisGroup,t,a)},this),i&&"changeAxisOrder"===i.type&&i.isInitSort||qM(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){YO(this)},t.type="cartesianAxis",t}(GO),QO={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"),l=!1!==o.get("showMinLine"),u=!1!==o.get("showMaxLine");s=lh(s)?s:[s];for(var c=r.coordinateSystem.getRect(),d=i.isHorizontal(),h=0,p=i.getTicksCoords({tickModel:o}),f=[],g=[],m=a.getLineStyle(),v=0;v<p.length;v++){var y=i.toGlobalCoord(p[v].coord);if((0!==v||l)&&(v!==p.length-1||u)){var x=p[v].tickValue;d?(f[0]=y,f[1]=c.y,g[0]=y,g[1]=c.y+c.height):(f[0]=c.x,f[1]=y,g[0]=c.x+c.width,g[1]=y);var b=h++%s.length,w=new lM({anid:null!=x?"line_"+x:null,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:Kd({stroke:s[b]},m),silent:!0});VM(w.shape,m.lineWidth),t.add(w)}}}},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(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=i.toGlobalCoord(l[h][p].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 lM({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});VM(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){XO(e,t,n,r)}},JO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="xAxis",t}(KO),ez=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=JO.type,t}return kd(t,e),t.type="yAxis",t}(KO);var tz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return kd(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Kx({shape:e.coordinateSystem.getRect(),style:Kd({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(oC),nz={offset:0};function rz(e){e.registerComponentView(tz),e.registerComponentModel(UE),e.registerCoordinateSystem("cartesian2d",TO),rN(e,"x",YE,nz),rN(e,"y",YE,nz),e.registerComponentView(JO),e.registerComponentView(ez),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function iz(e){e.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],r=e.coordinateSystem;if(r){var i=r.getIndicatorAxes();th(i,function(e,o){t.each(t.mapDimension(i[o].dim),function(e,t){n[t]=n[t]||[];var i=r.dataToPoint(e,o);n[t][o]=oz(i)?i:az(r)})}),t.each(function(e){var i=function(e,t,n){if(e&&t)for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}(n[e],function(e){return oz(e)})||az(r);n[e].push(i.slice()),t.setItemLayout(e,n[e])})}})}function oz(e){return!isNaN(e[0])&&!isNaN(e[1])}function az(e){return[e.cx,e.cy]}function sz(e){var t=e.polar;if(t){lh(t)||(t=[t]);var n=[];th(t,function(t,r){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],lh(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}th(e.series,function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,o=e.getData(),a=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle";if("none"!==n){var r=_T(e.getItemVisual(t,"symbolSize")),i=ST(n,-1,-1,2,2),o=e.getItemVisual(t,"symbolRotate")||0;return i.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:o*Math.PI/180||0}),i}}function l(t,n,r,i,o,a){r.removeAll();for(var l=0;l<n.length-1;l++){var u=s(i,o);u&&(u.__dimIdx=l,t[l]?(u.setPosition(t[l]),Bt[a?"initProps":"updateProps"](u,{x:n[l][0],y:n[l][1]},e,o)):u.setPosition(n[l]),r.add(u))}}function u(e){return nh(e,function(e){return[r.cx,r.cy]})}o.diff(a).add(function(t){var n=o.getItemLayout(t);if(n){var r=new tM,i=new iM,a={shape:{points:n}};r.shape.points=u(n),i.shape.points=u(n),mw(r,a,e,t),mw(i,a,e,t);var s=new Zm,c=new Zm;s.add(i),s.add(r),s.add(c),l(i.shape.points,n,c,o,t,!0),o.setItemGraphicEl(t,s)}}).update(function(t,n){var r=a.getItemGraphicEl(n),i=r.childAt(0),s=r.childAt(1),u=r.childAt(2),c={shape:{points:o.getItemLayout(t)}};c.shape.points&&(l(i.shape.points,c.shape.points,u,o,t,!1),ww(s),ww(i),gw(i,c,e),gw(s,c,e),o.setItemGraphicEl(t,r))}).remove(function(e){i.remove(a.getItemGraphicEl(e))}).execute(),o.eachItemGraphicEl(function(e,t){var n=o.getItemModel(t),r=e.childAt(0),a=e.childAt(1),s=e.childAt(2),l=o.getItemVisual(t,"style"),u=l.fill;i.add(e),r.useStyle(Kd(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),sw(r,n,"lineStyle"),sw(a,n,"areaStyle");var c=n.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,th(["emphasis","select","blur"],function(e){var t=n.getModel([e,"areaStyle"]),r=t.isEmpty()&&t.parentModel.isEmpty();a.ensureState(e).ignore=r&&d}),a.useStyle(Kd(c.getAreaStyle(),{fill:u,opacity:.7,decal:l.decal}));var h=n.getModel("emphasis"),p=h.getModel("itemStyle").getItemStyle();s.eachChild(function(e){if(e instanceof Wx){var r=e.style;e.useStyle(Zd({image:r.image,x:r.x,y:r.y,width:r.width,height:r.height},l))}else e.useStyle(l),e.setColor(u),e.style.strokeNoScale=!0;e.ensureState("emphasis").style=Xd(p);var i=o.getStore().get(o.getDimensionIndex(e.__dimIdx),t);(null==i||isNaN(i))&&(i=""),kw(e,Cw(n),{labelFetcher:o.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,inheritColor:u,defaultOpacity:l.opacity})}),rw(e,h.get("focus"),h.get("blurScope"),h.get("disabled"))}),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(pI);const uz=lz;const cz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zE(ah(this.getData,this),ah(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return NE(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),o=this.getData().getName(e),a=""===o?this.name:o,s=Vk(this,e);return Lk("section",{header:a,sortBlocks:!0,blocks:nh(i,function(t){var n=r.get(r.mapDimension(t.dim),e);return Lk("nameValue",{markerType:"subItem",markerColor:s,name:t.name,value:n,sortParam:n})})})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,r=t.getValues(nh(n.dimensions,function(e){return t.mapDimension(e)}),e),i=0,o=r.length;i<o;i++)if(!isNaN(r[i])){var a=n.getIndicatorAxes();return n.coordToPoint(a[i].dataToCoord(r[i]),i)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(rC);var dz=QE.value;function hz(e,t){return Kd({show:t},e)}var pz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),r=this.get("axisLine"),i=this.get("axisTick"),o=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),u=this.get("axisNameGap"),c=this.get("triggerEvent"),d=nh(this.get("indicator")||[],function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var h=a;null!=d.color&&(h=Kd({color:d.color},a));var p=Yd(Xd(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:i,axisLabel:o,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:h,triggerEvent:c},!1);if(ch(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else uh(l)&&(p.name=l(p.name,p));var g=new Yw(p,null,this.ecModel);return Jd(g,XE.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Yd({lineStyle:{color:"#bbb"}},dz.axisLine),axisLabel:hz(dz.axisLabel,!1),axisTick:hz(dz.axisTick,!1),splitLine:hz(dz.splitLine,!0),splitArea:hz(dz.splitArea,!0),indicator:[]},t}(i_);const fz=pz;var gz=["axisLine","axisTickLabel","axisName"],mz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;th(nh(t.getIndicatorAxes(),function(e){var n=e.model.get("showName")?e.name:"";return new OO(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){th(gz,e.add,e),this.group.add(e.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var r=e.get("shape"),i=e.getModel("splitLine"),o=e.getModel("splitArea"),a=i.getModel("lineStyle"),s=o.getModel("areaStyle"),l=i.get("show"),u=o.get("show"),c=a.get("color"),d=s.get("color"),h=lh(c)?c:[c],p=lh(d)?d:[d],f=[],g=[];if("circle"===r)for(var m=n[0].getTicksCoords(),v=t.cx,y=t.cy,x=0;x<m.length;x++){if(l)f[M(f,h,x)].push(new TC({shape:{cx:v,cy:y,r:m[x].coord}}));if(u&&x<m.length-1)g[M(g,p,x)].push(new KC({shape:{cx:v,cy:y,r0:m[x].coord,r:m[x+1].coord}}))}else{var b,w=nh(n,function(e,n){var r=e.getTicksCoords();return b=null==b?r.length-1:Math.min(r.length-1,b),nh(r,function(e){return t.coordToPoint(e.coord,n)})}),S=[];for(x=0;x<=b;x++){for(var _=[],A=0;A<n.length;A++)_.push(w[A][x]);if(_[0]&&_.push(_[0].slice()),l)f[M(f,h,x)].push(new iM({shape:{points:_}}));if(u&&S)g[M(g,p,x-1)].push(new tM({shape:{points:_.concat(S)}}));S=_.slice().reverse()}}var k=a.getLineStyle(),C=s.getAreaStyle();th(g,function(e,t){this.group.add(FM(e,{style:Kd({stroke:"none",fill:p[t%p.length]},C),silent:!0}))},this),th(f,function(e,t){this.group.add(FM(e,{style:Kd({fill:"none",stroke:h[t%h.length]},k),silent:!0}))},this)}function M(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}},t.type="radar",t}(oC);const vz=mz;const yz=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type="value",i.angle=0,i.name="",i}return kd(t,e),t}(vO);var xz=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=nh(e.getIndicatorModels(),function(e,t){var n="indicator_"+t,r=new yz(n,new xN);return r.name=e.get("name"),r.model=e,e.axis=r,this.dimensions.push(n),r},this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=Math.sqrt(t*t+n*n);t/=r,n/=r;for(var i,o=Math.atan2(-n,t),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(o-u.angle);c<a&&(i=u,s=l,a=c)}return[s,+(i&&i.coordToData(r))]},e.prototype.resize=function(e,t){var n=e.get("center"),r=t.getWidth(),i=t.getHeight(),o=Math.min(r,i)/2;this.cx=iv(n[0],r),this.cy=iv(n[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(ch(a)||hh(a))&&(a=[0,a]),this.r0=iv(a[0],o),this.r=iv(a[1],o),th(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,r=this._model;th(n,function(e){e.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(t,i){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===r){var o=t.getData();th(n,function(e){e.scale.unionExtentFromData(o,o.mapDimension(e.dim))})}},this);var i=r.get("splitNumber"),o=new xN;o.setExtent(0,i),o.setInterval(1),th(n,function(e,t){AO(e.scale,e.model,o)})},e.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",function(i){var o=new e(i,t,n);r.push(o),i.coordinateSystem=o}),t.eachSeriesByType("radar",function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("radarIndex")||0])}),r},e.dimensions=[],e}();const bz=xz;function wz(e){e.registerCoordinateSystem("radar",bz),e.registerComponentModel(fz),e.registerComponentView(vz),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(e){t.setItemVisual(e,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var Sz="\0_ec_interaction_mutex";function _z(e,t){return!!Az(e)[t]}function Az(e){return e[Sz]||(e[Sz]={})}function kz(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(kp(r.event),Cz(e,t,n,r,i))}function Cz(e,t,n,r,i){i.isAvailableBehavior=ah(Mz,null,n,r),e.trigger(t,i)}function Mz(e,t,n){var r=n[e];return!e||r&&(!ch(r)||t.event[r+"Key"])}JD({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Oh);const Iz=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=ah(n._mousedownHandler,n),i=ah(n._mousemoveHandler,n),o=ah(n._mouseupHandler,n),a=ah(n._mousewheelHandler,n),s=ah(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=Kd(Xd(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 kd(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(!Cp(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&&Mz("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!_z(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&&kp(e.event),Cz(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Cp(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=Mz("zoomOnMouseWheel",e,this._opt),n=Mz("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;kz(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);kz(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){_z(this._zr,"globalPan")||kz(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(op);function Tz(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function Dz(e,t,n,r){var i=e.target,o=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,i.x-=(n-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var jz,Pz={axisPointer:1,tooltip:1,brush:1};function Lz(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!Pz.hasOwnProperty(r.mainType)&&i&&i.model!==n}function Rz(e){ch(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));var t=e;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var Ez={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Nz=oh(Ez),Oz={"alignment-baseline":"textBaseline","stop-color":"stopColor"},zz=oh(Oz),Bz=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=Rz(e);this._defsUsePending=[];var r=new Zm;this._root=r;var i=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),s=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),Gz(n,r,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;if(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r[0].style[r[1]]=e[r[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],o){var d=qz(o);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=eB(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var h=r;(r=new Zm).add(h),h.scaleX=h.scaleY=u.scale,h.x=u.x,h.y=u.y}return t.ignoreRootClip||null==a||null==s||r.setClipPath(new Kx({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,o){var a,s=e.nodeName.toLowerCase(),l=r;if("defs"===s&&(i=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=t;else{if(!i){var u=jz[s];if(u&&Nh(jz,s)){a=u.call(this,e,t);var c=e.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});t.add(a)}}var h=Fz[s];if(h&&Nh(Fz,s)){var p=h.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,i,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new Bx({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),function(e,t){var n=t.__selfStyle;if(n){var r=n.textBaseline,i=r;r&&"auto"!==r?"baseline"===r?i="alphabetic":"before-edge"===r||"text-before-edge"===r?i="top":"after-edge"===r||"text-after-edge"===r?i="bottom":"central"!==r&&"mathematical"!==r||(i="middle"):i="alphabetic",e.style.textBaseline=i}var o=t.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),e.style.textAlign=s)}}(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(jz={g:function(e,t){var n=new Zm;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Kx;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new TC;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new lM;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new PC;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,r=e.getAttribute("points");r&&(n=Hz(r));var i=new tM({shape:{points:n||[]},silent:!0});return Wz(t,i),Gz(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n,r=e.getAttribute("points");r&&(n=Hz(r));var i=new iM({shape:{points:n||[]},silent:!0});return Wz(t,i),Gz(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new Wx;return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(o);var a=new Zm;return Wz(t,a),Gz(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),r=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",a=new Zm;return Wz(t,a),Gz(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),a},path:function(e,t){var n=kC(e.getAttribute("d")||"");return Wz(t,n),Gz(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),Fz={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),r=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),o=new xM(t,n,r,i);return $z(e,o),Vz(e,o),o},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),r=parseInt(e.getAttribute("r")||"0",10),i=new bM(t,n,r);return $z(e,i),Vz(e,i),i}};function $z(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function Vz(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),i=void 0;i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};Jz(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function Wz(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Kd(t.__inheritedStyle,e.__inheritedStyle))}function Hz(e){for(var t=qz(e),n=[],r=0;r<t.length;r+=2){var i=parseFloat(t[r]),o=parseFloat(t[r+1]);n.push([i,o])}return n}function Gz(e,t,n,r,i){var o=t,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var r=[],i=null;n.replace(Zz,function(e,t,n){return r.push(t,n),""});for(var o=r.length-1;o>0;o-=2){var a=r[o],s=r[o-1],l=qz(a);switch(i=i||Dp(),s){case"translate":Rp(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Np(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ep(i,i,-parseFloat(l[0])*Kz,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":Lp(i,[1,0,Math.tan(parseFloat(l[0])*Kz),1,0,0],i);break;case"skewY":Lp(i,[1,Math.tan(parseFloat(l[0])*Kz),0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5])}}t.setLocalTransform(i)}}(e,t),Jz(e,a,s),r||function(e,t,n){for(var r=0;r<Nz.length;r++){var i=Nz[r];null!=(o=e.getAttribute(i))&&(t[Ez[i]]=o)}for(r=0;r<zz.length;r++){var o;i=zz[r];null!=(o=e.getAttribute(i))&&(n[Oz[i]]=o)}}(e,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=Xz(o,"fill",a.fill,n)),null!=a.stroke&&(o.style.stroke=Xz(o,"stroke",a.stroke,n)),th(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(e){null!=a[e]&&(o.style[e]=parseFloat(a[e]))}),th(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(e){null!=a[e]&&(o.style[e]=a[e])}),i&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=nh(qz(a.lineDash),function(e){return parseFloat(e)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var Uz=/^url\(\s*#(.*?)\)/;function Xz(e,t,n,r){var i=n&&n.match(Uz);if(!i)return"none"===n&&(n=null),n;var o=kh(i[1]);r.push([e,t,o])}var Yz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function qz(e){return e.match(Yz)||[]}var Zz=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Kz=Math.PI/180;var Qz=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Jz(e,t,n){var r,i=e.getAttribute("style");if(i)for(Qz.lastIndex=0;null!=(r=Qz.exec(i));){var o=r[1],a=Nh(Ez,o)?Ez[o]:null;a&&(t[a]=r[2]);var s=Nh(Oz,o)?Oz[o]:null;s&&(n[s]=r[2])}}function eB(e,t){var n=t.width/e.width,r=t.height/e.height,i=Math.min(n,r);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function tB(e,t){return Math.abs(e-t)<1e-8}function nB(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+=_x(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return tB(i[0],s[0])&&tB(i[1],s[1])||(r+=_x(i[0],i[1],s[0],s[1],t,n)),0!==r}var rB=[];function iB(e,t){for(var n=0;n<e.length;n++)ep(e[n],e[n],t)}function oB(e,t,n,r){for(var i=0;i<e.length;i++){var o=e[i];r&&(o=r.project(o)),o&&isFinite(o[0])&&isFinite(o[1])&&(tp(t,t,o),np(n,n,o))}}var aB=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),sB=function(e,t){this.type="polygon",this.exterior=e,this.interiors=t},lB=function(e){this.type="linestring",this.points=e},uB=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=r&&[r[0],r[1]],i}return kd(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,n=0,r=0;r<t.length;r++){var i=t[r],o=i.exterior,a=o&&o.length;a>n&&(e=i,n=a)}if(e)return function(e){for(var t=0,n=0,r=0,i=e.length,o=e[i-1][0],a=e[i-1][1],s=0;s<i;s++){var l=e[s][0],u=e[s][1],c=o*u-l*a;t+=c,n+=(o+l)*c,r+=(a+u)*c,o=l,a=u}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0];return th(this.geometries,function(t){"polygon"===t.type?oB(t.exterior,n,r,e):th(t.points,function(t){oB(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new Xp(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,i=n.length;r<i;r++){var o=n[r];if("polygon"===o.type){var a=o.exterior,s=o.interiors;if(nB(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(nB(s[l],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,r){var i=this.getBoundingRect(),o=i.width/i.height;n?r||(r=n/o):n=o*r;for(var a=new Xp(e,t,n,r),s=i.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++){var c=l[u];"polygon"===c.type?(iB(c.exterior,s),th(c.interiors,function(e){iB(e,s)})):th(c.points,function(e){iB(e,s)})}(i=this._rect).copy(a),this._center=[i.x+i.width/2,i.y+i.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(aB),cB=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="geoSVG",r._elOnlyForCalculate=n,r}return kd(t,e),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=jp(rB),i=e;i&&!i.isGeoSVGGraphicRoot;)Lp(r,i.getLocalTransform(),r),i=i.parent;return Op(r,r),ep(n,n,r),n},t}(aB),dB=Ph(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),hB=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=Ph(),this._freedGraphics=[],this._mapName=e,this._parsedXML=Rz(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=function(e){var t=[],n=Ph();return th(e,function(e){if(null==e.namedFrom){var r=new cB(e.name,e.el);t.push(r),n.set(e.name,r)}}),{regions:t,regionsMap:n}}(e.named),n=t.regions,r=t.regionsMap;this._regions=n,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n,r,i;try{Ah(null!=(n=(t=e&&(r=e,i={ignoreViewBox:!0,ignoreRootClip:!0},(new Bz).parse(r,i))||{}).root))}catch(oae){throw new Error("Invalid svg format\n"+oae.message)}var o=new Zm;o.add(n),o.isGeoSVGGraphicRoot=!0;var a=t.width,s=t.height,l=t.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,h=void 0,p=void 0;if(null!=a?(c=0,h=a):l&&(c=l.x,h=l.width),null!=s?(d=0,p=s):l&&(d=l.y,p=l.height),null==c||null==d){var f=n.getBoundingRect();null==c&&(c=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}u=this._boundingRect=new Xp(c,d,h,p)}if(l){var g=eB(l,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}o.setClipPath(new Kx({shape:u.plain()}));var m=[];return th(t.named,function(e){var t;null!=dB.get(e.svgNodeTagLower)&&(m.push(e),(t=e.el).silent=!1,t.isGroup&&t.traverse(function(e){e.silent=!1}))}),{root:o,boundingRect:u,named:m}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();function pB(e,t,n){for(var r=0;r<e.length;r++)e[r]=fB(e[r],t[r],n)}function fB(e,t,n){for(var r=[],i=t[0],o=t[1],a=0;a<e.length;a+=2){var s=e.charCodeAt(a)-64,l=e.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),i=s+=i,o=l+=o,r.push([s/n,l/n])}return r}function gB(e,t){return e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),th(t.features,function(e){var t=e.geometry,r=t.encodeOffsets,i=t.coordinates;if(r)switch(t.type){case"LineString":t.coordinates=fB(i,r,n);break;case"Polygon":case"MultiLineString":pB(i,r,n);break;case"MultiPolygon":th(i,function(e,t){return pB(e,r[t],n)})}}),t.UTF8Encoding=!1,t}(e),nh(ih(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case"Polygon":var o=r.coordinates;i.push(new sB(o[0],o.slice(1)));break;case"MultiPolygon":th(r.coordinates,function(e){e[0]&&i.push(new sB(e[0],e.slice(1)))});break;case"LineString":i.push(new lB([r.coordinates]));break;case"MultiLineString":i.push(new lB(r.coordinates))}var a=new uB(n[t||"name"],i,n.cp);return a.properties=n,a})}for(var mB=[126,25],vB="\u5357\u6d77\u8bf8\u5c9b",yB=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],xB=0;xB<yB.length;xB++)for(var bB=0;bB<yB[xB].length;bB++)yB[xB][bB][0]/=10.5,yB[xB][bB][1]/=-14,yB[xB][bB][0]+=mB[0],yB[xB][bB][1]+=mB[1];var wB={"\u5357\u6d77\u8bf8\u5c9b":[32,80],"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,5],"\u6fb3\u95e8":[-10,10],"\u5929\u6d25":[5,5]};var SB=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var _B=function(){function e(e,t,n){var r;this.type="geoJSON",this._parsedMap=Ph(),this._mapName=e,this._specialAreas=n,this._geoJSON=ch(r=t)?"undefined"!==typeof JSON&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}return e.prototype.load=function(e,t){t=t||"name";var n=this._parsedMap.get(t);if(!n){var r=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:r,boundingRect:AB(r)})}var i=Ph(),o=[];return th(n.regions,function(t){var n=t.name;e&&Nh(e,n)&&(t=t.cloneShallow(n=e[n])),o.push(t),i.set(n,t)}),{regions:o,boundingRect:n.boundingRect||new Xp(0,0,0,0),regionsMap:i}},e.prototype._parseToRegions=function(e){var t,n=this._mapName,r=this._geoJSON;try{t=r?gB(r,e):[]}catch(oae){throw new Error("Invalid geoJson format\n"+oae.message)}return function(e,t){if("china"===e){for(var n=0;n<t.length;n++)if(t[n].name===vB)return;t.push(new uB(vB,nh(yB,function(e){return{type:"polygon",exterior:e}}),mB))}}(n,t),th(t,function(e){var t=e.name;!function(e,t){if("china"===e){var n=wB[t.name];if(n){var r=t.getCenter();r[0]+=n[0]/10.5,r[1]+=-n[1]/14,t.setCenter(r)}}}(n,e),function(e,t){"china"===e&&"\u53f0\u6e7e"===t.name&&t.geometries.push({type:"polygon",exterior:SB[0]})}(n,e);var r=this._specialAreas&&this._specialAreas[t];r&&e.transformTo(r.left,r.top,r.width,r.height)},this),t},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function AB(e){for(var t,n=0;n<e.length;n++){var r=e[n].getBoundingRect();(t=t||r.clone()).union(r)}return t}var kB=Ph();const CB=function(e,t,n){if(t.svg){var r=new hB(e,t.svg);kB.set(e,r)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?n=t.specialAreas:i=t;r=new _B(e,i,n);kB.set(e,r)}},MB=function(e){return kB.get(e)},IB=function(e){var t=kB.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},TB=function(e,t,n){var r=kB.get(e);if(r)return r.load(t,n)};var DB=["rect","circle","line","ellipse","polygon","polyline","path"],jB=Ph(DB),PB=Ph(DB.concat(["g"])),LB=Ph(DB.concat(["g"])),RB=Fv();function EB(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function NB(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var OB=function(){function e(e){var t=new Zm;this.uid=Zw("ec_map_draw"),this._controller=new Iz(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Zm),t.add(this._svgGroup=new Zm)}return e.prototype.draw=function(e,t,n,r,i){var o="geo"===e.mainType,a=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(t){a||t.getHostGeoModel()!==e||(a=t.getData())});var s=e.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,h=c.roam;!l.childAt(0)||i?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):gw(u,h,e);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Ph(),n=Ph(),r=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*i.scaleX+i.x,e[1]*i.scaleY+i.y]}function c(e){for(var t=[],n=!l&&s&&s.project,r=0;r<e.length;++r){var i=u(e[r],n);i&&t.push(i)}return t}function d(e){return{shape:{points:c(e)}}}r.removeAll(),th(e.geo.regions,function(i){var c=i.name,h=t.get(c),p=n.get(c)||{},f=p.dataIdx,g=p.regionModel;if(!h){h=t.set(c,new Zm),r.add(h),f=a?a.indexOfName(c):null;var m=(g=e.isGeo?o.getRegionModel(c):a?a.getItemModel(f):null).get("silent",!0);null!=m&&(h.silent=m),n.set(c,{dataIdx:f,regionModel:g})}var v=[],y=[];th(i.geometries,function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=WB(t,l)),th(t,function(e){v.push(new tM(d(e)))})}else{var n=e.points;l&&(n=WB(n,l,!0)),th(n,function(e){y.push(new iM(d(e)))})}});var x=u(i.getCenter(),s&&s.project);function b(t,n){if(t.length){var r=new vM({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});h.add(r),zB(e,r,f,g),BB(e,r,c,g,o,f,x),n&&(NB(r),th(r.states,NB))}}b(v),b(y,!0)}),t.each(function(t,r){var i=n.get(r),a=i.dataIdx,s=i.regionModel;FB(e,t,r,s,o,a),$B(e,t,r,s,o),VB(e,t,r,s,o)},this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var r=this._svgDispatcherMap=Ph(),i=!1;th(this._svgGraphicRecord.named,function(t){var n=t.name,o=e.mapOrGeoModel,a=e.data,s=t.svgNodeTagLower,l=t.el,u=a?a.indexOfName(n):null,c=o.getRegionModel(n);null!=jB.get(s)&&l instanceof Ly&&zB(e,l,u,c),l instanceof Ly&&(l.culling=!0);var d=c.get("silent",!0);(null!=d&&(l.silent=d),l.z2EmphasisLift=0,t.namedFrom)||(null!=LB.get(s)&&BB(e,l,n,c,o,u,null),FB(e,l,n,c,o,u),$B(e,l,n,c,o),null!=PB.get(s)&&("self"===VB(e,l,n,c,o)&&(i=!0),(r.get(n)||r.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(i,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(e){if(!e.isGroup){Fb(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=n&&(t.opacity=n),e.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var n=t.coordinateSystem;if("geoJSON"===n.resourceType){var r=this._regionsGroupByName;if(r){var i=r.get(e);return i?[i]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=MB(e);if(t&&"geoSVG"===t.type){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=MB(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n){var r=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=r.getZoom(),i.enable(e.get("roam")||!1);var a=e.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=e.id,t}i.off("pan").on("pan",function(e){this._mouseDownFlag=!1,Tz(o,e.dx,e.dy),n.dispatchAction(Zd(s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(e){this._mouseDownFlag=!1,Dz(o,e.scale,e.originX,e.originY),n.dispatchAction(Zd(s(),{totalZoom:o.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(t,i,o){return r.containPoint([i,o])&&!Lz(t,n,e)})},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=RB(t).ignore)})},e.prototype._updateMapSelectHandler=function(e,t,n,r){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(e){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},e}();function zB(e,t,n,r){var i=r.getModel("itemStyle"),o=r.getModel(["emphasis","itemStyle"]),a=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=EB(i),u=EB(o),c=EB(s),d=EB(a),h=e.data;if(h){var p=h.getItemVisual(n,"style"),f=h.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=qT(f,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=d,Fb(t)}function BB(e,t,n,r,i,o,a){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(l||u||c&&c.showLabel){var d=l?n:o,h=void 0;(!s||o>=0)&&(h=i);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;kw(t,Cw(r),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(RB(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function FB(e,t,n,r,i,o){e.data?e.data.setItemGraphicEl(o,t):fb(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function $B(e,t,n,r,i){e.data||nI({el:t,componentModel:i,itemName:n,itemTooltipOption:r.get("tooltip")})}function VB(e,t,n,r,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var o=r.getModel("emphasis"),a=o.get("focus");return rw(t,a,o.get("blurScope"),o.get("disabled")),e.isGeo&&function(e,t,n){var r=fb(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}(t,i,n),a}function WB(e,t,n){var r,i=[];function o(){r=[]}function a(){r.length&&(i.push(r),r=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&r.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),th(e,function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()}),!n&&s.polygonEnd(),i}const HB=OB;const GB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&r&&"geoRoam"===r.type&&this._mapDraw.resetForLabelLayout(),r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===e.id)(o=this._mapDraw)&&i.add(o.group);else if(e.needsDrawMap){var o=this._mapDraw||new HB(n);i.add(o.group),o.draw(e,t,n,this,r),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var r=e.originalData,i=this.group;r.each(r.mapDimension("value"),function(t,n){if(!isNaN(t)){var o=r.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new TC({style:{fill:e.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=e.mainSeries.getData(),c=r.getName(n),d=u.indexOfName(c),h=r.getItemModel(n),p=h.getModel("label"),f=u.getItemGraphicEl(d);kw(l,Cw(h),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:c}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){zb(l,e)}}i.add(l)}}})},t.type="map",t}(pI);var UB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,r=n.getRegion(t);return r&&n.dataToPoint(r.getCenter())}},n}return kd(t,e),t.prototype.getInitialData=function(e){for(var t=NE(this,{coordDimensions:["value"],encodeDefaulter:sh(S_,this)}),n=Ph(),r=[],i=0,o=t.count();i<o;i++){var a=t.getName(i);n.set(a,i)}return th(TB(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){var i,o=e.name,a=n.get(o),s=e.properties&&e.properties.echartsStyle;null==a?(i={name:o},r.push(i)):i=t.getRawDataItem(a),s&&Yd(i,s)}),t.appendData(r),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData(),i=this.getRawValue(e),o=r.getName(e),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(o),c=r.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return Lk("section",{header:s.join(", "),noHeader:!s.length,blocks:[Lk("nameValue",{name:o,value:i})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",n=ST(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(rC);const XB=UB;function YB(e){var t={};e.eachSeriesByType("map",function(e){var n=e.getHostGeoModel(),r=n?"o"+n.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)}),th(t,function(e,t){for(var n=function(e,t){var n={};return th(e,function(e){e.each(e.mapDimension("value"),function(t,r){var i="ec-"+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)})}),e[0].map(e[0].mapDimension("value"),function(r,i){for(var o="ec-"+e[0].getName(i),a=0,s=1/0,l=-1/0,u=n[o].length,c=0;c<u;c++)s=Math.min(s,n[o][c]),l=Math.max(l,n[o][c]),a+=n[o][c];return 0===u?NaN:"min"===t?s:"max"===t?l:"average"===t?a/u:a})}(nh(e,function(e){return e.getData()}),e[0].get("mapValueCalculation")),r=0;r<e.length;r++)e[r].originalData=e[r].getData();for(r=0;r<e.length;r++)e[r].seriesGroup=e,e[r].needsDrawMap=0===r&&!e[r].getHostGeoModel(),e[r].setData(n.cloneShallow()),e[r].mainSeries=e[0]})}function qB(e){var t={};e.eachSeriesByType("map",function(n){var r=n.getMapType();if(!n.getHostGeoModel()&&!t[r]){var i={};th(n.seriesGroup,function(t){var n=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&r.each(r.mapDimension("value"),function(e,t){var o=r.getName(t),a=n.getRegion(o);if(a&&!isNaN(e)){var s=i[o]||0,l=n.dataToPoint(a.getCenter());i[o]=s+1,r.setItemLayout(t,{point:l,offset:s})}})});var o=n.getData();o.each(function(e){var t=o.getName(e),n=o.getItemLayout(e)||{};n.showLabel=!i[t],o.setItemLayout(e,n)}),t[r]=!0}})}var ZB=ep,KB=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Im,n._rawTransformable=new Im,n.name=t,n}return kd(t,e),t.prototype.setBoundingRect=function(e,t,n,r){return this._rect=new Xp(e,t,n,r),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,r){this._transformTo(e,t,n,r),this._viewRect=new Xp(e,t,n,r)},t.prototype._transformTo=function(e,t,n,r){var i=this.getBoundingRect(),o=this._rawTransformable;o.transform=i.calculateTransform(new Xp(e,t,n,r));var a=o.parent;o.parent=null,o.decomposeTransform(),o.parent=a,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[iv(e[0],t.getWidth()),iv(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),r=this.getCenter(),i=this.getZoom();r=ep([],r,e),n=ep([],n,e),t.originX=r[0],t.originY=r[1],t.x=n[0]-r[0],t.y=n[1]-r[1],t.scaleX=t.scaleY=i,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),Pp(this.transform||(this.transform=[]),t.transform||[1,0,0,1,0,0]),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],Op(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new Im;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var r=t?this._rawTransform:this.transform;return n=n||[],r?ZB(n,e,r):Fh(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?ZB([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var r=QB(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=QB(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(Im);function QB(e){var t=e.seriesModel;return t?t.coordinateSystem:null}const JB=KB;var eF={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},tF=["lng","lat"],nF=function(e){function t(t,n,r){var i=e.call(this,t)||this;i.dimensions=tF,i.type="geo",i._nameCoordMap=Ph(),i.map=n;var o,a=r.projection,s=TB(n,r.nameMap,r.nameProperty),l=MB(n),u=(i.resourceType=l?l.type:null,i.regions=s.regions),c=eF[l.type];if(i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=a,a)for(var d=0;d<u.length;d++){var h=u[d].getBoundingRect(a);(o=o||h.clone()).union(h)}else o=s.boundingRect;return i.setBoundingRect(o.x,o.y,o.width,o.height),i.aspectScale=a?1:bh(r.aspectScale,c.aspectScale),i._invertLongitute=!a&&c.invertLongitute,i}return kd(t,e),t.prototype._transformTo=function(e,t,n,r){var i=this.getBoundingRect(),o=this._invertLongitute;i=i.clone(),o&&(i.y=-i.y-i.height);var a=this._rawTransformable;a.transform=i.calculateTransform(new Xp(e,t,n,r));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,o&&(a.scaleY=-a.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var r=t[n];if("geoJSON"===r.type&&r.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(ch(e)&&(e=this.getGeoCoord(e)),e){var r=this.projection;return r&&(e=r.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,n,r){return e.prototype.dataToPoint.call(this,t,n,r)},t.prototype.convertToPixel=function(e,t,n){var r=rF(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=rF(t);return r===this?r.pointToData(n):null},t}(JB);function rF(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",Hv).models[0]||{}).coordinateSystem:null}Jd(nF,JB);const iF=nF;function oF(e,t){var n=e.get("boundingCoords");if(null!=n){var r=n[0],i=n[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(i[0])&&isFinite(i[1])){var o=this.projection;if(o){var a=r[0],s=r[1],l=i[0],u=i[1];r=[1/0,1/0],i=[-1/0,-1/0];var c=function(e,t,n,a){for(var s=n-e,l=a-t,u=0;u<=100;u++){var c=u/100,d=o.project([e+s*c,t+l*c]);tp(r,r,d),np(i,i,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(r[0],r[1],i[0]-r[0],i[1]-r[1])}else 0}var d,h,p,f=this.getBoundingRect(),g=e.get("layoutCenter"),m=e.get("layoutSize"),v=t.getWidth(),y=t.getHeight(),x=f.width/f.height*this.aspectScale,b=!1;if(g&&m&&(d=[iv(g[0],v),iv(g[1],y)],h=iv(m,Math.min(v,y)),isNaN(d[0])||isNaN(d[1])||isNaN(h)||(b=!0)),b)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var w=e.getBoxLayoutParams();w.aspect=x,p=ZS(w,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}var aF=function(){function e(){this.dimensions=tF}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",function(e,i){var o=e.get("map"),a=new iF(o+i,o,Zd({nameMap:e.get("nameMap")},r(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=oF,a.resize(e,t)}),e.eachSeries(function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}});var i={};return e.eachSeriesByType("map",function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}}),th(i,function(e,i){var o=nh(e,function(e){return e.get("nameMap")}),a=new iF(i,i,Zd({nameMap:qd(o)},r(e[0])));a.zoomLimit=xh.apply(null,nh(e,function(e){return e.get("scaleLimit")})),n.push(a),a.resize=oF,a.resize(e[0],t),th(e,function(e){e.coordinateSystem=a,function(e,t){th(t.get("geoCoord"),function(t,n){e.addGeoCoord(n,t)})}(a,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),o=Ph(),a=0;a<i.length;a++)o.set(i[a].name,i[a]);return th(TB(t,n,r).regions,function(e){var t=e.name,n=o.get(t),r=e.properties&&e.properties.echartsStyle;n||(n={name:t},i.push(n)),r&&Yd(n,r)}),i},e}();const sF=new aF;var lF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(e,t,n){var r=MB(e.map);if(r&&"geoJSON"===r.type){var i=e.itemStyle=e.itemStyle||{};"color"in i||(i.color="#eee")}this.mergeDefaultAndTheme(e,n),Tv(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=sF.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=rh(t.regions||[],function(t,r){var i=r.name;return i&&(t.set(i,new Yw(r,e,e.ecModel)),r.selected&&(n[i]=!0)),t},Ph()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Yw(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),r="normal"===t?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),i={name:e};return uh(r)?(i.status=t,r(i)):ch(r)?r.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;n&&("multiple"!==n&&(t.selectedMap=null),(t.selectedMap||(t.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(i_);const uF=lF;function cF(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function dF(e,t,n,r){var i=e.getZoom(),o=e.getCenter(),a=t.zoom,s=e.projectedToPoint?e.projectedToPoint(o):e.dataToPoint(o);if(null!=t.dx&&null!=t.dy&&(s[0]-=t.dx,s[1]-=t.dy,e.setCenter(cF(e,s),r)),null!=a){if(n){var l=n.min||0,u=n.max||1/0;a=Math.max(Math.min(i*a,u),l)/i}e.scaleX*=a,e.scaleY*=a;var c=(t.originX-e.x)*(a-1),d=(t.originY-e.y)*(a-1);e.x-=c,e.y-=d,e.updateTransform(),e.setCenter(cF(e,s),r),e.setZoom(a*i)}return{center:e.getCenter(),zoom:e.getZoom()}}const hF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return kd(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,r){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new HB(n));var i=this._mapDraw;i.draw(e,t,n,this,r),i.group.on("click",this._handleRegionClick,this),i.group.silent=e.get("silent"),this.group.add(i.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;cT(e.target,function(e){return null!=(t=fb(e).eventData)},!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var r=this;this._mapDraw.group.traverse(function(e){var t=fb(e).eventData;if(t)return r._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(oC);function pF(e,t,n){CB(e,t,n)}function fF(e){function t(t,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(e,n){var r={},i=[];return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name),th(n.coordinateSystem.regions,function(e){r[e.name]=n.isSelected(e.name)||!1});var o=[];th(r,function(e,t){r[t]&&o.push(t)}),i.push({geoIndex:n.componentIndex,name:o})}),{selected:r,allSelected:i,name:e.name}})}e.registerCoordinateSystem("geo",sF),e.registerComponentModel(uF),e.registerComponentView(hF),e.registerImpl("registerMap",pF),e.registerImpl("getMap",function(e){return IB(e)}),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,t,n){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(t){var i=t.coordinateSystem;if("geo"===i.type){var o=dF(i,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom),"series"===r&&th(t.seriesGroup,function(e){e.setCenter(o.center),e.setZoom(o.zoom)})}})})}function gF(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,r=0,i=0;for(;--n>=0;){var o=t[n];o.hierNode.prelim+=r,o.hierNode.modifier+=r,i+=o.hierNode.change,r+=o.hierNode.shift+i}}(e);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-o):e.hierNode.prelim=o}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=function(e,t,n,r){if(t){for(var i=e,o=e,a=o.parentNode.children[0],s=t,l=i.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=xF(s),o=bF(o),s&&o;){i=xF(i),a=bF(a),i.hierNode.ancestor=e;var h=s.hierNode.prelim+d-o.hierNode.prelim-u+r(s,o);h>0&&(SF(wF(s,e,n),e,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,c+=a.hierNode.modifier}s&&!xF(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-l),o&&!bF(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=e)}return n}(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function mF(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function vF(e){return arguments.length?e:_F}function yF(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function xF(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function bF(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function wF(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function SF(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function _F(e,t){return e.parentNode===t.parentNode?1:2}var AF=function(){this.parentPoint=[],this.childPoints=[]},kF=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new AF},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,o=n[0],a=n[r-1];if(1===r)return e.moveTo(i[0],i[1]),void e.lineTo(o[0],o[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=iv(t.forkPosition,1),d=[];d[l]=i[l],d[u]=i[u]+(a[u]-i[u])*c,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(o[0],o[1]),d[l]=o[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var h=1;h<r-1;h++){var p=n[h];e.moveTo(p[0],p[1]),d[l]=p[l],e.lineTo(d[0],d[1])}},t}(Nx);function CF(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function MF(e,t,n,r,i){var o=!n,a=e.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=e.tree.root,d=a.parentNode===c?a:a.parentNode||a,h=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=a.getLayout();o?((n=new JL(e,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,r.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,gw(n,{x:g.x,y:g.y},i);var m=n.getSymbolPath();if("radial"===i.get("layout")){var v=c.children[0],y=v.getLayout(),x=v.children.length,b=void 0,w=void 0;if(g.x===y.x&&!0===a.isExpand&&v.children.length){var S={x:(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2};(b=Math.atan2(S.y-y.y,S.x-y.x))<0&&(b=2*Math.PI+b),(w=S.x<y.x)&&(b-=Math.PI)}else(b=Math.atan2(g.y-y.y,g.x-y.x))<0&&(b=2*Math.PI+b),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(w=g.x<y.x)&&(b-=Math.PI):(w=g.x>y.x)||(b-=Math.PI);var _=w?"left":"right",A=s.getModel("label"),k=A.get("rotate"),C=k*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:A.get("position")||_,rotation:null==k?-b:C,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),T="relative"===I?Lh(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;T&&(fb(n).focus=T),function(e,t,n,r,i,o,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),h=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=r.__edge=new pM({shape:jF(c,d,h,i,i)})),gw(g,{shape:jF(c,d,h,o,a)},e));else if("polyline"===u)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var m=t.children,v=[],y=0;y<m.length;y++){var x=m[y].getLayout();v.push([x.x,x.y])}g||(g=r.__edge=new kF({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),gw(g,{shape:{parentPoint:[a.x,a.y],childPoints:v}},e)}}else 0;g&&("polyline"!==u||t.isExpand)&&(g.useStyle(Kd({strokeNoScale:!0,fill:null},f)),sw(g,l,"lineStyle"),Fb(g),s.add(g))}(i,a,c,n,f,p,g,r),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var r=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);r&&1===r.hoverState||zb(n.__edge,t)}})}function IF(e,t,n,r,i){var o=TF(t.tree.root,e),a=o.source,s=o.sourceLayout,l=t.getItemGraphicEl(e.dataIndex);if(l){var u=t.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=r.get("edgeShape"),h=r.get("layout"),p=r.get("orient"),f=r.get(["lineStyle","curveness"]);c&&("curve"===d?yw(c,{shape:jF(h,p,f,s,s),style:{opacity:0}},r,{cb:function(){n.remove(c)},removeOpt:i}):"polyline"===d&&"orthogonal"===r.get("layout")&&yw(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb:function(){n.remove(c)},removeOpt:i}))}}function TF(e,t){for(var n,r=t.parentNode===e?t:t.parentNode||t;null==(n=r.getLayout());)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function DF(e,t,n,r,i){var o=e.tree.getNodeByDataIndex(t),a=TF(e.tree.root,o).sourceLayout,s={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};yw(n,{x:a.x+1,y:a.y+1},i,{cb:function(){r.remove(n),e.setItemGraphicEl(t,null)},removeOpt:s}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:s}),o.children.forEach(function(t){IF(t,e,r,i,s)}),IF(o,e,r,i,s)}function jF(e,t,n,r,i){var o,a,s,l,u,c,d,h;if("radial"===e){u=r.rawX,d=r.rawY,c=i.rawX,h=i.rawY;var p=yF(u,d),f=yF(u,d+(h-d)*n),g=yF(c,h+(d-h)*n),m=yF(c,h);return{x1:p.x||0,y1:p.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=r.x,d=r.y,c=i.x,h=i.y,"LR"!==t&&"RL"!==t||(o=u+(c-u)*n,a=d,s=c+(u-c)*n,l=h),"TB"!==t&&"BT"!==t||(o=u,a=d+(h-d)*n,s=c,l=h+(d-h)*n),{x1:u,y1:d,x2:c,y2:h,cpx1:o,cpy1:a,cpx2:s,cpy2:l}}const PF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new Zm,n}return kd(t,e),t.prototype.init=function(e,t){this._controller=new Iz(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var r=e.getData(),i=e.layoutInfo,o=this._mainGroup;"radial"===e.get("layout")?(o.x=i.x+i.width/2,o.y=i.y+i.height/2):(o.x=i.x,o.y=i.y),this._updateViewCoordSys(e,n),this._updateController(e,t,n);var a=this._data;r.diff(a).add(function(t){CF(r,t)&&MF(r,t,null,o,e)}).update(function(t,n){var i=a.getItemGraphicEl(n);CF(r,t)?MF(r,t,i,o,e):i&&DF(a,n,i,o,e)}).remove(function(t){var n=a.getItemGraphicEl(t);n&&DF(a,t,n,o,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&r.eachItemGraphicEl(function(t,r){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:r})})}),this._data=r},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),r=[];n.each(function(e){var t=n.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||r.push([+t.x,+t.y])});var i=[],o=[];Vy(r,i,o);var a=this._min,s=this._max;o[0]-i[0]===0&&(i[0]=a?a[0]:i[0]-1,o[0]=s?s[0]:o[0]+1),o[1]-i[1]===0&&(i[1]=a?a[1]:i[1]-1,o[1]=s?s[1]:o[1]+1);var l=e.coordinateSystem=new JB;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),l.setCenter(e.get("center"),t),l.setZoom(e.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=i,this._max=o},t.prototype._updateController=function(e,t,n){var r=this,i=this._controller,o=this._controllerHost,a=this.group;i.setPointerChecker(function(t,r,i){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,i)&&!Lz(t,n,e)}),i.enable(e.get("roam")),o.zoomLimit=e.get("scaleLimit"),o.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",function(t){Tz(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Dz(o,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(e),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,r=t.scaleX||1;return((t.getZoom()-1)*n+1)/r},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(pI);var LF=Fv();function RF(e,t){if(LF(r=this).mainData===r){var n=Zd({},LF(this).datas);n[this.dataType]=t,BF(t,n,e)}else FF(t,this.dataType,LF(this).mainData,e);var r;return t}function EF(e,t){return e.struct&&e.struct.update(),t}function NF(e,t){return th(LF(t).datas,function(n,r){n!==t&&FF(n.cloneShallow(),r,t,e)}),t}function OF(e){var t=LF(this).mainData;return null==e||null==t?t:LF(t).datas[e]}function zF(){var e=LF(this).mainData;return null==e?[{data:e}]:nh(oh(LF(e).datas),function(t){return{type:t,data:LF(e).datas[t]}})}function BF(e,t,n){LF(e).datas={},th(t,function(t,r){FF(t,r,e,n)})}function FF(e,t,n,r){LF(n).datas[t]=e,LF(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=OF,e.getLinkedDataAll=zF}const $F=function(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,BF(t,n,e),th(n,function(n){th(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,sh(RF,e))})}),t.wrapMethod("cloneShallow",sh(NF,e)),th(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,sh(EF,e))}),Ah(n[t.dataType]===t)};var VF=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){uh(e)&&(n=t,t=e,e=null),ch(e=e||{})&&(e={order:e});var r,i=e.order||"preorder",o=this[e.attr||"children"];"preorder"===i&&(r=t.call(n,this));for(var a=0;!r&&a<o.length;a++)o[a].eachNode(e,t,n);"postorder"===i&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),WF=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),o=[],a=1;!function e(t,n){var r=t.value;a=Math.max(a,lh(r)?r.length:1),o.push(t);var s=new VF(Nv(t.name,""),i);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):i.root=s,i._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(t),i.root.updateDepthAndHeight(0);var s=FL(o,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new BL(s,n);return l.initData(o),r&&r(l),$F({mainData:l,struct:i,structAttr:"tree"}),i.update(),i},e}();const HF=WF;function GF(e,t,n){if(e&&Qd(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(ch(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var o=e.targetNodeId;if(null!=o&&(i=r.getNodeById(o)))return{node:i}}}function UF(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function XF(e,t){return Qd(UF(e),t)>=0}function YF(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var qF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return kd(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},r=new Yw(n,this,this.ecModel),i=HF.createTree(t,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=i.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=r),e})});var o=0;i.eachNode("preorder",function(e){e.depth>o&&(o=e.depth)});var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:o;return i.root.eachNode("preorder",function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a}),i.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],o=r.getNodeByDataIndex(e),a=o.getValue(),s=o.name;o&&o!==i;)s=o.parentNode.name+"."+s,o=o.parentNode;return Lk("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=YF(r,this),n.collapsed=!r.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(rC);const ZF=qF;function KF(e,t){for(var n,r=[e];n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var o=i.length-1;o>=0;o--)r.push(i[o])}}function QF(e,t){e.eachSeriesByType("tree",function(e){!function(e,t){var n=function(e,t){return ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var r=e.get("layout"),i=0,o=0,a=null;"radial"===r?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,a=vF(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(i=n.width,o=n.height,a=vF());var s=e.getData().tree.root,l=s.children[0];if(l){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,i=[t];n=i.pop();)if(r=n.children,n.isExpand&&r.length)for(var o=r.length-1;o>=0;o--){var a=r[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(s),function(e,t,n){for(var r,i=[e],o=[];r=i.pop();)if(o.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;s<a.length;s++)i.push(a[s])}for(;r=o.pop();)t(r,n)}(l,gF,a),s.hierNode.modifier=-l.hierNode.prelim,KF(l,mF);var u=l,c=l,d=l;KF(l,function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===r)f=i/(c.getLayout().x+h+p),g=o/(d.depth-1||1),KF(l,function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=yF(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)});else{var y=e.getOrient();"RL"===y||"LR"===y?(g=o/(c.getLayout().x+h+p),f=i/(d.depth-1||1),KF(l,function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:i-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(f=i/(c.getLayout().x+h+p),g=o/(d.depth-1||1),KF(l,function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)}))}}}(e,t)})}function JF(e){e.eachSeriesByType("tree",function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();Zd(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)})})}var e$=["treemapZoomToNode","treemapRender","treemapMove"];function t$(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=L_(e.ecModel,r.name||r.dataIndex+"",n);t.setVisual("decal",i)})}var n$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return kd(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};r$(n);var r=e.levels||[],i=this.designatedVisualItemStyle={},o=new Yw({itemStyle:i},this,t);r=e.levels=function(e,t){var n,r,i=Iv(t.get("color")),o=Iv(t.get(["aria","decal","decals"]));if(!i)return;e=e||[],th(e,function(e){var t=new Yw(e),i=t.get("color"),o=t.get("decal");(t.get(["itemStyle","color"])||i&&"none"!==i)&&(n=!0),(t.get(["itemStyle","decal"])||o&&"none"!==o)&&(r=!0)});var a=e[0]||(e[0]={});n||(a.color=i.slice());!r&&o&&(a.decal=o.slice());return e}(r,t);var a=nh(r||[],function(e){return new Yw(e,o,t)},this),s=HF.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=s.getNodeByDataIndex(t),r=n?a[n.depth]:null;return e.parentModel=r||o,e})});return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Lk("nameValue",{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=YF(r,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},Zd(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Ph(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){t$(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(rC);function r$(e){var t=0;th(e.children,function(e){r$(e);var n=e.value;lh(n)&&(n=n[0]),t+=n});var n=e.value;lh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),lh(e.value)?e.value[0]=n:e.value=n}const i$=n$;function o$(e,t,n,r,i,o){var a=[[i?e:e-5,t],[e+n,t],[e+n,t+r],[i?e:e-5,t+r]];return!o&&a.splice(2,0,[e+n+5,t+r/2]),!i&&a.push([e,t+r/2]),a}function a$(e,t,n){fb(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&YF(n,t)}}const s$=function(){function e(e){this.group=new Zm,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),i.get("show")&&n){var a=i.getModel("itemStyle"),s=i.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(e,c,a,s,l,u,r),KS(o,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=Nv(r.getModel().get("name"),""),o=n.getTextRect(i),a=Math.max(o.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:r,text:i,width:a})}},e.prototype._renderContent=function(e,t,n,r,i,o,a){for(var s=0,l=t.emptyItemWidth,u=e.get(["breadcrumb","height"]),c=function(e,t,n){var r=t.width,i=t.height,o=iv(e.left,r),a=iv(e.top,i),s=iv(e.right,r),l=iv(e.bottom,i);return(isNaN(o)||isNaN(parseFloat(e.left)))&&(o=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=r),(isNaN(a)||isNaN(parseFloat(e.top)))&&(a=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=i),n=zS(n||0),{width:Math.max(s-o-n[1]-n[3],0),height:Math.max(l-a-n[0]-n[2],0)}}(t.pos,t.box),d=t.totalWidth,h=t.renderList,p=r.getModel("itemStyle").getItemStyle(),f=h.length-1;f>=0;f--){var g=h[f],m=g.node,v=g.width,y=g.text;d>c.width&&(d-=v-l,v=l,y=null);var x=new tM({shape:{points:o$(s,0,v,u,f===h.length-1,0===f)},style:Kd(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new pb({style:Mw(i,{text:y})}),textConfig:{position:"inside"},z2:1e5,onclick:sh(a,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Mw(o,{text:y}),x.ensureState("emphasis").style=p,rw(x,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(x),a$(x,e,m),s+=v+8}},e.prototype.remove=function(){this.group.removeAll()},e}();var l$=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var o=this._storage[r];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();var u$=Zm,c$=Kx,d$="label",h$="upperLabel",p$=oy([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),f$=function(e){var t=p$(e);return t.stroke=t.fill=t.lineWidth=null,t},g$=Fv(),m$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return kd(t,e),t.prototype.render=function(e,t,n,r){if(!(Qd(t.findComponents({mainType:"series",subType:"treemap",query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=GF(r,["treemapZoomToNode","treemapRootToNode"],e),o=r&&r.type,a=e.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===o&&i&&l?{rootNodeGroup:l.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,c=this._giveContainerGroup(a),d=e.get("animation"),h=this._doRender(c,e,u);!d||s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?h.renderFinally():this._doAnimation(c,h,e,u),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new u$,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,o={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function u(e,r,i,u){return function(e,t,n,r,i,o,a,s,l,u){if(!a)return;var c=a.getLayout(),d=e.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var p=c.width,f=c.height,g=c.borderWidth,m=c.invisible,v=a.getRawIndex(),y=s&&s.getRawIndex(),x=a.viewChildren,b=c.upperHeight,w=x&&x.length,S=h.getModel("itemStyle"),_=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),k=h.getModel(["select","itemStyle"]),C=S.get("borderRadius")||0,M=$("nodeGroup",u$);if(!M)return;if(l.add(M),M.x=c.x||0,M.y=c.y||0,M.markRedraw(),g$(M).nodeWidth=p,g$(M).nodeHeight=f,c.isAboveViewRoot)return M;var I=$("background",c$,u,20);I&&N(M,I,w&&c.upperLabelHeight);var T=h.getModel("emphasis"),D=T.get("focus"),j=T.get("blurScope"),P=T.get("disabled"),L="ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():D;if(w)uw(M)&&lw(M,!1),I&&(lw(I,!P),d.setItemGraphicEl(a.dataIndex,I),iw(I,L,j));else{var R=$("content",c$,u,30);R&&O(M,R),I.disableMorphing=!0,I&&uw(I)&&lw(I,!1),lw(M,!P),d.setItemGraphicEl(a.dataIndex,M);var E=h.getShallow("cursor");E&&R.attr("cursor",E),iw(M,L,j)}return M;function N(t,n,r){var i=fb(n);if(i.dataIndex=a.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:C}),m)z(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=f$(S);l.fill=s;var u=p$(_);u.fill=_.get("borderColor");var c=p$(A);c.fill=A.get("borderColor");var d=p$(k);if(d.fill=k.get("borderColor"),r){var h=p-2*g;B(n,s,o.opacity,{x:g,y:0,width:h,height:b})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,Fb(n)}t.add(n)}function O(t,n){var r=fb(n);r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*g,0),o=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:i,height:o,r:C}),m)z(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=f$(S);u.fill=l,u.decal=s.decal;var c=p$(_),d=p$(A),h=p$(k);B(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=h,Fb(n)}t.add(n)}function z(e){!e.invisible&&o.push(e)}function B(t,n,r,i){var o=h.getModel(i?h$:d$),s=Nv(h.get("name"),null),l=o.getShallow("show");kw(t,Cw(h,i?h$:d$),{defaultText:l?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,p=_h(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);d.width===e&&d.height===n||u.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",F(d,i,c);var f=u.getState("emphasis");F(f?f.style:null,i,c)}}function F(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&null!=i){var o=e.get("drillDownIcon",!0);t.text=o?o+" "+i:i}}function $(e,r,o,a){var s=null!=y&&n[e][y],l=i[e];return s?(n[e][y]=null,V(l,s)):m||((s=new r)instanceof Ly&&(s.z2=function(e,t){return 100*e+t}(o,a)),W(l,s)),t[e][v]=s}function V(e,t){var n=e[v]={};t instanceof u$?(n.oldX=t.x,n.oldY=t.y):n.oldShape=Zd({},t.shape)}function W(e,t){var n=e[v]={},o=a.parentNode,s=t instanceof Zm;if(o&&(!r||"drillDown"===r.direction)){var l=0,u=0,c=i.background[o.getRawIndex()];!r&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}(t,a,s,n,o,l,e,r,i,u)}!function e(t,n,r,i,o){i?(n=t,th(t,function(e,t){!e.isRemoved()&&s(t,t)})):new fL(n,t,a,a).add(s).update(s).remove(sh(s,null)).execute();function a(e){return e.getId()}function s(a,s){var l=null!=a?t[a]:null,c=null!=s?n[s]:null,d=u(l,c,r,o);d&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],d,i,o+1)}}(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var c=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&th(e,function(e,n){var r=t[n];th(e,function(e){e&&(r.push(e),g$(e).willDelete=!0)})}),t}(s);if(this._oldTree=r,this._storage=a,this._controllerHost){var d=this.seriesModel.layoutInfo,h=r.root.getLayout();h.width===d.width&&h.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:o,willDeleteEls:c,renderFinally:function(){th(c,function(e){th(e,function(e){e.parent&&e.parent.remove(e)})}),th(l,function(e){e.invisible=!0,e.dirty()})}}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get("animationDurationUpdate"),o=n.get("animationEasing"),a=(uh(i)?0:i)||0,s=(uh(o)?null:o)||"cubicOut",l=new l$;th(t.willDeleteEls,function(e,t){th(e,function(e,n){if(!e.invisible){var i,o=e.parent,u=g$(o);if(r&&"drillDown"===r.direction)i=o===r.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),i="nodeGroup"===t?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}i&&l.add(e,i,a,0,s)}})}),th(this._storage,function(e,n){th(e,function(e,r){var i=t.lastsForAnimation[n][r],o={};i&&(e instanceof Zm?null!=i.oldX&&(o.x=e.x,o.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(o.shape=Zd({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle("opacity",0),o.style={opacity:1}):1!==e.style.opacity&&(o.style={opacity:1})),l.add(e,o,a,0,s))})},this),this._state="animating",l.finished(ah(function(){this._state="ready",t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),t||((t=this._controller=new Iz(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",ah(this._onPan,this)),t.on("zoom",ah(this._onZoom,this)));var r=new Xp(0,0,e.getWidth(),e.getHeight());t.setPointerChecker(function(e,t,n){return r.contain(t,n)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var a,s=new Xp(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=r,a){var c=a.min||0,d=a.max||1/0;u=Math.max(Math.min(d,u),c)}var h=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];Rp(f,f,[-(t-=p.x),-(n-=p.y)]),Np(f,f,[h,h]),Rp(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if("zoomToNode"===n)t._zoomToNode(r);else if("link"===n){var o=i.hostTree.data.getItemModel(i.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&HS(a,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new s$(this.group))).render(e,t,n.node,function(t){"animating"!==r._state&&(XF(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var o=i.transformCoordToLocal(e,t),a=i.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:r,offsetX:o[0],offsetY:o[1]}}},this),n},t.type="treemap",t}(pI);const v$=m$;var y$=th,x$=ph,b$=-1,w$=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=Xd(t);this.type=r,this.mappingMethod=n,this._normalizeData=j$[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(S$(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,th(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(y$(t,function(e,t){n[e]=t}),!lh(r)){var i=[];ph(r)?y$(r,function(e,t){var r=n[t];i[null!=r?r:b$]=e}):i[-1]=r,r=D$(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):S$(i,!0):(Ah("linear"!==n||i.dataExtent),S$(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return ah(this._normalizeData,this)},e.listVisualTypes=function(){return oh(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){ph(e)?th(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=lh(t)?[]:ph(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&&y$(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)}),n?r:null},e.prepareVisualTypes=function(e){if(lh(e))e=e.slice();else{if(!x$(e))return[];var t=[];y$(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||ch(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(P$(c[1],e,u[1]))return o}else if(u[1]===1/0){if(P$(c[0],u[0],e))return o}else if(P$(c[0],u[0],e)&&P$(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:k$("color"),getColorMapper:function(){var e=this.option;return ah("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),C$.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=dg(t,e.parsedVisual,r),i?r:gg(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return gg(dg(e,this.option.parsedVisual),"rgba")},category:C$,piecewise:function(e,t){var n=T$.call(this,t);return null==n&&(n=gg(dg(e,this.option.parsedVisual),"rgba")),n},fixed:M$}},colorHue:_$(function(e,t){return pg(e,t)}),colorSaturation:_$(function(e,t){return pg(e,null,t)}),colorLightness:_$(function(e,t){return pg(e,null,null,t)}),colorAlpha:_$(function(e,t){return fg(e,t)}),decal:{applyVisual:k$("decal"),_normalizedToVisual:{linear:null,category:C$,piecewise:null,fixed:null}},opacity:{applyVisual:k$("opacity"),_normalizedToVisual:I$([0,1])},liftZ:{applyVisual:k$("liftZ"),_normalizedToVisual:{linear:M$,category:M$,piecewise:M$,fixed:M$}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:A$,category:C$,piecewise:function(e,t){var n=T$.call(this,t);return null==n&&(n=A$.call(this,e)),n},fixed:M$}},symbolSize:{applyVisual:k$("symbolSize"),_normalizedToVisual:I$([0,1])}},e}();function S$(e,t){var n=e.visual,r=[];ph(n)?y$(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]),D$(e,r)}function _$(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:I$([0,1])}}function A$(e){var t=this.option.visual;return t[Math.round(rv(e,[0,1],[0,t.length-1],!0))]||{}}function k$(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function C$(e){var t=this.option.visual;return t[this.option.loop&&e!==b$?e%t.length:e]}function M$(){return this.option.visual[0]}function I$(e){return{linear:function(t){return rv(t,e,this.option.visual,!0)},category:C$,piecewise:function(t,n){var r=T$.call(this,n);return null==r&&(r=rv(t,e,this.option.visual,!0)),r},fixed:M$}}function T$(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[w$.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function D$(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=nh(t,function(e){var t=lg(e);return t||[0,0,0,1]})),t}var j$={linear:function(e){return rv(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=w$.findPieceIndex(e,t,!0);if(null!=n)return rv(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?b$:t},fixed:Oh};function P$(e,t,n){return e?t<=n:t<n}const L$=w$;var R$=Fv();const E$={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||N$(t,{},e.getViewRoot().getAncestors(),e)}};function N$(e,t,n,r){var i=e.getModel(),o=e.getLayout(),a=e.hostTree.data;if(o&&!o.invisible&&o.isInView){var s,l=i.getModel("itemStyle"),u=function(e,t,n){var r=Zd({},t),i=n.designatedVisualItemStyle;return th(["color","colorAlpha","colorSaturation"],function(n){i[n]=t[n];var o=e.get(n);i[n]=null,null!=o&&(r[n]=o)}),r}(l,t,r),c=a.ensureUniqueItemVisual(e.dataIndex,"style"),d=l.get("borderColor"),h=l.get("borderColorSaturation");null!=h&&(d=function(e,t){return null!=t?pg(t,null,null,e):null}(h,s=O$(u))),c.stroke=d;var p=e.viewChildren;if(p&&p.length){var f=function(e,t,n,r,i,o){if(!o||!o.length)return;var a=B$(t,"color")||null!=i.color&&"none"!==i.color&&(B$(t,"colorAlpha")||B$(t,"colorSaturation"));if(!a)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new L$(d);return R$(h).drColorMappingBy=c,h}(0,i,o,0,u,p);th(p,function(e,t){if(e.depth>=n.length||e===n[e.depth]){var o=function(e,t,n,r,i,o){var a=Zd({},t);if(i){var s=i.type,l="color"===s&&R$(i).drColorMappingBy,u="index"===l?r:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=i.mapValueToVisual(u)}return a}(i,u,e,t,f,r);N$(e,o,n,r)}})}else s=O$(u),c.fill=s}}function O$(e){var t=z$(e,"color");if(t){var n=z$(e,"colorAlpha"),r=z$(e,"colorSaturation");return r&&(t=pg(t,null,null,r)),n&&(t=fg(t,n)),t}}function z$(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function B$(e,t){var n=e.get(t);return lh(n)&&n.length?{name:t,range:n}:null}var F$=Math.max,$$=Math.min,V$=xh,W$=th,H$=["itemStyle","borderWidth"],G$=["itemStyle","gapWidth"],U$=["upperLabel","show"],X$=["upperLabel","height"];const Y$={seriesType:"treemap",reset:function(e,t,n,r){var i=n.getWidth(),o=n.getHeight(),a=e.option,s=ZS(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=iv(V$(s.width,l[0]),i),c=iv(V$(s.height,l[1]),o),d=r&&r.type,h=GF(r,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?r.rootRect:null,f=e.getViewRoot(),g=UF(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(e,t,n,r,i){var o,a=(t||{}).node,s=[r,i];if(!a||a===n)return s;var l=r*i,u=l*e.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var c=0,d=o.children,h=0,p=d.length;h<p;h++)c+=d[h].getValue();var f=a.getValue();if(0===f)return s;u*=c/f;var g=o.getModel(),m=g.get(H$);(u+=4*m*m+(3*m+Math.max(m,J$(g)))*Math.pow(u,.5))>dv&&(u=dv),a=o}u<l&&(u=l);var v=Math.pow(u/l,.5);return[r*v,i*v]}(e,h,f,u,c):p?[p.width,p.height]:[u,c],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(x),q$(f,y,!1,0),x=f.getLayout(),W$(g,function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(Zd({dataExtent:[n,n],borderWidth:0,upperHeight:0},x))})}var b=e.getData().tree.root;b.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,o=i.getLayout();if(!o)return r;var a=[o.width/2,o.height/2],s=i;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}(s,p,h),!0),e.setLayoutInfo(s),Q$(b,new Xp(-s.x,-s.y,i,o),g,f,0)}};function q$(e,t,n,r){var i,o;if(!e.isRemoved()){var a=e.getLayout();i=a.width,o=a.height;var s=e.getModel(),l=s.get(H$),u=s.get(G$)/2,c=J$(s),d=Math.max(l,c),h=l-u,p=d-u;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var f=(i=F$(i-2*h,0))*(o=F$(o-h-p,0)),g=function(e,t,n,r,i,o){var a=e.children||[],s=r.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=r.leafDepth&&r.leafDepth<=o;if(i&&!l)return e.viewChildren=[];a=ih(a,function(e){return!e.isRemoved()}),function(e,t){t&&e.sort(function(e,n){var r="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===r?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r})}(a,s);var u=function(e,t,n){for(var r=0,i=0,o=t.length;i<o;i++)r+=t[i].getValue();var a,s=e.get("visualDimension");t&&t.length?"value"===s&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],W$(t,function(e){var t=e.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:r,dataExtent:a}}(t,a,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,r,i){if(!r)return n;for(var o=e.get("visibleMin"),a=i.length,s=a,l=a-1;l>=0;l--){var u=i["asc"===r?a-l-1:l].getValue();u/n*t<o&&(s=l,n-=u)}return"asc"===r?i.splice(0,a-s):i.splice(s,a-s),n}(t,n,u.sum,s,a),0===u.sum)return e.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}l&&(a.length&&e.setLayout({isLeafRoot:!0},!0),a.length=0);return e.viewChildren=a,e.setLayout({dataExtent:u.dataExtent},!0),a}(e,s,f,t,n,r);if(g.length){var m={x:h,y:p,width:i,height:o},v=$$(i,o),y=1/0,x=[];x.area=0;for(var b=0,w=g.length;b<w;){var S=g[b];x.push(S),x.area+=S.getLayout().area;var _=Z$(x,v,t.squareRatio);_<=y?(b++,y=_):(x.area-=x.pop().getLayout().area,K$(x,v,m,u,!1),v=$$(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&K$(x,v,m,u,!0),!n){var A=s.get("childrenVisibleMin");null!=A&&f<A&&(n=!0)}for(b=0,w=g.length;b<w;b++)q$(g[b],t,n,r+1)}}}function Z$(e,t,n){for(var r=0,i=1/0,o=0,a=void 0,s=e.length;o<s;o++)(a=e[o].getLayout().area)&&(a<i&&(i=a),a>r&&(r=a));var l=e.area*e.area,u=t*t*n;return l?F$(u*r/l,l/(u*i)):1/0}function K$(e,t,n,r,i){var o=t===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=t?e.area/t:0;(i||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=e.length;d<h;d++){var p=e[d],f={},g=c?p.getLayout().area/c:0,m=f[l[a]]=F$(c-2*r,0),v=n[s[o]]+n[l[o]]-u,y=d===h-1||v<g?v:g,x=f[l[o]]=F$(y-2*r,0);f[s[a]]=n[s[a]]+$$(r,m/2),f[s[o]]=u+$$(r,x/2),u+=y,p.setLayout(f,!0)}n[s[a]]+=c,n[l[a]]-=c}function Q$(e,t,n,r,i){var o=e.getLayout(),a=n[i],s=a&&a===e;if(!(a&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(o),isAboveViewRoot:s},!0);var l=new Xp(t.x-o.x,t.y-o.y,t.width,t.height);W$(e.viewChildren||[],function(e){Q$(e,l,n,r,i+1)})}}function J$(e){return e.get(U$)?e.get(X$):0}function eV(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),r=e.getGraph().data,i=n.mapArray(n.getName);r.filterSelf(function(e){var n=r.getItemModel(e).getShallow("category");if(null!=n){hh(n)&&(n=i[n]);for(var o=0;o<t.length;o++)if(!t[o].isSelected(n))return!1}return!0})})}function tV(e){var t={};e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),r=e.getData(),i={};n.each(function(r){var o=n.getName(r);i["ec-"+o]=r;var a=n.getItemModel(r),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(o,t)),n.setItemVisual(r,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&n.setItemVisual(r,l[u],c)}}),n.count()&&r.each(function(e){var t=r.getItemModel(e).getShallow("category");if(null!=t){ch(t)&&(t=i["ec-"+t]);var o=n.getItemVisual(t,"style");Zd(r.ensureUniqueItemVisual(e,"style"),o);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)r.setItemVisual(e,a[s],n.getItemVisual(t,a[s]))}})})}function nV(e){return e instanceof Array||(e=[e,e]),e}function rV(e){e.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),r=nV(e.get("edgeSymbol")),i=nV(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",r&&r[0]),n.setVisual("toSymbol",r&&r[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),o=nV(r.getShallow("symbol",!0)),a=nV(r.getShallow("symbolSize",!0)),s=r.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(e,"style");switch(Zd(l,s),l.stroke){case"source":var u=i.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=i.node2.getVisual("style");l.stroke=u&&u.fill}o[0]&&i.setVisual("fromSymbol",o[0]),o[1]&&i.setVisual("toSymbol",o[1]),a[0]&&i.setVisual("fromSymbolSize",a[0]),a[1]&&i.setVisual("toSymbolSize",a[1])})})}var iV="--\x3e",oV=function(e){return e.get("autoCurveness")||null},aV=function(e,t){var n=oV(e),r=20,i=[];if(hh(n))r=n;else if(lh(n))return void(e.__curvenessList=n);t>r&&(r=t);var o=r%2?r+2:r+3;i=[];for(var a=0;a<o;a++)i.push((a%2?a+1:a)/10*(a%2?-1:1));e.__curvenessList=i},sV=function(e,t,n){var r=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[n.uid,r,i].join(iV)},lV=function(e){var t=e.split(iV);return[t[0],t[2],t[1]].join(iV)},uV=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function cV(e,t,n,r){var i=oV(t),o=lh(i);if(!i)return null;var a=function(e,t){var n=sV(e.node1,e.node2,t);return t.__edgeMap[n]}(e,t);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=function(e,t){return uV(sV(e.node1,e.node2,t),t)+uV(sV(e.node2,e.node1,t),t)}(e,t);aV(t,u),e.lineStyle=e.lineStyle||{};var c=sV(e.node1,e.node2,t),d=t.__curvenessList,h=o||u%2?0:1;if(a.isForward)return d[h+s];var p=lV(c),f=uV(p,t),g=d[s+f+h];return r?o?i&&0===i[0]?(f+h)%2?g:-g:((f%2?0:1)+h)%2?g:-g:(f+h)%2?g:-g:d[s+f+h]}function dV(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])}),hV(n,e)}}function hV(e,t){e.eachEdge(function(e,n){var r=wh(e.getModel().get(["lineStyle","curveness"]),-cV(e,t,n,!0),0),i=$h(e.node1.getLayout()),o=$h(e.node2.getLayout()),a=[i,o];+r&&a.push([(i[0]+o[0])/2-(i[1]-o[1])*r,(i[1]+o[1])/2-(o[0]-i[0])*r]),e.setLayout(a)})}function pV(e,t){e.eachSeriesByType("graph",function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var r=e.getData(),i=[];th(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var o=0;o<r.count();o++){for(var a=[],s=!1,l=0;l<i.length;l++){var u=r.get(i[l],o);isNaN(u)||(s=!0),a.push(u)}s?r.setItemLayout(o,n.dataToPoint(a)):r.setItemLayout(o,[NaN,NaN])}hV(r.graph,e)}else t&&"none"!==t||dV(e)})}function fV(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,r=t.scaleX;return((t.getZoom()-1)*n+1)/r}function gV(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var mV=Math.PI,vV=[];function yV(e,t,n,r){var i=e.coordinateSystem;if(!i||"view"===i.type){var o=i.getBoundingRect(),a=e.getData(),s=a.graph,l=o.width/2+o.x,u=o.height/2+o.y,c=Math.min(o.width,o.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(n){var h=i.pointToData(r),p=h[0],f=h[1],g=[p-l,f-u];qh(g,g),Yh(g,g,c),n.setLayout([l+g[0],u+g[1]],!0),bV(n,e.get(["circular","rotateLabel"]),l,u)}xV[t](e,s,a,c,l,u,d),s.eachEdge(function(t,n){var r,i=wh(t.getModel().get(["lineStyle","curveness"]),cV(t,e,n),0),o=$h(t.node1.getLayout()),a=$h(t.node2.getLayout()),s=(o[0]+a[0])/2,c=(o[1]+a[1])/2;+i&&(r=[l*(i*=3)+s*(1-i),u*i+c*(1-i)]),t.setLayout([o,a,r])})}}}var xV={value:function(e,t,n,r,i,o,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);t.eachNode(function(e){var t=e.getValue("value"),n=u*(l?t:1)/2;s+=n,e.setLayout([r*Math.cos(s)+i,r*Math.sin(s)+o]),s+=n})},symbolSize:function(e,t,n,r,i,o,a){var s=0;vV.length=a;var l=fV(e);t.eachNode(function(e){var t=gV(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var n=Math.asin(t/2/r);isNaN(n)&&(n=mV/2),vV[e.dataIndex]=n,s+=2*n});var u=(2*mV-s)/a/2,c=0;t.eachNode(function(e){var t=u+vV[e.dataIndex];c+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(c)+i,r*Math.sin(c)+o]),c+=t})}};function bV(e,t,n,r){var i=e.getGraphicEl();if(i){var o=e.getModel().get(["label","rotate"])||0,a=i.getSymbolPath();if(t){var s=e.getLayout(),l=Math.atan2(s[1]-r,s[0]-n);l<0&&(l=2*Math.PI+l);var u=s[0]<n;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");Zd(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:o*=Math.PI/180})}}function wV(e){e.eachSeriesByType("graph",function(e){"circular"===e.get("layout")&&yV(e,"symbolSize")})}var SV=Hh;function _V(e){e.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var n=e.preservedPoints||{},r=e.getGraph(),i=r.data,o=r.edgeData,a=e.getModel("force"),s=a.get("initLayout");e.preservedPoints?i.each(function(e){var t=i.getId(e);i.setItemLayout(e,n[t]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&yV(e,"value"):dV(e);var l=i.getDataExtent("value"),u=o.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),h=lh(c)?c:[c,c],p=lh(d)?d:[d,d];p=[p[1],p[0]];var f=i.mapArray("value",function(e,t){var n=i.getItemLayout(t),r=rv(e,l,h);return isNaN(r)&&(r=(h[0]+h[1])/2),{w:r,rep:r,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=o.mapArray("value",function(t,n){var i=r.getEdgeByIndex(n),o=rv(t,u,p);isNaN(o)&&(o=(p[0]+p[1])/2);var a=i.getModel(),s=wh(i.getModel().get(["lineStyle","curveness"]),-cV(i,e,n,!0),0);return{n1:f[i.node1.dataIndex],n2:f[i.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}}),m=t.getBoundingRect(),v=function(e,t,n){for(var r=e,i=t,o=n.rect,a=o.width,s=o.height,l=[o.x+a/2,o.y+s/2],u=null==n.gravity?.1:n.gravity,c=0;c<r.length;c++){var d=r[c];d.p||(d.p=Bh(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=$h(d.p),d.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){h=e},afterStep:function(e){p=e},step:function(e){h&&h(r,i);for(var t=[],n=r.length,o=0;o<i.length;o++){var a=i[o];if(!a.ignoreForceLayout){var s=a.n1;Gh(t,(m=a.n2).p,s.p);var c=Uh(t)-a.d,d=m.w/(s.w+m.w);isNaN(d)&&(d=0),qh(t,t),!s.fixed&&SV(s.p,s.p,t,d*c*g),!m.fixed&&SV(m.p,m.p,t,-(1-d)*c*g)}}for(o=0;o<n;o++)(x=r[o]).fixed||(Gh(t,l,x.p),SV(x.p,x.p,t,u*g));for(o=0;o<n;o++){s=r[o];for(var f=o+1;f<n;f++){var m;Gh(t,(m=r[f]).p,s.p),0===(c=Uh(t))&&(Vh(t,Math.random()-.5,Math.random()-.5),c=1);var v=(s.rep+m.rep)/c/c;!s.fixed&&SV(s.pp,s.pp,t,v),!m.fixed&&SV(m.pp,m.pp,t,-v)}}var y=[];for(o=0;o<n;o++){var x;(x=r[o]).fixed||(Gh(y,x.p,x.pp),SV(x.p,x.p,y,g),Fh(x.pp,x.p))}var b=(g*=.992)<.01;p&&p(r,i,b),e&&e(b)}}}(f,g,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});v.beforeStep(function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].fixed&&Fh(e[n].p,r.getNodeByIndex(n).getLayout())}),v.afterStep(function(e,t,o){for(var a=0,s=e.length;a<s;a++)e[a].fixed||r.getNodeByIndex(a).setLayout(e[a].p),n[i.getId(a)]=e[a].p;for(a=0,s=t.length;a<s;a++){var l=t[a],u=r.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],Fh(h[0],c),Fh(h[1],d),+l.curveness&&(h[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(h)}}),e.forceLayout=v,e.preservedPoints=n,v.step()}else e.forceLayout=null})}function AV(e,t){var n=[];return e.eachSeriesByType("graph",function(e){var r=e.get("coordinateSystem");if(!r||"view"===r){var i=e.getData(),o=[],a=[];Vy(i.mapArray(function(e){var t=i.getItemModel(e);return[+t.get("x"),+t.get("y")]}),o,a),a[0]-o[0]===0&&(a[0]+=1,o[0]-=1),a[1]-o[1]===0&&(a[1]+=1,o[1]-=1);var s=(a[0]-o[0])/(a[1]-o[1]),l=function(e,t,n){return ZS(Zd(e.getBoxLayoutParams(),{aspect:n}),{width:t.getWidth(),height:t.getHeight()})}(e,t,s);isNaN(s)&&(o=[l.x,l.y],a=[l.x+l.width,l.y+l.height]);var u=a[0]-o[0],c=a[1]-o[1],d=l.width,h=l.height,p=e.coordinateSystem=new JB;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(o[0],o[1],u,c),p.setViewRect(l.x,l.y,d,h),p.setCenter(e.get("center"),t),p.setZoom(e.get("zoom")),n.push(p)}}),n}var kV=lM.prototype,CV=pM.prototype,MV=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}kd(t,e)}(MV);function IV(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}const TV=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new MV},t.prototype.buildPath=function(e,t){IV(t)?kV.buildPath.call(this,e,t):CV.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return IV(this.shape)?kV.pointAt.call(this,e):CV.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=IV(t)?[t.x2-t.x1,t.y2-t.y1]:CV.tangentAt.call(this,e);return qh(n,n)},t}(Nx);var DV=["fromSymbol","toSymbol"];function jV(e){return"_"+e+"Type"}function PV(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=_T(i);return r+l+AT(a||0,l)+(o||"")+(s||"")}function LV(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=_T(i),u=AT(a||0,l),c=ST(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=e,c}}function RV(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var EV=function(e){function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return kd(t,e),t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=function(e){var t=new TV({name:"line",subPixelOptimize:!0});return RV(t.shape,e),t}(e.getItemLayout(t));i.shape.percent=0,mw(i,{shape:{percent:1}},r,t),this.add(i),th(DV,function(n){var r=LV(n,e,t);this.add(r),this[jV(n)]=PV(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=e.getItemLayout(t),a={shape:{}};RV(a.shape,o),gw(i,a,r,t),th(DV,function(n){var r=PV(n,e,t),i=jV(n);if(this[i]!==r){this.remove(this.childOfName(n));var o=LV(n,e,t);this.add(o)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var h=e.getItemModel(t),p=h.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),a=h.getModel(["blur","lineStyle"]).getLineStyle(),s=h.getModel(["select","lineStyle"]).getLineStyle(),u=p.get("disabled"),c=p.get("focus"),d=p.get("blurScope"),l=Cw(h)}var f=e.getItemVisual(t,"style"),g=f.stroke;i.useStyle(f),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,i.ensureState("blur").style=a,i.ensureState("select").style=s,th(DV,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<bb.length;n++){var r=bb[n],o=i.getState(r);if(o){var a=o.style||{},s=t.ensureState(r),l=s.style||(s.style={});null!=a.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}t.markRedraw()}},this);var m=r.getRawValue(t);kw(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?ov(m):m)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var x=y.get("distance");lh(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),rw(this,c,d,u)},t.prototype.highlight=function(){Wb(this)},t.prototype.downplay=function(){Hb(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");RV(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),r=e.getTextContent();if(t||n||r&&!r.ignore){for(var i=1,o=this.parent;o;)o.scaleX&&(i/=o.scaleX),o=o.parent;var a=e.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=Gh([],u,l);if(qh(c,c),t&&(t.setPosition(l),_(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(u),_(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var d=void 0,h=void 0,p=r.__labelDistance,f=p[0]*i,g=p[1]*i,m=s/2,v=a.tangentAt(m),y=[v[1],-v[0]],x=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var b=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var w=-Math.atan2(v[1],v[0]);u[0]<l[0]&&(w=Math.PI+w),r.rotation=w}var S=void 0;switch(r.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-g,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=g,h="top";break;default:S=0,h="middle"}switch(r.__position){case"end":r.x=c[0]*f+u[0],r.y=c[1]*g+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*b+l[0],r.y=l[1]+S,d=v[0]<0?"right":"left",r.originX=-f*b,r.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=x[0],r.y=x[1]+S,d="center",r.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*b+u[0],r.y=u[1]+S,d=v[0]>=0?"right":"left",r.originX=f*b,r.originY=-S}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||h,align:r.__align||d})}}}function _(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(Zm);const NV=EV;function OV(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:Cw(t)}}function zV(e){return isNaN(e[0])||isNaN(e[1])}function BV(e){return e&&!zV(e[0])&&!zV(e[1])}const FV=function(){function e(e){this.group=new Zm,this._LineCtor=e||NV}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var o=OV(e);e.diff(i).add(function(n){t._doAdd(e,n,o)}).update(function(n,r){t._doUpdate(i,e,r,n,o)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=OV(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r<e.end;r++){if(BV(t.getItemLayout(r))){var i=new this._LineCtor(t,r,this._seriesScope);i.traverse(n),this.group.add(i),t.setItemGraphicEl(r,i),this._progressiveEls.push(i)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){iI(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(BV(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var o=e.getItemGraphicEl(n);BV(t.getItemLayout(r))?(o?o.updateData(t,r,i):o=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,o),this.group.add(o)):this.group.remove(o)},e}();var $V=[],VV=[],WV=[],HV=zf,GV=Qh,UV=Math.abs;function XV(e,t,n){for(var r,i=e[0],o=e[1],a=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){$V[0]=HV(i[0],o[0],a[0],c),$V[1]=HV(i[1],o[1],a[1],c),(p=UV(GV($V,t)-l))<s&&(s=p,r=c)}for(var d=0;d<32;d++){var h=r+u;VV[0]=HV(i[0],o[0],a[0],r),VV[1]=HV(i[1],o[1],a[1],r),WV[0]=HV(i[0],o[0],a[0],h),WV[1]=HV(i[1],o[1],a[1],h);var p=GV(VV,t)-l;if(UV(p)<.01)break;var f=GV(WV,t)-l;u/=2,p<0?f>=0?r+=u:r-=u:f>=0?r-=u:r+=u}return r}function YV(e,t){var n=[],r=$f,i=[[],[],[]],o=[[],[]],a=[];t/=2,e.eachEdge(function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[$h(l[0]),$h(l[1])],l[2]&&l.__original.push($h(l[2])));var d=l.__original;if(null!=l[2]){if(Fh(i[0],d[0]),Fh(i[1],d[2]),Fh(i[2],d[1]),u&&"none"!==u){var h=gV(e.node1),p=XV(i,d[0],h*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(c&&"none"!==c){h=gV(e.node2),p=XV(i,d[1],h*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}Fh(l[0],i[0]),Fh(l[1],i[2]),Fh(l[2],i[1])}else{if(Fh(o[0],d[0]),Fh(o[1],d[1]),Gh(a,o[1],o[0]),qh(a,a),u&&"none"!==u){h=gV(e.node1);Hh(o[0],o[0],a,h*t)}if(c&&"none"!==c){h=gV(e.node2);Hh(o[1],o[1],a,-h*t)}Fh(l[0],o[0]),Fh(l[1],o[1])}})}function qV(e){return"view"===e.type}var ZV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(e,t){var n=new rR,r=new FV,i=this.group;this._controller=new Iz(t.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem;this._model=e;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(qV(i)){var l={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?s.attr(l):gw(s,l,e)}YV(e.getGraph(),fV(e));var u=e.getData();o.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,h=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=e.get("layout");u.graph.eachNode(function(t){var n=t.dataIndex,i=t.getGraphicEl(),o=t.getModel();if(i){i.off("drag").off("dragend");var a=o.get("draggable");a&&i.on("drag",function(o){switch(p){case"force":d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[i.x,i.y]);break;case"circular":u.setItemLayout(n,[i.x,i.y]),t.setLayout({fixed:!0},!0),yV(e,"symbolSize",t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(n,[i.x,i.y]),hV(e.getGraph(),e),r.updateLayout(e)}}).on("dragend",function(){d&&d.setUnfixed(n)}),i.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(fb(i).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(fb(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=u.getLayout("cx"),m=u.getLayout("cy");u.graph.eachNode(function(e){bV(e,f,g,m)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;!function r(){e.step(function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(r,16):r())})}()},t.prototype._updateController=function(e,t,n){var r=this,i=this._controller,o=this._controllerHost,a=this.group;i.setPointerChecker(function(t,r,i){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,i)&&!Lz(t,n,e)}),qV(e.coordinateSystem)?(i.enable(e.get("roam")),o.zoomLimit=e.get("scaleLimit"),o.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",function(t){Tz(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Dz(o,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(),YV(e.getGraph(),fV(e)),r._lineDraw.updateLayout(),n.updateLabelLayout()})):i.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=fV(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){YV(e.getGraph(),fV(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(pI);const KV=ZV;function QV(e){return"_EC_"+e}var JV=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[QV(e)]){var r=new eW(e,t);return r.hostGraph=this,this.nodes.push(r),n[QV(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[QV(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(hh(e)&&(e=this.nodes[e]),hh(t)&&(t=this.nodes[t]),e instanceof eW||(e=r[QV(e)]),t instanceof eW||(t=r[QV(t)]),e&&t){var o=e.id+"-"+t.id,a=new tW(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),i[o]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof eW&&(e=e.id),t instanceof eW&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof eW||(t=this._nodesMap[QV(t)]),t){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(r,t,null))for(var a=[t];a.length;){var s=a.shift(),l=s[i];for(o=0;o<l.length;o++){var u=l[o],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(r,c,s))return;a.push(c),c.__visited=!0}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(i=0,o=r.length;i<o;i++)r[i].dataIndex=-1;for(i=0,o=t.count();i<o;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(i=0;i<r.length;i++){var o=r[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},e}(),eW=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=Ph(),t=Ph(),n=0;n<this.edges.length;n++){var r=this.edges[n];if(!(r.dataIndex<0)){e.set(r.dataIndex,!0);for(var i=[r.node1],o=[r.node2],a=0;a<i.length;){var s=i[a];a++,t.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)e.set(s.inEdges[l].dataIndex,!0),i.push(s.inEdges[l].node1)}for(a=0;a<o.length;){var u=o[a];a++,t.set(u.dataIndex,!0);for(l=0;l<u.outEdges.length;l++)e.set(u.outEdges[l].dataIndex,!0),o.push(u.outEdges[l].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),tW=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=Ph(),t=Ph();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var o=n[i];i++,t.set(o.dataIndex,!0);for(var a=0;a<o.inEdges.length;a++)e.set(o.inEdges[a].dataIndex,!0),n.push(o.inEdges[a].node1)}for(i=0;i<r.length;){var s=r[i];i++,t.set(s.dataIndex,!0);for(a=0;a<s.outEdges.length;a++)e.set(s.outEdges[a].dataIndex,!0),r.push(s.outEdges[a].node2)}return{edge:e.keys(),node:t.keys()}},e}();function nW(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Jd(eW,nW("hostGraph","data")),Jd(tW,nW("hostGraph","edgeData"));const rW=JV;function iW(e,t,n,r,i){for(var o=new rW(r),a=0;a<e.length;a++)o.addNode(xh(e[a].id,e[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<t.length;a++){var c=t[a],d=c.source,h=c.target;o.addEdge(d,h,u)&&(l.push(c),s.push(xh(Nv(c.id,null),d+" > "+h)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=YL(e,n);else{var g=G_.get(f),m=g&&g.dimensions||[];Qd(m,"value")<0&&m.concat(["value"]);var v=FL(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(p=new BL(v,n)).initData(e)}var y=new BL(["value"],n);return y.initData(l,s),i&&i(p,y),$F({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var oW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new zE(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Tv(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n,r=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&r){oV(n=this)&&(n.__curvenessList=[],n.__edgeMap={},aV(n));var a=iW(i,r,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e){var t=o._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=Yw.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=i,r}function i(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",function(e){return e.resolveParentPath=i,e.getModel=r,e})});return th(a.edges,function(e){!function(e,t,n,r){if(oV(n)){var i=sV(e,t,n),o=n.__edgeMap,a=o[lV(i)];o[i]&&!a?o[i].isForward=!0:a&&o[i]&&(a.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(r)}}(e.node1,e.node2,this,e.dataIndex)},this),a.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var r=this.getData(),i=this.getDataParams(e,n),o=r.graph.getEdgeByIndex(e),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Lk("nameValue",{name:l.join(" > "),value:i.value,noValue:null==i.value})}return Gk({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=nh(this.option.categories||[],function(e){return null!=e.value?e:Zd({value:0},e)}),t=new BL(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(rC);const aW=oW;var sW={type:"graphRoam",event:"graphRoam",update:"none"};var lW=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},uW=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new lW},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=i/3?1:2),l=t.y-r(a)*o*(o>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+r(a)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(a)*o,t.y-r(a)*o),e.lineTo(s,l)},t}(Nx);const cW=uW;function dW(e,t){var n=null==e?"":e+"";return t&&(ch(t)?n=t.replace("{value}",n):uh(t)&&(n=t(e))),n}var hW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),i=function(e,t){var n=e.get("center"),r=t.getWidth(),i=t.getHeight(),o=Math.min(r,i);return{cx:iv(n[0],t.getWidth()),cy:iv(n[1],t.getHeight()),r:iv(e.get("radius"),o/2)}}(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?JR:YC,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];hx(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=[],y=0;d&&y<r.length;y++){var x=new c({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(r[y][0],0),1),cx:i.cx,cy:i.cy,clockwise:a,r0:i.r-p,r:i.r},silent:!0});x.setStyle({fill:r[y][1]}),x.setStyle(h.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),th(v,function(e){return o.add(e)});var b=function(e){if(e<=0)return r[0][1];var t;for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,b,i,s,l,a,p),this._renderTitleAndDetail(e,t,n,b,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,b,i,s,l,a,p)},t.prototype._renderTicks=function(e,t,n,r,i,o,a,s,l){for(var u,c,d=this.group,h=i.cx,p=i.cy,f=i.r,g=+e.get("min"),m=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),x=e.getModel("axisLabel"),b=e.get("splitNumber"),w=y.get("splitNumber"),S=iv(v.get("length"),f),_=iv(y.get("length"),f),A=o,k=(a-o)/b,C=k/w,M=v.getModel("lineStyle").getLineStyle(),I=y.getModel("lineStyle").getLineStyle(),T=v.get("distance"),D=0;D<=b;D++){if(u=Math.cos(A),c=Math.sin(A),v.get("show")){var j=new lM({shape:{x1:u*(f-(P=T?T+l:l))+h,y1:c*(f-P)+p,x2:u*(f-S-P)+h,y2:c*(f-S-P)+p},style:M,silent:!0});"auto"===M.stroke&&j.setStyle({stroke:r(D/b)}),d.add(j)}if(x.get("show")){var P=x.get("distance")+T,L=dW(ov(D/b*(m-g)+g),x.get("formatter")),R=r(D/b),E=u*(f-S-P)+h,N=c*(f-S-P)+p,O=x.get("rotate"),z=0;"radial"===O?(z=-A+2*Math.PI)>Math.PI/2&&(z+=Math.PI):"tangential"===O?z=-A-Math.PI/2:hh(O)&&(z=O*Math.PI/180),0===z?d.add(new pb({style:Mw(x,{text:L,x:E,y:N,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):d.add(new pb({style:Mw(x,{text:L,x:E,y:N,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:E,originY:N,rotation:z}))}if(y.get("show")&&D!==b){P=(P=y.get("distance"))?P+l:l;for(var B=0;B<=w;B++){u=Math.cos(A),c=Math.sin(A);var F=new lM({shape:{x1:u*(f-P)+h,y1:c*(f-P)+p,x2:u*(f-_-P)+h,y2:c*(f-_-P)+p},silent:!0,style:I});"auto"===I.stroke&&F.setStyle({stroke:r((D+B/w)/b)}),d.add(F),A+=C}A-=C}else A+=k}},t.prototype._renderPointer=function(e,t,n,r,i,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),m=e.getData(),v=m.mapDimension("value"),y=+e.get("min"),x=+e.get("max"),b=[y,x],w=[o,a];function S(t,n){var r,o=m.getItemModel(t).getModel("pointer"),a=iv(o.get("width"),i.r),s=iv(o.get("length"),i.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=iv(u[0],i.r),d=iv(u[1],i.r),h=o.get("keepAspect");return(r=l?ST(l,c-a/2,d-s,a,s,null,h):new cW({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function _(e,t){var n=f.get("roundCap")?JR:YC,r=f.get("overlap"),a=r?f.get("width"):l/m.count(),u=r?i.r-a:i.r-(e+1)*a,c=r?i.r:i.r-e*a,d=new n({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=rv(m.get(v,e),[y,x],[100,0],!0)),d}(g||p)&&(m.diff(c).add(function(t){var n=m.get(v,t);if(p){var r=S(t,o);mw(r,{rotation:-((isNaN(+n)?w[0]:rv(n,b,w,!0))+Math.PI/2)},e),u.add(r),m.setItemGraphicEl(t,r)}if(g){var i=_(t,o),a=f.get("clip");mw(i,{shape:{endAngle:rv(n,b,w,a)}},e),u.add(i),gb(e.seriesIndex,m.dataType,t,i),h[t]=i}}).update(function(t,n){var r=m.get(v,t);if(p){var i=c.getItemGraphicEl(n),a=i?i.rotation:o,s=S(t,a);s.rotation=a,gw(s,{rotation:-((isNaN(+r)?w[0]:rv(r,b,w,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(g){var l=d[n],y=_(t,l?l.shape.endAngle:o),x=f.get("clip");gw(y,{shape:{endAngle:rv(r,b,w,x)}},e),u.add(y),gb(e.seriesIndex,m.dataType,t,y),h[t]=y}}).execute(),m.each(function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof Wx){var c=s.style;s.useStyle(Zd({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(rv(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,sw(s,t),rw(s,i,o,a)}if(g){var d=h[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,sw(d,t),rw(d,i,o,a)}}),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=ST(i,t.cx-r/2+iv(o[0],t.r),t.cy-r/2+iv(o[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new Zm,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new pb({silent:!0}),h[e]=new pb({silent:!0})}).update(function(e,t){d[e]=o._titleEls[t],h[e]=o._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new Zm,m=r(rv(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=i.cx+iv(y[0],i.r),b=i.cy+iv(y[1],i.r);(I=d[t]).attr({z2:f?0:2,style:Mw(v,{x:x,y:b,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(I)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),_=i.cx+iv(S[0],i.r),A=i.cy+iv(S[1],i.r),k=iv(w.get("width"),i.r),C=iv(w.get("height"),i.r),M=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,I=h[t],T=w.get("formatter");I.attr({z2:f?0:2,style:Mw(w,{x:_,y:A,text:dW(o,T),width:isNaN(k)?null:k,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:M})}),Ew(I,{normal:w},o,function(e){return dW(e,T)}),p&&Nw(I,t,a,e,{getFormattedLabel:function(e,t,n,r,i,a){return dW(a?a.interpolatedValue:o,T)}}),g.add(I)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(pI);const pW=hW;const fW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return kd(t,e),t.prototype.getInitialData=function(e,t){return NE(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(rC);var gW=["itemStyle","opacity"],mW=function(e){function t(t,n){var r=e.call(this)||this,i=r,o=new iM,a=new pb;return i.setTextContent(a),r.setTextGuideLine(o),r.updateData(t,n,!0),r}return kd(t,e),t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,o=e.getItemModel(t),a=e.getItemLayout(t),s=o.getModel("emphasis"),l=o.get(gW);l=null==l?1:l,n||ww(r),r.useStyle(e.getItemVisual(t,"style")),r.style.lineJoin="round",n?(r.setShape({points:a.points}),r.style.opacity=0,mw(r,{style:{opacity:l}},i,t)):gw(r,{style:{opacity:l},shape:{points:a.points}},i,t),sw(r,o),this._updateLabel(e,t),rw(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),o=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"style"),u=l.fill;kw(i,Cw(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:l.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;r.setShape({points:c}),n.textGuideLineConfig={anchor:c?new zp(c[0][0],c[0][1]):null},gw(i,{style:{x:s.x,y:s.y}},o,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Dj(n,jj(a),{stroke:u})},t}(tM);const vW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,o=this.group;r.diff(i).add(function(e){var t=new mW(r,e);r.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),o.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){bw(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(pI);var yW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zE(ah(this.getData,this),ah(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return NE(this,{coordDimensions:["value"],encodeDefaulter:sh(S_,this)})},t.prototype._defaultLabelLine=function(e){Tv(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return r.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(rC);const xW=yW;function bW(e,t){e.eachSeriesByType("funnel",function(e){var n=e.getData(),r=n.mapDimension("value"),i=e.get("sort"),o=function(e,t){return ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),s=o.width,l=o.height,u=function(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,function(e){return e}),i=[],o="ascending"===t,a=0,s=e.count();a<s;a++)i[a]=a;return uh(t)?i.sort(t):"none"!==t&&i.sort(function(e,t){return o?r[e]-r[t]:r[t]-r[e]}),i}(n,i),c=o.x,d=o.y,h="horizontal"===a?[iv(e.get("minSize"),l),iv(e.get("maxSize"),l)]:[iv(e.get("minSize"),s),iv(e.get("maxSize"),s)],p=n.getDataExtent(r),f=e.get("min"),g=e.get("max");null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var m=e.get("funnelAlign"),v=e.get("gap"),y=(("horizontal"===a?s:l)-v*(n.count()-1))/n.count(),x=function(e,t){if("horizontal"===a){var i=rv(n.get(r,e)||0,[f,g],h,!0),o=void 0;switch(m){case"top":o=d;break;case"center":o=d+(l-i)/2;break;case"bottom":o=d+(l-i)}return[[t,o],[t,o+i]]}var u,p=rv(n.get(r,e)||0,[f,g],h,!0);switch(m){case"left":u=c;break;case"center":u=c+(s-p)/2;break;case"right":u=c+s-p}return[[u,t],[u+p,t]]};"ascending"===i&&(y=-y,v=-v,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var b=0;b<u.length;b++){var w=u[b],S=u[b+1],_=n.getItemModel(w);if("horizontal"===a){var A=_.get(["itemStyle","width"]);null==A?A=y:(A=iv(A,s),"ascending"===i&&(A=-A));var k=x(w,c),C=x(S,c+A);c+=A+v,n.setItemLayout(w,{points:k.concat(C.slice().reverse())})}else{var M=_.get(["itemStyle","height"]);null==M?M=y:(M=iv(M,l),"ascending"===i&&(M=-M));k=x(w,d),C=x(S,d+M);d+=M+v,n.setItemLayout(w,{points:k.concat(C.slice().reverse())})}}!function(e){var t=e.hostModel.get("orient");e.each(function(n){var r,i,o,a,s=e.getItemModel(n),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=e.getItemLayout(n),d=c.points,h="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(h)"insideLeft"===l?(i=(d[0][0]+d[3][0])/2+5,o=(d[0][1]+d[3][1])/2,r="left"):"insideRight"===l?(i=(d[1][0]+d[2][0])/2-5,o=(d[1][1]+d[2][1])/2,r="right"):(i=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,o=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,r="center"),a=[[i,o],[i,o]];else{var p=void 0,f=void 0,g=void 0,m=void 0,v=u.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,i=(g=p-v)-5,r="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,i=(g=p+v)+5,r="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,o=(m=(f=(d[3][1]+d[0][1])/2)-v)-5,r="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,o=(m=(f=(d[1][1]+d[2][1])/2)+v)+5,r="center"):"rightTop"===l?(p="horizontal"===t?d[3][0]:d[1][0],f="horizontal"===t?d[3][1]:d[1][1],"horizontal"===t?(o=(m=f-v)-5,r="center"):(i=(g=p+v)+5,r="top")):"rightBottom"===l?(p=d[2][0],f=d[2][1],"horizontal"===t?(o=(m=f+v)+5,r="center"):(i=(g=p+v)+5,r="bottom")):"leftTop"===l?(p=d[0][0],f="horizontal"===t?d[0][1]:d[1][1],"horizontal"===t?(o=(m=f-v)-5,r="center"):(i=(g=p-v)-5,r="right")):"leftBottom"===l?(p="horizontal"===t?d[1][0]:d[3][0],f="horizontal"===t?d[1][1]:d[2][1],"horizontal"===t?(o=(m=f+v)+5,r="center"):(i=(g=p-v)-5,r="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===t?(o=(m=f+v)+5,r="center"):(i=(g=p+v)+5,r="left")),"horizontal"===t?i=g=p:o=m=f,a=[[p,f],[g,m]]}c.label={linePoints:a,x:i,y:o,verticalAlign:"middle",textAlign:r,inside:h}})}(n)})}function wW(e,t,n,r){for(var i=[],o=0;o<n.length;o++){var a=n[o],s=e.get(e.mapDimension(a),t);kW(s,r.getAxis(a).type)||i.push(r.dataToPoint(s,a))}return i}function SW(e,t,n,r,i){var o=wW(e,n,r,i),a=new iM({shape:{points:o},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function _W(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),yh(t=bv(t))&&(t=0),{smooth:t}}function AW(e,t,n,r){e.useStyle(t.getItemVisual(n,"style")),e.style.fill=null,e.setShape("smooth",r.smooth);var i=t.getItemModel(n),o=i.getModel("emphasis");sw(e,i,"lineStyle"),rw(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function kW(e,t){return"category"===t?null==e:null==e||isNaN(e)}const CW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new Zm,n._initialized=!1,n}return kd(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._dataGroup,o=e.getData(),a=this._data,s=e.coordinateSystem,l=s.dimensions,u=_W(e);if(o.diff(a).add(function(e){AW(SW(o,i,e,l,s),o,e,u)}).update(function(t,n){var r=a.getItemGraphicEl(n),i=wW(o,t,l,s);o.setItemGraphicEl(t,r),gw(r,{shape:{points:i}},e,t),ww(r),AW(r,o,t,u)}).remove(function(e){var t=a.getItemGraphicEl(e);i.remove(t)}).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var r=e.model,i=e.getRect(),o=new Kx({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),a="horizontal"===r.get("layout")?"width":"height";return o.setShape(a,0),mw(o,{shape:{width:i.width,height:i.height}},t,n),o}(s,e,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(c)}this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var r=t.getData(),i=t.coordinateSystem,o=i.dimensions,a=_W(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var u=SW(r,this._dataGroup,l,o,i);u.incremental=!0,AW(u,r,l,a),s.push(u)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(pI);function MW(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return th(t.dimensions,function(e){var t=+e.replace("dim","");n[e]=t}),n}}const IW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return kd(t,e),t.prototype.getInitialData=function(e,t){return YL(null,this,{useEncodeDefaulter:ah(MW,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),r=[];return t.eachActiveState(n,function(t,i){e===t&&r.push(n.getRawIndex(i))}),r},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(rC);var TW=["lineStyle","opacity"];const DW={seriesType:"parallel",reset:function(e,t){var n=e.coordinateSystem,r={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){n.eachActiveState(t,function(e,n){var i=r[e];if("normal"===e&&t.hasItemOption){var o=t.getItemModel(n).get(TW,!0);null!=o&&(i=o)}t.ensureUniqueItemVisual(n,"style").opacity=i},e.start,e.end)}}}};function jW(e){!function(e){if(e.parallel)return;var t=!1;th(e.series,function(e){e&&"parallel"===e.type&&(t=!0)}),t&&(e.parallel=[{}])}(e),function(e){var t=Iv(e.parallelAxis);th(t,function(t){if(ph(t)){var n=t.parallelIndex||0,r=Iv(e.parallel)[n];r&&r.parallelAxisDefault&&Yd(t,r.parallelAxisDefault,!1)}})}(e)}var PW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},th(LW,function(e,t){n.getZr().on(t,this._handlers[t]=ah(e,this))},this)),yI(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){xI(this,"_throttledDispatchExpand"),th(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(Zd({type:"parallelAxisExpand"},e))},t.type="parallel",t}(oC),LW={mousedown:function(e){RW(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(RW(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&RW(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function RW(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}const EW=PW;const NW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Yd(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){th(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];th(ih(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(e){return(e.get("parallelIndex")||0)===this.componentIndex},this),function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(i_);const OW=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.type=i||"value",a.axisIndex=o,a}return kd(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(vO);function zW(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=FW(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=FW(s,[0,a]),i=o=FW(s,[i,o]),r=0}t[0]=FW(t[0],n),t[1]=FW(t[1],n);var l=BW(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]=FW(t[r],d),u=BW(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=BW(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function BW(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 FW(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var $W=th,VW=Math.min,WW=Math.max,HW=Math.floor,GW=Math.ceil,UW=ov,XW=Math.PI,YW=function(){function e(e,t,n){this.type="parallel",this._axesMap=Ph(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;$W(r,function(e,n){var r=i[n],o=t.getComponent("parallelAxis",r),a=this._axesMap.set(e,new OW(e,XN(o),[0,0],o.get("type"),r)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this},this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],a=e[i];return o>=n&&o<=n+t.axisLength&&a>=r&&a<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var r=n.getData();$W(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),UN(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){this._rect=ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,r=["x","y"],i=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,s=n[i[a]],l=[0,s],u=this.dimensions.length,c=qW(t.get("axisExpandWidth"),l),d=qW(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=t.get("axisExpandWindow");p?(e=qW(p[1]-p[0],l),p[1]=p[0]+e):(e=qW(c*(d-1),l),(p=[c*(t.get("axisExpandCenter")||HW(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-d);f<3&&(f=0);var g=[HW(UW(p[0]/c,1))+1,GW(UW(p[1]/c,1))-1],m=f/c*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[i[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])}),$W(n,function(t,n){var o=(r.axisExpandable?KW:ZW)(n,r),a={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},s={horizontal:XW/2,vertical:0},l=[a[i].x+e.x,a[i].y+e.y],u=s[i],c=[1,0,0,1,0,0];Ep(c,c,u),Rp(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){null==n&&(n=0),null==r&&(r=e.count());var i=this._axesMap,o=this.dimensions,a=[],s=[];th(o,function(t){a.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<r;u++){var c=void 0;if(l){c="active";for(var d=e.getValues(a,u),h=0,p=o.length;h<p;h++){if("inactive"===s[h].getActiveState(d[h])){c="inactive";break}}}else c="normal";t(c,u)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,r=0,i=e.length;r<i;r++)"normal"!==t.get(e[r]).model.getActiveState()&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){return UM([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return Xd(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,r=t.axisExpandWindow.slice(),i=r[1]-r[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var a,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<i*c[0]?(l="jump",a=s-i*c[2]):d&&u&&s>i*(1-c[0])?(l="jump",a=s-i*(1-c[2])):(a=s-i*c[1])>=0&&(a=s-i*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/u)?zW(a,r,o,"all"):l="none";else{var h=r[1]-r[0];(r=[WW(0,o[1]*s/h-h/2)])[1]=VW(o[1],r[0]+h),r[0]=r[1]-h}return{axisExpandWindow:r,behavior:l}},e}();function qW(e,t){return VW(WW(e,t[0]),t[1])}function ZW(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function KW(e,t){var n,r,i=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,r=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*o-t.axisExpandWindow[0],u=o,c=!0):(n=i-(a-1-e)*s,r=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:r}}const QW=YW;const JW={create:function(e,t){var n=[];return e.eachComponent("parallel",function(r,i){var o=new QW(r,e,t);o.name="parallel_"+i,o.resize(r,t),r.coordinateSystem=o,o.model=r,n.push(o)}),e.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",Hv).models[0];e.coordinateSystem=t.coordinateSystem}}),n}};var eH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return kd(t,e),t.prototype.getAreaSelectStyle=function(){return oy([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=Xd(e);if(t)for(var n=t.length-1;n>=0;n--)av(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var r=0,i=t.length;r<i;r++)if(t[r][0]<=e&&e<=t[r][1])return"active";return"inactive"},t}(i_);Jd(eH,XE);const tH=eH;var nH=!0,rH=Math.min,iH=Math.max,oH=Math.pow,aH="globalPan",sH={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},lH={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},uH={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},cH=0,dH=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Zm,n._uid="brushController_"+cH++,th(zH,function(e,t){this._handlers[t]=ah(e,this)},n),n}return kd(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){Az(e)[t]=n}(t,aH,this._uid),th(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=Yd(Xd(uH),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=Az(e);r[t]===n&&(r[t]=null)}(e,aH,this._uid),th(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={};th(e,function(e){t[e.panelId]=Xd(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=nh(e,function(e){return Yd(Xd(uH),e,!0)});var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new fL(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]):pH(r,hH(r,s));mH(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),bH(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(op);function hH(e,t){var n=FH[t.brushType].createCover(e,t);return n.__brushOption=t,gH(n,t),e.group.add(n),n}function pH(e,t){var n=vH(t);return n.endCreating&&(n.endCreating(e,t),gH(t,t.__brushOption)),t}function fH(e,t){var n=t.__brushOption;vH(t).updateCoverShape(e,t,n.range,n)}function gH(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function mH(e,t){vH(t).updateCommon(e,t),fH(e,t)}function vH(e){return FH[e.__brushOption.brushType]}function yH(e,t,n){var r,i=e._panels;if(!i)return nH;var o=e._transform;return th(i,function(e){e.isTargetByCursor(t,n,o)&&(r=e)}),r}function xH(e,t){var n=e._panels;if(!n)return nH;var r=t.__brushOption.panelId;return null!=r?n[r]:nH}function bH(e){var t=e._covers,n=t.length;return th(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function wH(e,t){var n=nh(e._covers,function(e){var t=e.__brushOption,n=Xd(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function SH(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function _H(e,t,n,r){var i=new Zm;return i.add(new Kx({name:"main",style:MH(n),silent:!0,draggable:!0,cursor:"move",drift:sh(DH,e,t,i,["n","s","w","e"]),ondragend:sh(wH,t,{isEnd:!0})})),th(r,function(n){i.add(new Kx({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:sh(DH,e,t,i,n),ondragend:sh(wH,t,{isEnd:!0})}))}),i}function AH(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=iH(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],h=c-o+i/2,p=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;CH(e,t,"main",a,s,f,g),r.transformable&&(CH(e,t,"w",l,u,o,v),CH(e,t,"e",h,u,o,v),CH(e,t,"n",l,u,m,o),CH(e,t,"s",l,p,m,o),CH(e,t,"nw",l,u,o,o),CH(e,t,"ne",h,u,o,o),CH(e,t,"sw",l,p,o,o),CH(e,t,"se",h,p,o,o))}function kH(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(MH(n)),i.attr({silent:!r,cursor:r?"move":"default"}),th([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var i=t.childOfName(n.join("")),o=1===n.length?TH(e,n[0]):function(e,t){var n=[TH(e,t[0]),TH(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?lH[o]+"-resize":null})})}function CH(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=rH(e[0][0],e[1][0]),n=rH(e[0][1],e[1][1]),r=iH(e[0][0],e[1][0]),i=iH(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(LH(e,t,[[r,i],[r+o,i+a]])))}function MH(e){return Kd({strokeNoScale:!0},e.brushStyle)}function IH(e,t,n,r){var i=[rH(e,n),rH(t,r)],o=[iH(e,n),iH(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function TH(e,t){var n=XM({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return GM(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function DH(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=PH(t,i,o);th(r,function(e){var t=sH[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(IH(s[0][0],s[1][0],s[0][1],s[1][1])),mH(t,n),wH(t,{isEnd:!1})}function jH(e,t,n,r){var i=t.__brushOption.range,o=PH(e,n,r);th(i,function(e){e[0]+=o[0],e[1]+=o[1]}),mH(e,t),wH(e,{isEnd:!1})}function PH(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 LH(e,t,n){var r=xH(e,t);return r&&r!==nH?r.clipPath(n,e._transform):Xd(n)}function RH(e){var t=e.event;t.preventDefault&&t.preventDefault()}function EH(e,t,n){return e.childOfName("main").contain(t,n)}function NH(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 oH(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&bH(e);var l=Xd(s);l.brushType=OH(l.brushType,a),l.panelId=a===nH?null:a.panelId,o=e._creatingCover=hH(e,l),e._covers.push(o)}if(o){var u=FH[OH(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(LH(e,o,e._track)),r&&(pH(e,o),u.updateCommon(e,o)),fH(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&yH(e,t,n)&&bH(e)&&(i={isEnd:r,removeOnClick:!0});return i}function OH(e,t){return"auto"===e?t.defaultBrushType:e}var zH={mousedown:function(e){if(this._dragging)BH(this,e);else if(!e.target||!e.target.draggable){RH(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=yH(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=yH(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===nH||s.panelId===o.panelId)&&FH[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){RH(e);var i=NH(this,e,r,!1);i&&wH(this,i)}},mouseup:function(e){BH(this,e)}};function BH(e,t){if(e._dragging){RH(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=NH(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&wH(e,o)}}var FH={lineX:$H(0),lineY:$H(1),rect:{createCover:function(e,t){function n(e){return e}return _H({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=SH(e);return IH(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){AH(e,t,n,r)},updateCommon:kH,contain:EH},polygon:{createCover:function(e,t){var n=new Zm;return n.add(new iM({name:"main",style:MH(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tM({name:"main",draggable:!0,drift:sh(jH,e,t),ondragend:sh(wH,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:LH(e,t,n)})},updateCommon:kH,contain:EH}};function $H(e){return{createCover:function(t,n){return _H({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=SH(t);return[rH(n[0][e],n[1][e]),iH(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=xH(t,n);if(a!==nH&&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(),AH(t,n,l,i)},updateCommon:kH,contain:EH}}const VH=dH;function WH(e){return e=UH(e),function(t){return ZM(t,e)}}function HH(e,t){return e=UH(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 GH(e,t,n){var r=UH(e);return function(e,i){return r.contain(i[0],i[1])&&!Lz(e,t,n)}}function UH(e){return Xp.create(e)}var XH=["axisLine","axisTickLabel","axisName"],YH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new VH(n.getZr())).on("brush",ah(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Zm,this.group.add(this._axisGroup),e.get("show")){var o=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),a=o.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=Zd({strokeContainThreshold:l},a.getAxisLayout(u)),d=new OO(e,c);th(XH,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,e,o,l,n),qM(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,o){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=Xp.create({x:a[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:WH(u),isTargetByCursor:GH(u,o,r),getLinearBrushOtherExtent:HH(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return nh(e.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=nh(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(oC);const qH=YH;var ZH={type:"axisAreaSelect",event:"axisAreaSelected"};var KH={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function QH(e){e.registerComponentView(EW),e.registerComponentModel(NW),e.registerCoordinateSystem("parallel",JW),e.registerPreprocessor(jW),e.registerComponentModel(tH),e.registerComponentView(qH),rN(e,"parallel",tH,KH),function(e){e.registerAction(ZH,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})})}(e)}var JH=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},eG=function(e){function t(t){return e.call(this,t)||this}return kd(t,e),t.prototype.getDefaultShape=function(){return new JH},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Wb(this)},t.prototype.downplay=function(){Hb(this)},t}(Nx),tG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=this,i=e.getGraph(),o=this.group,a=e.layoutInfo,s=a.width,l=a.height,u=e.getData(),c=e.getData("edge"),d=e.get("orient");this._model=e,o.removeAll(),o.x=a.x,o.y=a.y,i.eachEdge(function(t){var n=new eG,r=fb(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType="edge";var i,a,u,h,p,f,g,m,v=t.getModel(),y=v.getModel("lineStyle"),x=y.get("curveness"),b=t.node1.getLayout(),w=t.node1.getModel(),S=w.get("localX"),_=w.get("localY"),A=t.node2.getLayout(),k=t.node2.getModel(),C=k.get("localX"),M=k.get("localY"),I=t.getLayout();n.shape.extent=Math.max(1,I.dy),n.shape.orient=d,"vertical"===d?(i=(null!=S?S*s:b.x)+I.sy,a=(null!=_?_*l:b.y)+b.dy,u=(null!=C?C*s:A.x)+I.ty,p=i,f=a*(1-x)+(h=null!=M?M*l:A.y)*x,g=u,m=a*x+h*(1-x)):(i=(null!=S?S*s:b.x)+b.dx,a=(null!=_?_*l:b.y)+I.sy,p=i*(1-x)+(u=null!=C?C*s:A.x)*x,f=a,g=i*x+u*(1-x),m=h=(null!=M?M*l:A.y)+I.ty),n.setShape({x1:i,y1:a,x2:u,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:m}),n.useStyle(y.getItemStyle()),nG(n.style,d,t);var T=""+v.get("value"),D=Cw(v,"edgeLabel");kw(n,D,{labelFetcher:{getFormattedLabel:function(t,n,r,i,o,a){return e.getFormattedLabel(t,n,"edge",i,wh(o,D.normal&&D.normal.get("formatter"),T),a)}},labelDataIndex:t.dataIndex,defaultText:T}),n.setTextConfig({position:"inside"});var j=v.getModel("emphasis");sw(n,v,"lineStyle",function(e){var n=e.getItemStyle();return nG(n,d,t),n}),o.add(n),c.setItemGraphicEl(t.dataIndex,n);var P=j.get("focus");rw(n,"adjacency"===P?t.getAdjacentDataIndices():"trajectory"===P?t.getTrajectoryDataIndices():P,j.get("blurScope"),j.get("disabled"))}),i.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),i=r.get("localX"),a=r.get("localY"),c=r.getModel("emphasis"),d=r.get(["itemStyle","borderRadius"])||0,h=new Kx({shape:{x:null!=i?i*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy,r:d},style:r.getModel("itemStyle").getItemStyle(),z2:10});kw(h,Cw(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),h.disableLabelAnimation=!0,h.setStyle("fill",t.getVisual("color")),h.setStyle("decal",t.getVisual("style").decal),sw(h,r),o.add(h),u.setItemGraphicEl(t.dataIndex,h),fb(h).dataType="node";var p=c.get("focus");rw(h,"adjacency"===p?t.getAdjacentDataIndices():"trajectory"===p?t.getTrajectoryDataIndices():p,c.get("blurScope"),c.get("disabled"))}),u.eachItemGraphicEl(function(t,i){u.getItemModel(i).get("draggable")&&(t.drift=function(t,o){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=o,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&e.isAnimationEnabled()&&o.setClipPath(function(e,t,n){var r=new Kx({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return mw(r,{shape:{width:e.width+20}},t,n),r}(o.getBoundingRect(),e,function(){o.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(pI);function nG(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var r=n.node1.getVisual("color"),i=n.node2.getVisual("color");ch(r)&&ch(i)&&(e.fill=new xM(0,0,+("horizontal"===t),+("vertical"===t),[{color:r,offset:0},{color:i,offset:1}]))}}const rG=tG;var iG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var o=this.levelModels,a=0;a<i.length;a++)null!=i[a].depth&&i[a].depth>=0&&(o[i[a].depth]=new Yw(i[a],this,t));return iW(r,n,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,o=n.levelModels[i];o&&(e.parentModel=o)}return e}),t.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,o=n.levelModels[i];o&&(e.parentModel=o)}return e})}).data},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||null==e}if("edge"===n){var i=this.getDataParams(e,n),o=i.data,a=i.value;return Lk("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,l=this.getDataParams(e,n).data.name;return Lk("nameValue",{name:null!=l?l+"":null,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(null==r.value&&"node"===n){var i=this.getGraph().getNodeByIndex(t).getLayout().value;r.value=i}return r},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(rC);const oG=iG;function aG(e,t){e.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),r=e.get("nodeGap"),i=function(e,t){return ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=i;var o=i.width,a=i.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){th(e,function(e){var t=mG(e.outEdges,gG),n=mG(e.inEdges,gG),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}(l),function(e,t,n,r,i,o,a,s,l){(function(e,t,n,r,i,o,a){for(var s=[],l=[],u=[],c=[],d=0,h=0;h<t.length;h++)s[h]=1;for(h=0;h<e.length;h++)l[h]=e[h].inEdges.length,0===l[h]&&u.push(e[h]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:d},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];s[t.indexOf(x)]=0;var b=x.node2;0===--l[e.indexOf(b)]&&c.indexOf(b)<0&&c.push(b)}}++d,u=c,c=[]}for(h=0;h<s.length;h++)if(1===s[h])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>d-1?p:d-1;a&&"left"!==a&&function(e,t,n,r){if("right"===t){for(var i=[],o=e,a=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:a},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}o=i,i=[],++a}th(e,function(e){sG(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else"justify"===t&&function(e,t){th(e,function(e){sG(e)||e.outEdges.length||e.setLayout({depth:t},!0)})}(e,r)}(e,a,0,w);var S="vertical"===o?(i-n)/w:(r-n)/w;!function(e,t,n){th(e,function(e){var r=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}(e,S,o)})(e,t,n,i,o,s,l),function(e,t,n,r,i,o,a){var s=function(e,t){var n=[],r="vertical"===t?"y":"x",i=Yv(e,function(e){return e.getLayout()[r]});return i.keys.sort(function(e,t){return e-t}),th(i.keys,function(e){n.push(i.buckets.get(e))}),n}(e,a);(function(e,t,n,r,i,o){var a=1/0;th(e,function(e){var t=e.length,s=0;th(e,function(e){s+=e.getLayout().value});var l="vertical"===o?(r-(t-1)*i)/s:(n-(t-1)*i)/s;l<a&&(a=l)}),th(e,function(e){th(e,function(e,t){var n=e.getLayout().value*a;"vertical"===o?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),th(t,function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)})})(s,t,n,r,i,a),lG(s,i,n,r,a);for(var l=1;o>0;o--)uG(s,l*=.99,a),lG(s,i,n,r,a),vG(s,l,a),lG(s,i,n,r,a)}(e,t,o,i,r,a,s),function(e,t){var n="vertical"===t?"x":"y";th(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),th(e,function(e){var t=0,n=0;th(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),th(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}(e,s)}(l,u,n,r,o,a,0!==ih(l,function(e){return 0===e.getLayout().value}).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))})}function sG(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function lG(e,t,n,r,i){var o="vertical"===i?"x":"y";th(e,function(e){var a,s,l;e.sort(function(e,t){return e.getLayout()[o]-t.getLayout()[o]});for(var u=0,c=e.length,d="vertical"===i?"dx":"dy",h=0;h<c;h++)(l=u-(s=e[h]).getLayout()[o])>0&&(a=s.getLayout()[o]+l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[d]+t;if((l=u-t-("vertical"===i?r:n))>0){a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=e[h]).getLayout()[o]+s.getLayout()[d]+t-u)>0&&(a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}})}function uG(e,t,n){th(e.slice().reverse(),function(e){th(e,function(e){if(e.outEdges.length){var r=mG(e.outEdges,cG,n)/mG(e.outEdges,gG);if(isNaN(r)){var i=e.outEdges.length;r=i?mG(e.outEdges,dG,n)/i:0}if("vertical"===n){var o=e.getLayout().x+(r-fG(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(r-fG(e,n))*t;e.setLayout({y:a},!0)}}})})}function cG(e,t){return fG(e.node2,t)*e.getValue()}function dG(e,t){return fG(e.node2,t)}function hG(e,t){return fG(e.node1,t)*e.getValue()}function pG(e,t){return fG(e.node1,t)}function fG(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function gG(e){return e.getValue()}function mG(e,t,n){for(var r=0,i=e.length,o=-1;++o<i;){var a=+t(e[o],n);isNaN(a)||(r+=a)}return r}function vG(e,t,n){th(e,function(e){th(e,function(e){if(e.inEdges.length){var r=mG(e.inEdges,hG,n)/mG(e.inEdges,gG);if(isNaN(r)){var i=e.inEdges.length;r=i?mG(e.inEdges,pG,n)/i:0}if("vertical"===n){var o=e.getLayout().x+(r-fG(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(r-fG(e,n))*t;e.setLayout({y:a},!0)}}})})}function yG(e){e.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var i=1/0,o=-1/0;th(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>o&&(o=t)}),th(n,function(t){var n=new L$({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get(["itemStyle","color"]);null!=r?(t.setVisual("color",r),t.setVisual("style",{fill:r})):(t.setVisual("color",n),t.setVisual("style",{fill:n}))})}r.length&&th(r,function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)})})}var xG=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&null!=t.get(e)},e.prototype.getInitialData=function(e,t){var n,r,i=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),a=i.get("type"),s=o.get("type");"category"===a?(e.layout="horizontal",n=i.getOrdinalMeta(),r=!this._hasEncodeRule("x")):"category"===s?(e.layout="vertical",n=o.getOrdinalMeta(),r=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],h=[i,o],p=h[u].get("type"),f=h[1-u].get("type"),g=e.data;if(g&&r){var m=[];th(g,function(e,t){var n;lh(e)?(n=e.slice(),e.unshift(t)):lh(e.value)?((n=Zd({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,m.push(n)}),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:vL(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:vL(f),dimsDef:v.slice()}];return NE(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:sh(w_,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),bG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return kd(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(rC);Jd(bG,xG,!0);const wG=bG;var SG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this.group,o=this._data;this._data||i.removeAll();var a="horizontal"===e.get("layout")?1:0;r.diff(o).add(function(e){if(r.hasValue(e)){var t=kG(r.getItemLayout(e),r,e,a,!0);r.setItemGraphicEl(e,t),i.add(t)}}).update(function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);n?(ww(n),CG(s,n,r,e)):n=kG(s,r,e,a),i.add(n),r.setItemGraphicEl(e,n)}else i.remove(n)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type="boxplot",t}(pI),_G=function(){},AG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new _G},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])},t}(Nx);function kG(e,t,n,r,i){var o=e.ends,a=new AG({shape:{points:i?MG(o,r,e):o}});return CG(e,a,t,n,i),a}function CG(e,t,n,r,i){var o=n.hostModel;(0,Bt[i?"initProps":"updateProps"])(t,{shape:{points:e.ends}},o,r),t.useStyle(n.getItemVisual(r,"style")),t.style.strokeNoScale=!0,t.z2=100;var a=n.getItemModel(r),s=a.getModel("emphasis");sw(t,a),rw(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function MG(e,t,n){return nh(e,function(e){return(e=e.slice())[t]=n.initBaseline,e})}const IG=SG;var TG=th;function DG(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(e){var r=e.getBaseAxis(),i=Qd(n,r);i<0&&(i=n.length,n[i]=r,t[i]={axis:r,seriesModels:[]}),t[i].seriesModels.push(e)}),t}(e);TG(t,function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n=e.axis,r=e.seriesModels,i=r.length,o=e.boxWidthList=[],a=e.boxOffsetList=[],s=[];if("category"===n.type)t=n.getBandWidth();else{var l=0;TG(r,function(e){l=Math.max(l,e.getData().count())});var u=n.getExtent();t=Math.abs(u[1]-u[0])/l}TG(r,function(e){var n=e.get("boxWidth");lh(n)||(n=[n,n]),s.push([iv(n[0],t)||0,iv(n[1],t)||0])});var c=.8*t-2,d=c/i*.3,h=(c-d*(i-1))/i,p=h/2-c/2;TG(r,function(e,t){a.push(p),p+=d+h,o.push(Math.min(Math.max(h,s[t][0]),s[t][1]))})}(e),TG(t,function(t,n){!function(e,t,n){var r=e.coordinateSystem,i=e.getData(),o=n/2,a="horizontal"===e.get("layout")?0:1,s=1-a,l=["x","y"],u=i.mapDimension(l[a]),c=i.mapDimensionsAll(l[s]);if(null==u||c.length<5)return;for(var d=0;d<i.count();d++){var h=i.get(u,d),p=x(h,c[2],d),f=x(h,c[0],d),g=x(h,c[1],d),m=x(h,c[3],d),v=x(h,c[4],d),y=[];b(y,g,!1),b(y,m,!0),y.push(f,g,v,m),w(y,f),w(y,v),w(y,p),i.setItemLayout(d,{initBaseline:p[s],ends:y})}function x(e,n,o){var l,u=i.get(n,o),c=[];return c[a]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=r.dataToPoint(c))[a]+=t,l}function b(e,t,n){var r=t.slice(),i=t.slice();r[a]+=o,i[a]-=o,n?e.push(r,i):e.push(i,r)}function w(e,t){var n=t.slice(),r=t.slice();n[a]-=o,r[a]+=o,e.push(n,r)}}(t,e.boxOffsetList[n],e.boxWidthList[n])}))})}var jG={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==c_){0,qA("")}var n=function(e,t){for(var n=[],r=[],i=(t=t||{}).boundIQR,o="none"===i||0===i,a=0;a<e.length;a++){var s=av(e[a].slice()),l=yv(s,.25),u=yv(s,.5),c=yv(s,.75),d=s[0],h=s[s.length-1],p=(null==i?1.5:i)*(c-l),f=o?d:Math.max(d,l-p),g=o?h:Math.min(h,c+p),m=t.itemNameFormatter,v=uh(m)?m({value:a}):ch(m)?m.replace("{value}",a+""):a+"";n.push([v,f,l,u,c,g]);for(var y=0;y<s.length;y++){var x=s[y];if(x<f||x>g){var b=[v,x];r.push(b)}}}return{boxData:n,outliers:r}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var PG=["itemStyle","borderColor"],LG=["itemStyle","borderColor0"],RG=["itemStyle","borderColorDoji"],EG=["itemStyle","color"],NG=["itemStyle","color0"];function OG(e,t){return t.get(e>0?EG:NG)}function zG(e,t){return t.get(0===e?RG:e>0?PG:LG)}const BG={seriesType:"candlestick",plan:aC(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;null!=(n=e.next());){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,o=r.getItemStyle();o.fill=OG(i,r),o.stroke=zG(i,r)||o.fill,Zd(t.ensureUniqueItemVisual(n,"style"),o)}}}}};var FG=["color","borderColor"],$G=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){iI(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){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout("isSimpleBox"),o=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),t.diff(n).add(function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(o&&GG(s,a))return;var l=HG(a,n,!0);mw(l,{shape:{points:a.ends}},e,n),UG(l,t,n,i),r.add(l),t.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);o&&GG(s,c)?r.remove(u):(u?(gw(u,{shape:{points:c.ends}},e,a),ww(u)):u=HG(c,a),UG(u,t,a,i),r.add(u),t.setItemGraphicEl(a,u))}else r.remove(u)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),ZG(e,this.group);var t=e.get("clip",!0)?xR(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,r=t.getData(),i=r.getLayout("isSimpleBox");null!=(n=e.next());){var o=HG(r.getItemLayout(n),n);UG(o,r,n,i),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){ZG(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(pI),VG=function(){},WG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new VG},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Nx);function HG(e,t,n){var r=e.ends;return new WG({shape:{points:n?XG(r,e):r},z2:100})}function GG(e,t){for(var n=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){n=!1;break}return n}function UG(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=r,sw(e,i);var o=t.getItemLayout(n).sign;th(e.states,function(e,t){var n=i.getModel(t),r=OG(o,n),a=zG(o,n)||r,s=e.style||(e.style={});r&&(s.fill=r),a&&(s.stroke=a)});var a=i.getModel("emphasis");rw(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function XG(e,t){return nh(e,function(e){return(e=e.slice())[1]=t.initBaseline,e})}var YG=function(){},qG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return kd(t,e),t.prototype.getDefaultShape=function(){return new YG},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;r<n.length;)if(this.__sign===n[r++]){var i=n[r++];e.moveTo(i,n[r++]),e.lineTo(i,n[r++])}else r+=3},t}(Nx);function ZG(e,t,n,r){var i=e.getData(),o=i.getLayout("largePoints"),a=new qG({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});t.add(a);var s=new qG({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new qG({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});t.add(l),KG(1,a,e,i),KG(-1,s,e,i),KG(0,l,e,i),r&&(a.incremental=!0,s.incremental=!0),n&&n.push(a,s)}function KG(e,t,n,r){var i=zG(e,n)||OG(e,n),o=n.getModel("itemStyle").getItemStyle(FG);t.useStyle(o),t.style.fill=null,t.style.stroke=i}const QG=$G;var JG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return kd(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(rC);Jd(JG,xG,!0);const eU=JG;function tU(e){e&&lh(e.series)&&th(e.series,function(e){ph(e)&&"k"===e.type&&(e.type="candlestick")})}var nU={seriesType:"candlestick",plan:aC(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=function(e,t){var n,r=e.getBaseAxis(),i="category"===r.type?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),o=iv(bh(e.get("barMaxWidth"),i),i),a=iv(bh(e.get("barMinWidth"),1),i),s=e.get("barWidth");return null!=s?iv(s,i):Math.max(Math.min(i/2,o),a)}(e,n),i=["x","y"],o=n.getDimensionIndex(n.mapDimension(i[0])),a=nh(n.mapDimensionsAll(i[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(o<0||a.length<4))return{progress:e.pipelineContext.large?function(n,r){var i,a,d=lR(4*n.count),h=0,p=[],f=[],g=r.getStore(),m=!!e.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(o,a),y=g.get(s,a),x=g.get(l,a),b=g.get(u,a),w=g.get(c,a);isNaN(v)||isNaN(b)||isNaN(w)?(d[h++]=NaN,h+=3):(d[h++]=rU(g,a,y,x,l,m),p[0]=v,p[1]=b,i=t.dataToPoint(p,null,f),d[h++]=i?i[0]:NaN,d[h++]=i?i[1]:NaN,p[1]=w,i=t.dataToPoint(p,null,f),d[h++]=i?i[1]:NaN)}r.setLayout("largePoints",d)}:function(e,n){var i,a=n.getStore();for(;null!=(i=e.next());){var d=a.get(o,i),h=a.get(s,i),p=a.get(l,i),f=a.get(u,i),g=a.get(c,i),m=Math.min(h,p),v=Math.max(h,p),y=A(m,d),x=A(v,d),b=A(f,d),w=A(g,d),S=[];k(S,x,0),k(S,y,1),S.push(M(w),M(x),M(b),M(y));var _=!!n.getItemModel(i).get(["itemStyle","borderColorDoji"]);n.setItemLayout(i,{sign:rU(a,i,h,p,l,_),initBaseline:h>p?x[1]:y[1],ends:S,brushRect:C(f,g,d)})}function A(e,n){var r=[];return r[0]=n,r[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function k(e,t,n){var i=t.slice(),o=t.slice();i[0]=HM(i[0]+r/2,1,!1),o[0]=HM(o[0]-r/2,1,!0),n?e.push(i,o):e.push(o,i)}function C(e,t,n){var i=A(e,n),o=A(t,n);return i[0]-=r/2,o[0]-=r/2,{x:i[0],y:i[1],width:r,height:o[1]-i[1]}}function M(e){return e[0]=HM(e[0],1),e}}}}};function rU(e,t,n,r,i,o){return n>r?-1:n<r?1:o?0:t>0?e.get(i,t-1)<=r?1:-1:1}const iU=nU;function oU(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})})}const aU=function(e){function t(t,n){var r=e.call(this)||this,i=new JL(t,n),o=new Zm;return r.add(i),r.add(o),r.updateData(t,n),r}return kd(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),o=0;o<r;o++){var a=ST(t,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-o/r*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),i.add(a)}oU(i,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),r=["symbolType","period","rippleScale","rippleNumber"],i=0;i<r.length;i++){var o=r[i];if(t[o]!==e[o])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}oU(n,e)},t.prototype.highlight=function(){Wb(this)},t.prototype.downplay=function(){Hb(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,r=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),o=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),s=_T(e.getItemVisual(t,"symbolSize")),l=e.getItemVisual(t,"style"),u=l&&l.fill,c=o.getModel("emphasis");i.setScale(s),i.traverse(function(e){e.setStyle("fill",u)});var d=AT(e.getItemVisual(t,"symbolOffset"),s);d&&(i.x=d[0],i.y=d[1]);var h=e.getItemVisual(t,"symbolRotate");i.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=r.get("showEffectOn"),p.rippleScale=o.get(["rippleEffect","scale"]),p.brushType=o.get(["rippleEffect","brushType"]),p.period=1e3*o.get(["rippleEffect","period"]),p.effectOffset=t/e.count(),p.z=r.getShallow("z")||0,p.zlevel=r.getShallow("zlevel")||0,p.symbolType=a,p.color=u,p.rippleEffectColor=o.get(["rippleEffect","color"]),p.rippleNumber=o.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===e&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,rw(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(Zm);const sU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(){this._symbolDraw=new rR(aU)},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._symbolDraw;i.updateData(r,{clipShape:this._getClipShape(e)}),this.group.add(i.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,t,n){var r=e.getData();this.group.dirty();var i=RR("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=function(e){var t=[1,0,0,1,0,0];return Pp(t,e),t}(t.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(pI);const lU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return kd(t,e),t.prototype.getInitialData=function(e,t){return YL(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(rC);var uU=function(e){function t(t,n,r){var i=e.call(this)||this;return i.add(i.createLine(t,n,r)),i._updateEffectSymbol(t,n),i}return kd(t,e),t.prototype.createLine=function(e,t,n){return new NV(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),r=n.get("symbolSize"),i=n.get("symbol");lh(r)||(r=[r,r]);var o=e.getItemVisual(t,"style"),a=n.get("color")||o&&o.stroke,s=this.childAt(1);this._symbolType!==i&&(this.remove(s),(s=ST(i,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(a),this._symbolType=i,this._symbolScale=r,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var r=this.childAt(1);if(r){var i=e.getItemLayout(n),o=1e3*t.get("period"),a=t.get("loop"),s=t.get("roundTrip"),l=t.get("constantSpeed"),u=xh(t.get("delay"),function(t){return t/e.count()*o/3});if(r.ignore=!0,this._updateAnimationPoints(r,i),l>0&&(o=this._getLineLength(r)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){r.stopAnimation();var c=void 0;c=uh(u)?u(n):u,r.__t>0&&(c=-o*r.__t),this._animateSymbol(r,o,c,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var o=this,a=e.animate("",r).when(i?2*t:t,{__t:i?2:1}).delay(n).during(function(){o._updateSymbolPosition(e)});r||a.done(function(){o.remove(e)}),a.start()}},t.prototype._getLineLength=function(e){return Kh(e.__p1,e.__cp1)+Kh(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<1?e.__t:2-e.__t,o=[e.x,e.y],a=o.slice(),s=zf,l=Bf;o[0]=s(t[0],r[0],n[0],i),o[1]=s(t[1],r[1],n[1],i);var u=e.__t<1?l(t[0],r[0],n[0],i):l(n[0],r[0],t[0],1-i),c=e.__t<1?l(t[1],r[1],n[1],i):l(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*Kh(a,o),1===i&&(o[0]=a[0]+(o[0]-a[0])/2,o[1]=a[1]+(o[1]-a[1])/2)):1===e.__lastT?e.scaleY=2*Kh(t,o):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=o[0],e.y=o[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},t}(Zm);const cU=uU;var dU=function(e){function t(t,n,r){var i=e.call(this)||this;return i._createPolyline(t,n,r),i}return kd(t,e),t.prototype._createPolyline=function(e,t,n){var r=e.getItemLayout(t),i=new iM({shape:{points:r}});this.add(i),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel;gw(this.childAt(0),{shape:{points:e.getItemLayout(t)}},r,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var r=this.childAt(0),i=e.getItemModel(t),o=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var u=i.getModel("emphasis");o=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,rw(this,a,s,l)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(Zm);const hU=dU;const pU=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return kd(t,e),t.prototype.createLine=function(e,t,n){return new hU(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],r=0,i=1;i<t.length;i++){var o=t[i-1],a=t[i];r+=Kh(o,a),n.push(r)}if(0!==r){for(i=0;i<n.length;i++)n[i]/=r;this._offsets=n,this._length=r}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,r=this._offsets,i=n.length;if(r){var o,a=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(a+1,i-1);o>=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;o<i&&!(r[o]>t);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),l=n[o],u=n[o+1];e.x=l[0]*(1-s)+s*u[0],e.y=l[1]*(1-s)+s*u[1];var c=e.__t<1?u[0]-l[0]:l[0]-u[0],d=e.__t<1?u[1]-l[1]:l[1]-u[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(cU);var fU=function(){this.polyline=!1,this.curveness=0,this.segs=[]},gU=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return kd(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fU},t.prototype.buildPath=function(e,t){var n,r=t.segs,i=t.curveness;if(t.polyline)for(n=this._off;n<r.length;){var o=r[n++];if(o>0){e.moveTo(r[n++],r[n++]);for(var a=1;a<o;a++)e.lineTo(r[n++],r[n++])}}else for(n=this._off;n<r.length;){var s=r[n++],l=r[n++],u=r[n++],c=r[n++];if(e.moveTo(s,l),i>0){var d=(s+u)/2-(l-c)*i,h=(l+c)/2-(u-s)*i;e.quadraticCurveTo(d,h,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<r.length;){var l=r[s++];if(l>0)for(var u=r[s++],c=r[s++],d=1;d<l;d++){if(gx(u,c,h=r[s++],p=r[s++],o,e,t))return a}a++}else for(a=0,s=0;s<r.length;){u=r[s++],c=r[s++];var h=r[s++],p=r[s++];if(i>0){if(vx(u,c,(u+h)/2-(c-p)*i,(c+p)/2-(h-u)*i,h,p,o,e,t))return a}else if(gx(u,c,h,p,o,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<t.length;){var s=t[a++],l=t[a++];n=Math.min(s,n),i=Math.max(s,i),r=Math.min(l,r),o=Math.max(l,o)}e=this._rect=new Xp(n,r,i,o)}return e},t}(Nx);const mU=function(){function e(){this.group=new Zm}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],r=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,a=new Float32Array(o+r.length);a.set(i),a.set(r,o),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:r}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new gU({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get(["lineStyle","curveness"])}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=fb(e);o.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){o.dataIndex=null;var n=e.hoverDataIdx;n>0&&(o.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();const vU={seriesType:"lines",plan:aC(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(i,o){var a=[];if(r){var s=void 0,l=i.end-i.start;if(n){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,h=[];for(c=i.start;c<i.end;c++){var p=e.getLineCoords(c,a);n&&(s[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(a[f],!1,h),s[d++]=h[0],s[d++]=h[1]}o.setLayout("linesPoints",s)}else for(c=i.start;c<i.end;c++){var g=o.getItemModel(c),m=(p=e.getLineCoords(c,a),[]);if(n)for(var v=0;v<p;v++)m.push(t.dataToPoint(a[v]));else{m[0]=t.dataToPoint(a[0]),m[1]=t.dataToPoint(a[1]);var y=g.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(c,m)}}}}}};const yU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this._updateLineDraw(r,e),o=e.get("zlevel"),a=e.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a>0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),i.updateData(r);var u=e.get("clip",!0)&&xR(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=e.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var o=vU.reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get("polyline"),o=t.pipelineContext.large;return n&&r===this._hasEffet&&i===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new mU:new FV(i?r?pU:hU:r?cU:NV),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=o),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(pI);var xU="undefined"===typeof Uint32Array?Array:Uint32Array,bU="undefined"===typeof Float64Array?Array:Float64Array;function wU(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=nh(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),qd([t,e[0],e[1]])}))}const SU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return kd(t,e),t.prototype.init=function(t){t.data=t.data||[],wU(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(wU(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Lh(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Lh(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],i=0;i<r;i++)t[i]=t[i]||[],t[i][0]=this._flatCoords[n+2*i],t[i][1]=this._flatCoords[n+2*i+1];return r}var o=this._getCoordsFromItemModel(e);for(i=0;i<o.length;i++)t[i]=t[i]||[],t[i][0]=o[i][0],t[i][1]=o[i][1];return o.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),hh(e[0])){for(var n=e.length,r=new xU(n),i=new bU(n),o=0,a=0,s=0,l=0;l<n;){s++;var u=e[l++];r[a++]=o+t,r[a++]=u;for(var c=0;c<u;c++){var d=e[l++],h=e[l++];i[o++]=d,i[o++]=h}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,a),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){var n=new BL(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,r,i){if(e instanceof Array)return NaN;n.hasItemOption=!0;var o=e.value;return null!=o?o instanceof Array?o[i]:o:void 0}),n},t.prototype.formatTooltip=function(e,t,n){var r=this.getData().getItemModel(e),i=r.get("name");if(i)return i;var o=r.get("fromName"),a=r.get("toName"),s=[];return null!=o&&s.push(o),null!=a&&s.push(a),Lk("nameValue",{name:s.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(rC);function _U(e){return e instanceof Array||(e=[e,e]),e}const AU={seriesType:"lines",reset:function(e){var t=_U(e.get("symbol")),n=_U(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",t&&t[0]),r.setVisual("toSymbol",t&&t[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),r=_U(n.getShallow("symbol",!0)),i=_U(n.getShallow("symbolSize",!0));r[0]&&e.setItemVisual(t,"fromSymbol",r[0]),r[1]&&e.setItemVisual(t,"toSymbol",r[1]),i[0]&&e.setItemVisual(t,"fromSymbolSize",i[0]),i[1]&&e.setItemVisual(t,"toSymbolSize",i[1])}:null}}};var kU=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Pd.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p<h;++p){var f=e[p],g=f[0],m=f[1],v=r(f[2]);d.globalAlpha=v,d.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=d.getImageData(0,0,c.width,c.height),x=y.data,b=0,w=x.length,S=this.minOpacity,_=this.maxOpacity-S;b<w;){v=x[b+3]/256;var A=4*Math.floor(255*v);if(v>0){var k=o(v)?s:l;v>0&&(v=v*_+S),x[b++]=k[A],x[b++]=k[A+1],x[b++]=k[A+2],x[b++]=k[A+3]*v*256}else b+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Pd.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}();const CU=kU;function MU(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}const IU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):MU(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(MU(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){iI(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,i){var o,a,s,l,u=e.coordinateSystem,c=bR(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");0,o=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),x=Cw(e),b=e.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),_=b.get("disabled"),A=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],k=n;k<r;k++){var C=void 0,M=f.getItemVisual(k,"style");if(c){var I=f.get(A[0],k),T=f.get(A[1],k);if(isNaN(f.get(A[2],k))||isNaN(I)||isNaN(T)||I<s[0]||I>s[1]||T<l[0]||T>l[1])continue;var D=u.dataToPoint([I,T]);C=new Kx({shape:{x:D[0]-o/2,y:D[1]-a/2,width:o,height:a},style:M})}else{if(isNaN(f.get(A[1],k)))continue;C=new Kx({z2:1,shape:u.dataToRect([f.get(A[0],k)]).contentShape,style:M})}if(f.hasItemOption){var j=f.getItemModel(k),P=j.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),m=j.getModel(["blur","itemStyle"]).getItemStyle(),v=j.getModel(["select","itemStyle"]).getItemStyle(),y=j.get(["itemStyle","borderRadius"]),w=P.get("focus"),S=P.get("blurScope"),_=P.get("disabled"),x=Cw(j)}C.shape.r=y;var L=e.getRawValue(k),R="-";L&&null!=L[2]&&(R=L[2]+""),kw(C,x,{labelFetcher:e,labelDataIndex:k,defaultOpacity:M.opacity,defaultText:R}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=m,C.ensureState("select").style=v,rw(C,w,S,_),C.incremental=i,i&&(C.states.emphasis.hoverLayer=!0),p.add(C),f.setItemGraphicEl(k,C),this._progressiveEls&&this._progressiveEls.push(C)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new CU;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=h-c,g=p-d,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=c,i[1]-=d,i.push(r),i}),y=n.getExtent(),x="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var r=e[1]-e[0],i=(t=nh(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}})).length,o=0;return function(e){var r;for(r=o;r<i;r++)if((a=t[r].interval)[0]<=e&&e<=a[1]){o=r;break}if(r===i)for(r=o-1;r>=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){o=r;break}}return r>=0&&r<i&&n[r]}}(y,n.getPieceList(),n.option.selected);s.update(v,f,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var b=new Wx({style:{width:f,height:g,x:c,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(pI);const TU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.getInitialData=function(e,t){return YL(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=G_.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(rC);var DU=["itemStyle","borderWidth"],jU=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],PU=new TC,LU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),o=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:jU[+s],categoryDim:jU[1-+s]};i.diff(o).add(function(e){if(i.hasValue(e)){var t=$U(i,e),n=RU(i,e,t,u),o=HU(i,u,n);i.setItemGraphicEl(e,o),r.add(o),qU(o,u,n)}}).update(function(e,t){var n=o.getItemGraphicEl(t);if(i.hasValue(e)){var a=$U(i,e),s=RU(i,e,a,u),l=UU(i,s);n&&l!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var r=n.animationModel,i=n.dataIndex,o=e.__pictorialBundle;gw(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?OU(e,t,n,!0):zU(e,t,n,!0);BU(e,n,!0),FU(e,t,n,!0)}(n,u,s):n=HU(i,u,s,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),qU(n,u,s)}else r.remove(n)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&GU(o,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var c=e.get("clip",!0)?xR(e.coordinateSystem,!1,e):null;return c?r.setClipPath(c):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl(function(t){GU(r,fb(t).dataIndex,e,t)}):n.removeAll()},t.type="pictorialBar",t}(pI);function RU(e,t,n,r){var i=e.getItemLayout(t),o=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverScale:c&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(e,t,n,r,i){var o,a=r.valueDim,s=e.get("symbolBoundingData"),l=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(lh(s)){var d=[EU(l,s[0])-u,EU(l,s[1])-u];d[1]<d[0]&&d.reverse(),o=d[c]}else o=null!=s?EU(l,s)-u:t?r.coordSysExtent[a.index][c]-u:n[a.wh];i.boundingLength=o,t&&(i.repeatCutLength=n[a.wh]);var h="x"===a.xy,p=l.inverse;i.pxSign=h&&!p||!h&&p?o>=0?1:-1:o>0?1:-1}(n,o,i,r,d),function(e,t,n,r,i,o,a,s,l,u){var c,d=l.valueDim,h=l.categoryDim,p=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");c=lh(f)?f.slice():null==f?["100%","100%"]:[f,f];c[h.index]=iv(c[h.index],p),c[d.index]=iv(c[d.index],r?p:Math.abs(o)),u.symbolSize=c;var g=u.symbolScale=[c[0]/s,c[1]/s];g[d.index]*=(l.isHorizontal?-1:1)*a}(e,t,i,o,0,d.boundingLength,d.pxSign,u,r,d),function(e,t,n,r,i){var o=e.get(DU)||0;o&&(PU.attr({scaleX:t[0],scaleY:t[1],rotation:n}),PU.updateTransform(),o/=PU.getLineScale(),o*=t[r.valueDim.index]);i.valueLineWidth=o||0}(n,d.symbolScale,l,r,d);var h=d.symbolSize,p=AT(n.get("symbolOffset"),h);return function(e,t,n,r,i,o,a,s,l,u,c,d){var h=c.categoryDim,p=c.valueDim,f=d.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(r){var v=Math.abs(l),y=xh(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var b=iv(y,t[p.index]),w=Math.max(g+2*b,0),S=x?0:2*b,_=wv(r),A=_?r:ZU((v+S)/w);w=g+2*(b=(v-A*g)/2/(x?A:Math.max(A-1,1))),S=x?0:2*b,_||"fixed"===r||(A=u?ZU((Math.abs(u)+S)/w):0),m=A*w-S,d.repeatTimes=A,d.symbolMargin=b}var k=f*(m/2),C=d.pathPosition=[];C[h.index]=n[h.wh]/2,C[p.index]="start"===a?k:"end"===a?l-k:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var M=d.bundlePosition=[];M[h.index]=n[h.xy],M[p.index]=n[p.xy];var I=d.barRectShape=Zd({},n);I[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(C[p.index]+k)),I[h.wh]=n[h.wh];var T=d.clipShape={};T[h.xy]=-n[h.xy],T[h.wh]=c.ecSize[h.wh],T[p.xy]=0,T[p.wh]=n[p.wh]}(n,h,i,o,0,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function EU(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function NU(e){var t=e.symbolPatternSize,n=ST(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function OU(e,t,n,r){var i=e.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,d=o[t.valueDim.index]+a+2*n.symbolMargin;for(XU(e,function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?YU(e,null,f(c),n,r):YU(e,null,{scaleX:0,scaleY:0},n,r,function(){i.remove(e)}),c++});c<u;c++){var h=NU(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var p=f(c);YU(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,r)}function f(e){var t=s.slice(),r=n.pxSign,i=e;return("start"===n.symbolRepeatDirection?r>0:r<0)&&(i=u-1-e),t[l.index]=d*(i-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function zU(e,t,n,r){var i=e.__pictorialBundle,o=e.__pictorialMainPath;o?YU(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(o=e.__pictorialMainPath=NU(n),i.add(o),YU(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function BU(e,t,n){var r=Zd({},t.barRectShape),i=e.__pictorialBarRect;i?YU(i,null,{shape:r},t,n):((i=e.__pictorialBarRect=new Kx({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(i))}function FU(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,o=Zd({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(i)gw(i,{shape:o},s,l);else{o[a.wh]=0,i=new Kx({shape:o}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[a.wh]=n.clipShape[a.wh],Bt[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function $U(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=VU,n.isAnimationEnabled=WU,n}function VU(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function WU(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function HU(e,t,n,r){var i=new Zm,o=new Zm;return i.add(o),i.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?OU(i,t,n):zU(i,0,n),BU(i,n,r),FU(i,t,n,r),i.__pictorialShapeStr=UU(e,n),i.__pictorialSymbolMeta=n,i}function GU(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var o=[];XU(r,function(e){o.push(e)}),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),th(o,function(e){yw(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function UU(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function XU(e,t,n){th(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function YU(e,t,n,r,i,o){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&Bt[i?"updateProps":"initProps"](e,n,r.animationModel,r.dataIndex,o)}function qU(e,t,n){var r=n.dataIndex,i=n.itemModel,o=i.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=o.get("focus"),d=o.get("blurScope"),h=o.get("scale");XU(e,function(e){if(e instanceof Wx){var t=e.style;e.useStyle(Zd({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState("emphasis");r.style=a,h&&(r.scaleX=1.1*e.scaleX,r.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,u&&(e.cursor=u),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,kw(f,Cw(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:ZL(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),rw(e,c,d,o.get("disabled"))}function ZU(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}const KU=LU;const QU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return kd(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Kw(qR.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(qR);const JU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return kd(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this,o=this.group,a=e.getLayerSeries(),s=r.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}o.x=0,o.y=l.y+u[0];var d=new fL(this._layersSeries||[],a,c,c),h=[];function p(t,n,s){var l=i._layers;if("remove"!==t){for(var u,c,d=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var m=r.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push(v,y),p.push(v,y+x),u=r.getItemVisual(f[g],"style")}var b=r.getItemLayout(f[0]),w=e.getModel("label").get("margin"),S=e.getModel("emphasis");if("add"===t){var _=h[n]=new Zm;c=new mR({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_.add(c),o.add(_),e.isAnimationEnabled()&&c.setClipPath(function(e,t,n){var r=new Kx({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return mw(r,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),r}(c.getBoundingRect(),e,function(){c.removeClipPath()}))}else{_=l[s];c=_.childAt(0),o.add(_),h[n]=_,gw(c,{shape:{points:d,stackedOnPoints:p}},e),ww(c)}kw(c,Cw(e),{labelDataIndex:f[g-1],defaultText:r.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var A=c.getTextContent();A&&(A.x=b.x-w,A.y=b.y0+b.y/2),c.useStyle(u),r.setItemGraphicEl(n,c),sw(c,e),rw(c,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else o.remove(l[n])}d.add(ah(p,this,"add")).update(ah(p,this,"update")).remove(ah(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},t.type="themeRiver",t}(pI);var eX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zE(ah(this.getData,this),ah(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Yv(e,function(e){return n.hasOwnProperty(e[0]+"")||(n[e[0]+""]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var o=i.length,a=0;a<o;++a){for(var s=i[a].name,l=0;l<i[a].dataList.length;++l){var u=i[a].dataList[l][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,e[t]=[u,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents("singleAxis",Hv).models[0].get("type"),r=ih(e.data,function(e){return void 0!==e[2]}),i=this.fixData(r||[]),o=[],a=this.nameMap=Ph(),s=0,l=0;l<i.length;++l)o.push(i[l][2]),a.get(i[l][2])||(a.set(i[l][2],s),s++);var u=FL(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:vL(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new BL(u,this);return c.initData(i),c},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],r=0;r<t;++r)n[r]=r;var i=e.mapDimension("single"),o=Yv(n,function(t){return e.get("name",t)}),a=[];return o.buckets.each(function(t,n){t.sort(function(t,n){return e.get(i,t)-e.get(i,n)}),a.push({name:n,indices:t})}),a},t.prototype.getAxisTooltipData=function(e,t,n){lh(e)||(e=e?[e]:[]);for(var r,i=this.getData(),o=this.getLayerSeries(),a=[],s=o.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,d=o[l].indices.length,h=0;h<d;++h){var p=i.get(e[0],o[l].indices[h]),f=Math.abs(p-t);f<=u&&(r=p,u=f,c=o[l].indices[h])}a.push(c)}return{dataIndices:a,nestestValue:r}},t.prototype.formatTooltip=function(e,t,n){var r=this.getData();return Lk("nameValue",{name:r.getName(e),value:r.get(r.mapDimension("value"),e)})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(rC);const tX=eX;function nX(e,t){e.eachSeriesByType("themeRiver",function(e){var t=e.getData(),n=e.coordinateSystem,r={},i=n.getRect();r.rect=i;var o=e.get("boundaryGap"),a=n.getAxis();(r.boundaryGap=o,"horizontal"===a.orient)?(o[0]=iv(o[0],i.height),o[1]=iv(o[1],i.height),rX(t,e,i.height-o[0]-o[1])):(o[0]=iv(o[0],i.width),o[1]=iv(o[1],i.width),rX(t,e,i.width-o[0]-o[1]));t.setLayout("layoutInfo",r)})}function rX(e,t,n){if(e.count())for(var r,i=t.coordinateSystem,o=t.getLayerSeries(),a=e.mapDimension("single"),s=e.mapDimension("value"),l=nh(o,function(t){return nh(t.indices,function(t){var n=i.dataToPoint(e.get(a,t));return n[1]=e.get(s,t),n})}),u=function(e){for(var t=e.length,n=e[0].length,r=[],i=[],o=0,a=0;a<n;++a){for(var s=0,l=0;l<t;++l)s+=e[l][a][1];s>o&&(o=s),r.push(s)}for(var u=0;u<n;++u)i[u]=(o-r[u])/2;o=0;for(var c=0;c<n;++c){var d=r[c]+i[c];d>o&&(o=d)}return{y0:i,max:o}}(l),c=u.y0,d=n/u.max,h=o.length,p=o[0].indices.length,f=0;f<p;++f){r=c[f]*d,e.setItemLayout(o[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:r,y:l[0][f][1]*d});for(var g=1;g<h;++g)r+=l[g-1][f][1]*d,e.setItemLayout(o[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:r,y:l[g][f][1]*d})}}const iX=function(e){function t(t,n,r,i){var o=e.call(this)||this;o.z2=2,o.textConfig={inside:!0},fb(o).seriesIndex=n.seriesIndex;var a=new pb({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,t,n,r,i),o}return kd(t,e),t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;var o=this;fb(o).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=Zd({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=qT(d,i));var h=nE(a.getModel("itemStyle"),u,!0);Zd(u,h),th(bb,function(e){var t=o.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var r=nE(n,u);r&&(t.shape=r)}),e?(o.setShape(u),o.shape.r=l.r0,mw(o,{shape:{r:l.r}},n,t.dataIndex)):(gw(o,{shape:u},n),ww(o)),o.useStyle(c),this._updateLabel(n);var p=a.getShallow("cursor");p&&o.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var f=s.get("focus");rw(this,"relative"===f?Lh(t.getAncestorsIndices(),t.getDescendantIndices()):"ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel("label"),i=this.node.getLayout(),o=i.endAngle-i.startAngle,a=(i.startAngle+i.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,h=r.get("minAngle")/180*Math.PI,p=r.get("show")&&!(null!=h&&Math.abs(o)<h);function f(e,t){var n=e.get(t);return null==n?r.get(t):n}c.ignore=!p,th(wb,function(r){var h="normal"===r?n.getModel("label"):n.getModel([r,"label"]),p="normal"===r,g=p?c:c.ensureState(r),m=e.getFormattedLabel(d,r);p&&(m=m||t.node.name),g.style=Mw(h,{},null,"normal"!==r,!0),m&&(g.style.text=m);var v=h.get("show");null==v||p||(g.ignore=!v);var y,x=f(h,"position"),b=p?u:u.states[r],w=b.style.fill;b.textConfig={outsideFill:"inherit"===h.get("color")?w:null,inside:"outside"!==x};var S=f(h,"distance")||0,_=f(h,"align"),A=f(h,"rotate"),k=.5*Math.PI,C=1.5*Math.PI,M=xx("tangential"===A?Math.PI/2-a:a),I=M>k&&!pv(M-k)&&M<C;"outside"===x?(y=i.r+S,_=I?"right":"left"):_&&"center"!==_?"left"===_?(y=i.r0+S,_=I?"right":"left"):"right"===_&&(y=i.r-S,_=I?"left":"right"):(y=o===2*Math.PI&&0===i.r0?0:(i.r+i.r0)/2,_="center"),g.style.align=_,g.style.verticalAlign=f(h,"verticalAlign")||"middle",g.x=y*s+i.cx,g.y=y*l+i.cy;var T=0;"radial"===A?T=xx(-a)+(I?Math.PI:0):"tangential"===A?T=xx(Math.PI/2-a)+(I?Math.PI:0):hh(A)&&(T=A*Math.PI/180),g.rotation=xx(T)}),c.dirtyStyle()},t}(YC);var oX="sunburstRootToNode",aX="sunburstHighlight";var sX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var o=e.getData(),a=o.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode(function(e){c.push(e)});var d=this._oldChildren||[];!function(r,i){if(0===r.length&&0===i.length)return;function s(e){return e.getId()}function c(s,c){!function(r,i){u||!r||r.getValue()||(r=null);if(r!==a&&i!==a)if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),o.setItemGraphicEl(r.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(i);else if(r){var s=new iX(r,e,t,n);l.add(s),o.setItemGraphicEl(r.dataIndex,s)}}(null==s?null:r[s],null==c?null:i[c])}new fL(i,r,s,s).add(c).update(c).remove(sh(c,null)).execute()}(c,d),function(r,o){o.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new iX(r,e,t,n),l.add(i.virtualPiece)),o.piece.off("click"),i.virtualPiece.on("click",function(e){i._rootToNode(o.parentNode)})):i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get("nodeClick");if("rootToNode"===i)e._rootToNode(r);else if("link"===i){var o=r.getModel(),a=o.get("link");if(a)HS(a,o.get("target",!0)||"_blank")}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:oX,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="sunburst",t}(pI);const lX=sX;function uX(e){var t=0;th(e.children,function(e){uX(e);var n=e.value;lh(n)&&(n=n[0]),t+=n});var n=e.value;lh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),lh(e.value)?e.value[0]=n:e.value=n}const cX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return kd(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};uX(n);var r=this._levelModels=nh(e.levels||[],function(e){return new Yw(e,this,t)},this),i=HF.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=i.getNodeByDataIndex(t),o=r[n.depth];return o&&(e.parentModel=o),e})});return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=YF(r,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){t$(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(rC);var dX=Math.PI/180;function hX(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get("center"),r=e.get("radius");lh(r)||(r=[0,r]),lh(t)||(t=[t,t]);var i=n.getWidth(),o=n.getHeight(),a=Math.min(i,o),s=iv(t[0],i),l=iv(t[1],o),u=iv(r[0],a/2),c=iv(r[1],a/2),d=-e.get("startAngle")*dX,h=e.get("minAngle")*dX,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&pX(f,m);var v=0;th(f.children,function(e){!isNaN(e.getValue())&&v++});var y=f.getValue(),x=Math.PI/(y||v)*2,b=f.depth>0,w=f.height-(b?-1:1),S=(c-u)/(w||1),_=e.get("clockwise"),A=e.get("stillShowZeroSum"),k=_?1:-1,C=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),o=0===y&&A?x:i*x;o<h&&(o=h),r=n+k*o;var c=t.depth-g-(b?-1:1),d=u+S*c,f=u+S*(c+1),m=e.getLevelModel(t);if(m){var v=m.get("r0",!0),w=m.get("r",!0),M=m.get("radius",!0);null!=M&&(v=M[0],w=M[1]),null!=v&&(d=iv(v,a/2)),null!=w&&(f=iv(w,a/2))}t.setLayout({angle:o,startAngle:n,endAngle:r,clockwise:_,cx:s,cy:l,r0:d,r:f})}if(t.children&&t.children.length){var I=0;th(t.children,function(e){I+=C(e,n+I)})}return r-n}};if(b){var M=u,I=u+S,T=2*Math.PI;p.setLayout({angle:T,startAngle:d,endAngle:d+T,clockwise:_,cx:s,cy:l,r0:M,r:I})}C(f,d)})}function pX(e,t){var n=e.children||[];e.children=function(e,t){if(uh(t)){var n=nh(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),nh(n,function(t){return e[t.index]})}var r="asc"===t;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(r?-1:1):n})}(n,t),n.length&&th(e.children,function(e){pX(e,t)})}function fX(e){var t={};e.eachSeriesByType("sunburst",function(e){var n=e.getData(),r=n.tree;r.eachNode(function(i){var o=i.getModel().getModel("itemStyle").getItemStyle();o.fill||(o.fill=function(e,n,r){for(var i=e;i&&i.depth>1;)i=i.parentNode;var o=n.getColorFromPalette(i.name||i.dataIndex+"",t);return e.depth>1&&ch(o)&&(o=cg(o,(e.depth-1)/(r-1)*.5)),o}(i,e,r.root.height)),Zd(n.ensureUniqueItemVisual(i.dataIndex,"style"),o)})})}var gX={color:"fill",borderColor:"stroke"},mX={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},vX=Fv();const yX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return YL(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=vX(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(rC);function xX(e,t){return t=t||[0,0],nh(["x","y"],function(n,r){var i=this.getAxis(n),o=t[r],a=e[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))},this)}function bX(e,t){return t=t||[0,0],nh([0,1],function(n){var r=t[n],i=e[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function wX(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function SX(e,t){return t=t||[0,0],nh(["Radius","Angle"],function(n,r){var i=this["get"+n+"Axis"](),o=t[r],a=e[r]/2,s="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function _X(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||Nh(e,"text")))}function AX(e,t,n){var r,i,o,a=e;if("text"===t)o=a;else{o={},Nh(a,"text")&&(o.text=a.text),Nh(a,"rich")&&(o.rich=a.rich),Nh(a,"textFill")&&(o.fill=a.textFill),Nh(a,"textStroke")&&(o.stroke=a.textStroke),Nh(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Nh(a,"fontSize")&&(o.fontSize=a.fontSize),Nh(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Nh(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},r={};var s=Nh(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),Nh(a,"textPosition")&&(r.position=a.textPosition),Nh(a,"textOffset")&&(r.offset=a.textOffset),Nh(a,"textRotation")&&(r.rotation=a.textRotation),Nh(a,"textDistance")&&(r.distance=a.textDistance)}return kX(o,e),th(o.rich,function(e){kX(e,e)}),{textConfig:r,textContent:i}}function kX(e,t){t&&(t.font=t.textFont||t.font,Nh(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Nh(t,"textAlign")&&(e.align=t.textAlign),Nh(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Nh(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Nh(t,"textWidth")&&(e.width=t.textWidth),Nh(t,"textHeight")&&(e.height=t.textHeight),Nh(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Nh(t,"textPadding")&&(e.padding=t.textPadding),Nh(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Nh(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Nh(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Nh(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Nh(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Nh(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Nh(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function CX(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var i=r.textPosition.indexOf("inside")>=0,o=e.fill||"#000";MX(r,t);var a=null==r.textFill;return i?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=o),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,th(t.rich,function(e){MX(e,e)}),r}function MX(e,t){t&&(Nh(t,"fill")&&(e.textFill=t.fill),Nh(t,"stroke")&&(e.textStroke=t.fill),Nh(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Nh(t,"font")&&(e.font=t.font),Nh(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Nh(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Nh(t,"fontSize")&&(e.fontSize=t.fontSize),Nh(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Nh(t,"align")&&(e.textAlign=t.align),Nh(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Nh(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Nh(t,"width")&&(e.textWidth=t.width),Nh(t,"height")&&(e.textHeight=t.height),Nh(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Nh(t,"padding")&&(e.textPadding=t.padding),Nh(t,"borderColor")&&(e.textBorderColor=t.borderColor),Nh(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Nh(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Nh(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Nh(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Nh(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Nh(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Nh(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Nh(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Nh(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Nh(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var IX={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},TX=oh(IX),DX=(rh(Cm,function(e,t){return e[t]=1,e},{}),Cm.join(", "),["","style","shape","extra"]),jX=Fv();function PX(e,t,n,r,i){var o=e+"Animation",a=pw(e,r,i)||{},s=jX(t).userDuring;return a.duration>0&&(a.during=s?ah(BX,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),Zd(a,n[o]),a}function LX(e,t,n,r){var i=(r=r||{}).dataIndex,o=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=jX(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var r=0;r<TX.length;r++){var i=TX[r],o=IX[i],a=t[i];a&&(n[o[0]]=a[0],n[o[1]]=a[1])}for(r=0;r<Cm.length;r++){var s=Cm[r];null!=t[s]&&(n[s]=t[s])}}(0,t,d),$X("shape",t,d),$X("extra",t,d),!o&&s&&(function(e,t,n){for(var r=t.transition,i=NX(r)?Cm:Iv(r||[]),o=0;o<i.length;o++){var a=i[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];0,n[a]=s}}}(e,t,c),FX("shape",e,t,c),FX("extra",e,t,c),function(e,t,n,r){if(!n)return;var i,o=e.style;if(o){var a=n.transition,s=t.transition;if(a&&!NX(a)){var l=Iv(a);!i&&(i=r.style={});for(var u=0;u<l.length;u++){var c=o[f=l[u]];i[f]=c}}else if(e.getAnimationStyleProps&&(NX(s)||NX(a)||Qd(s,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!i&&(i=r.style={});var p=oh(n);for(u=0;u<p.length;u++){var f;if(h[f=p[u]]){c=o[f];i[f]=c}}}}}}(e,t,u,c)),d.style=u,function(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,o=0;o<i.length;o++){var a=i[o];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}(e,d,a),function(e,t){Nh(t,"silent")&&(e.silent=t.silent),Nh(t,"ignore")&&(e.ignore=t.ignore),e instanceof Ly&&Nh(t,"invisible")&&(e.invisible=t.invisible);e instanceof Nx&&Nh(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}(e,t),s)if(o){var h={};th(DX,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(h[e]=h[e]||{}),Zd(e?h[e]:h,n.enterFrom))});var p=PX("enter",e,t,n,i);p.duration>0&&e.animateFrom(h,p)}else!function(e,t,n,r,i){if(i){var o=PX("update",e,t,r,n);o.duration>0&&e.animateFrom(i,o)}}(e,t,i||0,n,c);RX(e,t),u?e.dirty():e.markRedraw()}function RX(e,t){for(var n=jX(e).leaveToProps,r=0;r<DX.length;r++){var i=DX[r],o=i?t[i]:t;o&&o.leaveTo&&(n||(n=jX(e).leaveToProps={}),i&&(n[i]=n[i]||{}),Zd(i?n[i]:n,o.leaveTo))}}function EX(e,t,n,r){if(e){var i=e.parent,o=jX(e).leaveToProps;if(o){var a=PX("update",e,t,n,0);a.done=function(){i.remove(e),r&&r()},e.animateTo(o,a)}else i.remove(e),r&&r()}}function NX(e){return"all"===e}var OX={},zX={setTransform:function(e,t){return OX.el[e]=t,this},getTransform:function(e){return OX.el[e]},setShape:function(e,t){var n=OX.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=OX.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=OX.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=OX.el.style;if(t)return t[e]},setExtra:function(e,t){return(OX.el.extra||(OX.el.extra={}))[e]=t,this},getExtra:function(e){var t=OX.el.extra;if(t)return t[e]}};function BX(){var e=this,t=e.el;if(t){var n=jX(t).userDuring,r=e.userDuring;n===r?(OX.el=t,r(zX)):e.el=e.userDuring=null}}function FX(e,t,n,r){var i=n[e];if(i){var o,a=t[e];if(a){var s=n.transition,l=i.transition;if(l)if(!o&&(o=r[e]={}),NX(l))Zd(o,a);else for(var u=Iv(l),c=0;c<u.length;c++){var d=a[p=u[c]];o[p]=d}else if(NX(s)||Qd(s,e)>=0){!o&&(o=r[e]={});var h=oh(a);for(c=0;c<h.length;c++){var p;d=a[p=h[c]];VX(i[p],d)&&(o[p]=d)}}}}}function $X(e,t,n){var r=t[e];if(r)for(var i=n[e]={},o=oh(r),a=0;a<o.length;a++){var s=o[a];i[s]=Vg(r[s])}}function VX(e,t){return eh(e)?e!==t:null!=e&&isFinite(e)}var WX=Fv(),HX=["percent","easing","shape","style","extra"];function GX(e){e.stopAnimation("keyframe"),e.attr(WX(e))}function UX(e,t,n){if(n.isAnimationEnabled()&&t)if(lh(t))th(t,function(t){UX(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&null==i){var o=pw("enter",n,0);i=o&&o.duration}if(r&&i){var a=WX(e);th(DX,function(n){if(!n||e[n]){var o;r.sort(function(e,t){return e.percent-t.percent}),th(r,function(r){var s=e.animators,l=n?r[n]:r;if(l){var u=oh(l);if(n||(u=ih(u,function(e){return Qd(HX,e)<0})),u.length){o||((o=e.animate(n,t.loop,!0)).scope="keyframe");for(var c=0;c<s.length;c++)s[c]!==o&&s[c].targetName===o.targetName&&s[c].stopTracks(u);n&&(a[n]=a[n]||{});var d=n?a[n]:a;th(u,function(t){d[t]=((n?e[n]:e)||{})[t]}),o.whenWithKeys(i*r.percent,l,u,r.easing)}}}),o&&o.delay(t.delay||0).duration(i).start(t.easing)}})}}}var XX="emphasis",YX="normal",qX="blur",ZX="select",KX=[YX,XX,qX,ZX],QX={normal:["itemStyle"],emphasis:[XX,"itemStyle"],blur:[qX,"itemStyle"],select:[ZX,"itemStyle"]},JX={normal:["label"],emphasis:[XX,"label"],blur:[qX,"label"],select:[ZX,"label"]},eY=["x","y"],tY={normal:{},emphasis:{},blur:{},select:{}},nY={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:ah(xX,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:ah(bX,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:ah(wX,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=e.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:ah(SX,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function rY(e){return e instanceof Nx}function iY(e){return e instanceof Ly}const oY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,o=e.getData(),a=this.group,s=cY(e,o,t,n);i||a.removeAll(),o.diff(i).add(function(t){hY(n,null,t,s(t,r),e,a,o)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&EX(n,vX(n).option,e)}).update(function(t,l){var u=i.getItemGraphicEl(l);hY(n,u,t,s(t,r),e,a,o)}).execute();var l=e.get("clip",!0)?xR(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var o=t.getData(),a=cY(t,o,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u<e.end;u++){var c=hY(null,null,u,a(u,i),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){iI(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type="custom",t}(pI);function aY(e){var t,n=e.type;if("path"===n){var r=e.shape,i=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=SY(r);t=OM(o,null,i,r.layout||"center"),vX(t).customPathData=o}else if("image"===n)t=new Wx({}),vX(t).customImagePath=e.style.image;else if("text"===n)t=new pb({});else if("group"===n)t=new Zm;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=NM(n);if(!a){0,qA("")}t=new a}return vX(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function sY(e,t,n,r,i,o,a){GX(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&null==r.transition&&(r.transition=eY);var l=r&&r.style;if(l){if("text"===t.type){var u=l;Nh(u,"textFill")&&(u.fill=u.textFill),Nh(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=rY(t)?l.decal:null;e&&d&&(d.dirty=!0,c=qT(d,e)),l.__decalPattern=c}iY(t)&&(l&&(c=l.__decalPattern)&&(l.decal=c));LX(t,r,o,{dataIndex:n,isInit:a,clearStyle:!0}),UX(t,r.keyframeAnimation,o)}function lY(e,t,n,r,i){var o=t.isGroup?null:t,a=i&&i[e].cfg;if(o){var s=o.ensureState(e);if(!1===r){var l=o.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),Fb(o)}}function uY(e,t,n){var r=n===YX,i=r?t:mY(t,n),o=i?i.z2:null;null!=o&&((r?e:e.ensureState(n)).z2=o||0)}function cY(e,t,n,r){var i=e.get("renderItem"),o=e.coordinateSystem,a={};o&&(a=o.prepareCustoms?o.prepareCustoms(o):nY[o.type](o));for(var s,l,u=Kd({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){0;null==r&&(r=s);var i=t.getItemVisual(r,"style"),o=i&&i.fill,a=i&&i.opacity,l=y(r,YX).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var u={inheritColor:ch(o)?o:"#000"},c=x(r,YX),d=Mw(c,null,u,!1,!0);d.text=c.getShallow("show")?bh(e.getFormattedLabel(r,YX),ZL(t,r)):null;var h=Iw(c,u,!1);return w(n,l),l=CX(l,d,h),n&&b(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=s),e=e||0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var o=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,r){0;null==r&&(r=s);var i=y(r,XX).getItemStyle(),o=x(r,XX),a=Mw(o,null,null,!0,!0);a.text=o.getShallow("show")?wh(e.getFormattedLabel(r,XX),e.getFormattedLabel(r,YX),ZL(t,r)):null;var l=Iw(o,null,!0);return w(n,i),i=CX(i,a,l),n&&b(i,n),i.legacy=!0,i},visual:function(e,n){if(null==n&&(n=s),Nh(gX,e)){var r=t.getItemVisual(n,"style");return r?r[gX[e]]:null}if(Nh(mX,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===o.type){return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<e.count;o++)t.push(Kd({bandWidth:i,axisKey:r,stackId:zR+o},e));var a=WR(t),s=[];for(o=0;o<e.count;o++){var l=a[r][zR+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(Kd({axis:o.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return Lw(e,n)}},a.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:dY(e.getData())},d={},h={},p={},f={},g=0;g<KX.length;g++){var m=KX[g];p[m]=e.getModel(QX[m]),f[m]=e.getModel(JX[m])}function v(e){return e===s?l||(l=t.getItemModel(e)):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===s?d[n]||(d[n]=v(e).getModel(QX[n])):v(e).getModel(QX[n]):p[n]}function x(e,n){return t.hasItemOption?e===s?h[n]||(h[n]=v(e).getModel(JX[n])):v(e).getModel(JX[n]):f[n]}return function(e,n){return s=e,l=null,d={},h={},i&&i(Kd({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),u)};function b(e,t){for(var n in t)Nh(t,n)&&(e[n]=t[n])}function w(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function dY(e){var t={};return th(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim;(t[i]=t[i]||[])[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function hY(e,t,n,r,i,o,a){if(r){var s=pY(e,t,n,r,i,o);return s&&a.setItemGraphicEl(n,s),s&&rw(s,r.focus,r.blurScope,r.emphasisDisabled),s}o.remove(t)}function pY(e,t,n,r,i,o){var a=-1,s=t;t&&fY(t,r,i)&&(a=Qd(o.childrenRef(),t),t=null);var l,u,c=!t,d=t;d?d.clearStates():(d=aY(r),s&&(l=s,(u=d).copyTransform(l),iY(u)&&iY(l)&&(u.setStyle(l.style),u.z=l.z,u.z2=l.z2,u.zlevel=l.zlevel,u.invisible=l.invisible,u.ignore=l.ignore,rY(u)&&rY(l)&&u.setShape(l.shape)))),!1===r.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),tY.normal.cfg=tY.normal.conOpt=tY.emphasis.cfg=tY.emphasis.conOpt=tY.blur.cfg=tY.blur.conOpt=tY.select.cfg=tY.select.conOpt=null,tY.isLegacy=!1,function(e,t,n,r,i,o){if(e.isGroup)return;gY(n,null,o),gY(n,XX,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=aY(a),e.setTextContent(c)),sY(null,c,t,a,null,r,i);for(var d=a&&a.style,h=0;h<KX.length;h++){var p=KX[h];if(p!==YX){var f=o[p].conOpt;lY(p,c,0,vY(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}(d,n,r,i,c,tY),function(e,t,n,r,i){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&fY(a,o,r)&&(a=null),a||(a=aY(o),e.setClipPath(a)),sY(null,a,t,o,null,r,i)}}(d,n,r,i,c),sY(e,d,n,r,tY,i,c),Nh(r,"info")&&(vX(d).info=r.info);for(var h=0;h<KX.length;h++){var p=KX[h];if(p!==YX){var f=mY(r,p);lY(p,d,0,vY(r,f,p),tY)}}return function(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,o=n.currentZLevel;r.z=i,r.zlevel=o;var a=t.z2;null!=a&&(r.z2=a||0);for(var s=0;s<KX.length;s++)uY(r,t,KX[s])}}(d,r,i),"group"===r.type&&function(e,t,n,r,i){var o=r.children,a=o?o.length:0,s=r.$mergeChildren,l="byName"===s||r.diffChildrenByName,u=!1===s;if(!a&&!l&&!u)return;if(l)return c={api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:i,group:t},void new fL(c.oldChildren,c.newChildren,xY,xY,c).add(bY).update(bY).remove(wY).execute();var c;u&&t.removeAll();for(var d=0;d<a;d++){var h=o[d],p=t.childAt(d);h?(null==h.ignore&&(h.ignore=!1),pY(e,p,n,h,i,t)):p.ignore=!0}for(var f=t.childCount()-1;f>=d;f--){var g=t.childAt(f);yY(t,g,i)}}(e,d,n,r,i),a>=0?o.replaceAt(d,a):o.add(d),d}function fY(e,t,n){var r,i=vX(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&((r=a)&&(Nh(r,"pathData")||Nh(r,"d")))&&SY(a)!==i.customPathData||"image"===o&&Nh(s,"image")&&s.image!==i.customImagePath}function gY(e,t,n){var r=t?mY(e,t):e,i=t?vY(e,r,XX):e.style,o=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?mY(s,t):s:null;if(i&&(n.isLegacy||_X(i,o,!!a,!!l))){n.isLegacy=!0;var u=AX(i,o,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function mY(e,t){return t?e?e[t]:null:e}function vY(e,t,n){var r=t&&t.style;return null==r&&n===XX&&e&&(r=e.styleEmphasis),r}function yY(e,t,n){t&&EX(t,vX(e).option,n)}function xY(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function bY(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;pY(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function wY(e){var t=this.context,n=t.oldChildren[e];n&&EX(n,vX(n).option,t.seriesModel)}function SY(e){return e&&(e.pathData||e.d)}var _Y=Fv(),AY=Xd,kY=ah,CY=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=sh(MY,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Zm,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);jY(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=FO(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=_Y(e).pointerEl=new Bt[i.type](AY(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=_Y(e).labelEl=new pb(AY(t.label));e.add(i),TY(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=_Y(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=_Y(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),TY(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=QM(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){kp(e.event)},onmousedown:kY(this._onHandleDragMove,this,0,0),drift:kY(this._onHandleDragMove,this),ondragend:kY(this._onHandleDragEnd,this)}),r.add(i)),jY(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");lh(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,yI(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){MY(this._axisPointerModel,!t&&this._moveAnimation,this._handle,DY(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(DY(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(DY(r)),_Y(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),xI(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 MY(e,t,n,r){IY(_Y(n).lastProp,r)||(_Y(n).lastProp=r,t?gw(n,r,e):(n.stopAnimation(),n.attr(r)))}function IY(e,t){if(ph(e)&&ph(t)){var n=!0;return th(t,function(t,r){n=n&&IY(e[r],t)}),!!n}return e===t}function TY(e,t){e[t.get(["label","show"])?"show":"hide"]()}function DY(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function jY(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)})}const PY=CY;function LY(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}function RY(e,t,n,r,i){var o=EY(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=zS(a.get("padding")||0),l=a.getFont(),u=Pm(o,l),c=i.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=i.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/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,h,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Mw(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function EY(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:qN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};th(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),ch(a)?o=a.replace("{value}",o):uh(a)&&(o=a(s))}return o}function NY(e,t,n){var r=[1,0,0,1,0,0];return Ep(r,r,n.rotation),Rp(r,r,n.position),UM([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function OY(e,t,n,r,i,o){var a=OO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),RY(t,r,i,o,{position:NY(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function zY(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function BY(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function FY(e,t,n,r,i,o){return{cx:e,cy:t,r0:n,r:r,startAngle:i,endAngle:o,clockwise:!0}}var $Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=VY(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=LY(r),d=WY[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}OY(t,e,bO(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=bO(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=NY(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=VY(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}(PY);function VY(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var WY={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:zY([t,n[0]],[t,n[1]],HY(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:BY([t-r/2,n[0]],[r,i],HY(e))}}};function HY(e){return"x"===e.dim?0:1}const GY=$Y;const UY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(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}(i_);var XY=Fv(),YY=th;function qY(e,t,n){if(!Id.node){var r=t.getZr();XY(r).records||(XY(r).records={}),function(e,t){if(XY(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);YY(XY(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)})}XY(e).initialized=!0,n("click",sh(KY,"click")),n("mousemove",sh(KY,"mousemove")),n("globalout",ZY)}(r,t),(XY(r).records[e]||(XY(r).records[e]={})).handler=n}}function ZY(e,t,n){e.handler("leave",null,n)}function KY(e,t,n,r){t.handler(e,n,r)}function QY(e,t){if(!Id.node){var n=t.getZr();(XY(n).records||{})[e]&&(XY(n).records[e]=null)}}var JY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";qY("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){QY("axisPointer",t)},t.prototype.dispose=function(e,t){QY("axisPointer",t)},t.type="axisPointer",t}(oC);const eq=JY;function tq(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Bv(o,e);if(null==a||a<0||lh(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,h="x"===c||"radius"===c?1:0,p=o.mapDimension(d),f=[];f[h]=o.get(p,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(nh(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 nq=Fv();function rq(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||ah(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){lq(i)&&(i=tq({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=lq(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||lq(i),h={},p={},f={list:[],map:{}},g={showPointer:sh(oq,p),showTooltip:sh(aq,f)};th(s.coordSysMap,function(e,t){var n=l||e.containPoint(i);th(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&&iq(e,a,g,!1,h)}})});var m={};return th(c,function(e,t){var n=e.linkGroup;n&&!p[t]&&th(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,sq(t),sq(e)))),m[e.key]=o}})}),th(m,function(e,t){iq(c[t],e,g,!0,h)}),function(e,t,n){var r=n.axesInfo=[];th(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})})}(p,c,h),function(e,t,n,r){if(lq(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=nq(r)[i]||{},a=nq(r)[i]={};th(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&th(n.seriesDataIndices,function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e})});var s=[],l=[];th(o,function(e,t){!a[t]&&l.push(e)}),th(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),h}}function iq(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 th(t.seriesModels,function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.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 p=e-u,f=Math.abs(p);f<=a&&((f<a||p>=0&&s<0)&&(a=f,s=p,i=u,o.length=0),th(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&&Zd(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 oq(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function aq(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=VO(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 sq(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 lq(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function uq(e){GO.registerAxisPointerClass("CartesianAxisPointer",GY),e.registerComponentModel(UY),e.registerComponentView(eq),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!lh(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=zO(e,t)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},rq)}var cq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(t),u=r.get("type");if(u&&"none"!==u){var c=LY(r),d=dq[u](o,a,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}var h=function(e,t,n,r,i){var o=t.axis,a=o.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=r.getRadiusAxis().getExtent();if("radius"===o.dim){var h=[1,0,0,1,0,0];Ep(h,h,s),Rp(h,h,[r.cx,r.cy]),l=UM([a,-i],h);var p=t.getModel("axisLabel").get("rotate")||0,f=OO.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=r.coordToPoint([g+i,a]);var m=r.cx,v=r.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,a,r.get(["label","margin"]));RY(e,n,r,i,h)},t}(PY);var dq={line:function(e,t,n,r){return"angle"===e.dim?{type:"Line",shape:zY(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var i=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:FY(t.cx,t.cy,r[0],r[1],(-n-i/2)*o,(i/2-n)*o)}:{type:"Sector",shape:FY(t.cx,t.cy,n-i/2,n+i/2,0,2*Math.PI)}}};const hq=cq;const pq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(i_);var fq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Hv).models[0]},t.type="polarAxis",t}(i_);Jd(fq,XE);var gq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="angleAxis",t}(fq),mq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="radiusAxis",t}(fq),vq=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return kd(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(vO);vq.prototype.dataToRadius=vO.prototype.dataToCoord,vq.prototype.radiusToData=vO.prototype.coordToData;const yq=vq;var xq=Fv(),bq=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return kd(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var o=r[0],a=e.dataToCoord(o+1)-e.dataToCoord(o),s=Math.abs(a),l=Pm(null==o?"":o+"",t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=xq(e.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-i)<=1&&h>c?c=h:(d.lastTickCount=i,d.lastAutoInterval=c),c},t}(vO);bq.prototype.dataToAngle=vO.prototype.dataToCoord,bq.prototype.angleToData=vO.prototype.coordToData;const wq=bq;var Sq=["radius","angle"],_q=function(){function e(e){this.dimensions=Sq,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new yq,this._angleAxis=new wq,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);r.inverse?o=a-360:a=o+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<o?1:-1;l<o||l>a;)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,o=n*n+r*r,a=this.r,s=this.r0;return a!==s&&o-i<=a*a&&o+i>=s*s}}},e.prototype.convertToPixel=function(e,t,n){return Aq(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return Aq(t)===this?this.pointToData(n):null},e}();function Aq(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}const kq=_q;function Cq(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(e){if(e.coordinateSystem===n){var t=e.getData();th(JN(t,"radius"),function(e){i.scale.unionExtentFromData(t,e)}),th(JN(t,"angle"),function(e){r.scale.unionExtentFromData(t,e)})}}),UN(r.scale,r.model),UN(i.scale,i.model),"category"===r.type&&!r.onBand){var o=r.getExtent(),a=360/r.scale.count();r.inverse?o[1]+=a:o[1]-=a,r.setExtent(o[0],o[1])}}function Mq(e,t){var n;if(e.type=t.get("type"),e.scale=XN(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle"),i=null!==(n=t.get("endAngle"))&&void 0!==n?n:r+(e.inverse?-360:360);e.setExtent(r,i)}t.axis=e,e.model=t}var Iq={dimensions:Sq,create:function(e,t){var n=[];return e.eachComponent("polar",function(e,r){var i=new kq(r+"");i.update=Cq;var o=i.getRadiusAxis(),a=i.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");Mq(o,s),Mq(a,l),function(e,t,n){var r=t.get("center"),i=n.getWidth(),o=n.getHeight();e.cx=iv(r[0],i),e.cy=iv(r[1],o);var a=e.getRadiusAxis(),s=Math.min(i,o)/2,l=t.get("radius");null==l?l=[0,"100%"]:lh(l)||(l=[0,l]);var u=[iv(l[0],s),iv(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",Hv).models[0];0,e.coordinateSystem=t.coordinateSystem}}),n}};const Tq=Iq;var Dq=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function jq(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function Pq(e){return e.getRadiusAxis().inverse?0:1}function Lq(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var Rq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return kd(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=nh(n.getViewLabels(),function(e){e=Xd(e);var t=n.scale,r="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e});Lq(s),Lq(o),th(Dq,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||Eq[t](this.group,e,r,o,a,i,s)},this)}},t.type="angleAxis",t}(GO),Eq={axisLine:function(e,t,n,r,i,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=Pq(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===o[h]?new Bt[p]({shape:{cx:n.cx,cy:n.cy,r:o[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new KC({shape:{cx:n.cx,cy:n.cy,r:o[d],r0:o[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,n,r,i,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[Pq(n)],u=nh(r,function(e){return new lM({shape:jq(n,[l,l+s],e.coord)})});e.add(FM(u,{style:Kd(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,r,i,o){if(i.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[Pq(n)],c=[],d=0;d<i.length;d++)for(var h=0;h<i[d].length;h++)c.push(new lM({shape:jq(n,[u,u+l],i[d][h].coord)}));e.add(FM(c,{style:Kd(s.getModel("lineStyle").getLineStyle(),Kd(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,n,r,i,o,a){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");th(a,function(r,i){var a=l,d=r.tickValue,h=o[Pq(n)],p=n.coordToPoint([h+u,r.coord]),f=n.cx,g=n.cy,m=Math.abs(p[0]-f)/h<.3?"center":p[0]>f?"left":"right",v=Math.abs(p[1]-g)/h<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[d]){var y=s[d];ph(y)&&y.textStyle&&(a=new Yw(y.textStyle,l,l.ecModel))}var x=new pb({silent:OO.isLabelSilent(t),style:Mw(a,{x:p[0],y:p[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:m,verticalAlign:v})});if(e.add(x),c){var b=OO.makeAxisEventDataBase(t);b.targetType="axisLabel",b.value=r.rawLabel,fb(x).eventData=b}},this)},splitLine:function(e,t,n,r,i,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<r.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new lM({shape:jq(n,o,r[c].coord)}))}for(c=0;c<u.length;c++)e.add(FM(u[c],{style:Kd({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,n,r,i,o){if(i.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<i.length;l++)for(var u=0;u<i[l].length;u++)s.push(new lM({shape:jq(n,o,i[l][u].coord)}));e.add(FM(s,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,n,r,i,o){if(r.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-r[0].coord*c,h=Math.min(o[0],o[1]),p=Math.max(o[0],o[1]),f=t.get("clockwise"),g=1,m=r.length;g<=m;g++){var v=g===m?r[0].coord:r[g].coord,y=l++%s.length;u[y]=u[y]||[],u[y].push(new YC({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-v*c,clockwise:f},silent:!0})),d=-v*c}for(g=0;g<u.length;g++)e.add(FM(u[g],{style:Kd({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}};const Nq=Rq;var Oq=["axisLine","axisTickLabel","axisName"],zq=["splitLine","splitArea","minorSplitLine"],Bq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return kd(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,r=this._axisGroup=new Zm;this.group.add(r);var i=e.axis,o=i.polar,a=o.getAngleAxis(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=a.getExtent()[0],c=i.getExtent(),d=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(o,e,u),h=new OO(e,d);th(Oq,h.add,h),r.add(h.getGroup()),qM(n,r,e),th(zq,function(t){e.get([t,"show"])&&!i.scale.isBlank()&&Fq[t](this.group,e,o,u,c,s,l)},this)}},t.type="radiusAxis",t}(GO),Fq={splitLine:function(e,t,n,r,i,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),h=360===Math.abs(d[1]-d[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var p=[],f=0;f<o.length;f++){var g=l++%s.length;p[g]=p[g]||[],p[g].push(new Bt[h]({shape:{cx:n.cx,cy:n.cy,r:Math.max(o[f].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(f=0;f<p.length;f++)e.add(FM(p[f],{style:Kd({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,r,i,o,a){if(a.length){for(var s=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new TC({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));e.add(FM(l,{style:Kd({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,r,i,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=o[0].coord,d=1;d<o.length;d++){var h=l++%s.length;u[h]=u[h]||[],u[h].push(new YC({shape:{cx:n.cx,cy:n.cy,r0:c,r:o[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=o[d].coord}for(d=0;d<u.length;d++)e.add(FM(u[d],{style:Kd({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};const $q=Bq;function Vq(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function Wq(e,t){return t.dim+e.model.componentIndex}const Hq=function(e,t,n){var r={},i=function(e){var t={};th(e,function(e,n){var r=e.getData(),i=e.coordinateSystem,o=i.getBaseAxis(),a=Wq(i,o),s=o.getExtent(),l="category"===o.type?o.getBandWidth():Math.abs(s[1]-s[0])/r.count(),u=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var d=Vq(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=iv(e.get("barWidth"),l),p=iv(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");h&&!c[d].width&&(h=Math.min(u.remainedWidth,h),c[d].width=h,u.remainedWidth-=h),p&&(c[d].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return th(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=iv(e.categoryGap,i),a=iv(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),th(r,function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var c,d=0;th(r,function(e,t){e.width||(e.width=u),c=e,d+=e.width*(1+a)}),c&&(d-=c.width*a);var h=-d/2;th(r,function(e,r){n[t][r]=n[t][r]||{offset:h,width:e.width},h+=e.width*(1+a)})}),n}(ih(t.getSeriesByType(e),function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type}));t.eachSeriesByType(e,function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,o=n.getBaseAxis(),a=Wq(n,o),s=Vq(e),l=i[a][s],u=l.offset,c=l.width,d=n.getOtherAxis(o),h=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;r[s]=r[s]||[];for(var m=t.mapDimension(d.dim),v=t.mapDimension(o.dim),y=UL(t,m),x="radius"!==o.dim||!e.get("roundCap",!0),b=d.model.get("startValue"),w=d.dataToCoord(b||0),S=0,_=t.count();S<_;S++){var A=t.get(m,S),k=t.get(v,S),C=A>=0?"p":"n",M=w;y&&(r[s][k]||(r[s][k]={p:w,n:w}),M=r[s][k][C]);var I=void 0,T=void 0,D=void 0,j=void 0;if("radius"===d.dim){var P=d.dataToCoord(A)-w,L=o.dataToCoord(k);Math.abs(P)<f&&(P=(P<0?-1:1)*f),I=M,T=M+P,j=(D=L-u)-c,y&&(r[s][k][C]=T)}else{var R=d.dataToCoord(A,x)-w,E=o.dataToCoord(k);Math.abs(R)<g&&(R=(R<0?-1:1)*g),T=(I=E+u)+c,D=M,j=M+R,y&&(r[s][k][C]=j)}t.setItemLayout(S,{cx:h,cy:p,r0:I,r:T,startAngle:-D*Math.PI/180,endAngle:-j*Math.PI/180,clockwise:D>=j})}}})};var Gq={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Uq={splitNumber:5},Xq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="polar",t}(oC);function Yq(e,t){t=t||{};var n=e.coordinateSystem,r=e.axis,i={},o=r.position,a=r.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];i.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),xh(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=t.rotate;return null==c&&(c=e.get(["axisLabel","rotate"])),i.labelRotation="top"===o?-c:c,i.z2=1,i}var qq=["axisLine","axisTickLabel","axisName"],Zq=["splitArea","splitLine"],Kq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return kd(t,e),t.prototype.render=function(t,n,r,i){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Zm;var s=Yq(t),l=new OO(t,s);th(qq,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),th(Zq,function(e){t.get([e,"show"])&&Qq[e](this,this.group,this._axisGroup,t)},this),qM(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)},t.prototype.remove=function(){YO(this)},t.type="singleAxis",t}(GO),Qq={splitLine:function(e,t,n,r){var i=r.axis;if(!i.scale.isBlank()){var o=r.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=r.coordinateSystem.getRect(),c=i.isHorizontal(),d=[],h=0,p=i.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m<p.length;++m){var v=i.toGlobalCoord(p[m].coord);c?(f[0]=v,f[1]=u.y,g[0]=v,g[1]=u.y+u.height):(f[0]=u.x,f[1]=v,g[0]=u.x+u.width,g[1]=v);var y=new lM({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});VM(y.shape,l);var x=h++%s.length;d[x]=d[x]||[],d[x].push(y)}var b=a.getLineStyle(["color"]);for(m=0;m<d.length;++m)t.add(FM(d[m],{style:Kd({stroke:s[m%s.length]},b),silent:!0}))}},splitArea:function(e,t,n,r){XO(e,n,r,r)}};const Jq=Kq;var eZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(i_);Jd(eZ,XE.prototype);const tZ=eZ;const nZ=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.type=i||"value",a.position=o||"bottom",a}return kd(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(vO);var rZ=["single"],iZ=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=rZ,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=this.dimension,i=new nZ(r,XN(e),[0,0],e.get("type"),e.get("position")),o="category"===i.type;i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},e.prototype.update=function(e,t){e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();th(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),UN(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){this._rect=ZS({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),r=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(r[i],r[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),r=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=i?function(e){return e-t}:function(e){return r-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),r=[],i="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[i]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,r},e.prototype.convertToPixel=function(e,t,n){return oZ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return oZ(t)===this?this.pointToData(n):null},e}();function oZ(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}const aZ=iZ;const sZ={create:function(e,t){var n=[];return e.eachComponent("singleAxis",function(r,i){var o=new aZ(r,e,t);o.name="single_"+i,o.resize(r,t),r.coordinateSystem=o,n.push(o)}),e.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",Hv).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n},dimensions:rZ};var lZ=["x","y"],uZ=["width","height"],cZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.coordinateSystem,s=pZ(a,1-hZ(o)),l=a.dataToPoint(t)[0],u=r.get("type");if(u&&"none"!==u){var c=LY(r),d=dZ[u](o,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}OY(t,e,Yq(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=Yq(t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=NY(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.coordinateSystem,a=hZ(i),s=pZ(o,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=pZ(o,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(PY),dZ={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:zY([t,n[0]],[t,n[1]],hZ(e))}},shadow:function(e,t,n){var r=e.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:BY([t-r/2,n[0]],[r,i],hZ(e))}}};function hZ(e){return e.isHorizontal()?0:1}function pZ(e,t){var n=e.getRect();return[n[lZ[t]],n[lZ[t]]+n[uZ[t]]]}const fZ=cZ;var gZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="single",t}(oC);function mZ(e,t){var n,r=e.cellSize;1===(n=lh(r)?r:e.cellSize=[r,r]).length&&(n[1]=n[0]);var i=nh([0,1],function(e){return function(e,t){return null!=e[XS[t][0]]||null!=e[XS[t][1]]&&null!=e[XS[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]});JS(e,t,{type:"box",ignoreSize:i})}const vZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(t,n,r){var i=e_(t);e.prototype.init.apply(this,arguments),mZ(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),mZ(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(i_);var yZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,o=i.getRangeInfo(),a=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,o,r),this._renderLines(e,o,a,r),this._renderYearText(e,o,a,r),this._renderMonthText(e,s,a,r),this._renderWeekText(e,s,o,a,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),a=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var l=r.dataToRect([s],!1).tl,u=new Kx({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:i});n.add(u)}},t.prototype._renderLines=function(e,t,n,r){var i=this,o=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){h(u.formatedDate),0===c&&(u=o.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=o.getDateInfo(d)}function h(t){i._firstDayOfMonth.push(o.getDateInfo(t)),i._firstDayPoints.push(o.dataToRect([t],!1).tl);var l=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(l[0]),i._blpoints.push(l[l.length-1]),s&&i._drawSplitline(l,a,r)}h(o.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,n),a,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,n),a,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i="horizontal"===n?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new iM({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),o=[],a=0;a<7;a++){var s=r.getNextNDay(i.time,a),l=r.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},t.prototype._formatterLabel=function(e,t){return ch(e)&&e?(n=e,th(t,function(e,t){n=n.replace("{"+t+"}",r?gp(e):e)}),n):uh(e)?e(t):t.nameMap;var n,r},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var o=t[0],a=t[1],s=["center","bottom"];"bottom"===r?(a+=i,s=["center","top"]):"left"===r?o-=i:"right"===r?(o+=i,s=["center","top"]):a-=i;var l=0;return"left"!==r&&"right"!==r||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),a=i.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=t.start.y;+t.end.y>+t.start.y&&(h=h+"-"+t.end.y);var p=i.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:h},g=this._formatterLabel(p,f),m=new pb({z2:30,style:Mw(i,{text:g}),silent:i.get("silent")});m.attr(this._yearTextPositionControl(m,d[a],n,a,o)),r.add(m)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var o="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=i,t&&(o="center"),"start"===r&&(a="bottom")):(s+=i,t&&(a="middle"),"start"===r&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),s=i.get("position"),l=i.get("align"),u=[this._tlpoints,this._blpoints];o&&!ch(o)||(o&&(t=oS(o)||t),o=t.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,d="horizontal"===n?0:1;a="start"===s?-a:a;for(var h="center"===l,p=i.get("silent"),f=0;f<u[c].length-1;f++){var g=u[c][f].slice(),m=this._firstDayOfMonth[f];if(h){var v=this._firstDayPoints[f];g[d]=(v[d]+u[0][f+1][d])/2}var y=i.get("formatter"),x=o[+m.m-1],b={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:x},w=this._formatterLabel(y,b),S=new pb({z2:30,style:Zd(Mw(i,{text:w}),this._monthTextPositionControl(g,h,n,s,a)),silent:p});r.add(S)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var o="center",a="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+r+(u?1:-1)*i[0]/2,o=u?"right":"left"):(l=l+r+(u?1:-1)*i[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderWeekText=function(e,t,n,r,i){var o=e.getModel("dayLabel");if(o.get("show")){var a=e.coordinateSystem,s=o.get("position"),l=o.get("nameMap"),u=o.get("margin"),c=a.getFirstDayOfWeek();if(!l||ch(l))l&&(t=oS(l)||t),l=t.get(["time","dayOfWeekShort"])||nh(t.get(["time","dayOfWeekAbbr"]),function(e){return e[0]});var d=a.getNextNDay(n.end.time,7-n.lweek).time,h=[a.getCellWidth(),a.getCellHeight()];u=iv(u,Math.min(h[1],h[0])),"start"===s&&(d=a.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var p=o.get("silent"),f=0;f<7;f++){var g,m=a.getNextNDay(d,f),v=a.dataToRect([m.time],!1).center;g=Math.abs((f+c)%7);var y=new pb({z2:30,style:Zd(Mw(o,{text:l[g]}),this._weekTextPositionControl(v,r,s,u,h)),silent:p});i.add(y)}}},t.type="calendar",t}(oC);const xZ=yZ;var bZ=864e5;function wZ(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}const SZ=function(){function e(t,n,r){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){var t=(e=gv(e)).getFullYear(),n=e.getMonth()+1,r=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,a=e.getDay();return{y:t+"",m:r,d:o,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+r+"-"+o,date:e}},e.prototype.getNextNDay=function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},e.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];th([0,1],function(e){u(i,e)&&(o[r[e]]=i[e]*a[e])});var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=ZS(o,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}th([0,1],function(e){u(i,e)||(i[e]=l[r[e]]/a[e])}),this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t){lh(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),r=this._rangeInfo,i=n.formatedDate;if(t&&!(n.time>=r.start.time&&n.time<r.end.time+bZ))return[NaN,NaN];var o=n.day,a=this._getRangeInfo([r.start.time,i]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=wZ(t);return r===this?r.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=wZ(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(lh(t)&&1===t.length&&(t=t[0]),lh(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);e=[r.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return t;var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var r=Math.floor(n[1].time/bZ)-Math.floor(n[0].time/bZ)+1,i=new Date(n[0].time),o=i.getDate(),a=n[1].date.getDate();i.setDate(o+r-1);var s=i.getDate();if(s!==a)for(var l=i.getTime()-n[1].time>0?1:-1;(s=i.getDate())!==a&&(i.getTime()-n[1].time)*l>0;)r-=l,i.setDate(s-l);var u=Math.floor((r+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||0===e&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=7*(e-1)-r.fweek+t,o=new Date(r.start.time);return o.setDate(+r.start.d+i),this.getDateInfo(o)},e.create=function(t,n){var r=[];return t.eachComponent("calendar",function(i){var o=new e(i,t,n);r.push(o),i.coordinateSystem=o}),t.eachSeries(function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("calendarIndex")||0])}),r},e.dimensions=["time","value"],e}();function _Z(e,t){var n;return th(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}var AZ=["transition","enterFrom","leaveTo"],kZ=AZ.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function CZ(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?AZ:kZ,i=0;i<r.length;i++){var o=r[i];null==e[o]&&null!=t[o]&&(e[o]=t[o])}}var MZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return kd(t,e),t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,o=[];this._flatten(r,o,null);var a=Lv(i,o,"normalMerge"),s=this._elOptionsToUpdate=[];th(a,function(e,t){var n=e.newOption;n&&(s.push(n),function(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var r=Zd({},n),i=e[t],o=n.$action||"merge";"merge"===o?i?(Yd(i,r,!0),JS(i,r,{ignoreSize:!0}),t_(n,i),CZ(n,i),CZ(n,i,"shape"),CZ(n,i,"style"),CZ(n,i,"extra"),n.clipPath=i.clipPath):e[t]=r:"replace"===o?e[t]=r:"remove"===o&&i&&(e[t]=null)}(i,t,n),function(e,t){if(e&&(e.hv=t.hv=[_Z(t,["left","right"]),_Z(t,["top","bottom"])],"group"===e.type)){var n=e,r=t;null==n.width&&(n.width=r.width=0),null==n.height&&(n.height=r.height=0)}}(i[t],n))},this),n.elements=ih(i,function(e){return e&&delete e.$action,null!=e})},t.prototype._flatten=function(e,t,n){th(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(i_),IZ={path:null,compoundPath:null,group:Zm,image:Wx,text:pb},TZ=Fv(),DZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(){this._elMap=Ph()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,i=e.get("z"),o=e.get("zlevel");th(t,function(t){var a=Nv(t.id,null),s=null!=a?n.get(a):null,l=Nv(t.parentId,null),u=null!=l?n.get(l):r,c=t.type,d=t.style;"text"===c&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var h=t.textContent,p=t.textConfig;if(d&&_X(d,c,!!p,!!h)){var f=AX(d,c,!0);!p&&f.textConfig&&(p=t.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(e){return e=Zd({},e),th(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(US),function(t){delete e[t]}),e}(t);var m=t.$action||"merge",v="merge"===m,y="replace"===m;if(v){var x=s;(C=!s)?x=PZ(a,u,t.type,n):(x&&(TZ(x).isNew=!1),GX(x)),x&&(LX(x,g,e,{isInit:C}),RZ(x,t,i,o))}else if(y){LZ(s,t,n,e);var b=PZ(a,u,t.type,n);b&&(LX(b,g,e,{isInit:!0}),RZ(b,t,i,o))}else"remove"===m&&(RX(s,t),LZ(s,t,n,e));var w=n.get(a);if(w&&h)if(v){var S=w.getTextContent();S?S.attr(h):w.setTextContent(new pb(h))}else y&&w.setTextContent(new pb(h));if(w){var _=t.clipPath;if(_){var A=_.type,k=void 0,C=!1;if(v){var M=w.getClipPath();k=(C=!M||TZ(M).type!==A)?jZ(A):M}else y&&(C=!0,k=jZ(A));w.setClipPath(k),LX(k,_,e,{isInit:C}),UX(k,_.keyframeAnimation,e)}var I=TZ(w);w.setTextConfig(p),I.option=t,function(e,t,n){var r=fb(e).eventData;e.silent||e.ignore||r||(r=fb(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});r&&(r.info=n.info)}(w,e,t),nI({el:w,componentModel:e,itemName:w.name,itemTooltipOption:t.tooltip}),UX(w,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,o=t.getWidth(),a=t.getHeight(),s=["x","y"],l=0;l<n.length;l++){if((f=null!=(p=Nv((h=n[l]).id,null))?i.get(p):null)&&f.isGroup){var u=(g=f.parent)===r,c=TZ(f),d=TZ(g);c.width=iv(c.option.width,u?o:d.width)||0,c.height=iv(c.option.height,u?a:d.height)||0}}for(l=n.length-1;l>=0;l--){var h,p,f;if(f=null!=(p=Nv((h=n[l]).id,null))?i.get(p):null){var g=f.parent,m=(d=TZ(g),{}),v=KS(f,h,g===r?{width:o,height:a}:{width:d.width,height:d.height},null,{hv:h.hv,boundingMode:h.bounding},m);if(!TZ(f).isNew&&v){for(var y=h.transition,x={},b=0;b<s.length;b++){var w=s[b],S=m[w];y&&(NX(y)||Qd(y,w)>=0)?x[w]=S:f[w]=S}gw(f,x,e,0)}else f.attr(m)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){LZ(n,TZ(n).option,t,e._lastGraphicModel)}),this._elMap=Ph()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(oC);function jZ(e){var t=new(Nh(IZ,e)?IZ[e]:NM(e))({});return TZ(t).type=e,t}function PZ(e,t,n,r){var i=jZ(n);return t.add(i),r.set(e,i),TZ(i).id=e,TZ(i).isNew=!0,i}function LZ(e,t,n,r){e&&e.parent&&("group"===e.type&&e.traverse(function(e){LZ(e,t,n,r)}),EX(e,t,r),n.removeKey(TZ(e).id))}function RZ(e,t,n,r){e.isGroup||th([["cursor",Ly.prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],function(n){var r=n[0];Nh(t,r)?e[r]=bh(t[r],n[1]):null==e[r]&&(e[r]=n[1])}),th(oh(t),function(n){if(0===n.indexOf("on")){var r=t[n];e[n]=uh(r)?r:null}}),Nh(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var EZ=["x","y","radius","angle","single"],NZ=["cartesian2d","polar","singleAxis"];function OZ(e){return e+"Axis"}function zZ(e,t){var n,r=Ph(),i=[],o=Ph();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 BZ(e){var t=e.ecModel,n={infoList:[],infoMap:Ph()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(OZ(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 FZ=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}();function $Z(e){var t={};return th(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}const VZ=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 kd(t,e),t.prototype.init=function(e,t,n){var r=$Z(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=$Z(e);Yd(this.option,e,!0),Yd(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;th([["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=Ph();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 th(EZ,function(n){var r=this.getReferringComponents(OZ(n),Gv);if(r.specified){t=!0;var i=new FZ;th(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 FZ;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",Hv).models[0];a&&th(t,function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Hv).models[0]&&o.add(e.componentIndex)})}}}r&&th(EZ,function(t){if(r){var i=n.findComponents({mainType:OZ(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new FZ;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");th([["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(OZ(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){th(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(OZ(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;th([["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;th(["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}(i_);const WZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="dataZoom.select",t}(VZ);const HZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(oC);const GZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="dataZoom.select",t}(HZ);var UZ=th,XZ=av,YZ=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 Qd(NZ,t)>=0}(t)){var n=OZ(this._dimName),r=t.getReferringComponents(n,Hv).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 Xd(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=[];UZ(["start","end"],function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(rv(c,o,n))):(t=!0,c=rv(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}),XZ(s),XZ(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";zW(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=rv(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];UZ(n,function(e){!function(e,t,n){t&&th(JN(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=WN(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&&UZ(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=nh(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],h=u>o[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n})}else UZ(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)}});UZ(r,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;UZ(["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=rv(n[0]+o,n,[0,100],!0):null!=i&&(o=rv(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=lv(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}();const qZ=YZ;const ZZ={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){var o=e.getComponent(OZ(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 qZ(t,r,o,e),n.push(i.__dzAxisProxy))});var r=Ph();return th(n,function(e){th(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 KZ=!1;function QZ(e){KZ||(KZ=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,ZZ),function(e){e.registerAction("dataZoom",function(e,t){th(zZ(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"}))}function JZ(e){e.registerComponentModel(WZ),e.registerComponentView(GZ),QZ(e)}var eK=function(){},tK={};function nK(e,t){tK[e]=t}function rK(e){return tK[e]}const iK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;th(this.option.feature,function(e,n){var r=rK(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),Yd(e,r.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(i_);function oK(e,t){var n=zS(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Kx({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})}var aK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];th(s,function(e,t){u.push(t)}),new fL(this._featureNames||[],u).add(c).update(c).remove(sh(c,null)).execute(),this._featureNames=u,function(e,t,n){var r=t.getBoxLayoutParams(),i=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=ZS(r,o,i);qS(t.get("orient"),e,t.get("itemGap"),a.width,a.height),KS(e,r,o,i)}(i,e,n),i.add(oK(i.getBoundingRect(),e)),a||i.eachChild(function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!uh(l)&&t){var u=l.style||(l.style={}),c=Pm(t,pb.makeFont(u)),d=e.x+i.x,h=!1;e.y+i.y+o+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:o+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}})}function c(c,d){var h,p=u[c],f=u[d],g=s[p],m=new Yw(g,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(g.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:m.option.onclick,featureName:p};else{var v=rK(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=Zw("toolbox-feature"),h.model=m,h.ecModel=t,h.api=n;var y=h instanceof eK;p||!f?!m.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof eK&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};ch(p)?(u={})[l]=p:u=p;ch(f)?(c={})[l]=f:c=f;var g=r.iconPaths={};th(u,function(l,u){var p=QM(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new pb({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:Lw({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),nI({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()}),("emphasis"===r.get(["iconStatus",u])?Wb:Hb)(p),i.add(p),p.on("click",ah(s.onclick,s,t,n,u)),g[u]=p})}(m,h,p),m.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?Wb:Hb)(r[e])},h instanceof eK&&h.render&&h.render(m,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){th(this._features,function(e){e instanceof eK&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.remove=function(e,t){th(this._features,function(n){n instanceof eK&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){th(this._features,function(n){n instanceof eK&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(oC);const sK=aK;const lK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Id.browser;if("function"!==typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||i){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=i?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var d=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var h=c.length,p=new Uint8Array(h);h--;)p[h]=c.charCodeAt(h);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,d)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,v=m.document;v.open("image/svg+xml","replace"),v.write(c),v.close(),m.focus(),v.execCommand("SaveAs",!0,d),document.body.removeChild(g)}}else{var y=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',b=window.open();b.document.write(x),b.document.title=r}else{var w=document.createElement("a");w.download=r+"."+o,w.target="_blank",w.href=a;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(eK);var uK="__ec_magicType_stack__",cK=[["line","bar"],["stack"]],dK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return th(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get(["seriesIndex",n]);if(hK[n]){var o,a={series:[]};th(cK,function(e){Qd(e,n)>=0&&th(e,function(e){r.setIconStatus(e,"normal")})}),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=hK[n](t,i,e,r);o&&(Kd(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,Hv).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(o=Yd({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},t}(eK),hK={line:function(e,t,n,r){if("bar"===e)return Yd({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return Yd({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===uK;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),Yd({id:t,stack:i?"":uK},r.get(["option","stack"])||{},!0)}};JD({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});const pK=dK;var fK=new Array(60).join("-"),gK="\t";function mK(e){var t=[];return th(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,o=[" "].concat(nh(e.series,function(e){return e.name})),a=[r.model.getCategories()];th(e.series,function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[o.join(gK)],l=0;l<a[0].length;l++){for(var u=[],c=0;c<a.length;c++)u.push(a[c][l]);s.push(u.join(gK))}t.push(s.join("\n"))}),t.join("\n\n"+fK+"\n\n")}function vK(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var yK=new RegExp("[\t]+","g");function xK(e,t){var n=e.split(new RegExp("\n*"+fK+"\n*","g")),r={series:[]};return th(n,function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(gK)>=0)return!0}(e)){var i=function(e){for(var t=e.split(/\n+/g),n=[],r=nh(vK(t.shift()).split(yK),function(e){return{name:e,data:[]}}),i=0;i<t.length;i++){var o=vK(t[i]).split(yK);n.push(o.shift());for(var a=0;a<o.length;a++)r[a]&&(r[a].data[i]=o[a])}return{series:r,categories:n}}(e),o=t[n],a=o.axisDim+"Axis";o&&(r[a]=r[a]||[],r[a][o.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{i=function(e){for(var t=e.split(/\n+/g),n=vK(t.shift()),r=[],i=0;i<t.length;i++){var o=vK(t[i]);if(o){var a=o.split(yK),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:n,data:r}}(e);r.series.push(i)}}),r}var bK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n=t.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",i.style.backgroundColor=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=r.get("lang")||[];o.innerHTML=a[0]||r.get("title"),o.style.cssText="margin:10px 20px",o.style.color=r.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var u=r.get("optionToContent"),c=r.get("contentToOption"),d=function(e){var t,n=function(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(!i||"cartesian2d"!==i.type&&"polar"!==i.type)n.push(e);else{var o=i.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;t[a]||(t[a]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),t[a].series.push(e)}else n.push(e)}}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}(e);return{value:ih([mK(n.seriesGroupByCategoryAxis),(t=n.other,nh(t,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],o=t.getName(i),a=0;a<e-1;a++)r[a]=arguments[a];n.push((o?o+gK:"")+r.join(gK))}),n.join("\n")}).join("\n\n"+fK+"\n\n"))],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+fK+"\n\n"),meta:n.meta}}(e);if(uh(u)){var h=u(t.getOption());ch(h)?s.innerHTML=h:mh(h)&&s.appendChild(h)}else{l.readOnly=r.get("readOnly");var p=l.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=r.get("textColor"),p.borderColor=r.get("textareaBorderColor"),p.backgroundColor=r.get("textareaColor"),l.value=d.value,s.appendChild(l)}var f=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;function b(){n.removeChild(i),x._dom=null}_p(v,"click",b),_p(y,"click",function(){if(null==c&&null!=u||null!=c&&null==u)b();else{var e;try{e=uh(c)?c(s,t.getOption()):xK(l.value,f)}catch(oae){throw b(),new Error("Data view format error "+oae)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),b()}}),v.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),i.appendChild(o),i.appendChild(s),i.appendChild(g),s.style.height=n.clientHeight-80+"px",n.appendChild(i),this._dom=i},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(eK);function wK(e,t){return nh(e,function(e,n){var r=t&&t[n];if(ph(r)&&!lh(r)){ph(e)&&!lh(e)||(e={value:e});var i=null!=r.name&&null==e.name;return e=Kd(e,r),i&&delete e.name,e}return e})}JD({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];th(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(r){var i=r.get("data");n.push({name:e.name,data:wK(e.data,i)})}else n.push(Zd({type:"scatter"},e))}),t.mergeOption(Kd({series:n},e.newOption))});const SK=bK;var _K=th,AK=Fv();function kK(e){var t=AK(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var CK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.onclick=function(e,t){!function(e){AK(e).snapshots=null}(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(eK);JD({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});const MK=CK;var IK=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],TK=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=jK(t,e);th(PK,function(e,t){(!n||!n.include||Qd(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=EK[e.brushType](0,n,t);e.__rangeOffset={offset:OK[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){th(e,function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&th(r.coordSyses,function(r){var i=EK[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){th(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r=EK[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?OK[e.brushType](r.values,i.offset,function(e,t){var n=BK(e),r=BK(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return nh(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:WH(r),isTargetByCursor:GH(r,e,n.coordSysModel),getLinearBrushOtherExtent:HH(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&Qd(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=jK(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<LK.length;s++)if(LK[s](r,o))return o}return!0},e}();function DK(e){return e[0]>e[1]&&e.reverse(),e}function jK(e,t){return Vv(e,t,{includeMainTypes:IK})}var PK={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Ph(),a={},s={};(n||r||i)&&(th(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),th(r,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),th(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=[];th(i.getCartesians(),function(e,t){(Qd(n,e.getAxis("x").model)>=0||Qd(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:RK.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){th(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:RK.geo})})}},LK=[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}],RK={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(GM(e)),t}},EK={lineX:sh(NK,0),lineY:sh(NK,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=[DK([i[0],o[0]]),DK([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:nh(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 NK(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=DK(nh([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 OK={lineX:sh(zK,0),lineY:sh(zK,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 nh(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function zK(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function BK(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const FK=TK;var $K,VK,WK=th,HK=Mv+"toolbox-dataZoom_",GK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new VH(n.getZr()),this._brushController.on("brush",ah(this._onBrush,this)).mount()),function(e,t,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new FK(XK(e),t,{include:["grid"]}),s=a.makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return kK(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){UK[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new FK(XK(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(i("x",n,t[0]),i("y",n,t[1])):i({lineX:"x",lineY:"y"}[r],n,t)}}),function(e,t){var n=kK(e);_K(t,function(t,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var a=o.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}}),n.push(t)}(r,n),this._dispatchZoomAction(n)}function i(e,t,i){var o=t.getAxis(e),a=o.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(i=zW(0,i.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:i[0],endValue:i[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];WK(e,function(e,n){t.push(Xd(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(eK),UK={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=kK(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return _K(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n]){r[n]=e;break}}),r}(this.ecModel))}};function XK(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}$K="dataZoom",VK=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=Vv(e,XK(r));return WK(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),WK(o.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),i}function a(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:HK+t+o};a[n]=o,i.push(a)}},Ah(null==C_.get($K)&&VK),C_.set($K,VK);const YK=GK;const qK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(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}(i_);function ZK(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function KK(e){if(Id.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var QK=KK(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function JK(e,t){if(!e)return t;t=OS(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var eQ=JK(KK(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),tQ=JK(QK,"transform"),nQ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Id.transform3dSupported?"will-change:transform;":"");function rQ(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Id.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Id.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+tQ+":"+a+";":[["top",0],["left",0],[QK,a]]}function iQ(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=Wk(e,"html"),h=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+h),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+=Id.transformSupported?","+tQ+r:",left"+r+",top"+r),eQ+":"+i}(i,n)),o&&r.push("background-color:"+o),th(["width","color","radius"],function(t){var n="border-"+t,i=OS(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());var i=bh(e.get("lineHeight"),Math.round(3*n/2));n&&t.push("line-height:"+i+"px");var o=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return o&&a&&t.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),th(["decoration","align"],function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)}),t.join(";")}(c)),null!=d&&r.push("padding:"+zS(d).join("px ")+"px"),r.join(";")+";"}function oQ(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){dp(cp,t,r,i,!0)&&dp(e,n,cp[0],cp[1])}(e,a,n,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 aQ=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Id.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,o=i&&(ch(i)?document.querySelector(i):mh(i)?i:uh(i)&&i(e.getDom()));oQ(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=r.handler;Sp(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=function(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}(t,"position"),r=t.style;"absolute"!==r.position&&"absolute"!==n&&(r.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,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=nQ+iQ(e,!this._firstShow,this._longHide)+rQ(i[0],i[1],!0)+"border-color:"+WS(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(ch(i)&&"item"===n.get("trigger")&&!ZK(n)&&(a=function(e,t,n){if(!ch(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=WS(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=tQ+":";Qd(["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,h=l+i,p=h*Math.abs(Math.cos(d))+h*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*((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-h)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),ch(e))o.innerHTML=e+a;else if(e){o.innerHTML="",lh(e)||(e=[e]);for(var s=0;s<e.length;s++)mh(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?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(oQ(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;th(rQ(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",Id.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(ah(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}();const sQ=aQ;function lQ(e){return Math.max(0,e)}function uQ(e){var t=lQ(e.shadowBlur||0),n=lQ(e.shadowOffsetX||0),r=lQ(e.shadowOffsetY||0);return{left:lQ(t-n),right:lQ(t+n),top:lQ(t-r),bottom:lQ(t+r)}}function cQ(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}const dQ=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),cQ(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;ph(e)&&qA(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new pb({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Wk(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),th(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),th(["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=uQ(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;cQ(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=lQ(i.borderWidth||0),a=uQ(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(ah(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();var hQ=new Kx({shape:{x:-1,y:-1,width:2,height:2}}),pQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(e,t){if(!Id.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Id.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new dQ(t):new sQ(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!Id.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")?yI(this,"_updatePosition",50,"fixRate"):xI(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");qY("itemTooltip",this._api,ah(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&&!Id.node&&n.getDom()){var i=gQ(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=Wv(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Uv(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=fb(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=hQ;l.x=r.x,l.y=r.y,l.update(),fb(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=tq(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(gQ(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"===fQ([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;if("legend"===fb(n).ssrType)return;this._lastDataByCoordSys=null,cT(n,function(e){return null!=fb(e).dataIndex?(i=e,!0):null!=fb(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=ah(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=fQ([t.tooltipOption],r),a=this._renderMode,s=[],l=Lk("section",{blocks:[],noHeader:!0}),u=[],c=new Hk;th(e,function(e){th(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=EY(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=Lk("section",{header:o,noHeader:!kh(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),th(e.seriesDataIndices,function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=qN(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",WS(f.color),a);var g=HA(h.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=fQ([h],r).get("valueFormatter");d.blocks.push(v?Zd({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var d=t.position,h=o.get("order"),p=Bk(l,c,a,h,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);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=fb(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,h=e.positionDefault,p=fQ([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new Hk;g.marker=m.makeTooltipMarker("item",WS(g.color),d);var v=HA(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),b=v.frag,w=b?Bk(x?Zd({valueFormatter:x},b):b,m,d,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,S,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="html"===this._renderMode,i=fb(t),o=i.tooltipConfig.option||{},a=o.encodeHTMLContent;if(ch(o)){o={content:o,formatter:o},a=!0}a&&r&&o.content&&((o=Xd(o)).content=gp(o.content));var s=[o],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=e.positionDefault,c=fQ(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),h=Math.random()+"",p=new Hk;this._showOrMove(c,function(){var n=Xd(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,h,e.offsetX,e.offsetY,e.position,t,p)}),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,h=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(ch(c)){var p=e.ecModel.get("useUTC"),f=lh(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=xS(f.axisValue,d,p)),d=VS(d,n,!0)}else if(uh(c)){var g=ah(function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,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,h,a),u.show(e,h),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||lh(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:lh(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"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),uh(t)&&(t=t([n,r],o,i.el,h,{viewSize:[s,l],contentSize:u.slice()})),lh(t))n=iv(t[0],s),r=iv(t[1],l);else if(ph(t)){var p=t;p.width=u[0],p.height=u[1];var f=ZS(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(ch(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,h,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-=mQ(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=mQ(d)?u[1]/2:"bottom"===d?u[1]:0),ZK(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&&th(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&th(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)&&th(a,function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&th(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){!Id.node&&t.getDom()&&(xI(this,"_updatePosition"),this._tooltipContent.dispose(),QY("itemTooltip",t))},t.type="tooltip",t}(oC);function fQ(e,t,n){var r,i=t.ecModel;n?(r=new Yw(n,i,i),r=new Yw(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Yw&&(a=a.get("tooltip",!0)),ch(a)&&(a={formatter:a}),a&&(r=new Yw(a,r,i)))}return r}function gQ(e,t){return e.dispatchAction||ah(t.dispatchAction,t)}function mQ(e){return"center"===e||"middle"===e}const vQ=pQ;var yQ=["rect","polygon","keep","clear"];function xQ(e,t){var n=Iv(e?e.brush:[]);if(n.length){var r=[];th(n,function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;lh(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={};th(e,function(e){t[e]=1}),e.length=0,th(t,function(t,n){e.push(n)})}(s),t&&!s.length&&s.push.apply(s,yQ)}}var bQ=th;function wQ(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function SQ(e,t,n){var r={};return bQ(t,function(t){var i=r[t]=function(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}();bQ(e[t],function(e,r){if(L$.isValidType(r)){var o={type:r,visual:e};n&&n(o,t),i[r]=new L$(o),"opacity"===r&&((o=Xd(o)).type="colorAlpha",i.__hidden.__alphaForOpacity=new L$(o))}})}),r}function _Q(e,t,n){var r;th(n,function(e){t.hasOwnProperty(e)&&wQ(t[e])&&(r=!0)}),r&&th(n,function(n){t.hasOwnProperty(n)&&wQ(t[n])?e[n]=Xd(t[n]):delete e[n]})}var AQ={lineX:kQ(0),lineY:kQ(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])&&nB(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!!(nB(r,i,o)||nB(r,i+a,o)||nB(r,i,o+s)||nB(r,i+a,o+s)||Xp.create(e).contain(l[0],l[1])||JM(i,o,i+a,o,r)||JM(i,o,i,o+s,r)||JM(i+a,o,i+a,o+s,r)||JM(i,o+s,i+a,o+s,r))||void 0}}};function kQ(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return CQ(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(),CQ(s[0],a)||CQ(s[1],a)||CQ(a[0],s)||CQ(a[1],s)}}}}function CQ(e,t){return t[0]<=e&&e<=t[1]}var MQ=["inBrush","outOfBrush"],IQ="__ecBrushSelect",TQ="__ecInBrushSelectEvent";function DQ(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new FK(t.option,e)).setInputRanges(t.areas,e)})}function jQ(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})}),DQ(e),e.eachComponent({mainType:"brush"},function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:Xd(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],h=!1;n||(r=s.throttleType,i=s.throttleDelay);var p=nh(t.areas,function(e){var t=RQ[e.brushType],n=Kd({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return AQ[t].point(r,n,e)},rect:function(r){return AQ[t].rect(r,n,e)}};return n}(n),n}),f=SQ(t.option,MQ,function(e){e.mappingMethod="fixed"});function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}lh(l)&&th(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;h=h||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&&(lh(n)?Qd(n,t)<0:t!==n)}(t,r))return;if(th(p,function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),h=h||m(i)}),g(r)&&m(i)){var o=n.getData();o.each(function(e){LQ(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 LQ(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?h:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return oT(n,a,e)}function u(e,t){sT(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 h=r.call(i,e),p=t[h],f=s[h],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(e,l,u)}}th(e,function(e){var n=L$.prepareVisualTypes(t[e]);s[e]=n}),null==o?n.each(c):n.each([o],c)}(MQ,f,i,o)})}),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[TQ])return;o[IQ]||(o[IQ]=PQ);var a=yI(o,IQ,n,t);a(e,r)}(t,r,i,o,n)}function PQ(e,t){if(!e.isDisposed()){var n=e.getZr();n[TQ]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[TQ]=!1}}function LQ(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 RQ={rect:function(e){return EQ(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&&EQ(t)}};function EQ(e){return new Xp(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}const NQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new VH(t.getZr())).on("brush",ah(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){DQ(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:Xd(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:Xd(n),$from:t})},t.type="brush",t}(oC);function OQ(e,t){return Yd({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Yw(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}const zQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return kd(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&_Q(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=nh(e,function(e){return OQ(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=OQ(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}(i_);var BQ=["rect","polygon","lineX","lineY","keep","clear"];const FQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kd(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,th(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 th(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:BQ.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}(eK);var $Q=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 kd(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}(i_),VQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(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=bh(e.get("textBaseline"),e.get("textVerticalAlign")),l=new pb({style:Mw(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new pb({style:Mw(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",function(){HS(h,"_"+e.get("target"))}),p&&d.on("click",function(){HS(p,"_"+e.get("subtarget"))}),fb(l).eventData=fb(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=ZS(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,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new Kx({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:b,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(oC);const WQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],r=t.axisType,i=this._names=[];"category"===r?(e=[],th(n,function(t,n){var r,o=Nv(jv(t),"");ph(t)?(r=Xd(t)).value=n:r=n,e.push(r),i.push(o)})):e=n;var o={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new BL([{name:"value",type:o}],this)).initData(e,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(i_);var HQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="timeline.slider",t.defaultOption=Kw(WQ.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(WQ);Jd(HQ,WA.prototype);const GQ=HQ;const UQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="timeline",t}(oC);const XQ=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.type=i||"value",o}return kd(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(vO);var YQ=Math.PI,qQ=Fv(),ZQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,n),i=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Lk("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},th(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](r,i,a,e)},this),this._renderAxisLabel(r,o,a,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,r,i,o,a=e.get(["label","position"]),s=e.get("orient"),l=function(e,t){return ZS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<t.getHeight()/2?"-":"+":l.x+l.width/2<t.getWidth()/2?"+":"-":ch(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:YQ/2},h="vertical"===s?l.height:l.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get(["label","rotate"])||0;y=y*YQ/180;var x=p.get("position",!0),b=f&&p.get("showPlayBtn",!0),w=f&&p.get("showPrevBtn",!0),S=f&&p.get("showNextBtn",!0),_=0,A=h;"left"===x||"bottom"===x?(b&&(r=[0,0],_+=v),w&&(i=[_,0],_+=v),S&&(o=[A-g,0],A-=v)):(b&&(r=[A-g,0],A-=v),w&&(i=[0,0],_+=v),S&&(o=[A-g,0],A-=v));var k=[_,A];return e.get("inverse")&&k.reverse(),{viewRect:l,mainLength:h,orient:s,rotation:d[s],labelRotation:y,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[s],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[s],playPosition:r,prevBtnPosition:i,nextBtnPosition:o,axisExtent:k,controlSize:g,controlGap:m}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if("vertical"===e.orient){var o=[1,0,0,1,0,0],a=i.x,s=i.y+i.height;Rp(o,o,[-a,-s]),Ep(o,o,-YQ/2),Rp(o,o,[a,s]),(i=i.clone()).applyTransform(o)}var l=m(i),u=m(n.getBoundingRect()),c=m(r.getBoundingRect()),d=[n.x,n.y],h=[r.x,r.y];h[0]=d[0]=l[0][0];var p,f=e.labelPosOpt;null==f||ch(f)?(v(d,u,l,1,p="+"===f?0:1),v(h,c,l,1,1-p)):(v(d,u,l,1,p=f>=0?0:1),h[1]=d[1]+f);function g(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}n.setPosition(d),r.setPosition(h),n.rotation=r.rotation=e.rotation,g(n),g(r)},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get("axisType"),i=function(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new mN({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new IN({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new xN}}(t,r);i.getTicks=function(){return n.mapArray(["value"],function(e){return{value:e}})};var o=n.getDataExtent("value");i.setExtent(o[0],o[1]),i.calcNiceTicks();var a=new XQ("value",i,e.axisExtent,r);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new Zm;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get(["lineStyle","show"])){var o=new lM({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:Zd({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new lM({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:Kd({lineCap:"round",lineWidth:o.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,o=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],th(a,function(e){var a=n.dataToCoord(e.value),s=o.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:ah(i._changeTimeline,i,e.value)},h=KQ(s,l,t,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),nw(h);var p=fb(h);s.get("tooltip")?(p.dataIndex=e.value,p.dataModel=r):p.dataIndex=p.dataModel=null,i._tickSymbols.push(h)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get("show")){var o=r.getData(),a=n.getViewLabels();this._tickLabels=[],th(a,function(r){var a=r.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(r.tickValue),h=new pb({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:ah(i._changeTimeline,i,a),silent:!1,style:Mw(l,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=Mw(u),h.ensureState("progress").style=Mw(c),t.add(h),nw(h),qQ(h).dataIndex=a,i._tickLabels.push(h)})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,o=e.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),l=r.getPlayState(),u=r.get("inverse",!0);function c(e,n,l,u){if(e){var c=Nm(bh(r.get(["controlStyle",n+"BtnSize"]),i),i),d=function(e,t,n,r){var i=r.style,o=QM(e.get(["controlStyle",t]),r||{},new Xp(n[0],n[1],n[2],n[3]));i&&o.setStyle(i);return o}(r,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:i/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,t.add(d),nw(d)}}c(e.nextBtnPosition,"next",ah(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",ah(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",ah(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),o=r.getCurrentIndex(),a=i.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=ah(s._handlePointerDrag,s),e.ondragend=ah(s._handlePointerDragend,s),QQ(e,s._progressLine,o,n,r,!0)},onUpdate:function(e){QQ(e,s._progressLine,o,n,r)}};this._currentPointer=KQ(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=av(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n<r[0]&&(n=r[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var i=this._progressLine;i&&(i.shape.x2=n,i.dirty());var o=this._findNearestTick(n),a=this.model;(t||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){return UM(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t,n=this.model.getData(),r=1/0,i=this._axis;return n.each(["value"],function(n,o){var a=i.dataToCoord(n),s=Math.abs(a-e);s<r&&(r=s,t=o)}),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var r=0;r<t.length;r++)t&&t[r]&&t[r].toggleState("progress",r<e);if(n)for(r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState("progress",qQ(n[r]).dataIndex<=e)},t.type="timeline.slider",t}(UQ);function KQ(e,t,n,r,i,o){var a=t.get("color");i?(i.setColor(a),n.add(i),o&&o.onUpdate(i)):((i=ST(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(i),o&&o.onCreate(i));var s=t.getItemStyle(["color"]);i.setStyle(s),r=Yd({rectHover:!0,z2:100},r,!0);var l=_T(e.get("symbolSize"));r.scaleX=l[0]/2,r.scaleY=l[1]/2;var u=AT(e.get("symbolOffset"),l);u&&(r.x=(r.x||0)+u[0],r.y=(r.y||0)+u[1]);var c=e.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function QQ(e,t,n,r,i,o){if(!e.dragging){var a=i.getModel("checkpointStyle"),s=r.dataToCoord(i.getData().get("value",n));if(o||!a.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}const JQ=ZQ;function eJ(e){var t=e&&e.timeline;lh(t)||(t=t?[t]:[]),th(t,function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(tJ(e),nJ(e,"controlPosition")){var r=e.controlStyle||(e.controlStyle={});nJ(r,"position")||(r.position=e.controlPosition),"none"!==r.position||nJ(r,"show")||(r.show=!1,delete r.position),delete e.controlPosition}th(e.data||[],function(e){ph(e)&&!lh(e)&&(!nJ(e,"value")&&nJ(e,"name")&&(e.value=e.name),tJ(e))})}(e)})}function tJ(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),r=e.label||e.label||{},i=r.normal||(r.normal={}),o={normal:1,emphasis:1};th(r,function(e,t){o[t]||nJ(i,t)||(i[t]=e)}),n.label&&!nJ(r,"emphasis")&&(r.emphasis=n.label,delete n.label)}function nJ(e,t){return e.hasOwnProperty(t)}function rJ(e,t){if(!e)return!1;for(var n=lh(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function iJ(e){Tv(e,"label",["show"])}var oJ=Fv(),aJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Id.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),o=oJ(e)[i];n&&n.data?(o?o._mergeOption(n,t,!0):(r&&iJ(n),th(n.data,function(e){e instanceof Array?(iJ(e[0]),iJ(e[1])):iJ(e)}),Zd(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),oJ(e)[i]=o):oJ(e)[i]=null},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),o=r.getName(e);return Lk("section",{header:this.name,blocks:[Lk("nameValue",{name:o,value:i,noName:!o,noValue:null==i})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=WA.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return oJ(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(i_);Jd(aJ,WA.prototype);const sJ=aJ;const lJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(sJ);function uJ(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function cJ(e,t,n,r,i,o){var a=[],s=UL(t,r)?t.getCalculationInfo("stackResultDimension"):r,l=mJ(t,s,e),u=t.indicesOfNearest(s,l)[0];a[i]=t.get(n,u),a[o]=t.get(s,u);var c=t.get(r,u),d=sv(t.get(r,u));return(d=Math.min(d,20))>=0&&(a[o]=+a[o].toFixed(d)),[a,c]}var dJ={min:sh(cJ,"min"),max:sh(cJ,"max"),average:sh(cJ,"average"),median:sh(cJ,"median")};function hJ(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!lh(t.coord)&&lh(i)){var o=pJ(t,n,r,e);if((t=Xd(t)).type&&dJ[t.type]&&o.baseAxis&&o.valueAxis){var a=Qd(i,o.baseAxis.dim),s=Qd(i,o.valueAxis.dim),l=dJ[t.type](n,o.baseDataDim,o.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&lh(i))for(var u=t.coord,c=0;c<2;c++)dJ[u[c]]&&(u[c]=mJ(n,n.mapDimension(i[c]),u[c]));else t.coord=[];return t}}function pJ(e,t,n,r){var i={};return null!=e.valueIndex||null!=e.valueDim?(i.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function fJ(e,t){return!(e&&e.containData&&t.coord&&!uJ(t))||e.containData(t.coord)}function gJ(e,t){return e?function(e,n,r,i){return ZA(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return ZA(e.value,t[i])}}function mJ(e,t,n){if("average"===n){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var vJ=Fv();const yJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.init=function(){this.markerGroupMap=Ph()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){vJ(e).keep=!1}),t.eachSeries(function(e){var i=sJ.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!vJ(e).keep&&r.group.remove(e.group)})},t.prototype.markKeep=function(e){vJ(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;th(e,function(e){var r=sJ.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Gb(e):Ub(e))})})},t.type="marker",t}(oC);function xJ(e,t,n){var r=t.coordinateSystem;e.each(function(i){var o,a=e.getItemModel(i),s=iv(a.get("x"),n.getWidth()),l=iv(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(r){var u=e.get(r.dimensions[0],i),c=e.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}const bJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=sJ.getMarkerModelFromSeries(e,"markPoint");t&&(xJ(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new rR),u=function(e,t,n){var r;r=e?nh(e&&e.dimensions,function(e){return Zd(Zd({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new BL(r,n),o=nh(n.get("data"),sh(hJ,t));e&&(o=ih(o,sh(fJ,e)));var a=gJ(!!e,r);return i.initData(o,null,a),i}(i,e,t);t.setData(u),xJ(t.getData(),e,r),u.each(function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(uh(r)||uh(i)||uh(o)||uh(s)){var c=t.getRawValue(e),d=t.getDataParams(e);uh(r)&&(r=r(c,d)),uh(i)&&(i=i(c,d)),uh(o)&&(o=o(c,d)),uh(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=aT(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:h})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(e){e.traverse(function(e){fb(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(yJ);const wJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(sJ);var SJ=Fv(),_J=function(e,t,n,r){var i,o=e.getData();if(lh(r))i=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=xh(r.yAxis,r.xAxis);else{var u=pJ(r,o,t,e);s=u.valueAxis,l=mJ(o,XL(o,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,h=Xd(r),p={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,p.coord[d]=1/0;var f=n.get("precision");f>=0&&hh(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=l,i=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[hJ(e,i[0]),hJ(e,i[1]),Zd({},i[2])];return g[2].type=g[2].type||null,Yd(g[2],g[0]),Yd(g[2],g[1]),g};function AJ(e){return!isNaN(e)&&!isFinite(e)}function kJ(e,t,n,r){var i=1-e,o=r.dimensions[e];return AJ(t[i])&&AJ(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function CJ(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(kJ(1,n,r,e)||kJ(0,n,r,e)))return!0}return fJ(e,t[0])&&fJ(e,t[1])}function MJ(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=iv(s.get("x"),i.getWidth()),u=iv(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);o=a.dataToPoint([d,h])}if(bR(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;AJ(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):AJ(e.get(c[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}const IJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=sJ.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=SJ(t).from,o=SJ(t).to;i.each(function(t){MJ(i,t,!0,e,n),MJ(o,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new FV);this.group.add(l.group);var u=function(e,t,n){var r;r=e?nh(e&&e.dimensions,function(e){return Zd(Zd({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new BL(r,n),o=new BL(r,n),a=new BL([],n),s=nh(n.get("data"),sh(_J,t,e,n));e&&(s=ih(s,sh(CJ,e)));var l=gJ(!!e,r);return i.initData(nh(s,function(e){return e[0]}),null,l),o.initData(nh(s,function(e){return e[1]}),null,l),a.initData(nh(s,function(e){return e[2]})),a.hasItemOption=!0,{from:i,to:o,line:a}}(i,e,t),c=u.from,d=u.to,h=u.line;SJ(t).from=c,SJ(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),g=t.get("symbolRotate"),m=t.get("symbolOffset");function v(t,n,i){var o=t.getItemModel(n);MJ(t,n,i,e,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=aT(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:bh(o.get("symbolOffset",!0),m[i?0:1]),symbolRotate:bh(o.get("symbolRotate",!0),g[i?0:1]),symbolSize:bh(o.get("symbolSize"),f[i?0:1]),symbol:bh(o.get("symbol",!0),p[i?0:1]),style:s})}lh(p)||(p=[p,p]),lh(f)||(f=[f,f]),lh(g)||(g=[g,g]),lh(m)||(m=[m,m]),u.from.each(function(e){v(c,e,!0),v(d,e,!1)}),h.each(function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})}),l.updateData(h),u.line.eachItemGraphicEl(function(e){fb(e).dataModel=t,e.traverse(function(e){fb(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(yJ);const TJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(sJ);var DJ=Fv(),jJ=function(e,t,n,r){var i=r[0],o=r[1];if(i&&o){var a=hJ(e,i),s=hJ(e,o),l=a.coord,u=s.coord;l[0]=xh(l[0],-1/0),l[1]=xh(l[1],-1/0),u[0]=xh(u[0],1/0),u[1]=xh(u[1],1/0);var c=qd([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function PJ(e){return!isNaN(e)&&!isFinite(e)}function LJ(e,t,n,r){var i=1-e;return PJ(t[i])&&PJ(n[i])}function RJ(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},o={coord:r,x:t.x1,y:t.y1};return bR(e,"cartesian2d")?!(!n||!r||!LJ(1,n,r)&&!LJ(0,n,r))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!uJ(t)&&!uJ(n))||e.containZone(t.coord,n.coord)}(e,i,o):fJ(e,i)||fJ(e,o)}function EJ(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=iv(s.get(n[0]),i.getWidth()),u=iv(s.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition){var c=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],o=r.getMarkerPosition(f,n,!0)}else{var g=[y=e.get(n[0],t),x=e.get(n[1],t)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(bR(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),x=e.get(n[1],t);PJ(y)?o[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):PJ(x)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var NJ=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];const OJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=sJ.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each(function(t){var i=nh(NJ,function(i){return EJ(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape("points",i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Zm});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){var r,i,o=["x0","y0","x1","y1"];if(e){var a=nh(e&&e.dimensions,function(e){var n=t.getData();return Zd(Zd({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=nh(o,function(e,t){return{name:e,type:a[t%2].type}}),r=new BL(i,n)}else r=new BL(i=[{name:"value",type:"float"}],n);var s=nh(n.get("data"),sh(jJ,t,e,n));e&&(s=ih(s,sh(RJ,e)));var l=e?function(e,t,n,r){return ZA(e.coord[Math.floor(r/2)][r%2],i[r])}:function(e,t,n,r){return ZA(e.value,i[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(i,e,t);t.setData(u),u.each(function(t){var n=nh(NJ,function(n){return EJ(u,t,n,e,r)}),o=i.getAxis("x").scale,s=i.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),d=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];av(d),av(h);var p=!!(l[0]>d[1]||l[1]<d[0]||c[0]>h[1]||c[1]<h[0]);u.setItemLayout(t,{points:n,allClipped:p});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=aT(a,"color");f.fill||(f.fill=g,ch(f.fill)&&(f.fill=fg(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(DJ(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new tM({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var r=DJ(l).data.getItemGraphicEl(n),i=u.getItemLayout(e);i.allClipped?r&&l.group.remove(r):(r?gw(r,{shape:{points:i.points}},t,e):r=new tM({shape:{points:i.points}}),u.setItemGraphicEl(e,r),l.group.add(r))}).remove(function(e){var t=DJ(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var r=u.getItemModel(n),i=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),kw(e,Cw(r),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:ch(i.fill)?fg(i.fill,1):"#000"}),sw(e,r),rw(e,null,null,r.get(["emphasis","disabled"])),fb(e).dataModel=t}),DJ(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(yJ);const zJ=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 kd(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"]),lh(t)&&th(t,function(e,r){ch(e)&&(e={type:e}),t[r]=Yd(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&&Ov(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,i=Ph(),o=nh(r,function(e){return(ch(e)||hh(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Yw(e,this,this.ecModel))},this);this._data=ih(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")&&th(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;th(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;th(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])&&Qd(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}(i_);var BJ=sh,FJ=th,$J=Zm,VJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return kd(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new $J),this.group.add(this._selectorGroup=new $J),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=ZS(l,u,c),h=this.layoutInner(e,i,d,r,a,s),p=ZS(Kd({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=oK(h,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=Ph(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&c.push(e.id)}),FJ(t.getData(),function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new $J;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(h,a,o,i,t,e,f,m,g,u,r);v.on("click",BJ(WJ,a,null,r,c)).on("mouseover",BJ(GJ,h.name,null,r,c)).on("mouseout",BJ(UJ,h.name,null,r,c)),n.ssr&&v.eachChild(function(e){var t=fb(e);t.seriesIndex=h.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}else n.eachRawSeries(function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),g=lg(p.fill);g&&0===g[3]&&(g[3]=.2,p=Zd(Zd({},p),{fill:gg(g,"rgba")}));var m=this._createItem(s,a,o,i,t,e,{},p,f,u,r);m.on("click",BJ(WJ,null,a,r,c)).on("mouseover",BJ(GJ,null,a,r,c)).on("mouseout",BJ(UJ,null,a,r,c)),n.ssr&&m.eachChild(function(e){var t=fb(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}},this);0}},this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();FJ(e,function(e){var r=e.type,i=new pb({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});o.add(i),kw(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),nw(i)})},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,h=i.get("itemWidth"),p=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),FJ(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?qT(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 h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.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"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new $J,b=r.getModel("textStyle");if(!uh(e.getLegendIcon)||v&&"inherit"!==v){var w="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=ST(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:h,itemHeight:p,icon:l,iconRotate:w,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var S="left"===o?h+5:-5,_=o,A=i.get("formatter"),k=t;ch(A)&&A?k=A.replace("{name}",null!=t?t:""):uh(A)&&(k=A(t));var C=f?b.getTextColor():r.get("inactiveColor");x.add(new pb({style:Mw(b,{text:k,x:S,y:p/2,fill:C,align:_,verticalAlign:"middle"},{inheritColor:C})}));var M=new Kx({shape:x.getBoundingRect(),style:{fill:"transparent"}}),I=r.getModel("tooltip");return I.get("show")&&nI({el:M,componentModel:i,itemName:t,itemTooltipOption:I.option}),x.add(M),x.eachChild(function(e){e.silent=!0}),M.silent=!u,this.getContentGroup().add(x),nw(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();qS(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){qS("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=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]+h+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-p]),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}(oC);function WJ(e,t,n,r){UJ(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),GJ(e,t,n,r)}function HJ(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 GJ(e,t,n,r){HJ(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function UJ(e,t,n,r){HJ(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}const XJ=VJ;function YJ(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 qJ(e,t,n){var r="allSelect"===e||"inverseSelect"===e,i={},o=[];n.eachComponent({mainType:"legend",query:t},function(n){r?n[e]():n[e](t.name),ZJ(n,i),o.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(e){th(i,function(t,n){e[t?"select":"unSelect"](n)}),ZJ(e,a)}),r?{selected:a,legendIndex:o}:{name:t.name,selected:a}}function ZJ(e,t){var n=t||{};return th(e.getData(),function(t){var r=t.get("name");if("\n"!==r&&""!==r){var i=e.isSelected(r);Nh(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function KJ(e){e.registerComponentModel(zJ),e.registerComponentView(XJ),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,YJ),e.registerSubTypeDefaulter("legend",function(){return"plain"}),function(e){e.registerAction("legendToggleSelect","legendselectchanged",sh(qJ,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",sh(qJ,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",sh(qJ,"inverseSelect")),e.registerAction("legendSelect","legendselected",sh(qJ,"select")),e.registerAction("legendUnSelect","legendunselected",sh(qJ,"unSelect"))}(e)}function QJ(e,t,n){var r=[1,1];r[e.getOrient().index]=0,JS(t,n,{type:"box",ignoreSize:!!r})}const JJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=e_(t);e.prototype.init.call(this,t,n,r),QJ(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),QJ(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Kw(zJ.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}(zJ);var e0=Zm,t0=["width","height"],n0=["x","y"],r0=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 kd(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new e0),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new e0)},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=lh(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var r=e+"DataIndex",o=QM(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:ah(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 pb({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=t0[s],u=n0[s],c=t0[1-s],d=n0[1-s];i&&qS("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=Xd(n);i&&(g[l]=n[l]-p[l]-h);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+h;else{var v=p[l]+h;f[s]-=v,m[u]-=v}m[l]+=p[l]+h,f[1-s]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[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;qS(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),qS("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-h.x,-h.y],v=bh(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-h[i]:g[r]+=h[i]+v);m[1-r]+=d[o]/2-h[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=p?n[i]:d[i],y[o]=Math.max(d[o],h[o]),y[a]=Math.min(0,h[a]+m[1-r]),u.__rectSize=n[i],p){var x={x:0,y:0};x[i]=Math.max(n[i]-h[i]-v,0),x[o]=y[o],u.setClipPath(new Kx({shape:x})),u.__rectSize=x[i]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return null!=b.pageIndex&&gw(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),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;th(["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",ch(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=t0[i],a=n0[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[i]=-p.s;for(var f=s+1,g=p,m=p,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==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=v;return h;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}(XJ);const i0=r0;function o0(e){sj(KJ),e.registerComponentModel(JJ),e.registerComponentView(i0),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)}const a0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="dataZoom.inside",t.defaultOption=Kw(VZ.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(VZ);var s0=Fv();function l0(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function u0(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function c0(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function d0(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=s0(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Ph());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){th(BZ(e).infoList,function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:sh(c0,t),dispatchAction:sh(u0,e),dataZoomInfoMap:null,controller:null},r=n.controller=new Iz(e.getZr());return th(["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=Ph())).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),yI(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else l0(r,e)})})}var h0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return kd(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){s0(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}(r,t,{pan:ah(p0.pan,this),zoom:ah(p0.zoom,this),scrollMove:ah(p0.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=s0(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||l0(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(HZ),p0={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=g0[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 zW(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:f0(function(e,t,n,r,i,o){var a=g0[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:f0(function(e,t,n,r,i,o){return g0[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta})};function f0(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return zW(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 g0={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}};const m0=h0;function v0(e){QZ(e),e.registerComponentModel(a0),e.registerComponentView(m0),d0(e)}const y0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Kw(VZ.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:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(VZ);var x0=Kx,b0="horizontal",w0="vertical",S0=["line","bar","candlestick","scatter"],_0={easing:"cubicOut",duration:100,delay:0},A0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return kd(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=ah(this._onBrush,this),this._onBrushEnd=ah(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),yI(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(){xI(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 Zm;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===b0?{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=e_(e.option);th(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=ZS(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===w0&&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!==b0||i?n===b0&&i?{scaleY:a?1:-1,scaleX:-1}:n!==w0||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 x0({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new x0({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:ah(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,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=p[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:rv(e,u,h,!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,b=0;b<3;b++){var w=S(1===b);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function S(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new Zm,r=new tM({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new iM({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){th(e.getAxisProxy(i,o).getTargetSeriesModels(),function(e){if(!n&&!(!0!==t&&Qd(S0,e.get("type"))<0)){var a,s=r.getComponent(OZ(i),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[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 x0({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new x0({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)"}})),th([0,1],function(t){var o=a.get("handleIcon");!xT[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=ST(o,-1,0,2,2,null,!0);s.attr({cursor:k0(this._orient),draggable:!0,drift:ah(this._onDragMove,this,t),ondragend:ah(this._onDragEnd,this),onmouseover:ah(this._showDataInfo,this,!0),onmouseout:ah(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=iv(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(),nw(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle"),h=(a.get("handleLabel")||{}).show||!1;e.add(r[t]=new pb({silent:!0,invisible:!h,style:Mw(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 h=iv(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new Kx({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:h}}),f=.8*h,g=t.moveHandleIcon=ST(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(h,10));(d=t.moveZone=new Kx({invisible:!0,shape:{y:o[1]-m,height:h+m}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),i.add(p),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:k0(this._orient),drift:ah(this._onDragMove,this,"all"),ondragstart:ah(this._showDataInfo,this,!0),ondragend:ah(this._onDragEnd,this),onmouseover:ah(this._showDataInfo,this,!0),onmouseout:ah(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[rv(e[0],[0,100],t,!0),rv(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];zW(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?rv(o.minSpan,a,i,!0):null,null!=o.maxSpan?rv(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=av([rv(r[0],i,a,!0),rv(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=av(n.slice()),i=this._size;th([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 Kx,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=av(this._handleEnds.slice());function d(e){var t=GM(n.handles[e].parent,this.group),a=XM(0===e?"right":"left",t),s=this._handleWidth/2+5,l=UM([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===b0?"middle":a,align:i===b0?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 uh(r)?r(e,o):ch(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,r=e||this._dragging?n:t,i=this._displayables,o=i.handleLabels;o[0].attr("invisible",!r),o[1].attr("invisible",!r),i.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,kp(r.event);var i=UM([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 zp(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=av([rv(n.x,r,i,!0),rv(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&&(kp(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 x0({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?_0:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=BZ(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}(HZ);function k0(e){return"vertical"===e?"ns-resize":"ew-resize"}const C0=A0;function M0(e){e.registerComponentModel(y0),e.registerComponentView(C0),QZ(e)}var I0={get:function(e,t,n){var r=Xd((T0[e]||{})[t]);return n&&lh(r)?r[r.length-1]:r}},T0={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const D0=I0;var j0=L$.mapVisual,P0=L$.eachVisual,L0=lh,R0=th,E0=av,N0=rv,O0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&_Q(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=ah(e,this),this.controllerVisuals=SQ(this.option.controller,t,e),this.targetVisuals=SQ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries(function(e,n){t.push(n)}):t=Iv(e),t},t.prototype.eachTargetSeries=function(e,t){th(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],lh(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return ch(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):uh(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=E0([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],o=e.getDimensionInfo(i);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});Yd(r,n),Yd(i,n);var o=this.isCategory();function a(n){L0(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,i),function(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},R0(r,function(e,t){if(L$.isValidType(t)){var n=D0.get(t,"inactive",o);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";R0(this.stateList,function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:o?r:[r]}),null==l.symbol&&(l.symbol=t&&Xd(t)||(o?i:[i])),null==l.symbolSize&&(l.symbolSize=n&&Xd(n)||(o?s[0]:[s[0],s[0]])),l.symbol=j0(l.symbol,function(e){return"none"===e?i:e});var u=l.symbolSize;if(null!=u){var c=-1/0;P0(u,function(e){e>c&&(c=e)}),l.symbolSize=j0(u,function(e){return N0(e,[0,c],[0,s[0]],!0)})}},this)}.call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(i_);const z0=O0;var B0=[20,140],F0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=B0[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=B0[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):lh(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),th(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=av((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=$0(this,"outOfRange",this.getExtent()),n=$0(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,l=t.length;a<l&&(!n.length||t[a]<=n[0]);a++)t[a]<n[o]&&i(t[a],"outOfRange");for(var u=1;o<s;o++,u=0)u&&r.length&&i(n[o],"outOfRange"),i(n[o],"inRange");for(u=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(r.length&&i(r[r.length-1].value,"outOfRange"),u=0),i(t[a],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Kw(z0.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(z0);function $0(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],o=[],a=0;a<=200&&i<n[1];a++)o.push(i),i+=r;return o.push(n[1]),o}const V0=F0;const W0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return kd(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,n,r):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=zS(t.get("padding")||0),r=e.getBoundingRect();e.add(new Kx({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var r=(n=n||{}).forceState,i=this.visualMapModel,o={};if("color"===t){var a=i.get("contentColor");o.color=a}function s(e){return o[e]}function l(e,t){o[e]=t}var u=i.controllerVisuals[r||i.getValueState(e)];return th(L$.prepareVisualTypes(u),function(r){var i=u[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",i=u.__alphaForOpacity),L$.dependsOn(r,t)&&i&&i.applyVisual(e,s,l)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;KS(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(oC);var H0=[["left","right","width"],["top","bottom","height"]];function G0(e,t,n){var r=e.option,i=r.align;if(null!=i&&"auto"!==i)return i;for(var o={width:t.getWidth(),height:t.getHeight()},a="horizontal"===r.orient?1:0,s=H0[a],l=[0,null,10],u={},c=0;c<3;c++)u[H0[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:r[s[c]];var d=[["x","width",3],["y","height",0]][a],h=ZS(u,o,r.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*o[d[1]]?0:1]}function U0(e,t){return th(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var X0=rv,Y0=th,q0=Math.min,Z0=Math.max,K0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return kd(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=ah(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ah(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=null!=r?r+"":"";var i=this.visualMapModel,o=i.get("textGap"),a=i.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-o:a[1]+o],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new pb({style:Mw(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,o=this._useHandle,a=G0(t,this.api,r),s=n.mainGroup=this._createBarGroup(a),l=new Zm;s.add(l),l.add(n.outOfRange=Q0()),l.add(n.inRange=Q0(null,o?e1(this._orient):null,ah(this._dragHandle,this,"all",!1),ah(this._dragHandle,this,"all",!0))),l.setClipPath(new Kx({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var u=t.textStyleModel.getTextRect("\u56fd"),c=Z0(u.width,u.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,c,i),this._createHandle(t,s,1,r,c,i)),this._createIndicator(t,s,r,c,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,o){var a=ah(this._dragHandle,this,n,!1),s=ah(this._dragHandle,this,n,!0),l=Nm(e.get("handleSize"),r[0]),u=ST(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=e1(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){kp(e.event)}}),u.x=r[0]/2,u.useStyle(e.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),lw(u,!0),t.add(u);var d=this.visualMapModel.textStyleModel,h=new pb({cursor:c,draggable:!0,drift:a,onmousemove:function(e){kp(e.event)},ondragend:s,style:Mw(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[l,0],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=p,f.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,r,i){var o=Nm(e.get("indicatorSize"),n[0]),a=ST(e.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(a instanceof Wx){var l=a.style;a.useStyle(Zd({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);t.add(a);var u=this.visualMapModel.textStyleModel,c=new pb({silent:!0,invisible:!0,style:Mw(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===i?r/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=c,h.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():J0(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[X0(t[0],n,r,!0),X0(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];zW(t,r,i,e,0);var o=n.getExtent();this._dataInterval=[X0(r[0],i,o,!0),X0(r[1],i,o,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],o=e?i:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,i,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,i),a=[this.getControllerVisual(e[0],"symbolSize",i),this.getControllerVisual(e[1],"symbolSize",i)],s=this._createBarPoints(n,a);return{barColor:new xM(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<100;i++){var o=e[0]+r*i;if(o>e[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new Zm("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent(),l=this._applyTransform("left",n.mainGroup);Y0([0,1],function(u){var c=i[u];c.setStyle("fill",t.handlesColor[u]),c.y=e[u];var d=X0(e[u],[0,a[1]],s,!0),h=this.getControllerVisual(d,"symbolSize");c.scaleX=c.scaleY=h/a[0],c.x=a[0]-h/2;var p=UM(n.handleLabelPoints[u],GM(c,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-h)/2:(a[0]-h)/-2;p[1]+=f}o[u].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=X0(e,o,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=UM(l.indicatorLabelPoint,GM(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var x={x:p,y:h,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,w),m.animateTo(b,w)}else u.attr(x),m.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var _=0;_<S.length;_++)this.api.enterBlur(S[_])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=q0(Z0(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],o=n.getExtent();e=q0(Z0(i[0],e),i[1]);var a=function(e,t,n){var r=6,i=e.get("hoverLinkDataSize");i&&(r=X0(i,t,n,!0)/2);return r}(n,o,i),s=[e-a,e+a],l=X0(e,i,o,!0),u=[X0(s[0],i,o,!0),X0(s[1],i,o,!0)];s[0]<i[0]&&(u[0]=-1/0),s[1]>i[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"\u2248 ",a));var c=this._hoverLinkDataIndices,d=[];(t||J0(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[o(n),o(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var o=Nv(e[r].seriesId,null);if(null==o)return;for(var a=Iv(e[r].dataIndex),s=n&&n[o],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(t[o]||(t[o]={}))[c]=1}}}function o(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)n.push(+r);else{var i=o(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}}(c,d);this._dispatchHighDown("downplay",U0(h[0],n)),this._dispatchHighDown("highlight",U0(h[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(cT(e.target,function(e){var n=fb(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),o=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",U0(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=GM(t,r?null:this.group);return lh(e)?UM(e,i,n):XM(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(W0);function Q0(e,t,n,r){return new tM({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){kp(e.event)},ondragend:r})}function J0(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function e1(e){return"vertical"===e?"ns-resize":"ew-resize"}const t1=K0;var n1={type:"selectDataRange",event:"dataRangeSelected",update:"update"},r1=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},i1=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(function(e,t,n,r){var i={};return th(e,function(e){var n=L$.prepareVisualTypes(t[e]);i[e]=n}),{progress:function(e,o){var a,s;function l(e){return oT(o,s,e)}function u(e,t){sT(o,s,e,t)}null!=r&&(a=o.getDimensionIndex(r));for(var c=o.getStore();null!=(s=e.next());){var d=o.getRawDataItem(s);if(!d||!1!==d.visualMap)for(var h=null!=r?c.get(a,s):s,p=n(h),f=t[p],g=i[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(h,l,u)}}}}}(t.stateList,t.targetVisuals,ah(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(ah(o1,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(i.dimension=o,r.push(i))}}),e.getData().setVisual("visualMeta",r)}}];function o1(e,t,n,r){for(var i=t.targetVisuals[r],o=L$.prepareVisualTypes(i),a={color:aT(e.getData(),"color")},s=0,l=o.length;s<l;s++){var u=o[s],c=i["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(e){return a[e]}function h(e,t){a[e]=t}}var a1=th;function s1(e){var t=e&&e.visualMap;lh(t)||(t=t?[t]:[]),a1(t,function(e){if(e){l1(e,"splitList")&&!l1(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&lh(t)&&a1(t,function(e){ph(e)&&(l1(e,"start")&&!l1(e,"min")&&(e.min=e.start),l1(e,"end")&&!l1(e,"max")&&(e.max=e.end))})}})}function l1(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var u1=!1;function c1(e){u1||(u1=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(n1,r1),th(i1,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(s1))}function d1(e){e.registerComponentModel(V0),e.registerComponentView(t1),c1(e)}var h1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return kd(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],p1[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=Xd(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=nh(this._pieceList,function(e){return e=Xd(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=L$.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}th(t.pieces,function(e){th(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),th(n,function(e,n){var r=!1;th(this.stateList,function(e){r=r||o(t,e,n)||o(t.target,e,n)},this),!r&&th(this.stateList,function(e){(t[e]||(t[e]={}))[n]=D0.get(n,"inRange"===e?"active":"inactive",i)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,th(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),"single"===n.selectedMode){var o=!1;th(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[n]=!1:o=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=Xd(e)},t.prototype.getValueState=function(e){var t=L$.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(t,r){L$.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),(o=i[i.length-1].interval[1])!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return th(i,function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])},this),{stops:t,outerColors:n}}function s(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=e(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Kw(z0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(z0),p1={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<i;s+=o,a++){var l=a===i-1?r[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),xv(e),th(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;th(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),f1(t,e)},pieces:function(e){var t=this.option;th(t.pieces,function(t,n){ph(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var o=r.interval=[],a=r.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&null==o[c];h++)o[c]=t[d[h]],a[c]=s[h],u[c]=2===h;null==o[c]&&(o[c]=l[c])}u[0]&&o[1]===1/0&&(a[0]=0),u[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(r.value=o[0])}r.visual=L$.retrieveVisuals(t),e.push(r)},this),f1(t,e),xv(e),th(e,function(e){var t=e.close,n=[["<","\u2264"][t[1]],[">","\u2265"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function f1(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const g1=h1;const m1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return kd(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=xh(t.get("showLabel",!0),!u),d=!t.get("selectedMode");u&&this._renderEndsText(e,u[0],s,c,a),th(l.viewPieceList,function(r){var l=r.piece,u=new Zm;u.onclick=ah(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]],d),c){var p=this.visualMapModel.getValueState(h);u.add(new pb({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===p?.5:1},silent:d}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),qS(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return r("highlight")}).on("mouseout",function(){return r("downplay")});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:U0(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return G0(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new Zm,a=this.visualMapModel.textStyleModel;o.add(new pb({style:Mw(a,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=nh(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=ST(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=Xd(n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(i[o]=!0,th(i,function(e,t){i[t]=t===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(W0);function v1(e){e.registerComponentModel(g1),e.registerComponentView(m1),c1(e)}var y1={label:{enabled:!0},decal:{show:!1}},x1=Fv(),b1={};function w1(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=Xd(y1);Yd(r.label,e.getLocaleModel().get("aria"),!1),Yd(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var t=Ph();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),x1(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(uh(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var r=L_(t.ecModel,t.name,b1,e.getSeriesCount()),i=n.getVisual("decal");n.setVisual("decal",u(i,r))}else{var o=t.getRawData(),a={},s=x1(t).scope;n.each(function(e){var t=n.getRawIndex(e);a[t]=e});var l=o.count();o.each(function(e){var r=a[e],i=o.getName(e)||e+"",c=L_(t.ecModel,i,s,l),d=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",u(d,c))})}}function u(e,t){var n=e?Zd(Zd({},t),e):t;return n.dirty=!0,n}})}}(),function(){var r=t.getZr().dom;if(!r)return;var a=e.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=Kd(s.option,a),!s.get("enabled"))return;if(r.setAttribute("role","img"),s.get("description"))return void r.setAttribute("aria-label",s.get("description"));var l,u=e.getSeriesCount(),c=s.get(["data","maxCount"])||10,d=s.get(["series","maxCount"])||10,h=Math.min(u,d);if(u<1)return;var p=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();l=p?i(s.get(["general","withTitle"]),{title:p}):s.get(["general","withoutTitle"]);var f=[];l+=i(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),e.eachSeries(function(e,t){if(t<h){var n=void 0,r=e.get("name")?"withName":"withoutName";n=i(n=u>1?s.get(["series","multiple",r]):s.get(["series","single",r]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:o(e.subType)});var a=e.getData();if(a.count()>c)n+=i(s.get(["data","partialData"]),{displayCnt:c});else n+=s.get(["data","allData"]);for(var l=s.get(["data","separator","middle"]),d=s.get(["data","separator","end"]),p=s.get(["data","excludeDimensionId"]),g=[],m=0;m<a.count();m++)if(m<c){var v=a.getName(m),y=p?ih(a.getValues(m),function(e,t){return-1===Qd(p,t)}):a.getValues(m),x=s.get(["data",v?"withName":"withoutName"]);g.push(i(x,{name:v,value:y.join(l)}))}n+=g.join(l)+d,f.push(n)}});var g=s.getModel(["series","multiple","separator"]),m=g.get("middle"),v=g.get("end");l+=f.join(m)+v,r.setAttribute("aria-label",l)}()}function i(e,t){if(!ch(e))return e;var n=e;return th(t,function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)}),n}function o(t){var n=e.getLocaleModel().get(["series","typeNames"]);return n[t]||n.chart}}function S1(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},th(["description","general","series","data"],function(e){null!=t[e]&&(t.label[e]=t[e])})}}var _1={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},A1=function(){function e(e){var t;if(null==(this._condVal=ch(e)?new RegExp(e):(t=e,"[object RegExp]"===Ed.call(t)?e:null))){0,qA("")}}return e.prototype.evaluate=function(e){var t=typeof e;return ch(t)?this._condVal.test(e):!!hh(t)&&this._condVal.test(e+"")},e}(),k1=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),C1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),M1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),I1=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),T1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,r=0;r<this.subCondList.length;r++)if(!this.subCondList[r].evaluate(e?n:t))return!1;return!0},e}();function D1(e,t){if(!0===e||!1===e){var n=new k1;return n.value=e,n}return P1(e)||qA(""),e.and?j1("and",e,t):e.or?j1("or",e,t):e.not?function(e,t){var n=e.not,r="";0;P1(n)||qA(r);var i=new I1;i.child=D1(n,t),i.child||qA(r);return i}(e,t):function(e,t){for(var n="",r=t.prepareGetValue(e),i=[],o=oh(e),a=e.parser,s=a?QA(a):null,l=0;l<o.length;l++){var u=o[l];if("parser"!==u&&!t.valueGetterAttrMap.get(u)){var c=Nh(_1,u)?_1[u]:u,d=e[u],h=s?s(d):d,p=rk(c,h)||"reg"===c&&new A1(h);p||qA(n),i.push(p)}}i.length||qA(n);var f=new T1;return f.valueGetterParam=r,f.valueParser=s,f.getValue=t.getValue,f.subCondList=i,f}(e,t)}function j1(e,t,n){var r=t[e];lh(r)||qA(""),r.length||qA("");var i="and"===e?new C1:new M1;return i.children=nh(r,function(e){return D1(e,n)}),i.children.length||qA(""),i}function P1(e){return ph(e)&&!eh(e)}var L1=function(){function e(e,t){this._cond=D1(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();var R1={type:"echarts:filter",transform:function(e){for(var t,n,r,i=e.upstream,o=(n=e.config,r={valueGetterAttrMap:Ph({dimension:!0}),prepareGetValue:function(e){var t=e.dimension;Nh(e,"dimension")||qA("");var n=i.getDimensionInfo(t);return n||qA(""),{dimIdx:n.index}},getValue:function(e){return i.retrieveValueFromItem(t,e.dimIdx)}},new L1(n,r)),a=[],s=0,l=i.count();s<l;s++)t=i.getRawDataItem(s),o.evaluate()&&a.push(t);return{data:a}}};var E1={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,r="",i=Iv(n);i.length||qA(r);var o=[];th(i,function(e){var n=e.dimension,i=e.order,a=e.parser,s=e.incomparable;if(null==n&&qA(r),"asc"!==i&&"desc"!==i&&qA(r),s&&"min"!==s&&"max"!==s){0,qA("")}if("asc"!==i&&"desc"!==i){0,qA("")}var l=t.getDimensionInfo(n);l||qA(r);var u=a?QA(a):null;a&&!u&&qA(r),o.push({dimIdx:l.index,parser:u,comparator:new tk(i,s)})});var a=t.sourceFormat;a!==c_&&a!==d_&&qA(r);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(e,n){for(var r=0;r<o.length;r++){var i=o[r],a=t.retrieveValueFromItem(e,i.dimIdx),s=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(a=i.parser(a),s=i.parser(s));var l=i.comparator.evaluate(a,s);if(0!==l)return l}return 0}),{data:s}}};var N1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return kd(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new kk(this),Ck(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Ck(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:g_},t}(i_),O1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return kd(t,e),t.type="dataset",t}(oC);var z1=fx.CMD;function B1(e,t){return Math.abs(e-t)<1e-5}function F1(e){var t,n,r,i,o,a=e.data,s=e.len(),l=[],u=0,c=0,d=0,h=0;function p(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function f(e,n,r,i){B1(e,r)&&B1(n,i)||t.push(e,n,r,i,r,i)}function g(e,n,r,i,o,a){var s=Math.abs(n-e),l=4*Math.tan(s/4)/3,u=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),h=Math.cos(n),p=Math.sin(n),f=c*o+r,g=d*a+i,m=h*o+r,v=p*a+i,y=o*l*u,x=a*l*u;t.push(f-y*d,g+x*c,m+y*p,v-x*h,m,v)}for(var m=0;m<s;){var v=a[m++],y=1===m;switch(y&&(d=u=a[m],h=c=a[m+1],v!==z1.L&&v!==z1.C&&v!==z1.Q||(t=[d,h])),v){case z1.M:u=d=a[m++],c=h=a[m++],p(d,h);break;case z1.L:f(u,c,n=a[m++],r=a[m++]),u=n,c=r;break;case z1.C:t.push(a[m++],a[m++],a[m++],a[m++],u=a[m++],c=a[m++]);break;case z1.Q:n=a[m++],r=a[m++],i=a[m++],o=a[m++],t.push(u+2/3*(n-u),c+2/3*(r-c),i+2/3*(n-i),o+2/3*(r-o),i,o),u=i,c=o;break;case z1.A:var x=a[m++],b=a[m++],w=a[m++],S=a[m++],_=a[m++],A=a[m++]+_;m+=1;var k=!a[m++];n=Math.cos(_)*w+x,r=Math.sin(_)*S+b,y?p(d=n,h=r):f(u,c,n,r),u=Math.cos(A)*w+x,c=Math.sin(A)*S+b;for(var C=(k?-1:1)*Math.PI/2,M=_;k?M>A:M<A;M+=C){g(M,k?Math.max(M+C,A):Math.min(M+C,A),x,b,w,S)}break;case z1.R:d=u=a[m++],h=c=a[m++],n=d+a[m++],r=h+a[m++],p(n,h),f(n,h,n,r),f(n,r,d,r),f(d,r,d,h),f(d,h,n,h);break;case z1.Z:t&&f(u,c,d,h),u=d,c=h}}return t&&t.length>2&&l.push(t),l}function $1(e,t,n,r,i,o,a,s,l,u){if(B1(e,n)&&B1(t,r)&&B1(i,a)&&B1(o,s))l.push(a,s);else{var c=2/u,d=c*c,h=a-e,p=s-t,f=Math.sqrt(h*h+p*p);h/=f,p/=f;var g=n-e,m=r-t,v=i-a,y=o-s,x=g*g+m*m,b=v*v+y*y;if(x<d&&b<d)l.push(a,s);else{var w=h*g+p*m,S=-h*v-p*y;if(x-w*w<d&&w>=0&&b-S*S<d&&S>=0)l.push(a,s);else{var _=[],A=[];Ef(e,n,i,a,.5,_),Ef(t,r,o,s,.5,A),$1(_[0],A[0],_[1],A[1],_[2],A[2],_[3],A[3],l,u),$1(_[4],A[4],_[5],A[5],_[6],A[6],_[7],A[7],l,u)}}}}function V1(e,t,n){var r=e[t],i=e[1-t],o=Math.abs(r/i),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u<a;u++)l.push(s);var c=n-a*s;if(c>0)for(u=0;u<c;u++)l[u%a]+=1;return l}function W1(e,t,n){for(var r=e.r0,i=e.r,o=e.startAngle,a=e.endAngle,s=Math.abs(a-o),l=s*i,u=i-r,c=l>Math.abs(u),d=V1([l,u],c?0:1,t),h=(c?s:u)/d.length,p=0;p<d.length;p++)for(var f=(c?u:s)/d[p],g=0;g<d[p];g++){var m={};c?(m.startAngle=o+h*p,m.endAngle=o+h*(p+1),m.r0=r+f*g,m.r=r+f*(g+1)):(m.startAngle=o+f*g,m.endAngle=o+f*(g+1),m.r0=r+h*p,m.r=r+h*(p+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,n.push(m)}}function H1(e,t,n,r){return e*r-n*t}function G1(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,h=H1(c,d,l,u);if(Math.abs(h)<1e-6)return null;var p=H1(e-i,t-o,c,d)/h;return p<0||p>1?null:new zp(p*l+e,p*u+t)}function U1(e,t,n){var r=new zp;zp.sub(r,n,t),r.normalize();var i=new zp;return zp.sub(i,e,t),i.dot(r)}function X1(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function Y1(e){var t=e.points,n=[],r=[];Vy(t,n,r);var i=new Xp(n[0],n[1],r[0]-n[0],r[1]-n[1]),o=i.width,a=i.height,s=i.x,l=i.y,u=new zp,c=new zp;return o>a?(u.x=c.x=s+o/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+o),function(e,t,n){for(var r=e.length,i=[],o=0;o<r;o++){var a=e[o],s=e[(o+1)%r],l=G1(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&i.push({projPt:U1(l,t,n),pt:l,idx:o})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(e,t){return e.projPt-t.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}var h=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],f=[h],g=[p];for(o=u.idx+1;o<=c.idx;o++)X1(f,e[o].slice());for(X1(f,p),X1(f,h),o=c.idx+1;o<=u.idx+r;o++)X1(g,e[o%r].slice());return X1(g,h),X1(g,p),[{points:f},{points:g}]}(t,u,c)}function q1(e,t,n,r){if(1===n)r.push(t);else{var i=Math.floor(n/2),o=e(t);q1(e,o[0],i,r),q1(e,o[1],n-i,r)}return r}function Z1(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function K1(e,t){var n,r=[],i=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var r=e.width,i=e.height,o=r>i,a=V1([r,i],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",c=o?"y":"x",d=e[s]/a.length,h=0;h<a.length;h++)for(var p=e[l]/a[h],f=0;f<a[h];f++){var g={};g[u]=h*d,g[c]=f*p,g[s]=d,g[l]=p,g.x+=e.x,g.y+=e.y,n.push(g)}}(i,t,r),n=Kx;break;case"sector":W1(i,t,r),n=YC;break;case"circle":W1({r0:0,r:i.r,startAngle:0,endAngle:2*Math.PI,cx:i.cx,cy:i.cy},t,r),n=YC;break;default:var o=e.getComputedTransform(),a=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=nh(function(e,t){var n=F1(e),r=[];t=t||1;for(var i=0;i<n.length;i++){var o=n[i],a=[],s=o[0],l=o[1];a.push(s,l);for(var u=2;u<o.length;){var c=o[u++],d=o[u++],h=o[u++],p=o[u++],f=o[u++],g=o[u++];$1(s,l,c,d,h,p,f,g,a,t),s=f,l=g}r.push(a)}return r}(e.getUpdatedPathProxy(),a),function(e){return function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}(e)}),l=s.length;if(0===l)q1(Y1,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,d=nh(s,function(e){var t=[],n=[];Vy(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return c+=r,{poly:e,area:r}});d.sort(function(e,t){return t.area-e.area});var h=t;for(u=0;u<l;u++){var p=d[u];if(h<=0)break;var f=u===l-1?h:Math.ceil(p.area/c*t);f<0||(q1(Y1,{points:p.poly},f,r),h-=f)}}n=tM}if(!n)return function(e,t){for(var n=[],r=0;r<t;r++)n.push(CC(e));return n}(e,t);var g=[];for(u=0;u<r.length;u++){var m=new n;m.setShape(r[u]),Z1(e,m),g.push(m)}return g}function Q1(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var i=[],o=[],a=n<r?e:t,s=Math.min(n,r),l=Math.abs(r-n)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[a[0],a[1]],h=l,p=2;p<s;){var f=a[p-2],g=a[p-1],m=a[p++],v=a[p++],y=a[p++],x=a[p++],b=a[p++],w=a[p++];if(h<=0)d.push(m,v,y,x,b,w);else{for(var S=Math.min(h,c-1)+1,_=1;_<=S;_++){var A=_/S;Ef(f,m,y,b,A,i),Ef(g,v,x,w,A,o),f=i[3],g=o[3],d.push(i[1],o[1],i[2],o[2],f,g),m=i[5],v=o[5],y=i[6],x=o[6]}h-=S-1}}return a===e?[d,t]:[e,d]}function J1(e,t){for(var n=e.length,r=e[n-2],i=e[n-1],o=[],a=0;a<t.length;)o[a++]=r,o[a++]=i;return o}function e2(e){for(var t=0,n=0,r=0,i=e.length,o=0,a=i-2;o<i;a=o,o+=2){var s=e[a],l=e[a+1],u=e[o],c=e[o+1],d=s*c-u*l;t+=d,n+=(s+u)*d,r+=(l+c)*d}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function t2(e,t,n,r){for(var i=(e.length-2)/6,o=1/0,a=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=6*u,d=0,h=0;h<s;h+=2){var p=0===h?c:(c+h-2)%l+2,f=e[p]-n[0],g=e[p+1]-n[1],m=t[h]-r[0]-f,v=t[h+1]-r[1]-g;d+=m*m+v*v}d<o&&(o=d,a=u)}return a}function n2(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function r2(e){return e.__isCombineMorphing}var i2="__mOriginal_";function o2(e,t,n){var r=i2+t,i=e[r]||e[t];e[r]||(e[r]=e[t]);var o=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=o?o.apply(this,t):i.apply(this,t),a&&a.apply(this,t),e}}function a2(e,t){var n=i2+t;e[n]&&(e[t]=e[n],e[n]=null)}function s2(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;){var o=r[i],a=r[i+1];r[i++]=t[0]*o+t[2]*a+t[4],r[i++]=t[1]*o+t[3]*a+t[5]}}function l2(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=function(e,t){for(var n,r,i,o=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,d=void 0;l?u?(r=c=(n=Q1(l,u))[0],i=d=n[1]):(d=J1(i||l,l),c=l):(c=J1(r||u,u),d=u),o.push(c),a.push(d)}return[o,a]}(F1(n),F1(r)),o=i[0],a=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&s2(o,s),l&&s2(a,l),o2(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var u=function(e,t,n,r){for(var i,o=[],a=0;a<e.length;a++){var s=e[a],l=t[a],u=e2(s),c=e2(l);null==i&&(i=u[2]<0!==c[2]<0);var d=[],h=[],p=0,f=1/0,g=[],m=s.length;i&&(s=n2(s));for(var v=6*t2(s,l,u,c),y=m-2,x=0;x<y;x+=2){var b=(v+x)%y+2;d[x+2]=s[b]-u[0],d[x+3]=s[b+1]-u[1]}if(d[0]=s[v]-u[0],d[1]=s[v+1]-u[1],n>0)for(var w=r/n,S=-r/2;S<=r/2;S+=w){var _=Math.sin(S),A=Math.cos(S),k=0;for(x=0;x<s.length;x+=2){var C=d[x],M=d[x+1],I=l[x]-c[0],T=l[x+1]-c[1],D=I*A-T*_,j=I*_+T*A;g[x]=D,g[x+1]=j;var P=D-C,L=j-M;k+=P*P+L*L}if(k<f){f=k,p=S;for(var R=0;R<g.length;R++)h[R]=g[R]}}else for(var E=0;E<m;E+=2)h[E]=l[E]-c[0],h[E+1]=l[E+1]-c[1];o.push({from:d,to:h,fromCp:u,toCp:c,rotation:-p})}return o}(o,a,10,Math.PI),c=[];o2(t,"buildPath",{replace:function(e){for(var n=t.__morphT,r=1-n,i=[],o=0;o<u.length;o++){var a=u[o],s=a.from,l=a.to,d=a.rotation*n,h=a.fromCp,p=a.toCp,f=Math.sin(d),g=Math.cos(d);Jh(i,h,p,n);for(var m=0;m<s.length;m+=2){var v=s[m],y=s[m+1],x=v*r+(_=l[m])*n,b=y*r+(A=l[m+1])*n;c[m]=x*g-b*f+i[0],c[m+1]=x*f+b*g+i[1]}var w=c[0],S=c[1];e.moveTo(w,S);for(m=2;m<s.length;){var _=c[m++],A=c[m++],k=c[m++],C=c[m++],M=c[m++],I=c[m++];w===_&&S===A&&k===M&&C===I?e.lineTo(M,I):e.bezierCurveTo(_,A,k,C,M,I),w=M,S=I}}}})}function u2(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;return l2(e,t),t.__morphT=0,t.animateTo({__morphT:1},Kd({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a2(t,"buildPath"),a2(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),r&&r()}},n)),t}function c2(e,t,n,r,i,o){e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=o===r?0:Math.round(32767*(t-r)/(o-r));for(var a,s=0,l=32768;l>0;l/=2){var u=0,c=0;(e&l)>0&&(u=1),(t&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}function d2(e){var t=1/0,n=1/0,r=-1/0,i=-1/0,o=nh(e,function(e){var o=e.getBoundingRect(),a=e.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),r=Math.max(s,r),i=Math.max(l,i),[s,l]});return nh(o,function(o,a){return{cp:o,z:c2(o[0],o[1],t,n,r,i),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function h2(e){return K1(e.path,e.count)}function p2(e){return lh(e[0])}function f2(e,t){for(var n=[],r=e.length,i=0;i<r;i++)n.push({one:e[i],many:[]});for(i=0;i<t.length;i++){var o=t[i].length,a=void 0;for(a=0;a<o;a++)n[a%r].many.push(t[i][a])}var s=0;for(i=r-1;i>=0;i--)if(!n[i].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[i].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var g2={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),r=0;r<e.count;r++){var i=CC(e.path);i.setStyle("opacity",n),t.push(i)}return t},split:null};function m2(e,t,n,r,i,o){if(e.length&&t.length){var a=pw("update",r,i);if(a&&a.duration>0){var s,l,u=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);p2(e)&&(s=e,l=t),p2(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,h=s?f2(l,s):f2(d?t:e,[d?e:t]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)m(h[f],d,g,p),g+=h[f].many.length}}function m(e,t,r,i,a){var s=e.many,l=e.one;if(1!==s.length||a)for(var d=Kd({dividePath:g2[n],individualDelay:u&&function(e,t,n,o){return u(e+r,i)}},c),h=t?function(e,t,n){var r=[];!function e(t){for(var n=0;n<t.length;n++){var i=t[n];r2(i)?e(i.childrenRef()):i instanceof Nx&&r.push(i)}}(e);var i=r.length;if(!i)return{fromIndividuals:[],toIndividuals:[],count:0};var o=(n.dividePath||h2)({path:t,count:i});if(o.length!==i)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0};r=d2(r),o=d2(o);for(var a=n.done,s=n.during,l=n.individualDelay,u=new Im,c=0;c<i;c++){var d=r[c],h=o[c];h.parent=t,h.copyTransform(u),l||l2(d,h)}function p(e){for(var t=0;t<o.length;t++)o[t].addSelfToZr(e)}function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,a2(t,"addSelfToZr"),a2(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return o},o2(t,"addSelfToZr",{after:function(e){p(e)}}),o2(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});var g=o.length;if(l){var m=g,v=function(){0===--m&&(f(),a&&a())};for(c=0;c<g;c++){var y=l?Kd({delay:(n.delay||0)+l(c,g,r[c],o[c]),done:v},n):n;u2(r[c],o[c],y)}}else t.__morphT=0,t.animateTo({__morphT:1},Kd({during:function(e){for(var n=0;n<g;n++){var r=o[n];r.__morphT=t.__morphT,r.dirtyShape()}s&&s(e)},done:function(){f();for(var t=0;t<e.length;t++)a2(e[t],"updateTransform");a&&a()}},n));return t.__zr&&p(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}(s,l,d):function(e,t,n){var r=t.length,i=[],o=n.dividePath||h2;if(r2(e)){!function e(t){for(var n=0;n<t.length;n++){var r=t[n];r2(r)?e(r.childrenRef()):r instanceof Nx&&i.push(r)}}(e.childrenRef());var a=i.length;if(a<r)for(var s=0,l=a;l<r;l++)i.push(CC(i[s++%a]));i.length=r}else{i=o({path:e,count:r});var u=e.getComputedTransform();for(l=0;l<i.length;l++)i[l].setLocalTransform(u);if(i.length!==r)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0}}i=d2(i),t=d2(t);var c=n.individualDelay;for(l=0;l<r;l++){var d=c?Kd({delay:(n.delay||0)+c(l,r,i[l],t[l])},n):n;u2(i[l],t[l],d)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}(l,s,d),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,v=0;v<g;v++){y=u?Kd({delay:u(v,g)},c):c;o(p[v],f[v],t?s[v]:e.one,t?e.one:s[v],y)}else{var y,x=t?s[0]:l,b=t?l:s[0];if(r2(x))m({many:[x],one:b},!0,r,i,!0);else u2(x,b,y=u?Kd({delay:u(r,i)},c):c),o(x,b,x,b,y)}}}function v2(e){if(!e)return[];if(lh(e)){for(var t=[],n=0;n<e.length;n++)t.push(v2(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Nx&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var y2=Fv();function x2(e,t,n,r){var i=function(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var i=e.getDimensionInfo(n[r]);if(i&&0===i.otherDims[t])return n[r]}}(e,r?"itemChildGroupId":"itemGroupId");if(i){var o=function(e,t,n){var r=e.getDimensionInfo(n),i=r&&r.ordinalMeta;if(r){var o=e.get(r.name,t);return i&&i.categories[o]||o+""}}(e,t,i);return o}var a=e.getRawDataItem(t),s=r?"childGroupId":"groupId";return a&&a[s]?a[s]+"":r?void 0:n||e.getId(t)}function b2(e){var t=[];return th(e,function(e){var n=e.data,r=e.dataGroupId;if(!(n.count()>1e4))for(var i=n.getIndices(),o=0;o<i.length;o++)t.push({data:n,groupId:x2(n,o,r,!1),childGroupId:x2(n,o,r,!0),divide:e.divide,dataIndex:o})}),t}function w2(e,t,n){e.traverse(function(e){e instanceof Nx&&mw(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function S2(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function _2(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function A2(e,t,n){var r=pw("update",n,t);r&&e.traverse(function(e){if(e instanceof Ly){var t=function(e){return hw(e).oldStyle}(e);t&&e.animateFrom({style:t},r)}})}function k2(e,t,n){var r=b2(e),i=b2(t);function o(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?Zd(Zd({},n.style),e.style):e.style},i)}var a=!1,s=0,l=Ph(),u=Ph();r.forEach(function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&u.set(e.childGroupId,!0)});for(var c=0;c<i.length;c++){var d=i[c].groupId;if(u.get(d)){s=1;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=2;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?1===s?n.childGroupId:n.groupId:2===s?n.childGroupId:n.groupId}}var f=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var i=e[r],o=t[r];if(i.data.getId(i.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(r,i),g={};if(!f)for(c=0;c<i.length;c++){var m=i[c],v=m.data.getItemGraphicEl(m.dataIndex);v&&(g[v.id]=!0)}function y(e,t){var n=r[t],s=i[e],l=s.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),c=s.data.getItemGraphicEl(s.dataIndex);u!==c?u&&g[u.id]||c&&(_2(c),u?(_2(u),S2(u),a=!0,m2(v2(u),v2(c),s.divide,l,e,o)):w2(c,l,e)):c&&A2(c,s.dataIndex,l)}new fL(r,i,p(!0,f),p(!1,f),null,"multiple").update(y).updateManyToOne(function(e,t){var n=i[e],s=n.data,l=s.hostModel,u=s.getItemGraphicEl(n.dataIndex),c=ih(nh(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==u&&!g[e.id]});u&&(_2(u),c.length?(th(c,function(e){_2(e),S2(e)}),a=!0,m2(v2(c),v2(u),n.divide,l,e,o)):w2(u,l,n.dataIndex))}).updateOneToMany(function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!g[s.id]){var l=ih(nh(e,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==s}),u=i[e[0]].data.hostModel;l.length&&(th(l,function(e){return _2(e)}),s?(_2(s),S2(s),a=!0,m2(v2(s),v2(l),n.divide,u,e[0],o)):th(l,function(t){return w2(t,u,e[0])}))}}).updateManyToMany(function(e,t){new fL(t,e,function(e){return r[e].data.getId(r[e].dataIndex)},function(e){return i[e].data.getId(i[e].dataIndex)}).update(function(n,r){y(e[n],t[r])}).execute()}).execute(),a&&th(t,function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),i=pw("update",t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Nx&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function C2(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function M2(e){return lh(e)?e.sort().join(","):e}function I2(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function T2(e,t){var n=Ph(),r=Ph(),i=Ph();return th(e.oldSeries,function(t,n){var o=e.oldDataGroupIds[n],a=e.oldData[n],s=C2(t),l=M2(s);r.set(l,{dataGroupId:o,data:a}),lh(s)&&th(s,function(e){i.set(e,{key:l,dataGroupId:o,data:a})})}),th(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),o=e.getData(),a=C2(e),s=M2(a),l=r.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:I2(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:I2(o),data:o}]});else if(lh(a)){0;var u=[];th(a,function(e){var t=r.get(e);t.data&&u.push({dataGroupId:t.dataGroupId,divide:I2(t.data),data:t.data})}),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:t,data:o,divide:I2(o)}]})}else{var c=i.get(a);if(c){var d=n.get(c.key);d||(d={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:I2(c.data)}],newSeries:[]},n.set(c.key,d)),d.newSeries.push({dataGroupId:t,data:o,divide:I2(o)})}}}}),n}function D2(e,t){for(var n=0;n<e.length;n++){if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}}sj([function(e){e.registerPainter("canvas",eP)}]),sj([function(e){e.registerPainter("svg",dL)}]),sj([function(e){e.registerChartView(LR),e.registerSeriesModel(qL),e.registerLayout(RR("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,OR("line"))},function(e){e.registerChartView(wE),e.registerSeriesModel(ZR),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,sh(HR,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GR("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,OR("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)})})},function(e){e.registerChartView(EE),e.registerSeriesModel(FE),lT("pie",e.registerAction),e.registerLayout(sh(CE,"pie")),e.registerProcessor(IE("pie")),e.registerProcessor(function(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!(hh(r)&&!isNaN(r)&&r<0)})}}}("pie"))},function(e){sj(rz),e.registerSeriesModel($E),e.registerChartView(GE),e.registerLayout(RR("scatter"))},function(e){sj(wz),e.registerChartView(uz),e.registerSeriesModel(cz),e.registerLayout(iz),e.registerProcessor(IE("radar")),e.registerPreprocessor(sz)},function(e){sj(fF),e.registerChartView(GB),e.registerSeriesModel(XB),e.registerLayout(qB),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,YB),lT("map",e.registerAction)},function(e){e.registerChartView(PF),e.registerSeriesModel(ZF),e.registerLayout(QF),e.registerVisual(JF),function(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var r=dF(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)})})}(e)},function(e){e.registerSeriesModel(i$),e.registerChartView(v$),e.registerVisual(E$),e.registerLayout(Y$),function(e){for(var t=0;t<e$.length;t++)e.registerAction({type:e$[t],update:"updateView"},Oh);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},function(t,n){var r=GF(e,["treemapZoomToNode","treemapRootToNode"],t);if(r){var i=t.getViewRoot();i&&(e.direction=XF(i,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}})})}(e)},function(e){e.registerChartView(KV),e.registerSeriesModel(aW),e.registerProcessor(eV),e.registerVisual(tV),e.registerVisual(rV),e.registerLayout(pV),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,wV),e.registerLayout(_V),e.registerCoordinateSystem("graphView",{dimensions:JB.dimensions,create:AV}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Oh),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Oh),e.registerAction(sW,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(t){var r=dF(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)})})},function(e){e.registerChartView(pW),e.registerSeriesModel(fW)},function(e){e.registerChartView(vW),e.registerSeriesModel(xW),e.registerLayout(bW),e.registerProcessor(IE("funnel"))},function(e){sj(QH),e.registerChartView(CW),e.registerSeriesModel(IW),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,DW)},function(e){e.registerChartView(rG),e.registerSeriesModel(oG),e.registerLayout(aG),e.registerVisual(yG),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})})},function(e){e.registerSeriesModel(wG),e.registerChartView(IG),e.registerLayout(DG),e.registerTransform(jG)},function(e){e.registerChartView(QG),e.registerSeriesModel(eU),e.registerPreprocessor(tU),e.registerVisual(BG),e.registerLayout(iU)},function(e){e.registerChartView(sU),e.registerSeriesModel(lU),e.registerLayout(RR("effectScatter"))},function(e){e.registerChartView(yU),e.registerSeriesModel(SU),e.registerLayout(vU),e.registerVisual(AU)},function(e){e.registerChartView(IU),e.registerSeriesModel(TU)},function(e){e.registerChartView(KU),e.registerSeriesModel(QU),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,sh(HR,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GR("pictorialBar"))},function(e){e.registerChartView(JU),e.registerSeriesModel(tX),e.registerLayout(nX),e.registerProcessor(IE("themeRiver"))},function(e){e.registerChartView(lX),e.registerSeriesModel(cX),e.registerLayout(sh(hX,"sunburst")),e.registerProcessor(sh(IE,"sunburst")),e.registerVisual(fX),function(e){e.registerAction({type:oX,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t,n){var r=GF(e,[oX],t);if(r){var i=t.getViewRoot();i&&(e.direction=XF(i,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}})}),e.registerAction({type:aX,update:"none"},function(e,t,n){e=Zd({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){var n=GF(e,[aX],t);n&&(e.dataIndex=n.node.dataIndex)}),n.dispatchAction(Zd(e,{type:"highlight"}))}),e.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(e,t,n){e=Zd({},e),n.dispatchAction(Zd(e,{type:"downplay"}))})}(e)},function(e){e.registerChartView(oY),e.registerSeriesModel(yX)}]),sj(function(e){sj(rz),sj(uq)}),sj(function(e){sj(uq),GO.registerAxisPointerClass("PolarAxisPointer",hq),e.registerCoordinateSystem("polar",Tq),e.registerComponentModel(pq),e.registerComponentView(Xq),rN(e,"angle",gq,Gq),rN(e,"radius",mq,Uq),e.registerComponentView(Nq),e.registerComponentView($q),e.registerLayout(sh(Hq,"bar"))}),sj(fF),sj(function(e){sj(uq),GO.registerAxisPointerClass("SingleAxisPointer",fZ),e.registerComponentView(gZ),e.registerComponentView(Jq),e.registerComponentModel(tZ),rN(e,"single",tZ,tZ.defaultOption),e.registerCoordinateSystem("single",sZ)}),sj(QH),sj(function(e){e.registerComponentModel(vZ),e.registerComponentView(xZ),e.registerCoordinateSystem("calendar",SZ)}),sj(function(e){e.registerComponentModel(MZ),e.registerComponentView(DZ),e.registerPreprocessor(function(e){var t=e.graphic;lh(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}),sj(function(e){e.registerComponentModel(iK),e.registerComponentView(sK),nK("saveAsImage",lK),nK("magicType",pK),nK("dataView",SK),nK("dataZoom",YK),nK("restore",MK),sj(JZ)}),sj(function(e){sj(uq),e.registerComponentModel(qK),e.registerComponentView(vQ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Oh),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Oh)}),sj(uq),sj(function(e){e.registerComponentView(NQ),e.registerComponentModel(zQ),e.registerPreprocessor(xQ),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jQ),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"},Oh),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Oh),nK("brush",FQ)}),sj(function(e){e.registerComponentModel($Q),e.registerComponentView(VQ)}),sj(function(e){e.registerComponentModel(GQ),e.registerComponentView(JQ),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),function(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var r=t.getComponent("timeline");return r&&null!=e.currentIndex&&(r.setCurrentIndex(e.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:r.get("replaceMerge",!0)}),Kd({currentIndex:r.option.currentIndex},e)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)})}(e),e.registerPreprocessor(eJ)}),sj(function(e){e.registerComponentModel(lJ),e.registerComponentView(bJ),e.registerPreprocessor(function(e){rJ(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}),sj(function(e){e.registerComponentModel(wJ),e.registerComponentView(IJ),e.registerPreprocessor(function(e){rJ(e.series,"markLine")&&(e.markLine=e.markLine||{})})}),sj(function(e){e.registerComponentModel(TJ),e.registerComponentView(OJ),e.registerPreprocessor(function(e){rJ(e.series,"markArea")&&(e.markArea=e.markArea||{})})}),sj(function(e){sj(KJ),sj(o0)}),sj(function(e){sj(v0),sj(M0)}),sj(v0),sj(M0),sj(function(e){sj(d1),sj(v1)}),sj(d1),sj(v1),sj(function(e){e.registerPreprocessor(S1),e.registerVisual(e.PRIORITY.VISUAL.ARIA,w1)}),sj(function(e){e.registerTransform(R1),e.registerTransform(E1)}),sj(function(e){e.registerComponentModel(N1),e.registerComponentView(O1)}),sj(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){th(Iv(n.seriesTransition),function(e){th(Iv(e.to),function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(null!=e.seriesIndex&&e.seriesIndex===t[r].seriesIndex||null!=e.seriesId&&e.seriesId===t[r].id)&&(t[r][Yk]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(e,t,n){var r=y2(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)th(Iv(i),function(e){!function(e,t,n,r){var i=[],o=[];th(Iv(e.from),function(e){var n=D2(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:I2(t.oldData[n]),groupIdDim:e.dimension})}),th(Iv(e.to),function(e){var r=D2(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();o.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:I2(i),groupIdDim:e.dimension})}}),i.length>0&&o.length>0&&k2(i,o,r)}(e,r,n,t)});else{var o=T2(r,n);th(o.keys(),function(e){var n=o.get(e);k2(n.oldSeries,n.newSeries,t)})}th(n.updatedSeries,function(e){e[Yk]&&(e[Yk]=!1)})}for(var a=e.getSeries(),s=r.oldSeries=[],l=r.oldDataGroupIds=[],u=r.oldData=[],c=0;c<a.length;c++){var d=a[c].getData();d.count()<1e4&&(s.push(a[c]),l.push(a[c].get("dataGroupId")),u.push(d))}})}),sj(Uj);const j2="@Color",P2="@TITLE";function L2(e){const t=e.filter(e=>"string"!==typeof e||!e.startsWith(P2)).map(e=>"string"===typeof e?e.startsWith(j2)?e.split("@@")[1]:e:e.map(e=>{if(e.startsWith(j2))return e.split("@@")[1];if(e.startsWith("O:")&&e.length>9){const t=e[e.length-9];if("C"===t||"P"===t)return""}return e}).join("<br/>")),n=e.filter(e=>"string"!==typeof e).map(e=>e[1]);var r="black";const i=e.flatMap(e=>"string"===typeof e?e.startsWith(j2)?[e]:[]:e.map(e=>e.startsWith(j2)?e:null).filter(e=>null!=e)).filter(e=>"string"===typeof e&&e.startsWith(j2)).sort().map(e=>e.substring(7).split("@@")[0]);if(i.length>0)r=i[0];else if(e.filter(e=>"string"===typeof e&&e.endsWith(" buy")).length>0)r="green";else{const t=null!=e.find(e=>"string"!==typeof e&&null!=e.find(e=>{if(e.startsWith("O:")&&e.length>9){if("C"===e[e.length-9])return!0}return!1})),n=null!=e.find(e=>"string"!==typeof e&&null!=e.find(e=>{if(e.startsWith("O:")&&e.length>9){if("P"===e[e.length-9])return!0}return!1}));t&&n?r="#20b2aa":(t&&(r="black"),n&&(r="#cdcdb4"))}var o="s";const a=e.filter(e=>"string"===typeof e&&e.startsWith(P2));return a.length>0&&(o=a[0].substring(6)),[t,r,o,n.find(e=>!0)]}function R2(e){const t=e.reduce((e,t)=>e+t,0);var n=4;return e.map(e=>{const r=Math.floor(92*e/t),i={top:`${n}%`,height:`${r}%`};return n+=r,i})}function E2(e,t,n,r,i){return O2(e,i,{y1:t,y2:r,kCandleLines:n,markPointsMp:(arguments.length>5&&void 0!==arguments[5]?arguments[5]:null)||void 0,markArea:arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0},arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]?arguments[7]:null)}const N2=[0,100];function O2(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const o=(arguments.length>4&&void 0!==arguments[4]?arguments[4]:null)||N2;var a,s;const l=t.flatMap(e=>e.filter(e=>3===e.length&&"boolean"===typeof e[2]).map(e=>[e[0],e[1]])),u=i?{formatter:function(e){if(e instanceof Array){if(null==n){const t=e.sort((e,t)=>e.componentIndex-t.componentIndex),n=t[0].dataIndex;return["Date: "+t[0].name+'<hr size=1 style="margin: 3px 0">',...t.map(e=>{var t;return`${e.seriesName}:${null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.toLocaleString()}<br/>`}),...l.map(e=>`${e[0]}:${e[1][n]}<br/>`)].join("")}{const i=n.y1[0].length||1,[o,a,...s]=e.sort((e,t)=>e.componentIndex-t.componentIndex),l=o.data;if(l instanceof Array&&l.length>4){const e=l[0];var t=l[1];l.length>5&&"number"===typeof l[5]?t=l[5]:e>0&&(t=n.y1[e-1][1]);const u=l[1],c=l[2],d=l[3],h=l[4],p=((c-t)/t*100).toFixed(2)+"%",f=((c-u)/u*100).toFixed(2)+"%",g=((h-d)/d*100).toFixed(2)+"%";var r="";return l.length>i+1&&(r="Signals: "+l[i+1].join(",").replaceAll("@@@","<br/>")+"<br/>"),["Date: "+o.name+'<hr size=1 style="margin: 3px 0">',"Open: "+l[1]+"<br/>","Close: "+c+"<br/>","Lowest: "+d+"<br/>","Highest: "+h+"<br/>","Change: "+g+"|"+p+"|"+f+"<br/>",a.seriesName+": "+a.data+"<br/>",...s.map(e=>{var t;return`<span style="background-color: ${e.color};width:10px;height:10px;display:inline-block;margin-right:5px;"></span>${e.seriesName}:${null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.toLocaleString()}<br/>`}),r].join("")}}}return""}}:{};if(null!=n){var c;a=[2.5,1,...t.map(e=>1)];const r=function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){if(r<e){n.push("-");continue}let i=0;for(let n=0;n<e;n++)i+=+t[r-n][1];n.push((i/e).toFixed(2))}return n}(5,n.y1),i={itemStyle:{borderColor:"rgba(255, 173, 177, 0.4)",borderWidth:3,color:"transparent"},data:null===(c=n.markArea)||void 0===c?void 0:c.map(e=>e[2]?[{name:e[3],xAxis:e[0]},{name:e[3],xAxis:e[1]}]:[{name:e[3],coord:[e[0],"min"]},{name:e[3],coord:[e[1],"max"]}])},o=n.kCandleLines.map(e=>{const t=e.length>2?"string"===typeof e[2]?{lineStyle:{width:1,color:e[2]}}:e[2]:{lineStyle:{width:1}};return{name:e[0],type:"line",data:e[1],smooth:!0,showSymbol:!1,...t}}),l=[];if(null!=n.markPointsMp)for(var d=0;d<e.length;d++){const t=n.markPointsMp.get(e[d]);if(null!=t){const[r,i,o,a]=L2(t);n.y1[d]=[...n.y1[d],r],l.push({name:"buy point",coord:[e[d],n.y1[d][3],a||1],value:o,itemStyle:{color:i}})}}s=[{name:"K-Line",type:"candlestick",data:n.y1,itemStyle:{color:"#00da3c",color0:"#ec0000",borderColor:void 0,borderColor0:void 0},markPoint:{data:l},markArea:i},{name:"MA5",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:1,color:"gray"}},...n.y2.map(e=>({name:e[0],type:"bar",xAxisIndex:1,yAxisIndex:1,data:e[1]})),...o]}else a=t.map(e=>1),s=[];const h=t.flatMap((e,t)=>e.filter(e=>e.length<3||"boolean"!==typeof e[2]).map(e=>({name:e[0],type:"line",smooth:!0,xAxisIndex:null!=n?2+t:t,yAxisIndex:null!=n?2+t:t,data:e[1],...e.length>2&&"boolean"!==typeof e[2]?{markPoint:{data:e[2]}}:{}})));return{animation:!1,tooltip:{trigger:"axis",...u,axisPointer:{type:"cross"},triggerOn:r?"click":"mousemove",borderWidth:1,borderColor:"#ccc",padding:10,textStyle:{color:"#000"},position:function(e,t,n,r,i){const o=e[0]>i.viewSize[0]/2?"left":"right";return{top:10,[o]:30}}},grid:R2(a),axisPointer:{link:[{xAxisIndex:"all"}],label:{backgroundColor:"#777"}},xAxis:[...a.map((t,n)=>({type:"category",gridIndex:n,data:e,boundaryGap:!1,axisLine:{onZero:!1},axisTick:{show:0===n},splitLine:{show:!1},axisLabel:{show:0===n},min:"dataMin",max:"dataMax"}))],yAxis:[...a.map((e,t)=>0===t?{scale:!0,splitArea:{show:!0}}:{scale:!0,gridIndex:t,splitNumber:1+t,axisLabel:{show:!0},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},splitArea:{show:!0}})],dataZoom:[{type:"inside",xAxisIndex:a.map((e,t)=>t),start:o[0],end:o[1]}],series:[...s,...h]}}class z2{constructor(){this.socket=void 0,this.subscribeMap=void 0,this.subscribeMsg=void 0,this.callBackMap=void 0,this.snapShotMap=void 0,this.count=void 0,this.readyListenerMap=void 0,this.endPromise=void 0,this.resolver=void 0,this.end=!1,this.pendingSubscribeMsgs=void 0,this.socket=null,this.resolver=null,this.endPromise=new Promise((e,t)=>{this.resolver=e}),this.subscribeMap=new Map,this.callBackMap=new Map,this.snapShotMap=new Map,this.readyListenerMap=new Map,this.subscribeMsg=new Map,this.count=100,this.pendingSubscribeMsgs=[]}close(){this.end=!0,null!=this.resolver&&this.resolver(1),null!=this.socket&&1===this.socket.readyState&&this.socket.close(),this.subscribeMap.clear(),this.callBackMap.clear(),this.pendingSubscribeMsgs.splice(0,this.pendingSubscribeMsgs.length),this.subscribeMsg.clear()}async ensureConnect(){for(var e=null,t=null;!this.end;){if(null==this.socket||3===this.socket.readyState){const n=new WebSocket(Ku(`wss://${Zu}/ws`));n.addEventListener("message",e=>this.messageCallBack(e)),t=new Promise((t,n)=>{e=t}),n.addEventListener("close",()=>{null!=e&&e(1)}),n.addEventListener("error",e=>{console.log("ws got error:",e)}),n.addEventListener("open",e=>{if(this.pendingSubscribeMsgs.length>0)for(;this.pendingSubscribeMsgs.length>0;){const e=this.pendingSubscribeMsgs.splice(0,1);e.length>0&&n.send(e[0])}else Array.from(this.subscribeMsg.values()).forEach(e=>{n.send(e)})}),this.socket=n}null!=t?await Promise.any([this.endPromise,t]):await Promise.any([this.endPromise,Xu(5e3)])}}sendMessage(e){null!=this.socket&&1===this.socket.readyState?this.socket.send(e):this.pendingSubscribeMsgs.push(e)}getUid(){return this.count++,`u-${this.count}`}registerReadyListener(e){const t=this.getUid();return this.readyListenerMap.set(t,e),t}unregisterReadyListener(e){this.readyListenerMap.has(e)&&this.readyListenerMap.delete(e)}messageCallBack(e){try{const t=JSON.parse(e.data);if("data"in t&&"target"in t){const e=t,n=e.target,r=this.subscribeMap.get(n);null!=r&&Array.from(r).forEach(t=>{const n=this.callBackMap.get(t);null!=n&&n[0](e)})}}catch(oae){}}subscribe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var i;const o=`${e}@${t}`;if("string"===typeof n){i=n;const e=this.callBackMap.get(i),t=this.subscribeMap.get(o);if(null==t){const e=new Set;e.add(i),this.subscribeMap.set(o,e)}else t.add(i);null!=e&&e[1].add(o)}else if(i=this.getUid(),!this.callBackMap.has(i)){const a=new Set;a.add(o);const s=this.subscribeMap.get(o);if(null==s){const n=new Set;n.add(i),this.subscribeMap.set(o,n);const a={subscribe:!0,[e]:t,...r||{}},s=JSON.stringify(a);this.subscribeMsg.set(o,s),this.sendMessage(s)}else s.add(i);this.callBackMap.set(i,[n,a])}return i}unsubscribe(e,t,n){const r=`${e}@${t}`,i=this.subscribeMap.get(r),o=this.callBackMap.get(n);if(null!=i&&i.has(n)&&(i.delete(n),0===i.size)){this.subscribeMap.delete(r),this.subscribeMsg.has(r)&&this.subscribeMsg.delete(r);const n={subscribe:!1,[e]:t};this.sendMessage(JSON.stringify(n))}null!=o&&o[1].has(r)&&(o[1].delete(r),0===o[1].size&&this.callBackMap.delete(n))}}function B2(e,t,n,r,i){const[o,a]=St().useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return(0,st().A)(()=>{let t=!0;if(!n)return;const r=n(e),i=()=>{t&&a(r.matches)};return i(),r.addListener(i),()=>{t=!1,r.removeListener(i)}},[e,n]),o}const F2=Ft().useSyncExternalStore;function $2(e,t,n,r,i){const o=St().useCallback(()=>t,[t]),a=St().useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return o},[o,e,r,i,n]),[s,l]=St().useMemo(()=>{if(null===n)return[o,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[o,n,e]);return F2(l,s,a)}const V2=(0,St().createContext)(null);function W2(e){const[t]=(0,St().useState)(()=>new z2);return(0,St().useEffect)(()=>(t.ensureConnect(),()=>{t.close()}),[t]),(0,wt().jsx)(V2.Provider,{value:t,children:e.children})}const H2=(0,St().createContext)(null);function G2(e){const[t,n]=(0,St().useState)(Eu()),[r,i]=(0,St().useState)(0),[o,a]=(0,St().useState)("1"===localStorage.getItem(Nu));return(0,St().useEffect)(()=>{n(Eu())},[r]),(0,St().useEffect)(()=>{const e=Yu.addCallBack(()=>{n(Eu())});return()=>{Yu.removeCallback(e)}},[]),(0,wt().jsx)(H2.Provider,{value:{userLevel:t,updateUserLevel:()=>i(e=>e+1),enableSelect:o,updateSelect:e=>{var t;a(e),t=e,localStorage.setItem(Nu,(t?1:0)+"")}},children:e.child})}function U2(){const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Li(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:i=!1,matchMedia:o=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=Pi({name:"MuiUseMediaQuery",props:t,theme:n});let l="function"===typeof e?e(n):e;return l=l.replace(/^@media( ?)/m,""),(void 0!==F2?$2:B2)(l,i,o,a,s)}("(min-width: 800px)"),t=(0,St().useContext)(H2);return null==t?e:!t.enableSelect||e}function X2(e){const{data2:t,isDayCandle:n,clickDay:r,isRealtime:i}=e,[o,a]=(0,St().useState)(null),s=U2(),l=(0,St().useRef)(null),[u,c]=(0,St().useState)([0,100]);return(0,St().useEffect)(()=>{if(null!=l.current)if(null==o)a(XD(l.current));else{var e;null==o?(e=XD(l.current),a(e)):e=o;const h=t.results,p=h.map(e=>n?nc.format(e.t):cc(e.t,!0)),f=n&&null!=t.prevClose?h.map(e=>[e.o,e.c,e.l,e.h,t.prevClose]):h.map(e=>[e.o,e.c,e.l,e.h]),g=h.map(e=>e.v);var d;if(n&&!0!==i)d=[["volume rank",h.map(e=>null!=e.vr?e.vr:0)]];else if(n)d=[["volume rank",h.map(e=>null!=e.vr?e.vr:0)]];else{const e=[],t=[],n=[],r=[];h.map(i=>{const o=i.preVolume||0,a=i.v2||0,s=i.v;t.push(e.reduce((e,t)=>t[0]>o?e+1:e,0)+1),n.push(e.reduce((e,t)=>t[1]>a?e+1:e,0)+1),r.push(e.reduce((e,t)=>t[2]>s?e+1:e,0)+1),e.push([o,a,s]),e.length>9&&e.splice(0,1)}),d=[["preVolume rank",t],["first hour volume rank",n],["day volume rank",r]]}const m=E2(p,f,[],[["volume",g]],[d],null,!s,u);e.setOption(m),n||e.on("click",e=>{"series"===e.componentType&&"candlestick"===e.componentSubType&&null!=r&&r(e.name.slice(0,10))}),e.on("datazoom",e=>{if(null!=e&&"object"===typeof e)if("start"in e&&"end"in e){const t=e;c([t.start,t.end])}else if("batch"in e){const t=e.batch;if(Array.isArray(t)){const e=t;if(e.length>0){const t=e[0];if("start"in t&&"end"in t){const e=t;c([e.start,e.end])}}}}})}},[t,o,n,s,r,i,u]),(0,wt().jsx)("div",{ref:l,style:{width:"100%",height:"100%"}})}function Y2(e){const{symbol:t,startDate:n,endDate:r,clickDay:i}=e,o=n===r,a=(0,St().useCallback)(async e=>await Qu(t,n,r,1,o?"minute":"day",e),[t,n,r,o]),s=`${t}-${n}-${r}`;return(0,wt().jsx)(Sd,{getter:a,debugKey:s,cvt:e=>(0,wt().jsx)(X2,{data2:e,isDayCandle:o,clickDay:i},s)})}function q2(e){const{symbol:t,updateInfo:n}=e,[r,i]=(0,St().useState)([]),[o,a]=(0,St().useState)(null),s=(0,St().useContext)(V2);return(0,St().useEffect)(()=>{if(null==o){const e=new AbortController,n=e.signal;return async function(e,t){const n=(new Date).getTime(),r=cc(n-432e6),i=cc(n);for(var o=20;o-- >0;){const n=await Qu(e,r,i,1,"day",t);if(!("err"in n)){const e=n.results;if(e.length>0){const t=e[e.length-1];if(cc(t.t)!==i)return t.c;if(e.length>1)return e[e.length-2].c}}await Xu(500)}return null}(t,n).then(e=>{n.aborted||null==e||a(e)}),()=>{e.abort()}}},[o,t]),(0,St().useEffect)(()=>{const e=new Map,n=null===s||void 0===s?void 0:s.subscribe("symbol",t,t=>{"reset"===t.command&&e.clear(),Object.entries(t.data).forEach(t=>{const n=t[1];e.set(t[0],n)}),i(Array.from(e.values()).sort((e,t)=>e.t-t.t))},{needHistory:!0});return()=>{null!=n&&(null===s||void 0===s||s.unsubscribe("symbol",t,n))}},[s,t]),(0,St().useEffect)(()=>{if(r.length>0&&null!=o){const e=r[r.length-1],t=e.c;n([t,t/o-1,e.t])}},[r,o,n]),(0,wt().jsx)(X2,{data2:{results:r,prevClose:o},isDayCandle:!0,isRealtime:!0})}function Z2(e){const[t,n]=(0,St().useState)(cc()),[r,i]=(0,St().useState)([0,0,0]);return(0,wt().jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"1rem"},children:[(0,wt().jsx)("div",{children:(0,wt().jsx)("h3",{children:(0,wt().jsx)(Ci,{to:`/stock/${e.symbol}`,children:e.symbol})})}),(0,wt().jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap"},children:[(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("h4",{children:["\u6700\u65b0:",(0,wt().jsx)("span",{style:{padding:"1rem",color:r[1]>=0?"green":"red"},children:(100*r[1]).toFixed(2)+"%"}),r[0].toFixed(2)+"$"]}),(0,wt().jsxs)("p",{children:[(0,wt().jsx)("span",{style:{color:"lightgrey"},children:"updated: "}),kc(r[2])]})]}),null!=e.tags&&(0,wt().jsx)(sd,{children:e.tags.map(t=>(0,wt().jsx)(yu,{onClick:()=>{t.startsWith("level ")||null==e.handleClickTag||e.handleClickTag(t)},color:"success",variant:"outlined",children:t},t))}),!!e.events&&e.events.length>0&&(0,wt().jsx)("div",{children:e.events.map(e=>(0,wt().jsxs)("p",{style:{margin:"0",color:"high"===e.level?"red":"medium"===e.level?"yellow":"green"},children:[e.name,": ",cc(e.timestamp)]}))}),(0,wt().jsxs)(sd,{children:[(0,wt().jsx)(yu,{color:"success",variant:"today"!==t&&"history"!==t?"contained":"outlined",onClick:e=>{n(e=>cc())},children:"Day"}),(0,wt().jsx)(yu,{color:"success",variant:"today"===t?"contained":"outlined",onClick:e=>{n(e=>"today"!==e?"today":e)},children:"Today"}),(0,wt().jsx)(yu,{color:"success",variant:"history"===t?"contained":"outlined",onClick:e=>{n(e=>"history"!==e?"history":e)},children:"History"})]})]}),(0,wt().jsxs)("div",{className:"CS-Container",children:[(0,wt().jsx)("div",{className:"CS-Item",style:{aspectRatio:"4/3"},children:(0,wt().jsx)(Y2,{clickDay:e=>n(e),startDate:e.startDate,endDate:e.endDate,symbol:e.symbol})}),(0,wt().jsx)("div",{className:"CS-Item",children:!0===e.marketOpen&&t===cc()?(0,wt().jsx)(q2,{symbol:e.symbol,updateInfo:i}):(0,wt().jsx)(Y2,{startDate:t,endDate:t,symbol:e.symbol})})]})]})}function K2(){const[e]=ji(),t=Fr(),n=e.get("path");return(0,St().useEffect)(()=>{null!=n&&(e.delete("path"),t(n+"?"+e.toString()))}),null!=n?(0,wt().jsx)("p",{children:"Cound not be here"}):(0,wt().jsx)(e5,{})}function Q2(e){return e.isBig?(0,wt().jsx)(sd,{children:e.children}):(0,wt().jsx)(wt().Fragment,{children:e.children})}function J2(e){const{d:t,marketOpen2:n}=e,r=U2(),[i,o]=(0,St().useState)({level:4}),a=[],s=e=>o(t=>({...t,tag:e}));t.forEach(e=>{e.tags.forEach(e=>{a.indexOf(e)<0&&a.push(e)})});const l=(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(yu,{color:"success",variant:null==i.tag?"contained":"outlined",onClick:()=>{o(e=>null!=e.level?{level:e.level}:{})},children:"All"}),a.map(e=>(0,wt().jsx)(yu,{onClick:()=>o(t=>({...t,tag:e})),color:"success",variant:i.tag===e?"contained":"outlined",children:e},e))]}),u=(new Date).getTime(),c=cc(u-5184e6),d=cc(u);return(0,wt().jsxs)("main",{className:"MainPage",children:[(0,wt().jsx)("h2",{children:"Main Page"}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Level: "}),(0,wt().jsxs)("select",{value:i.level||"all",onChange:e=>{o(t=>"all"===e.target.value?null==t.tag?{}:{tag:t.tag}:{...t,level:parseInt(e.target.value)})},children:[(0,wt().jsx)("option",{value:"all",children:"all"},"all"),_d.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))]}),(0,wt().jsx)("span",{children:"tags:"}),(0,wt().jsx)(Q2,{children:l,isBig:r}),(0,wt().jsx)("input",{value:i.query,onChange:e=>o(t=>({...t,query:e.target.value}))})]}),null!=n&&t.filter(e=>!(null!=i.query&&!e.stock.toLocaleLowerCase().startsWith(i.query.toLocaleLowerCase()))&&((null==i.level||i.level===e.level)&&!(null!=i.tag&&e.tags.indexOf(i.tag)<0))).map(e=>(0,wt().jsx)(Z2,{marketOpen:n,tags:e.tags.concat("level "+e.level),symbol:e.stock,startDate:c,endDate:d,events:e.events,handleClickTag:s},e.stock))]})}function e5(){const e=(0,St().useCallback)(async e=>{const t=await pc(e);if("err"in t)return t;{const n=1===await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=await tc(`${qu}/marketStatus`,e);if(!("err"in t)&&"exchanges"in t)return"closed"!==t.exchanges.nyse?1:0;return-1}(e);return[t,n]}},[]),t=(0,St().useCallback)(e=>(0,wt().jsx)(J2,{d:e[0],marketOpen2:e[1]}),[]);return(0,wt().jsx)(Sd,{getter:e,cvt:t,debugKey:"main"},"main")}const t5=864e5,n5=(0,Y().A)((0,wt().jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function r5(e){return(0,qe().Ay)("MuiChip",e)}const i5=(0,Ze().A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),o5=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],a5=(0,H().Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=n;return[{[`& .${i5.avatar}`]:t.avatar},{[`& .${i5.avatar}`]:t[`avatar${(0,U().A)(s)}`]},{[`& .${i5.avatar}`]:t[`avatarColor${(0,U().A)(r)}`]},{[`& .${i5.icon}`]:t.icon},{[`& .${i5.icon}`]:t[`icon${(0,U().A)(s)}`]},{[`& .${i5.icon}`]:t[`iconColor${(0,U().A)(i)}`]},{[`& .${i5.deleteIcon}`]:t.deleteIcon},{[`& .${i5.deleteIcon}`]:t[`deleteIcon${(0,U().A)(s)}`]},{[`& .${i5.deleteIcon}`]:t[`deleteIconColor${(0,U().A)(r)}`]},{[`& .${i5.deleteIcon}`]:t[`deleteIcon${(0,U().A)(l)}Color${(0,U().A)(r)}`]},t.root,t[`size${(0,U().A)(s)}`],t[`color${(0,U().A)(r)}`],o&&t.clickable,o&&"default"!==r&&t[`clickableColor${(0,U().A)(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${(0,U().A)(r)}`],t[l],t[`${l}${(0,U().A)(r)}`]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,Dt().A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${i5.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${i5.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},[`& .${i5.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${i5.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${i5.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${i5.icon}`]:(0,Dt().A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,Dt().A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),[`& .${i5.deleteIcon}`]:(0,Dt().A)({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:(0,pe().X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:(0,pe().X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?`rgba(${t.vars.palette[n.color].contrastTextChannel} / 0.7)`:(0,pe().X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{[`&.${i5.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{[`&.${i5.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,pe().X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${i5.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{[`&:hover, &.${i5.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${i5.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${i5.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${i5.avatar}`]:{marginLeft:4},[`& .${i5.avatarSmall}`]:{marginLeft:2},[`& .${i5.icon}`]:{marginLeft:4},[`& .${i5.iconSmall}`]:{marginLeft:2},[`& .${i5.deleteIcon}`]:{marginRight:5},[`& .${i5.deleteIconSmall}`]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.7)`:(0,pe().X4)(t.palette[n.color].main,.7)}`,[`&.${i5.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},[`&.${i5.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},[`& .${i5.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.7)`:(0,pe().X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})}),s5=(0,H().Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,U().A)(r)}`]]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})});function l5(e){return"Backspace"===e.key||"Delete"===e.key}const u5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiChip"}),{avatar:r,className:i,clickable:o,color:a="default",component:s,deleteIcon:l,disabled:u=!1,icon:c,label:d,onClick:h,onDelete:p,onKeyDown:f,onKeyUp:g,size:m="medium",variant:v="filled",tabIndex:y,skipFocusWhenDisabled:x=!1}=n,b=(0,jt().A)(n,o5),w=St().useRef(null),S=(0,se().A)(w,t),A=e=>{e.stopPropagation(),p&&p(e)},k=!(!1===o||!h)||o,C=k||p?lu:s||"div",M=(0,Dt().A)({},n,{component:C,disabled:u,size:m,color:a,iconColor:St().isValidElement(c)&&c.props.color||a,onDelete:!!p,clickable:k,variant:v}),I=(e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=e,u={root:["root",l,n&&"disabled",`size${(0,U().A)(r)}`,`color${(0,U().A)(i)}`,s&&"clickable",s&&`clickableColor${(0,U().A)(i)}`,a&&"deletable",a&&`deletableColor${(0,U().A)(i)}`,`${l}${(0,U().A)(i)}`],label:["label",`label${(0,U().A)(r)}`],avatar:["avatar",`avatar${(0,U().A)(r)}`,`avatarColor${(0,U().A)(i)}`],icon:["icon",`icon${(0,U().A)(r)}`,`iconColor${(0,U().A)(o)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,U().A)(r)}`,`deleteIconColor${(0,U().A)(i)}`,`deleteIcon${(0,U().A)(l)}Color${(0,U().A)(i)}`]};return(0,$e().A)(u,r5,t)})(M),T=C===lu?(0,Dt().A)({component:s||"div",focusVisibleClassName:I.focusVisible},p&&{disableRipple:!0}):{};let D=null;p&&(D=l&&St().isValidElement(l)?St().cloneElement(l,{className:(0,Pt().A)(l.props.className,I.deleteIcon),onClick:A}):(0,wt().jsx)(n5,{className:(0,Pt().A)(I.deleteIcon),onClick:A}));let j=null;r&&St().isValidElement(r)&&(j=St().cloneElement(r,{className:(0,Pt().A)(I.avatar,r.props.className)}));let P=null;return c&&St().isValidElement(c)&&(P=St().cloneElement(c,{className:(0,Pt().A)(I.icon,c.props.className)})),(0,wt().jsxs)(a5,(0,Dt().A)({as:C,className:(0,Pt().A)(I.root,i),disabled:!(!k||!u)||void 0,onClick:h,onKeyDown:e=>{e.currentTarget===e.target&&l5(e)&&e.preventDefault(),f&&f(e)},onKeyUp:e=>{e.currentTarget===e.target&&(p&&l5(e)?p(e):"Escape"===e.key&&w.current&&w.current.blur()),g&&g(e)},ref:S,tabIndex:x&&u?-1:y,ownerState:M},T,b,{children:[j||P,(0,wt().jsx)(s5,{className:(0,Pt().A)(I.label),ownerState:M,children:d}),D]}))});async function c5(e){const t=await Ic(null,e);if("err"in t)return t;{const n=await zc(e);return"err"in n?n:[n,t]}}function d5(e){const{data:[t,n],update:r}=e,i=[...t,...n.filter(e=>0===e.account.length&&e.strategy===Au).map(e=>`stock:${e.symbol}-${e.rowid}-${e.strategy}`)],[o,a]=(0,St().useState)(i.length>0?i.find(e=>e.search("energy buy")>-1)||i[0]:""),[s,l]=(0,St().useState)(null),u=(0,St().useCallback)(async e=>{const t=o.split("-");if(t.length>1){const i=n.find(e=>e.rowid+""===t[1]);if(null!=i){if(0===i.account.length){const t=await Yc(i.rowid,e);if("err"in t)return t;{const e=t.flatMap(e=>{const t=n.find(t=>t.rowid===e.subId);return null!=t?[t]:[]});return e.length>0&&(r([i.rowid+"",e[0]]),l(e[0])),e}}return r([i.rowid+"",i]),l(i),[i]}return{err:"fail to find account"}}return{err:"illegal task name!"}},[o,n,r]);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("select",{value:o,onChange:e=>a(e.target.value),children:i.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))}),(0,wt().jsx)(Sd,{getter:u,cvt:e=>(0,wt().jsx)("select",{value:(null===s||void 0===s?void 0:s.rowid)||"",onChange:t=>{const n=e.find(e=>e.rowid===parseInt(t.target.value));if(null!=n){l(n);const e=o.split("-");e.length>1&&r([e[1],n])}},children:e.map(e=>(0,wt().jsx)("option",{value:e.rowid,children:`${e.rowid}-${e.account}-${e.strategy}-${e.desc}`},e.rowid))})})]})}function h5(){const e=(0,St().useCallback)(async e=>await Bc(e),[]);return(0,wt().jsx)(Sd,{getter:e,cvt:e=>(0,wt().jsx)("div",{style:{marginBottom:20},children:e.filter(e=>null==e.isVirtual||0===e.isVirtual).map(e=>{const t=e.position;var n,r=e.name,i=!1;null!=t&&(i=!0,r=null!=e.optionNum&&null!=e.optionValue?`${r}<${e.optionNum}><${e.optionValue.toLocaleString()}><${(null===(n=e.margin)||void 0===n?void 0:n.toLocaleString())||"0"}>`:r+"|"+t.toLocaleString());const o=e.EquityWithLoanValue,a=e.MaintMarginReq,s=e.balance;if(null!=o&&null!=a&&null!=s){r=`${r}<Cushion:${(100*(s>0?(o-a)/s:0)).toLocaleString()}%(${o.toLocaleString()}|${a.toLocaleString()}|${s.toLocaleString()})>`}return(0,wt().jsx)(u5,{label:r,variant:"outlined",color:i?"success":"error"})})}),interval:2e4})}function p5(e){return(0,qe().Ay)("MuiCollapse",e)}(0,Ze().A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const f5=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],g5=(0,H().Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,Dt().A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),m5=(0,H().Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),v5=(0,H().Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(e=>{let{ownerState:t}=e;return(0,Dt().A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),y5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiCollapse"}),{addEndListener:r,children:i,className:o,collapsedSize:a="0px",component:s,easing:l,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:p,onExited:f,onExiting:g,orientation:m="vertical",style:v,timeout:y=O().p0.standard,TransitionComponent:x=Qa}=n,b=(0,jt().A)(n,f5),w=(0,Dt().A)({},n,{orientation:m,collapsedSize:a}),S=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,$e().A)(r,p5,n)})(w),A=Ja(),k=(0,ft().A)(),C=St().useRef(null),M=St().useRef(),I="number"===typeof a?`${a}px`:a,T="horizontal"===m,D=T?"width":"height",j=St().useRef(null),P=(0,se().A)(t,j),L=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},R=()=>C.current?C.current[T?"clientWidth":"clientHeight"]:0,E=L((e,t)=>{C.current&&T&&(C.current.style.position="absolute"),e.style[D]=I,c&&c(e,t)}),N=L((e,t)=>{const n=R();C.current&&T&&(C.current.style.position="");const{duration:r,easing:i}=ts({style:v,timeout:y,easing:l},{mode:"enter"});if("auto"===y){const t=A.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,M.current=t}else e.style.transitionDuration="string"===typeof r?r:`${r}ms`;e.style[D]=`${n}px`,e.style.transitionTimingFunction=i,h&&h(e,t)}),z=L((e,t)=>{e.style[D]="auto",d&&d(e,t)}),B=L(e=>{e.style[D]=`${R()}px`,p&&p(e)}),F=L(f),$=L(e=>{const t=R(),{duration:n,easing:r}=ts({style:v,timeout:y,easing:l},{mode:"exit"});if("auto"===y){const n=A.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,M.current=n}else e.style.transitionDuration="string"===typeof n?n:`${n}ms`;e.style[D]=I,e.style.transitionTimingFunction=r,g&&g(e)});return(0,wt().jsx)(x,(0,Dt().A)({in:u,onEnter:E,onEntered:z,onEntering:N,onExit:B,onExited:F,onExiting:$,addEndListener:e=>{"auto"===y&&k.start(M.current||0,e),r&&r(j.current,e)},nodeRef:j,timeout:"auto"===y?null:y},b,{children:(e,t)=>(0,wt().jsx)(g5,(0,Dt().A)({as:s,className:(0,Pt().A)(S.root,o,{entered:S.entered,exited:!u&&"0px"===I&&S.hidden}[e]),style:(0,Dt().A)({[T?"minWidth":"minHeight"]:I},v),ref:P},t,{ownerState:(0,Dt().A)({},w,{state:e}),children:(0,wt().jsx)(m5,{ownerState:(0,Dt().A)({},w,{state:e}),className:S.wrapper,ref:C,children:(0,wt().jsx)(v5,{ownerState:(0,Dt().A)({},w,{state:e}),className:S.wrapperInner,children:i})})}))}))});y5.muiSupportAuto=!0;const x5=y5;const b5=St().createContext({}),w5=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],S5=["component","slots","slotProps"],_5=["component"];function A5(e){return(0,qe().Ay)("MuiAccordion",e)}const k5=(0,Ze().A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),C5=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],M5=(0,H().Ay)(Os,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${k5.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${k5.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${k5.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${k5.expanded}`]:{margin:"16px 0"}}}]}}),I5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiAccordion"}),{children:r,className:i,defaultExpanded:o=!1,disabled:a=!1,disableGutters:s=!1,expanded:l,onChange:u,square:c=!1,slots:d={},slotProps:h={},TransitionComponent:p,TransitionProps:f}=n,g=(0,jt().A)(n,C5),[m,v]=(0,ie().A)({controlled:l,default:o,name:"Accordion",state:"expanded"}),y=St().useCallback(e=>{v(!m),u&&u(e,!m)},[m,u,v]),[x,...b]=St().Children.toArray(r),w=St().useMemo(()=>({expanded:m,disabled:a,disableGutters:s,toggle:y}),[m,a,s,y]),S=(0,Dt().A)({},n,{square:c,disabled:a,disableGutters:s,expanded:m}),A=(e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e,a={root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]};return(0,$e().A)(a,A5,t)})(S),k=(0,Dt().A)({transition:p},d),C=(0,Dt().A)({transition:f},h),[M,I]=function(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,jt().A)(t,w5),{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=(0,jt().A)(o,S5),p=c[e]||r,f=Aa(d[e],i),g=_a((0,Dt().A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:m},internalRef:v}=g,y=(0,jt().A)(g.props,_5),x=(0,ut().A)(v,null==f?void 0:f.ref,t.ref),b=a?a(y):{},w=(0,Dt().A)({},i,b),S="root"===e?m||u:m,_=ba(p,(0,Dt().A)({},"root"===e&&!u&&!c[e]&&s,"root"!==e&&!c[e]&&s,y,S&&{as:S},{ref:x}),w);return Object.keys(b).forEach(e=>{delete _[e]}),[p,_]}("transition",{elementType:x5,externalForwardedProps:{slots:k,slotProps:C},ownerState:S});return(0,wt().jsxs)(M5,(0,Dt().A)({className:(0,Pt().A)(A.root,i),ref:t,ownerState:S,square:c},g,{children:[(0,wt().jsx)(b5.Provider,{value:w,children:x}),(0,wt().jsx)(M,(0,Dt().A)({in:m,timeout:"auto"},I,{children:(0,wt().jsx)("div",{"aria-labelledby":x.props.id,id:x.props["aria-controls"],role:"region",className:A.region,children:b})}))]}))});function T5(e){return(0,qe().Ay)("MuiAccordionSummary",e)}const D5=(0,Ze().A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),j5=["children","className","expandIcon","focusVisibleClassName","onClick"],P5=(0,H().Ay)(lu,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),[`&.${D5.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${D5.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${D5.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${D5.expanded}`]:{minHeight:64}}}]}}),L5=(0,H().Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${D5.expanded}`]:{margin:"20px 0"}}}]}}),R5=(0,H().Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${D5.expanded}`]:{transform:"rotate(180deg)"}}}),E5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiAccordionSummary"}),{children:r,className:i,expandIcon:o,focusVisibleClassName:a,onClick:s}=n,l=(0,jt().A)(n,j5),{disabled:u=!1,disableGutters:c,expanded:d,toggle:h}=St().useContext(b5),p=(0,Dt().A)({},n,{expanded:d,disabled:u,disableGutters:c}),f=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e,o={root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,$e().A)(o,T5,t)})(p);return(0,wt().jsxs)(P5,(0,Dt().A)({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":d,className:(0,Pt().A)(f.root,i),focusVisibleClassName:(0,Pt().A)(f.focusVisible,a),onClick:e=>{h&&h(e),s&&s(e)},ref:t,ownerState:p},l,{children:[(0,wt().jsx)(L5,{className:f.content,ownerState:p,children:r}),o&&(0,wt().jsx)(R5,{className:f.expandIconWrapper,ownerState:p,children:o})]}))});function N5(e){return(0,qe().Ay)("MuiIconButton",e)}const O5=(0,Ze().A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),z5=["edge","children","className","color","disabled","disableFocusRipple","size"],B5=(0,H().Ay)(lu,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,U().A)(n.color)}`],n.edge&&t[`edge${(0,U().A)(n.edge)}`],t[`size${(0,U().A)(n.size)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})},e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,Dt().A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,Dt().A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,Dt().A)({},i&&{backgroundColor:t.vars?`rgba(${i.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${O5.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),F5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium"}=n,c=(0,jt().A)(n,z5),d=(0,Dt().A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:u}),h=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&`color${(0,U().A)(r)}`,i&&`edge${(0,U().A)(i)}`,`size${(0,U().A)(o)}`]};return(0,$e().A)(a,N5,t)})(d);return(0,wt().jsx)(B5,(0,Dt().A)({className:(0,Pt().A)(h.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},c,{ownerState:d,children:i}))});function $5(e){return(0,qe().Ay)("PrivateSwitchBase",e)}(0,Ze().A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const V5=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],W5=(0,H().Ay)(lu,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,Dt().A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),H5=(0,H().Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:$().A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),G5=St().forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:c,id:d,inputProps:h,inputRef:p,name:f,onBlur:g,onChange:m,onFocus:v,readOnly:y,required:x=!1,tabIndex:b,type:w,value:S}=e,_=(0,jt().A)(e,V5),[A,k]=(0,ie().A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),C=lo();let M=s;C&&"undefined"===typeof M&&(M=C.disabled);const I="checkbox"===w||"radio"===w,T=(0,Dt().A)({},e,{checked:A,disabled:M,disableFocusRipple:l,edge:u}),D=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${(0,U().A)(i)}`],input:["input"]};return(0,$e().A)(o,$5,t)})(T);return(0,wt().jsxs)(W5,(0,Dt().A)({component:"span",className:(0,Pt().A)(D.root,o),centerRipple:!0,focusRipple:!l,disabled:M,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),C&&C.onFocus&&C.onFocus(e)},onBlur:e=>{g&&g(e),C&&C.onBlur&&C.onBlur(e)},ownerState:T,ref:t},_,{children:[(0,wt().jsx)(H5,(0,Dt().A)({autoFocus:n,checked:r,defaultChecked:a,className:D.input,disabled:M,id:I?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;k(t),m&&m(e,t)},readOnly:y,ref:p,required:x,ownerState:T,tabIndex:b,type:w},"checkbox"===w&&void 0===S?{}:{value:S},h)),A?i:c]}))});function U5(e){return(0,qe().Ay)("MuiSwitch",e)}const X5=(0,Ze().A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Y5=["className","color","edge","size","sx"],q5=(0,H().Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,U().A)(n.edge)}`],t[`size${(0,U().A)(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${X5.thumb}`]:{width:16,height:16},[`& .${X5.switchBase}`]:{padding:4,[`&.${X5.checked}`]:{transform:"translateX(16px)"}}}}]}),Z5=(0,H().Ay)(G5,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${X5.input}`]:t.input},"default"!==n.color&&t[`color${(0,U().A)(n.color)}`]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${"light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${X5.checked}`]:{transform:"translateX(20px)"},[`&.${X5.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${"light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${X5.checked} + .${X5.track}`]:{opacity:.5},[`&.${X5.disabled} + .${X5.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:""+("light"===t.palette.mode?.12:.2)},[`& .${X5.input}`]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[n]=e;return{props:{color:n},style:{[`&.${X5.checked}`]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${X5.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n}DisabledColor`]:`${"light"===t.palette.mode?(0,pe().a)(t.palette[n].main,.62):(0,pe().e$)(t.palette[n].main,.55)}`}},[`&.${X5.checked} + .${X5.track}`]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),K5=(0,H().Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${"light"===t.palette.mode?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:""+("light"===t.palette.mode?.38:.3)}}),Q5=(0,H().Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),J5=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,jt().A)(n,Y5),u=(0,Dt().A)({},n,{color:i,edge:o,size:a}),c=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&`edge${(0,U().A)(n)}`,`size${(0,U().A)(r)}`],switchBase:["switchBase",`color${(0,U().A)(i)}`,o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,$e().A)(s,U5,t);return(0,Dt().A)({},t,l)})(u),d=(0,wt().jsx)(Q5,{className:c.thumb,ownerState:u});return(0,wt().jsxs)(q5,{className:(0,Pt().A)(c.root,r),sx:s,ownerState:u,children:[(0,wt().jsx)(Z5,(0,Dt().A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:u},l,{classes:(0,Dt().A)({},c,{root:c.switchBase})})),(0,wt().jsx)(K5,{className:c.track,ownerState:u})]})});function e3(e){return(0,qe().Ay)("MuiAccordionDetails",e)}(0,Ze().A)("MuiAccordionDetails",["root"]);const t3=["className"],n3=(0,H().Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}}),r3=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiAccordionDetails"}),{className:r}=n,i=(0,jt().A)(n,t3),o=n,a=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},e3,t)})(o);return(0,wt().jsx)(n3,(0,Dt().A)({className:(0,Pt().A)(a.root,r),ref:t,ownerState:o},i))});function i3(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)([0,100]),o=U2(),a=(0,St().useRef)(null),s=(0,St().useCallback)((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)},[e.clickDay]),l=(0,St().useCallback)(t=>{const n=e.clickPoint;null!=n&&n(t)},[e.clickPoint]),{historyData:u,isDay:c,symbol:d,preClose:h,signals:p,lines:f,extraLines:g,volumeLines:m}=e;return(0,St().useEffect)(()=>{if(null!=a.current)if(null==t){const t=XD(a.current);t.on("click",e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&l(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],s(e.name.slice(0,10),t)}}),t.on("datazoom",t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}}),n(t)}else{const n=u;if(null!=n&&n.length>0){const i=n.map(e=>c?nc.format(e.t):cc(e.t,!0)),a=c&&null!=h?n.map(e=>[e.o,e.c,e.l,e.h,h]):n.map(e=>[e.o,e.c,e.l,e.h]),s=n.map(e=>e.v),l=new Map;p.forEach(e=>{const t=c?nc.format(e[0]):cc(e[0],!0);l.set(t,e[1].map(e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e}))});var d=null;if(c){const e=n[0].t;d=[nc.format(Sc(e)),nc.format(_c(e))]}const u=E2(i,a,[],null!=m?m:[["volume",s]],null!=g?g:[],l,!o,e.zoomRange||r,null!=d?[[d[0],d[1],!0,"market open"]]:void 0);t.setOption(u)}}else n(null)},[u,p,t,o,c,s,l,h,d,r,e.zoomRange,e.setZoomRange,f,g,m]),(0,wt().jsx)("div",{ref:a,style:{width:"100%",height:"100%"}})}function o3(e){const{symbol:t,startDate:n,endDate:r,signals:i,zoomRange:o,setZoomRange:a,clickDay:s,unit2:l}=e,u=n===r,c=(0,St().useCallback)(async e=>{const i=null!=l?l:u?"minute":"day";return await Qu(t,n,r,1,i,e)},[t,n,r,u]);return(0,wt().jsx)(Sd,{getter:c,cvt:e=>(0,wt().jsx)(i3,{symbol:t,isDay:u,clickDay:s,historyData:!u||null!=l&&"minute"!==l?e.results:Lu(e.results,!1),preClose:e.prevClose||void 0,zoomRange:o,setZoomRange:a,signals:i})})}function a3(e){const{symbol:t,startDate:n,endDate:r,signals:i,zoomRange:o,setZoomRange:a,load:s}=e,l=n===r,u=(0,St().useCallback)(async e=>{const i=l?"minute":"day";return await Qu(t,n,r,1,i,e)},[t,n,r,l]);return s?(0,wt().jsx)(Sd,{getter:u,cvt:e=>(0,wt().jsx)(i3,{symbol:t,isDay:l,historyData:Lu(e.results,!1),preClose:e.prevClose||void 0,zoomRange:o,setZoomRange:a,signals:i})}):(0,wt().jsx)(wd,{})}function s3(e,t){return t.map(t=>t.map(t=>{const[n,r]=t;return[n,e.map(e=>{const t=Math.floor(e.t/t5)+"";return t in r?r[t]:0})]}))}function l3(e){const{startDate:t,endDate:n,symbol:r,signals:i,aggData:o,taskId:a}=e,s=(0,St().useCallback)(async e=>{if(null!=o){if(null!=a){const t=await Lc(a,e);if(!("err"in t)){const e=s3(o,t);return[o,e]}}return[o,[]]}if(null!=a){const i=Wc(t,n,r,e),o=Lc(a,e),[s,l]=await Promise.all([i,o]);if("err"in s||"err"in l)return"err"in s?s:l;return[s,s3(s,l)]}{const i=await Wc(t,n,r,e);return"err"in i?i:[i,[]]}},[t,n,r,o,a]);return(0,wt().jsx)(Sd,{getter:s,cvt:t=>{const n=[],[o,a]=t,s=o.map(e=>e.vol2||[0,0]),l=s.map(e=>e[0]),u=s.map(e=>e[1]);n.push([["vol(09:30)",l],["vol(15:40)",u]]);var c=[];const d=o.map(e=>e.v),h=o.map(e=>e.v2||0);c=h.find(e=>e<1)?[["volume",d]]:!0===e.withEstimateVolume?[["first hour",h],["day",d],["estimate",h.map(e=>1e7*Mu(e,60))]]:[["first hour",h],["day",d]];const p=(!0===e.withOtherRank?[["rank(9:35)","v_5"],["rank(9:40)","v_10"],["rank(10:00)","v_30"],["rank(10:30)","v2"],["rank(11:00)","v_90"],["rank(11:30)","v_120"],["rank(day)","v"]]:[["rank(first hour)","v2"],["rank(day)","v"]]).map(e=>[e[0],e[1],[]]),f=[];o.forEach(e=>{const t=p.map((t,n)=>{const r=e[t[1]]||0,i=f.reduce((e,t)=>t[n]>r?e+1:e,1);return p[n][2].push(i),r});f.push(t),f.length>9&&f.shift()});const g=p.map(e=>[e[0],e[2]]);if(n.push(g),e.withOtherRank){var m=[];m.push(["all(09:40)",o.map(e=>{if(null!=e.energy&&null!=e.money){const t=e.v_10||0;return ju(e.money.m_10,t,e.energy.all_10)}return 0})]),m.push(["all(10:00)",o.map(e=>{if(null!=e.energy&&null!=e.money){const t=e.v_30||0;return ju(e.money.m_30,t,e.energy.all_30)}return 0})]),m.push(["all(10:30)",o.map(e=>{if(null!=e.energy&&null!=e.money){const t=e.v2||0;return ju(e.money.m_60,t,e.energy.all_60)}return 0})]),m.push(["all(11:00)",o.map(e=>{if(null!=e.energy&&null!=e.money){const t=e.v_90||0;return ju(e.money.m_90,t,e.energy.all_90)}return 0})]),m.push(["all(11:30)",o.map(e=>{if(null!=e.energy&&null!=e.money){const t=e.v_120||0;return ju(e.money.m_120,t,e.energy.all_120)}return 0})]),n.push(m)}return(0,wt().jsx)(i3,{isDay:!1,historyData:o,clickDay:e.clickDay,signals:i||[],symbol:r,volumeLines:c,extraLines:[...n,...a]})}})}function u3(e){const t=e.updateCB,n=e.filter,[r,i]=(0,St().useState)(!1);return(0,wt().jsx)("div",{children:(0,wt().jsxs)(I5,{expanded:r,children:[(0,wt().jsx)(E5,{expandIcon:(0,wt().jsx)(F5,{onClick:e=>{i(e=>!e)},children:(0,wt().jsx)(y().A,{})}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Alpha:"}),(0,wt().jsx)("input",{type:"number",value:n.alpha,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,alpha:n}))}}),(0,wt().jsx)("span",{children:"Total:"}),(0,wt().jsx)("input",{type:"number",value:n.total,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,total:n}))}}),(0,wt().jsx)("span",{children:"\u5408\u7ea6\u65b9\u5411:"}),(0,wt().jsxs)("select",{value:null!=n.isCall?n.isCall?"1":"2":"0",onChange:e=>{const n=e.target.value,r="0"===n?void 0:"1"===n;t(e=>({...e,isCall:r}))},children:[(0,wt().jsx)("option",{value:"0",children:"Call+Put"}),(0,wt().jsx)("option",{value:"1",children:"Call"}),(0,wt().jsx)("option",{value:"2",children:"Put"})]}),(0,wt().jsx)("span",{children:"\u662f\u5426\u662f\u5927\u5355\u4ea4\u6613:"}),(0,wt().jsx)(J5,{checked:null!=n.isBigTrade&&n.isBigTrade,onChange:e=>{t(t=>({...t,isBigTrade:e.target.checked}))}})]})}),(0,wt().jsxs)(r3,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Score Low:"}),(0,wt().jsx)("input",{type:"number",value:n.scoreLow,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,scoreLow:n}))}}),(0,wt().jsx)("span",{children:"Score High:"}),(0,wt().jsx)("input",{type:"number",value:n.scoreHigh,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,scoreHigh:n}))}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Hour Score Low:"}),(0,wt().jsx)("input",{type:"number",value:n.hourScoreLow,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,hourScoreLow:n}))}}),(0,wt().jsx)("span",{children:"Hour Score High:"}),(0,wt().jsx)("input",{type:"number",value:n.hourScoreHigh,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,hourScoreHigh:n}))}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6700\u9ad8\u5408\u7ea6\u4ef7\u683c:"}),(0,wt().jsx)("input",{type:"number",value:n.priceHigh||8,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t(e=>({...e,priceHigh:n}))}}),(0,wt().jsx)("span",{children:"\u672b\u65e5\u5408\u7ea6:"}),(0,wt().jsxs)("select",{value:null!=n.isEndDay?n.isEndDay?"1":"2":"0",onChange:e=>{const n=e.target.value,r="0"===n?void 0:"1"===n;t(e=>({...e,isEndDay:r}))},children:[(0,wt().jsx)("option",{value:"0",children:"\u5168\u90e8\u5c55\u793a"}),(0,wt().jsx)("option",{value:"1",children:"\u53ea\u5c55\u793a\u672b\u65e5"}),(0,wt().jsx)("option",{value:"2",children:"\u53ea\u5c55\u793a\u975e\u672b\u65e5"})]})]})]})]})})}function c3(e,t,n){return n.filter(n=>{const r=n.extra,i=e.isBigTrade;if(null!=i)if(i){if("trade"!==r.type)return!1}else if(null!=r.type&&"agg"!==r.type)return!1;if(r.alpha<e.alpha)return!1;if(e.hourScoreHigh>e.hourScoreLow){if(!(r.hourScore>=e.hourScoreLow&&r.hourScore<=e.hourScoreHigh))return!1}else if(!(r.hourScore>=e.hourScoreLow||r.hourScore<=e.hourScoreHigh))return!1;if(e.scoreHigh>e.scoreLow){if(!(r.score>=e.scoreLow&&r.score<=e.scoreHigh))return!1}else if(!(r.score>=e.scoreLow||r.score<=e.scoreHigh))return!1;if(null!=e.isCall){if("C"===r.contract[r.contract.length-9]!==e.isCall)return!1}if(r.total<e.total)return!1;if(null!=e.priceHigh&&r.price>e.priceHigh)return!1;if(null!=e.isEndDay){const n=r.contract.length,i=r.contract.substring(n-15,n-9),o=t.replaceAll("-","").substring(2);if(e.isEndDay){if(o!==i)return!1}else if(o===i)return!1}return!0})}function d3(e,t,n){return n.filter(n=>{if(!0===e.isBigTrade)return!1;if(n.alpha<e.alpha)return!1;if(e.hourScoreHigh>e.hourScoreLow){if(!(n.hourScore>=e.hourScoreLow&&n.hourScore<=e.hourScoreHigh))return!1}else if(!(n.hourScore>=e.hourScoreLow||n.hourScore<=e.hourScoreHigh))return!1;if(e.scoreHigh>e.scoreLow){if(!(n.score>=e.scoreLow&&n.score<=e.scoreHigh))return!1}else if(!(n.score>=e.scoreLow||n.score<=e.scoreHigh))return!1;if(null!=e.isCall){if("C"===n.contract[n.contract.length-9]!==e.isCall)return!1}if(n.tradeMoney<e.total)return!1;if(null!=e.priceHigh&&n.price>e.priceHigh)return!1;if(null!=e.isEndDay){const r=n.contract.length,i=n.contract.substring(r-15,r-9),o=t.replaceAll("-","").substring(2);if(e.isEndDay){if(o!==i)return!1}else if(o===i)return!1}return!0})}function h3(e){return(0,qe().Ay)("MuiDivider",e)}const p3=(0,Ze().A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),f3=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],g3=(0,H().Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:(0,pe().X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,Dt().A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,Dt().A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),m3=(0,H().Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},"vertical"===n.orientation&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})}),v3=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,jt().A)(n,f3),f=(0,Dt().A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:u,role:c,textAlign:d,variant:h}),g=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,u={root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,$e().A)(u,h3,r)})(f);return(0,wt().jsx)(g3,(0,Dt().A)({as:a,className:(0,Pt().A)(g.root,o),role:c,ref:t,ownerState:f},p,{children:i?(0,wt().jsx)(m3,{className:g.wrapper,ownerState:f,children:i}):null}))});v3.muiSkipListHighlight=!0;const y3=v3;function x3(e){return(0,qe().Ay)("MuiFormGroup",e)}(0,Ze().A)("MuiFormGroup",["root","row","error"]);const b3=["className","row"],w3=(0,H().Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})}),S3=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiFormGroup"}),{className:r,row:i=!1}=n,o=(0,jt().A)(n,b3),a=ao({props:n,muiFormControl:lo(),states:["error"]}),s=(0,Dt().A)({},n,{row:i,error:a.error}),l=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,$e().A)(i,x3,t)})(s);return(0,wt().jsx)(w3,(0,Dt().A)({className:(0,Pt().A)(l.root,r),ownerState:s,ref:t},o))});function _3(e){return(0,qe().Ay)("MuiRadioGroup",e)}(0,Ze().A)("MuiRadioGroup",["root","row","error"]);const A3=St().createContext(void 0),k3=["actions","children","className","defaultValue","name","onChange","value"],C3=St().forwardRef(function(e,t){const{actions:n,children:r,className:i,defaultValue:o,name:a,onChange:s,value:l}=e,u=(0,jt().A)(e,k3),c=St().useRef(null),d=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,$e().A)(i,_3,t)})(e),[h,p]=(0,ie().A)({controlled:l,default:o,name:"RadioGroup"});St().useImperativeHandle(n,()=>({focus:()=>{let e=c.current.querySelector("input:not(:disabled):checked");e||(e=c.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);const f=(0,se().A)(t,c),g=(0,le().A)(a),m=St().useMemo(()=>({name:g,onChange(e){p(e.target.value),s&&s(e,e.target.value)},value:h}),[g,s,p,h]);return(0,wt().jsx)(A3.Provider,{value:m,children:(0,wt().jsx)(S3,(0,Dt().A)({role:"radiogroup",ref:f,className:(0,Pt().A)(d.root,i)},u,{children:r}))})}),M3=["component","direction","spacing","divider","children","className","useFlexGap"],I3=(0,Se().A)(),T3=Xi("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function D3(e){return Ni({props:e,name:"MuiStack",defaultTheme:I3})}function j3(e,t){const n=St().Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(St().cloneElement(t,{key:`separator-${i}`})),e),[])}const P3=e=>{let{ownerState:t,theme:n}=e,r=(0,Dt().A)({display:"flex",flexDirection:"column"},(0,ve().NI)({theme:n},(0,ve().kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,De().LX)(n),i=Object.keys(n.breakpoints.values).reduce((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e),{}),o=(0,ve().kW)({values:t.direction,base:i}),a=(0,ve().kW)({values:t.spacing,base:i});"object"===typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}});const s=(n,r)=>{return t.useFlexGap?{gap:(0,De()._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]}`]:(0,De()._W)(e,n)}};var i};r=(0,He().A)(r,(0,ve().NI)({theme:n},a,s))}return r=(0,ve().iZ)(n.breakpoints,r),r};const L3=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=T3,useThemeProps:n=D3,componentName:r="MuiStack"}=e,i=t(P3);return St().forwardRef(function(e,t){const o=n(e),a=(0,Le().A)(o),{component:s="div",direction:l="column",spacing:u=0,divider:c,children:d,className:h,useFlexGap:p=!1}=a,f=(0,jt().A)(a,M3),g={direction:l,spacing:u,useFlexGap:p},m=(0,$e().A)({root:["root"]},e=>(0,qe().Ay)(r,e),{});return(0,wt().jsx)(i,(0,Dt().A)({as:s,ownerState:g,ref:t,className:(0,Pt().A)(m.root,h)},f,{children:c?j3(d,c):d}))})}({createStyledComponent:(0,H().Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,_().b)({props:e,name:"MuiStack"})}),R3=L3;function E3(e){return(0,qe().Ay)("MuiTypography",e)}(0,Ze().A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const N3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],O3=(0,H().Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,U().A)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})}),z3={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},B3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},F3=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTypography"}),r=(e=>B3[e]||e)(n.color),i=(0,Le().A)((0,Dt().A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:u=!1,paragraph:c=!1,variant:d="body1",variantMapping:h=z3}=i,p=(0,jt().A)(i,N3),f=(0,Dt().A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:u,paragraph:c,variant:d,variantMapping:h}),g=s||(c?"p":h[d]||z3[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&`align${(0,U().A)(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,$e().A)(s,E3,a)})(f);return(0,wt().jsx)(O3,(0,Dt().A)({as:g,ref:t,ownerState:f,className:(0,Pt().A)(m.root,a)},p))});function $3(e){return(0,qe().Ay)("MuiFormControlLabel",e)}const V3=(0,Ze().A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),W3=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],H3=(0,H().Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${V3.label}`]:t.label},t.root,t[`labelPlacement${(0,U().A)(n.labelPlacement)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${V3.disabled}`]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${V3.label}`]:{[`&.${V3.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})}),G3=(0,H().Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{[`&.${V3.error}`]:{color:(t.vars||t).palette.error.main}}}),U3=St().forwardRef(function(e,t){var n,r;const i=(0,_().b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:u,label:c,labelPlacement:d="end",required:h,slotProps:p={}}=i,f=(0,jt().A)(i,W3),g=lo(),m=null!=(n=null!=l?l:s.props.disabled)?n:null==g?void 0:g.disabled,v=null!=h?h:s.props.required,y={disabled:m,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{"undefined"===typeof s.props[e]&&"undefined"!==typeof i[e]&&(y[e]=i[e])});const x=ao({props:i,muiFormControl:g,states:["error"]}),b=(0,Dt().A)({},i,{disabled:m,labelPlacement:d,required:v,error:x.error}),w=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,a={root:["root",n&&"disabled",`labelPlacement${(0,U().A)(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,$e().A)(a,$3,t)})(b),S=null!=(r=p.typography)?r:a.typography;let A=c;return null==A||A.type===F3||u||(A=(0,wt().jsx)(F3,(0,Dt().A)({component:"span"},S,{className:(0,Pt().A)(w.label,null==S?void 0:S.className),children:A}))),(0,wt().jsxs)(H3,(0,Dt().A)({className:(0,Pt().A)(w.root,o),ownerState:b,ref:t},f,{children:[St().cloneElement(s,y),v?(0,wt().jsxs)(R3,{display:"block",children:[A,(0,wt().jsxs)(G3,{ownerState:b,"aria-hidden":!0,className:w.asterisk,children:["\u2009","*"]})]}):A]}))}),X3=(0,Y().A)((0,wt().jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),Y3=(0,Y().A)((0,wt().jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),q3=(0,H().Ay)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:$().A})({position:"relative",display:"flex"}),Z3=(0,H().Ay)(X3,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),K3=(0,H().Ay)(Y3,{name:"MuiRadioButtonIcon"})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})});const Q3=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,i=(0,Dt().A)({},e,{checked:t});return(0,wt().jsxs)(q3,{className:n.root,ownerState:i,children:[(0,wt().jsx)(Z3,{fontSize:r,className:n.background,ownerState:i}),(0,wt().jsx)(K3,{fontSize:r,className:n.dot,ownerState:i})]})};function J3(e){return(0,qe().Ay)("MuiRadio",e)}const e4=(0,Ze().A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),t4=["checked","checkedIcon","color","icon","name","onChange","size","className"],n4=(0,H().Ay)(G5,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t[`size${(0,U().A)(n.size)}`],t[`color${(0,U().A)(n.color)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,pe().X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${e4.checked}`]:{color:(t.vars||t).palette[n.color].main}},{[`&.${e4.disabled}`]:{color:(t.vars||t).palette.action.disabled}})});const r4=(0,wt().jsx)(Q3,{checked:!0}),i4=(0,wt().jsx)(Q3,{}),o4=St().forwardRef(function(e,t){var n,r;const i=(0,_().b)({props:e,name:"MuiRadio"}),{checked:o,checkedIcon:a=r4,color:s="primary",icon:l=i4,name:u,onChange:c,size:d="medium",className:h}=i,p=(0,jt().A)(i,t4),f=(0,Dt().A)({},i,{color:s,size:d}),g=(e=>{const{classes:t,color:n,size:r}=e,i={root:["root",`color${(0,U().A)(n)}`,"medium"!==r&&`size${(0,U().A)(r)}`]};return(0,Dt().A)({},t,(0,$e().A)(i,J3,t))})(f),m=St().useContext(A3);let v=o;const y=(0,X().A)(c,m&&m.onChange);let x=u;var b,w;return m&&("undefined"===typeof v&&(b=m.value,v="object"===typeof(w=i.value)&&null!==w?b===w:String(b)===String(w)),"undefined"===typeof x&&(x=m.name)),(0,wt().jsx)(n4,(0,Dt().A)({type:"radio",icon:St().cloneElement(l,{fontSize:null!=(n=i4.props.fontSize)?n:d}),checkedIcon:St().cloneElement(a,{fontSize:null!=(r=r4.props.fontSize)?r:d}),ownerState:f,classes:g,name:x,checked:v,onChange:y,ref:t,className:(0,Pt().A)(g.root,h)},p))}),a4=(0,Y().A)((0,wt().jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person");var s4=n(139),l4=n.n(s4);const u4=["xxl","xl","lg","md","sm","xs"],c4="xs",d4=St().createContext({prefixes:{},breakpoints:u4,minBreakpoint:c4}),{Consumer:h4,Provider:p4}=d4;function f4(e,t){const{prefixes:n}=(0,St().useContext)(d4);return e||n[t]||t}const g4=St().forwardRef((e,t)=>{let{bsPrefix:n,className:r,striped:i,bordered:o,borderless:a,hover:s,size:l,variant:u,responsive:c,...d}=e;const h=f4(n,"table"),p=l4()(r,h,u&&`${h}-${u}`,l&&`${h}-${l}`,i&&`${h}-${"string"===typeof i?`striped-${i}`:"striped"}`,o&&`${h}-bordered`,a&&`${h}-borderless`,s&&`${h}-hover`),f=(0,wt().jsx)("table",{...d,className:p,ref:t});if(c){let e=`${h}-responsive`;return"string"===typeof c&&(e=`${e}-${c}`),(0,wt().jsx)("div",{className:e,children:f})}return f});g4.displayName="Table";const m4=g4,v4=!("undefined"===typeof window||!window.document||!window.document.createElement);var y4=!1,x4=!1;try{var b4={get passive(){return y4=!0},get once(){return x4=y4=!0}};v4&&(window.addEventListener("test",b4,b4),window.removeEventListener("test",b4,!0))}catch(oae){}const w4=function(e,t,n,r){if(r&&"boolean"!==typeof r&&!x4){var i=r.once,o=r.capture,a=n;!x4&&i&&(a=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=a),e.addEventListener(t,a,y4?r:o)}e.addEventListener(t,n,r)};function S4(e){return e&&e.ownerDocument||document}const _4=function(e,t,n,r){var i=r&&"boolean"!==typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var A4;function k4(e){if((!A4&&0!==A4||e)&&v4){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),A4=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return A4}const C4=function(e){const t=(0,St().useRef)(e);return(0,St().useEffect)(()=>{t.current=e},[e]),t};function M4(e){const t=C4(e);return(0,St().useCallback)(function(){return t.current&&t.current(...arguments)},[t])}const I4=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;const T4=function(e,t){return(0,St().useMemo)(()=>function(e,t){const n=I4(e),r=I4(t);return e=>{n&&n(e),r&&r(e)}}(e,t),[e,t])};function D4(e){const t=function(e){const t=(0,St().useRef)(e);return t.current=e,t}(e);(0,St().useEffect)(()=>()=>t.current(),[])}function j4(e,t){return function(e){var t=S4(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var P4=/([A-Z])/g;var L4=/^ms-/;function R4(e){return function(e){return e.replace(P4,"-$1").toLowerCase()}(e).replace(L4,"-ms-")}var E4=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const N4=function(e,t){var n="",r="";if("string"===typeof t)return e.style.getPropertyValue(R4(t))||j4(e).getPropertyValue(R4(t));Object.keys(t).forEach(function(i){var o=t[i];o||0===o?!function(e){return!(!e||!E4.test(e))}(i)?n+=R4(i)+": "+o+";":r+=i+"("+o+") ":e.style.removeProperty(R4(i))}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};const O4=function(e,t,n,r){return w4(e,t,n,r),function(){_4(e,t,n,r)}};function z4(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout(function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},t+n),o=O4(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),o()}}function B4(e,t,n,r){null==n&&(n=function(e){var t=N4(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var i=z4(e,n,r),o=O4(e,"transitionend",t);return function(){i(),o()}}function F4(e){void 0===e&&(e=S4());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(oae){return e.body}}function $4(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function V4(e){const t=function(e){const t=(0,St().useRef)(e);return t.current=e,t}(e);(0,St().useEffect)(()=>()=>t.current(),[])}const W4=function(e){const t=(0,St().useRef)(e);return(0,St().useEffect)(()=>{t.current=e},[e]),t};function H4(e){const t=W4(e);return(0,St().useCallback)(function(){return t.current&&t.current(...arguments)},[t])}const G4=`data-rr-ui-${"modal-open"}`;const U4=class{constructor(){let{ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(N4(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(G4,""),N4(r,t)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(G4),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},X4=(0,St().createContext)(v4?window:void 0);X4.Provider;function Y4(){return(0,St().useContext)(X4)}const q4=(e,t)=>v4?null==e?(t||S4()).body:("function"===typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;const Z4=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;const K4=function(e,t){return(0,St().useMemo)(()=>function(e,t){const n=Z4(e),r=Z4(t);return e=>{n&&n(e),r&&r(e)}}(e,t),[e,t])},Q4="undefined"!==typeof globalThis&&globalThis.navigator&&"ReactNative"===globalThis.navigator.product,J4="undefined"!==typeof document||Q4?St().useLayoutEffect:St().useEffect;function e6(e){if(!e||"function"===typeof e)return null;const{major:t}=function(){const e=St().version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}();return t>=19?e.props.ref:e.ref}const t6=function(e){let{children:t,in:n,onExited:r,mountOnEnter:i,unmountOnExit:o}=e;const a=(0,St().useRef)(null),s=(0,St().useRef)(n),l=H4(r);(0,St().useEffect)(()=>{n?s.current=!0:l(a.current)},[n,l]);const u=K4(a,e6(t)),c=(0,St().cloneElement)(t,{ref:u});return n?c:o||!s.current&&i?null:c},n6=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];const r6=["component"];const i6=St().forwardRef((e,t)=>{let{component:n}=e;const r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:o,onExited:a,addEndListener:s,children:l}=e,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,n6);const c=(0,St().useRef)(null),d=K4(c,e6(l)),h=e=>t=>{e&&c.current&&e(c.current,t)},p=(0,St().useCallback)(h(t),[t]),f=(0,St().useCallback)(h(n),[n]),g=(0,St().useCallback)(h(r),[r]),m=(0,St().useCallback)(h(i),[i]),v=(0,St().useCallback)(h(o),[o]),y=(0,St().useCallback)(h(a),[a]),x=(0,St().useCallback)(h(s),[s]);return Object.assign({},u,{nodeRef:c},t&&{onEnter:p},n&&{onEntering:f},r&&{onEntered:g},i&&{onExit:m},o&&{onExiting:v},a&&{onExited:y},s&&{addEndListener:x},{children:"function"===typeof l?(e,t)=>l(e,Object.assign({},t,{ref:d})):(0,St().cloneElement)(l,{ref:d})})}(function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,r6));return(0,wt().jsx)(n,Object.assign({ref:t},r))}),o6=i6;function a6(e){let{children:t,in:n,onExited:r,onEntered:i,transition:o}=e;const[a,s]=(0,St().useState)(!n);n&&a&&s(!1);const l=function(e){let{in:t,onTransition:n}=e;const r=(0,St().useRef)(null),i=(0,St().useRef)(!0),o=H4(n);return J4(()=>{if(!r.current)return;let e=!1;return o({in:t,element:r.current,initial:i.current,isStale:()=>e}),()=>{e=!0}},[t,o]),J4(()=>(i.current=!1,()=>{i.current=!0}),[]),r}({in:!!n,onTransition:e=>{Promise.resolve(o(e)).then(()=>{e.isStale()||(e.in?null==i||i(e.element,e.initial):(s(!0),null==r||r(e.element)))},t=>{throw e.in||s(!0),t})}}),u=K4(l,e6(t));return a&&!n?null:(0,St().cloneElement)(t,{ref:u})}function s6(e,t,n){return e?(0,wt().jsx)(o6,Object.assign({},n,{component:e})):t?(0,wt().jsx)(a6,Object.assign({},n,{transition:t})):(0,wt().jsx)(t6,Object.assign({},n))}const l6=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let u6;function c6(e){const t=Y4(),n=e||function(e){return u6||(u6=new U4({ownerDocument:null==e?void 0:e.document})),u6}(t),r=(0,St().useRef)({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:(0,St().useCallback)(e=>{r.current.dialog=e},[]),setBackdropRef:(0,St().useCallback)(e=>{r.current.backdrop=e},[])})}const d6=(0,St().forwardRef)((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:a,backdrop:s=!0,keyboard:l=!0,onBackdropClick:u,onEscapeKeyDown:c,transition:d,runTransition:h,backdropTransition:p,runBackdropTransition:f,autoFocus:g=!0,enforceFocus:m=!0,restoreFocus:v=!0,restoreFocusOptions:y,renderDialog:x,renderBackdrop:b=e=>(0,wt().jsx)("div",Object.assign({},e)),manager:w,container:S,onShow:_,onHide:A=()=>{},onExit:k,onExited:C,onExiting:M,onEnter:I,onEntering:T,onEntered:D}=e,j=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,l6);const P=Y4(),L=function(e,t){const n=Y4(),[r,i]=(0,St().useState)(()=>q4(e,null==n?void 0:n.document));if(!r){const t=q4(e);t&&i(t)}return(0,St().useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,St().useEffect)(()=>{const t=q4(e);t!==r&&i(t)},[e,r]),r}(S),R=c6(w),E=function(){const e=(0,St().useRef)(!0),t=(0,St().useRef)(()=>e.current);return(0,St().useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}(),N=function(e){const t=(0,St().useRef)(null);return(0,St().useEffect)(()=>{t.current=e}),t.current}(n),[O,z]=(0,St().useState)(!n),B=(0,St().useRef)(null);(0,St().useImperativeHandle)(t,()=>R,[R]),v4&&!N&&n&&(B.current=F4(null==P?void 0:P.document)),n&&O&&z(!1);const F=H4(()=>{if(R.add(),U.current=O4(document,"keydown",H),G.current=O4(document,"focus",()=>setTimeout(V),!0),_&&_(),g){var e,t;const n=F4(null!=(e=null==(t=R.dialog)?void 0:t.ownerDocument)?e:null==P?void 0:P.document);R.dialog&&n&&!$4(R.dialog,n)&&(B.current=n,R.dialog.focus())}}),$=H4(()=>{var e;(R.remove(),null==U.current||U.current(),null==G.current||G.current(),v)&&(null==(e=B.current)||null==e.focus||e.focus(y),B.current=null)});(0,St().useEffect)(()=>{n&&L&&F()},[n,L,F]),(0,St().useEffect)(()=>{O&&$()},[O,$]),V4(()=>{$()});const V=H4(()=>{if(!m||!E()||!R.isTopModal())return;const e=F4(null==P?void 0:P.document);R.dialog&&e&&!$4(R.dialog,e)&&R.dialog.focus()}),W=H4(e=>{e.target===e.currentTarget&&(null==u||u(e),!0===s&&A())}),H=H4(e=>{l&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&R.isTopModal()&&(null==c||c(e),e.defaultPrevented||A())}),G=(0,St().useRef)(),U=(0,St().useRef)();if(!L)return null;const X=Object.assign({role:r,ref:R.setDialogRef,"aria-modal":"dialog"===r||void 0},j,{style:o,className:i,tabIndex:-1});let Y=x?x(X):(0,wt().jsx)("div",Object.assign({},X,{children:St().cloneElement(a,{role:"document"})}));Y=s6(d,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:M,onExited:function(){z(!0),null==C||C(...arguments)},onEnter:I,onEntering:T,onEntered:D,children:Y});let q=null;return s&&(q=b({ref:R.setBackdropRef,onClick:W}),q=s6(p,f,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:q})),(0,wt().jsx)(wt().Fragment,{children:vt().createPortal((0,wt().jsxs)(wt().Fragment,{children:[q,Y]}),L)})});d6.displayName="Modal";const h6=Object.assign(d6,{Manager:U4});var p6=Function.prototype.bind.call(Function.prototype.call,[].slice);function f6(e,t){return p6(e.querySelectorAll(t))}function g6(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const m6=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",v6=".sticky-top",y6=".navbar-toggler";class x6 extends U4{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,N4(t,{[e]:`${parseFloat(N4(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],N4(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";f6(t,m6).forEach(t=>this.adjustAndStore(i,t,e.scrollBarWidth)),f6(t,v6).forEach(t=>this.adjustAndStore(o,t,-e.scrollBarWidth)),f6(t,y6).forEach(t=>this.adjustAndStore(o,t,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"===typeof n.className?n.className=g6(n.className,r):n.setAttribute("class",g6(n.className&&n.className.baseVal||"",r));const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";f6(t,m6).forEach(e=>this.restore(i,e)),f6(t,v6).forEach(e=>this.restore(o,e)),f6(t,y6).forEach(e=>this.restore(o,e))}}let b6;function w6(e,t){const n=N4(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function S6(e,t){const n=w6(e,"transitionDuration"),r=w6(e,"transitionDelay"),i=B4(e,n=>{n.target===e&&(i(),t(n))},n+r)}const _6=St().forwardRef((e,t)=>{let{onEnter:n,onEntering:r,onEntered:i,onExit:o,onExiting:a,onExited:s,addEndListener:l,children:u,childRef:c,...d}=e;const h=(0,St().useRef)(null),p=T4(h,c),f=e=>{var t;p((t=e)&&"setState"in t?vt().findDOMNode(t):null!=t?t:null)},g=e=>t=>{e&&h.current&&e(h.current,t)},m=(0,St().useCallback)(g(n),[n]),v=(0,St().useCallback)(g(r),[r]),y=(0,St().useCallback)(g(i),[i]),x=(0,St().useCallback)(g(o),[o]),b=(0,St().useCallback)(g(a),[a]),w=(0,St().useCallback)(g(s),[s]),S=(0,St().useCallback)(g(l),[l]);return(0,wt().jsx)(Qa,{ref:t,...d,onEnter:m,onEntered:y,onEntering:v,onExit:x,onExited:w,onExiting:b,addEndListener:S,nodeRef:h,children:"function"===typeof u?(e,t)=>u(e,{...t,ref:f}):St().cloneElement(u,{ref:f})})});_6.displayName="TransitionWrapper";const A6=_6,k6={[Xa]:"show",[Ya]:"show"},C6=St().forwardRef((e,t)=>{let{className:n,children:r,transitionClasses:i={},onEnter:o,...a}=e;const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...a},l=(0,St().useCallback)((e,t)=>{!function(e){e.offsetHeight}(e),null==o||o(e,t)},[o]);return(0,wt().jsx)(A6,{ref:t,addEndListener:S6,...s,onEnter:l,childRef:e6(r),children:(e,t)=>St().cloneElement(r,{...t,className:l4()("fade",n,r.props.className,k6[e],i[e])})})});C6.displayName="Fade";const M6=C6,I6=St().forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i="div",...o}=e;return r=f4(r,"modal-body"),(0,wt().jsx)(i,{ref:t,className:l4()(n,r),...o})});I6.displayName="ModalBody";const T6=I6,D6=St().createContext({onHide(){}}),j6=St().forwardRef((e,t)=>{let{bsPrefix:n,className:r,contentClassName:i,centered:o,size:a,fullscreen:s,children:l,scrollable:u,...c}=e;n=f4(n,"modal");const d=`${n}-dialog`,h="string"===typeof s?`${n}-fullscreen-${s}`:`${n}-fullscreen`;return(0,wt().jsx)("div",{...c,ref:t,className:l4()(d,r,a&&`${n}-${a}`,o&&`${d}-centered`,u&&`${d}-scrollable`,s&&h),children:(0,wt().jsx)("div",{className:l4()(`${n}-content`,i),children:l})})});j6.displayName="ModalDialog";const P6=j6,L6=St().forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i="div",...o}=e;return r=f4(r,"modal-footer"),(0,wt().jsx)(i,{ref:t,className:l4()(n,r),...o})});L6.displayName="ModalFooter";const R6=L6;var E6=n(173),N6=n.n(E6);const O6={"aria-label":N6().string,onClick:N6().func,variant:N6().oneOf(["white"])},z6=St().forwardRef((e,t)=>{let{className:n,variant:r,"aria-label":i="Close",...o}=e;return(0,wt().jsx)("button",{ref:t,type:"button",className:l4()("btn-close",r&&`btn-close-${r}`,n),"aria-label":i,...o})});z6.displayName="CloseButton",z6.propTypes=O6;const B6=z6,F6=St().forwardRef((e,t)=>{let{closeLabel:n="Close",closeVariant:r,closeButton:i=!1,onHide:o,children:a,...s}=e;const l=(0,St().useContext)(D6),u=M4(()=>{null==l||l.onHide(),null==o||o()});return(0,wt().jsxs)("div",{ref:t,...s,children:[a,i&&(0,wt().jsx)(B6,{"aria-label":n,variant:r,onClick:u})]})});F6.displayName="AbstractModalHeader";const $6=F6,V6=St().forwardRef((e,t)=>{let{bsPrefix:n,className:r,closeLabel:i="Close",closeButton:o=!1,...a}=e;return n=f4(n,"modal-header"),(0,wt().jsx)($6,{ref:t,...a,className:l4()(r,n),closeLabel:i,closeButton:o})});V6.displayName="ModalHeader";const W6=V6,H6=e=>St().forwardRef((t,n)=>(0,wt().jsx)("div",{...t,ref:n,className:l4()(t.className,e)}));n.dn(H6);const G6=H6("h4"),U6=St().forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i=G6,...o}=e;return r=f4(r,"modal-title"),(0,wt().jsx)(i,{ref:t,className:l4()(n,r),...o})});U6.displayName="ModalTitle";const X6=U6;function Y6(e){return(0,wt().jsx)(M6,{...e,timeout:null})}function q6(e){return(0,wt().jsx)(M6,{...e,timeout:null})}const Z6=St().forwardRef((e,t)=>{let{bsPrefix:n,className:r,style:i,dialogClassName:o,contentClassName:a,children:s,dialogAs:l=P6,"data-bs-theme":u,"aria-labelledby":c,"aria-describedby":d,"aria-label":h,show:p=!1,animation:f=!0,backdrop:g=!0,keyboard:m=!0,onEscapeKeyDown:v,onShow:y,onHide:x,container:b,autoFocus:w=!0,enforceFocus:S=!0,restoreFocus:_=!0,restoreFocusOptions:A,onEntered:k,onExit:C,onExiting:M,onEnter:I,onEntering:T,onExited:D,backdropClassName:j,manager:P,...L}=e;const[R,E]=(0,St().useState)({}),[N,O]=(0,St().useState)(!1),z=(0,St().useRef)(!1),B=(0,St().useRef)(!1),F=(0,St().useRef)(null),[$,V]=(0,St().useState)(null),W=T4(t,V),H=M4(x),G=function(){const{dir:e}=(0,St().useContext)(d4);return"rtl"===e}();n=f4(n,"modal");const U=(0,St().useMemo)(()=>({onHide:H}),[H]);function X(){return P||(e={isRTL:G},b6||(b6=new x6(e)),b6);var e}function Y(e){if(!v4)return;const t=X().getScrollbarWidth()>0,n=e.scrollHeight>S4(e).documentElement.clientHeight;E({paddingRight:t&&!n?k4():void 0,paddingLeft:!t&&n?k4():void 0})}const q=M4(()=>{$&&Y($.dialog)});D4(()=>{_4(window,"resize",q),null==F.current||F.current()});const Z=()=>{z.current=!0},K=e=>{z.current&&$&&e.target===$.dialog&&(B.current=!0),z.current=!1},Q=()=>{O(!0),F.current=B4($.dialog,()=>{O(!1)})},J=e=>{"static"!==g?B.current||e.target!==e.currentTarget?B.current=!1:null==x||x():(e=>{e.target===e.currentTarget&&Q()})(e)},ee=(0,St().useCallback)(e=>(0,wt().jsx)("div",{...e,className:l4()(`${n}-backdrop`,j,!f&&"show")}),[f,j,n]),te={...i,...R};te.display="block";return(0,wt().jsx)(D6.Provider,{value:U,children:(0,wt().jsx)(h6,{show:p,ref:W,backdrop:g,container:b,keyboard:!0,autoFocus:w,enforceFocus:S,restoreFocus:_,restoreFocusOptions:A,onEscapeKeyDown:e=>{m?null==v||v(e):(e.preventDefault(),"static"===g&&Q())},onShow:y,onHide:x,onEnter:(e,t)=>{e&&Y(e),null==I||I(e,t)},onEntering:(e,t)=>{null==T||T(e,t),w4(window,"resize",q)},onEntered:k,onExit:e=>{null==F.current||F.current(),null==C||C(e)},onExiting:M,onExited:e=>{e&&(e.style.display=""),null==D||D(e),_4(window,"resize",q)},manager:X(),transition:f?Y6:void 0,backdropTransition:f?q6:void 0,renderBackdrop:ee,renderDialog:e=>(0,wt().jsx)("div",{role:"dialog",...e,style:te,className:l4()(r,n,N&&`${n}-static`,!f&&"show"),onClick:g?J:void 0,onMouseUp:K,"data-bs-theme":u,"aria-label":h,"aria-labelledby":c,"aria-describedby":d,children:(0,wt().jsx)(l,{...L,onMouseDown:Z,className:o,contentClassName:a,children:s})})})})});Z6.displayName="Modal";const K6=Object.assign(Z6,{Body:T6,Header:W6,Title:X6,Footer:R6,Dialog:P6,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});function Q6(e){let{node:t}=e;const n=(0,St().useRef)(null);return(0,St().useEffect)(()=>{if(null!=n.current){const e=function(e){var t=0;const n=[],r=[],i=[],o=[];for(e.uid=t++,n.push([e,0]);n.length>0;){const e=n.shift();if(null!=e){var a,s;const i=e[0],o=e[1];r.length===o&&r.push([]),null===(a=r[o])||void 0===a||a.push(i),null===(s=i.parents)||void 0===s||s.forEach(e=>{e.uid=t++,n.push([e,o+1])})}}const l=r.reduce((e,t)=>t.length>e?t.length:e,0),u=r.length,c=10*l;return r.forEach((e,t)=>{const n=c/e.length;e.forEach((e,r)=>{var a;const s=r*n,l=10*(u-t);o.push({x:s,y:l,name:e.uid+"",value:e.value,itemStyle:{borderColor:"boolean"!==typeof e.value||e.value?"green":"red",color:"white"},label:{formatter:null!=e.parents?e.operator:e.message}}),null===(a=e.parents)||void 0===a||a.forEach(t=>{i.push({source:t.uid+"",target:e.uid+"",value:t.value,lineStyle:{color:"boolean"!==typeof t.value||t.value?"green":"red"},label:{show:!0,formatter:"number"===typeof t.value?t.value.toFixed(3):t.value+""}})})})}),{title:{text:"Basic Graph"},tooltip:{},animationDurationUpdate:1500,animationEasingUpdate:"quinticInOut",series:[{type:"graph",layout:"none",symbolSize:50,roam:!0,label:{show:!0},edgeSymbol:["circle","arrow"],edgeSymbolSize:[4,10],edgeLabel:{fontSize:20},data:o,links:i,lineStyle:{opacity:.9,width:2,curveness:0}}]}}(t);XD(n.current).setOption(e)}}),(0,wt().jsx)("div",{ref:n,style:{width:"80vw",height:"80vh"}})}function J6(e){let{symbol:t,strategy:n}=e;const[r,i]=(0,St().useState)(!0),[o,a]=(0,St().useState)(null),[s,l]=(0,St().useState)(null),[u,c]=(0,St().useState)(cc());if((0,St().useEffect)(()=>{if(null==o){const e=new AbortController,r=e.signal;return i(!0),async function(e,t,n,r){const i=`${qu}/inspect?command=get&symbol=${e}&date=${n}&strategy=${t}`,o=await tc(i,r);return"err"in o?o:o instanceof Array?o.map(e=>({...e,graph:JSON.parse(e.graph)})):{err:"no key named data found"}}(t,n,u,r).then(e=>{a(e),i(!1)}),()=>{e.abort()}}},[t,n,u,o]),r)return(0,wt().jsx)(wd,{});var d;if(null==o)d=(0,wt().jsx)("p",{children:"no data"});else if("err"in o){const e="string"!==typeof o.err?o.err+"":o.err;d=(0,wt().jsx)("p",{children:e})}else d=(0,wt().jsx)(wt().Fragment,{children:(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Symbol"}),(0,wt().jsx)("td",{children:"Strategy"}),(0,wt().jsx)("td",{children:"Time"}),(0,wt().jsx)("td",{children:"Activated"}),(0,wt().jsx)("td",{children:"Message"})]})}),(0,wt().jsx)("tbody",{children:o.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.symbol}),(0,wt().jsx)("td",{children:e.strategy}),(0,wt().jsx)("td",{children:nc.format(e.timestamp)}),(0,wt().jsx)("td",{style:{color:1===e.activated?"green":"red"},children:1===e.activated?"True":"False"}),(0,wt().jsx)("td",{children:null==e.graph.parents?e.graph.message:(0,wt().jsxs)(wt().Fragment,{children:[e.graph.operator,(0,wt().jsx)(yu,{onClick:()=>l(e.graph),children:"Check"})]})})]},e.symbol+e.strategy+e.timestamp))})]})});return(0,wt().jsxs)("div",{style:{width:"100%"},children:[(0,wt().jsx)("input",{type:"date",value:u,onChange:e=>c(e.target.value)}),(0,wt().jsx)(yu,{onClick:()=>{a(null)},children:"Refresh"}),d,(0,wt().jsxs)(K6,{show:null!=s,onHide:()=>l(null),fullscreen:!0,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Inspect"})}),(0,wt().jsx)(K6.Body,{children:null!=s&&(0,wt().jsx)(Q6,{node:s})})]})]})}const e8=["\u65f6\u95f4","\u5408\u7ea6","\u65b9\u5411","\u4e70\u5165\u4ef7","\u6570\u91cf","\u5356\u51fa\u4ef7","\u4e70\u5165\u65f6\u95f4","\u6210\u672c","\u6536\u76ca","\u6536\u76ca\u7387","\u5356\u51fa\u6761\u4ef6"],t8=["\u65f6\u95f4","\u6807\u7684","\u7b56\u7565","\u5408\u7ea6","\u65b9\u5411","\u4e70\u5165\u4ef7","\u6570\u91cf","\u5356\u51fa\u4ef7","\u4e70\u5165\u65f6\u95f4","\u6210\u672c","\u6536\u76ca","\u6536\u76ca\u7387","\u5356\u51fa\u6761\u4ef6"];function n8(e,t){return r8(e,t)}function r8(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=e.buySignal.symbol+e.buySignal.strategy+e.timestamp+e.symbol+e.isSell+e.timestamp,o=e.buySignal.extra&&e.buySignal.extra.betPercent&&"("+e.buySignal.extra.betPercent.toFixed(2)+")"||"",a=e.isSell?"\u6e05\u4ed3":"\u5f00\u4ed3",s=(!0===e.reverse?!e.isSell:e.isSell)?"\u5356":"\u4e70",l=!0===e.reverse?`${s}|${a}`:s;return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:kc(e.timestamp)}),n&&(0,wt().jsx)("td",{children:e.buySignal.symbol}),r&&(0,wt().jsx)("td",{children:e.buySignal.strategy}),(0,wt().jsx)("td",{children:(0,wt().jsx)(Ci,{to:`/option/${e.symbol}/${cc(e.buySignal.timestamp)}?${t}`,children:e.symbol})}),(0,wt().jsx)("td",{children:`${l}${o}`}),(0,wt().jsx)("td",{children:(e.isSell?e.buyPrice:e.price).toFixed(2)}),(0,wt().jsx)("td",{children:e.volume.toLocaleString()}),(0,wt().jsx)("td",{children:e.isSell?e.price.toFixed(2):"-"}),(0,wt().jsx)("td",{children:kc(e.isSell?e.buyTimestamp:e.buySignal.timestamp)}),(0,wt().jsx)("td",{children:e.isSell?(e.buyPrice*e.volume).toLocaleString():"-"}),(0,wt().jsx)("td",{children:e.isSell?((e.price-e.buyPrice)*e.volume*(!0===e.reverse?-1:1)).toLocaleString():"-"}),(0,wt().jsx)("td",{children:e.isSell?((e.price-e.buyPrice)*(!0===e.reverse?-1:1)/e.buyPrice*100).toFixed(2)+"%":"-"}),(0,wt().jsx)("td",{children:e.isSell?e.sellSignal.subtype:e.buySignal.subtype})]},i)}function i8(e){let t=e.data,n=null!=e.names?e.names:e8,r=null!=e.converter?e.converter:n8;var i=0,o=0,a=0,s=0,l=0;const u=t.flatMap((t,u)=>{let c=[];const d=t[0].symbol+t[0].strategy+t[0].timestamp;var h=0,p=0,f=0,g=0,m=null;const v=new Map;if(t[1].forEach(e=>{const t=e.symbol;v.has(t)||v.set(t,[]),v.get(t).push([e.timestamp,e.isSell])}),t[1].forEach(t=>{if(t.isSell){h+=t.volume*t.buyPrice,p+=(t.price-t.buyPrice)*t.volume*(!0===t.reverse?-1:1);const n=Iu(t.symbol),r=null!=e.feeRate?e.feeRate:Du(n),i=!0!==t.reverse&&t.price<Tu?0:r;f+=-i*t.volume,m=[6e4*Math.floor(t.buyTimestamp/6e4),6e4*Math.floor(t.timestamp/6e4),t.symbol.length>9?"C"===t.symbol[t.symbol.length-9]:"TQQQ"===t.symbol]}const n=new URLSearchParams;v.has(t.symbol)&&n.set("points",JSON.stringify(v.get(t.symbol))),c.push(r(t,n.toString()))}),null!=e.dataMap&&null!=m){var y,x;const t=null===(y=e.dataMap)||void 0===y?void 0:y.get(m[0]),n=null===(x=e.dataMap)||void 0===x?void 0:x.get(m[1]);null!=t&&null!=n&&t>0&&(g=(m[2]?1:-1)*(n-t)/t,s+=g)}return i+=h,o+=p,a+=f,l+=(p+f)/h,c.push((0,wt().jsx)("tr",{children:n.map(e=>{if("\u65f6\u95f4"===e)return(0,wt().jsx)("td",{children:"\u5c0f\u8ba1"},e);if("\u6210\u672c"===e)return(0,wt().jsx)("td",{children:h.toLocaleString()},e);if("\u6536\u76ca"===e)return(0,wt().jsxs)("td",{children:[(p+f).toLocaleString(),"(",p.toLocaleString(),"|",f.toLocaleString(),")"]},e);if("\u6536\u76ca\u7387"===e){if(h>0){const t=((p+f)/h*100).toFixed(2)+"%",n=(f/h*100).toFixed(2)+"%",r=(p/h*100).toFixed(2)+"%";return(0,wt().jsxs)("td",{children:[t,"(",r,"|",n,")"]},e)}return(0,wt().jsx)("td",{children:"0"},e)}return"\u5356\u51fa\u6761\u4ef6"===e?(0,wt().jsxs)("td",{children:["gain:",(100*g).toFixed(2)+"%"]},e):(0,wt().jsx)("td",{children:"-"},e)})},d)),c});return(0,wt().jsx)("div",{style:{width:"100%"},children:(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsx)("tr",{children:n.map(e=>(0,wt().jsx)("td",{children:e},e))})}),(0,wt().jsxs)("tbody",{children:[u,(0,wt().jsx)("tr",{children:n.map(t=>{if("\u65f6\u95f4"===t)return(0,wt().jsx)("td",{children:"\u603b\u8ba1"},t);if("\u6210\u672c"===t)return(0,wt().jsx)("td",{children:i.toLocaleString()},t);if("\u6536\u76ca"===t)return(0,wt().jsxs)("td",{children:[o.toLocaleString(),"(",a.toLocaleString(),")"]},t);if("\u6536\u76ca\u7387"===t){if(i>0){const e=((o+a)/i*100).toFixed(2)+"%",n=(a/i*100).toFixed(2)+"%";return(0,wt().jsxs)("td",{children:[e,"(",n,")"]},t)}return(0,wt().jsx)("td",{children:"0"},t)}return"\u5356\u51fa\u6761\u4ef6"===t&&!0===e.addPercent?(0,wt().jsxs)("td",{children:[(100*l).toFixed(2)+"%","(gain:",(100*s).toFixed(2)+"%",")"]},t):(0,wt().jsx)("td",{children:"-"},t)})},"sumary")]})]})})}function o8(e){let{data:t,addPercent:n,aggs:r,feeRate:i}=e;const o=new Map;return null===r||void 0===r||r.forEach(e=>{const t=6e4*Math.floor(e.t/6e4);o.set(t,e.c)}),(0,wt().jsx)(i8,{data:t,names:t8,addPercent:n,converter:(e,t)=>r8(e,t,!0,!0),dataMap:o,feeRate:i})}const a8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,a=(0,ft().A)();St().useEffect(()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}},[i,r]);const s=(0,lt().A)((e,t)=>{null==r||r(e,t)}),l=(0,lt().A)(e=>{r&&null!=e&&a.start(e,()=>{s(null,"timeout")})});St().useEffect(()=>(i&&l(t),a.clear),[i,t,l,a]);const u=a.clear,c=St().useCallback(()=>{null!=t&&l(null!=o?o:.5*t)},[t,o,l]),d=e=>t=>{const n=e.onFocus;null==n||n(t),u()},h=e=>t=>{const n=e.onMouseEnter;null==n||n(t),u()},p=e=>t=>{const n=e.onMouseLeave;null==n||n(t),c()};return St().useEffect(()=>{if(!n&&i)return window.addEventListener("focus",c),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",c),window.removeEventListener("blur",u)}},[n,i,c,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,Dt().A)({},wa(e),wa(t));return(0,Dt().A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),c()}),onFocus:d(n),onMouseEnter:h(n),onMouseLeave:p(n)});var r},onClickAway:e=>{null==r||r(e,"clickaway")}}};function s8(e){return e.substring(2).toLowerCase()}function l8(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=St().useRef(!1),s=St().useRef(null),l=St().useRef(!1),u=St().useRef(!1);St().useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=(0,ut().A)(va(t),s),d=(0,lt().A)(e=>{const t=u.current;u.current=!1;const r=(0,et().A)(s.current);if(!l.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),o||!n&&t||i(e)}),h=e=>n=>{u.current=!0;const r=t.props[e];r&&r(n)},p={ref:c};return!1!==o&&(p[o]=h(o)),St().useEffect(()=>{if(!1!==o){const e=s8(o),t=(0,et().A)(s.current),n=()=>{a.current=!0};return t.addEventListener(e,d),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,d),t.removeEventListener("touchmove",n)}}},[d,o]),!1!==r&&(p[r]=h(r)),St().useEffect(()=>{if(!1!==r){const e=s8(r),t=(0,et().A)(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),(0,wt().jsx)(St().Fragment,{children:St().cloneElement(t,p)})}function u8(e){return(0,qe().Ay)("MuiSnackbarContent",e)}(0,Ze().A)("MuiSnackbarContent",["root","message","action"]);const c8=["action","className","message","role"],d8=(0,H().Ay)(Os,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,pe().tL)(t.palette.background.default,n);return(0,Dt().A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),h8=(0,H().Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),p8=(0,H().Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),f8=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiSnackbarContent"}),{action:r,className:i,message:o,role:a="alert"}=n,s=(0,jt().A)(n,c8),l=n,u=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"],action:["action"],message:["message"]},u8,t)})(l);return(0,wt().jsxs)(d8,(0,Dt().A)({role:a,square:!0,elevation:6,className:(0,Pt().A)(u.root,i),ownerState:l,ref:t},s,{children:[(0,wt().jsx)(h8,{className:u.message,ownerState:l,children:o}),r?(0,wt().jsx)(p8,{className:u.action,ownerState:l,children:r}):null]}))});function g8(e){return(0,qe().Ay)("MuiSnackbar",e)}(0,Ze().A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const m8=["onEnter","onExited"],v8=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],y8=(0,H().Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${(0,U().A)(n.anchorOrigin.vertical)}${(0,U().A)(n.anchorOrigin.horizontal)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,Dt().A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})}),x8=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiSnackbar"}),r=Ja(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:a,horizontal:s}={vertical:"bottom",horizontal:"left"},autoHideDuration:l=null,children:u,className:c,ClickAwayListenerProps:d,ContentProps:h,disableWindowBlurListener:p=!1,message:f,open:g,TransitionComponent:m=ss,transitionDuration:v=i,TransitionProps:{onEnter:y,onExited:x}={}}=n,b=(0,jt().A)(n.TransitionProps,m8),w=(0,jt().A)(n,v8),S=(0,Dt().A)({},n,{anchorOrigin:{vertical:a,horizontal:s},autoHideDuration:l,disableWindowBlurListener:p,TransitionComponent:m,transitionDuration:v}),A=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${(0,U().A)(n.vertical)}${(0,U().A)(n.horizontal)}`]};return(0,$e().A)(r,g8,t)})(S),{getRootProps:k,onClickAway:C}=a8((0,Dt().A)({},S)),[M,I]=St().useState(!0),T=Ca({elementType:y8,getSlotProps:k,externalForwardedProps:w,ownerState:S,additionalProps:{ref:t},className:[A.root,c]});return!g&&M?null:(0,wt().jsx)(l8,(0,Dt().A)({onClickAway:C},d,{children:(0,wt().jsx)(y8,(0,Dt().A)({},T,{children:(0,wt().jsx)(m,(0,Dt().A)({appear:!0,in:g,timeout:v,direction:"top"===a?"down":"up",onEnter:(e,t)=>{I(!1),y&&y(e,t)},onExited:e=>{I(!0),x&&x(e)}},b,{children:u||(0,wt().jsx)(f8,(0,Dt().A)({message:f,action:o},h))}))}))}))});function b8(e){return(0,wt().jsx)(x8,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:!0,autoHideDuration:2e3,onClose:()=>{e.cb()},message:e.msg})}const w8=["className","component"];const S8=(0,Ze().A)("MuiBox",["root"]),_8=(0,N().A)(),A8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=(0,he().default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Ee().A);return St().forwardRef(function(e,a){const s=Ei(n),l=(0,Le().A)(e),{className:u,component:c="div"}=l,d=(0,jt().A)(l,w8);return(0,wt().jsx)(o,(0,Dt().A)({as:c,ref:a,className:(0,Pt().A)(u,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:F().A,defaultTheme:_8,defaultClassName:S8.root,generateClassName:Ne().A.generate});const k8=(0,Ze().A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function C8(e){return(0,qe().Ay)("MuiListItemText",e)}const M8=(0,Ze().A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function I8(e){return(0,qe().Ay)("MuiMenuItem",e)}const T8=(0,Ze().A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),D8=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],j8=(0,H().Ay)(lu,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${T8.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${T8.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${T8.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${T8.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${T8.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${p3.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${p3.inset}`]:{marginLeft:52},[`& .${M8.root}`]:{marginTop:0,marginBottom:0},[`& .${M8.inset}`]:{paddingLeft:36},[`& .${k8.root}`]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,Dt().A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${k8.root} svg`]:{fontSize:"1.25rem"}}))}),P8=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:u="menuitem",tabIndex:c,className:d}=n,h=(0,jt().A)(n,D8),p=St().useContext(Ma),f=St().useMemo(()=>({dense:o||p.dense||!1,disableGutters:s}),[p.dense,o,s]),g=St().useRef(null);(0,oe().A)(()=>{r&&g.current&&g.current.focus()},[r]);const m=(0,Dt().A)({},n,{dense:f.dense,divider:a,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,$e().A)(s,I8,a);return(0,Dt().A)({},a,l)})(n),y=(0,se().A)(g,t);let x;return n.disabled||(x=void 0!==c?c:-1),(0,wt().jsx)(Ma.Provider,{value:f,children:(0,wt().jsx)(j8,(0,Dt().A)({ref:y,role:u,tabIndex:x,component:i,focusVisibleClassName:(0,Pt().A)(v.focusVisible,l),className:(0,Pt().A)(v.root,d)},h,{ownerState:m,classes:v}))})}),L8={PaperProps:{style:{maxHeight:224,width:250}}};function R8(e,t,n){return{fontWeight:-1===t.indexOf(e)?n.typography.fontWeightRegular:n.typography.fontWeightMedium}}function E8(e){const t=Ja(),{data:n,select:r,selected:i}=e,[o,a]=St().useState(i||[]);(0,St().useEffect)(()=>{if(null!=i){const e=new Set(n.map(e=>"string"===typeof e?e:e[0]));null!=i.find(t=>!e.has(t))&&a([])}},[n,i]);return(0,wt().jsx)("div",{children:(0,wt().jsxs)(ca,{sx:{m:1,width:300},children:[(0,wt().jsx)(aa,{id:"demo-multiple-chip-label",children:"Chip"}),(0,wt().jsx)(jl,{labelId:"demo-multiple-chip-label",id:"demo-multiple-chip",multiple:!0,value:o,onChange:e=>{const{target:{value:t}}=e,n="string"===typeof t?t.split(","):t;a(n),r(n)},input:(0,wt().jsx)(Zo,{id:"select-multiple-chip",label:"Chip"}),renderValue:e=>(0,wt().jsx)(A8,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map(e=>(0,wt().jsx)(u5,{label:e},e))}),MenuProps:L8,children:n.map(e=>{var n,r=null;return"string"===typeof e?n=e:(n=e[0],r=e[1]),(0,wt().jsx)(P8,{value:n,style:R8(n,o,t),children:null==r?n:`${n}-${r}`},n)})})]})})}function N8(e){const{type:t,value:n}=e,[r,i]=(0,St().useState)(n+"");return(0,St().useEffect)(()=>{i(n)},[n]),(0,wt().jsx)("input",{..."number"===t?{step:"0.0001"}:{},type:t,value:r+"",onChange:r=>{const o=r.target.value;if("number"===t){const t=parseFloat(r.target.value),a=n;isNaN(t)||(i(o),Math.abs(a-t)>1e-9&&e.handleUpdate(t))}else e.handleUpdate(o),i(o)}})}function O8(e){return(0,wt().jsx)(wt().Fragment,{children:e.params.map(t=>{const n=t.alternatives;return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("span",{children:[t.name,": "]}),null!=n&&"string"===typeof t.default?n[0]?(0,wt().jsx)(E8,{data:n[1],selected:t.default.length>0?t.default.split(","):[],select:n=>{e.handleConfig([t.key,n.join(",")])}}):(0,wt().jsxs)(jl,{value:t.default,onChange:n=>{e.handleConfig([t.key,n.target.value])},children:[(0,wt().jsx)(P8,{value:"",children:(0,wt().jsx)("em",{children:"None"})}),n[1].map(e=>(0,wt().jsx)(P8,{value:e,children:e},e))]}):(0,wt().jsx)(N8,{type:t.type,value:t.default,handleUpdate:n=>e.handleConfig([t.key,n])})]},t.key)})})}function z8(e){return e.filter(e=>"includeEndDay"===e.key&&1===e.default).length>0}function B8(e){let{taskConfigs:t,taskConfig:n,setTaskConfig:r,selectable:i,realTime:o}=e;return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{margin:"1rem"},children:[(0,wt().jsx)("span",{children:"Input Stock: "}),(0,wt().jsx)("input",{value:n.stock,disabled:!1===i,onChange:e=>{r(t=>({...t,stock:e.target.value}))}})]}),(0,wt().jsx)(y3,{}),(0,wt().jsxs)("div",{style:{margin:"1rem"},children:[(0,wt().jsx)("span",{children:"Select Buy Strategy: "}),(0,wt().jsx)("select",{value:n.buyAlgorithm,onChange:e=>{if(!1!==i){const n=e.target.value,i=t.filter(e=>e.id===n);1===i.length&&r(e=>({...e,buyAlgorithm:n,buyParams:i[0].params,sellParamsEnd:z8(i[0].params)?e.sellParams:void 0}))}},children:!1!==i?t.filter(e=>e.isBuy).map(e=>(0,wt().jsx)("option",{value:e.id,children:e.name},e.id)):(0,wt().jsx)("option",{value:n.buyAlgorithm,children:n.buyAlgorithm})})]}),(0,wt().jsx)(O8,{params:n.buyParams.filter(e=>!0===o?null==e.realTime||1===e.realTime:null==e.realTime||0===e.realTime),handleConfig:e=>{r(t=>{const n=t.buyParams.map(t=>e[0]===t.key?{...t,default:e[1]}:t);return{...t,buyParams:n,sellParamsEnd:z8(n)?t.sellParams:void 0}})}}),(0,wt().jsx)(y3,{}),(0,wt().jsxs)("div",{style:{margin:"1rem"},children:[(0,wt().jsx)("span",{children:"Select Sell Strategy: "}),(0,wt().jsx)("select",{value:n.sellAlgorithm,onChange:e=>{if(!1!==i){const n=e.target.value,i=t.filter(e=>e.id===n);1===i.length&&r(e=>({...e,sellAlgorithm:n,sellParams:i[0].params,sellParamsEnd:z8(e.buyParams)?i[0].params:void 0}))}},children:!1!==i?t.filter(e=>!e.isBuy).map(e=>(0,wt().jsx)("option",{value:e.id,children:e.name},e.id)):(0,wt().jsx)("option",{value:n.sellAlgorithm,children:n.sellAlgorithm})})]}),(0,wt().jsx)(O8,{params:n.sellParams,handleConfig:e=>{r(t=>({...t,sellParams:t.sellParams.map(t=>e[0]===t.key?{...t,default:e[1]}:t)}))}}),null!=n.sellParamsEnd&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(y3,{}),(0,wt().jsx)(O8,{params:n.sellParamsEnd,handleConfig:e=>{r(t=>{var n;return{...t,sellParamsEnd:null===(n=t.sellParamsEnd)||void 0===n?void 0:n.map(t=>e[0]===t.key?{...t,default:e[1]}:t)}})}})]})]})}async function F8(e,t,n){const r=new URLSearchParams;r.set("type","filter"),r.set("command",e),null!=t&&r.set("data",t);const i=`${qu}/config?${r.toString()}`,o=await tc(i,null);return"err"in o?o:n(o)}async function $8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return await F8("list",JSON.stringify({tag:t}),e=>"d"in e?e.d:{err:"no key found by name:d"},e)}function V8(e){return(0,wt().jsx)(O8,{params:e.data,handleConfig:t=>{e.update(e.data.map(e=>e.key===t[0]?{...e,default:t[1]}:e))}})}function W8(e){const[t,n]=(0,St().useState)(e.config);return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("h2",{children:["\u53c2\u6570\u7c7b\u578b:",e.name]}),(0,wt().jsx)(H8,{msg:"\u4fee\u6539\u53c2\u6570",content:(0,wt().jsx)(V8,{data:t,update:e=>n(e)}),callback:n=>{const r=[];for(var i=0;i<t.length&&i<e.config.length;){const n=t[i],o=e.config[i];n.default!==o.default&&r.push([n.key,n.default]),i++}r.length>0?e.updater(Object.fromEntries(r),n):n("\u914d\u7f6e\u672a\u4fee\u6539!")}}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Name"},"name"),(0,wt().jsx)("td",{children:"Value"},"value")]})}),(0,wt().jsx)("tbody",{children:e.config.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.name},"name"),(0,wt().jsx)("td",{children:e.default},"value")]},e.key))})]})]})}function H8(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)(null),[o,a]=(0,St().useState)(!1);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)(yu,{variant:"outlined",color:!0===e.even?"warning":"primary",onClick:()=>{o?i("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d, \u8bf7\u7a0d\u540e\u518d\u91cd\u8bd5!"):n(!0)},children:e.msg}),(0,wt().jsxs)(K6,{show:t,onHide:()=>n(!1),children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:e.msg})}),(0,wt().jsx)(K6.Body,{children:e.content||(0,wt().jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",variant:"outlined",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,wt().jsx)(yu,{color:"primary",variant:"outlined",onClick:()=>{a(!0),e.callback(e=>{i(e),a(!1)}),n(!1)},children:"\u786e\u5b9a"})]})]}),null!=r&&(0,wt().jsx)(b8,{msg:r,cb:()=>i(null)})]})}function G8(e,t){return Object.fromEntries(e.map(e=>{const n=e.key,r=t.get(n);return[n,null!=r?r:e.default]}))}function U8(e){const{config:t,stockId:n,strategyId:r,updateCallBack:i,sellAlgorithm:o}=e,a=Math.floor((new Date).getTime()/864e5),s=cc((new Date).getTime()),[l,u]=(0,St().useState)([s,s]),c=(e,t,a)=>{hc("update",n,r,1===e?t:null,o,2===e?t:null,3===e?t:null).then(e=>{e&&i();a("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})},d=(e,n)=>{Hc(e,t.stock,t.buyAlgorithm,!1).then(e=>{const t="\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!";e&&i(),n(t)})},h=t.sellParamsEnd,p=t.defaultBuyParams.filter(e=>1===e.realTime).map(e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e}),f=(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{children:r.endsWith("big volume buy")&&(0,wt().jsxs)(wt().Fragment,{children:[null!=t.defaultBuyParams.find(e=>{if("cancelDate"===e.key){const n=t.buyParams.get(e.key);return null==n&&n!==a}return!1})&&(0,wt().jsx)(H8,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",even:!1,callback:e=>d("endtoday",e)}),(0,wt().jsx)(H8,{msg:"\u624b\u52a8\u7ffb\u8f6c",even:!0,callback:e=>d("reverse",e)}),(0,wt().jsx)(H8,{msg:"\u624b\u52a8\u518d\u6b21\u8d2d\u4e70",even:!0,callback:e=>d("rebuy",e)})]})}),(0,wt().jsx)("div",{children:(0,wt().jsx)(H8,{msg:"\u8fd0\u884c\u56de\u6d4b",content:(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Start Date: "}),(0,wt().jsx)("input",{value:l[0],type:"date",onChange:e=>{u(t=>[e.target.value,t[1]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"End Date: "}),(0,wt().jsx)("input",{value:l[1],type:"date",onChange:e=>{u(t=>[t[0],e.target.value])}})]})]}),callback:e=>{((e,i,o)=>{const a=r.split("-"),s=a[a.length-1];xc({name:`${n}-${t.buyAlgorithm}`,desc:"",startDate:e,endDate:i,needQuote:!1,configs:[{stocks:[n],buyAlgorithm:s,buyParams:G8(t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime),t.buyParams),sellAlgorithm:t.sellAlgorithm,sellParams:G8(t.defaultSellParams,t.sellParams),sellParamsEnd:void 0,origin:[[s,t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime).map(e=>{const n=e.key,r=t.buyParams.get(n);return null!=r?{...e,default:r}:e})],[t.sellAlgorithm,t.defaultSellParams.map(e=>{const n=e.key,r=t.sellParams.get(n);return null!=r?{...e,default:r}:e}),null]]}]}).then(e=>{o("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})})(l[0],l[1],e)}})}),p.length>0&&(0,wt().jsx)(W8,{name:"\u5b9e\u65f6",config:p,updater:(e,t)=>{c(1,e,t)}}),(0,wt().jsx)(W8,{name:`\u4e70\u5165\u7b56\u7565(${t.buyAlgorithm})`,config:t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime).map(e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e}),updater:(e,t)=>{c(1,e,t)}}),(0,wt().jsx)(W8,{name:`\u5356\u51fa\u7b56\u7565(${t.sellAlgorithm})`,config:t.defaultSellParams.map(e=>{const n=t.sellParams.get(e.key);return null!=n?{...e,default:n}:e}),updater:(e,t)=>{c(2,e,t)}}),null!=h&&(0,wt().jsx)(W8,{name:`\u5356\u51fa\u7b56\u7565(\u672b\u65e5)(${t.sellAlgorithm})`,config:t.defaultSellParams.map(e=>{const t=h.get(e.key);return null!=t?{...e,default:t}:e}),updater:(e,t)=>{c(3,e,t)}}),(0,wt().jsx)(J6,{symbol:t.stock,strategy:t.buyAlgorithm})]}),g=(0,St().useCallback)(async e=>await async function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=new URLSearchParams;i.set("isFinish",n+""),null!=e&&(i.set("stock",e),null!=t&&i.set("strategy",t));const o=await tc(`${qu}/getPositions?${i.toString()}`,r);return"err"in o?o:dc(o)}(n,r,!0,e),[n,r]);return(0,wt().jsx)(wt().Fragment,{children:(0,wt().jsxs)("main",{className:"Container",children:[(0,wt().jsxs)("h2",{children:[(0,wt().jsx)("span",{style:{color:"lightgrey"},children:"Stock: "}),n,(0,wt().jsxs)("span",{style:{color:"lightgrey",marginLeft:"1rem"},children:["Strategy:"," "]}),r]}),(0,wt().jsx)(q8,{symbol:n,strategy:r}),f,(0,wt().jsx)(Sd,{getter:g,cvt:e=>(0,wt().jsx)(i8,{data:e})})]})})}const X8="filterList";function Y8(){let e=Vr();const[t,n]=(0,St().useState)(0),r=(0,St().useCallback)(async t=>{const n=await async function(e,t,n){const r=`${qu}/control?command=get&symbol=${e}&buyStrategy=${t}`,i=await tc(r,n);if("err"in i)return i;if("params"in i){const e=i,t=JSON.parse(e.params);if(2===e.defaultConfig.length){const n=e.defaultConfig.find(e=>t.buyAlgorithm.endsWith(e.id)),r=e.defaultConfig.find(e=>t.sellAlgorithm===e.id);if(null!=n&&null!=r)return{...t,stock:t.stocks[0],buyParams:Cc(t.buyParams),sellParams:Cc(t.sellParams),defaultSellParams:JSON.parse(r.params),defaultBuyParams:JSON.parse(n.params)}}return{err:"fail to get default params"}}return{err:"key params not found"}}(e.stockId,e.strategyId,t),r=await $8(t);if(!("err"in r)&&!("err"in n)){const e=n.defaultBuyParams,t=r.map(e=>e.name);if(t.length>0&&null!=e.find(e=>e.key===X8)){const r=e.map(e=>e.key===X8?{...e,alternatives:[!0,t]}:e);return{...n,defaultBuyParams:r}}}return n},[e.stockId,e.strategyId]);return(0,wt().jsx)(Sd,{getter:r,cvt:t=>(0,wt().jsx)(U8,{config:t,sellAlgorithm:t.sellAlgorithm,stockId:e.stockId,strategyId:e.strategyId,updateCallBack:()=>n(e=>e+1)})})}function q8(e){const[t,n]=(0,St().useState)(null);if((0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return Vc(e.symbol,e.strategy,r).then(e=>{r.aborted||n(e)}),()=>{t.abort()}},[e.symbol,e.strategy]),null==t)return(0,wt().jsx)(wd,{});if("err"in t)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",t.err]})});{const e=t.find(e=>!0);return(0,wt().jsxs)(I5,{children:[(0,wt().jsx)(E5,{expandIcon:(0,wt().jsx)(y().A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,wt().jsx)(F3,{children:null!=e?`\u65f6\u95f4:${cc(e.timestamp,!1,!0,!1)},\u540c\u6b65\u4efb\u52a1ID:${e.taskId}`:"\u6ca1\u6709\u540c\u6b65\u8bb0\u5f55"})}),(0,wt().jsx)(r3,{children:(0,wt().jsx)(F3,{children:t.slice(1).map(e=>(0,wt().jsx)("p",{children:`\u65f6\u95f4:${cc(e.timestamp,!1,!0,!1)},\u540c\u6b65\u4efb\u52a1ID:${e.taskId}`}))})})]})}}function Z8(e){let{msg:t,content:n,callBack:r,cancelCB:i}=e;const[o,a]=(0,St().useState)(null);return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)(K6,{show:!0,onHide:i,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:t})}),(0,wt().jsx)(K6.Body,{children:n||(0,wt().jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",t,"?"]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:i,children:"\u53d6\u6d88"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>r(e=>{a(e)}),children:"\u786e\u5b9a"})]})]}),null!=o&&(0,wt().jsx)(b8,{msg:o,cb:()=>a(null)})]})}function K8(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)(null),[o,a]=(0,St().useState)(!1);return(0,St().useEffect)(()=>(a(!1),()=>{a(!0)}),[a]),(0,wt().jsxs)("div",{style:{display:"inline-block"},children:[(0,wt().jsx)(yu,{color:"success",variant:"outlined",onClick:()=>{n(!0),null!=e.clickCB&&e.clickCB()},children:e.msg}),(0,wt().jsxs)(K6,{show:t,onHide:()=>n(!1),children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:e.msg})}),(0,wt().jsx)(K6.Body,{children:e.content||(0,wt().jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>e.callBack(e=>{o||(n(!1),i(e))}),children:"\u786e\u5b9a"})]})]}),null!=r&&(0,wt().jsx)(b8,{msg:r,cb:()=>i(null)})]})}function Q8(e){const[t]=(0,St().useState)(new AbortController),[n,r]=(0,St().useState)(!0),[i,o]=(0,St().useState)(0);return(0,St().useEffect)(()=>()=>{t.abort()},[]),(0,wt().jsxs)("div",{children:[(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:r=>{Fc(e.strategyId,{manualFirst:(new Date).getTime(),manualSide:n?1:0},t.signal).then(e=>{r("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})},content:(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("p",{children:["\u4e70\u5165\u65b9\u5411(",n?"call":"put",")"]}),(0,wt().jsx)(J5,{checked:n,onChange:e=>r(e.target.checked)})]})}),(0,wt().jsx)(K8,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{i>0?Gc(e.strategyId,!0,Math.min(i,1)).then(e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}):t("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,wt().jsx)("div",{children:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,wt().jsx)(N8,{value:i,type:"number",handleUpdate:e=>o(e)})]})})})]})}function J8(e){const[t]=(0,St().useState)(new AbortController);return(0,St().useEffect)(()=>()=>{t.abort()},[]),(0,wt().jsxs)("div",{children:[(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:n=>{Fc(e.strategyId,{manualFirst:(new Date).getTime()},t.signal).then(e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})}}),(0,wt().jsx)(K8,{msg:"\u53d6\u6d88\u4eca\u5929\u8fc7\u6ee4\u5668",callBack:n=>{Fc(e.strategyId,{manualCancelFilterDate:Math.floor((new Date).getTime()/t5)},t.signal).then(e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})}})]})}function e7(e){const[t,n]=(0,St().useState)(!0),[r,i]=(0,St().useState)([!0,.1]),[o,a]=(0,St().useState)(0),s=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return await Hc(e,t,n,!1,r,i)})(t,"QQQ",e.strategyId,r).then(e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})};return(0,wt().jsxs)("div",{children:[(0,wt().jsx)(K8,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",callBack:e=>{s("endtoday",e)}}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:e=>{s("manualfirst",e,[["side",t?"1":"0"]])},content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"is call:"}),(0,wt().jsx)(J5,{checked:t,onChange:e=>{n(e=>!e)}})]})}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u7ffb\u8f6c",callBack:e=>{s("reverse",e)}}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u6e05\u4ed3",callBack:e=>{s("clean",e)}}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u518d\u6b21\u8d2d\u4e70",content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4e70\u5165\u6bd4\u4f8b:"}),(0,wt().jsx)(N8,{type:"number",value:o,handleUpdate:a})]}),callBack:e=>{s("rebuy",e,o>0&&o<=1?[["rebuyPercent",o+""]]:null)}}),(0,wt().jsx)(K8,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{Gc(e.strategyId,r[0],r[1]).then(e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})},content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6309\u5f20\u6570\u5356\u51fa"}),(0,wt().jsx)(J5,{checked:r[0],onChange:e=>i(t=>[e.target.checked,e.target.checked?.01:1])}),(0,wt().jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})]})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u6570\u91cf:"}),(0,wt().jsx)(N8,{value:r[1],type:"number",handleUpdate:e=>i(t=>[t[0],e])})]})]})})]})}function t7(e){return(0,qe().Ay)("MuiDialog",e)}const n7=(0,Ze().A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const r7=St().createContext({}),i7=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],o7=(0,H().Ay)(xs,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),a7=(0,H().Ay)(Ps,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),s7=(0,H().Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,U().A)(n.scroll)}`]]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})}),l7=(0,H().Ay)(Os,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,U().A)(n.scroll)}`],t[`paperWidth${(0,U().A)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${n7.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`,[`&.${n7.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${n7.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})}),u7=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDialog"}),r=Ja(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:s,BackdropProps:l,children:u,className:c,disableEscapeKeyDown:d=!1,fullScreen:h=!1,fullWidth:p=!1,maxWidth:f="sm",onBackdropClick:g,onClick:m,onClose:v,open:y,PaperComponent:x=Os,PaperProps:b={},scroll:w="paper",TransitionComponent:S=gs,transitionDuration:A=i,TransitionProps:k}=n,C=(0,jt().A)(n,i7),M=(0,Dt().A)({},n,{disableEscapeKeyDown:d,fullScreen:h,fullWidth:p,maxWidth:f,scroll:w}),I=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,a={root:["root"],container:["container",`scroll${(0,U().A)(n)}`],paper:["paper",`paperScroll${(0,U().A)(n)}`,`paperWidth${(0,U().A)(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,$e().A)(a,t7,t)})(M),T=St().useRef(),D=(0,ct().A)(a),j=St().useMemo(()=>({titleId:D}),[D]);return(0,wt().jsx)(a7,(0,Dt().A)({className:(0,Pt().A)(I.root,c),closeAfterTransition:!0,components:{Backdrop:o7},componentsProps:{backdrop:(0,Dt().A)({transitionDuration:A,as:s},l)},disableEscapeKeyDown:d,onClose:v,open:y,ref:t,onClick:e=>{m&&m(e),T.current&&(T.current=null,g&&g(e),v&&v(e,"backdropClick"))},ownerState:M},C,{children:(0,wt().jsx)(S,(0,Dt().A)({appear:!0,in:y,timeout:A,role:"presentation"},k,{children:(0,wt().jsx)(s7,{className:(0,Pt().A)(I.container),onMouseDown:e=>{T.current=e.target===e.currentTarget},ownerState:M,children:(0,wt().jsx)(l7,(0,Dt().A)({as:x,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":D},b,{className:(0,Pt().A)(I.paper,b.className),ownerState:M,children:(0,wt().jsx)(r7.Provider,{value:j,children:u})}))})}))}))});function c7(e){return(0,qe().Ay)("MuiDialogTitle",e)}const d7=(0,Ze().A)("MuiDialogTitle",["root"]),h7=["className","id"],p7=(0,H().Ay)(F3,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),f7=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDialogTitle"}),{className:r,id:i}=n,o=(0,jt().A)(n,h7),a=n,s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},c7,t)})(a),{titleId:l=i}=St().useContext(r7);return(0,wt().jsx)(p7,(0,Dt().A)({component:"h2",className:(0,Pt().A)(s.root,r),ownerState:a,ref:t,variant:"h6",id:null!=i?i:l},o))});function g7(e){return(0,qe().Ay)("MuiDialogContent",e)}(0,Ze().A)("MuiDialogContent",["root","dividers"]);const m7=["className","dividers"],v7=(0,H().Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${d7.root} + &`]:{paddingTop:0}})}),y7=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDialogContent"}),{className:r,dividers:i=!1}=n,o=(0,jt().A)(n,m7),a=(0,Dt().A)({},n,{dividers:i}),s=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,$e().A)(r,g7,t)})(a);return(0,wt().jsx)(v7,(0,Dt().A)({className:(0,Pt().A)(s.root,r),ownerState:a,ref:t},o))});function x7(e){return(0,qe().Ay)("MuiDialogActions",e)}(0,Ze().A)("MuiDialogActions",["root","spacing"]);const b7=["className","disableSpacing"],w7=(0,H().Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),S7=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1}=n,o=(0,jt().A)(n,b7),a=(0,Dt().A)({},n,{disableSpacing:i}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,$e().A)(r,x7,t)})(a);return(0,wt().jsx)(w7,(0,Dt().A)({className:(0,Pt().A)(s.root,r),ownerState:a,ref:t},o))});function _7(e){const{isBuy:t,reverse:n}=e,[r,i]=(0,St().useState)(!0),[o,a]=(0,St().useState)(e.price),[s,l]=(0,St().useState)(null),[u,c]=(0,St().useState)(e.qty),d="manualOrderSubmit"===e.tp?"\u63d0\u4ea4":"manualOrderModify"===e.tp?"\u4fee\u6539":"\u53d6\u6d88",h=()=>{i(!1),e.finishCallBack(!1)};return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)(u7,{open:r,onClose:h,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,wt().jsxs)(f7,{id:"alert-dialog-title",children:[d,"\u8ba2\u5355"]}),(0,wt().jsxs)(y7,{children:[e.queries.map(e=>(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("span",{children:[e[0],": "]}),e[2]]},e[1])),"manualOrderCancel"!==e.tp&&(0,wt().jsxs)(wt().Fragment,{children:[null!=u&&(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6570\u91cf:"}),(0,wt().jsx)("input",{value:u,type:"number",onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||c(t)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4ef7\u683c: "}),(0,wt().jsx)("input",{value:o,type:"number",onChange:e=>{a(parseFloat(e.target.value))}})]})]})]}),(0,wt().jsxs)(S7,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:h,children:"\u53d6\u6d88"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>{if("manualOrderCancel"!==e.tp&&o<1e-4)return l(["\u4ef7\u683c\u4e0d\u80fd\u4e3a0",!1]),void i(!1);("manualOrderCancel"===e.tp?Xc(e.tp,e.queries.map(e=>[e[1],e[2]])):Xc(e.tp,e.queries.map(e=>[e[1],e[2]]).concat(null!=u?[["price",o+""],["qty",u+""]]:[["price",o+""]]).concat([["isBuy",t+""],...n?[["reverse",""]]:[]]))).then(e=>{l("boolean"!==typeof e?[e.err,!1]:["\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25"),e]),i(!1)})},children:"\u786e\u5b9a"})]})]}),null!=s&&(0,wt().jsx)(b8,{msg:s[0],cb:()=>{const t=s[1];l(null),e.finishCallBack(t)}})]})}function A7(e){return new Date(e).getTime()}function k7(e){let{data:t,startDate:n,endDate:r}=e;const i=(0,St().useRef)(null),[o,a]=(0,St().useState)(null);return(0,St().useEffect)(()=>{if(null!=i.current)if(null==o)a(XD(i.current));else{const e=function(e,t,n){const r=[],i=[],o=A7(e),a=A7(t);for(var s=o;s<=a;){const e=cc(s),t=n.get(e);null!=t?(r.push([e,t[0],t[1]]),i.push([e,100*t[1]])):(r.push([e,0,0]),i.push([e,0])),s+=864e5}return{tooltip:{formatter:function(e){return`\u6536\u76ca\u7387: ${3===e.value.length?(100*e.value[2]).toFixed(2):e.value[1].toFixed(2)}%`}},visualMap:{show:!0,min:-5,max:5,calculable:!0,seriesIndex:[2],orient:"horizontal",left:"center",top:"95%",height:"10%",inRange:{color:["red","green"],opacity:.3},controller:{inRange:{opacity:.5}}},calendar:[{left:"center",top:"middle",yearLabel:{show:!0},orient:"vertical",dayLabel:{firstDay:1,nameMap:"cn"},monthLabel:{show:!0},cellSize:"auto",width:"90%",height:"90%",range:[e,t],splitLine:{show:!0,lineStyle:{color:"purple"}}}],series:[{type:"scatter",coordinateSystem:"calendar",symbolSize:0,label:{show:!0,formatter:function(e){return gv(e.value[0]).getDate()+"\n\n"},color:"#000"},data:r},{type:"scatter",coordinateSystem:"calendar",symbolSize:0,label:{show:!0,formatter:function(e){return"\n\n\n\n"+e.value[1].toFixed(2)+"\n"+(e.value[2]>0?"+":"")+(100*e.value[2]).toFixed(2)+"%\n\n"}},data:r},{name:"\u6536\u76ca\u7387",type:"heatmap",coordinateSystem:"calendar",data:i}]}}(n,r,t);o.setOption(e)}},[o,n,r,t]),(0,wt().jsx)("div",{ref:i,style:{width:"100%",height:"100%"}})}function C7(e){let{data:t}=e;const n=(0,St().useRef)(null),[r,i]=(0,St().useState)(null);return(0,St().useEffect)(()=>{if(t.length>0&&null!=n.current)if(null==r)i(XD(n.current));else{const n=t.map(e=>cc(e[0])),i=t.map(e=>e[1]);var e=null;if(i.length>0){const t=i[0];t>0&&(e=i.map(e=>e/t-1))}const o=O2(n,null==e?[[["profit line",i]]]:[[["profit line",i]],[["gain",e]]]);r.setOption(o)}},[t,r]),(0,wt().jsx)("div",{ref:n,style:{width:"100%",aspectRatio:"16/9"}})}function M7(e){let{aid:t,startDate:n,endDate:r,type:i}=e;const[o,a]=(0,St().useState)(null),s=`7/${Math.ceil((new Date(r).getTime()-new Date(n).getTime())/t5/7)}`;if((0,St().useEffect)(()=>{const e=new AbortController,o=e.signal;return async function(e,t,n,r,i){const o=await Pc(e,t,n,r,i);if("err"in o)return o;if(o.t>0){const e=new Map;var a=o.t;if(o.d.reverse().forEach(t=>{const n=a;a-=t.profit;const r=cc(t.timestamp);e.set(r,[t.profit,t.profit/a,n,t.timestamp])}),o.d.length>0){const t=o.d[o.d.length-1].timestamp,n=cc(t),r=e.get(n);if(null!=r){const n=t-wc,i=cc(n);Math.abs(r[0])>0&&e.set(i,[0,0,r[2]-r[0],n])}}return e}return{err:"invalid total money"}}(t,i,n,r,o).then(e=>{a(e)}),()=>{e.abort()}},[t,n,r,i]),null==o)return(0,wt().jsx)(wd,{});if("err"in o)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(o.err)]})});{const e=Array.from(o.entries()).map(e=>[e[1][3],e[1][2]]).sort((e,t)=>e[0]-t[0]);var l=0,u=0,c=0;return Array.from(o.values()).forEach(e=>{e[1]>Bu?l++:e[1]<-.001?u++:c++}),(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(C7,{data:e}),(0,wt().jsx)("div",{className:"Container",children:(0,wt().jsx)("h3",{children:(0,wt().jsxs)("div",{style:{display:"flex",width:"90%",justifyContent:"space-evenly"},children:[(0,wt().jsxs)("div",{style:{color:"green"},children:[(0,wt().jsx)("span",{children:"Win: "}),(0,wt().jsx)("span",{children:l})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Draw: "}),(0,wt().jsx)("span",{children:c})]}),(0,wt().jsxs)("div",{style:{color:"red"},children:[(0,wt().jsx)("span",{children:"Lose: "}),(0,wt().jsx)("span",{children:u})]})]})})}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:s},children:(0,wt().jsx)(k7,{data:o,startDate:n,endDate:r})},"calendar"+s)]})}}function I7(){return(0,wt().jsx)(Sd,{getter:async e=>await Bc(e),cvt:e=>(0,wt().jsx)(wt().Fragment,{children:e.filter(e=>e.name.search("\u76c8\u900f")>-1).map(e=>(0,wt().jsxs)("div",{children:[(0,wt().jsx)("h2",{children:e.name}),(0,wt().jsx)(E7,{port:e.aid,disableOrder:!0,interval:3e4,name:e.isVirtual?e.name:void 0}),(0,wt().jsx)(y3,{})]}))})})}function T7(){return U2()?(0,wt().jsx)(D7,{}):(0,wt().jsx)(ri,{})}function D7(){const[e,t]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const e=new AbortController;return Bc(e.signal).then(e=>{t(e)}),()=>{e.abort()}},[]),null==e?(0,wt().jsx)(wd,{}):"err"in e?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(e.err)]})}):(0,wt().jsxs)("div",{style:{display:"flex"},children:[(0,wt().jsx)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:e.map(e=>{const t=1===e.isVirtual?"?name="+e.name:"";return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("h6",{children:[(0,wt().jsx)(a4,{color:null==e.active?"warning":e.active?"success":"error"}),e.name]}),(0,wt().jsx)(Mi,{to:`ZInvest/${e.aid}${t}`,style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"ZInvest"}),(0,wt().jsx)(Mi,{to:`accounts/${e.aid}?name=${e.name}`,style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Strategy"})]})})}),(0,wt().jsx)("div",{style:{flex:1},children:(0,wt().jsx)(ri,{})})]})}function j7(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const e=new AbortController;return Bc(e.signal).then(e=>{t(e),!("err"in e)&&e.length>0&&r(e[0])}),()=>{e.abort()}},[]),null==e?(0,wt().jsx)(wd,{}):"err"in e?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(e.err)]})}):(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)("select",{value:(null===n||void 0===n?void 0:n.aid)+"",onChange:t=>{const n=e.find(e=>e.aid+""===t.target.value);null!=n&&r(n)},children:e.map(e=>(0,wt().jsx)("option",{value:e.aid,children:`${e.name}`},e.aid))})}),null!=n&&(0,wt().jsx)(E7,{port:n.port})]})}function P7(){const e=Vr(),t=parseInt(e.port),[n]=ji(),r=n.get("name");return(0,wt().jsx)(E7,{port:t,name:r||void 0})}function L7(e){const{aid:t,stocks:n}=e,[r,i]=(0,St().useState)(null);return n.length>0?(0,wt().jsx)("div",{children:(0,wt().jsx)(K8,{msg:"\u80a1\u7968\u5f00\u4ed3",content:null!=r?(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u80a1\u7968\u4ee3\u7801:"}),(0,wt().jsx)("select",{value:r[0],onChange:e=>{i(t=>null!=t?[e.target.value,t[1],t[2],t[3]]:t)},children:n.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6570\u91cf:"}),(0,wt().jsx)("input",{value:r[1],type:"number",onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||i(e=>null!=e?[e[0],t,e[2],e[3]]:e)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u505a\u7a7a:"}),(0,wt().jsx)(J5,{checked:r[3],onChange:e=>{i(t=>null!=t?[t[0],t[1],t[2],e.target.checked]:null)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4ef7\u683c:"}),(0,wt().jsx)(N8,{value:r[2],handleUpdate:e=>{i(t=>null!=t&&"number"===typeof e?[t[0],t[1],e,t[3]]:t)},type:"number"})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u603b\u8ba1:"}),(r[1]*r[2]).toLocaleString()]})]}):(0,wt().jsx)("div",{children:"Error!"}),callBack:e=>{null!=r&&r[1]>0&&r[2]>0?Xc("manualOrderSubmit",[["aid",t],["symbol",r[0]],["qty",r[1]+""],["isBuy",r[3]?"false":"true"],["price",r[2]+""],["isOpen","true"],[r[3]?"reverse":"kkk","1"]]).then(t=>{e("boolean"===typeof t?"\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!":`\u64cd\u4f5c\u5931\u8d25:${t.err}`),i(null)}):e("\u4ef7\u683c\u6216\u8005\u6570\u91cf\u6709\u95ee\u9898!")},clickCB:()=>{i([n[0],0,0,!1])}})}):(0,wt().jsx)("p",{children:"Empty Stock List!"})}function R7(e){const t=(0,St().useCallback)(async e=>{const t=await pc(e);return t},[]);return(0,wt().jsx)(Sd,{getter:t,cvt:t=>(0,wt().jsx)(L7,{aid:e.aid,stocks:t.map(e=>e.stock)})})}function E7(e){const{port:t,name:n}=e,[r,i]=(0,St().useState)(0),o=()=>i(e=>e+1);return(0,wt().jsxs)("main",{children:[(0,wt().jsx)("h3",{children:"Accounts:"}),(0,wt().jsx)(N7,{port:t}),(0,wt().jsx)("h3",{children:"Positions:"}),null!=n?(0,wt().jsx)(H7,{accountId:n,isMain:!0}):(0,wt().jsx)(O7,{port:t,orderCallBack:o,interval:e.interval}),!0!==e.disableOrder&&(0,wt().jsxs)(wt().Fragment,{children:[null==n&&(0,wt().jsx)(R7,{aid:t+""}),(0,wt().jsx)("h3",{children:"Orders:"}),null!=n?(0,wt().jsx)(U7,{accountId:n,isMain:!0}):(0,wt().jsx)(z7,{port:t,version:r,updateCallBack:o})]})]})}function N7(e){const[t,n]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return async function(e,t){const n=`${qu}/position_new?command=zvAccounts&aid=${e}`,r=await tc(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}(e.port,r).then(e=>{r.aborted||n(e)}),()=>{t.abort()}},[e.port]),null==t?(0,wt().jsx)(wd,{}):"err"in t?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(t.err)]})}):(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Id"},"id"),(0,wt().jsx)("td",{children:"Balance"},"balance"),(0,wt().jsx)("td",{children:"Cash"},"cash"),(0,wt().jsx)("td",{children:"Margin"},"margin")]})}),(0,wt().jsx)("tbody",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:t.account||t.name||""},"id"),(0,wt().jsx)("td",{children:t.balance},"balance"),(0,wt().jsx)("td",{children:t.cash},"cash"),(0,wt().jsx)("td",{children:(null===(r=t.margin)||void 0===r?void 0:r.toLocaleString())||0},"margin")]})})]});var r}function O7(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)(null),o=e.interval||5e3;return(0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;Mc(e.port,r).then(e=>{r.aborted||n(e)});const i=setInterval(()=>{Mc(e.port,r).then(e=>{r.aborted||n(e)})},o);return()=>{t.abort(),clearInterval(i)}},[e.port]),null==t?(0,wt().jsx)(wd,{}):"err"in t?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(t.err)]})}):(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Cost Price"},"cost"),(0,wt().jsx)("td",{children:"Current Price"},"currP"),(0,wt().jsx)("td",{children:"Total"},"total"),(0,wt().jsx)("td",{children:"Operate"},"operate")]})}),(0,wt().jsx)("tbody",{children:t.map(t=>{const n=t.price,r=t.symbol.startsWith("O:"),o=t.num*(r?100:1);return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:t.symbol},"symbol"),(0,wt().jsxs)("td",{children:[t.price,"/",(n*o).toFixed(2)]},"cost"),(0,wt().jsxs)("td",{children:[t.currentPrice,"/",(t.currentPrice*o).toFixed(2),"(",(100*(n>0?(t.currentPrice-n)/n:0)).toFixed(2)+"%",")"]},"currP"),(0,wt().jsx)("td",{children:t.num},"total"),(0,wt().jsx)("td",{children:(0,wt().jsx)("button",{onClick:()=>{i([t.currentPrice,[e.port+"",t.symbol,t.num]])},children:"\u5e73\u4ed3(\u5f02\u5e38\u60c5\u51b5)"})},"operate")]})})})]}),null!=r&&(0,wt().jsx)(_7,{price:r[0],tp:"manualOrderSubmit",queries:[["\u8d26\u53f7ID","aid",r[1][0]],["\u5408\u7ea6","symbol",r[1][1]],["\u662f\u5426\u5f00\u4ed3","isOpen","false"]],isBuy:r[1][2]<0,reverse:r[1][2]<0,qty:Math.abs(r[1][2]),finishCallBack:t=>{i(null),t&&e.orderCallBack()}})]})}function z7(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)(null);if((0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return async function(e,t){const n=`${qu}/position_new?command=zvOrders&aid=${e}`,r=await tc(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}(e.port,r).then(e=>{r.aborted||n(e)}),()=>{t.abort()}},[e.port,e.version]),null==t)return(0,wt().jsx)(wd,{});if("err"in t)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(t.err)]})});{const n=t=>{i(null),t&&e.updateCallBack()};return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Order Id"},"oid"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Side"},"side"),(0,wt().jsx)("td",{children:"Price"},"price"),(0,wt().jsx)("td",{children:"QTY"},"qty"),(0,wt().jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,wt().jsx)("td",{children:"Status"},"status"),(0,wt().jsx)("td",{children:"Time"},"time"),(0,wt().jsx)("td",{children:"Message"},"message"),(0,wt().jsx)("td",{children:"Operate"},"operate")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.id},"oid"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:e.isBuy?"BUY":"SELL"},"side"),(0,wt().jsx)("td",{children:e.price},"price"),(0,wt().jsx)("td",{children:e.qty},"qty"),(0,wt().jsx)("td",{children:e.tradeQty},"trade_qty"),(0,wt().jsx)("td",{children:e.status},"status"),(0,wt().jsx)("td",{children:kc(e.createTime)},"time"),(0,wt().jsx)("td",{children:e.errorMsg},"message"),(0,wt().jsx)("td",{children:("PARTIALLY_FILLED"===e.status||"NEW"===e.status)&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(yu,{onClick:()=>i([e.price,e.id,e.qty+""]),color:"primary",children:"\u6539\u4ef7"}),(0,wt().jsx)(yu,{onClick:()=>i(e.id),color:"secondary",children:"\u53d6\u6d88"})]})},"operate")]}))})]}),null!=r&&("string"===typeof r?(0,wt().jsx)(_7,{tp:"manualOrderCancel",price:0,queries:[["\u8d26\u53f7ID","aid",e.port+""],["\u8ba2\u5355\u53f7","orderId",r]],isBuy:!0,reverse:!1,finishCallBack:n}):(0,wt().jsx)(_7,{tp:"manualOrderModify",price:r[0],queries:[["\u8d26\u53f7ID","aid",e.port+""],["\u8ba2\u5355\u53f7","orderId",r[1]],["\u6570\u91cf","qty",r[2]]],isBuy:!0,reverse:!1,finishCallBack:n}))]})}}function B7(e){const t=e.split(":");return t.length>2?t.slice(t.length-3).join(":"):e}function F7(e){const[t,n]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return Ic(e.aid,r).then(e=>{r.aborted||n(e)}),()=>{t.abort()}},[e.aid,e.version]),null==t?(0,wt().jsx)(wd,{}):"err"in t?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(t.err)]})}):(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account ID"},"aid"),(0,wt().jsx)("td",{children:"Description"},"desc"),(0,wt().jsx)("td",{children:"Account"},"account"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Strategy"},"strategy"),(0,wt().jsx)("td",{children:"Total"},"total"),(0,wt().jsx)("td",{children:"Frozen"},"freeze"),(0,wt().jsx)("td",{children:"Bet Percent"},"bp"),(0,wt().jsx)("td",{children:"Update time"},"update_time")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:(0,wt().jsx)(Ci,{to:`/trading/account/${e.rowid}`,children:e.rowid})},"aid"),(0,wt().jsx)("td",{children:e.desc},"desc"),(0,wt().jsx)("td",{children:e.account},"account"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:e.strategy},"strategy"),(0,wt().jsx)("td",{children:e.total},"total"),(0,wt().jsx)("td",{children:e.freeze},"freeze"),(0,wt().jsx)("td",{children:e.betPercent},"bp"),(0,wt().jsx)("td",{children:cc(e.update_time,!1,!0,!1)},"update_time")]}))})]})}function $7(){const e=Vr(),[t]=ji(),n=t.get("name");return(0,wt().jsx)(W7,{aid:e.aid,an:n})}function V7(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const e=new AbortController;return Bc(e.signal).then(e=>{t(e),!("err"in e)&&e.length>0&&r(e[0])}),()=>{e.abort()}},[]),null==e?(0,wt().jsx)(wd,{}):"err"in e?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(e.err)]})}):(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)("select",{value:(null===n||void 0===n?void 0:n.aid)+"",onChange:t=>{const n=e.find(e=>e.aid+""===t.target.value);null!=n&&r(n)},children:e.map(e=>(0,wt().jsx)("option",{value:e.aid,children:`${e.name}`},e.aid))})}),null!=n&&(0,wt().jsx)(W7,{aid:n.aid+"",an:n.name})]})}function W7(e){const t=(new Date).getTime(),[n,r]=(0,St().useState)(0),i=()=>{r(e=>e+1)},[o,a]=(0,St().useState)([cc(t-2592e6),cc(t)]);return(0,wt().jsxs)("main",{style:{width:"40vw"},children:[(0,wt().jsx)("h3",{children:"Accounts:"}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f:"}),(0,wt().jsx)("input",{value:o[0],type:"date",onChange:e=>a(t=>[e.target.value,t[1]])}),(0,wt().jsx)("span",{children:"-\u7ed3\u675f\u65e5\u671f:"}),(0,wt().jsx)("input",{value:o[1],type:"date",onChange:e=>a(t=>[t[0],e.target.value])})]}),(0,wt().jsx)(M7,{aid:e.aid,startDate:o[0],endDate:o[1],type:"main"}),(0,wt().jsxs)("div",{style:{display:"flex"},children:[(0,wt().jsx)(K7,{aName:e.an,manualBuy:!0,completeCB:i}),(0,wt().jsx)("span",{style:{width:"10px"}}),(0,wt().jsx)(K7,{aName:e.an,manualBuy:!1,completeCB:i})]}),(0,wt().jsx)(F7,{aid:e.an,version:n})]})}function H7(e){let{accountId:t,runner:n,handleClean:r,aggs:i,isMain:o}=e;const a=(0,St().useCallback)(async e=>await Tc(t,null==n?null:n,e,null!=o&&o),[t,n,o]);return(0,wt().jsx)(Sd,{interval:5e3,getter:a,cvt:e=>(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account"},"aid"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Cost Price"},"cost"),(0,wt().jsx)("td",{children:"Current Price"},"cp"),(0,wt().jsx)("td",{children:"Total"},"total"),(0,wt().jsx)("td",{children:"Frozen"},"frozen"),(0,wt().jsx)("td",{children:"Gain"},"gain"),(0,wt().jsx)("td",{children:"Trade Date"},"date"),(0,wt().jsx)("td",{children:"Operation"},"op")]})}),(0,wt().jsx)("tbody",{children:e.map(e=>{var t;const o=e.currentPrice;if(null!=o){var a;const n=(o-e.buyPrice)/e.buyPrice;t=(0,wt().jsxs)("td",{children:[null===(a=e.currentPrice)||void 0===a?void 0:a.toFixed(3),"/",(o*e.totalQty*100).toFixed(2),"(",(0,wt().jsxs)("span",{style:{color:n<0?"red":"green"},children:[(100*n).toFixed(2),"%"]}),")"]},"cp")}else t=(0,wt().jsx)("td",{children:"0"},"cp");var s=null;const l=null===i||void 0===i?void 0:i.find(t=>Math.abs(t.t-e.createTime)<=6e4);null!=l&&null!=i&&(s=null!=e.stockPrice?[l.c,e.stockPrice]:[l.c,i[i.length-1].c]);const u="C"===e.symbol[e.symbol.length-9]?1:-1;return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.accountId},"aid"),(0,wt().jsx)("td",{children:null==n?(0,wt().jsx)(Ci,{to:`/trading/runner/${e.accountId}/${e.runner}`,children:B7(e.runner)}):B7(e.runner)},"runner"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsxs)("td",{children:[e.buyPrice.toFixed(3),"/",(e.buyPrice*e.totalQty*100).toFixed(2)]},"cost"),t,(0,wt().jsx)("td",{children:e.totalQty},"total"),(0,wt().jsx)("td",{children:e.freezeQty},"frozen"),(0,wt().jsx)("td",{children:(100*(null!=s&&s[0]>0?(s[1]-s[0])*u/s[0]:0)).toFixed(2)+"%"},"gain"),(0,wt().jsx)("td",{children:kc(e.createTime)},"date"),(0,wt().jsx)("td",{children:null!=r&&(0,wt().jsx)("button",{onClick:()=>{r(e.runner,e.symbol)},children:"\u5356\u51fa"})},"op")]})})})]})})}function G7(){let e=Vr();const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)(null),o=(new Date).getTime(),[a,s]=(0,St().useState)([cc(o-2592e6),cc(o)]),[l,u]=(0,St().useState)(null),[c,d]=(0,St().useState)(0);if((0,St().useEffect)(()=>{const t=(new AbortController).signal;(async function(e,t){const n=new URLSearchParams;n.set("command","account"),n.set("aid",e);const r=`${qu}/position_new?${n.toString()}`,i=await tc(r,t);if("err"in i)return i;if("d"in i){const t=i.d;return null!=t?t:{err:"no account found by id:"+e}}return{err:"fail to get data by key:d"}})(e.account,t).then(e=>{t.aborted||i(e)})},[e.account,c]),null==r)return(0,wt().jsx)(wd,{});if("err"in r)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(r.err)]})});{const i=(new Date).getTime(),o=(cc(i-2592e6),cc(i),()=>n(null)),c=()=>{null!=t&&jc(r.symbol,`${e.account}-${r.strategy}`,t.total,t.betPercent,t.desc).then(e=>{e&&d(e=>e+1),n(null)})};return(0,wt().jsxs)("main",{style:{flex:1,width:"40vw"},children:[(0,wt().jsx)("div",{children:(0,wt().jsx)("button",{onClick:()=>{n({total:r.total,betPercent:r.betPercent,desc:r.desc})},children:"\u4fee\u6539\u53c2\u6570"})}),(0,wt().jsx)("div",{children:(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Name"},"name"),(0,wt().jsx)("td",{children:"Value"},"value")]})}),(0,wt().jsxs)("tbody",{children:[(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Symbol"},"name"),(0,wt().jsx)("td",{children:r.symbol},"value")]},"symbol"),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Strategy"},"name"),(0,wt().jsx)("td",{children:r.strategy},"value")]},"strategy"),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Total"},"name"),(0,wt().jsx)("td",{children:r.total},"value")]},"total"),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Bet Percent"},"name"),(0,wt().jsx)("td",{children:r.betPercent},"value")]},"betPercent"),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Description"},"name"),(0,wt().jsx)("td",{children:r.desc},"value")]},"desc"),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account"},"name"),(0,wt().jsx)("td",{children:r.account},"value")]},"account")]})]})}),r.strategy===Au&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("h3",{children:"Select Contracts:"}),(0,wt().jsx)("div",{children:(0,wt().jsx)(Z7,{symbol:r.symbol,account:e.account})})]}),(0,wt().jsx)("h3",{children:"Positions:"}),(0,wt().jsx)(H7,{accountId:e.account,handleClean:(e,t)=>{u([e,t,!0,.01])}}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f:"}),(0,wt().jsx)("input",{value:a[0],type:"date",onChange:e=>s(t=>[e.target.value,t[1]])}),(0,wt().jsx)("span",{children:"-\u7ed3\u675f\u65e5\u671f:"}),(0,wt().jsx)("input",{value:a[1],type:"date",onChange:e=>s(t=>[t[0],e.target.value])})]}),(0,wt().jsx)("div",{style:{width:"100%"},children:(0,wt().jsx)(M7,{aid:e.account,type:"sub",startDate:a[0],endDate:a[1]})}),(0,wt().jsx)("h3",{children:"Trades:"}),(0,wt().jsx)(U7,{accountId:e.account}),(0,wt().jsxs)(K6,{show:null!=t,onHide:o,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=t&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u603b\u91d1\u989d:"}),(0,wt().jsx)("input",{value:t.total,type:"number",onChange:e=>{n(t=>t&&{...t,total:parseFloat(e.target.value)})}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4e0b\u6ce8\u6bd4\u4f8b:"}),(0,wt().jsx)("input",{value:t.betPercent,type:"number",onChange:e=>{n(t=>t&&{...t,betPercent:parseFloat(e.target.value)})}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u63cf\u8ff0:"}),(0,wt().jsx)("input",{value:t.desc||"",type:"text",onChange:e=>{n(t=>t&&{...t,desc:e.target.value})}})]})]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:o,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:c,children:"OK"})]})]}),(0,wt().jsxs)(K6,{show:null!=l,onHide:()=>u(null),children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=l&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Runner:"}),l[0]]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Symbol:"}),l[1]]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,wt().jsx)("input",{value:l[3],type:"number",onChange:e=>{u(t=>null==t?t:[t[0],t[1],t[2],parseFloat(e.target.value)])}})]})]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:()=>{u(null)},children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>{null!=l&&async function(e,t){const n={aid:function(e){const t=e.split(":");return t[t.length-1].split("-")[0]}(e),percent:t},r=await Gu("clean_position_req",JSON.stringify(n),null);return"s"in r&&!0===r.s}(l[0],l[3]).then(e=>{u(null)})},children:"OK"})]})]})]})}}function U7(e){const{accountId:t,isMain:n}=e,[r,i]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const e=new AbortController,r=e.signal;return Dc(t,null,r,null!=n&&n).then(e=>{r.aborted||i(e)}),()=>{e.abort()}},[t,n]),null==r?(0,wt().jsx)(wd,{}):"err"in r?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(r.err)]})}):(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Trade Id"},"tid"),(0,wt().jsx)("td",{children:"Order Id"},"oid"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Contract"},"symbol"),(0,wt().jsx)("td",{children:"Side"},"side"),(0,wt().jsx)("td",{children:"Price"},"price"),(0,wt().jsx)("td",{children:"Buy Price"},"bprice"),(0,wt().jsx)("td",{children:"QTY"},"qty"),(0,wt().jsx)("td",{children:"Time"},"time")]})}),(0,wt().jsx)("tbody",{children:ku(r).flatMap(e=>{let t=[];return e[1].forEach(e=>{const n=e.runner.split(":");var r="";n.length>3&&(r=n[n.length-2]+":"+n[n.length-3]),t.push((0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.tradeID},"tid"),(0,wt().jsx)("td",{children:e.orderId},"oid"),(0,wt().jsx)("td",{children:r},"runner"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,wt().jsx)("td",{children:e.price},"price"),(0,wt().jsx)("td",{children:e.buyPrice},"bprice"),(0,wt().jsx)("td",{children:e.qty},"qty"),(0,wt().jsx)("td",{children:kc(e.timestamp)},"time")]}))}),t.push((0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"\u5c0f\u8ba1"},"tid"),(0,wt().jsx)("td",{children:"-"},"oid"),(0,wt().jsx)("td",{children:"-"},"runner"),(0,wt().jsx)("td",{children:"-"},"symbol"),(0,wt().jsx)("td",{children:"-"},"side"),(0,wt().jsx)("td",{children:"-"},"price"),(0,wt().jsx)("td",{children:e[0][0].toFixed(2)},"bprice"),(0,wt().jsx)("td",{children:e[0][1].toFixed(2)},"qty"),(0,wt().jsx)("td",{children:(e[0][1]/e[0][0]*100).toFixed(2)+"%"},"time")]})),t})})]})}function X7(e){let{accountId:t,runner:n}=e;const[r,i]=(0,St().useState)(null);return(0,St().useEffect)(()=>{const e=new AbortController,r=e.signal;return async function(e,t,n){const r=new URLSearchParams;r.set("command","orders"),r.set("accountId",e),null!=t&&r.set("runner",t);const i=`${qu}/position_new?${r.toString()}`,o=await tc(i,n);return"err"in o?o:"d"in o?o.d:{err:"fail to get data by key:d"}}(t,null==n?null:n,r).then(e=>{r.aborted||i(e)}),()=>{e.abort()}},[]),null==r?(0,wt().jsx)(wd,{}):"err"in r?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",Ru(r.err)]})}):(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account"},"aid"),(0,wt().jsx)("td",{children:"Order Id"},"oid"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Type"},"type"),(0,wt().jsx)("td",{children:"Side"},"side"),(0,wt().jsx)("td",{children:"Price"},"price"),(0,wt().jsx)("td",{children:"QTY"},"qty"),(0,wt().jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,wt().jsx)("td",{children:"TIF"},"tif"),(0,wt().jsx)("td",{children:"Status"},"status"),(0,wt().jsx)("td",{children:"Time"},"time"),(0,wt().jsx)("td",{children:"Message"},"message")]})}),(0,wt().jsx)("tbody",{children:r.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.accountId},"aid"),(0,wt().jsx)("td",{children:e.id},"oid"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:null==n?(0,wt().jsx)(Ci,{to:`/trading/runner/${e.accountId}/${e.runner}`,children:e.runner}):e.runner},"runner"),(0,wt().jsx)("td",{children:e.type},"type"),(0,wt().jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,wt().jsx)("td",{children:e.price},"price"),(0,wt().jsx)("td",{children:e.qty},"qty"),(0,wt().jsx)("td",{children:e.tradeQty},"trade_qty"),(0,wt().jsx)("td",{children:e.tif},"tif"),(0,wt().jsx)("td",{children:e.status},"status"),(0,wt().jsx)("td",{children:kc(e.createTime)},"time"),(0,wt().jsx)("td",{children:e.errorMsg},"message")]}))})]})}function Y7(e){const{uid:t}=e,[n,r]=(0,St().useState)(0),i=(0,St().useCallback)(async e=>{const n=await $c(t,e);if("err"in n)return n;{const r=t.split(":");if(r.length>1){const t=await async function(e,t){const n=`${qu}/control?command=get&sellStrategy=${e}`,r=await tc(n,t);return"err"in r?r:"defaultConfig"in r?JSON.parse(r.defaultConfig.params):{err:"fail to find data by key:defaultConfig"}}(r[r.length-2],e);return"err"in t?t:[n,t]}return{err:"invalid uid:"+t}}},[t,n]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>{const n=e[0],i=e[1].map(e=>{if(e.key in n){const t=n[e.key];return{...e,default:t}}return e});return(0,wt().jsx)(W8,{name:"",config:i,updater:(e,n)=>{Fc(t,e).then(e=>{const t="\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!";e&&r(e=>e+1),n(t)})}})}})}function q7(){let e=Vr();const t=e.runner.endsWith(Au),[n,r]=(0,St().useState)(null);return(0,wt().jsxs)("main",{children:[(0,wt().jsx)("h3",{children:"Params:"}),(0,wt().jsx)(Y7,{uid:e.runner}),(0,wt().jsx)("h3",{children:"Positions:"}),(0,wt().jsx)(H7,{accountId:e.account,runner:e.runner,handleClean:t?(e,t)=>{r([t,!0,.01])}:void 0}),(0,wt().jsx)("h3",{children:"Orders:"}),(0,wt().jsx)(X7,{accountId:e.account,runner:e.runner}),t&&(0,wt().jsxs)(K6,{show:null!=n,onHide:()=>r(null),children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=n&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5408\u7ea6:"}),n[0]]}),(0,wt().jsx)("div",{children:(0,wt().jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6570\u91cf:"}),(0,wt().jsx)("input",{value:n[2],type:"number",onChange:e=>{r(t=>null==t?t:[t[0],t[1],parseFloat(e.target.value)])}})]})]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:()=>{r(null)},children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>{null!=n&&Oc(e.runner,n[0],n[1],n[2]).then(e=>{r(null)})},children:"OK"})]})]})]})}function Z7(e){const[t,n,r,i,o]=null!=e.default?e.default:[3e3,1,"15:30",1,.004],[a,s]=(0,St().useState)(i),[l,u]=(0,St().useState)(o),[c,d]=(0,St().useState)(null),[h,p]=(0,St().useState)(null),[f,g]=(0,St().useState)(!1),m=(t,n)=>{const r=(new AbortController).signal;g(!0),async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=`${qu}/manualSelectContracts?days=${t}&symbol=${e}&percent=${n}`,o=await tc(i,r);return o}(e.symbol,t,n,r).then(e=>{if(d(e),!("err"in e)){const t=e.d;null!=t&&p([t.target.call,t.target.put])}g(!1)})},[v,y]=(0,St().useState)(null),x=()=>y(null);var b=(0,wt().jsx)("div",{children:(0,wt().jsx)("p",{children:"Unknown"})});if(f)b=(0,wt().jsx)(wd,{});else if(null==c)b=(0,wt().jsx)("div",{children:(0,wt().jsx)("p",{children:"Empty Data"})});else if("err"in c)b=(0,wt().jsx)("div",{children:(0,wt().jsx)("p",{children:Ru(c.err)})});else{const e=c.d;null!=e&&null!=h&&(b=(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Stock Price:"}),e.stockPrice]}),(0,wt().jsxs)("div",{className:"ContainerRow",children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Call"}),(0,wt().jsx)(ca,{sx:{m:3},variant:"standard",children:(0,wt().jsx)(C3,{"aria-labelledby":"demo-error-radios",name:"call",value:h[0],onChange:e=>{p(t=>null==t?t:[e.target.value,t[1]])},children:e.alternativesO.map(e=>(0,wt().jsx)(U3,{value:e[0].symbol,control:(0,wt().jsx)(o4,{}),label:e[0].symbol+" / "+e[0].price.toFixed(3)+" / "+(100*e[0].iv).toFixed(3)+"% / "+e[0].v},e[0].symbol))})})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Put:"}),(0,wt().jsx)(ca,{sx:{m:3},variant:"standard",children:(0,wt().jsx)(C3,{"aria-labelledby":"demo-error-radios",name:"put",value:h[1],onChange:e=>{p(t=>null==t?t:[t[0],e.target.value])},children:e.alternativesO.map(e=>(0,wt().jsx)(U3,{value:e[1].symbol,control:(0,wt().jsx)(o4,{}),label:e[1].symbol+" / "+e[1].price.toFixed(3)+" / "+(100*e[1].iv).toFixed(3)+"% / "+e[1].v},e[1].symbol))})})]})]})]}),(0,wt().jsx)("div",{children:(null!=h[0]||null!=h[1])&&(0,wt().jsx)("button",{onClick:()=>{y([t,n,r,2])},children:"Buy"})})]}))}return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5230\u671f\u65f6\u95f4\u8ddd\u79bb\u4eca\u5929\u7684\u4ea4\u6613\u65e5\u6570:"}),(0,wt().jsx)("input",{value:a,type:"number",onChange:e=>s(parseInt(e.target.value))}),(0,wt().jsx)("input",{value:l,type:"number",onChange:e=>u(parseFloat(e.target.value))}),(0,wt().jsx)("button",{onClick:()=>{m(a,l)},children:"Filter"})]}),b,(0,wt().jsxs)(K6,{show:null!=v,onHide:x,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=v&&null!=h&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Call:"}),(0,wt().jsx)("p",{children:h[0]}),(0,wt().jsx)("span",{children:"Put:"}),(0,wt().jsx)("p",{children:h[1]})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5355\u8fb9\u4e0b\u6ce8\u91d1\u989d:"}),(0,wt().jsx)("input",{value:v[0],type:"number",onChange:e=>{y(t=>null==t?t:[parseFloat(e.target.value),t[1],t[2],t[3]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6301\u4ed3\u5929\u6570:"}),(0,wt().jsx)("input",{value:v[1],type:"number",onChange:e=>{y(t=>null==t?t:[t[0],parseInt(e.target.value),t[2],t[3]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u65f6\u95f4:"}),(0,wt().jsx)("input",{value:v[2],type:"time",onChange:e=>{y(t=>null==t?t:[t[0],t[1],e.target.value,t[3]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4e70\u5165\u65b9\u5f0f(0:\u5355\u4e70call,1:\u5355\u4e70put,2:\u53cc\u8fb9\u4e70\u5165):"}),(0,wt().jsx)("input",{value:v[3],type:"number",onChange:e=>{y(t=>null==t?t:[t[0],t[1],t[2],parseInt(e.target.value)])}})]})]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:x,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:()=>{var t;null!=h&&(null!=v&&(t=2===v[3]?{}:{singleSide:1===v[3]?"put":"call"},async function(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;const s=new URLSearchParams,l=function(e){const t=e.length;return e.substring(2,t-15)}(t);s.set("command","start_sell");const u={num:e,extra:o,params:i,callContract:t,putContract:n,sellName:"manual sell",buyName:`${r}-manual buy`,stock:l};console.log(u),s.set("params",JSON.stringify(u));const c=`${qu}/task?${s.toString()}`,d=await tc(c,a);if("err"in d)return d;{const e=Hu(d,["d","data"]);return null==e?{err:"no key:data found"}:"s"in e?e.s:{err:"no inner key:s found"}}}(v[0],h[0],h[1],e.account,{daysDelay:v[1],tt1:v[2]},t).then(e=>{y(null)})))},children:"OK"})]})]})]})}function K7(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)(e.manualBuy?[Au]:null);(0,St().useEffect)(()=>{if(!e.manualBuy){const e=(new AbortController).signal;fc(e).then(t=>{e.aborted||i(t.filter(e=>e.isBuy).map(e=>e.id).concat(Au))})}},[e.manualBuy]);const o=()=>n(null),a=()=>{null!=t&&jc(t[0],null!=e.aName?`${e.aName}-${t[1]}`:t[1],t[2],t[3],t[4]).then(t=>{t&&e.completeCB(),n(null)})},s=e.manualBuy?"\u65b0\u5efa\u624b\u52a8\u4ea4\u6613\u8d26\u53f7":"\u65b0\u5efa\u4ea4\u6613\u8d26\u53f7";return null==r?(0,wt().jsx)(wd,{}):"err"in r?(0,wt().jsx)("p",{children:Ru(r.err)}):(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)("button",{onClick:()=>{n(["",r[0],3e3,.1,""])},children:s})}),(0,wt().jsxs)(K6,{show:null!=t,onHide:o,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=t&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u80a1\u7968\u4ee3\u7801:"}),(0,wt().jsx)("input",{value:t[0],type:"text",onChange:e=>{n(t=>null==t?t:[e.target.value,t[1],t[2],t[3],t[4]])}})]}),null!=e.aName&&(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u771f\u5b9e\u8d26\u53f7:"}),e.aName]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u7b56\u7565:"}),(0,wt().jsx)("select",{value:t[1],onChange:e=>{n(t=>null==t?t:[t[0],e.target.value,t[2],t[3],t[4]])},children:r.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u8d26\u53f7\u603b\u8d44\u91d1:"}),(0,wt().jsx)("input",{value:t[2],type:"number",onChange:e=>{n(t=>null==t?t:[t[0],t[1],parseFloat(e.target.value),t[3],t[4]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4e0b\u6ce8\u6bd4\u4f8b:"}),(0,wt().jsx)("input",{value:t[3],type:"number",onChange:e=>{n(t=>null==t?t:[t[0],t[1],t[2],parseFloat(e.target.value),t[4]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u8bf4\u660e:"}),(0,wt().jsx)("input",{value:t[4],type:"text",onChange:e=>{n(t=>null==t?t:[t[0],t[1],t[2],t[3],e.target.value])}})]})]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:o,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:a,children:"OK"})]})]})]})}function Q7(e,t){const n=new Map;if(t.forEach(e=>{const t=e.extra;if(null!=t&&"type"in t&&"agg"==t.type){const e=t.timestamp,r=n.get(e),i=t.total;null!=r?r.push(i):n.set(e,[i])}}),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],o=Sc(e[0].t);var r=0,i=0;const a=[];e.forEach(e=>{const s=e.t;s>=o&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(i+=l.reduce((e,t)=>e+t,0)),a.push(r>0?1e3*i/r:0),t.forEach(e=>{null!=l&&l.length>0&&(e[2]+=l.filter(t=>t>e[1]-1e-4).length),e[3].push(s>o?e[2]/Math.ceil((s-o)/36e5):0)})});return t.map(e=>[e[0],e[3]]).concat([["all",a]])}return[]}function J7(e,t){const n=new Map;if(t.forEach(e=>{const t=e,r=t.tradeTimestamp,i=n.get(r),o=t.tradeMoney;null!=i?i.push(o):n.set(r,[o])}),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],o=Sc(e[0].t);var r=0,i=0;const a=[];e.forEach(e=>{const s=e.t;s>=o&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(i+=l.reduce((e,t)=>e+t,0)),a.push(r>0?1e3*i/r:0),t.forEach(e=>{null!=l&&l.length>0&&(e[2]+=l.filter(t=>t>e[1]-1e-4).length),e[3].push(s>o?e[2]/Math.ceil((s-o)/36e5):0)})});return t.map(e=>[e[0],e[3]]).concat([["all",a]])}return[]}function e9(e){const{symbol:t}=e,[n,r]=(0,St().useState)(void 0),i=(0,St().useContext)(V2),[o,a]=(0,St().useState)([]);return(0,St().useEffect)(()=>{const e=new AbortController,n=e.signal;return Kc(t,n).then(e=>{n.aborted||null==e||r(e)}),()=>{e.abort()}},[t]),(0,St().useEffect)(()=>{const e=new Map,n=null===i||void 0===i?void 0:i.subscribe("symbol",t,t=>{"reset"===t.command&&e.clear(),Object.entries(t.data).forEach(t=>{const n=t[1];e.set(t[0],n)}),a(Lu(Array.from(e.values()).sort((e,t)=>e.t-t.t),!0))},{needHistory:!0});return()=>{null!=n&&(null===i||void 0===i||i.unsubscribe("symbol",t,n))}},[t,i]),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(i3,{symbol:t,preClose:n,signals:[],isDay:!0,historyData:Lu(o,!0),zoomRange:e.zoomRange,setZoomRange:e.setZoomRange})})}function t9(e){const{positions:t,runner:n,reverse:r}=e,[i,o]=(0,St().useState)(.01),[a,s]=(0,St().useState)({}),l=(0,St().useContext)(V2);return(0,St().useEffect)(()=>{const e=e=>{if(e.target.startsWith("symbol@")){const t=e.target.slice(7),n=zu(e.data);null!=n&&s(e=>({...e,[t]:n}))}},n=e=>{if(e.target.startsWith("data@")){const n=e.target.slice(10);var t=null;if("now"in e.data){const n=e.data.now;"price"in n&&(t=n.price)}null!=t&&s(e=>({...e,["data-"+n]:t}))}},r=t.map(t=>[t.sym,null===l||void 0===l?void 0:l.subscribe("symbol",t.sym,e)]),i=t.map(e=>{const t=`ws:A:${e.sym}`;return[t,null===l||void 0===l?void 0:l.subscribe("data",t,n)]});return()=>{r.forEach(e=>{null!=e[1]&&(null===l||void 0===l||l.unsubscribe("symbol",e[0],e[1]))}),i.forEach(e=>{null!=e[1]&&(null===l||void 0===l||l.unsubscribe("data",e[0],e[1]))})}},[l,t]),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"\u5408\u7ea6"},"symbol"),(0,wt().jsx)("td",{children:"\u4e70\u5165\u4ef7"},"cost"),(0,wt().jsx)("td",{children:"\u6570\u91cf"},"total"),(0,wt().jsx)("td",{children:"\u51bb\u7ed3\u6570\u91cf"},"frozen"),(0,wt().jsx)("td",{children:"\u65e5\u671f"},"date"),(0,wt().jsx)("td",{children:"\u64cd\u4f5c"},"op")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>{var t,s=null;const l="data-"+e.sym;if(l in a){const t=a[l],n=(r?-1:1)*(t-e.buyPrice)/e.buyPrice;s=(0,wt().jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",t.toLocaleString(),"|realtime:(",(0,wt().jsxs)("span",{style:{color:n<0?"red":"green"},children:[(100*n).toLocaleString(),"%"]}),")"]},"cost")}if(e.sym in a){const n=a[e.sym];if("number"===typeof n){const i=(r?-1:1)*(n-e.buyPrice)/e.buyPrice;t=(0,wt().jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",n.toLocaleString(),"|(",(0,wt().jsxs)("span",{style:{color:i<0?"red":"green"},children:[(100*i).toLocaleString(),"%"]}),")"]},"cost")}else{const i=(r?-1:1)*(n[0]-e.buyPrice)/e.buyPrice,o=(r?-1:1)*(n[1]-e.buyPrice)/e.buyPrice;t=(0,wt().jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",n.toLocaleString(),"|(",(0,wt().jsxs)("span",{style:{color:i<0?"red":"green"},children:[(100*i).toLocaleString(),"%"]}),")|(",(0,wt().jsxs)("span",{style:{color:o<0?"red":"green"},children:[(100*o).toLocaleString(),"%"]}),")"]},"cost")}}else t=(0,wt().jsx)("td",{children:e.buyPrice},"cost");return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.sym}),(0,wt().jsx)("td",{children:null!=s?s:t}),(0,wt().jsx)("td",{children:e.qty}),(0,wt().jsx)("td",{children:e.freezeQty}),(0,wt().jsx)("td",{children:kc(e.createTime)}),(0,wt().jsx)("td",{children:(0,wt().jsx)(K8,{msg:"\u5356\u51fa",content:(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5408\u7ea6:"}),e.sym]}),(0,wt().jsx)("div",{children:(0,wt().jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6570\u91cf:"}),(0,wt().jsx)(N8,{value:i,type:"number",handleUpdate:o})]})]}),callBack:t=>{Oc(n,e.sym,!0,i).then(e=>{t("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25"))})}})})]})})})]})}function n9(e){const{runner:t,version:n,reverse:r}=e,i=(0,St().useCallback)(async e=>await async function(e,t){const n=await $c(e,t);return"err"in n?n:"position"in n?n.position.filter(e=>e.qty>0):{err:"no position found!"}}(t,e),[t,n]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>(0,wt().jsx)(t9,{positions:e,runner:t,reverse:r})})}function r9(e){const{account:t,mainId:n,version:r,reverse:i}=e,o=(0,St().useCallback)(async e=>{const r=await zc(e);return"err"in r?r:r.filter(e=>e.startsWith("option:")&&e.endsWith(`:${n}-${t.strategy}`))},[t,n,r]);return(0,wt().jsx)(Sd,{getter:o,cvt:e=>(0,wt().jsx)("div",{children:e.map(e=>{const t=e.split(":");var n=null;if(t.length>2){const e=parseInt(t[t.length-3]);isNaN(e)||(n=kc(e))}return(0,wt().jsxs)("div",{children:[null!=n&&(0,wt().jsxs)("p",{children:["\u521b\u5efa\u65f6\u95f4:",(0,wt().jsx)("span",{children:n})]}),(0,wt().jsx)(n9,{runner:e,version:r,reverse:i},e)]})})})})}async function i9(e,t,n,r,i){const o=(e>"2023-03-21"?r.rowid:r.account)+"-"+n,a=await Nc(t,o,"energy",e,e,i);if("err"in a)return a;{const n=await Qu(t,e,e,1,"minute",i);return"err"in n?n:[a[0],a[1],n.results]}}function o9(e){const{positions:t,runner:n,handleClean:r}=e,[i,o]=(0,St().useState)({}),a=(0,St().useContext)(V2);(0,St().useEffect)(()=>{const e=e=>{if(e.target.startsWith("symbol@")){const t=e.target.slice(7),n=zu(e.data);null!=n&&o(e=>({...e,[t]:n}))}},n=e=>{if(e.target.startsWith("data@")){const n=e.target.slice(10);var t=null;if("now"in e.data){const n=e.data.now;"price"in n&&(t=n.price)}null!=t&&o(e=>({...e,["data-"+n]:t}))}},r=t.map(e=>{const t=`ws:A:${e.symbol}`;return[t,null===a||void 0===a?void 0:a.subscribe("data",t,n)]}),i=t.map(t=>[t.symbol,null===a||void 0===a?void 0:a.subscribe("symbol",t.symbol,e)]);return()=>{i.forEach(e=>{null!=e[1]&&(null===a||void 0===a||a.unsubscribe("symbol",e[0],e[1]))}),r.forEach(e=>{null!=e[1]&&(null===a||void 0===a||a.unsubscribe("data",e[0],e[1]))})}},[a,t]);const s=t;return(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account"},"aid"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Cost Price"},"cost"),(0,wt().jsx)("td",{children:"Current Price"},"cp"),(0,wt().jsx)("td",{children:"Total"},"total"),(0,wt().jsx)("td",{children:"Frozen"},"frozen"),(0,wt().jsx)("td",{children:"Gain"},"gain"),(0,wt().jsx)("td",{children:"Trade Date"},"date"),(0,wt().jsx)("td",{children:"Operation"},"op")]})}),(0,wt().jsx)("tbody",{children:s.map(t=>{var o;const a=t.symbol.startsWith("O:")?100:1;var s=null;const l="data-"+t.symbol;if(l in i){const n=i[l],r=(e.reverse?-1:1)*(n-t.buyPrice)/t.buyPrice;s=(0,wt().jsxs)("td",{children:["(",n.toLocaleString(),"/",(n*t.totalQty*a).toLocaleString()," |realtime:",(0,wt().jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")"]},"cp")}if(t.symbol in i){const n=i[t.symbol];if("number"===typeof n){const r=(e.reverse?-1:1)*(n-t.buyPrice)/t.buyPrice;o=(0,wt().jsxs)("td",{children:[n.toFixed(3),"/",(n*t.totalQty*a).toLocaleString(),"(",(0,wt().jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")"]},"cp")}else{const r=(e.reverse?-1:1)*(n[0]-t.buyPrice)/t.buyPrice,i=(e.reverse?-1:1)*(n[1]-t.buyPrice)/t.buyPrice;o=(0,wt().jsxs)("td",{children:[n[0].toFixed(3),"/",(n[0]*t.totalQty*a).toLocaleString(),"|(",(0,wt().jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")|(",(0,wt().jsxs)("span",{style:{color:i<0?"red":"green"},children:[(100*i).toLocaleString(),"%"]}),")"]},"cp")}}else o=(0,wt().jsx)("td",{children:"-"},"cp");t.symbol[t.symbol.length-9];return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:t.accountId},"aid"),(0,wt().jsx)("td",{children:null==n?(0,wt().jsx)(Ci,{to:`/trading/runner/${t.accountId}/${t.runner}`,children:B7(t.runner)}):B7(t.runner)},"runner"),(0,wt().jsx)("td",{children:t.symbol},"symbol"),(0,wt().jsxs)("td",{children:[t.buyPrice.toLocaleString(),"/",(t.buyPrice*t.totalQty*a).toLocaleString()]},"cost"),null!=s?s:o,(0,wt().jsx)("td",{children:t.totalQty},"total"),(0,wt().jsx)("td",{children:t.freezeQty},"frozen"),(0,wt().jsx)("td",{children:(0).toFixed(2)+"%"},"gain"),(0,wt().jsx)("td",{children:kc(t.createTime)},"date"),(0,wt().jsx)("td",{children:null!=r&&(0,wt().jsx)("button",{onClick:()=>{r(t.runner,t.symbol)},children:"\u5356\u51fa"})},"op")]})})})]})}function a9(e){let{accountId:t,runner:n,handleClean:r,version:i,reverse:o}=e;const a=(0,St().useCallback)(async e=>await Tc(t,null==n?null:n,e),[t,n,i]);return(0,wt().jsx)(Sd,{getter:a,cvt:e=>(0,wt().jsx)(o9,{positions:e,handleClean:r,runner:n,reverse:o})})}function s9(e){var t;const[n,r]=(0,St().useState)(void 0),[i,o]=(0,St().useState)(0),[a,s]=(0,St().useState)([]),[l,u]=(0,St().useState)(null),[c,d]=(0,St().useState)([]),[h,p]=(0,St().useState)([]),[f,g]=(0,St().useState)([]),[m,v]=(0,St().useState)(!1),y=Fr(),[x,b]=(0,St().useState)([]),{filter:w,symbol:S,preClose:_,middle:A,front:k,task:C,account:M,mainId:I,showBuyPoint:T}=e,[D,j]=(0,St().useState)(void 0),P="factor buy"===M.strategy,L=xu.has(M.strategy),[R,E]=(0,St().useState)([]),N=(0,St().useContext)(V2);(0,St().useEffect)(()=>{const e=new AbortController,t=M.rowid+"-"+M.strategy,n=cc();Nc(S,t,"energy",n,n,e.signal).then(e=>{"err"in e||p(e[0])})},[i,M,S]),(0,St().useEffect)(()=>{if(null==_){const e=new AbortController,t=e.signal;return Kc(S,t).then(e=>{t.aborted||null==e||j(e)}),()=>{e.abort()}}j(_)},[_,S]),(0,St().useEffect)(()=>{const e=new Map,t=new Map,n=new Map,i=new Map,a=new Map,l=new Map,c=new Map,h=null===N||void 0===N?void 0:N.subscribe("symbol",S,n=>{"reset"===n.command&&e.clear(),Object.entries(n.data).forEach(n=>{const r=n[1];e.set(n[0],r),t.set("latest",r)});const r=Lu(Array.from(e.values()).sort((e,t)=>e.t-t.t),!0);s(r)},{needHistory:!0});var p,f;P?(p="ws:AM:vol-QQQ",f=null===N||void 0===N?void 0:N.subscribe("data",p,e=>{"reset"===e.command&&l.clear(),Object.entries(e.data).forEach(e=>{const t=e[1];l.set(e[0],t)});const n=t.get("latest");if(null!=n){const e=Pu(Array.from(l.values()),e=>6e4*Math.floor(e.ts/6e4),(e,t)=>({ts:t,call:0,put:0,calls:[],puts:[]}),n.t);g(e.sort((e,t)=>e.ts-t.ts))}},{needHistory:!0})):(p="vol-QQQ",f=null===N||void 0===N?void 0:N.subscribe("symbol",p,e=>{"reset"===e.command&&a.clear(),Object.entries(e.data).forEach(e=>{const t=e[1];a.set(e[0],[parseInt(e[0]),t[0],t[1]])});const n=t.get("latest");if(null!=n){const e=Pu(Array.from(a.values()),e=>e[0],(e,t)=>[t,0,0],n.t);u([e.map(e=>e[1]),e.map(e=>e[2])])}},{needHistory:!0}));const m=null===N||void 0===N?void 0:N.subscribe("service",`energy@${S}`,e=>{Object.entries(e.data).forEach(e=>{const t=e[1],n=e[1],r=`${t.contract}_${n.timestamp}`,o=c.get(r),a=null!=o?`@@@\u6d41\u5165:${o.callVolume},${o.callMoney}@@@\u6d41\u51fa:${o.putVolume},${o.putMoney}`:"";i.set(e[0],{strategy:"energy",subtype:n.msg+a,timestamp:n.timestamp,extra:t})}),b(Array.from(i.values()).sort((e,t)=>e.timestamp-t.timestamp))}),v=(Math.floor((new Date).getTime()/t5),null===N||void 0===N?void 0:N.subscribe("task",C,e=>{if("reverse"in e.data){const t=e.data;r(t.reverse.reversePrices)}else"order"in e.data&&o(e=>e+1);"reset"===e.command&&n.clear();const i=[];Object.entries(e.data).forEach(e=>{if(e[0].startsWith("b@")){const t=e[0][2],r=e[0].slice(4).split("-");if(2===r.length){const o=r[0],a=parseInt(r[1]);let s=n.get(t);null==s&&(s=new Map,n.set(t,s));let l=s.get(o);null==l&&(l=[],s.set(o,l)),(0===l.length||l[l.length-1][0]<a)&&(i.push(a),l.push([a,e[1]]))}}else if(e[0].startsWith("obj@netflow_")){const t=e[0].slice(12),n=e[1];c.set(t,n)}});const a=t.get("latest");if(i.length>0&&null!=a){const e=Array.from(n.entries()).map(e=>Array.from(e[1].entries()).map(e=>{const t=Pu(e[1],e=>e[0],(e,t)=>[t,e[1]],a.t);return[e[0],t.map(e=>e[1])]}));d(e)}},{needHistory:!0}));return()=>{null!=m&&(null===N||void 0===N||N.unsubscribe("service",`energy@${S}`,m)),null!=h&&(null===N||void 0===N||N.unsubscribe("symbol",S,h)),null!=v&&(null===N||void 0===N||N.unsubscribe("task",C,v)),null!=f&&(null===N||void 0===N||N.unsubscribe(P?"data":"symbol",p,f))}},[N,S,C,P]),(0,St().useEffect)(()=>{const e=cc(),t=[];c3(w,e,x).sort((e,t)=>e.timestamp-t.timestamp).forEach(e=>{const n=6e4*Math.floor(e.timestamp/6e4);0===t.length||t[t.length-1][0]<n?t.push([n,[e.subtype]]):t[t.length-1][1].push(e.subtype)}),E(T?_u(yc(h).map(e=>[e[0],e[1]]),t):t)},[w,x,h,T]);const O=a.length;var z=void 0;if(P){if(f.length>0){const e=f.map(e=>e.call),t=f.map(e=>e.put),n=Array.from({length:11}).map((e,t)=>["call strike price "+(t-5),f.map(e=>t<e.calls.length?e.calls[t][0]:0)]),r=Array.from({length:11}).map((e,t)=>["put strike price "+(t-5),f.map(e=>t<e.puts.length?e.puts[t][0]:0)]),i=Array.from({length:11}).map((e,t)=>["call vol "+(t-5),f.map(e=>t<e.calls.length?e.calls[t][1]:0)]),o=Array.from({length:11}).map((e,t)=>["put vol "+(t-5),f.map(e=>t<e.puts.length?e.puts[t][1]:0)]);z=m?[[["call vol",e],["put vol",t]],n,i,r,o]:[[["call vol",e],["put vol",t]]]}}else if(null!=l){z=[[["call vol",Wu(l[0],O,()=>0)],["put vol",Wu(l[1],O,()=>0)]]]}return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem"},children:[M.strategy.search("energy buy")>-1&&(0,wt().jsx)(e7,{strategyId:`${I}-${M.strategy}`}),M.strategy.search("energy double buy")>-1&&(0,wt().jsx)(J8,{strategyId:`stock:${M.symbol}-${I}-${M.strategy}`}),(M.strategy.search("EventBack buy")>-1||M.strategy.search("IronCondor buy")>-1)&&(0,wt().jsx)(Q8,{strategyId:`stock:${M.symbol}-${I}-${M.strategy}`}),"factor buy"===M.strategy&&(0,wt().jsx)("button",{onClick:e=>{y(`/strategy/log/stock:${M.symbol}-${I}-${M.strategy}`)},children:"\u67e5\u770b\u65e5\u5fd7"}),null!=k&&k(),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/"+(18+3*((null===(t=z)||void 0===t?void 0:t.length)||0+c.length))},children:(0,wt().jsx)(l9,{symbol:S,preClose:"loading"===D?void 0:D,signals:R,isDay:!0,historyData:a,zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,lines:n,extras:Q7(a,x),extraLines:null==z?c:[...z,...c]})}),P&&(0,wt().jsxs)("div",{children:["\u662f\u5426\u5c55\u793a\u6863\u4f4d\u4ef7\u683c:",(0,wt().jsx)("input",{type:"checkbox",checked:m,onChange:e=>v(e.target.checked)})]})]}),A&&A(h),(0,wt().jsx)(r9,{account:M,version:i,mainId:I,reverse:L}),(0,wt().jsx)(a9,{accountId:M.rowid+"",version:i,reverse:L}),(0,wt().jsx)("div",{style:{marginTop:"3rem"},children:(0,wt().jsx)(o8,{addPercent:!0,data:dc(h),aggs:a})},"detail")]})}function l9(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)([1,100]),o=U2(),a=(0,St().useRef)(null),s=(0,St().useCallback)((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)},[e.clickDay]),l=(0,St().useCallback)(t=>{const n=e.clickPoint;null!=n&&n(t)},[e.clickPoint]),{historyData:u,isDay:c,symbol:d,preClose:h,signals:p,lines:f,extraLines:g,extras:m}=e;return(0,St().useEffect)(()=>{if(null!=a.current)if(null==t){const t=XD(a.current);t.on("click",e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&l(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],s(e.name.slice(0,10),t)}}),t.on("datazoom",t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}}),n(t)}else{const n=u;if(null!=n&&n.length>0){const i=n.map(e=>c?nc.format(e.t):cc(e.t,!0)),a=c&&null!=h?n.map(e=>[e.o,e.c,e.l,e.h,h]):n.map(e=>[e.o,e.c,e.l,e.h]),s=n.map(e=>e.v),l=new Map;p.forEach(e=>{const t=c?nc.format(e[0]):cc(e[0],!0);l.set(t,e[1].map(e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e}))});var d=null;if(c){const e=n[0].t;d=[nc.format(Sc(e)),nc.format(_c(e))]}const u=n.map(e=>e.vr||0),f=Fu(n),v=E2(i,a,[],[["volume",s]],[[["volume rank",u]],m,[["estimate volume",f]],...null!=g?g:[]],l,!o,e.zoomRange||r,null!=d?[[d[0],d[1],!0,"market open"]]:void 0);t.setOption(v)}}else n(null)},[u,p,t,o,c,s,l,h,d,r,e.zoomRange,e.setZoomRange,f,g,m]),(0,wt().jsx)("div",{ref:a,style:{width:"100%",height:"100%"}})}function u9(e){const{account:t,mainId:n,date:r,symbol:i,strategy:o}=e,a=xu.has(o),s=(0,St().useCallback)(async e=>{const a=Zc(r,e),s=i9(r,i,o,t,e),l=`stock:${t.symbol}-${n}-${o}`,u=ic(r,l,e),[c,d,h]=await Promise.all([s,u,a]);return"err"in c?c:[c[0],c[1],Lu(c[2],!1),void 0,"err"in d?[]:d,"err"in h?[]:h]},[i,r,o,t,n]);return(0,wt().jsx)(c9,{getter:s,filter:e.filter,date:e.date,symbol:e.symbol,preClose:e.preClose,clickPoint:e.clickPoint,zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,onConvert:e.onConvert,reverse:a},`${e.date}-${e.strategy}-${e.symbol}`)}function c9(e){const{filter:t,date:n,symbol:r,preClose:i,clickPoint:o,middle:a,front:s,getter:l,onConvert:u,reverse:c}=e;return(0,wt().jsx)(Sd,{getter:l,cvt:l=>{const u=[];c3(t,n,l[1]).sort((e,t)=>e.timestamp-t.timestamp).forEach(e=>{const t=6e4*Math.floor(e.timestamp/6e4);0===u.length||u[u.length-1][0]<t?u.push([t,[e.subtype]]):u[u.length-1][1].push(e.subtype)});const c=_u(yc(l[0]).map(e=>[e[0],e[1]]),u),d=Pu(l[5],e=>e[0],(e,t)=>[t,0,0]),h=d.map(e=>e[1]),p=d.map(e=>e[2]),f=null==i?l[3]:i;console.log("debug GDayCandle preClose2:",f,n,r);const g=l[4].map(e=>e.map(e=>[e[0],Pu(e[1],e=>e[0],(e,t)=>[t,-2]).map(e=>e[1])]));return(0,wt().jsxs)(wt().Fragment,{children:[null!=s&&s(),(0,wt().jsx)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:(0,wt().jsx)(i3,{symbol:r,signals:c,preClose:f,clickPoint:o,isDay:!0,historyData:l[2],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,extraLines:[[["estimate volume",Fu(l[2])]],[["callVol",h],["putVol",p]],...g]})}),a&&a([l[0],l[1],l[2]]),(0,wt().jsx)("div",{style:{marginTop:"3rem"},children:(0,wt().jsx)(o8,{addPercent:!0,data:dc(l[0]),aggs:l[2]})},"detail")]})},onLoad:u})}function d9(e){const{data:t}=e,[n,r]=(0,St().useState)(null),i=(0,wt().jsx)(d5,{data:t,update:r});return null==n?i:(0,wt().jsx)(g9,{account:n[1],mainAccount:n[0],children:i})}function h9(){const e=(0,St().useCallback)(async e=>{const t=await c5(e);return"err"in t?t:[t[0].filter(e=>e.startsWith("stock:")),t[1]]},[]);return(0,wt().jsx)(Sd,{getter:e,cvt:e=>(0,wt().jsx)(d9,{data:e})})}function p9(){return(0,wt().jsx)("main",{style:{flex:1},className:"MainPage",children:(0,wt().jsx)("div",{style:{flex:1,maxWidth:"1200px",width:"100vw"},children:(0,wt().jsx)(h9,{})})})}function f9(e){const{aid:t,startDate:n,endDate:r}=e,i=(0,St().useCallback)(async e=>await Pc(t,"sub",n,r,e),[t,n,r]);return(0,wt().jsx)(Sd,{getter:i,cvt:t=>{const n=t.d.map(e=>{const t=e.cost>0?e.profit/e.cost:0,n=(100*t).toFixed(2)+"%",r=t>0?"green":"red";return[e.timestamp,["@TITLE"+n,"@Color0"+r+"@@"+n]]});return(0,wt().jsx)(l3,{...e,preClose:1,signals:n})}})}function g9(e){const{account:t,mainAccount:n}=e,[r,i]=(0,St().useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[o,a]=(0,St().useState)(!0),s=(new Date).getTime(),l=cc(s-7776e6),u=cc(s),[c,d]=(0,St().useState)(!0),[h,p]=(0,St().useState)(null),f=Sc(s),g=cc(s-t5),m=s>=f-198e5&&(null==h||h[0]===u),[v,x]=(0,St().useState)(""),[b,w]=(0,St().useState)([0,100]),S=(0,St().useContext)(H2),_=null!=S&&1!==S.userLevel;return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9",marginTop:"2rem",marginBottom:"2rem"},children:(0,wt().jsx)(f9,{aid:t.rowid+"",startDate:l,endDate:u,symbol:t.symbol,clickDay:(e,t)=>{p([e,t]),w([0,100])}})}),(0,wt().jsx)(u3,{filter:r,updateCB:i}),m&&!_&&t.strategy===Au&&(0,wt().jsxs)(I5,{expanded:c,children:[(0,wt().jsx)(E5,{expandIcon:(0,wt().jsx)(F5,{onClick:e=>{d(e=>!e)},children:(0,wt().jsx)(y().A,{})}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,wt().jsx)("p",{children:"\u624b\u52a8\u4ea4\u6613"})}),(0,wt().jsx)(r3,{children:(0,wt().jsx)(Z7,{symbol:t.symbol,account:n,default:[1,0,"15:55",0,.002]})})]}),m&&!_&&(0,wt().jsx)(h5,{}),e.children,(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5c55\u793a\u4e70\u5165\u4fe1\u53f7:"}),(0,wt().jsx)(J5,{checked:o,onChange:e=>a(e.target.checked)})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u9009\u62e9\u65e5\u671f:"}),(0,wt().jsx)("input",{value:null!=h?h[0]:u,onChange:e=>{p([e.target.value,0]),w([0,100])},type:"date"})]}),m&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(e9,{symbol:"I:VIX",zoomRange:b,setZoomRange:w}),(0,wt().jsx)(s9,{showBuyPoint:o,account:t,symbol:t.symbol,filter:r,task:`stock:${t.symbol}-${n}-${t.strategy}`,mainId:n,zoomRange:b,setZoomRange:w},t.rowid)]}),!m&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(a3,{symbol:"I:VIX",startDate:null!=h?h[0]:g,endDate:null!=h?h[0]:g,signals:[],zoomRange:b,setZoomRange:w,load:v===(null!=h?h[0]:g)})}),(0,wt().jsx)(u9,{date:null!=h?h[0]:g,account:t,symbol:t.symbol,filter:r,strategy:t.strategy,mainId:n,zoomRange:b,setZoomRange:w,onConvert:()=>{const e=null!=h?h[0]:g;v!==e&&x(e)}})]})]})}async function m9(e,t){const n=await async function(e){const t=`${qu}/control?command=list`,n=await tc(t,e);if("err"in n)return n;if("result"in n&&null!=n.result)return n.result.map(e=>[`stock:${e[0]}-${e[1]}`,e[0],e[1],e[2],e[3]]);{const e=n;return{err:e.timeout?"worker timeout":e.e}}}(t);if("err"in n)return n;if(e)return[null,n];{const e=await async function(e){const t=await fc(e);if("err"in t)return t;{const n=await Ic(null,e);return"err"in n?n:[t,n]}}(t);return"err"in e?e:[e,n]}}function v9(e){const{status:t}=e;return null==t?(0,wt().jsx)("p",{children:"-"}):(0,wt().jsxs)("div",{className:"Container",children:[(0,wt().jsxs)("div",{children:[t.activated?(0,wt().jsx)(g().A,{color:"success"}):(0,wt().jsx)(m().A,{color:"error"}),t.canceled?(0,wt().jsx)(m().A,{color:"error"}):(0,wt().jsx)(g().A,{color:"success"})]}),(0,wt().jsx)("p",{children:cc(t.updateTime,!1,!0,!1).substring(11)})]})}function y9(e){return(0,wt().jsx)(x9,{...e})}function x9(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)(null),[o,a]=(0,St().useState)(null),[s,l]=(0,St().useState)(""),[u,c]=(0,St().useState)(null),[d,h]=(0,St().useState)(null),p=Fr(),[f,g]=(0,St().useState)(null),[m,v]=(0,St().useState)(null),y=()=>n(!1),x=()=>c(null),[b,w]=(0,St().useState)(0),[S,_]=(0,St().useState)(null),A=(0,St().useContext)(V2),k=(e,t,n)=>{(async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=new URLSearchParams;n?i.set("command","addgroup"):i.set("command","deletegroup"),i.set("symbol",e),i.set("strategy",t),i.set("group",Uc);const o=`${qu}/control?${i.toString()}`,a=await tc(o,r);if(!("err"in a)&&"s"in a){const e=a.s;if("boolean"===typeof e)return e}return!1})(t,n,e).then(e=>{e&&w(e=>e+1)})},[C,M]=(0,St().useState)({});return(0,St().useEffect)(()=>{const e=new Map,t=null===A||void 0===A?void 0:A.subscribe("task","all",t=>{var n=!1;Object.entries(t.data).forEach(t=>{if(t[0].endsWith("-status")){const r=t[0].substring(0,t[0].length-7);e.set(r,t[1]),n=!0}}),n&&M(Object.fromEntries(e.entries()))});return()=>{null!=t&&(null===A||void 0===A||A.unsubscribe("task","all",t))}},[A]),(0,St().useEffect)(()=>{const e=new AbortController;return async function(e){const t=`${qu}/control?command=getgroup&group=${Uc}`,n=await tc(t,e);return"err"in n?n:"d"in n?n.d:{err:"no key found by name:d"}}(e.signal).then(e=>{if(!("err"in e)){const t=new Set;e.forEach(e=>{t.add(e.strategy)}),v(t)}}),()=>{e.abort()}},[b]),(0,St().useEffect)(()=>{var e=null;return null==f&&(e=new AbortController,m9(null!=r,e.signal).then(t=>{var n;if(null===(n=e)||void 0===n||!n.signal.aborted)if("err"in t)g(t);else if(g(t[1]),null!=t[0]){const e=new Set(t[1].map(e=>e[2]));i([t[0][0],t[0][1].filter(t=>t.strategy!==Au&&!e.has(t.rowid+"-"+t.strategy))]);const n=new Map;t[0][1].forEach(e=>{e.account.length>0&&n.set(e.rowid+"",e.account)}),_(n)}else if(null!=r&&!("err"in r)){const e=new Set(t[1].map(e=>e[2]));i([r[0],r[1].filter(t=>t.strategy!==Au&&!e.has(t.rowid+"-"+t.strategy))])}})),()=>{null!=e&&e.abort()}},[f,e.stock]),null==f?(0,wt().jsx)(wd,{}):"err"in f?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",f.err]})}):(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,wt().jsx)("span",{children:"Create Task: "}),null!=r&&!("err"in r)&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("button",{onClick:e=>{if(r[1].length>0){const e=r[1][0];a(e);const t=r[0].find(t=>t.isBuy&&t.name===e.strategy),n=r[0].find(e=>!e.isBuy);null!=t&&null!=n&&c({stock:e.symbol,buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params})}},children:"New Task"}),(0,wt().jsx)("span",{children:"Query:"}),(0,wt().jsx)("input",{value:s,onChange:e=>l(e.target.value)})]})]}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("th",{children:"Stock"}),(0,wt().jsx)("th",{children:"Status"}),(0,wt().jsx)("th",{children:"Desc"}),(0,wt().jsx)("th",{children:"Strategy"}),(0,wt().jsx)("th",{children:"Group"}),(0,wt().jsx)("th",{children:"Operation"})]})}),(0,wt().jsx)("tbody",{children:f.filter(e=>0===s.length||e[1].toLocaleLowerCase().search(s.toLocaleLowerCase())>-1).map(e=>{const t=e[2].search("-");if(t>-1){const r=e[2].substring(0,t),i=e[2].substring(t);return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e[1]}),(0,wt().jsx)("td",{children:e[0]in C?(0,wt().jsx)(v9,{status:C[e[0]]}):"-"}),(0,wt().jsx)("td",{children:e[4]}),(0,wt().jsxs)("td",{children:[(0,wt().jsx)(Ci,{to:null!==S&&void 0!==S&&S.has(r)?`/trading/account/${r}`:`/accountG?mainId=${r}`,children:r}),i,"-"+((null===S||void 0===S?void 0:S.get(r))||"")]}),(0,wt().jsx)("td",{children:i.endsWith("big volume buy")&&null!=m&&(0,wt().jsx)(yu,{variant:"outlined",onClick:()=>k(!m.has(e[2]),e[1],e[2]),children:(m.has(e[2])?"\u5220\u9664":"\u6dfb\u52a0")+"\u4e00\u952e\u7ed1\u5b9a"})}),(0,wt().jsxs)("td",{children:[(0,wt().jsx)(yu,{variant:"outlined",color:e[3]?"error":"success",onClick:t=>{h([e[1],e[2],!e[3]]),n(!0)},children:e[3]?"Stop":"Start"}),(0,wt().jsx)(yu,{variant:"outlined",onClick:t=>p(`/task/${e[1]}/${e[2]}`),children:"Detail"}),(0,wt().jsx)(b9,{symbol:e[1],strategy:e[2],cb:()=>g(null)})]})]},e[0])}return(0,wt().jsx)(wt().Fragment,{})})})]}),(0,wt().jsxs)(K6,{show:null!=u,onHide:x,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Start Task"})}),(0,wt().jsx)(K6.Body,{children:null!=r&&!("err"in r)&&u?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Select Account"}),(0,wt().jsx)("select",{value:(null===o||void 0===o?void 0:o.rowid)||"",onChange:e=>{const t=r[1].find(t=>e.target.value===t.rowid+"");if(null!=t){const e=r[0].find(e=>e.isBuy&&e.name===t.strategy);null!=e&&(a(t),c(n=>n&&{...n,stock:t.symbol,buyAlgorithm:t.strategy,buyParams:e.params}))}},children:r[1].map(e=>(0,wt().jsx)("option",{value:e.rowid+"",children:`${e.rowid}-${e.account}-${e.symbol}-${e.strategy}-${e.desc}`},e.rowid))})]}),(0,wt().jsx)(B8,{taskConfigs:r[0],taskConfig:u,realTime:!0,setTaskConfig:e=>{c(t=>null==t?null:e(t))}})]}):(0,wt().jsx)("p",{children:"Task configs not loaded"})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:x,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:function(){if(null!=u&&null!=o){const e=o.rowid+"-"+u.buyAlgorithm;hc("new",u.stock,e,Object.fromEntries(u.buyParams.map(e=>[e.key,null==e.realValue?e.default:e.realValue])),u.sellAlgorithm,Object.fromEntries(u.sellParams.map(e=>[e.key,e.default])),null!=u.sellParamsEnd?Object.fromEntries(u.sellParamsEnd.map(e=>[e.key,e.default])):null).then(e=>{e&&g(null),c(null)})}},children:"Start"})]})]}),(0,wt().jsxs)(K6,{show:t,onHide:y,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Check"})}),(0,wt().jsx)(K6.Body,{children:(0,wt().jsxs)("p",{children:["Are you sure to ",null!=d&&d[2]?"start":"stop"," this task ?"]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:y,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:function(){null!=d&&(d[2]?async function(e,t){const n=`${qu}/control?command=start&symbol=${e}&strategy=${t}`;return!("err"in await tc(n))}(d[0],d[1]):async function(e,t){const n=`${qu}/control?command=stop&uid=stock:${e}-${t}`;return!("err"in await tc(n))}(d[0],d[1])).then(e=>{e&&g(null)}),y()},children:"OK"})]})]})]})}function b9(e){const{symbol:t,strategy:n,cb:r}=e,[i,o]=(0,St().useState)("");return(0,wt().jsx)(K8,{msg:"\u4fee\u6539\u4efb\u52a1\u5907\u6ce8",content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5907\u6ce8"}),(0,wt().jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:i,onChange:e=>{o(e.target.value)}})]}),callBack:e=>{(async function(e,t,n){const r=new URLSearchParams;r.set("command","update_desc"),r.set("symbol",e),r.set("strategy",t),r.set("desc",n);const i=`${qu}/control?${r.toString()}`,o=await tc(i);return"s"in o&&!0===o.s})(t,n,i).then(t=>{const n="\u66f4\u65b0"+(t?"\u6210\u529f!":"\u5931\u8d25!");t&&r(),e(n)}).catch(t=>{e("\u66f4\u65b0\u5931\u8d25!err:"+t)})}})}function w9(){return U2()?(0,wt().jsxs)("div",{style:{display:"flex"},children:[(0,wt().jsxs)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:[(0,wt().jsx)(Mi,{to:"stock",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Stock"}),(0,wt().jsx)(Mi,{to:"event",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Event"}),(0,wt().jsx)(Mi,{to:"dates",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Dates"}),(0,wt().jsx)(Mi,{to:"filter",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Filter"}),(0,wt().jsx)(Mi,{to:"block",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Block"}),(0,wt().jsx)(Mi,{to:"volatility",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Volatility"})]}),(0,wt().jsx)(ri,{})]}):(0,wt().jsx)(ri,{})}function S9(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)(null),[i,o]=(0,St().useState)(null),a=()=>r(null);(0,St().useEffect)(()=>{if(null==e){const e=new AbortController,n=e.signal;return pc(n).then(e=>{n.aborted||t(e)}),()=>{e.abort()}}},[e]);const s=()=>{null!=n&&async function(e){const t=new URLSearchParams;t.set("type","stock"),t.set("command","update"),t.set("data",JSON.stringify(e));const n=`${qu}/config?${t.toString()}`;return!("err"in await tc(n,null))}(n).then(e=>{r(null),t(null)})};return null==e?(0,wt().jsx)(wd,{}):"err"in e?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",e.err]})}):(0,wt().jsxs)("div",{children:[(0,wt().jsx)(yu,{onClick:()=>r({stock:"",level:1,tags:[]}),children:"\u6dfb\u52a0"}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"\u80a1\u7968\u4ee3\u7801"}),(0,wt().jsx)("td",{children:"\u7b49\u7ea7"}),(0,wt().jsx)("td",{children:"\u6807\u7b7e"}),(0,wt().jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,wt().jsx)("tbody",{children:e.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.stock}),(0,wt().jsx)("td",{children:e.level}),(0,wt().jsx)("td",{children:e.tags.map(e=>(0,wt().jsx)(yu,{variant:"outlined",color:"success",children:e}))}),(0,wt().jsx)("td",{children:(0,wt().jsx)(yu,{onClick:()=>r(e),children:"\u4fee\u6539"})})]},e.stock))})]}),(0,wt().jsxs)(K6,{show:null!=n,children:[(0,wt().jsx)(K6.Header,{children:(0,wt().jsx)(K6.Title,{children:"Edit Data"})}),(0,wt().jsxs)(K6.Body,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Stock: "}),(0,wt().jsx)("input",{value:null===n||void 0===n?void 0:n.stock,onChange:e=>r(t=>null!=t?{...t,stock:e.target.value}:null)})]}),(0,wt().jsxs)("div",{style:{margin:"1rem 0"},children:[(0,wt().jsx)("span",{children:"Level: "}),(0,wt().jsx)("select",{value:null===n||void 0===n?void 0:n.level,onChange:e=>{r(t=>null!=t?{...t,level:parseInt(e.target.value)}:t)},children:_d.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Tags: "}),(0,wt().jsx)("input",{value:null==i?"":i,onChange:e=>{o(e.target.value)}}),(0,wt().jsx)(yu,{onClick:e=>{null!=i&&i.length>0&&(r(e=>null==e?e:{...e,tags:e.tags.concat(i)}),o(null))},children:"Create"})]}),(0,wt().jsx)("div",{children:null===n||void 0===n?void 0:n.tags.map(e=>(0,wt().jsx)(u5,{label:e,onDelete:()=>{r(t=>null==t?t:{...t,tags:t.tags.filter(t=>t!==e)})}}))})]}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:a,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:s,children:"Submit"})]})]})]})}function _9(e,t,n){return null==e?{[t]:n}:{...e,[t]:n}}const A9=["low","medium","high"];function k9(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)(null),i=()=>r(null),o=()=>{null!=n&&async function(e){const t=new URLSearchParams;t.set("type","event"),t.set("command",e.uid>0?"update":"insert"),t.set("data",JSON.stringify(e));const n=`${qu}/config?${t.toString()}`;return!("err"in await tc(n,null))}(n).then(e=>{r(null),t(null)})};return(0,St().useEffect)(()=>{if(null==e){const e=new AbortController,n=e.signal;return async function(e){const t=`${qu}/config?type=event&command=list`;return await tc(t,e)}(n).then(e=>{n.aborted||t(e)}),()=>{e.abort()}}}),null==e?(0,wt().jsx)(wd,{}):"err"in e?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",e.err]})}):(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(yu,{onClick:e=>{r({uid:0,name:"",timestamp:(new Date).getTime(),target:"",level:"low"})},children:"\u6dfb\u52a0"})}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"\u540d\u79f0"}),(0,wt().jsx)("td",{children:"\u7ea7\u522b"}),(0,wt().jsx)("td",{children:"\u65e5\u671f"}),(0,wt().jsx)("td",{children:"\u4f5c\u7528\u76ee\u6807"}),(0,wt().jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,wt().jsx)("tbody",{children:e.map(e=>{const t=e.name+e.target+e.timestamp;return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.name}),(0,wt().jsx)("td",{children:e.level}),(0,wt().jsx)("td",{children:cc(e.timestamp)}),(0,wt().jsx)("td",{children:e.target}),(0,wt().jsx)("td",{children:(0,wt().jsx)(yu,{onClick:()=>r(e),children:"\u4fee\u6539"})})]},t)})})]}),(0,wt().jsxs)(K6,{show:null!=n,onHide:()=>r(null),children:[(0,wt().jsx)(K6.Header,{children:(0,wt().jsx)(K6.Title,{children:"Edit Market Event"})}),(0,wt().jsxs)(K6.Body,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{className:"Edit-Key",children:"Name: "}),(0,wt().jsx)("input",{value:null===n||void 0===n?void 0:n.name,onChange:e=>r(t=>_9(t,"name",e.target.value))})]}),(0,wt().jsxs)("div",{style:{margin:"1rem 0"},children:[(0,wt().jsx)("span",{className:"Edit-Key",children:"Date: "}),(0,wt().jsx)("input",{type:"date",value:cc((null===n||void 0===n?void 0:n.timestamp)||(new Date).getTime()),onChange:e=>r(t=>_9(t,"timestamp",new Date(e.target.value).getTime()))})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Level: "}),(0,wt().jsx)("select",{value:null===n||void 0===n?void 0:n.level,onChange:e=>{r(t=>_9(t,"level",e.target.value))},children:A9.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))})]}),(0,wt().jsxs)("div",{style:{margin:"1rem 0"},children:[(0,wt().jsx)("span",{className:"Edit-Key",children:"Target: "}),(0,wt().jsx)("input",{value:null===n||void 0===n?void 0:n.target,onChange:e=>r(t=>_9(t,"target",e.target.value))})]})]}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:i,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:o,children:"Submit"})]})]})]})}function C9(e){return(0,qe().Ay)("MuiPagination",e)}(0,Ze().A)("MuiPagination",["root","ul","outlined","text"]);const M9=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function I9(e){return(0,qe().Ay)("MuiPaginationItem",e)}const T9=(0,Ze().A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),D9=(0,Y().A)((0,wt().jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),j9=(0,Y().A)((0,wt().jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),P9=(0,Y().A)((0,wt().jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),L9=(0,Y().A)((0,wt().jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),R9=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],E9=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,U().A)(n.size)}`],"text"===n.variant&&t[`text${(0,U().A)(n.color)}`],"outlined"===n.variant&&t[`outlined${(0,U().A)(n.color)}`],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},N9=(0,H().Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:E9})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",[`&.${T9.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})}),O9=(0,H().Ay)(lu,{name:"MuiPaginationItem",slot:"Root",overridesResolver:E9})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,[`&.${T9.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${T9.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${T9.selected}`]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,pe().X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${T9.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},[`&.${T9.disabled}`]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})},e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},"text"===n.variant&&{[`&.${T9.selected}`]:(0,Dt().A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},[`&.${T9.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{[`&.${T9.disabled}`]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${T9.selected}`]:(0,Dt().A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:(0,pe().X4)(t.palette[n.color].main,.5)}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.activatedOpacity})`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${T9.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{[`&.${T9.disabled}`]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})}),z9=(0,H().Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})}),B9=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:o,components:a={},disabled:s=!1,page:l,selected:u=!1,shape:c="circular",size:d="medium",slots:h={},type:p="page",variant:f="text"}=n,g=(0,jt().A)(n,R9),m=(0,Dt().A)({},n,{color:i,disabled:s,selected:u,shape:c,size:d,type:p,variant:f}),v=xa(),y=(e=>{const{classes:t,color:n,disabled:r,selected:i,size:o,shape:a,type:s,variant:l}=e,u={root:["root",`size${(0,U().A)(o)}`,l,a,"standard"!==n&&`color${(0,U().A)(n)}`,"standard"!==n&&`${l}${(0,U().A)(n)}`,r&&"disabled",i&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return(0,$e().A)(u,I9,t)})(m),x=(v?{previous:h.next||a.next||L9,next:h.previous||a.previous||P9,last:h.first||a.first||D9,first:h.last||a.last||j9}:{previous:h.previous||a.previous||P9,next:h.next||a.next||L9,first:h.first||a.first||D9,last:h.last||a.last||j9})[p];return"start-ellipsis"===p||"end-ellipsis"===p?(0,wt().jsx)(N9,{ref:t,ownerState:m,className:(0,Pt().A)(y.root,r),children:"\u2026"}):(0,wt().jsxs)(O9,(0,Dt().A)({ref:t,ownerState:m,component:o,disabled:s,className:(0,Pt().A)(y.root,r)},g,{children:["page"===p&&l,x?(0,wt().jsx)(z9,{as:x,ownerState:m,className:y.icon}):null]}))}),F9=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],$9=(0,H().Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),V9=(0,H().Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function W9(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const H9=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:i,color:o="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:u=W9,hideNextButton:c=!1,hidePrevButton:d=!1,renderItem:h=e=>(0,wt().jsx)(B9,(0,Dt().A)({},e)),shape:p="circular",showFirstButton:f=!1,showLastButton:g=!1,siblingCount:m=1,size:v="medium",variant:y="text"}=n,x=(0,jt().A)(n,F9),{items:b}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:i=1,disabled:o=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:u,showFirstButton:c=!1,showLastButton:d=!1,siblingCount:h=1}=e,p=(0,jt().A)(e,M9),[f,g]=(0,at().A)({controlled:u,default:i,name:n,state:"page"}),m=(e,t)=>{u||g(t),l&&l(e,t)},v=(e,t)=>{const n=t-e+1;return Array.from({length:n},(t,n)=>e+n)},y=v(1,Math.min(t,r)),x=v(Math.max(r-t+1,t+1),r),b=Math.max(Math.min(f-h,r-t-2*h-1),t+2),w=Math.min(Math.max(f+h,t+2*h+2),x.length>0?x[0]-2:r-1),S=[...c?["first"]:[],...s?[]:["previous"],...y,...b>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...v(b,w),...w<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...x,...a?[]:["next"],...d?["last"]:[]],_=e=>{switch(e){case"first":return 1;case"previous":return f-1;case"next":return f+1;case"last":return r;default:return null}},A=S.map(e=>"number"===typeof e?{onClick:t=>{m(t,e)},type:"page",page:e,selected:e===f,disabled:o,"aria-current":e===f?"true":void 0}:{onClick:t=>{m(t,_(e))},type:e,page:_(e),selected:!1,disabled:o||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?f>=r:f<=1)});return(0,Dt().A)({items:A},p)}((0,Dt().A)({},n,{componentName:"Pagination"})),w=(0,Dt().A)({},n,{boundaryCount:r,color:o,count:a,defaultPage:s,disabled:l,getItemAriaLabel:u,hideNextButton:c,hidePrevButton:d,renderItem:h,shape:p,showFirstButton:f,showLastButton:g,siblingCount:m,size:v,variant:y}),S=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,$e().A)(r,C9,t)})(w);return(0,wt().jsx)($9,(0,Dt().A)({"aria-label":"pagination navigation",className:(0,Pt().A)(S.root,i),ownerState:w,ref:t},x,{children:(0,wt().jsx)(V9,{className:S.ul,ownerState:w,children:b.map((e,t)=>(0,wt().jsx)("li",{children:h((0,Dt().A)({},e,{color:o,"aria-label":u(e.type,e.page,e.selected),shape:p,size:v,variant:y}))},t))})}))});async function G9(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=[];i.push(["page",t]),null!=e&&i.push(["tag",e]),i.push(["pagesize",n]);const o=Object.fromEntries(i);return await U9("listdates",JSON.stringify(o),e=>"total"in e&&"data"in e?e:{err:`key not found,total:${"total"in e}, d:${"data"in e}`},r)}async function U9(e,t,n){const r=new URLSearchParams;r.set("type","dates"),r.set("command",e),r.set("data",t);const i=`${qu}/config?${r.toString()}`,o=await tc(i,null);return"err"in o?o:n(o)}function X9(e){const{tags:t,tag:n,setTag:r,addDate:i}=e,[o,a]=(0,St().useState)([t[0],cc((new Date).getTime())]),[s,l]=(0,St().useState)("");return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Tags:"}),(0,wt().jsxs)("select",{value:null!=n?n:"none",onChange:e=>{const t=e.target.value;r("none"===t?null:t)},children:[(0,wt().jsx)("option",{value:"none",children:"none"},"none"),t.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))]}),(0,wt().jsx)(K8,{msg:"Add Date",content:(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Tag:"}),(0,wt().jsx)("select",{value:null!=o?o[0]:"none",onChange:e=>{a(t=>[e.target.value,t[1]])},children:t.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Date:"}),(0,wt().jsx)("input",{value:o[1],type:"date",onChange:e=>a(t=>[t[0],e.target.value])}),(0,wt().jsx)(F5,{onClick:e=>{l(e=>{const t=o[1];if(e.length>0){return new Set(e.split(",")).has(t)?e:e+","+t}return t})},children:(0,wt().jsx)(f().A,{})}),(0,wt().jsx)(Nl,{value:s,onChange:e=>l(e.target.value),multiline:!0})]})]}),callBack:e=>{s.length>0?U9("adddate",JSON.stringify({tag:o[0],date:s}),e=>"s"in e?e.s:{err:"no key named:s"}).then(n=>{"boolean"===typeof n?(e(n?"Succeed":"Fail"),n&&(l(""),a([t[0],cc((new Date).getTime())]),i())):e("Fail,reason:"+n.err)}):e("tag empty")}})]})}function Y9(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)(1),[i,o]=(0,St().useState)(0),[a,s]=(0,St().useState)(0),l=(0,St().useCallback)(async t=>await G9(e,n,20,t),[e,n,a]),[u,c]=(0,St().useState)(null),d=(0,St().useCallback)(async e=>await U9("listtag","{}",e=>"data"in e?e.data:{err:"no data found"},e),[i]);return(0,wt().jsxs)("main",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(K8,{msg:"Create Tag",content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Tag:"}),(0,wt().jsx)("input",{value:u||"",onChange:e=>c(e.target.value)})]}),callBack:e=>{null!=u&&u.length>0?U9("addtag",JSON.stringify({tag:u}),e=>"s"in e?e.s:{err:"no key named:s"}).then(t=>{"boolean"===typeof t?(e(t?"Succeed":"Fail"),t&&o(e=>e+1)):e("Fail,reason:"+t.err),c(null)}):e("tag empty")}})}),(0,wt().jsx)(Sd,{getter:d,cvt:n=>(0,wt().jsx)(X9,{tags:n,tag:e,setTag:t,addDate:()=>s(e=>e+1)})}),(0,wt().jsx)(Sd,{getter:l,cvt:e=>(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(H9,{count:e.total,page:n,onChange:(e,t)=>{r(t)}})}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Tag"}),(0,wt().jsx)("td",{children:"Date"}),(0,wt().jsx)("td",{children:"Operate"})]})}),(0,wt().jsx)("tbody",{children:e.data.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.tag}),(0,wt().jsx)("td",{children:e.dts}),(0,wt().jsx)("td",{children:(0,wt().jsx)(K8,{content:(0,wt().jsxs)("p",{children:["\u662f\u5426\u5220\u9664,tag:",e.tag,",date:",e.dts,"?"]}),msg:"\u5220\u9664",callBack:t=>{U9("deletedate",JSON.stringify({date:e.dts,tag:e.tag}),e=>"s"in e&&e.s).then(e=>{"boolean"===typeof e&&e?(s(e=>e+1),t("\u5220\u9664\u6210\u529f!")):t("\u5220\u9664\u5931\u8d25!")})}})})]}))})]})]})})]})}function q9(e){const t=(0,St().useCallback)(async e=>{const t=await G9(null,1,1e3,e);if("err"in t)return t;{const e=new Map;return t.data.forEach(t=>{const n=e.get(t.tag);null!=n?n.push(t.dts):e.set(t.tag,[t.dts])}),e}},[]);return(0,wt().jsx)(Sd,{getter:t,cvt:t=>(0,wt().jsx)(E8,{data:Array.from(t.entries()).map(e=>e[0]),select:n=>{const r=new Set;n.forEach(e=>{const n=t.get(e);null!=n&&n.forEach(e=>r.add(e))}),e.updater(r)}})})}function Z9(e){const{filters:t,updater:n}=e,[r,i]=(0,St().useState)(new AbortController);(0,St().useEffect)(()=>()=>{r.abort()},[r]);const o=(e,t,i)=>{(async function(e,t,n){const r={rowid:e,freeze:t?1:0},i=await F8("uperset",JSON.stringify(r),e=>"s"in e&&e.s,n);return"boolean"===typeof i&&i})(t,i,r.signal).then(t=>{e("\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!"),n()})};return(0,wt().jsx)("div",{children:(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Name"}),(0,wt().jsx)("td",{children:"Freeze"}),(0,wt().jsx)("td",{children:"Operate"})]})}),(0,wt().jsx)("tbody",{children:t.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.name}),(0,wt().jsx)("td",{children:1===e.freeze?"\u9501\u5b9a":"\u672a\u9501\u5b9a"}),(0,wt().jsx)("td",{children:(0,wt().jsx)(K8,{msg:1===e.freeze?"\u89e3\u9501":"\u9501\u5b9a",callBack:t=>{null!=e.rowid&&o(t,e.rowid,!(1===e.freeze))}})})]}))})]})})}function K9(){const[e,t]=(0,St().useState)(0),n=(0,St().useCallback)(async e=>await $8(e),[e]);return(0,wt().jsx)(Sd,{getter:n,cvt:e=>(0,wt().jsx)(Z9,{filters:e,updater:()=>t(e=>e+1)})})}function Q9(e){const{data:t,config:n,updater:r}=e,i=t.find(e=>e.name===n.config);if(null!=i){const e=n.value,t=i.value.map(t=>({...t,default:e[t.key]}));return(0,wt().jsx)(O8,{params:t,handleConfig:e=>r(e)})}return(0,wt().jsx)("p",{children:"fail to find config!"})}function J9(e){const{data:t,configs:n,updater:r}=e,[i,o]=(0,St().useState)(null);return(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Name"},"name"),(0,wt().jsx)("td",{children:"Desc"},"desc"),(0,wt().jsx)("td",{children:"Config"},"config"),(0,wt().jsx)("td",{children:"Operate"},"operate")]})}),(0,wt().jsx)("tbody",{children:n.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.name},"name"),(0,wt().jsx)("td",{children:e.desc},"desc"),(0,wt().jsx)("td",{children:e.config},"config"),(0,wt().jsx)("td",{children:(0,wt().jsx)(K8,{msg:"\u4fee\u6539\u914d\u7f6e",content:null!=i?(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u540d\u79f0:"}),i.name]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u63cf\u8ff0:"}),(0,wt().jsx)("input",{value:i.desc,onChange:e=>o(t=>null!=t?{...t,desc:e.target.value}:null)})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u914d\u7f6e\u7c7b\u578b:"}),i.config]}),(0,wt().jsx)("div",{children:(0,wt().jsx)(Q9,{data:t,config:i,updater:e=>{o(t=>{if(null!=t){const n={...t.value,[e[0]]:e[1]};return{...t,value:n}}return null})}})})]}):void 0,callBack:e=>{null!=i&&i.name.length>0?qc(i).then(t=>{e("\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!"),r()}):e("\u64cd\u4f5c\u5931\u8d25!")},clickCB:()=>o(e)})},"operate")]}))})]})}function eee(e){const{data:t}=e,[n,r]=(0,St().useState)(null),[i,o]=(0,St().useState)(0),a=(0,St().useCallback)(async e=>await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/control?command=blockConfig&sub=list`,n=await tc(t,e);return"err"in n||"data"in n&&"count"in n?n:{err:"data or count not found"}}(e),[i]);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(K8,{msg:"\u65b0\u5efa\u914d\u7f6e",content:null!=n?(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u540d\u79f0:"}),(0,wt().jsx)("input",{value:n.name,onChange:e=>r(t=>null!=t?{...t,name:e.target.value}:null)})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u63cf\u8ff0:"}),(0,wt().jsx)("input",{value:n.desc,onChange:e=>r(t=>null!=t?{...t,desc:e.target.value}:null)})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u914d\u7f6e\u7c7b\u578b:"}),(0,wt().jsx)("select",{value:n.config,onChange:e=>{r(n=>{if(null!=n){const r=e.target.value,i=t.find(e=>e.name===r);if(i)return{...n,config:r,value:Object.fromEntries(i.value.map(e=>[e.key,e.default]))}}return null})},children:t.map(e=>(0,wt().jsx)("option",{value:e.name,children:e.name},e.name))}),(0,wt().jsx)(Q9,{data:t,config:n,updater:e=>{r(t=>{if(null!=t){const n={...t.value,[e[0]]:e[1]};return{...t,value:n}}return null})}})]})]}):void 0,callBack:e=>{null!=n&&n.name.length>0?qc(n).then(t=>{const n="\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!";t&&o(e=>e+1),e(n)}):e("\u64cd\u4f5c\u5931\u8d25!")},clickCB:()=>r({name:"",desc:"",config:t[0].name,value:Object.fromEntries(t[0].value.map(e=>[e.key,e.default]))})})}),(0,wt().jsx)(Sd,{getter:a,cvt:e=>(0,wt().jsx)(J9,{data:t,configs:e.data,updater:()=>o(e=>e+1)})})]})}function tee(){const e=(0,St().useCallback)(async e=>await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/control?command=blockConfig&sub=listConfig`,n=await tc(t,e);return n}(e),[]);return(0,wt().jsx)(Sd,{getter:e,cvt:e=>e.length>0?(0,wt().jsx)(eee,{data:e}):(0,wt().jsx)("p",{children:"Empty Config"})})}function nee(e,t){var n=0;return e.map(e=>{const r=t(e);return Math.abs(r)>.01?(n=r,r):n})}function ree(e){const{x:t,callData:n,putData:r}=e,[i,o]=(0,St().useState)(null),a=(0,St().useRef)(null);return(0,St().useEffect)(()=>{if(null!=a.current)if(null==i){const e=XD(a.current);o(e)}else{const e=O2(t,[[["vol(call)",nee(n,e=>e[0])],["vol(put)",nee(r,e=>e[0])]],[["call price",nee(n,e=>e[1])],["pure value",nee(n,e=>e[2])]],[["put price",nee(r,e=>e[1])],["pure value",nee(r,e=>e[2])]]]);i.setOption(e)}else o(null)},[n,i,r,t]),(0,wt().jsx)("div",{ref:a,style:{width:"100%",aspectRatio:"16/9"}})}function iee(e){const{data:t}=e,n=t.map(e=>kc(e.ts));return(0,wt().jsxs)("div",{style:{width:"100%"},children:[(0,wt().jsx)("h2",{children:"Level 1:"}),(0,wt().jsx)(ree,{x:n,callData:t.map(e=>e.callM.length>0?e.callM[0]:[0,0,0]),putData:t.map(e=>e.putM.length>0?e.putM[0]:[0,0,0])}),(0,wt().jsx)("h2",{children:"Level 2:"}),(0,wt().jsx)(ree,{x:n,callData:t.map(e=>e.callM.length>1?e.callM[1]:[0,0,0]),putData:t.map(e=>e.putM.length>1?e.putM[1]:[0,0,0])}),(0,wt().jsx)("h2",{children:"Level 3:"}),(0,wt().jsx)(ree,{x:n,callData:t.map(e=>e.callM.length>2?e.callM[2]:[0,0,0]),putData:t.map(e=>e.putM.length>2?e.putM[2]:[0,0,0])}),(0,wt().jsx)("h2",{children:"Level 4:"}),(0,wt().jsx)(ree,{x:n,callData:t.map(e=>e.callM.length>3?e.callM[3]:[0,0,0]),putData:t.map(e=>e.putM.length>3?e.putM[3]:[0,0,0])})]})}function oee(){const[e,t]=(0,St().useState)(()=>"2024-04-01"),n=(0,St().useCallback)(async t=>await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=`${qu}/qqqVolData?dt=${e}`;return await tc(n,t)}(e,t),[e]);return(0,wt().jsxs)("main",{style:{flex:1,width:"80vw"},children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Select Date:"}),(0,wt().jsx)("input",{type:"date",value:e,onChange:e=>t(e.target.value)})]}),(0,wt().jsx)(Sd,{getter:n,cvt:e=>(0,wt().jsx)(iee,{data:e})})]})}function aee(e){return(0,qe().Ay)("MuiTableContainer",e)}(0,Ze().A)("MuiTableContainer",["root"]);const see=["className","component"],lee=(0,H().Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),uee=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableContainer"}),{className:r,component:i="div"}=n,o=(0,jt().A)(n,see),a=(0,Dt().A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},aee,t)})(a);return(0,wt().jsx)(lee,(0,Dt().A)({ref:t,as:i,className:(0,Pt().A)(s.root,r),ownerState:a},o))});const cee=St().createContext();function dee(e){return(0,qe().Ay)("MuiTableHead",e)}(0,Ze().A)("MuiTableHead",["root"]);const hee=["className","component"],pee=(0,H().Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),fee={variant:"head"},gee="thead",mee=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableHead"}),{className:r,component:i=gee}=n,o=(0,jt().A)(n,hee),a=(0,Dt().A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},dee,t)})(a);return(0,wt().jsx)(cee.Provider,{value:fee,children:(0,wt().jsx)(pee,(0,Dt().A)({as:i,className:(0,Pt().A)(s.root,r),ref:t,role:i===gee?null:"rowgroup",ownerState:a},o))})});const vee=St().createContext();function yee(e){return(0,qe().Ay)("MuiTableCell",e)}const xee=(0,Ze().A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),bee=["align","className","component","padding","scope","size","sortDirection","variant"],wee=(0,H().Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,U().A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,U().A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,U().A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n    ${"light"===t.palette.mode?(0,pe().a)((0,pe().X4)(t.palette.divider,1),.88):(0,pe().e$)((0,pe().X4)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",[`&.${xee.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})}),See=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableCell"}),{align:r="inherit",className:i,component:o,padding:a,scope:s,size:l,sortDirection:u,variant:c}=n,d=(0,jt().A)(n,bee),h=St().useContext(vee),p=St().useContext(cee),f=p&&"head"===p.variant;let g;g=o||(f?"th":"td");let m=s;"td"===g?m=void 0:!m&&f&&(m="col");const v=c||p&&p.variant,y=(0,Dt().A)({},n,{align:r,component:g,padding:a||(h&&h.padding?h.padding:"normal"),size:l||(h&&h.size?h.size:"medium"),sortDirection:u,stickyHeader:"head"===v&&h&&h.stickyHeader,variant:v}),x=(e=>{const{classes:t,variant:n,align:r,padding:i,size:o,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader","inherit"!==r&&`align${(0,U().A)(r)}`,"normal"!==i&&`padding${(0,U().A)(i)}`,`size${(0,U().A)(o)}`]};return(0,$e().A)(s,yee,t)})(y);let b=null;return u&&(b="asc"===u?"ascending":"descending"),(0,wt().jsx)(wee,(0,Dt().A)({as:g,ref:t,className:(0,Pt().A)(x.root,i),"aria-sort":b,scope:m,ownerState:y},d))}),_ee=See;function Aee(e){return(0,qe().Ay)("MuiTableBody",e)}(0,Ze().A)("MuiTableBody",["root"]);const kee=["className","component"],Cee=(0,H().Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),Mee={variant:"body"},Iee="tbody",Tee=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableBody"}),{className:r,component:i=Iee}=n,o=(0,jt().A)(n,kee),a=(0,Dt().A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},Aee,t)})(a);return(0,wt().jsx)(cee.Provider,{value:Mee,children:(0,wt().jsx)(Cee,(0,Dt().A)({className:(0,Pt().A)(s.root,r),as:i,ref:t,role:i===Iee?null:"rowgroup",ownerState:a},o))})});function Dee(e){return(0,qe().Ay)("MuiTableRow",e)}const jee=(0,Ze().A)("MuiTableRow",["root","selected","hover","head","footer"]),Pee=["className","component","hover","selected"],Lee=(0,H().Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${jee.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${jee.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}}),Ree="tr",Eee=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableRow"}),{className:r,component:i=Ree,hover:o=!1,selected:a=!1}=n,s=(0,jt().A)(n,Pee),l=St().useContext(cee),u=(0,Dt().A)({},n,{component:i,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant}),c=(e=>{const{classes:t,selected:n,hover:r,head:i,footer:o}=e,a={root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]};return(0,$e().A)(a,Dee,t)})(u);return(0,wt().jsx)(Lee,(0,Dt().A)({as:i,ref:t,className:(0,Pt().A)(c.root,r),role:i===Ree?null:"row",ownerState:u},s))}),Nee=Eee,Oee={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const zee=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;return e.length===t.length&&e.every((e,r)=>n(e,t[r]))};function Bee(e,t){return e-t}function Fee(e,t){var n;const{index:r}=null!=(n=e.reduce((e,n,r)=>{const i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e},null))?n:{};return r}function $ee(e,t){if(void 0!==t.current&&e.changedTouches){const n=e;for(let e=0;e<n.changedTouches.length;e+=1){const r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Vee(e,t,n){return 100*(e-t)/(n-t)}function Wee(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}function Hee(e){let{values:t,newValue:n,index:r}=e;const i=t.slice();return i[r]=n,i.sort(Bee)}function Gee(e){let{sliderRef:t,activeIndex:n,setActive:r}=e;var i,o;const a=(0,et().A)(t.current);var s;null!=(i=t.current)&&i.contains(a.activeElement)&&Number(null==a||null==(o=a.activeElement)?void 0:o.getAttribute("data-index"))===n||(null==(s=t.current)||s.querySelector(`[type="range"][data-index="${n}"]`).focus());r&&r(n)}function Uee(e,t){return"number"===typeof e&&"number"===typeof t?e===t:"object"===typeof e&&"object"===typeof t&&zee(e,t)}const Xee={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Yee=e=>e;let qee;function Zee(){return void 0===qee&&(qee="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),qee}function Kee(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:a=!1,max:s=100,min:l=0,name:u,onChange:c,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=Yee,step:g=1,shiftStep:m=10,tabIndex:v,value:y}=e,x=St().useRef(void 0),[b,w]=St().useState(-1),[S,_]=St().useState(-1),[A,k]=St().useState(!1),C=St().useRef(0),[M,I]=(0,at().A)({controlled:y,default:null!=n?n:l,name:"Slider"}),T=c&&((e,t,n)=>{const r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:u}}),c(i,t,n)}),D=Array.isArray(M);let j=D?M.slice().sort(Bee):[M];j=j.map(e=>null==e?l:(0,Be().A)(e,l,s));const P=!0===a&&null!==g?[...Array(Math.floor((s-l)/g)+1)].map((e,t)=>({value:l+g*t})):a||[],L=P.map(e=>e.value),{isFocusVisibleRef:R,onBlur:E,onFocus:N,ref:O}=(0,dt().A)(),[z,B]=St().useState(-1),F=St().useRef(null),$=(0,ut().A)(O,F),V=(0,ut().A)(p,$),W=e=>t=>{var n;const r=Number(t.currentTarget.getAttribute("data-index"));N(t),!0===R.current&&B(r),_(r),null==e||null==(n=e.onFocus)||n.call(e,t)},H=e=>t=>{var n;E(t),!1===R.current&&B(-1),_(-1),null==e||null==(n=e.onBlur)||n.call(e,t)},G=(e,t)=>{const n=Number(e.currentTarget.getAttribute("data-index")),r=j[n],o=L.indexOf(r);let a=t;if(P&&null==g){const e=L[L.length-1];a=a>e?e:a<L[0]?L[0]:a<r?L[o-1]:L[o+1]}if(a=(0,Be().A)(a,l,s),D){i&&(a=(0,Be().A)(a,j[n-1]||-1/0,j[n+1]||1/0));const e=a;a=Hee({values:j,newValue:a,index:n});let t=n;i||(t=a.indexOf(e)),Gee({sliderRef:F,activeIndex:t})}I(a),B(n),T&&!Uee(a,M)&&T(e,a,n),d&&d(e,a)},U=e=>t=>{var n;if(null!==g){const e=Number(t.currentTarget.getAttribute("data-index")),n=j[e];let r=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?r=Math.max(n-m,l):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(r=Math.min(n+m,s)),null!==r&&(G(t,r),t.preventDefault())}null==e||null==(n=e.onKeyDown)||n.call(e,t)};(0,st().A)(()=>{var e;r&&F.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())},[r]),r&&-1!==b&&w(-1),r&&-1!==z&&B(-1);const X=St().useRef(void 0);let Y=h;o&&"horizontal"===h&&(Y+="-reverse");const q=e=>{let{finger:t,move:n=!1}=e;const{current:r}=F,{width:o,height:a,bottom:u,left:c}=r.getBoundingClientRect();let d,h;if(d=0===Y.indexOf("vertical")?(u-t.y)/a:(t.x-c)/o,-1!==Y.indexOf("-reverse")&&(d=1-d),h=function(e,t,n){return(n-t)*e+t}(d,l,s),g)h=Wee(h,g,l);else{const e=Fee(L,h);h=L[e]}h=(0,Be().A)(h,l,s);let p=0;if(D){p=n?X.current:Fee(j,h),i&&(h=(0,Be().A)(h,j[p-1]||-1/0,j[p+1]||1/0));const e=h;h=Hee({values:j,newValue:h,index:p}),i&&n||(p=h.indexOf(e),X.current=p)}return{newValue:h,activeIndex:p}},Z=(0,lt().A)(e=>{const t=$ee(e,x);if(!t)return;if(C.current+=1,"mousemove"===e.type&&0===e.buttons)return void K(e);const{newValue:n,activeIndex:r}=q({finger:t,move:!0});Gee({sliderRef:F,activeIndex:r,setActive:w}),I(n),!A&&C.current>2&&k(!0),T&&!Uee(n,M)&&T(e,n,r)}),K=(0,lt().A)(e=>{const t=$ee(e,x);if(k(!1),!t)return;const{newValue:n}=q({finger:t,move:!0});w(-1),"touchend"===e.type&&_(-1),d&&d(e,n),x.current=void 0,J()}),Q=(0,lt().A)(e=>{if(r)return;Zee()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const n=$ee(e,x);if(!1!==n){const{newValue:t,activeIndex:r}=q({finger:n});Gee({sliderRef:F,activeIndex:r,setActive:w}),I(t),T&&!Uee(t,M)&&T(e,t,r)}C.current=0;const i=(0,et().A)(F.current);i.addEventListener("touchmove",Z,{passive:!0}),i.addEventListener("touchend",K,{passive:!0})}),J=St().useCallback(()=>{const e=(0,et().A)(F.current);e.removeEventListener("mousemove",Z),e.removeEventListener("mouseup",K),e.removeEventListener("touchmove",Z),e.removeEventListener("touchend",K)},[K,Z]);St().useEffect(()=>{const{current:e}=F;return e.addEventListener("touchstart",Q,{passive:Zee()}),()=>{e.removeEventListener("touchstart",Q),J()}},[J,Q]),St().useEffect(()=>{r&&J()},[r,J]);const ee=Vee(D?j[0]:l,l,s),te=Vee(j[j.length-1],l,s)-ee,ne=e=>t=>{var n;null==(n=e.onMouseLeave)||n.call(e,t),_(-1)};return{active:b,axis:Y,axisProps:Xee,dragging:A,focusedThumbIndex:z,getHiddenInputProps:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var i;const a=wa(n),c={onChange:(d=a||{},e=>{var t;null==(t=d.onChange)||t.call(d,e),G(e,e.target.valueAsNumber)}),onFocus:W(a||{}),onBlur:H(a||{}),onKeyDown:U(a||{})};var d;const p=(0,Dt().A)({},a,c);return(0,Dt().A)({tabIndex:v,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(s),"aria-valuemin":f(l),name:u,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(i=e.step)?i:void 0,disabled:r},n,p,{style:(0,Dt().A)({},Oee,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=wa(e),n={onMouseDown:(i=t||{},e=>{var t;if(null==(t=i.onMouseDown)||t.call(i,e),r)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const n=$ee(e,x);if(!1!==n){const{newValue:t,activeIndex:r}=q({finger:n});Gee({sliderRef:F,activeIndex:r,setActive:w}),I(t),T&&!Uee(t,M)&&T(e,t,r)}C.current=0;const o=(0,et().A)(F.current);o.addEventListener("mousemove",Z,{passive:!0}),o.addEventListener("mouseup",K)})};var i;const o=(0,Dt().A)({},t,n);return(0,Dt().A)({},e,{ref:V},o)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=wa(e),n={onMouseOver:(r=t||{},e=>{var t;null==(t=r.onMouseOver)||t.call(r,e);const n=Number(e.currentTarget.getAttribute("data-index"));_(n)}),onMouseLeave:ne(t||{})};var r;return(0,Dt().A)({},e,t,n)},marks:P,open:S,range:D,rootRef:V,trackLeap:te,trackOffset:ee,values:j,getThumbStyle:e=>({pointerEvents:-1!==b&&b!==e?"none":void 0})}}const Qee=e=>!e||!eo(e);function Jee(e){return(0,qe().Ay)("MuiSlider",e)}const ete=(0,Ze().A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);const tte=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function nte(e){return e}const rte=(0,H().Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,U().A)(n.color)}`],"medium"!==n.size&&t[`size${(0,U().A)(n.size)}`],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})(e=>{let{theme:t}=e;var n;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${ete.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${ete.dragging}`]:{[`& .${ete.thumb}, & .${ete.track}`]:{transition:"none"}},variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter(e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main}).map(e=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),ite=(0,H().Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ote=(0,H().Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;var n;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(n=t.vars)?n:t).palette).filter(e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main}).map(e=>({props:{color:e,track:"inverted"},style:(0,Dt().A)({},t.vars?{backgroundColor:t.vars.palette.Slider[`${e}Track`],borderColor:t.vars.palette.Slider[`${e}Track`]}:(0,Dt().A)({backgroundColor:(0,pe().a)(t.palette[e].main,.62),borderColor:(0,pe().a)(t.palette[e].main,.62)},t.applyStyles("dark",{backgroundColor:(0,pe().e$)(t.palette[e].main,.5)}),t.applyStyles("dark",{borderColor:(0,pe().e$)(t.palette[e].main,.5)})))}))]}}),ate=(0,H().Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${(0,U().A)(n.color)}`],"medium"!==n.size&&t[`thumbSize${(0,U().A)(n.size)}`]]}})(e=>{let{theme:t}=e;var n;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${ete.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys((null!=(n=t.vars)?n:t).palette).filter(e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main}).map(e=>({props:{color:e},style:{[`&:hover, &.${ete.focusVisible}`]:(0,Dt().A)({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[e].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,pe().X4)(t.palette[e].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${ete.active}`]:(0,Dt().A)({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[e].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${(0,pe().X4)(t.palette[e].main,.16)}`})}}))]}}),ste=(0,H().Ay)(function(e){const{children:t,className:n,value:r}=e,i=(e=>{const{open:t}=e;return{offset:(0,Pt().A)(t&&ete.valueLabelOpen),circle:ete.valueLabelCircle,label:ete.valueLabelLabel}})(e);return t?St().cloneElement(t,{className:(0,Pt().A)(t.props.className)},(0,wt().jsxs)(St().Fragment,{children:[t.props.children,(0,wt().jsx)("span",{className:(0,Pt().A)(i.offset,n),"aria-hidden":!0,children:(0,wt().jsx)("span",{className:i.circle,children:(0,wt().jsx)("span",{className:i.label,children:r})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(e=>{let{theme:t}=e;return(0,Dt().A)({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${ete.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${ete.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})}),lte=(0,H().Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,W().A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(e=>{let{theme:t}=e;return{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}}),ute=(0,H().Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,W().A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})(e=>{let{theme:t}=e;return(0,Dt().A)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})}),cte=e=>{let{children:t}=e;return t},dte=St().forwardRef(function(e,t){var n,r,i,o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,S,A,k,C;const M=(0,_().b)({props:e,name:"MuiSlider"}),I=xa(),{"aria-label":T,"aria-valuetext":D,"aria-labelledby":j,component:P="span",components:L={},componentsProps:R={},color:E="primary",classes:N,className:O,disableSwap:z=!1,disabled:B=!1,getAriaLabel:F,getAriaValueText:$,marks:V=!1,max:W=100,min:H=0,orientation:G="horizontal",shiftStep:X=10,size:Y="medium",step:q=1,scale:Z=nte,slotProps:K,slots:Q,track:J="normal",valueLabelDisplay:ee="off",valueLabelFormat:te=nte}=M,ne=(0,jt().A)(M,tte),re=(0,Dt().A)({},M,{isRtl:I,max:W,min:H,classes:N,disabled:B,disableSwap:z,orientation:G,marks:V,color:E,size:Y,step:q,shiftStep:X,scale:Z,track:J,valueLabelDisplay:ee,valueLabelFormat:te}),{axisProps:ie,getRootProps:oe,getHiddenInputProps:ae,getThumbProps:se,open:le,active:ue,axis:ce,focusedThumbIndex:de,range:he,dragging:pe,marks:fe,values:ge,trackOffset:me,trackLeap:ve,getThumbStyle:ye}=Kee((0,Dt().A)({},re,{rootRef:t}));re.marked=fe.length>0&&fe.some(e=>e.label),re.dragging=pe,re.focusedThumbIndex=de;const xe=(e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:a,color:s,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===i&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",s&&`color${(0,U().A)(s)}`,l&&`size${(0,U().A)(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${(0,U().A)(l)}`,s&&`thumbColor${(0,U().A)(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,$e().A)(u,Jee,a)})(re),be=null!=(n=null!=(r=null==Q?void 0:Q.root)?r:L.Root)?n:rte,we=null!=(i=null!=(o=null==Q?void 0:Q.rail)?o:L.Rail)?i:ite,Se=null!=(a=null!=(s=null==Q?void 0:Q.track)?s:L.Track)?a:ote,_e=null!=(l=null!=(u=null==Q?void 0:Q.thumb)?u:L.Thumb)?l:ate,Ae=null!=(c=null!=(d=null==Q?void 0:Q.valueLabel)?d:L.ValueLabel)?c:ste,ke=null!=(h=null!=(p=null==Q?void 0:Q.mark)?p:L.Mark)?h:lte,Ce=null!=(f=null!=(g=null==Q?void 0:Q.markLabel)?g:L.MarkLabel)?f:ute,Me=null!=(m=null!=(v=null==Q?void 0:Q.input)?v:L.Input)?m:"input",Ie=null!=(y=null==K?void 0:K.root)?y:R.root,Te=null!=(x=null==K?void 0:K.rail)?x:R.rail,De=null!=(b=null==K?void 0:K.track)?b:R.track,je=null!=(w=null==K?void 0:K.thumb)?w:R.thumb,Pe=null!=(S=null==K?void 0:K.valueLabel)?S:R.valueLabel,Le=null!=(A=null==K?void 0:K.mark)?A:R.mark,Re=null!=(k=null==K?void 0:K.markLabel)?k:R.markLabel,Ee=null!=(C=null==K?void 0:K.input)?C:R.input,Ne=Ca({elementType:be,getSlotProps:oe,externalSlotProps:Ie,externalForwardedProps:ne,additionalProps:(0,Dt().A)({},Qee(be)&&{as:P}),ownerState:(0,Dt().A)({},re,null==Ie?void 0:Ie.ownerState),className:[xe.root,O]}),Oe=Ca({elementType:we,externalSlotProps:Te,ownerState:re,className:xe.rail}),ze=Ca({elementType:Se,externalSlotProps:De,additionalProps:{style:(0,Dt().A)({},ie[ce].offset(me),ie[ce].leap(ve))},ownerState:(0,Dt().A)({},re,null==De?void 0:De.ownerState),className:xe.track}),Be=Ca({elementType:_e,getSlotProps:se,externalSlotProps:je,ownerState:(0,Dt().A)({},re,null==je?void 0:je.ownerState),className:xe.thumb}),Fe=Ca({elementType:Ae,externalSlotProps:Pe,ownerState:(0,Dt().A)({},re,null==Pe?void 0:Pe.ownerState),className:xe.valueLabel}),Ve=Ca({elementType:ke,externalSlotProps:Le,ownerState:re,className:xe.mark}),We=Ca({elementType:Ce,externalSlotProps:Re,ownerState:re,className:xe.markLabel}),He=Ca({elementType:Me,getSlotProps:ae,externalSlotProps:Ee,ownerState:re});return(0,wt().jsxs)(be,(0,Dt().A)({},Ne,{children:[(0,wt().jsx)(we,(0,Dt().A)({},Oe)),(0,wt().jsx)(Se,(0,Dt().A)({},ze)),fe.filter(e=>e.value>=H&&e.value<=W).map((e,t)=>{const n=Vee(e.value,H,W),r=ie[ce].offset(n);let i;return i=!1===J?-1!==ge.indexOf(e.value):"normal"===J&&(he?e.value>=ge[0]&&e.value<=ge[ge.length-1]:e.value<=ge[0])||"inverted"===J&&(he?e.value<=ge[0]||e.value>=ge[ge.length-1]:e.value>=ge[0]),(0,wt().jsxs)(St().Fragment,{children:[(0,wt().jsx)(ke,(0,Dt().A)({"data-index":t},Ve,!eo(ke)&&{markActive:i},{style:(0,Dt().A)({},r,Ve.style),className:(0,Pt().A)(Ve.className,i&&xe.markActive)})),null!=e.label?(0,wt().jsx)(Ce,(0,Dt().A)({"aria-hidden":!0,"data-index":t},We,!eo(Ce)&&{markLabelActive:i},{style:(0,Dt().A)({},r,We.style),className:(0,Pt().A)(xe.markLabel,We.className,i&&xe.markLabelActive),children:e.label})):null]},t)}),ge.map((e,t)=>{const n=Vee(e,H,W),r=ie[ce].offset(n),i="off"===ee?cte:Ae;return(0,wt().jsx)(i,(0,Dt().A)({},!eo(i)&&{valueLabelFormat:te,valueLabelDisplay:ee,value:"function"===typeof te?te(Z(e),t):te,index:t,open:le===t||ue===t||"on"===ee,disabled:B},Fe,{children:(0,wt().jsx)(_e,(0,Dt().A)({"data-index":t},Be,{className:(0,Pt().A)(xe.thumb,Be.className,ue===t&&xe.active,de===t&&xe.focusVisible),style:(0,Dt().A)({},r,ye(t),Be.style),children:(0,wt().jsx)(Me,(0,Dt().A)({"data-index":t,"aria-label":F?F(t):T,"aria-valuenow":Z(e),"aria-labelledby":j,"aria-valuetext":$?$(Z(e),t):D,value:ge[t]},He))}))}),t)})]}))}),hte=dte;function pte(e,t){let n=0;return St().Children.map(e,e=>St().isValidElement(e)?t(e,n++):e)}function fte(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(1e3*r)/1e3}function gte(e,t){let{min:n,now:r,max:i,label:o,visuallyHidden:a,striped:s,animated:l,className:u,style:c,variant:d,bsPrefix:h,...p}=e;return(0,wt().jsx)("div",{ref:t,...p,role:"progressbar",className:l4()(u,`${h}-bar`,{[`bg-${d}`]:d,[`${h}-bar-animated`]:l,[`${h}-bar-striped`]:l||s}),style:{width:`${fte(r,n,i)}%`,...c},"aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":i,children:a?(0,wt().jsx)("span",{className:"visually-hidden",children:o}):o})}const mte=St().forwardRef((e,t)=>{let{isChild:n=!1,...r}=e;const i={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...r};if(i.bsPrefix=f4(i.bsPrefix,"progress"),n)return gte(i,t);const{min:o,now:a,max:s,label:l,visuallyHidden:u,striped:c,animated:d,bsPrefix:h,variant:p,className:f,children:g,...m}=i;return(0,wt().jsx)("div",{ref:t,...m,className:l4()(f,h),children:g?pte(g,e=>(0,St().cloneElement)(e,{isChild:!0})):gte({min:o,now:a,max:s,label:l,visuallyHidden:u,striped:c,animated:d,bsPrefix:h,variant:p},t)})});mte.displayName="ProgressBar";const vte=mte;function yte(e){var t=null;switch(e){case 0:t="\u672a\u5f00\u59cb";break;case-1:t="\u5931\u8d25";break;case 200:t="\u5b8c\u6210"}return t}function xte(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)("");return t?(0,wt().jsxs)("div",{children:[(0,wt().jsx)("textarea",{value:r,onChange:e=>{i(e.target.value)}}),(0,wt().jsx)("button",{onClick:()=>{const t=new Set;Array.from(r.matchAll(/20\d\d-(0[1-9]|1[0-2])-[0-3]\d/g)).map(e=>e[0]).forEach(e=>{t.add(e)}),n(!1),e.setDates(Array.from(t.keys()).sort())},children:"\u786e\u5b9a"})]}):(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:e.dates.map(e=>(0,wt().jsx)(u5,{label:e,variant:"outlined"}))}),(0,wt().jsx)("div",{children:(0,wt().jsx)("button",{onClick:()=>{i(e.dates.join(",")),n(!0)},children:"\u7f16\u8f91"})})]})}function bte(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)([null,null]),[i,o]=(0,St().useState)([1,30,!0]),[a,s]=(0,St().useState)(1),[l,u]=(0,St().useState)(null),[c,d]=(0,St().useState)(null),[h,p]=(0,St().useState)(null),f=()=>p(null),g=()=>d(null),m=()=>{null!=h&&async function(e,t){const n=new URLSearchParams;n.set("command","update"),n.set("uid",e),n.set("desc",t);const r=`${qu}/backtest?${n.toString()}`;return!("err"in await tc(r))}(h[0],h[1]).then(e=>{e&&(t(null),o(e=>[e[0],e[1],!e[2]])),p(null)})},v=()=>{if(null!=c){const r=c.taskConfig.stock.split(",").map(e=>e.replace(/\s+/g,"")).filter(e=>e.length>0);if(r.length>0){var e,n;const i={};c.taskConfig.buyParams.forEach(e=>{i[e.key]=e.default});const a={};c.taskConfig.sellParams.forEach(e=>{a[e.key]=e.default});const s={};null===(e=c.taskConfig.sellParamsEnd)||void 0===e||e.forEach(e=>{s[e.key]=e.default});xc({name:null!==(n=c.name)&&void 0!==n&&n.length?c.name:c.taskConfig.stock+"-"+c.taskConfig.buyAlgorithm,desc:(c.desc||"")+(null!=c.dates?";\u591a\u4e2a\u65e5\u671f":""),startDate:c.startDate,endDate:c.endDate,needQuote:!1,configs:[{stocks:r,buyAlgorithm:c.taskConfig.buyAlgorithm,buyParams:i,sellAlgorithm:c.taskConfig.sellAlgorithm,sellParams:a,sellParamsEnd:s,origin:[[c.taskConfig.buyAlgorithm,c.taskConfig.buyParams],[c.taskConfig.sellAlgorithm,c.taskConfig.sellParams,c.taskConfig.sellParamsEnd]]}]},c.dates).then(e=>{e&&(t(null),o(e=>[1,e[1],e[2]])),d(null)})}}};if((0,St().useEffect)(()=>{const e=new AbortController;return fc(e.signal).then(e=>{"err"in e||u(e)}),()=>{e.abort()}},[]),(0,St().useEffect)(()=>{const e=new AbortController,r=e.signal;return async function(e,t,n,r,i){const o=new URLSearchParams;o.set("command","list"),o.set("page",n+""),o.set("pageNum",r+""),null!=e&&o.set("buyAlgorithm",e),null!=t&&o.set("sellAlgorithm",t);const a=`${qu}/backtest?${o.toString()}`,s=await tc(a,i);if("err"in s)return s;if("data"in s&&"total"in s){const e=s.data.map(e=>({...e,params:"params"in e?JSON.parse(e.params):void 0}));return{total:s.total,data:e}}return{err:"data not found"}}(n[0],n[1],i[0]-1,i[1],r).then(e=>{r.aborted||("err"in e?t(e):(t(e.data),s(e.total)))}),()=>{e.abort()}},[i,n]),(0,St().useEffect)(()=>{if(null!=e&&!("err"in e)&&e.filter(e=>e.status>=0&&e.status<=100).length>0){const n=new AbortController,r=n.signal,i=e[0].uid,o=()=>async function(e,t){const n=`${qu}/backtest?command=status&uid=${e}`,r=await tc(n,t);return"err"in r?r:"data"in r?r.data:{err:"data not found"}}(i,r).then(e=>{"err"in e||r.aborted||t(t=>null==t||"err"in t?t:t.map(t=>t.uid in e?{...t,status:e[t.uid]}:t))});return setTimeout(o,1e4),()=>{n.abort()}}},[e]),null==e)return(0,wt().jsx)(wd,{});if("err"in e)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",e.err]})});{const s=(new Date).getTime();return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:!!l&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(yu,{variant:"outlined",onClick:e=>{const t=l.find(e=>e.isBuy),n=l.find(e=>!e.isBuy);null!=t&&null!=n&&d({startDate:cc(s-15552e6),endDate:cc(s),taskConfig:{stock:"",buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params}})},children:"New Task"}),(0,wt().jsx)("span",{children:"Buy Algorithm:"}),(0,wt().jsx)("select",{value:n[0]||"",onChange:e=>{r(t=>[e.target.value,t[1]])},children:l.filter(e=>e.isBuy).map(e=>(0,wt().jsx)("option",{value:e.id,children:e.id},e.id))}),(0,wt().jsx)("span",{children:"Sell Algorithm:"}),(0,wt().jsx)("select",{value:n[1]||"",onChange:e=>{r(t=>[t[0],e.target.value])},children:l.filter(e=>!e.isBuy).map(e=>(0,wt().jsx)("option",{value:e.id,children:e.id},e.id))}),(0,wt().jsx)(yu,{variant:"outlined",onClick:()=>{r([null,null])},children:"Reset"})]})}),(0,wt().jsx)("div",{children:(0,wt().jsx)(H9,{count:Math.ceil(a/i[1]),page:i[0],onChange:(e,t)=>{o(e=>[t,e[1],e[2]])}})}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"ID"}),(0,wt().jsx)("td",{children:"Inspect"}),(0,wt().jsx)("td",{children:"\u540d\u79f0"}),(0,wt().jsx)("td",{children:"\u5907\u6ce8"}),(0,wt().jsx)("td",{children:"\u65e5\u671f"}),(0,wt().jsx)("td",{children:"\u5f00\u59cb\u65f6\u95f4"}),(0,wt().jsx)("td",{children:"\u7ed3\u675f\u65f6\u95f4"}),(0,wt().jsx)("td",{children:"\u6536\u76ca\u7387"}),(0,wt().jsx)("td",{children:"\u72b6\u6001"}),(0,wt().jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,wt().jsx)("tbody",{children:e.map(e=>{const n=e.params;return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:200===e.status?(0,wt().jsx)(Ci,{to:`/backtest/${e.uid}`,children:e.uid}):e.uid}),(0,wt().jsx)("td",{children:null!=e.params&&200===e.status?(0,wt().jsx)(Ci,{to:`/backtest/${e.uid}/signal_inspect?startDate=${e.params.startDate}&endDate=${e.params.endDate}&symbol=${e.params.stocks[0]}&strategy=energy&filterPositive=false&strategy2=${e.params.buyAlgorithm}`,children:"Inspect"}):"-"}),(0,wt().jsx)("td",{children:e.name}),(0,wt().jsx)("td",{children:e.desc.split("\n").filter(e=>e.length>0).map(e=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("span",{children:e}),(0,wt().jsx)("br",{})]}))}),(0,wt().jsx)("td",{children:cc(1e3*e.create_date,!1,!0,!1)}),(0,wt().jsx)("td",{children:e.start_date}),(0,wt().jsx)("td",{children:e.end_date}),(0,wt().jsx)("td",{children:(0,wt().jsxs)("span",{style:{color:e.increase>1?"green":"red"},children:[(100*e.increase).toFixed(2),"%"]})}),(0,wt().jsxs)("td",{children:[yte(e.status)||(0,wt().jsx)(vte,{animated:!0,label:e.status+"%",now:e.status}),e.status>=0&&e.status<=100&&(0,wt().jsx)(K8,{msg:"\u505c\u6b62\u4efb\u52a1",callBack:n=>{(async function(e){const t=`${qu}/backtest?command=cancel&uid=${e}`,n=await tc(t);return"err"in n?n:"s"in n?n.s:{err:"data not found"}})(e.uid).then(e=>{const r="boolean"===typeof e&&!0===e;n("\u64cd\u4f5c"+(r?"\u6210\u529f":"\u5931\u8d25")+"!"),r&&Xu(1e3).then(e=>{t(null),o(e=>[1,e[1],e[2]])})})}})]}),(0,wt().jsxs)("td",{children:[(0,wt().jsx)(yu,{variant:"outlined",onClick:()=>{p([e.uid,e.desc])},children:"\u4fee\u6539\u5907\u6ce8"}),null!=n&&null!=l&&(0,wt().jsx)(yu,{variant:"outlined",style:{marginLeft:"10px"},onClick:()=>{null!=n&&d({dates:n.dates,startDate:n.startDate,endDate:n.endDate,taskConfig:{stock:n.stocks.join(","),buyAlgorithm:n.buyAlgorithm,buyParams:l.find(e=>e.id===n.buyAlgorithm).params.map(e=>e.key in n.buyParams?{...e,default:n.buyParams[e.key]}:e),sellAlgorithm:n.sellAlgorithm,sellParams:l.find(e=>e.id===n.sellAlgorithm).params.map(e=>e.key in n.sellParams?{...e,default:n.sellParams[e.key]}:e)}})},children:"\u590d\u5236\u4efb\u52a1"})]})]},e.uid)})})]}),(0,wt().jsxs)(K6,{show:null!=c,onHide:g,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Start Task"})}),(0,wt().jsx)(K6.Body,{children:l&&c?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Input Name: "}),(0,wt().jsx)("input",{value:c.name,onChange:e=>{d(t=>null==t?t:{...t,name:e.target.value})}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Input Description: "}),(0,wt().jsx)("textarea",{value:c.desc,onChange:e=>{d(t=>null==t?t:{...t,desc:e.target.value})}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u65f6\u95f4\u533a\u95f4"}),(0,wt().jsx)(J5,{checked:null!=c.dates,onChange:e=>{d(t=>null==t?t:{...t,dates:e.target.checked?[]:void 0})}}),(0,wt().jsx)("span",{children:"\u591a\u4e2a\u65e5\u671f"})]}),null==c.dates?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Start Date: "}),(0,wt().jsx)("input",{value:c.startDate,type:"date",onChange:e=>{d(t=>null!=t?{...t,startDate:e.target.value}:t)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"End Date: "}),(0,wt().jsx)("input",{value:c.endDate,type:"date",onChange:e=>{d(t=>null!=t?{...t,endDate:e.target.value}:t)}})]})]}):(0,wt().jsx)(xte,{dates:c.dates,setDates:e=>d(t=>null==t?t:{...t,dates:e})}),(0,wt().jsx)(y3,{}),(0,wt().jsx)(B8,{taskConfigs:l,taskConfig:c.taskConfig,setTaskConfig:e=>{d(t=>null==t?null:{...t,taskConfig:e(t.taskConfig)})}})]}):(0,wt().jsx)("p",{children:"Task configs not loaded"})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{variant:"outlined",color:"secondary",onClick:g,children:"Cancel"}),(0,wt().jsx)(yu,{variant:"outlined",color:"primary",onClick:v,children:"Start"})]})]}),(0,wt().jsxs)(K6,{show:null!=h,onHide:f,children:[(0,wt().jsx)(K6.Header,{children:(0,wt().jsx)(K6.Title,{children:"\u4fee\u6539\u5907\u6ce8"})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5907\u6ce8"}),(0,wt().jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:null!=h?h[1]:"",onChange:e=>{p(t=>null==t?t:[t[0],e.target.value])}})]}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{variant:"outlined",color:"secondary",onClick:f,children:"Cancel"}),(0,wt().jsx)(yu,{variant:"outlined",color:"primary",onClick:m,children:"Submit"})]})]})]})}}function wte(e){const[t,n]=(0,St().useState)(null),r=(0,St().useRef)(null),[i,o]=(0,St().useState)(null),a=U2();return(0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return Qu(e.symbol,e.startDate,e.endDate,1,"day",r).then(e=>{r.aborted||n("err"in e?e:e.results)}),()=>{t.abort()}},[e.startDate,e.endDate,e.symbol]),(0,St().useEffect)(()=>{if(null!=t&&!("err"in t)&&null!=r.current)if(null==i)o(XD(r.current));else{const r=t.map(e=>cc(e.t,!0)),o=t.map(e=>[e.o,e.c,e.l,e.h]),s=t.map(e=>e.v);var n=null;if(e.signals.length>0){const t=new Map;e.signals.forEach(e=>{const n=cc(e.timestamp,!0);t.set(n,[e.strategy])}),n=t}const l=E2(r,o,[],[["volume",s]],[],n,!a);i.setOption(l)}},[i,t,e.signals,a]),null==t?(0,wt().jsx)(wd,{}):"err"in t?(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",t.err]})}):(0,wt().jsx)("div",{ref:r,style:{width:"100%",height:"100%"}})}function Ste(e){let{data:t,isDay:n=!1}=e;const r=(0,St().useRef)(null),[i,o]=(0,St().useState)(null);return(0,St().useEffect)(()=>{if(t.length>0&&null!=r.current)if(null==i)o(XD(r.current));else{const[e,r]=sc(...t.map(e=>e[1])),o=O2(e.map(e=>n?cc(e,!0):nc.format(new Date(e))),[r.map((e,n)=>[t[n][0],e])]);i.setOption(o)}},[t,i,n]),(0,wt().jsx)("div",{ref:r,style:{width:"100%",aspectRatio:"16/9"}})}const _te=864e5;function Ate(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=new Map;var a=new Date(n).getTime();r?a=Math.floor(a/_te-1)*_te:a+=144e5,o.set(a,[t,0]),e.forEach(e=>{if(e.isSell){const t=r?Math.floor(e.timestamp/_te)*_te:e.timestamp,n=Iu(e.symbol),a=null!=i?i:Du(n),s=!0!==e.reverse&&e.price<Tu?0:a,l=o.get(t),u=((!0===e.reverse?-1:1)*(e.price-e.buyPrice)-s)*e.volume,c=s*e.volume;null!=l?o.set(t,[l[0]+u,l[1]+c]):o.set(t,[u,c])}});var s=0,l=0;return Array.from(o.entries()).map(e=>(s+=e[1][0],l+=e[1][1],[e[0],s,l])).sort((e,t)=>e[0]-t[0])}function kte(e){const{lst:t,totalFee:n}=e,r=t.length;if(0===r)return(0,wt().jsx)("p",{children:"Empty Data!"});{const e=cc(t[0][0]+t5),s=e.endsWith("-01"),l=parseInt(s?e:cc(t[0][0]).substring(0,4)),u=parseInt(cc(t[r-1][0]).substring(0,4)),c=new Map;var i="",o=0,a=0;if(t.forEach(t=>{const n=cc(t[0]).substring(0,7);if(n!==i){if(i.length>0){const t=o>0?a/o:0;(!s||i>=e.substring(0,7))&&c.set(i,t),o=a}else o=t[1];i=n,a=t[1]}else a=t[1]}),i.length>0){const e=o>0?a/o:0;c.set(i,e)}const d=Array.from({length:12}).map((e,t)=>t);return(0,wt().jsx)("div",{className:"Container",children:(0,wt().jsx)(uee,{component:Os,children:(0,wt().jsxs)(m4,{"aria-label":"simple table",children:[(0,wt().jsxs)(mee,{children:[(0,wt().jsx)(_ee,{children:"-"},"00"),d.map(e=>(0,wt().jsx)(_ee,{children:`${e+1}\u6708`},"1"+e))]}),(0,wt().jsxs)(Tee,{children:[Array.from({length:u-l+1}).map((e,t)=>{const n=l+t+"";return(0,wt().jsxs)(Nee,{children:[(0,wt().jsx)(_ee,{children:n},"year"),d.map(e=>{const t=n+"-"+(e<9?"0":"")+(e+1),r=c.get(t);return(0,wt().jsx)(_ee,{children:null!=r?(0,wt().jsxs)("p",{style:{color:r>1?"green":"red"},children:[(100*r).toFixed(2),"%"]}):"-"},e+"")})]},t+"")}),(0,wt().jsxs)(Nee,{children:[(0,wt().jsx)(_ee,{children:"\u624b\u7eed\u8d39"},"year"),d.map(e=>(0,wt().jsx)(_ee,{children:e<11?"-":n.toLocaleString()},e+""))]})]})]})})})}}function Cte(e){let{data:t,totalMoney:n,startDate:r,data2:i,dayMerge:o,feeRate:a}=e;var s;const l=Ate(t,n,r,o,a),u=l.map(e=>[e[0],e[1]]),c=l.map(e=>[e[0],e[2]]),d=c.length>0?c[c.length-1][1]:0;if(null!=i){s=[["profit",u],["fee",c],["old",Ate(i,n,r,o).map(e=>[e[0],e[1]])]]}else s=[["profit",u],["fee",c]];return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(kte,{lst:s[0][1],totalFee:d}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(Ste,{data:s,isDay:o})})]})}function Mte(e){const t=e.positions,[n,r]=(0,St().useState)(!0),[i,o]=(0,St().useState)(-1),a=e.totalMM||1e6;var s=0,l=0,u=0,c=0,d=0;if(n){const n=new Map;t.forEach(t=>{var r=0,o=0;t[1].forEach(t=>{if(t.isSell){const a=Math.floor(t.timestamp/t5);if(i===e.nameDates.length){if(0===e.nameDates.filter(e=>e[1].has(a)).length)return}else if(i>=0&&!e.nameDates[i][1].has(a))return;const s=Iu(t.symbol),l=null!=e.feeRate?e.feeRate:Du(s),u=!0!==t.reverse&&t.price<Tu?0:l,c=t.buyPrice*t.volume,d=t.volume*((!0===t.reverse?-1:1)*(t.price-t.buyPrice)-u);r+=c,o+=d;const h=n.get(a);null==h?n.set(a,[d,c]):n.set(a,[d+h[0],c+h[1]])}}),c+=o,d+=r>0?o/r:0}),Array.from(n.entries()).forEach(e=>{const t=e[1][1]>0?e[1][0]/e[1][1]:0;t>Bu?s++:t<-.001?l++:u++})}else t.forEach(t=>{var n=0,r=0;t[1].forEach(t=>{if(t.isSell){n+=t.buyPrice*t.volume;const i=Iu(t.symbol),o=null!=e.feeRate?e.feeRate:Du(i),a=!0!==t.reverse&&t.price<Tu?0:o;r+=t.volume*(t.price-t.buyPrice-a)}}),c+=r;const i=r/n;i>Bu?s++:i<-.001?l++:u++});const h=c/a+1,p=s+l;return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("h3",{children:(0,wt().jsxs)("div",{style:{display:"flex",width:"90%",justifyContent:"space-evenly"},children:[(0,wt().jsxs)("div",{style:{color:"green"},children:[(0,wt().jsx)("span",{children:"Win: "}),(0,wt().jsx)("span",{children:s})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Draw: "}),(0,wt().jsx)("span",{children:u})]}),(0,wt().jsxs)("div",{style:{color:"red"},children:[(0,wt().jsx)("span",{children:"Lose: "}),(0,wt().jsx)("span",{children:l})]}),(0,wt().jsxs)("div",{style:{color:h>1?"green":"red"},children:[(0,wt().jsx)("span",{children:"Rate: "}),(0,wt().jsxs)("span",{children:[(100*h).toFixed(2)+"%","|",(100*d).toFixed(2)+"%"]})]}),null!=e.dates&&(0,wt().jsx)("div",{children:(0,wt().jsxs)("span",{children:["\u573a\u5747\u6536\u76ca:",(p>0?100*d/p:0).toFixed(2),"%(",e.dates,"|",p,") | \u80dc\u7387:",(p>0?100*s/p:0).toFixed(2),"%"]})})]})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u662f\u5426\u6309\u5929\u7edf\u8ba1:"}),(0,wt().jsx)(J5,{checked:n,onChange:e=>r(e.target.checked)})]}),n&&(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u9009\u62e9\u8fc7\u6ee4\u6761\u4ef6:"}),(0,wt().jsxs)("select",{value:i,onChange:e=>{o(parseInt(e.target.value))},children:[(0,wt().jsx)("option",{value:-1,children:"None"},"none"),e.nameDates.map((e,t)=>(0,wt().jsx)("option",{value:t,children:e[0]},t)),(0,wt().jsx)("option",{value:e.nameDates.length,children:"All"},"all")]})]})]})}function Ite(e){const{startDate:t,endDate:n,uid:r,symbol:i}=e,o=(0,St().useCallback)(async e=>await Ec(r,i,t,n,e),[t,n,r,i]);return(0,wt().jsx)(Sd,{getter:o,cvt:t=>(0,wt().jsx)(Mte,{positions:e.positions,nameDates:t,dates:e.dates,totalMM:e.totalM,feeRate:e.feeRate})})}function Tte(e){const{data:t,taskId:n}=e,[r,i]=(0,St().useState)(10),[o,a]=(0,St().useState)(!1),[s,l]=(0,St().useState)(!1),[u,c]=(0,St().useState)(!0),[d,h]=(0,St().useState)(!1),p=1e6;let f=Su(t.positions,p,r,o,!0,d,!1,s),g=dc(f),m=new Map,v=[];v.push(["startDate",t.config.startDate]),v.push(["endDate",t.config.endDate]),null!=t.config.dates&&v.push(["dates",t.config.dates.join(",")]),t.config.configs.forEach(e=>{if(null!=e.origin){e.origin.forEach(e=>{v.push(e[0]),e[1].forEach(e=>{null!=e.realTime&&0!==e.realTime||v.push([e.name,e.default])}),3===e.length&&null!=e[2]&&(v.push(["includeEndDay","true"]),e[2].forEach(e=>{v.push([e.name,e.default])}))})}else v.push(e.buyAlgorithm),v.push(e.sellAlgorithm)}),g.forEach(e=>{const t=e[0].symbol;var n;null!=t&&(m.has(t)||m.set(t,[]),null===(n=m.get(t))||void 0===n||n.push(e[0]))});const y=t.config.configs.map(e=>[e,e.origin]).find(e=>!0);return(0,wt().jsxs)("main",{className:"Container",children:[(0,wt().jsxs)("h2",{style:{color:"grey"},children:["Backtest: ",(0,wt().jsx)("span",{style:{color:"black"},children:t.info.name})," ","Detail"]}),(0,wt().jsx)("p",{children:t.info.desc.split("\n").filter(e=>e.length>0).map(e=>(0,wt().jsxs)(wt().Fragment,{children:[e,(0,wt().jsx)("br",{})]}))}),(0,wt().jsx)("div",{children:(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Name"},"name"),(0,wt().jsx)("td",{children:"Value"},"value")]})}),(0,wt().jsx)("tbody",{children:v.map(e=>"string"==typeof e?(0,wt().jsx)("tr",{children:(0,wt().jsx)("td",{colSpan:2,children:e})},e):(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e[0]},"name"),(0,wt().jsx)("td",{children:e[1]},"value")]},e[0]))})]})}),null!=y&&(0,wt().jsx)(jte,{taskId:n,buyAlgorithm:y[0].buyAlgorithm,symbol:y[0].stocks[0],sellAlgorithm:y[0].sellAlgorithm,buyParams:y[1][0][1],sellParams:y[1][1][1]}),(0,wt().jsx)("div",{}),(0,wt().jsx)("div",{children:(0,wt().jsx)(Ci,{to:`/backtest/${n}/signal_inspect?startDate=${t.config.startDate}&endDate=${t.config.endDate}&symbol=${t.config.configs[0].stocks[0]}&strategy=energy&filterPositive=${d}&strategy2=${t.config.configs[0].buyAlgorithm}`,children:"Energy Inspect"})}),(0,wt().jsx)("div",{children:(0,wt().jsx)(Ci,{to:`/backtest/${n}/log`,children:"Log"})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u53cc\u7a7a\u662f\u5426\u7b49\u91cf\u5f00\u4ed3:"}),(0,wt().jsx)(J5,{checked:s,onChange:e=>{l(e.target.checked)}})]}),(0,wt().jsxs)("div",{style:{width:"90%",margin:"2rem",display:"flex"},children:[(0,wt().jsx)("span",{children:"Buy Percent:"}),(0,wt().jsx)(hte,{defaultValue:10,onChangeCommitted:(e,t)=>{"number"===typeof t&&i(t)},"aria-label":"Default",valueLabelDisplay:"auto"}),(0,wt().jsx)("span",{children:"Double:"}),(0,wt().jsx)(J5,{checked:o,onChange:e=>{a(e.target.checked)}})]}),(0,wt().jsx)(Ite,{positions:g,startDate:t.config.startDate,endDate:t.config.endDate,uid:n,symbol:t.config.configs[0].stocks[0]}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"4/3"},children:(0,wt().jsx)(Cte,{data:f,data2:Su(t.positions,p,r,o,!1,d),totalMoney:p,startDate:t.config.startDate,dayMerge:u})},"profit"),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Merge by Day:"}),(0,wt().jsx)(J5,{checked:u,onChange:e=>{c(e.target.checked)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Hide Positive:"}),(0,wt().jsx)(J5,{checked:d,onChange:e=>{h(e.target.checked)}})]}),Array.from(m.entries()).map(e=>(0,wt().jsxs)("div",{style:{width:"100%",aspectRatio:"4/3",marginTop:"3rem"},children:[(0,wt().jsx)("h3",{children:e[0]}),(0,wt().jsx)(wte,{symbol:e[0],signals:e[1],startDate:t.config.startDate,endDate:t.config.endDate})]},e[0])),(0,wt().jsx)(o8,{data:g})]})}function Dte(){const e=Vr().taskId,t=(0,St().useCallback)(async t=>await gc(e,t),[e]);return(0,wt().jsx)(Sd,{getter:t,cvt:t=>(0,wt().jsx)(Tte,{data:t,taskId:e})})}function jte(e){const{buyAlgorithm:t}=e,[n,r]=(0,St().useState)([!1,""]),[i,o]=(0,St().useState)(null),a=()=>{o(null)},s=()=>{null!=i&&hc("uperset",e.symbol,`${i}-${e.buyAlgorithm}`,Object.fromEntries(e.buyParams.filter(e=>null==e.realTime||0===e.realTime).map(e=>[e.key,e.default])),e.sellAlgorithm,Object.fromEntries(e.sellParams.map(e=>[e.key,e.default])),null,e.taskId,!0).then(e=>{r(e?[!0,"\u540c\u6b65\u6210\u529f!"]:[!0,"\u540c\u6b65\u5931\u8d25!"]),o(null)})},l=(0,St().useCallback)(async e=>{const n=await Ic(null,e);return"err"in n?n:n.filter(e=>e.strategy===t)},[t]);return(0,wt().jsx)(Sd,{getter:l,cvt:e=>e.length>0?(0,wt().jsxs)("div",{children:[(0,wt().jsx)("button",{onClick:()=>o(e[0].rowid+""),children:"\u540c\u6b65\u53c2\u6570"}),(0,wt().jsxs)(K6,{show:null!=i,onHide:a,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:null!=i&&(0,wt().jsx)("select",{value:i,onChange:e=>o(e.target.value),children:e.map(e=>(0,wt().jsx)("option",{value:e.rowid,children:`${e.rowid}-${e.account}-${e.strategy}-${e.desc}`},e.rowid))})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:a,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:s,children:"OK"})]})]}),(0,wt().jsx)(x8,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:n[0],autoHideDuration:2e3,onClose:()=>{r([!1,""])},message:n[1]})]}):(0,wt().jsx)(wt().Fragment,{})})}function Pte(){const e=Vr(),[t,n]=(0,St().useState)(!1),[r]=(0,St().useState)((new Date).getTime()+""),[i,o]=(0,St().useState)(""),[a,s]=(0,St().useState)(""),[l,u]=(0,St().useState)(0),[c,d]=(0,St().useState)(0),[h,p]=(0,St().useState)([]),[f,g]=(0,St().useState)(null);return(0,St().useEffect)(()=>{if(i.length>0){const t=new AbortController,o=t.signal;return n(!0),async function(e,t,n,r,i){const o=`${qu}/backtest?command=log&uid=${e}&key=${t}&keyword=${n}&pos=${r}`,a=await tc(o,i);return"err"in a||"data"in a?a:{err:"data not found"}}(e.taskId,r,i,l,o).then(e=>{"err"in e?g(e):(p(t=>[...t,...e.data]),d(e.pos)),n(!1)}),()=>{t.abort()}}},[e.taskId,i,r,l]),(0,wt().jsxs)("main",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Key words:"}),(0,wt().jsx)(Nl,{id:"outlined-basic",label:"Outlined",variant:"outlined",onChange:e=>{s(e.target.value)}}),(0,wt().jsx)("button",{onClick:e=>{p([]),o(a),u(0)},children:"submit"})]}),(0,wt().jsx)("pre",{children:h.map(e=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("code",{children:[" ","    "+e]}),(0,wt().jsx)("br",{})]}))}),t?(0,wt().jsx)(wd,{}):c>0&&h.length<2e3&&(0,wt().jsx)("button",{onClick:()=>u(c),children:"Load More"})]})}function Lte(e){const{taskId:t}=e,[n,r]=(0,St().useState)([]),i=(0,St().useContext)(V2);return(0,St().useEffect)(()=>{const e=new Map,n=null===i||void 0===i?void 0:i.subscribe("log",t,t=>{const n=t;"reset"===n.command&&e.clear(),Object.entries(n.data).forEach(t=>{const n=t;e.set(n[0],n[1])}),r(Array.from(e.entries()).sort((e,t)=>-e[0].localeCompare(t[0])))});return()=>{null!=n&&(null===i||void 0===i||i.unsubscribe("log",t,n))}},[t,i]),(0,wt().jsx)("div",{children:(0,wt().jsx)("pre",{children:n.flatMap(e=>e[1].map(e=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("code",{children:"    "+e}),(0,wt().jsx)("br",{})]})))})})}function Rte(){const e=Vr();return(0,wt().jsx)("main",{style:{flex:1},children:(0,wt().jsx)(Lte,{taskId:e.taskId})})}function Ete(e){return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{style:{display:!0===e.oneline?"inline-block":"block"},children:[(0,wt().jsxs)("span",{children:[e.name," \u6700\u5c0f\u503c:"]}),(0,wt().jsx)(N8,{type:"number",handleUpdate:t=>e.updater([t,e.range[1]]),value:e.range[0]})]}),(0,wt().jsxs)("div",{style:{display:!0===e.oneline?"inline-block":"block"},children:[(0,wt().jsx)("span",{children:"\u6700\u5927\u503c:"}),(0,wt().jsx)(N8,{type:"number",handleUpdate:t=>e.updater([e.range[0],t]),value:e.range[1]})]})]})}function Nte(e){var t;const{filter:n,setFilter:r,isNew:i}=e;return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(Ete,{range:n.value.vol,oneline:e.oneline,name:"\u9690\u6ce2",updater:e=>r(t=>({...t,value:{...t.value,vol:e}}))}),(0,wt().jsx)(Ete,{range:n.value.increase935,oneline:e.oneline,name:"9:35\u80a1\u4ef7\u6da8\u8dcc\u5e45",updater:e=>r(t=>({...t,value:{...t.value,increase935:e}}))}),(0,wt().jsx)(Ete,{range:n.value.firstHourVR,oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u6210\u4ea4\u91cf\u6392\u540d",updater:e=>r(t=>({...t,value:{...t.value,firstHourVR:e}}))}),!i&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(Ete,{range:n.value.prevDayIncrease,oneline:e.oneline,name:"\u524d\u4e00\u65e5\u6da8\u8dcc\u5e45",updater:e=>r(t=>({...t,value:{...t.value,prevDayIncrease:e}}))}),(0,wt().jsx)(Ete,{range:n.value.prevDayIncrease2,oneline:e.oneline,name:"\u524d\u4e00\u65e5K\u7ebf\u5f62\u6001",updater:e=>r(t=>({...t,value:{...t.value,prevDayIncrease2:e}}))}),(0,wt().jsx)(Ete,{range:n.value.prevDayVR,oneline:e.oneline,name:"\u524d\u4e00\u65e5\u6210\u4ea4\u91cf\u6392\u540d",updater:e=>r(t=>({...t,value:{...t.value,prevDayVR:e}}))}),(0,wt().jsx)(Ete,{range:n.value.volIncrease,oneline:e.oneline,name:"\u9690\u6ce2\u589e\u957f\u7387",updater:e=>r(t=>({...t,value:{...t.value,volIncrease:e}}))}),(0,wt().jsx)(Ete,{range:n.value.firstHourVRIncrease,oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u6210\u4ea4\u91cf\u6392\u540d\u53d8\u5316",updater:e=>r(t=>({...t,value:{...t.value,firstHourVRIncrease:e}}))}),(0,wt().jsx)(Ete,{range:n.value.vixOpen||[10,20],oneline:e.oneline,name:"09:30 VIX\u6307\u6570\u8303\u56f4",updater:e=>r(t=>({...t,value:{...t.value,vixOpen:e}}))}),(0,wt().jsx)(Ete,{range:n.value.vixIncrease||[-1,1],oneline:e.oneline,name:"09:30 VIX\u6307\u6570\u589e\u957f\u7387",updater:e=>r(t=>({...t,value:{...t.value,vixIncrease:e}}))}),(0,wt().jsx)(Ete,{range:n.value.volume||[0,100],oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u9884\u4f30\u5168\u5929\u6210\u4ea4\u91cf(\u5355\u4f4d\u4e3a\u5343\u4e07)",updater:e=>r(t=>({...t,value:{...t.value,volume:e}}))})]}),(0,wt().jsx)(Ete,{range:n.value.vr5||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(09:35)",updater:e=>r(t=>({...t,value:{...t.value,vr5:e}}))}),(0,wt().jsx)(Ete,{range:n.value.vr10||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(09:40)",updater:e=>r(t=>({...t,value:{...t.value,vr10:e}}))}),(0,wt().jsx)(Ete,{range:n.value.vr30||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(10:00)",updater:e=>r(t=>({...t,value:{...t.value,vr30:e}}))}),!i&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(Ete,{range:n.value.vr90||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(11:00)",updater:e=>r(t=>({...t,value:{...t.value,vr90:e}}))}),(0,wt().jsx)(Ete,{range:n.value.vr120||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(11:30)",updater:e=>r(t=>({...t,value:{...t.value,vr120:e}}))}),(0,wt().jsx)(Ete,{range:n.value.all_10||[0,10],oneline:e.oneline,name:"all\u503c(09:40)",updater:e=>r(t=>({...t,value:{...t.value,all_10:e}}))}),(0,wt().jsx)(Ete,{range:n.value.all_30||[0,10],oneline:e.oneline,name:"all\u503c(10:00)",updater:e=>r(t=>({...t,value:{...t.value,all_30:e}}))}),(0,wt().jsx)(Ete,{range:n.value.all_60||[0,10],oneline:e.oneline,name:"all\u503c(10:30)",updater:e=>r(t=>({...t,value:{...t.value,all_60:e}}))}),(0,wt().jsx)(Ete,{range:n.value.all_90||[0,10],oneline:e.oneline,name:"all\u503c(11:00)",updater:e=>r(t=>({...t,value:{...t.value,all_90:e}}))}),(0,wt().jsx)(Ete,{range:n.value.all_120||[0,10],oneline:e.oneline,name:"all\u503c(11:30)",updater:e=>r(t=>({...t,value:{...t.value,all_120:e}}))})]}),i&&(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u53ea\u505a\u661f\u671f\u51e0:"}),(0,wt().jsx)(E8,{selected:null===(t=n.value.weekDays)||void 0===t?void 0:t.map(e=>""+e),data:Array.from({length:5}).map((e,t)=>t+1+""),select:e=>r(t=>({...t,value:{...t.value,weekDays:e.map(e=>parseInt(e))}}))})]})]})}function Ote(e){const[t,n]=(0,St().useState)(null),[r,i]=(0,St().useState)([1,100]),o=U2(),a=(0,St().useRef)(null),s=(0,St().useCallback)((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)},[e.clickDay]),l=(0,St().useCallback)(t=>{const n=e.clickPoint;null!=n&&n(t)},[e.clickPoint]),{historyData:u,isDay:c,symbol:d,preClose:h,signals:p,lines:f,areas:g,extendedLines:m}=e;return(0,St().useEffect)(()=>{if(null!=a.current)if(null==t){const t=XD(a.current);t.on("click",e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&l(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],s(e.name.slice(0,10),t)}}),t.on("datazoom",t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}}),n(t)}else{const n=u;if(null!=n&&n.length>0){const i=n.map(e=>c?nc.format(e.t):cc(e.t,!0)),a=c&&null!=h?n.map(e=>[e.o,e.c,e.l,e.h,h]):n.map(e=>[e.o,e.c,e.l,e.h]),s=(d.length,n.map(e=>e.v)),l=new Map;p.forEach(e=>{const t=c?nc.format(e[0]):cc(e[0],!0);l.set(t,e[1].map(e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e}))});const u=[];if(c){const e=n[0].t;u.push([nc.format(Sc(e)),nc.format(_c(e)),!0,"market open"])}null===g||void 0===g||g.forEach(e=>{u.push([nc.format(e[0]),nc.format(e[1]),!0,"antireverse"])});const f=function(e,t){const n=new Map;if(t.forEach(e=>{const t=e.extra;if(null!=t&&"type"in t&&"agg"==t.type){const e=t.timestamp,r=n.get(e),i=t.total;null!=r?r.push(i):n.set(e,[i])}}),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],o=Sc(e[0].t);var r=0,i=0;const a=[];return e.forEach(e=>{const s=e.t;s>=o&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(i+=l.reduce((e,t)=>e+t,0)),a.push(r>0?1e3*i/r:0),t.forEach(e=>{null!=l&&l.length>0&&(e[2]+=l.filter(t=>t>e[1]-1e-4).length),e[3].push(s>o?e[2]/Math.ceil((s-o)/36e5):0)})}),t.map(e=>[e[0],e[3]]).concat([["all",a]])}return[]}(n,e.signals2),v=[["xkk",e.historyData2.map(e=>e.xkk)],["wave",e.historyData2.map(e=>e.wave)],["volume rank",e.historyData2.map(e=>e.vr)]],y=E2(i,a,[],[["vol",s]],null!=m?[f,v,...m]:[f,v],l,!o,e.zoomRange||r,u);t.setOption(y)}}else n(null)},[u,p,t,o,c,s,l,h,d,r,e.zoomRange,e.setZoomRange,f,m,g]),(0,wt().jsx)("div",{ref:a,style:{width:"100%",height:"100%"}})}function zte(e){const[t,n]=(0,St().useState)(null),{filter:r,date:i,symbol:o,preClose:a,clickPoint:s,middle:l,front:u,getter:c,onConvert:d}=e,h=(0,St().useCallback)(async e=>await c(e),[c]);return(0,wt().jsx)(Sd,{getter:h,cvt:t=>{const n=[],c=[];t[1].filter(e=>e.strategy.startsWith("energy-antireverse")).forEach(e=>{const t=c.length;0===c.length||c[t-1][1]<e.timestamp?c.push([e.timestamp,e.timestamp+6e4]):c[t-1][1]=e.timestamp+6e4}),c3(r,i,t[1].filter(e=>null!=e.extra&&"type"in e.extra)).sort((e,t)=>e.timestamp-t.timestamp).forEach(e=>{const t=6e4*Math.floor(e.timestamp/6e4);0===n.length||n[n.length-1][0]<t?n.push([t,[e.subtype]]):n[n.length-1][1].push(e.subtype)});const d=_u(yc(t[0]).map(e=>[e[0],e[1]]),n),h=Pu(t[5],e=>e[0],(e,t)=>[t,0,0]),p=h.map(e=>e[1]),f=h.map(e=>e[2]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:[null!=u&&u(),(0,wt().jsx)(Ote,{symbol:o,preClose:a,clickPoint:s,signals:d,signals2:t[1],hasVol:!1,isDay:!0,historyData:t[2],historyData2:t[3],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,lines:e.lines,areas:c,extendedLines:[[["estimate volume",Fu(t[2])]],[["callVol",p],["putVol",f]],...t[4]]})]}),t[4].length>0&&(0,wt().jsxs)("div",{style:{display:"inline-block"},children:[(0,wt().jsx)("span",{children:"\u6743\u91cd\u80a1:"}),(0,wt().jsx)("div",{children:t[4][0].map(e=>(0,wt().jsx)(Ci,{style:{padding:"5px"},to:`/stockChart/${e[0]}/${i}`,children:e[0]}))})]}),l&&(0,wt().jsxs)(wt().Fragment,{children:[l(t),(0,wt().jsx)("div",{style:{marginTop:"3rem"},children:(0,wt().jsx)(o8,{addPercent:!0,data:dc(t[0]),aggs:t[2],feeRate:e.feeRate})},"detail")]})]})},onLoad:d})}function Bte(e){return(0,wt().jsx)(Fte,{x:e.x,y:[e.y]})}function Fte(e){const t=(0,St().useRef)(null),[n,r]=(0,St().useState)(null);return(0,St().useEffect)(()=>{if(null!=t.current)if(null==n)r(XD(t.current));else{const t=O2(e.x,e.y);n.setOption(t)}},[n,e]),(0,wt().jsx)("div",{ref:t,style:{width:"100%",height:"100%"}})}const $te={vol:[0,10],increase935:[-1,1],firstHourVR:[0,10],prevDayIncrease:[-1,1],prevDayVR:[0,10],volIncrease:[-1,10],firstHourVRIncrease:[-10,10],prevDayIncrease2:[-1,1],vixOpen:[10,20],vixIncrease:[-1,1]};function Vte(e,t){return null==e||null==t?null!=e||null!=t:e[0]!==t[0]||e[1]!==t[1]}function Wte(e,t){if(e.rowid!==t.rowid)return!0;{const r=e.value,i=t.value,o=Object.keys(r);if(function(e,t){if(e.length!==t.length)return!1;{const r=e.sort(),i=t.sort(),o=e.length;for(var n=0;n<o;){if(r[n]!==i[n])return!1;n++}return!0}}(o,Object.keys(i))){var n=0;const e=o.length;for(;n<e;){const e=o[n];if("weekDays"!==e&&Vte(r[e],i[e]))return!0;n++}return!1}return!0}}function Hte(e,t){return e>=t[0]&&e<=t[1]}function Gte(e,t,n){const r=e[1],i=new Map;r.forEach((e,t)=>{const n=Math.floor(e.t/t5);i.set(n,t)});const o=e[0];if(0===t.length)return $u;const a=[],s=[],l=new Set,u=new Map;return o.forEach(e=>{const o=e.v2||0,c=e.v_10||0,d=e.v_90||0,h=e.v_120||0,p=e.v_30||0,f=e.v_5||0;s.push([o,e.v,c,d,h,p,f]),s.length>10&&s.shift();const g=s.reduce((e,t)=>t[0]>o?e+1:e,1),m=s.reduce((t,n)=>n[1]>e.v?t+1:t,1),v=s.reduce((e,t)=>t[2]>c?e+1:e,1),y=s.reduce((e,t)=>t[3]>d?e+1:e,1),x=s.reduce((e,t)=>t[4]>h?e+1:e,1),b=s.reduce((e,t)=>t[5]>p?e+1:e,1),w=s.reduce((e,t)=>t[6]>f?e+1:e,1),S=a.length,_=Math.floor(e.t/Cu),A=i.get(_);var k=null,C=null;if(null!=A&&(k=r[A].o,A>0)){const e=r[A-1].c;e>0&&(C=k/e-1)}var M=0,I=0,T=0,D=0,j=0;null!=e.money&&null!=e.energy&&(M=ju(e.money.m_10,c,e.energy.all_10),I=ju(e.money.m_30,p,e.energy.all_30),T=ju(e.money.m_60,o,e.energy.all_60),D=ju(e.money.m_90,d,e.energy.all_90),j=ju(e.money.m_120,h,e.energy.all_120));const P=new Date(e.t).getDay();_>=n&&S>1&&t.forEach(t=>{const n=u.get(_)||-1;if(!l.has(_))if(null!=t.weekDays&&t.weekDays.length>0&&null==t.weekDays.find(e=>e===P))u.set(_,0);else{const[r]=a[S-2],[i,s,c]=a[S-1],d=null!=e.c5min?(e.c5min-i.c)/i.c:null,h=(i.c-r.c)/r.c,p=(i.c-i.o)/i.o,f=null!=i.vol2&&null!=e.vol2?i.vol2[0]>0?(e.vol2[0]-i.vol2[0])/i.vol2[0]:0:null,m=-(g-s),A=Mu(o,60),P=function(e){for(var t=0;t++<e.length;){const n=e[t-1];if(null==n[0]||null!=n[1]&&!Hte(n[0],n[1]))return n[2]}return null}([[f,t.volIncrease,0],[c,t.prevDayVR,0],[h,t.prevDayIncrease,0],[p,t.prevDayIncrease2,0],[k,t.vixOpen,0],[C,t.vixIncrease,0],[null!=e.vol2?e.vol2[0]:null,t.vol,0],[d,t.increase935,5],[w,t.vr5,5],[M,t.all_10,10],[v,t.vr10,10],[b,t.vr30,30],[I,t.all_30,30],[A,t.volume,60],[m,t.firstHourVRIncrease,60],[g,t.firstHourVR,60],[T,t.all_60,60],[y,t.vr90,90],[D,t.all_90,90],[x,t.vr120,120],[j,t.all_120,120]]);null!=P?P>n&&u.set(_,P):(l.add(_),u.delete(_))}}),a.push([e,g,m]),a.length>2&&a.shift()}),u}function Ute(e){const{filters:t,isNew:n}=e,[r,i]=(0,St().useState)(null!=t?t[0]:{value:$te,name:"",update_time:0}),[o,a]=(0,St().useState)(!1);return(0,wt().jsx)(K8,{callBack:t=>{o?t("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d!"):(a(!0),e.callback(r,e=>{a(!1),t(e)}))},msg:(null==t?"\u65b0\u5efa":"\u4fee\u6539")+"\u8fc7\u6ee4\u5668",content:(0,wt().jsxs)("div",{children:[null!=t&&(0,wt().jsx)("select",{value:r.name,onChange:e=>{const n=t.find(t=>t.name===e.target.value);null!=n&&i(n)},children:t.map(e=>(0,wt().jsx)("option",{value:e.name,children:e.name},e.name))}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u540d\u5b57:"}),(0,wt().jsx)("input",{type:"text",value:r.name,onChange:e=>i(t=>({...t,name:e.target.value}))})]}),(0,wt().jsx)(Nte,{filter:r,setFilter:i,isNew:n})]})})}function Xte(e){const{filters:t,filter:n,setFilter:r,callback:i,isNew:o}=e,[a,s]=(0,St().useState)(null);return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,wt().jsxs)(ca,{margin:"normal",size:"medium",sx:{m:1,minWidth:80},children:[(0,wt().jsx)(aa,{id:"demo-simple-select-label",children:"Filter"}),(0,wt().jsx)(jl,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:null===n||void 0===n?void 0:n.name,label:"Filter",onChange:e=>{const n=t.find(t=>t.name===e.target.value);null!=n&&(r(e=>n),s(n))},children:t.map(e=>(0,wt().jsx)(P8,{value:e.name,children:e.name},e.name))})]}),null!=n&&null!=a&&Wte(n,a)&&(0,wt().jsx)(K8,{msg:"\u4fdd\u5b58",callBack:e=>{i(n,t=>{e(t),s(null)})}})]}),null!=n&&(0,wt().jsx)(Nte,{oneline:!0,filter:n,setFilter:e=>r(t=>null==t?null:(null==a&&s(t),e(t))),isNew:o})]})}function Yte(e){const[t,n]=(0,St().useState)(!0),{data:r,startDate:i,updater3:o,filters:a,filterNames:s,setFilterNames:l,tag:u}=e,[c,d]=(0,St().useState)(a),[h,p]=(0,St().useState)([-10,10]),[f,g]=(0,St().useState)($u),[m,v]=(0,St().useState)(null);(0,St().useEffect)(()=>{const n=s.map(e=>{var t;return null!=m&&m.name===e?m.value:null===(t=c.find(t=>t.name===e))||void 0===t?void 0:t.value}).filter(e=>null!=e),o=Gte(r,n,i);g(o),e.updater(o,t,h)},[c,t,i,s,m]);const[y]=(0,St().useState)(new AbortController);(0,St().useEffect)(()=>()=>y.abort(),[y]);const x=(0,St().useCallback)((e,t)=>{(async function(e,t,n){var r;r=null!=e.rowid?JSON.stringify({...e,uid:e.rowid,tag:n}):JSON.stringify({...e,tag:n});const i=await F8("uperset",r,e=>"s"in e&&e.s,t);return"boolean"===typeof i&&i})(e,y.signal,u).then(n=>{n&&(null==e.rowid?o():d(t=>t.map(t=>t.rowid===e.rowid?e:t))),t(n?"succeed":"fail")})},[o,y.signal,u]);return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6761\u4ef6\u8fc7\u6ee4"}),(0,wt().jsx)(J5,{checked:t,onChange:e=>n(e=>!e)}),(0,wt().jsx)("span",{children:"\u6761\u4ef6\u4fdd\u7559"})]}),(0,wt().jsx)(Ute,{callback:x,isNew:u.length>0},"1"),(0,wt().jsx)(Xte,{filters:c.filter(e=>1!==e.freeze),filter:m,callback:x,setFilter:v,isNew:u.length>0}),(0,wt().jsx)(E8,{selected:s,data:c.map(e=>e.name),select:e=>l(e)}),(0,wt().jsx)(Ete,{range:h,name:"\u524d\u4e00\u5929\u76c8\u5229",updater:n=>{p(n),e.updater(f,t,n)}})]})}function qte(e){const[t,n]=(0,St().useState)(0),[r,i]=(0,St().useState)([]),{strategy:o}=e,a="weight stock buy"===o?"weight":"",s=(0,St().useCallback)(async e=>await $8(e,a),[t,a]);return(0,wt().jsx)(Sd,{getter:s,cvt:t=>(0,wt().jsx)(Yte,{startDate:e.startDate,data:e.data,filters:t,updater:e.updater,updater3:()=>n(e=>e+1),filterNames:r,setFilterNames:i,tag:a})})}async function Zte(e,t,n,r,i,o){const a=await Wc(n,r,i,o,!0);if("err"in a)return a;{const i=await Qu("I:VIX",n,r,1,"day",o);if("err"in i)return i;{const s=await async function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("symbol",t),a.set("startDate",r),a.set("endDate",i),a.set("strategy",n),a.set("command","signals"),a.set("uid",e),a.set("getDate","1");const s=`${qu}/backtest?${a.toString()}`,l=await tc(s,o);return"err"in l?l:Array.isArray(l)?l.map(e=>parseInt(e)):{err:"wrong type"}}(e,"QQQ",t,n,r,o);if("err"in s)return s;{const t=await async function(e,t,n,r){const i=`${qu}/backtest?command=signals_agg&uid=${e}&startDate=${t}&endDate=${n}`,o=await tc(i,r);return o}(e,n,r,o);if("err"in t)return[a,i.results,new Set(s)];return[a.map(e=>{const n=Math.floor(e.t/t5)+"";return n in t?{...e,energy:t[n]}:e}),i.results,new Set(s)]}}}}function Kte(e){const{updater:t,uid:n,symbol:r,strategy:i,startDate:o,endDate:a,dayProfit2:s,clickDay:l,dayProfit:u,startDate2:c}=e,d=(0,St().useCallback)(async e=>await Zte(n,"energy-antireverse",o,a,r||"QQQ",e),[o,a,r,n]);return(0,wt().jsx)(Sd,{getter:d,cvt:e=>{const r=e[0].map(e=>Math.floor(e.t/Cu)),d=u;return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(l3,{withEstimateVolume:!0,withOtherRank:!0,startDate:o,endDate:a,signals:_u(Array.from(e[2]).sort().map(e=>[e*t5,["@Color0blue@@antireverse"]]),d),preClose:1,symbol:"QQQ",clickDay:l,aggData:e[0],withExtra:!0,withSignal:!1,taskId:n})}),(0,wt().jsx)("button",{onClick:e=>{!function(e,t){const n=document.createElement("a");n.href="data:text/csv;charset=utf-8,"+encodeURIComponent(e),n.download=t,n.click()}("date,profit,trade times,profit day\n"+s.map(e=>`${cc(e[0])},${e[1].toLocaleString()},${e[2]},${e[3].toLocaleString()}`).join("\n"),`${n}.csv`)},children:"\u4e0b\u8f7dCsv"}),e[0].length>0&&(0,wt().jsx)(qte,{data:[e[0],e[1]],updater:(e,n,i)=>{t([i,r,e,n])},startDate:c,strategy:i})]})}})}const Qte=1e6;function Jte(e){const{date:t,symbol:n,stockPrice:r}=e,[i,o]=(0,St().useState)(null),a=(0,St().useCallback)(async e=>{const i=cc(new Date(t).getTime()+432e6),a=await async function(e,t,n,r){const i=`${qu}/options?stock=${e}&startDate=${t}&endDate=${n}`,o=await tc(i,r);return"err"in o?o:"results"in o?o.results:{err:"results not found"}}(n,t,i,e);return"err"in a?a:(o(null),a.map(e=>{const t=parseInt(e.substring(e.length-8))/1e3;return[Math.abs(r-t),e]}).sort((e,t)=>e[0]-t[0]).slice(0,100).map(e=>e[1]))},[t,n,r]);return(0,wt().jsx)(Sd,{getter:a,cvt:e=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{paddingLeft:"100px"},children:[(0,wt().jsx)("span",{children:"Contracts:"}),(0,wt().jsxs)("select",{value:i||"",onChange:e=>{const t=e.target.value;o(t.length>0?t:null)},children:[(0,wt().jsx)("option",{value:"",children:"None"},"none"),e.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))]})]}),null!=i&&(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(o3,{signals:[],startDate:t,endDate:t,symbol:i})})]})})}function ene(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=[];return e.forEach(e=>{if(e.isSell){const t=Math.floor(e.timestamp/Cu)*Cu,i=e.buyPrice*e.volume,o=Iu(e.symbol),a=null!=n?n:Du(o),s=!0!==e.reverse&&e.price<Tu?0:a,l=!0===e.reverse?-1:1,u=((e.price-e.buyPrice)*l-s)*e.volume,c=e.buySignal.strategy+e.buySignal.timestamp;if(0===r.length||Math.abs(t-r[r.length-1][0])>1e5){const e=new Map;e.set(c,[i,u]),r.push([t,e])}else{const e=r[r.length-1][1],t=e.get(c);null!=t?e.set(c,[t[0]+i,t[1]+u]):e.set(c,[i,u])}}}),r}function tne(e){return e.map(e=>{const t=Array.from(e[1].entries()).reduce((e,t)=>{const n=t[1][0],r=t[1][1];return[e[0]+n,e[1]+r,e[2]+(t[1][0]>0?t[1][1]/t[1][0]:0)]},[0,0,0]),n=t[0]>0?t[1]/t[0]:0;return[e[0],t[2],e[1].size,n]}).filter(e=>0!==e[1])}function nne(e,t,n,r,i,o,a,s,l,u,c,d){let h=arguments.length>12&&void 0!==arguments[12]?arguments[12]:null,p=arguments.length>13&&void 0!==arguments[13]&&arguments[13];const f=e.filter(e=>{const n=cc(e.timestamp);return!t.has(n)&&n>=o[0]&&n<=o[1]}).filter(e=>{const t=Math.floor(e.timestamp/Cu);return n===a.length?null!=a.find(e=>e[1].has(t)):!(n>=0)||a[n][1].has(t)});return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,u=arguments.length>9&&void 0!==arguments[9]&&arguments[9];const c=wu(e,t,n,r,i,null,s,l,u);if(o||null!=a){const f=new Set;var d=0;const g=c[1].length;for(;d++<g;){const e=c[1][d-1];var h=!0;if(null!=a){const[t,n]=a;var p=0;if(d>1){const t=c[1][d-2],r=n.findIndex(t=>t===e[0]);r>0&&t[0]===n[r-1]&&(p=t[1])}t[0]>t[1]?(p<t[0]||p>t[1])&&(h=!1):(t[0]>p||p>t[1])&&(h=!1)}h&&o&&e[1]<0&&(h=!1),h&&f.add(e[0])}return wu(e,t,n,r,i,f,s,l,u)[0]}return c[0]}(null==i?f:i[3]?function(e,t,n){if(null==n)return t.filter(t=>{const n=Math.floor(t.timestamp/t5);return!e.has(n)});const r=new Map;t.forEach(e=>{const t=`${Math.floor(e.timestamp/t5)}-${e.symbol}-${e.buySignal.timestamp}`,n=r.get(t);null!=n?n.push(e):r.set(t,[e])});const i=[];return Array.from(r.entries()).forEach(t=>{const r=t[0].split("-"),o=parseInt(r[0]),a=r[1],s=e.get(o);if(null!=s){const e=n.get(`${o}-${a}-${s}`),r=Sc(o*t5)+6e4*s;var l=0;const c=[];var u=!0;t[1].forEach(t=>{if(t.isSell){if(t.timestamp<=r)l-=t.volume,c.push(t);else if(l>0)if(null!=e){var n;const i={timestamp:r,strategy:t.sellSignal.strategy,subtype:`cancel first ${s} minutes`,symbol:null===(n=t.sellSignal)||void 0===n?void 0:n.symbol};c.push({...t,volume:l,price:e,timestamp:r,sellSignal:i}),l=0}else u=!1,console.log("debug filter,fail to find clean price for position record:",t)}else t.timestamp<r&&(l+=t.volume,c.push(t))}),u&&c.forEach(e=>i.push(e))}else t[1].forEach(e=>i.push(e))}),i}(i[2],f,l?s:null):f.filter(e=>i[2].has(Math.floor(e.timestamp/t5))),d?[1e5,!0]:[Qte,!1],r,!1,!0,u,null!=i?[i[0],i[1]]:null,c,h,p)}function rne(e){const{targetPcts:t,specialDays:n,filterN:r,percent:i,newFilter:o,filterStartDate:a,simulateCancel:s,filterPositive:l,strategy:u,symbol:c,clickDay:d}=e,h="IronCondor buy"===u,[p,f]=(0,St().useState)(null),[g,m]=(0,St().useState)(null),v=(0,St().useCallback)(async e=>null!=g?await mc(g,"energy"===u,e):{err:"task is empty!"},[g,u]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("input",{value:p||"",onChange:e=>f(e.target.value)}),(0,wt().jsx)("button",{onClick:()=>{null!=p&&p.startsWith("task")&&m(p)},children:"\u4efb\u52a1PK"})]}),null!=g&&(0,wt().jsx)(Sd,{getter:v,cvt:e=>{const p=xu.has(u)||e[0].length>0&&!0===e[0][0].reverse,f=tne(ene(nne(e[0],n,r,i,o,a,e[2],e[3]||$u,s,l,p,!1,null,h),p)),g=[];var m=0,v=0;const y=t.length,x=f.length;for(;m<y||v<x;){const e=t[m],n=f[v];var b,w;if(m<y&&v<x?e[0]===n[0]?(b=e[1]-n[1],w=e[0],m++,v++):e[0]<n[0]?(b=e[1],w=e[0],m++):(b=-n[1],w=n[0],v++):m<y?(w=e[0],b=e[1],m++):(w=n[0],b=-n[1],v++),Math.abs(b)>.001){const e=(100*b).toFixed(2)+"%";g.push([w,["@TITLE"+e,"@Color0"+(b>=0?"green":"red")+"@@"+e]])}}return(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(l3,{symbol:c,startDate:a[0],endDate:a[1],preClose:null,clickDay:d,signals:g})})}})]})}function ine(){let e=Vr(),[t]=ji();const n=t.get("startDate"),r=e.uid,i=t.get("symbol"),o=t.get("strategy"),a=t.get("strategy2"),s="true"===t.get("filterPositive"),l=t.get("endDate"),u=(0,St().useCallback)(async e=>await mc(r,"energy"===o,e),[r,o]);return(0,wt().jsx)(Sd,{getter:u,cvt:e=>(0,wt().jsx)(one,{positions:e,startDate:n,endDate:l,uid:r,filterPositive:s,strategy:o,strategy2:a,symbol:i})})}function one(e){const{positions:t,startDate:n,endDate:r,uid:i,filterPositive:o,strategy:a,strategy2:s,symbol:l}=e,u=new Date(n).getTime(),c=cc(u-15*Cu),[d,h]=(0,St().useState)(!1),p=t[0].length>0&&!t[0][0].symbol.startsWith("O:"),[f,g]=(0,St().useState)(Du(p)),m=Math.floor((new Date(r).getTime()-new Date(n).getTime())/Cu),[v,y]=(0,St().useState)(null),[x,b]=(0,St().useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[w,S]=(0,St().useState)(!0),[_,A]=(0,St().useState)(-1),[k,C]=(0,St().useState)([n,r]),[M,I]=(0,St().useState)(null),[T,D]=(0,St().useState)(new Set),[j,P]=(0,St().useState)(10),[L,R]=(0,St().useState)(!1),[E,N]=(0,St().useState)(!1),[O,z]=(0,St().useState)([]);(0,St().useEffect)(()=>{if(null!=t&&!("err"in t)){const e=!1,n=nne(t[0],T,_,j,M,k,t[2],t[3]||$u,E,o,e,d,f,L);z(n)}},[t,_,M,o,k,T,j,E,s,d,f,L]);const B=ene(O,O.length>0&&!0===O[0].reverse,f),F=tne(B);return(0,wt().jsxs)("main",{children:[(0,wt().jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem"},children:[t[2].length>0&&(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u9009\u62e9\u8fc7\u6ee4\u6761\u4ef6:"}),(0,wt().jsxs)("select",{value:_,onChange:e=>{A(parseInt(e.target.value))},children:[(0,wt().jsx)("option",{value:-1,children:"none"},"none"),t[2].map((e,t)=>(0,wt().jsx)("option",{value:t,children:e[0]},t)),(0,wt().jsx)("option",{value:t[2].length,children:"All"},"all")]}),(0,wt().jsx)("input",{type:"date",value:k[0],onChange:e=>{C(t=>[e.target.value,t[1]])}}),"==",(0,wt().jsx)("input",{type:"date",value:k[1],onChange:e=>{C(t=>[t[0],e.target.value])}}),(0,wt().jsx)("span",{children:"\u8fc7\u6ee4\u5668\u6a21\u62df10:35\u53d6\u6d88\u4ea4\u6613"}),(0,wt().jsx)(J5,{checked:E,onChange:e=>{N(e.target.checked)},inputProps:{"aria-label":"controlled"}})]}),"QQQ2"!==l?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("h3",{children:"VIX:"}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(o3,{signals:[],startDate:c,endDate:r,symbol:"I:VIX"})}),(0,wt().jsx)(rne,{targetPcts:F.map(e=>[e[0],e[1]]),specialDays:T,filterN:_,percent:j,newFilter:M,filterStartDate:k,simulateCancel:E,filterPositive:o,strategy:a,symbol:l,clickDay:(e,t)=>{y([e,t])}}),(0,wt().jsx)(Kte,{uid:i,symbol:l,startDate:c,endDate:r,startDate2:Math.floor(u/Cu),dayProfit2:F,dayProfit:F.map(e=>{const t=e[1],n=(100*t).toFixed(2)+"%",r=Math.floor(e[0]/t5),i=null!=M&&M[2].get(r)||0;console.log("debug color",i);const o=t>=0?i>0?"lightgreen":"green":i>0?"pink":"red";return[e[0],["@TITLE"+n,"@Color0"+o+"@@"+n]]}),clickDay:(e,t)=>{y([e,t])},updater:I,strategy:s})]}):(0,wt().jsx)(cne,{uid:i,symbol:l,startDate:n,endDate:r,dayProfit:B.map(e=>{const t=Array.from(e[1].entries()).reduce((e,t)=>e+t[1][1]/t[1][0],0),n=(100*t).toFixed(2)+"%",r=Math.floor(e[0]/t5),i=null!=M&&M[2].get(r)||0,o=t>=0?i>0?"lightgreen":"green":i>0?"pink":"red";return[e[0],["@TITLE"+n,"@Color0"+o+"@@"+n]]}),clickDay:(e,t)=>{y([e,t])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u8fc7\u6ee4\u65e5\u671f:"}),(0,wt().jsx)(q9,{updater:D})]}),(0,wt().jsx)(Ite,{positions:dc(O),startDate:n,endDate:r,symbol:l,uid:i,dates:m,totalM:d?1e5:Qte}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u65e7\u7684\u4e0b\u6ce8\u65b9\u5f0f"}),(0,wt().jsx)(J5,{checked:d,onChange:e=>h(e.target.checked)}),(0,wt().jsx)("span",{children:"\u8bb8\u603b\u4e0b\u6ce8\u65b9\u5f0f"})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u8d39\u7387:"}),(0,wt().jsx)(N8,{type:"number",value:f,handleUpdate:e=>g(e)})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u53cc\u7a7a\u662f\u5426\u7b49\u91cf\u5f00\u4ed3:"}),(0,wt().jsx)(J5,{checked:L,onChange:e=>{R(e.target.checked)}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Buy Percent:"}),(0,wt().jsx)(hte,{defaultValue:10,onChangeCommitted:(e,t)=>{"number"===typeof t&&P(t)},"aria-label":"Default",valueLabelDisplay:"auto"})]}),(0,wt().jsx)("div",{style:{width:"100%"},children:(0,wt().jsx)(Cte,{data:O,totalMoney:d?1e5:Qte,startDate:n,dayMerge:!0,feeRate:f})},"profit"),(0,wt().jsxs)("div",{children:[(0,wt().jsx)(u3,{filter:x,updateCB:b}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Show Buy/Sell Points:"}),(0,wt().jsx)(J5,{checked:w,onChange:e=>{S(e.target.checked)}})]})]}),null!=v&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{children:(0,wt().jsxs)(Mi,{to:`/stock/${l}?start=${v[0]}&end=${v[0]}&unit=second`,children:["\u67e5\u770b",v[0],"\u79d2\u7ea7K\u7ebf"]})}),(0,wt().jsx)(lne,{uid:i,filter:x,date:v[0],symbol:l,strategy:a,preClose:v[1],clickPoint:e=>{},showBuyPoints:w,positionRecords:O,feeRate:f}),(0,wt().jsx)(Jte,{date:v[0],stockPrice:v[1],symbol:l})]})]})}async function ane(e,t,n,r,i,o){const a=await async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=await Rc(e,t,n,r,r,i);return o}(e,n,r,t,o);if("err"in a)return a;{const r=await Qu(n,t,t,1,"minute",o);if("err"in r)return r;{const n=await async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=new URLSearchParams;i.set("startDate",t),i.set("endDate",n),i.set("command","analysis_data"),i.set("uid",e);const o=`${qu}/backtest?${i.toString()}`,a=await tc(o,r);return a}(e,t,t,o);var s;const l=Lu(r.results,!1);return s="err"in n?[]:n.map(e=>e.map(e=>{const t=e[1];return[e[0],l.map(e=>{const n=e.t+"";return n in t?t[n]:0})]})),[i(t),a,l,s]}}}function sne(e){const t=Math.floor((new Date).getTime()/864e5)===Math.floor(new Date(e.date).getTime()/864e5),{symbol:n}=e,r=(0,St().useCallback)(async n=>{const r=await Qu(e.symbol,e.date,e.date,1,"minute",n);return"err"in r?r:[Lu(r.results.map(e=>({...e,v:0,vw:e.o})),t),r.prevClose]},[e.date,e.symbol,t]);return e.load?(0,wt().jsx)(Sd,{getter:r,cvt:t=>(0,wt().jsx)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:(0,wt().jsx)(i3,{symbol:n,preClose:t[1]||void 0,hasVol:!1,isDay:!0,signals:[],historyData:t[0],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange})})}):(0,wt().jsx)(wd,{})}function lne(e){const[t,n]=(0,St().useState)(0),[r,i]=(0,St().useState)([0,100]),[o]=(0,St().useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),a=(0,St().useCallback)(async t=>{const n=Math.floor(new Date(e.date).getTime()/Cu)*Cu,r=await ane(e.uid,e.date,e.symbol,e.strategy,t=>e.showBuyPoints?e.positionRecords.filter(e=>e.timestamp>n&&e.timestamp<n+Cu):[],t);if("err"in r)return r;{const n=await async function(e,t){const n=`${qu}/backtest?command=historyXkk&date=${e}`,r=await tc(n,t);return"err"in r||Array.isArray(r)?r:{err:"result not array"}}(e.date,t);if("err"in n)return n;{const i=await Zc(e.date,t);return"err"in i?i:[r[0],r[1],r[2],n,r[3],i]}}},[e.date,e.symbol,e.uid,e.strategy,e.positionRecords,e.showBuyPoints]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(sne,{symbol:"I:VIX",date:e.date,zoomRange:r,setZoomRange:i,load:t>0}),(0,wt().jsx)(zte,{getter:a,date:e.date,symbol:e.symbol,filter:e.filter,preClose:e.preClose,clickPoint:e.clickPoint,onConvert:()=>{n(e=>e+1)},feeRate:e.feeRate,zoomRange:r,setZoomRange:i,middle:t=>(0,wt().jsx)(une,{signals:c3(e.filter,e.date,t[1])})})]})}function une(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)(3600);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5c55\u793a\u80fd\u91cf\u5bc6\u5ea6\u66f2\u7ebf:"}),(0,wt().jsx)(J5,{checked:t,onChange:e=>{n(e.target.checked)}})]}),t&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(dne,{signals:e.signals,duration:r})}),(0,wt().jsxs)("div",{style:{width:"90%",margin:"2rem",display:"flex"},children:[(0,wt().jsx)("span",{children:"Average Window:"}),(0,wt().jsx)(hte,{min:600,max:10800,step:60,defaultValue:3600,onChangeCommitted:(e,t)=>{"number"===typeof t&&i(t)},"aria-label":"Default",valueLabelDisplay:"auto"})]})]})]})}function cne(e){const{uid:t,symbol:n,startDate:r,endDate:i}=e,o=(0,St().useCallback)(async e=>await async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=new URLSearchParams;o.set("stock",t),o.set("startDate",n),o.set("endDate",r),o.set("command","signals"),o.set("uid",e);const a=`${qu}/backtest?${o.toString()}`;return await tc(a,i)}(t,n,r,i,e),[t,n,r,i]);return(0,wt().jsx)(Sd,{getter:o,cvt:t=>(0,wt().jsx)(l3,{symbol:e.symbol,startDate:e.startDate,endDate:e.endDate,clickDay:e.clickDay,signals:null!=e.dayProfit?_u(t,e.dayProfit):t,preClose:null})})}function dne(e){if(e.signals.length>0){const a=[];e.signals.forEach(e=>{if("agg"===e.extra.type){const t=6e4*Math.floor(e.timestamp/6e4);0===a.length||t>a[a.length-1][0]?a.push([t,1]):a[a.length-1][1]+=1}});const s=e.signals[0].timestamp,l=Sc(s),u=_c(s),c=[];var t=l;const d=[];for(var n=0,r=0,i=0;t<u;){const s=t;for(;r<a.length&&a[r][0]<=s;)i+=a[r][1],r++;for(;n<r&&a[n][0]<s-1e3*e.duration;)n++;const u=Math.ceil((s-l)/36e5);var o=0;o=r<=a.length&&n<r?a.slice(n,r).reduce((e,t)=>e+t[1],0):0,d.push([t,3600*o/e.duration]),c.push([s,i/u]),t+=6e4}const h=sc(a,c,d),p=h[0].map(e=>nc.format(new Date(e)));return(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(Bte,{x:p,y:[["energy",h[1][0]],["hourAverage",h[1][1]],["duration",h[1][2]]]})})}return(0,wt().jsx)("p",{children:"Empty Signals"})}function hne(){return U2()?(0,wt().jsxs)("div",{style:{display:"flex"},children:[(0,wt().jsxs)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:[(0,wt().jsx)(Mi,{to:"/qqq/signal_search",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Signal Search"}),(0,wt().jsx)(Mi,{to:"/qqq",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:"/qqq"===window.location.pathname?"red":""}},children:"Strategy"})]}),(0,wt().jsx)(ri,{})]}):(0,wt().jsx)(ri,{})}const pne="QQQ";const fne={rowid:1,account:"",symbol:"",strategy:"",total:1,freeze:1,betPercent:0,desc:"",update_time:0};function gne(e){const{date:t,filter:n,previousClose:r}=e,i=(0,St().useCallback)(async e=>await i9(t,pne,"energy",fne,e),[t]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>{const r=c3(n,t,e[1]).map(e=>[e.timestamp,[e.subtype]]);return(0,wt().jsx)(o3,{symbol:pne,startDate:t,endDate:t,signals:r})}})}function mne(e){const{symbol:t,filterIn:n,updateFilter:r,data:i}=e,[o,a]=(0,St().useState)(null),[s,l]=(0,St().useState)(n);return(0,wt().jsxs)("main",{children:[i.length>0?(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(o3,{symbol:e.symbol,startDate:i[0].date,endDate:i[i.length-1].date,clickDay:(e,t)=>{a([e,t])},signals:i.map(e=>[new Date(e.date).getTime(),["@TITLE"+e.num]])})}):(0,wt().jsx)("p",{children:"Empty Result!"}),(0,wt().jsx)(yu,{onClick:()=>{r(s)},children:"\u641c\u7d22"}),(0,wt().jsx)(u3,{filter:s,updateCB:l}),null!=o&&(0,wt().jsx)(wt().Fragment,{children:(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(gne,{date:o[0],filter:s,previousClose:o[1]})})})]})}function vne(e){return(0,wt().jsx)(mne,{filterIn:e.filter,updateFilter:e.updateFilter,symbol:pne,data:e.data})}function yne(){const[e,t]=(0,St().useState)(()=>({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1})),[n,r]=(0,St().useState)(new AbortController);(0,St().useEffect)(()=>(r(new AbortController),()=>{n.abort()}),[]);const i=(0,St().useCallback)(async t=>await async function(e,t){const n=new URLSearchParams,r=JSON.stringify(Object.fromEntries(Object.entries(e).filter(e=>null!=e[1])));n.set("filter",r);const i=`${qu}/signals?${n.toString()}`,o=await tc(i,t);return"err"in o||Array.isArray(o)?o:{err:"invalid search result!"}}(e,t),[e]);return(0,wt().jsx)(Sd,{getter:i,cvt:n=>(0,wt().jsx)(vne,{filter:e,data:n,updateFilter:e=>t(e)})})}function xne(){const[e]=ji(),t=e.get("mainId"),[n,r]=(0,St().useState)(null),[i,o]=(0,St().useState)(0),a=(0,St().useCallback)(async e=>{const n=await async function(e){const t=await Ic(null,e,!0);return"err"in t?t:[t.filter(e=>0===e.account.length),t.filter(e=>e.account.length>0)]}(e);if(!("err"in n)){if(n[0].length>0){var i=!1;if(null!=t){const e=parseInt(t),o=n[0].find(t=>t.rowid===e);null!=o&&(r(o),i=!0)}i||r(n[0][0])}return n}return n},[t,i]);return(0,wt().jsx)(Sd,{getter:a,cvt:e=>{var t=null;return null!=n&&(t=(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Main:"}),(0,wt().jsx)("select",{value:n.rowid,onChange:t=>{const n=parseInt(t.target.value);if(!isNaN(n)){const t=e[0].find(e=>e.rowid===n);null!=t&&r(t)}},children:e[0].map(e=>(0,wt().jsxs)("option",{value:e.rowid,children:[e.rowid,"-",e.symbol,"-",e.strategy,"-",e.desc]},e.rowid))})]}),(0,wt().jsx)(wne,{account:n,alternatives:e[1].filter(e=>n.symbol===e.symbol&&n.strategy===e.strategy)})]})),(0,wt().jsxs)("main",{children:[(0,wt().jsx)(K7,{manualBuy:!1,completeCB:()=>o(e=>e+1)}),t]})}})}async function bne(e,t,n){const r={isAdd:n,mainId:e,subId:t},i=Hu(await Gu("update_account_group",JSON.stringify(r),null),["d","data"]);return null!=i&&"s"in i&&!0===i.s}function wne(e){const[t,n]=(0,St().useState)(0),r=e.account.rowid,[i,o]=(0,St().useState)(null),a=(0,St().useCallback)(async e=>await Yc(r,e),[r,t]);return(0,wt().jsx)(Sd,{getter:a,cvt:t=>{const r=new Set(t.map(e=>e.subId)),a=e.alternatives.filter(e=>!r.has(e.rowid));return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(yu,{onClick:()=>{const t=a.find(t=>t.symbol===e.account.symbol&&t.strategy===e.account.strategy);null!=t&&o(t.rowid)},children:"\u65b0\u589e"})}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Main Id"},"main"),(0,wt().jsx)("td",{children:"Sub Id"},"sub"),(0,wt().jsx)("td",{children:"Operate"},"operate")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.mainId},"main"),(0,wt().jsx)("td",{children:(0,wt().jsx)(Ci,{to:`/trading/account/${e.subId}`,children:e.subId})},"sub"),(0,wt().jsx)("td",{children:(0,wt().jsx)(yu,{onClick:()=>{bne(e.mainId,e.subId,!1).then(e=>{e&&n(e=>e+1)})},children:"\u5220\u9664"})},"operate")]},e.subId))})]}),null!=i&&(0,wt().jsx)(Sne,{close:()=>o(null),submit:()=>{null!=i&&bne(e.account.rowid,i,!0).then(e=>{e&&n(e=>e+1),o(null)})},content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Select Sub Id:"}),(0,wt().jsx)("select",{onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||o(t)},children:a.map(e=>(0,wt().jsxs)("option",{value:e.rowid,children:[e.rowid,"-",e.symbol,"-",e.strategy,"-",e.desc]},e.rowid))})]})})]})}})}function Sne(e){return(0,wt().jsxs)(K6,{show:!0,onHide:e.close,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Edit"})}),(0,wt().jsx)(K6.Body,{children:e.content}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:e.close,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:e.submit,children:"OK"})]})]})}class _ne{constructor(e){this.socket=void 0,this.url=void 0,this.closePromise=void 0,this.isClose=void 0,this.closeResolve=void 0,this.pendingMsgs=void 0,this.isClose=!1,this.closeResolve=null,this.closePromise=new Promise((e,t)=>{this.closeResolve=e}),this.url=e,this.socket=null,this.pendingMsgs=[]}close(){this.isClose=!0,null!=this.closeResolve&&this.closeResolve(1)}async ensureConnect(){for(var e=null,t=null;!this.isClose;){if(null==this.socket||3===this.socket.readyState){t=new Promise((t,n)=>{e=t});const n=new WebSocket(Ku(this.url));n.addEventListener("message",e=>this.onMessage(e)),n.addEventListener("close",()=>{this.socket=null,null!=e&&e(1)}),n.addEventListener("error",e=>{console.log("ws got error:",e)}),n.addEventListener("open",e=>{this.socket=n,this.onConnect()})}null!=t?(await Promise.any([this.closePromise,t]),t=null):await Promise.any([this.closePromise,Xu(5e3)])}}onMessage(e){}onConnect(){const e=this.socket;if(null!=e)for(;this.pendingMsgs.length>0;){const t=this.pendingMsgs.splice(0,1);t.length>0&&e.send(t[0])}}sendMessage(e){const t=this.socket;null==t?this.pendingMsgs.push(e):t.send(e)}}class Ane extends _ne{constructor(){super(`wss://${Zu}/ws_new`),this.subscribeMap=void 0,this.callBackMap=void 0,this.count=10,this.subscribeMap=new Map,this.callBackMap=new Map}onMessage(e){const t=function(e){const t=JSON.parse(e);return"tp"in t&&"pub"===t.tp?t:null}(e.data);if(null!=t){const e=this.subscribeMap.get(t.topic);null!=e&&Array.from(e).forEach(e=>{const n=this.callBackMap.get(e);null!=n&&n(t.data)})}}subscribe(e,t){const n=this.count++,r=this.subscribeMap.get(e);if(null==r){const t=new Set;t.add(n),this.subscribeMap.set(e,t),this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!0,needHistory:!0}))}else r.add(n);return this.callBackMap.set(n,t),n}onConnect(){console.log("onConnect"),super.onConnect(),Array.from(this.subscribeMap.keys()).forEach(e=>{this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!0,needHistory:!0}))})}unsubscribe(e,t){const n=this.subscribeMap.get(e);null!=n&&(n.delete(t),this.callBackMap.delete(t),0===n.size&&(this.subscribeMap.delete(e),this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!1,needHistory:!0}))))}}const kne=(0,St().createContext)(null);function Cne(e){console.log("MyWSNewProvider start");const[t]=(0,St().useState)(()=>new Ane);return(0,St().useEffect)(()=>(t.ensureConnect(),()=>{t.close()}),[t]),(0,wt().jsx)(kne.Provider,{value:t,children:e.children})}let Mne;function Ine(){if(Mne)return Mne;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Mne="reverse",e.scrollLeft>0?Mne="default":(e.scrollLeft=1,0===e.scrollLeft&&(Mne="negative")),document.body.removeChild(e),Mne}function Tne(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Ine()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Dne(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const jne=["onChange"],Pne={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const Lne=(0,Y().A)((0,wt().jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Rne=(0,Y().A)((0,wt().jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Ene(e){return(0,qe().Ay)("MuiTabScrollButton",e)}const Nne=(0,Ze().A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),One=["className","slots","slotProps","direction","orientation","disabled"],zne=(0,H().Ay)(lu,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({width:40,flexShrink:0,opacity:.8,[`&.${Nne.disabled}`]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})}),Bne=St().forwardRef(function(e,t){var n,r;const i=(0,_().b)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:l}=i,u=(0,jt().A)(i,One),c=xa(),d=(0,Dt().A)({isRtl:c},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return(0,$e().A)(i,Ene,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Lne,f=null!=(r=a.EndScrollButtonIcon)?r:Rne,g=Ca({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=Ca({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,wt().jsx)(zne,(0,Dt().A)({component:"div",className:(0,Pt().A)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===l?(0,wt().jsx)(p,(0,Dt().A)({},g)):(0,wt().jsx)(f,(0,Dt().A)({},m))}))});function Fne(e){return(0,qe().Ay)("MuiTabs",e)}const $ne=(0,Ze().A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Vne=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Wne=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Hne=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Gne=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},Une=(0,H().Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$ne.scrollButtons}`]:t.scrollButtons},{[`& .${$ne.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${$ne.scrollButtons}`]:{[n.breakpoints.down("sm")]:{display:"none"}}})}),Xne=(0,H().Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})}),Yne=(0,H().Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})}),qne=(0,H().Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(e=>{let{ownerState:t,theme:n}=e;return(0,Dt().A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})}),Zne=(0,H().Ay)(function(e){const{onChange:t}=e,n=(0,jt().A)(e,jne),r=St().useRef(),i=St().useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,oe().A)(()=>{const e=(0,q().A)(()=>{const e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,ee().A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),St().useEffect(()=>{o(),t(r.current)},[t]),(0,wt().jsx)("div",(0,Dt().A)({style:Pne},n,{ref:i}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Kne={};const Qne=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTabs"}),r=Ja(),i=xa(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:u,className:c,component:d="div",allowScrollButtonsMobile:h=!1,indicatorColor:p="primary",onChange:f,orientation:g="horizontal",ScrollButtonComponent:m=Bne,scrollButtons:v="auto",selectionFollowsFocus:y,slots:x={},slotProps:b={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:A="primary",value:k,variant:C="standard",visibleScrollbar:M=!1}=n,I=(0,jt().A)(n,Vne),T="scrollable"===C,D="vertical"===g,j=D?"scrollTop":"scrollLeft",P=D?"top":"left",L=D?"bottom":"right",R=D?"clientHeight":"clientWidth",E=D?"height":"width",N=(0,Dt().A)({},n,{component:d,allowScrollButtonsMobile:h,indicatorColor:p,orientation:g,vertical:D,scrollButtons:v,textColor:A,variant:C,visibleScrollbar:M,fixed:!T,hideScrollbar:T&&!M,scrollableX:T&&!D,scrollableY:T&&D,centered:l&&!T,scrollButtonsHideMobile:!h}),O=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,$e().A)(u,Fne,l)})(N),z=Ca({elementType:x.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:N}),B=Ca({elementType:x.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:N});const[F,$]=St().useState(!1),[V,W]=St().useState(Kne),[H,G]=St().useState(!1),[U,X]=St().useState(!1),[Y,Z]=St().useState(!1),[K,Q]=St().useState({overflow:"hidden",scrollbarWidth:0}),te=new Map,ne=St().useRef(null),re=St().useRef(null),ie=()=>{const e=ne.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Tne(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==k){const e=re.current.children;if(e.length>0){const t=e[te.get(k)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},oe=(0,ae().A)(()=>{const{tabsMeta:e,tabMeta:t}=ie();let n,r=0;if(D)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[E]:t?t[E]:0};if(isNaN(V[n])||isNaN(V[E]))W(o);else{const e=Math.abs(V[n]-o[n]),t=Math.abs(V[E]-o[E]);(e>=1||t>=1)&&W(o)}}),se=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:o=Dne,duration:a=300}=r;let s=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void i(new Error("Animation cancelled"));null===s&&(s=r);const c=Math.min(1,(r-s)/a);t[e]=o(c)*(n-l)+l,c>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(d)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(d)}(j,ne.current,e,{duration:r.transitions.duration.standard}):ne.current[j]=e},le=e=>{let t=ne.current[j];D?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===Ine()?-1:1),se(t)},ue=()=>{const e=ne.current[R];let t=0;const n=Array.from(re.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[R]>e){0===r&&(t=e);break}t+=i[R]}return t},ce=()=>{le(-1*ue())},de=()=>{le(ue())},he=St().useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),pe=(0,ae().A)(e=>{const{tabsMeta:t,tabMeta:n}=ie();if(n&&t)if(n[P]<t[P]){const r=t[j]+(n[P]-t[P]);se(r,{animation:e})}else if(n[L]>t[L]){const r=t[j]+(n[L]-t[L]);se(r,{animation:e})}}),fe=(0,ae().A)(()=>{T&&!1!==v&&Z(!Y)});St().useEffect(()=>{const e=(0,q().A)(()=>{ne.current&&oe()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),fe()},r=(0,ee().A)(ne.current);let i;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(re.current.children).forEach(e=>{t.observe(e)})),"undefined"!==typeof MutationObserver&&(i=new MutationObserver(n),i.observe(re.current,{childList:!0})),()=>{var n,o;e.clear(),r.removeEventListener("resize",e),null==(n=i)||n.disconnect(),null==(o=t)||o.disconnect()}},[oe,fe]),St().useEffect(()=>{const e=Array.from(re.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&T&&!1!==v){const n=e[0],r=e[t-1],i={root:ne.current,threshold:.99},o=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[T,v,Y,null==u?void 0:u.length]),St().useEffect(()=>{$(!0)},[]),St().useEffect(()=>{oe()}),St().useEffect(()=>{pe(Kne!==V)},[pe,V]),St().useImperativeHandle(s,()=>({updateIndicator:oe,updateScrollButtons:fe}),[oe,fe]);const ge=(0,wt().jsx)(qne,(0,Dt().A)({},w,{className:(0,Pt().A)(O.indicator,w.className),ownerState:N,style:(0,Dt().A)({},V,w.style)}));let me=0;const ve=St().Children.map(u,e=>{if(!St().isValidElement(e))return null;const t=void 0===e.props.value?me:e.props.value;te.set(t,me);const n=t===k;return me+=1,St().cloneElement(e,(0,Dt().A)({fullWidth:"fullWidth"===C,indicator:n&&!F&&ge,selected:n,selectionFollowsFocus:y,onChange:f,textColor:A,value:t},1!==me||!1!==k||e.props.tabIndex?{}:{tabIndex:0}))}),ye=(()=>{const e={};e.scrollbarSizeListener=T?(0,wt().jsx)(Zne,{onChange:he,className:(0,Pt().A)(O.scrollableX,O.hideScrollbar)}):null;const t=T&&("auto"===v&&(H||U)||!0===v);return e.scrollButtonStart=t?(0,wt().jsx)(m,(0,Dt().A)({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:z},orientation:g,direction:i?"right":"left",onClick:ce,disabled:!H},S,{className:(0,Pt().A)(O.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?(0,wt().jsx)(m,(0,Dt().A)({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:B},orientation:g,direction:i?"left":"right",onClick:de,disabled:!U},S,{className:(0,Pt().A)(O.scrollButtons,S.className)})):null,e})();return(0,wt().jsxs)(Une,(0,Dt().A)({className:(0,Pt().A)(O.root,c),ownerState:N,ref:t,as:d},I,{children:[ye.scrollButtonStart,ye.scrollbarSizeListener,(0,wt().jsxs)(Xne,{className:O.scroller,ownerState:N,style:{overflow:K.overflow,[D?"margin"+(i?"Left":"Right"):"marginBottom"]:M?void 0:-K.scrollbarWidth},ref:ne,children:[(0,wt().jsx)(Yne,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===g?"vertical":null,className:O.flexContainer,ownerState:N,onKeyDown:e=>{const t=re.current,n=(0,J().A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===g?"ArrowLeft":"ArrowUp",o="horizontal"===g?"ArrowRight":"ArrowDown";switch("horizontal"===g&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),Gne(t,n,Hne);break;case o:e.preventDefault(),Gne(t,n,Wne);break;case"Home":e.preventDefault(),Gne(t,null,Wne);break;case"End":e.preventDefault(),Gne(t,null,Hne)}},ref:re,role:"tablist",children:ve}),F&&ge]}),ye.scrollButtonEnd]}))}),Jne=Qne;function ere(e){return(0,qe().Ay)("MuiTab",e)}const tre=(0,Ze().A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),nre=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],rre=(0,H().Ay)(lu,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,U().A)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${tre.iconWrapper}`]:t.iconWrapper}]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tre.iconWrapper}`]:(0,Dt().A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,[`&.${tre.selected}`]:{opacity:1},[`&.${tre.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,[`&.${tre.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${tre.disabled}`]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,[`&.${tre.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${tre.disabled}`]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})}),ire=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:u,label:c,onChange:d,onClick:h,onFocus:p,selected:f,selectionFollowsFocus:g,textColor:m="inherit",value:v,wrapped:y=!1}=n,x=(0,jt().A)(n,nre),b=(0,Dt().A)({},n,{disabled:i,disableFocusRipple:o,selected:f,icon:!!s,iconPosition:l,label:!!c,fullWidth:a,textColor:m,wrapped:y}),w=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,u={root:["root",o&&a&&"labelIcon",`textColor${(0,U().A)(n)}`,r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,$e().A)(u,ere,t)})(b),S=s&&c&&St().isValidElement(s)?St().cloneElement(s,{className:(0,Pt().A)(w.iconWrapper,s.props.className)}):s;return(0,wt().jsxs)(rre,(0,Dt().A)({focusRipple:!o,className:(0,Pt().A)(w.root,r),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:e=>{!f&&d&&d(e,v),h&&h(e)},onFocus:e=>{g&&!f&&d&&d(e,v),p&&p(e)},ownerState:b,tabIndex:f?0:-1},x,{children:["top"===l||"start"===l?(0,wt().jsxs)(St().Fragment,{children:[S,c]}):(0,wt().jsxs)(St().Fragment,{children:[c,S]}),u]}))});const ore=St().createContext();function are(e){return(0,qe().Ay)("MuiGrid",e)}const sre=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],lre=(0,Ze().A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...sre.map(e=>`grid-xs-${e}`),...sre.map(e=>`grid-sm-${e}`),...sre.map(e=>`grid-md-${e}`),...sre.map(e=>`grid-lg-${e}`),...sre.map(e=>`grid-xl-${e}`)]),ure=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function cre(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function dre(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach(e=>{""===r&&0!==n[e]&&(r=e)});const i=Object.keys(t).sort((e,n)=>t[e]-t[n]);return i.slice(0,i.indexOf(r))}const hre=(0,H().Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(t=>{const i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])}),r}(a,u,t));const d=[];return u.forEach(e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...c,"row"!==i&&t[`direction-xs-${String(i)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})},function(e){let{theme:t,ownerState:n}=e;const r=(0,ve().kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,ve().NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${lre.item}`]={maxWidth:"none"}),t})},function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,ve().kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=dre({breakpoints:t.breakpoints.values,values:e})),o=(0,ve().NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:`-${cre(o)}`,[`& > .${lre.item}`]:{paddingTop:cre(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,[`& > .${lre.item}`]:{paddingTop:0}}})}return o},function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,ve().kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=dre({breakpoints:t.breakpoints.values,values:e})),o=(0,ve().NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:`calc(100% + ${cre(o)})`,marginLeft:`-${cre(o)}`,[`& > .${lre.item}`]:{paddingLeft:cre(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${lre.item}`]:{paddingLeft:0}}})}return o},function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce((e,i)=>{let o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,ve().kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"===typeof a?a[i]:a;if(void 0===s||null===s)return e;const l=Math.round(t/s*1e8)/1e6+"%";let u={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t=`calc(${l} + ${cre(e)})`;u={flexBasis:t,maxWidth:t}}}o=(0,Dt().A)({flexBasis:l,flexGrow:0,maxWidth:l},u)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const pre=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let u=[];n&&(u=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}}),n}(o,l));const c=[];l.forEach(t=>{const n=e[t];n&&c.push(`grid-${t}-${String(n)}`)});const d={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...u,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...c]};return(0,$e().A)(d,are,t)};const fre=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiGrid"}),{breakpoints:r}=Ja(),i=(0,Le().A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:u=!1,direction:c="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:f="wrap",zeroMinWidth:g=!1}=i,m=(0,jt().A)(i,ure),v=h||p,y=s||p,x=St().useContext(ore),b=u?a||12:x,w={},S=(0,Dt().A)({},m);r.keys.forEach(e=>{null!=m[e]&&(w[e]=m[e],delete S[e])});const A=(0,Dt().A)({},i,{columns:b,container:u,direction:c,item:d,rowSpacing:v,columnSpacing:y,wrap:f,zeroMinWidth:g,spacing:p},w,{breakpoints:r.keys}),k=pre(A);return(0,wt().jsx)(ore.Provider,{value:b,children:(0,wt().jsx)(hre,(0,Dt().A)({ownerState:A,className:(0,Pt().A)(k.root,o),as:l,ref:t},S))})});function gre(e){return(0,qe().Ay)("MuiCard",e)}(0,Ze().A)("MuiCard",["root"]);const mre=["className","raised"],vre=(0,H().Ay)(Os,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),yre=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiCard"}),{className:r,raised:i=!1}=n,o=(0,jt().A)(n,mre),a=(0,Dt().A)({},n,{raised:i}),s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},gre,t)})(a);return(0,wt().jsx)(vre,(0,Dt().A)({className:(0,Pt().A)(s.root,r),elevation:i?8:void 0,ref:t,ownerState:a},o))});function xre(e){return(0,qe().Ay)("MuiCardHeader",e)}const bre=(0,Ze().A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),wre=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],Sre=(0,H().Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,Dt().A)({[`& .${bre.title}`]:t.title,[`& .${bre.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),_re=(0,H().Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),Are=(0,H().Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),kre=(0,H().Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),Cre=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiCardHeader"}),{action:r,avatar:i,className:o,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:u,title:c,titleTypographyProps:d}=n,h=(0,jt().A)(n,wre),p=(0,Dt().A)({},n,{component:a,disableTypography:s}),f=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},xre,t)})(p);let g=c;null==g||g.type===F3||s||(g=(0,wt().jsx)(F3,(0,Dt().A)({variant:i?"body2":"h5",className:f.title,component:"span",display:"block"},d,{children:g})));let m=l;return null==m||m.type===F3||s||(m=(0,wt().jsx)(F3,(0,Dt().A)({variant:i?"body2":"body1",className:f.subheader,color:"text.secondary",component:"span",display:"block"},u,{children:m}))),(0,wt().jsxs)(Sre,(0,Dt().A)({className:(0,Pt().A)(f.root,o),as:a,ref:t,ownerState:p},h,{children:[i&&(0,wt().jsx)(_re,{className:f.avatar,ownerState:p,children:i}),(0,wt().jsxs)(kre,{className:f.content,ownerState:p,children:[g,m]}),r&&(0,wt().jsx)(Are,{className:f.action,ownerState:p,children:r})]}))});function Mre(e){return(0,qe().Ay)("MuiCardContent",e)}(0,Ze().A)("MuiCardContent",["root"]);const Ire=["className","component"],Tre=(0,H().Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Dre=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiCardContent"}),{className:r,component:i="div"}=n,o=(0,jt().A)(n,Ire),a=(0,Dt().A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"]},Mre,t)})(a);return(0,wt().jsx)(Tre,(0,Dt().A)({as:i,className:(0,Pt().A)(s.root,r),ownerState:a,ref:t},o))});async function jre(e,t,n){const r=await Gu("set_params",JSON.stringify({taskId:e,params:t}),n);if("err"in r)return!1;const i=Hu(r,["d","data"]);return null!=i&&"s"in i&&!0===i.s}async function Pre(e,t,n){const r={aid:e,percent:t},i=await Gu("clean_position_req",JSON.stringify(r),n);return!("err"in i)&&("s"in i&&!0===i.s)}function Lre(e){const[t]=(0,St().useState)(new AbortController),[n,r]=(0,St().useState)(!0),[i,o]=(0,St().useState)(0);return(0,St().useEffect)(()=>()=>{t.abort()},[t]),(0,wt().jsxs)("div",{children:[(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:r=>{jre(e.strategyId,{manualFirst:(new Date).getTime(),manualSide:n?1:0},t.signal).then(e=>{r("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})},content:(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("p",{children:["\u4e70\u5165\u65b9\u5411(",n?"call":"put",")"]}),(0,wt().jsx)(J5,{checked:n,onChange:e=>r(e.target.checked)})]})}),(0,wt().jsx)(K8,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:n=>{i>0?Pre(e.mainId,Math.min(i,1),t.signal).then(e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}):n("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,wt().jsx)("div",{children:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,wt().jsx)(N8,{value:i,type:"number",handleUpdate:e=>o(e)})]})})})]})}function Rre(e){const[t,n]=(0,St().useState)(!0),[r,i]=(0,St().useState)(0),[o]=(0,St().useState)(new AbortController);(0,St().useEffect)(()=>()=>{o.abort()},[o]);const a=(e,t)=>{e.then(e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})};return(0,wt().jsxs)("div",{children:[(0,wt().jsx)(K8,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",callBack:t=>{a(jre(e.strategyId,{cancelDate:(new Date).getTime()},o.signal),t)}}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:n=>{a(jre(e.strategyId,{rebuyTs:(new Date).getTime(),firstBuySide:t?1:0},o.signal),n)},content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"is call:"}),(0,wt().jsx)(J5,{checked:t,onChange:e=>{n(e=>!e)}})]})}),(0,wt().jsx)(K8,{msg:"\u624b\u52a8\u7ffb\u8f6c",callBack:t=>{a(jre(e.strategyId,{manualSellTs:(new Date).getTime()},o.signal),t)}}),(0,wt().jsx)(K8,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{r>0?Pre(e.mainId,Math.min(r,1),o.signal).then(e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}):t("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,wt().jsx)("div",{children:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,wt().jsx)(N8,{value:r,type:"number",handleUpdate:e=>i(e)})]})})})]})}const Ere="A.QQQ.minute",Nre="A.QQQ.second",Ore="rank-QQQ",zre="vol-QQQ",Bre="energy-QQQ",Fre="A.netflow-QQQ.minute",$re="A.I:VIX.minute";function Vre(e){const t=new Map;return e.forEach(e=>{kc(e.tradeTimestamp);const n=`\u7edf\u8ba1\u65f6\u95f4:@@@\u5408\u7ea6:${e.contract},\u4ef7\u683c:${e.price.toFixed(2)}@@@\u6210\u4ea4\u989d:${e.tradeMoney.toLocaleString()},\u5747\u503c\u7684${e.alpha.toFixed(2)}\u500d@@@\u80a1\u4ef7:${e.stockPrice.toFixed(3)},\u5206\u6570:${e.score.toFixed(2)},\u6700\u8fd1\u4e00\u5c0f\u65f6\u5206\u6570:${e.hourScore.toFixed(2)}`,r=t.get(e.tradeTimestamp);null==r?t.set(e.tradeTimestamp,[n]):t.set(e.tradeTimestamp,[...r,n])}),Array.from(t).sort((e,t)=>e[0]-t[0])}async function Wre(e){const t=await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=`${qu}/task?command=list`,n=await tc(t,e);if("err"in n)return n;if("d"in n){const e=n.d;if("object"===typeof e&&null!=e&&"data"in e)return e.data.filter(e=>e.startsWith("stock:"))}return{err:"data not found"}}(e);if("err"in t)return t;{const n=await Ic(null,e);return"err"in n?n:[t.filter(e=>e.startsWith("stock:")),n]}}function Hre(e){const{aid:t,startDate:n,endDate:r}=e,i=(0,St().useCallback)(async e=>await Pc(t,"sub",n,r,e),[t,n,r]);return(0,wt().jsx)(Sd,{getter:i,cvt:t=>{const n=t.d.map(e=>{const t=e.cost>0?e.profit/e.cost:0,n=(100*t).toFixed(2)+"%",r=t>0?"green":"red";return[e.timestamp,["@TITLE"+n,"@Color0"+r+"@@"+n]]});return(0,wt().jsx)(l3,{...e,preClose:1,signals:n})}})}function Gre(){return(0,wt().jsx)(Sd,{getter:Wre,cvt:e=>(0,wt().jsx)(Ure,{data:e}),debugKey:"StrategyNewPage"})}function Ure(e){const{data:t}=e,[n,r]=(0,St().useState)(null),i=(0,wt().jsx)(d5,{data:t,update:r});return null==n?i:(0,wt().jsxs)("div",{children:[i,(0,wt().jsx)(Xre,{taskId:n[0],account:n[1],isGuest:!1},n[0])]})}function Xre(e){let{taskId:t,account:n,isGuest:r}=e;const[i,o]=(0,St().useState)(null),[a]=(0,St().useState)(()=>{const e=Date.now();return[cc(e-7776e6),cc(e)]}),[s,l]=(0,St().useState)(!1);return(0,St().useEffect)(()=>{if(null==i){const e=[],t=setInterval(()=>{const t=Date.now(),n=e.length;if(0===n||e[n-1][1]<t){const r=Math.floor(t/t5);if(0===n||r>e[n-1][2]){const n=Sc(t),i=n+234e5;e.push([n-198e5,i+144e5,r])}}if(e.length>0){const[n,r,i]=e[e.length-1];l(t>=n&&t<r)}},5e3);return()=>{clearInterval(t)}}},[i]),(0,wt().jsxs)("main",{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9",marginTop:"2rem",marginBottom:"2rem"},children:(0,wt().jsx)(Hre,{aid:n.rowid+"",startDate:a[0],endDate:a[1],symbol:n.symbol,clickDay:(e,t)=>{o([e,t])}})}),null==i&&s&&(0,wt().jsx)(Yre,{taskId:t,account:n,isGuest:r}),null!=i&&(0,wt().jsx)(eie,{dt:i,account:n,mainId:t})]})}function Yre(e){let{taskId:t,account:n,isGuest:r}=e;const[i,o]=(0,St().useState)([]),[a,s]=(0,St().useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[l,u]=(0,St().useState)(0),c=(0,St().useContext)(kne),[d,h]=(0,St().useState)([0,100]),[p,f]=(0,St().useState)([]),[g,m]=(0,St().useState)([]),[v,y]=(0,St().useState)([]),[x,b]=(0,St().useState)([]),[w,S]=(0,St().useState)([]),[_,A]=(0,St().useState)(null),[k,C]=(0,St().useState)([]),[M,I]=(0,St().useState)([]),[T,D]=(0,St().useState)([]),[j,P]=(0,St().useState)("trades"),[L,R]=(0,St().useState)([]),[E,N]=(0,St().useState)(null);(0,St().useEffect)(()=>{if(null!=w&&null==E&&w.length>0){const e=w[w.length-1];Qu("QQQ",cc(e.t-432e6),cc(e.t-864e5)).then(e=>{if(!("err"in e)){const t=e.results;t.length>0&&N([0,t[t.length-1].c])}})}},[w]),(0,St().useEffect)(()=>{const e=new AbortController,t=n.rowid+"-"+n.strategy,r=cc();Nc(n.symbol,t,"energy",r,r,e.signal,!0).then(e=>{"err"in e||o(e[0])})},[l,n,t]);const O=`stock:${n.symbol}-${t}-${n.strategy}`;(0,St().useEffect)(()=>{const e=new Map,t=new Map,n=null===c||void 0===c?void 0:c.subscribe(Ere,e=>{S(n=>{const r=n.length>0?n[n.length-1].t:0,i=e.filter(e=>e.t>r);if(i.length>0){const e=i[i.length-1].t,r=t.get(0);var o;return(o=null!=r&&r>e?r:e)===e&&t.set(0,e),Pu([...n,...i],e=>e.t,(e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c}),o)}return n})}),r=null===c||void 0===c?void 0:c.subscribe(Ore,e=>{b(t=>{const n=t.length>0?t[t.length-1][0]:0,r=e.filter(e=>e.ts>n);return r.length>0?[...t,...r.map(e=>[e.ts,e.rank])]:t})}),i=null===c||void 0===c?void 0:c.subscribe(Nre,e=>{const n=e;if(n.length>0){const e=n[n.length-1],r=t.get(0),i=6e4*Math.floor(e.t/6e4);(null==r||r<i)&&t.set(0,i),A(t=>null!=t&&t.t===i?{...t,c:e.c,h:Math.max(t.h,e.h),l:Math.min(t.l,e.l),v:e.v+t.v}:{...e,t:i})}}),o=null===c||void 0===c?void 0:c.subscribe($re,e=>{m(t=>{const n=t.length>0?t[t.length-1].t:0,r=e.filter(e=>e.t>n);return r.length>0?[...t,...r]:t})}),a=null===c||void 0===c?void 0:c.subscribe(zre,e=>{y(t=>{const n=t.length>0?t[t.length-1].ts:0,r=e.filter(e=>e.ts>n);return r.length>0?[...t,...r]:t})}),s=null===c||void 0===c?void 0:c.subscribe(Bre,t=>{const n=[];t.forEach(t=>{const r=`${t.contract}-${t.tradeTimestamp}`;e.set(r,t),n.push(1)}),n.length>0&&R(Array.from(e.values()))}),l=null===c||void 0===c?void 0:c.subscribe(Fre,e=>{f(t=>{const n=t.length>0?t[t.length-1].ts:0,r=e.filter(e=>e.ts>n);return r.length>0?[...t,...r]:t})});return()=>{n&&(null===c||void 0===c||c.unsubscribe(Ere,n)),a&&(null===c||void 0===c||c.unsubscribe(zre,a)),s&&(null===c||void 0===c||c.unsubscribe(Bre,s)),l&&(null===c||void 0===c||c.unsubscribe(Fre,l)),o&&(null===c||void 0===c||c.unsubscribe($re,o)),i&&(null===c||void 0===c||c.unsubscribe(Nre,i)),r&&(null===c||void 0===c||c.unsubscribe(Ore,r))}},[c]),(0,St().useEffect)(()=>{const e=new Map,t=`auditor-${O}`,n=new Map,r=null===c||void 0===c?void 0:c.subscribe(t,t=>{const r=[],i=[],o=[];if(t.forEach(t=>{const n=function(e){if("code"in e){const t=e.code;if(3===t)return e;if(5===t)return e;if(1===t)return e}return null}(t);if(null!=n)if(1===n.code)n.logs.forEach(e=>{i.push([n.ts,e])});else if(5===n.code){const t=`${n.symbol}-${n.ts}`;e.has(t)||(e.set(t,n),r.push(n))}else 3===n.code&&o.push(n)}),i.length>0&&C(e=>[...i,...e].sort((e,t)=>-e[0]+t[0]).slice(0,100)),r.length>0&&(u(e=>e+1),I(e=>[...e,...r])),o.length>0){var a=0;o.forEach(e=>{const t=e.group,r=n.get(t);if(null==r){const r=new Map;r.set(e.key,[[e.ts,e.value]]),n.set(t,r),a++}else{const t=r.get(e.key);null==t?(r.set(e.key,[[e.ts,e.value]]),a++):(0===t.length||t[t.length-1][0]<e.ts)&&(r.set(e.key,[...t,[e.ts,e.value]]),a++)}}),a>0&&D(Array.from(n.entries()).sort((e,t)=>e[0]-t[0]).map(e=>Array.from(e[1].entries())))}});return()=>{r&&(null===c||void 0===c||c.unsubscribe(t,r))}},[c,O]);const z=null!=_?function(e,t){if(0===e.length)return[t];{const n=e[e.length-1];return n.t===t.t?[...e.slice(0,e.length-1),t]:t.t<n.t?e:[...e,t]}}(w,_):w,B=z.length>0?z[z.length-1].t:0,F=T.map(e=>e.map(e=>[e[0],Pu(e[1],e=>e[0],(e,t)=>[t,e[1]],B).map(e=>e[1])])),$=Pu(x,e=>e[0],(e,t)=>[t,e[1]],B).map(e=>e[1]),V=Pu(p,e=>e.ts,(e,t)=>({...e,ts:t}),B),W=Pu(v,e=>e.ts,(e,t)=>({...e,ts:t}),B),H=Pu(g,e=>e.t,(e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c}),B),G=d3(a,cc(B),L),U=Vre(G),X=(i.length>0?_u(yc(i).map(e=>[e[0],e[1]]),U):U).sort((e,t)=>e[0]-t[0]);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("h1",{children:"Strategy New"}),!r&&(0,wt().jsx)(h5,{}),(0,wt().jsx)(u3,{filter:a,updateCB:s}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(i3,{symbol:"I:VIX",signals:[],isDay:!0,historyData:H,zoomRange:d,setZoomRange:h})}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"1/1.3"},children:(0,wt().jsx)(l9,{symbol:"QQQ",preClose:null!=E?E[1]:void 0,signals:X,isDay:!0,zoomRange:d,setZoomRange:h,historyData:z,extras:J7(z,G),extraLines:[[["rank",$]],[["netflow volume",V.map(e=>e.value)]],[["netflow money",V.map(e=>e.money)]],[["call vol",W.map(e=>e.callVol)],["put vol",W.map(e=>e.putVol)]],...F]})}),!r&&n.strategy.search("energy buy")>-1&&(0,wt().jsx)(Rre,{strategyId:O,mainId:parseInt(t)||0}),!r&&(n.strategy.search("EventBack buy")>-1||n.strategy.search("IronCondor buy")>-1)&&(0,wt().jsx)(Lre,{strategyId:O,mainId:parseInt(t)||0}),!r&&(0,wt().jsx)(qre,{taskId:`${t}-${n.strategy}`,version:l}),(0,wt().jsx)("div",{style:{marginTop:"3rem"},children:(0,wt().jsx)(o8,{addPercent:!0,data:dc(i),aggs:[]})},"detail"),(0,wt().jsx)(A8,{children:(0,wt().jsxs)(Jne,{value:j,onChange:(e,t)=>{P(t)},children:[(0,wt().jsx)(ire,{label:"\u4ea4\u6613\u8bb0\u5f55",value:"trades"}),(0,wt().jsx)(ire,{label:"\u65e5\u5fd7",value:"logs"})]})}),"trades"===j&&(0,wt().jsx)(fre,{container:!0,spacing:2,children:M.map(e=>(0,wt().jsx)(fre,{item:!0,xs:4,children:(0,wt().jsxs)(yre,{children:[(0,wt().jsx)(Cre,{title:e.isBuy?"\u4e70\u5165":"\u5356\u51fa"}),(0,wt().jsxs)(Dre,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u65f6\u95f4:"}),kc(e.ts)]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5408\u7ea6:"}),e.symbol]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4ef7\u683c:"}),e.price]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u6570\u91cf:"}),e.volume]})]})]})}))}),"logs"===j&&(0,wt().jsx)("div",{children:(0,wt().jsx)("pre",{children:k.map(e=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("code",{children:[" ",kc(e[0])+"    "+e[1]]}),(0,wt().jsx)("br",{})]}))})})]})}function qre(e){let{taskId:t,version:n}=e;const r=(0,St().useCallback)(async e=>{const n=await Jc(e);return"err"in n?n:n.filter(e=>e.startsWith("option:")&&e.endsWith(t))},[t,n]);return(0,wt().jsx)(Sd,{getter:r,cvt:e=>(0,wt().jsx)(wt().Fragment,{children:e.map(e=>(0,wt().jsx)(Jre,{taskId:e,version:n}))})})}function Zre(e){let{runner:t,symbol:n}=e;const[r,i]=(0,St().useState)(0);return(0,wt().jsx)(K8,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",content:(0,wt().jsxs)("div",{children:["\u8bf7\u8f93\u5165\u5356\u51fa\u6bd4\u4f8b:",(0,wt().jsx)("input",{type:"number",value:r,onChange:e=>{i(Number(e.target.value))}})]}),callBack:e=>{r>1e-4?Uu(t,n,r).then(t=>{e(t?"\u5356\u51fa\u6210\u529f":"\u5356\u51fa\u5931\u8d25")}).catch(t=>{e(`\u5356\u51fa\u5931\u8d25: ${t}`)}):e("\u8bf7\u8f93\u5165\u5356\u51fa\u6bd4\u4f8b\u5927\u4e8e0")}})}function Kre(e,t,n){if(null!=n){const r=(e?1:-1)*(n-t)/t;return[`${t.toFixed(3)}(${n.toFixed(3)}|${(100*r).toFixed(3)}%)`,r>0]}return[t.toFixed(3),null]}function Qre(e){let{position:t,runner:n}=e;const[r,i]=(0,St().useState)({}),o=(0,St().useContext)(kne);return(0,St().useEffect)(()=>{const e=t.map(e=>{const t=`A.${e.sym}.second`;return[t,null===o||void 0===o?void 0:o.subscribe(t,t=>{if(t.length>0){const n=t[t.length-1];i(t=>({...t,[e.sym]:n.c}))}})]});return()=>{e.forEach(e=>{let[t,n]=e;null!=n&&(null===o||void 0===o||o.unsubscribe(t,n))})}},[o,n,t]),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"\u5408\u7ea6"},"symbol"),(0,wt().jsx)("td",{children:"\u4e70\u5165\u4ef7"},"cost"),(0,wt().jsx)("td",{children:"\u6570\u91cf"},"total"),(0,wt().jsx)("td",{children:"\u51bb\u7ed3\u6570\u91cf"},"frozen"),(0,wt().jsx)("td",{children:"\u65e5\u671f"},"date"),(0,wt().jsx)("td",{children:"\u64cd\u4f5c"},"op")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>{return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.sym}),(t=Kre(e.long,e.buyPrice,e.sym in r?r[e.sym]:null),null!=t[1]?(0,wt().jsx)("td",{style:{color:t[1]?"green":"red"},children:t[0]}):(0,wt().jsx)("td",{children:t[0]})),(0,wt().jsx)("td",{children:e.qty}),(0,wt().jsx)("td",{children:e.freezeQty}),(0,wt().jsx)("td",{children:kc(e.createTime)}),(0,wt().jsx)("td",{children:(0,wt().jsx)(Zre,{runner:n,symbol:e.sym})})]});var t})})]})}function Jre(e){let{taskId:t,version:n}=e;const r=(0,St().useCallback)(async e=>{const n=await async function(e,t){const n={taskId:e};return await Gu("get_params",JSON.stringify(n),t)}(t,e);if("err"in n)return n;{const e=Hu(n,["d","data","position"]);if(null!=e)return e}return{err:"no position found"}},[t,n]);return(0,wt().jsx)(Sd,{getter:r,cvt:e=>(0,wt().jsx)(Qre,{position:e,runner:t})})}function eie(e){let{dt:t,account:n,mainId:r}=e;const[i,o]=(0,St().useState)([0,100]),[a,s]=(0,St().useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[l,u]=(0,St().useState)(""),c=(0,St().useCallback)(async e=>{const i=Zc(t[0],e),o=async function(e,t,n,r,i){const o=(e>"2023-03-21"?r.rowid:r.account)+"-"+n,a=await Nc(t,o,"energy",e,e,i,!0);if("err"in a)return a;{const n=await Qu(t,e,e,1,"minute",i);return"err"in n?n:[a[0],a[1],n.results,n.prevClose||null]}}(t[0],n.symbol,n.strategy,n,e),a=`stock:${n.symbol}-${r}-${n.strategy}`,s=ic(t[0],a,e),l=async function(e,t){const n=await tc(`${qu}/historyDataRT?key=netflow-QQQ&date=${e}`,t);return"err"in n?[]:n}(t[0],e),u=async function(e,t){const n=await tc(`${qu}/historyDataRT?key=rank-QQQ&date=${e}`,t);return"err"in n?[]:n}(t[0],e),c=async function(e,t){const n=await tc(`${qu}/historyDataRT?key=vol-QQQ&date=${e}`,t);return"err"in n?[]:n}(t[0],e),d=async function(e,t){const n=await tc(`${qu}/historyDataRT?key=energy-QQQ&date=${e}`,t);return"err"in n?[]:n}(t[0],e),[h,p,f,g,m,v,y]=await Promise.all([o,s,i,l,u,c,d]);return"err"in h?h:[h[0],h[1],Lu(h[2],!1),h[3],"err"in p?[]:p,"err"in f?[]:f,g,m,v,y]},[t,n,r]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(u3,{filter:a,updateCB:s}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(a3,{symbol:"I:VIX",startDate:t[0],endDate:t[0],signals:[],zoomRange:i,setZoomRange:o,load:l===t[0]})}),(0,wt().jsx)(Sd,{onLoad:()=>u(t[0]),getter:c,cvt:e=>{const r=Pu(e[6],e=>e.ts,(e,t)=>({...e,ts:t})),s=Pu(e[7],e=>e.ts,(e,t)=>({...e,ts:t})),l=Pu(e[8],e=>e.ts,(e,t)=>({...e,ts:t})),u=e[9],c=d3(a,t[0],u),d=Vre(c),h=(e[0].length>0?_u(yc(e[0]).map(e=>[e[0],e[1]]),d):d).sort((e,t)=>e[0]-t[0]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"1/1.3"},children:(0,wt().jsx)(l9,{symbol:n.symbol,preClose:e[3],signals:h,isDay:!0,zoomRange:i,setZoomRange:o,historyData:e[2],extras:J7(e[2],c),extraLines:[[["netflow volume",r.map(e=>e.value)]],[["netflow money",r.map(e=>e.money)]],[["rank",s.map(e=>e.rank)]],[["call vol",l.map(e=>e.callVol)],["put vol",l.map(e=>e.putVol)]]]})}),(0,wt().jsx)("div",{style:{marginTop:"3rem"},children:(0,wt().jsx)(o8,{addPercent:!0,data:dc(e[0]),aggs:[]})},"detail")]})}})]})}function tie(){const e="energy buy";return(0,wt().jsx)("main",{style:{flex:1},className:"MainPage",children:(0,wt().jsx)("div",{style:{flex:1,width:"100%"},children:(0,wt().jsx)(Xre,{taskId:`stock:QQQ-95-${e}`,isGuest:!0,account:{rowid:113,account:"guest",symbol:"QQQ",strategy:e,total:1,betPercent:.01,desc:"guest account",freeze:0,update_time:0}})})})}function nie(e,t,n){const r=e.length;var i=t;const o=e.substring(2,r-15),a="C"===e[r-9],s=parseInt(e.substring(r-8))/1e3;if(o.startsWith("GOOG")){cc(n)>="2022-07-18"&&s>1e3&&(i=20*t)}return a?i-s:s-i}function rie(e){const[t,n]=(0,St().useState)(()=>null),{symbol:r,startDate:i,points:o}=e,a=St().createRef();return(0,St().useEffect)(()=>{if(null==t)n("loading"),oc(r,i).then(e=>{"err"in e||n(e)});else if("loading"!==t&&"stock"in t){const e=t.stock.prevClose,n=t.stock.results.map(t=>[t.t,null!=e&&e>0?(100*(t.c/e-1)).toFixed(3)+"%":"0%"]),i=t.stock.results.map(e=>[e.t,nie(r,e.c,e.t)]),s=t.option.results.map(e=>[e.t,e.c]),l=t.cacheOption.results.map(e=>[e.t,e.c]),[u,[c,d,h,p]]=sc(i,s,l,n),f=[];o.forEach(e=>{const t=function(e,t){for(var n=1;n<t.length;n++)if(t[n-1][0]<e&&e<=t[n][0])return[t[n][0],t[n][1]];return null}(e[0],s);null!=t&&f.push({name:"\u4e70\u5356",value:e[1]?"\u5356":"\u4e70",coord:[nc.format(new Date(t[0])),t[1]],itemStyle:{color:e[1]?"gray":"black"}})});const g=O2(u.map(e=>nc.format(new Date(e))),[[[`stock(\u56fe\u5f62\u7528\u51c0\u503c,${r})`,c],["option",d,f],["interpolate",h],["increase",p,!0]]]);if(null!=a.current){XD(a.current).setOption(g)}}return()=>{console.log("debug state,exit effect")}},[r,i,t,o]),null==t||"loading"===t?(0,wt().jsx)(wd,{}):(0,wt().jsx)("div",{ref:a,style:{width:"100%",aspectRatio:"4/3"}})}function iie(e){const{date:t,points:n,symbol:r}=e,i=(0,St().useCallback)(async e=>{const n=await Qu(r,t,t,1,"minute",e);return"err"in n?n:Lu(n.results,!1)},[r,t]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>{const t=new Map;return n.forEach(e=>{const n=6e4*Math.floor(e[0]/6e4),r=t.get(n),i=e[1]?"@Color0red@@\u5356":"@Color0green@@\u4e70";null!=r?r.push(i):t.set(n,[i])}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(i3,{symbol:r,historyData:e,isDay:!0,signals:Array.from(t.entries()).map(e=>[e[0],e[1]])})})}})}function oie(){let e=Vr(),[t]=ji(),n=t.has("points")?JSON.parse(t.get("points")):[];return(0,wt().jsxs)("main",{style:{padding:"1rem 0"},children:[(0,wt().jsx)("h2",{children:"Option"}),e.contract.startsWith("O:")?(0,wt().jsx)(rie,{symbol:e.contract,startDate:e.startDate,points:n}):(0,wt().jsx)(iie,{symbol:e.contract,date:e.startDate,points:n})]})}function aie(){let e=Vr();const[t]=ji(),n=t.get("start"),r=t.get("end"),i=t.get("unit");var o,a,s;if(null!=n&&null!=r)o=n,a=r;else{const e=(new Date).getTime();o=cc(e-5184e6),a=cc(e)}return s=o===a?"minute"===i||"second"===i?i:"minute":"day",(0,wt().jsxs)("main",{style:{padding:"1rem 0"},children:[(0,wt().jsxs)("h2",{children:["Stock: ",e.stockId,",",o,"-",a,",unit:",s]}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(o3,{symbol:e.stockId,startDate:o,endDate:a,signals:[],unit2:s})})]})}function sie(){let e=Vr();return(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"1/1"},children:(0,wt().jsx)(Y2,{symbol:e.symbol,startDate:e.date,endDate:e.date})})}function lie(e){return kc(e)+(Math.floor(e)%1e3/1e3).toFixed(3).substring(1)}async function uie(e,t){const n=await async function(e,t){const n=new URLSearchParams;n.set("command","bids"),n.set("oid",e);const r=`${qu}/position_new?${n.toString()}`,i=await tc(r,t);if("err"in i)return i;if("d"in i){const e=i;return[e.d,e.od]}return{err:"fail to get data by key:d"}}(e,t);if("err"in n)return n;{const o=await Dc(null,e,t);if("err"in o)return o;{const e=n[1];var r,i;if(n[0].length>0){const e=n[0];r=(e[0].timestamp-6e5).toFixed(),i=(e[e.length-1].timestamp+6e5).toFixed()}else r=(e.createTime-6e5).toFixed(),i=(e.createTime+6e5).toFixed();const a=await Qu(e.symbol,r,i,1,"second",t);return"err"in a?a:[n[0],n[1],o.sort((e,t)=>e.timestamp-t.timestamp),a.results]}}}function cie(e){const{trades:t}=e;return(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Trade Id"},"tid"),(0,wt().jsx)("td",{children:"Order Id"},"oid"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Contract"},"symbol"),(0,wt().jsx)("td",{children:"Side"},"side"),(0,wt().jsx)("td",{children:"Price"},"price"),(0,wt().jsx)("td",{children:"Buy Price"},"bprice"),(0,wt().jsx)("td",{children:"QTY"},"qty"),(0,wt().jsx)("td",{children:"Time"},"time")]})}),(0,wt().jsx)("tbody",{children:t.map(e=>{const t=e.runner.split(":");var n="";return t.length>3&&(n=t[t.length-2]+":"+t[t.length-3]),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.tradeID},"tid"),(0,wt().jsx)("td",{children:e.orderId},"oid"),(0,wt().jsx)("td",{children:n},"runner"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,wt().jsx)("td",{children:e.price.toLocaleString()},"price"),(0,wt().jsx)("td",{children:e.buyPrice.toLocaleString()},"bprice"),(0,wt().jsx)("td",{children:e.qty},"qty"),(0,wt().jsx)("td",{children:lie(e.timestamp)},"time")]})})})]})}function die(e){const{data:[t,n,r,i]}=e,o=St().createRef();return(0,St().useEffect)(()=>{if(null!=o.current){const a=XD(o.current),s=t.map(e=>[e.timestamp,e.ask]),l=t.map(e=>[e.timestamp,e.bid<.001?e.ask:e.bid]),u=r.map(e=>[e.timestamp,e.price]),c=t.map(e=>[e.timestamp,e.price]),d=sc(i.map(e=>[e.t,e]),s,l,u,c,null!=n.signal&&t.length>0?[[n.signal.timestamp,t[0].price]]:[]),h=[],p=d[0],f=d[0].map(e=>lie(e));var e=null;d[1][0].forEach((t,n)=>{if("string"===typeof t){if(null!=e){const t=e.c;h.push({t:p[n],o:t,c:t,h:t,l:t,v:0,vw:t})}}else h.push(t),e=t});const g=[];d[1][4].forEach((e,t)=>{"string"!==typeof e&&g.push({name:"price",value:"price",coord:[f[t],e],itemStyle:{color:"red"}})});const m=[];d[1][3].forEach((e,t)=>{"string"!==typeof e&&m.push({name:"trade",value:"trade",coord:[f[t],e],itemStyle:{color:"purple"}})});const v=[];d[1][5].forEach((e,t)=>{"string"!==typeof e&&v.push({name:"signal",value:"signal",coord:[f[t],e],itemStyle:{color:"yellow"}})});const y=O2(f,[],{y1:h.map(e=>[e.o,e.c,e.l,e.h]),kCandleLines:[["ask",d[1][1],{lineStyle:{width:3}}],["bid",d[1][2],{lineStyle:{width:3}}],["trade",d[1][3],{lineStyle:{width:3},markPoint:{data:m}}],["price",d[1][4],{markPoint:{data:g}}],["signal",d[1][5],{markPoint:{data:v}}]],y2:[["volume",h.map(e=>e.v)]]},!1,null,!1);a.setOption(y)}},[t,r,i,n]),(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{ref:o,style:{width:"100%",aspectRatio:"4/3"}}),(0,wt().jsx)(cie,{trades:r})]})}function hie(){const e=Vr(),t=(0,St().useCallback)(async t=>await uie(e.orderId,t),[e.orderId]);return(0,wt().jsx)(Sd,{getter:t,cvt:e=>(0,wt().jsx)(die,{data:e})})}const pie=["FILLED","NEW","PARTIALLY_FILLED","CANCELED","ERROR"];function fie(){const[e,t]=(0,St().useState)(1),[n,r]=(0,St().useState)(0),i=cc((new Date).getTime()),[o,a]=(0,St().useState)(i),[s,l]=(0,St().useState)(i),[u,c]=(0,St().useState)(null),d=(0,St().useCallback)(async t=>await async function(e,t,n,r,i){const o=new URLSearchParams;o.set("command","orders"),o.set("startDate",e),o.set("endDate",t),o.set("page",n+""),null!=r&&o.set("status",r);const a=`${qu}/position_new?${o.toString()}`,s=await tc(a,i);if("err"in s)return s;if("d"in s){const e=s;return[e.d,Math.ceil(e.t/40)]}return{err:"fail to get data by key:d"}}(o,s,e,u,t),[e,o,s,u]);return(0,wt().jsxs)("main",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f"}),(0,wt().jsx)("input",{value:o,onChange:e=>{const t=e.target.value;a(t),t>s&&l(t)},type:"date"}),(0,wt().jsx)("span",{children:"\u7ed3\u675f\u65e5\u671f"}),(0,wt().jsx)("input",{value:s,onChange:e=>{const t=e.target.value;l(t),t<o&&a(t)},type:"date"}),(0,wt().jsx)("span",{children:"\u72b6\u6001"}),(0,wt().jsxs)("select",{value:u||"all",onChange:e=>{const n=e.target.value;c("all"===n?null:n),t(1)},children:[(0,wt().jsx)("option",{value:"all",children:"all"},"all"),pie.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))]})]}),(0,wt().jsx)(Sd,{getter:d,cvt:n=>(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(H9,{count:n[1],page:e,onChange:(e,n)=>{t(n)}})}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:"Account"},"aid"),(0,wt().jsx)("td",{children:"Order Id"},"oid"),(0,wt().jsx)("td",{children:"Symbol"},"symbol"),(0,wt().jsx)("td",{children:"Runner"},"runner"),(0,wt().jsx)("td",{children:"Type"},"type"),(0,wt().jsx)("td",{children:"Side"},"side"),(0,wt().jsx)("td",{children:"Price"},"price"),(0,wt().jsx)("td",{children:"QTY"},"qty"),(0,wt().jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,wt().jsx)("td",{children:"TIF"},"tif"),(0,wt().jsx)("td",{children:"Status|Delay"},"status"),(0,wt().jsx)("td",{children:"Time"},"time"),(0,wt().jsx)("td",{children:"Message"},"message")]})}),(0,wt().jsx)("tbody",{children:n[0].map(e=>{const t=e.runner.split(":");var n=null;return null!=e.signal&&(n=e.updateTime-e.signal.timestamp),(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e.accountId},"aid"),(0,wt().jsx)("td",{children:(0,wt().jsx)(Mi,{to:`/order_inspect/${e.id}`,children:e.id})},"oid"),(0,wt().jsx)("td",{children:e.symbol},"symbol"),(0,wt().jsx)("td",{children:t[t.length-1]},"runner"),(0,wt().jsx)("td",{children:e.type},"type"),(0,wt().jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,wt().jsx)("td",{children:e.price},"price"),(0,wt().jsx)("td",{children:e.qty},"qty"),(0,wt().jsx)("td",{children:e.tradeQty},"trade_qty"),(0,wt().jsx)("td",{children:e.tif},"tif"),(0,wt().jsxs)("td",{children:[(0,wt().jsx)("p",{style:{background:"FILLED"!==e.status?"yellow":"transparent",color:"FILLED"!==e.status?"black":"white"},children:e.status}),null!=n?(0,wt().jsx)("p",{style:{color:n>1e4?"red":n>5e3?"yellow":"green"},children:(n/1e3).toLocaleString()}):""]},"status"),(0,wt().jsx)("td",{children:kc(e.createTime)},"time"),(0,wt().jsx)("td",{children:e.errorMsg},"message")]})})})]})]})})]})}const gie=["second","minute","hour","day"];function mie(e){switch(e){case"second":return t5;case"minute":return 1728e5;case"hour":return 864e6;case"day":return 1728e7}}function vie(){const[e,t]=(0,St().useState)(null),[n,r]=(0,St().useState)("minute"),i=(new Date).getTime(),[o,a]=(0,St().useState)([i,i+t5]),[s,l]=(0,St().useState)(0),u=(0,St().useCallback)(async t=>{var r;return null!=e?(r="day"===n?[kc(o[0]).substring(0,10),kc(o[1]).substring(0,10)]:[o[0].toFixed(),o[1].toFixed()],await Qu(e,r[0],r[1],1,n,t)):{err:"symbol is empty"}},[s]);return(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Symbol:"}),(0,wt().jsx)("input",{type:"text",maxLength:30,value:e||"",onChange:e=>{t(e.target.value)}}),(0,wt().jsx)("span",{children:"Unit:"}),(0,wt().jsx)("select",{value:n,onChange:e=>{const t=e.target.value;r(t);const n=mie(t);a(e=>[e[0],Math.min(e[0]+n,e[1])])},children:gie.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))}),"day"!==n?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("span",{children:"StartTime:"}),(0,wt().jsx)("input",{type:"datetime-local",value:kc(o[0]).substring(0,16),onChange:e=>{const t=Vu(e.target.value+":00");null!=t&&a(e=>{var r=mie(n);return[t,Math.max(Math.min(t+r,e[1]),t)]})}}),(0,wt().jsx)("span",{children:"EndTime:"}),(0,wt().jsx)("input",{type:"datetime-local",value:kc(o[1]).substring(0,16),onChange:e=>{const t=Vu(e.target.value+":00");null!=t&&a(e=>{var r=mie(n);return[Math.min(t,Math.max(t-r,e[0])),t]})}})]}):(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("span",{children:"StartTime:"}),(0,wt().jsx)("input",{type:"date",value:kc(o[0]).substring(0,10),onChange:e=>{const t=Vu(e.target.value+" 00:00:00");null!=t&&a(e=>{var r=mie(n);return[t,Math.max(Math.min(t+r,e[1]),t)]})}}),(0,wt().jsx)("span",{children:"EndTime:"}),(0,wt().jsx)("input",{type:"date",value:kc(o[1]).substring(0,10),onChange:e=>{const t=Vu(e.target.value+" 00:00:00");null!=t&&a(e=>{var r=mie(n);return[Math.min(t,Math.max(t-r,e[0])),t]})}})]}),(0,wt().jsx)("button",{onClick:()=>{l(e=>e+1)},children:"Ok"})]}),null!=e&&(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"4/3"},children:(0,wt().jsx)(Sd,{getter:u,cvt:t=>(0,wt().jsx)(i3,{historyData:t.results,isDay:"day"!==n,signals:[],symbol:e||"empty"})})})]})}function yie(e){return(0,qe().Ay)("MuiTable",e)}(0,Ze().A)("MuiTable",["root","stickyHeader"]);const xie=["className","component","padding","size","stickyHeader"],bie=(0,H().Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,Dt().A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})}),wie="table",Sie=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTable"}),{className:r,component:i=wie,padding:o="normal",size:a="medium",stickyHeader:s=!1}=n,l=(0,jt().A)(n,xie),u=(0,Dt().A)({},n,{component:i,padding:o,size:a,stickyHeader:s}),c=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,$e().A)(r,yie,t)})(u),d=St().useMemo(()=>({padding:o,size:a,stickyHeader:s}),[o,a,s]);return(0,wt().jsx)(vee.Provider,{value:d,children:(0,wt().jsx)(bie,(0,Dt().A)({as:i,role:i===wie?null:"table",ref:t,className:(0,Pt().A)(c.root,r),ownerState:u},l))})});function _ie(e){return(0,qe().Ay)("MuiToolbar",e)}(0,Ze().A)("MuiToolbar",["root","gutters","regular","dense"]);const Aie=["className","component","disableGutters","variant"],kie=(0,H().Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})},e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar}),Cie=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:a="regular"}=n,s=(0,jt().A)(n,Aie),l=(0,Dt().A)({},n,{component:i,disableGutters:o,variant:a}),u=(e=>{const{classes:t,disableGutters:n,variant:r}=e,i={root:["root",!n&&"gutters",r]};return(0,$e().A)(i,_ie,t)})(l);return(0,wt().jsx)(kie,(0,Dt().A)({as:i,className:(0,Pt().A)(u.root,r),ref:t,ownerState:l},s))}),Mie=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],Iie=St().forwardRef(function(e,t){var n,r,i,o,a,s,l,u;const{backIconButtonProps:c,count:d,disabled:h=!1,getItemAriaLabel:p,nextIconButtonProps:f,onPageChange:g,page:m,rowsPerPage:v,showFirstButton:y,showLastButton:x,slots:b={},slotProps:w={}}=e,S=(0,jt().A)(e,Mie),_=xa(),A=null!=(n=b.firstButton)?n:F5,k=null!=(r=b.lastButton)?r:F5,C=null!=(i=b.nextButton)?i:F5,M=null!=(o=b.previousButton)?o:F5,I=null!=(a=b.firstButtonIcon)?a:D9,T=null!=(s=b.lastButtonIcon)?s:j9,D=null!=(l=b.nextButtonIcon)?l:Rne,j=null!=(u=b.previousButtonIcon)?u:Lne,P=_?k:A,L=_?C:M,R=_?M:C,E=_?A:k,N=_?w.lastButton:w.firstButton,O=_?w.nextButton:w.previousButton,z=_?w.previousButton:w.nextButton,B=_?w.firstButton:w.lastButton;return(0,wt().jsxs)("div",(0,Dt().A)({ref:t},S,{children:[y&&(0,wt().jsx)(P,(0,Dt().A)({onClick:e=>{g(e,0)},disabled:h||0===m,"aria-label":p("first",m),title:p("first",m)},N,{children:_?(0,wt().jsx)(T,(0,Dt().A)({},w.lastButtonIcon)):(0,wt().jsx)(I,(0,Dt().A)({},w.firstButtonIcon))})),(0,wt().jsx)(L,(0,Dt().A)({onClick:e=>{g(e,m-1)},disabled:h||0===m,color:"inherit","aria-label":p("previous",m),title:p("previous",m)},null!=O?O:c,{children:_?(0,wt().jsx)(D,(0,Dt().A)({},w.nextButtonIcon)):(0,wt().jsx)(j,(0,Dt().A)({},w.previousButtonIcon))})),(0,wt().jsx)(R,(0,Dt().A)({onClick:e=>{g(e,m+1)},disabled:h||-1!==d&&m>=Math.ceil(d/v)-1,color:"inherit","aria-label":p("next",m),title:p("next",m)},null!=z?z:f,{children:_?(0,wt().jsx)(j,(0,Dt().A)({},w.previousButtonIcon)):(0,wt().jsx)(D,(0,Dt().A)({},w.nextButtonIcon))})),x&&(0,wt().jsx)(E,(0,Dt().A)({onClick:e=>{g(e,Math.max(0,Math.ceil(d/v)-1))},disabled:h||m>=Math.ceil(d/v)-1,"aria-label":p("last",m),title:p("last",m)},B,{children:_?(0,wt().jsx)(I,(0,Dt().A)({},w.firstButtonIcon)):(0,wt().jsx)(T,(0,Dt().A)({},w.lastButtonIcon))}))]}))});function Tie(e){return(0,qe().Ay)("MuiTablePagination",e)}const Die=(0,Ze().A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var jie;const Pie=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],Lie=(0,H().Ay)(_ee,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}}),Rie=(0,H().Ay)(Cie,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,Dt().A)({[`& .${Die.actions}`]:t.actions},t.toolbar)})(e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Die.actions}`]:{flexShrink:0,marginLeft:20}}}),Eie=(0,H().Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),Nie=(0,H().Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(e=>{let{theme:t}=e;return(0,Dt().A)({},t.typography.body2,{flexShrink:0})}),Oie=(0,H().Ay)(jl,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,Dt().A)({[`& .${Die.selectIcon}`]:t.selectIcon,[`& .${Die.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Die.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),zie=(0,H().Ay)(P8,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Bie=(0,H().Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(e=>{let{theme:t}=e;return(0,Dt().A)({},t.typography.body2,{flexShrink:0})});function Fie(e){let{from:t,to:n,count:r}=e;return`${t}\u2013${n} of ${-1!==r?r:`more than ${n}`}`}function $ie(e){return`Go to ${e} page`}const Vie=St().forwardRef(function(e,t){var n;const r=(0,_().b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=Iie,backIconButtonProps:o,className:a,colSpan:s,component:l=_ee,count:u,disabled:c=!1,getItemAriaLabel:d=$ie,labelDisplayedRows:h=Fie,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:f,onPageChange:g,onRowsPerPageChange:m,page:v,rowsPerPage:y,rowsPerPageOptions:x=[10,25,50,100],SelectProps:b={},showFirstButton:w=!1,showLastButton:S=!1,slotProps:A={},slots:k={}}=r,C=(0,jt().A)(r,Pie),M=r,I=(e=>{const{classes:t}=e;return(0,$e().A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Tie,t)})(M),T=null!=(n=null==A?void 0:A.select)?n:b,D=T.native?"option":zie;let j;l!==_ee&&"td"!==l||(j=s||1e3);const P=(0,le().A)(T.id),L=(0,le().A)(T.labelId);return(0,wt().jsx)(Lie,(0,Dt().A)({colSpan:j,ref:t,as:l,ownerState:M,className:(0,Pt().A)(I.root,a)},C,{children:(0,wt().jsxs)(Rie,{className:I.toolbar,children:[(0,wt().jsx)(Eie,{className:I.spacer}),x.length>1&&(0,wt().jsx)(Nie,{className:I.selectLabel,id:L,children:p}),x.length>1&&(0,wt().jsx)(Oie,(0,Dt().A)({variant:"standard"},!T.variant&&{input:jie||(jie=(0,wt().jsx)(Ao,{}))},{value:y,onChange:m,id:P,labelId:L},T,{classes:(0,Dt().A)({},T.classes,{root:(0,Pt().A)(I.input,I.selectRoot,(T.classes||{}).root),select:(0,Pt().A)(I.select,(T.classes||{}).select),icon:(0,Pt().A)(I.selectIcon,(T.classes||{}).icon)}),disabled:c,children:x.map(e=>(0,St().createElement)(D,(0,Dt().A)({},!eo(D)&&{ownerState:M},{className:I.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e))})),(0,wt().jsx)(Bie,{className:I.displayedRows,children:h({from:0===u?0:v*y+1,to:-1===u?(v+1)*y:-1===y?u:Math.min(u,(v+1)*y),count:-1===u?-1:u,page:v})}),(0,wt().jsx)(i,{className:I.actions,backIconButtonProps:o,count:u,nextIconButtonProps:f,onPageChange:g,page:v,rowsPerPage:y,showFirstButton:w,showLastButton:S,slotProps:A.actions,slots:k.actions,getItemAriaLabel:d,disabled:c})]})}))}),Wie=(0,Y().A)((0,wt().jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Hie(e){return(0,qe().Ay)("MuiTableSortLabel",e)}const Gie=(0,Ze().A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),Uie=["active","children","className","direction","hideSortIcon","IconComponent"],Xie=(0,H().Ay)(lu,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,[`& .${Gie.icon}`]:{opacity:.5}},[`&.${Gie.active}`]:{color:(t.vars||t).palette.text.primary,[`& .${Gie.icon}`]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}}),Yie=(0,H().Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,U().A)(n.direction)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})}),qie=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=Wie}=n,u=(0,jt().A)(n,Uie),c=(0,Dt().A)({},n,{active:r,direction:a,hideSortIcon:s,IconComponent:l}),d=(e=>{const{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active"],icon:["icon",`iconDirection${(0,U().A)(n)}`]};return(0,$e().A)(i,Hie,t)})(c);return(0,wt().jsxs)(Xie,(0,Dt().A)({className:(0,Pt().A)(d.root,o),component:"span",disableRipple:!0,ownerState:c,ref:t},u,{children:[i,s&&!r?null:(0,wt().jsx)(Yie,{as:l,className:(0,Pt().A)(d.icon),ownerState:c})]}))}),Zie=[{id:"ticker",numeric:!1,sortable:!1,disablePadding:!0,label:"\u5408\u7ea6"},{id:"volume",numeric:!0,sortable:!0,disablePadding:!1,label:"\u6210\u4ea4\u91cf"},{id:"tradeMoney",numeric:!0,disablePadding:!1,sortable:!0,label:"\u6210\u4ea4\u91d1\u989d"},{id:"close",numeric:!0,sortable:!1,disablePadding:!1,label:"\u6536\u76d8\u4ef7"},{id:"lowhigh",numeric:!0,sortable:!1,disablePadding:!1,label:"\u4ef7\u683c\u533a\u95f4"},{id:"oi",numeric:!0,sortable:!0,disablePadding:!1,label:"\u6301\u4ed3\u91cf"},{id:"netPremium",numeric:!0,sortable:!0,disablePadding:!1,label:"\u51c0\u8d44\u91d1\u6d41"},{id:"netVolume",sortable:!0,numeric:!0,disablePadding:!1,label:"\u51c0\u8d44\u91d1\u6d41\u6570\u91cf"}];function Kie(e){const{data:t,selectContract:n}=e,[r,i]=St().useState(["oi","desc"]),[o,a]=St().useState(0),[s,l]=St().useState(20),u=St().useMemo(()=>{const e="asc"===r[1]?1:-1;return t.sort((t,n)=>"tradeMoney"===r[0]?(t.volume*t.vw-n.volume*n.vw)*e:(t[r[0]]-n[r[0]])*e)},[t,r]),c=o*s,d=u.slice(c,Math.min(c+s,u.length)),h=s-d.length;return(0,wt().jsx)(A8,{sx:{width:"100%"},children:(0,wt().jsxs)(Os,{sx:{width:"100%",mb:2},children:[(0,wt().jsx)(uee,{children:(0,wt().jsxs)(Sie,{sx:{minWidth:750},"aria-labelledby":"tableTitle",size:"medium",children:[(0,wt().jsx)(mee,{children:(0,wt().jsx)(Nee,{children:Zie.map(e=>(0,wt().jsx)(_ee,{align:e.numeric?"right":"left",padding:"normal",sortDirection:r[0]===e.id&&r[1],children:e.sortable?(0,wt().jsxs)(qie,{active:r[0]===e.id,direction:r[0]===e.id?r[1]:"asc",onClick:()=>{i(t=>[e.id,e.id===t[0]?"asc"===t[1]?"desc":"asc":"desc"]),a(0)},children:[e.label,r[0]===e.id?(0,wt().jsx)(A8,{component:"span",sx:Oee,children:"desc"===r[1]?"sorted descending":"sorted ascending"}):null]}):(0,wt().jsx)(wt().Fragment,{children:e.label})},e.id))})}),(0,wt().jsxs)(Tee,{children:[d.map((e,t)=>(0,wt().jsxs)(Nee,{hover:!0,role:"checkbox",tabIndex:-1,sx:{cursor:"pointer"},onClick:()=>n(e.ticker),children:[(0,wt().jsx)(_ee,{component:"th",id:e.ticker,scope:"row",children:e.ticker}),(0,wt().jsx)(_ee,{align:"right",children:e.volume.toLocaleString()}),(0,wt().jsx)(_ee,{align:"right",children:(e.volume*e.vw*100).toLocaleString()}),(0,wt().jsx)(_ee,{align:"right",children:e.close}),(0,wt().jsxs)(_ee,{align:"right",children:[e.low,"-",e.high]}),(0,wt().jsx)(_ee,{align:"right",children:e.oi}),(0,wt().jsx)(_ee,{align:"right",children:e.netPremium.toLocaleString()}),(0,wt().jsx)(_ee,{align:"right",children:e.netVolume.toLocaleString()})]},e.ticker)),h>0&&(0,wt().jsx)(Nee,{style:{height:53*h},children:(0,wt().jsx)(_ee,{colSpan:6})})]})]})}),(0,wt().jsx)(Vie,{rowsPerPageOptions:[10,20,30,50],component:"div",count:u.length,rowsPerPage:s,page:o,onPageChange:(e,t)=>{a(t)},onRowsPerPageChange:e=>{l(parseInt(e.target.value,10)),a(0)}})]})})}const Qie={201:"Canceled",202:"Late and Out Of Sequence",203:"Last and Canceled",204:"Late",205:"Opening Trade and Canceled",206:"Opening Trade, Late, and Out Of Sequence",207:"Only Trade and Canceled",208:"Opening Trade and Late",209:"Automatic Execution",210:"Reopening Trade",219:"Intermarket Sweep Order",227:"Single Leg Auction Non ISO",228:"Single Leg Auction ISO",229:"Single Leg Cross Non ISO",230:"Single Leg Cross ISO",231:"Single Leg Floor Trade",232:"Multi Leg auto-electronic trade",233:"Multi Leg Auction",234:"Multi Leg Cross",235:"Multi Leg floor trade",236:"Multi Leg auto-electronic trade against single leg(s)",237:"Stock Options Auction",238:"Multi Leg Auction against single leg(s)",239:"Multi Leg floor trade against single leg(s)",240:"Stock Options auto-electronic trade",241:"Stock Options Cross",242:"Stock Options floor trade",243:"Stock Options auto-electronic trade against single leg(s)",244:"Stock Options Auction against single leg(s)",245:"Stock Options floor trade against single leg(s)",246:"Multi Leg Floor Trade of Proprietary Products",247:"Multilateral Compression Trade of Proprietary Products",248:"Extended Hours Trade"};function Jie(e){const t=(e/1e6+"").slice(10,13);return nc.format(e/1e6)+"."+t}function eoe(e){const{dt:t,contract:n,tradeData:r}=e,i=(0,St().useCallback)(async e=>{const r=await Qc([t,n,"quote"],e);return"err"in r?r:r.sort((e,t)=>e.sip_timestamp-t.sip_timestamp)},[t,n]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>{const t=function(e){const t=[],n=[],r=[];for(e.forEach(e=>{n.push(0),r.push([])});;){for(var i=null,o=0;o++<n.length;){const t=o-1,r=n[o-1],a=e[t];if(r<a.data.length){const e=a.getTs(a.data[r]);(null==i||e<i)&&(i=e)}}if(null==i)break;for(o=0;o++<n.length;){const t=o-1,s=n[o-1],l=e[t];var a=!1;if(s<l.data.length){const e=l.data[s];l.getTs(e)===i&&(r[t].push(e),n[t]++,a=!0)}a||r[t].push(l.fill(s>0?l.data[s-1]:null,i))}t.push(i)}return[t,r]}([{data:r,getTs:e=>e.sip_timestamp,fill:(e,t)=>null==e?{price:0,conditions:[],size:0,sip_timestamp:t}:{...e,sip_timestamp:t,size:0}},{data:e,getTs:e=>e.sip_timestamp,fill:(e,t)=>null==e?{ask_price:0,ask_size:0,bid_price:0,bid_size:0,sip_timestamp:t}:{...e,sip_timestamp:t}}]),n=t[1][0],i=t[1][1];return console.log("debug join:",t),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(Fte,{x:t[0].map(Jie),y:[[["ask",i.map(e=>e.ask_price)],["trade",n.map(e=>e.price)],["bid",i.map(e=>e.bid_price)]],[["trade volume",n.map(e=>e.size)]]]})})}})}function toe(e){const{data:t,dt:n,contract:r}=e,[i,o]=(0,St().useState)(null),[a,s]=(0,St().useState)(null),l=(0,St().useMemo)(()=>{const e=new Set;return t.forEach(t=>t.conditions.forEach(t=>e.add(t))),Array.from(e).sort()},[t]),[u,c]=(0,St().useMemo)(()=>{const e=null!=a?t.filter(e=>e.conditions.find(e=>a.has(e))):t,n=new Set,r=[];return t.forEach(e=>{const t=kc(e.sip_timestamp/1e6).slice(0,16);n.has(t)||(r.push(t),n.add(t))}),[e,r]},[t,a]);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("h3",{children:"Trade Detail"}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u4ea4\u6613\u6761\u4ef6:"}),(0,wt().jsx)(E8,{selected:null!=a?Array.from(a).map(e=>""+e):[],data:l.map(e=>[e+"",e in Qie?Qie[e]:""]),select:e=>{0===e.length?s(null):s(new Set(e.map(e=>parseInt(e))))}})]}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(Fte,{x:u.map(e=>Jie(e.sip_timestamp)),y:[[["price",u.map(e=>e.price)]],[["volume",u.map(e=>e.size)]]]})}),(0,wt().jsx)("h3",{children:"Biding Detail"}),(0,wt().jsx)("div",{children:(0,wt().jsxs)("select",{value:i||"",onChange:e=>{const t=e.target.value;o(""===t?null:t)},children:[(0,wt().jsx)("option",{value:"",children:"none"},""),c.map(e=>(0,wt().jsx)("option",{value:e,children:e.slice(11)},e))]})}),null!=i&&(0,wt().jsx)(eoe,{tradeData:u.filter(e=>kc(e.sip_timestamp/1e6).slice(0,16)===i),dt:i+":00",contract:r})]})}function noe(e){const{dt:t,contract:n}=e,r=(0,St().useCallback)(async e=>{const r=await Qc([t,n,"trade"],e);return"err"in r?r:r.sort((e,t)=>e.sip_timestamp-t.sip_timestamp)},[t,n]);return(0,wt().jsx)(Sd,{getter:r,cvt:e=>(0,wt().jsx)("div",{children:(0,wt().jsx)(toe,{data:e,dt:t,contract:n})})})}function roe(e){const{dt:t,contract:n,aggs:r,preClose:i}=e,o=(0,St().useCallback)(async e=>{const r=await Qc([t,n,"net_flow"],e);if("err"in r)return r;return r.map(e=>3===e.length?[...e,0,0,0]:e)},[t,n]);return(0,wt().jsx)(Sd,{getter:o,cvt:e=>{const t=Pu(e,e=>6e4*e[0],(e,t)=>[Math.floor(t/6e4),0,0,0,0,0]),n=t.map(e=>e[1]),o=t.map(e=>e[3]),a=t.map(e=>e[4]),s=t.map(e=>e[5]);return(0,wt().jsx)(i3,{symbol:"QQQ",signals:[],preClose:i,isDay:!0,historyData:r,extraLines:[[["net flow",n]],[["bid",o],["mid",a],["ask",s]]]})}})}function ioe(e){const{dt:t,data:n,summary:r}=e,[i,o]=(0,St().useState)(null),a=n.results,s=null!=n.prevClose?n.prevClose:n.results.length>0?n.results[0].o:null;if(null!=s){const e=[],n=[],l=[],u=[];r.flow.call.reduce((t,n)=>{const r=t[0]+n[1][0],i=t[1]+n[1][1];return e.push(r),l.push(i),[r,i]},[0,0]),r.flow.put.reduce((e,t)=>{const r=e[0]+t[1][0],i=e[1]+t[1][1];return n.push(r),u.push(i),[r,i]},[0,0]);const c=Array.from({length:e.length}).map((t,r)=>e[r]-n[r]),d=Array.from({length:e.length}).map((e,t)=>l[t]-u[t]);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)("h2",{children:"Flow Summary:"}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"1/1"},children:(0,wt().jsx)(Fte,{x:a.map(e=>nc.format(e.t)),y:[[["stock",a.map(e=>e.c)]],[["net money",c]],[["call money",e],["put money",n]],[["net volume",d]],[["call volume",l],["put volume",u]]]})}),null!=i&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("h3",{children:["Net Flow:",(0,wt().jsx)(u5,{label:i,onDelete:()=>o(null)})]}),(0,wt().jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,wt().jsx)(roe,{dt:t,aggs:a,preClose:s,contract:i})}),(0,wt().jsx)("div",{style:{width:"100%"},children:(0,wt().jsx)(noe,{dt:t,contract:i})})]}),(0,wt().jsx)(Kie,{data:r.summary,selectContract:o})]})}return(0,wt().jsx)("p",{children:"Invalid Day Candle!"})}function ooe(e){const{dt:t}=e,n=(0,St().useCallback)(async e=>{const n=await Qu("QQQ",t,t,1,"minute",e);if("err"in n)return n;{const r=await Qc(t,e);if("err"in r)return r;{const e={...n,results:Pu(n.results,e=>e.t,(e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c}))},t=r,i={...t,flow:{call:Pu(t.flow.call,e=>6e4*e[0],(e,t)=>[Math.floor(t/6e4),[0,0]]),put:Pu(t.flow.put,e=>6e4*e[0],(e,t)=>[Math.floor(t/6e4),[0,0]])}};return[e,i]}}},[t]);return(0,wt().jsx)(Sd,{getter:n,cvt:e=>(0,wt().jsx)(ioe,{dt:t,data:e[0],summary:e[1]})})}function aoe(e){const[t,n]=(0,St().useState)(null);return(0,wt().jsxs)("main",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u9009\u62e9\u65e5\u671f:"}),(0,wt().jsxs)("select",{value:t||"none",onChange:e=>{const t=e.target.value;n("none"===t?null:t)},children:[(0,wt().jsx)("option",{value:"none",children:"none"},"none"),e.dates.map(e=>(0,wt().jsx)("option",{value:e,children:e},e))]})]}),null!=t&&(0,wt().jsx)("div",{children:(0,wt().jsx)(ooe,{dt:t})})]})}function soe(){const e=(0,St().useCallback)(async e=>await Qc(null,e),[]);return(0,wt().jsx)(Sd,{getter:e,cvt:e=>(0,wt().jsx)(aoe,{dates:e})})}async function loe(e){const t=`${qu}/task?command=get_running_tasks`,n=await tc(t,e);if("err"in n)return n;if("d"in n&&null!=n.d){return n.d.map(e=>[`stock:${e[0]}-${e[1]}`,e[0],e[1],e[2],e[3]])}{const e=n;return{err:e.timeout?"worker timeout":e.e}}}async function uoe(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new URLSearchParams;r.set("command","accounts"),null!=e&&r.set("aid",e),n&&r.set("group","1");const i=`${qu}/position_new?${r.toString()}`,o=await tc(i,t);return"err"in o?o:"d"in o?o.d:{err:"fail to get data by key:d"}}function coe(e){let{refresh:t,data:n}=e;const[r,i]=n,[o,a]=(0,St().useState)(null),[s,l]=(0,St().useState)(null),[u,c]=(0,St().useState)(""),[d,h]=(0,St().useState)(null),p=()=>l(null),f=Fr();const g=(0,St().useMemo)(()=>{const e=new Map;return r[1].forEach(t=>{t.account.length>0&&e.set(t.rowid+"",t.account)}),e},[r]);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,wt().jsx)("span",{children:"Create Task: "}),null!=r&&!("err"in r)&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)("button",{onClick:e=>{if(r[1].length>0){const e=r[1][0];a(e);const t=r[0].find(t=>t.isBuy&&t.name===e.strategy),n=r[0].find(e=>!e.isBuy);null!=t&&null!=n&&l({stock:e.symbol,buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params})}},children:"New Task"}),(0,wt().jsx)("span",{children:"Query:"}),(0,wt().jsx)("input",{value:u,onChange:e=>c(e.target.value)})]})]}),(0,wt().jsxs)(m4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,wt().jsx)("thead",{children:(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("th",{children:"Stock"}),(0,wt().jsx)("th",{children:"Status"}),(0,wt().jsx)("th",{children:"Desc"}),(0,wt().jsx)("th",{children:"Strategy"}),(0,wt().jsx)("th",{children:"Group"}),(0,wt().jsx)("th",{children:"Operation"})]})}),(0,wt().jsx)("tbody",{children:i.filter(e=>0===u.length||e[1].toLocaleLowerCase().search(u.toLocaleLowerCase())>-1).map(e=>{const n=e[2].search("-");if(n>-1){const r=e[2].substring(0,n),i=e[2].substring(n);return(0,wt().jsxs)("tr",{children:[(0,wt().jsx)("td",{children:e[1]}),(0,wt().jsx)("td",{children:"-"}),(0,wt().jsx)("td",{children:e[4]}),(0,wt().jsxs)("td",{children:[(0,wt().jsx)(Ci,{to:null!==g&&void 0!==g&&g.has(r)?`/trading/account/${r}`:`/accountG?mainId=${r}`,children:r}),i,"-"+((null===g||void 0===g?void 0:g.get(r))||"")]}),(0,wt().jsx)("td",{children:"-"}),(0,wt().jsxs)("td",{children:[(0,wt().jsx)(yu,{variant:"outlined",color:e[3]?"error":"success",onClick:t=>{const n=`stock:${e[1]}-${e[2]}`;h([e[1],e[2],!e[3],n])},children:e[3]?"\u505c\u6b62":"\u542f\u52a8"}),(0,wt().jsx)(yu,{variant:"outlined",onClick:t=>f(`/task_new/${e[1]}/${e[2]}`),children:"Detail"}),(0,wt().jsx)(hoe,{symbol:e[1],strategy:e[2],cb:()=>t})]})]},e[0])}return(0,wt().jsx)(wt().Fragment,{})})})]}),(0,wt().jsxs)(K6,{show:null!=s,onHide:p,children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:"Start Task"})}),(0,wt().jsx)(K6.Body,{children:null!=r&&!("err"in r)&&s?(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Select Account"}),(0,wt().jsx)("select",{value:(null===o||void 0===o?void 0:o.rowid)||"",onChange:e=>{const t=r[1].find(t=>e.target.value===t.rowid+"");if(null!=t){const e=r[0].find(e=>e.isBuy&&e.name===t.strategy);null!=e&&(a(t),l(n=>n&&{...n,stock:t.symbol,buyAlgorithm:t.strategy,buyParams:e.params}))}},children:r[1].map(e=>(0,wt().jsx)("option",{value:e.rowid+"",children:`${e.rowid}-${e.account}-${e.symbol}-${e.strategy}-${e.desc}`},e.rowid))})]}),(0,wt().jsx)(B8,{taskConfigs:r[0],taskConfig:s,realTime:!0,setTaskConfig:e=>{l(t=>null==t?null:e(t))}})]}):(0,wt().jsx)("p",{children:"Task configs not loaded"})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",onClick:p,children:"Cancel"}),(0,wt().jsx)(yu,{color:"primary",onClick:function(){if(null!=s&&null!=o){const e=o.rowid+"-"+s.buyAlgorithm;hc("new",s.stock,e,Object.fromEntries(s.buyParams.map(e=>[e.key,null==e.realValue?e.default:e.realValue])),s.sellAlgorithm,Object.fromEntries(s.sellParams.map(e=>[e.key,e.default])),null!=s.sellParamsEnd?Object.fromEntries(s.sellParamsEnd.map(e=>[e.key,e.default])):null,null,!0).then(e=>{e&&t(),l(null)})}},children:"Start"})]})]}),null!=d&&(0,wt().jsx)(Z8,{msg:`${d[2]?"\u542f\u52a8":"\u505c\u6b62"}\u4efb\u52a1:${d[0]}-${d[1]}`,callBack:e=>{(async function(e,t){const n={taskId:e},r=JSON.stringify(n),i=new URLSearchParams;i.set("command",t?"start_buy":"stop_task"),i.set("params",r);const o=`${qu}/task?${i.toString()}`,a=await tc(o,null);return!("err"in a)&&"d"in a&&a.d.data.s})(d[3],d[2]).then(n=>{const r=n?"\u6210\u529f":"\u5931\u8d25";e(`${d[2]?"\u542f\u52a8":"\u505c\u6b62"}\u4efb\u52a1:${d[0]}-${d[1]} ${r}!`),n&&t(),h(null)}).catch(()=>{e((d[2]?"\u542f\u52a8":"\u505c\u6b62")+"\u4efb\u52a1\u5931\u8d25!"),h(null)})},cancelCB:()=>{h(null)}})]})}function doe(){const[e,t]=(0,St().useState)(0),n=(0,St().useCallback)(e=>async function(e){const[t,n,r]=await Promise.all([fc(e),loe(e),uoe(null,e)]);return"err"in t||"err"in n||"err"in r?{err:"err"in t?t.err:"err"in n?n.err:"err"in r?r.err:""}:[[t,r],n]}(e),[e]),r=(0,St().useCallback)(()=>t(e=>e+1),[t]);return(0,wt().jsx)(Sd,{getter:n,cvt:e=>(0,wt().jsx)(coe,{refresh:r,data:e})})}function hoe(e){const{symbol:t,strategy:n,cb:r}=e,[i,o]=(0,St().useState)("");return(0,wt().jsx)(K8,{msg:"\u4fee\u6539\u4efb\u52a1\u5907\u6ce8",content:(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5907\u6ce8"}),(0,wt().jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:i,onChange:e=>{o(e.target.value)}})]}),callBack:e=>{(async function(e,t,n){const r=new URLSearchParams;r.set("command","update_task_desc");const i={symbol:e,strategy:t,desc:n};r.set("params",JSON.stringify(i));const o=`${qu}/task?${r.toString()}`,a=await tc(o);return"s"in a&&!0===a.s})(t,n,i).then(t=>{const n="\u66f4\u65b0"+(t?"\u6210\u529f!":"\u5931\u8d25!");t&&r(),e(n)}).catch(t=>{e("\u66f4\u65b0\u5931\u8d25!err:"+t)})}})}function poe(e){const t=new Map;return Object.keys(e).forEach(n=>{t.set(n,e[n])}),t}const foe="filterList";function goe(){let e=Vr();const[t,n]=(0,St().useState)(0),r=(0,St().useCallback)(()=>{n(e=>e+1)},[]),i=(0,St().useCallback)(async t=>{const n=await async function(e,t,n){const r=new URLSearchParams;r.set("command","get_task_config");const i={symbol:e,strategy:t};r.set("params",JSON.stringify(i));const o=`${qu}/task?${r.toString()}`,a=await tc(o,n);if("err"in a)return a;if("params"in a){const e=a,t=JSON.parse(e.params);if(2===e.defaultConfig.length){const n=e.defaultConfig.find(e=>t.buyAlgorithm.endsWith(e.id)),r=e.defaultConfig.find(e=>t.sellAlgorithm===e.id);if(null!=n&&null!=r)return{...t,stock:t.stocks[0],buyParams:poe(t.buyParams),sellParams:poe(t.sellParams),defaultSellParams:JSON.parse(r.params),defaultBuyParams:JSON.parse(n.params)}}return{err:"fail to get default params"}}return{err:"key params not found"}}(e.stockId,e.strategyId,t),r=await $8(t);if(!("err"in r)&&!("err"in n)){const e=n.defaultBuyParams,t=r.map(e=>e.name);if(t.length>0&&null!=e.find(e=>e.key===foe)){const r=e.map(e=>e.key===foe?{...e,alternatives:[!0,t]}:e);return{...n,defaultBuyParams:r}}}return n},[e.stockId,e.strategyId,t]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>(0,wt().jsx)(voe,{config:e,refresh:r})})}function moe(e,t){return Object.fromEntries(e.map(e=>{const n=e.key,r=t.get(n);return[n,null!=r?r:e.default]}))}function voe(e){let{config:t,refresh:n}=e;Math.floor((new Date).getTime()/864e5);const r=cc((new Date).getTime()),[i,o]=(0,St().useState)([r,r]),a=(e,r,i)=>{(async function(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if("new"===e){if(null==r||null==o)return!1}else if("update"===e&&null==r&&null==o&&null==a)return!1;const l=Object.entries({stocks:[t],buyAlgorithm:n,sellAlgorithm:i}),u=[];null!=r&&u.push(["buyParams",r]),null!=o&&u.push(["sellParams",o]),null!=a&&u.push(["sellParamsEnd",a]);const c=Object.fromEntries(l.concat(u)),d=`${qu}/task`;var h;h=null!=s?{command:e,params:c,name:`${t}-${n}`,taskId:s}:{command:e,params:c,name:`${t}-${n}`};const p=await ec(d,JSON.stringify(h));return!("err"in p)&&"status"in p&&"ok"===p.status})("update",t.stock,t.buyAlgorithm,1===e?r:null,t.sellAlgorithm,2===e?r:null,3===e?r:null).then(e=>{e&&n();i("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})},s=t.sellParamsEnd,l=t.defaultBuyParams.filter(e=>1===e.realTime).map(e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e});return(0,wt().jsxs)("main",{children:[(0,wt().jsxs)("h2",{children:[(0,wt().jsx)("span",{style:{color:"lightgrey"},children:"Stock: "}),t.stock,(0,wt().jsxs)("span",{style:{color:"lightgrey",marginLeft:"1rem"},children:["Strategy:"," "]}),t.buyAlgorithm]}),(0,wt().jsx)(boe,{symbol:t.stock,strategy:t.buyAlgorithm}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("div",{children:(0,wt().jsx)(xoe,{msg:"\u8fd0\u884c\u56de\u6d4b",content:(0,wt().jsxs)("div",{children:[(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"Start Date: "}),(0,wt().jsx)("input",{value:i[0],type:"date",onChange:e=>{o(t=>[e.target.value,t[1]])}})]}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"End Date: "}),(0,wt().jsx)("input",{value:i[1],type:"date",onChange:e=>{o(t=>[t[0],e.target.value])}})]})]}),callback:e=>{((e,n,r)=>{const i=t.buyAlgorithm.split("-"),o=i[i.length-1];xc({name:`${t.stock}-${t.buyAlgorithm}`,desc:"",startDate:e,endDate:n,needQuote:!1,configs:[{stocks:[t.stock],buyAlgorithm:o,buyParams:moe(t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime),t.buyParams),sellAlgorithm:t.sellAlgorithm,sellParams:moe(t.defaultSellParams,t.sellParams),sellParamsEnd:void 0,origin:[[o,t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime).map(e=>{const n=e.key,r=t.buyParams.get(n);return null!=r?{...e,default:r}:e})],[t.sellAlgorithm,t.defaultSellParams.map(e=>{const n=e.key,r=t.sellParams.get(n);return null!=r?{...e,default:r}:e}),null]]}]}).then(e=>{r("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})})(i[0],i[1],e)}})}),l.length>0&&(0,wt().jsx)(W8,{name:"\u5b9e\u65f6",config:l,updater:(e,t)=>{a(1,e,t)}}),(0,wt().jsx)(W8,{name:`\u4e70\u5165\u7b56\u7565(${t.buyAlgorithm})`,config:t.defaultBuyParams.filter(e=>null==e.realTime||0===e.realTime).map(e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e}),updater:(e,t)=>{a(1,e,t)}}),(0,wt().jsx)(W8,{name:`\u5356\u51fa\u7b56\u7565(${t.sellAlgorithm})`,config:t.defaultSellParams.map(e=>{const n=t.sellParams.get(e.key);return null!=n?{...e,default:n}:e}),updater:(e,t)=>{a(2,e,t)}}),null!=s&&(0,wt().jsx)(W8,{name:`\u5356\u51fa\u7b56\u7565(\u672b\u65e5)(${t.sellAlgorithm})`,config:t.defaultSellParams.map(e=>{const t=s.get(e.key);return null!=t?{...e,default:t}:e}),updater:(e,t)=>{a(3,e,t)}})]}),(0,wt().jsx)("h3",{children:"Runners:"}),(0,wt().jsx)(yoe,{taskId:`${t.buyAlgorithm}`})]})}function yoe(e){let{taskId:t}=e;const[n,r]=(0,St().useState)(0),i=(0,St().useCallback)(async e=>{const n=await Jc(e);return"err"in n?n:n.filter(e=>e.startsWith("option:")&&e.endsWith(t))},[t,n]);return(0,wt().jsx)(Sd,{getter:i,cvt:e=>(0,wt().jsx)(wt().Fragment,{children:e.map(e=>(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:e}),(0,wt().jsx)(xoe,{msg:`\u6e05\u4ed3\u9000\u51fa\u4efb\u52a1:${e}`,callback:t=>{Uu(e,"all",1).then(e=>{e?(t("\u64cd\u4f5c\u6210\u529f!"),Xu(1e3).then(()=>{r(e=>e+1)})):t("\u64cd\u4f5c\u5931\u8d25!")})}})]},e))})})}function xoe(e){const[t,n]=(0,St().useState)(!1),[r,i]=(0,St().useState)(null),[o,a]=(0,St().useState)(!1);return(0,wt().jsxs)("div",{children:[(0,wt().jsx)(yu,{variant:"outlined",color:!0===e.even?"warning":"primary",onClick:()=>{o?i("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d, \u8bf7\u7a0d\u540e\u518d\u91cd\u8bd5!"):n(!0)},children:e.msg}),(0,wt().jsxs)(K6,{show:t,onHide:()=>n(!1),children:[(0,wt().jsx)(K6.Header,{closeButton:!0,children:(0,wt().jsx)(K6.Title,{children:e.msg})}),(0,wt().jsx)(K6.Body,{children:e.content||(0,wt().jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,wt().jsxs)(K6.Footer,{children:[(0,wt().jsx)(yu,{color:"secondary",variant:"outlined",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,wt().jsx)(yu,{color:"primary",variant:"outlined",onClick:()=>{a(!0),e.callback(e=>{i(e),a(!1)}),n(!1)},children:"\u786e\u5b9a"})]})]}),null!=r&&(0,wt().jsx)(b8,{msg:r,cb:()=>i(null)})]})}function boe(e){const[t,n]=(0,St().useState)(null);if((0,St().useEffect)(()=>{const t=new AbortController,r=t.signal;return Vc(e.symbol,e.strategy,r).then(e=>{r.aborted||n(e)}),()=>{t.abort()}},[e.symbol,e.strategy]),null==t)return(0,wt().jsx)(wd,{});if("err"in t)return(0,wt().jsx)("div",{children:(0,wt().jsxs)("p",{children:["Error:",t.err]})});{const e=t.find(e=>!0);return(0,wt().jsxs)(I5,{children:[(0,wt().jsx)(E5,{expandIcon:(0,wt().jsx)(y().A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,wt().jsx)(F3,{children:null!=e?`\u65f6\u95f4:${cc(e.timestamp,!1,!0,!1)},\u540c\u6b65\u4efb\u52a1ID:${e.taskId}`:"\u6ca1\u6709\u540c\u6b65\u8bb0\u5f55"})}),(0,wt().jsx)(r3,{children:(0,wt().jsx)(F3,{children:t.slice(1).map(e=>(0,wt().jsx)("p",{children:`\u65f6\u95f4:${cc(e.timestamp,!1,!0,!1)},\u540c\u6b65\u4efb\u52a1ID:${e.taskId}`}))})})]})}}const woe=[{path:null,title:"Main",component:(0,wt().jsx)(K2,{})},{path:"strategy",title:"Strategy",component:(0,wt().jsx)(tie,{})}],Soe=[["Main","/"],["Strategy","/strategy"]],_oe=[{path:null,title:"Main",component:(0,wt().jsx)(K2,{})},{path:"task",title:"Tasks",component:(0,wt().jsx)(ri,{}),children:[{path:null,title:"Tasks",component:(0,wt().jsx)(y9,{})},{path:":stockId/:strategyId",title:"Strategy",component:(0,wt().jsx)(Y8,{})}]},{path:"settings",title:"Settings",component:(0,wt().jsx)(w9,{}),children:[{path:null,title:"Default",component:(0,wt().jsx)("main",{style:{padding:"1rem"},children:(0,wt().jsx)("p",{children:"Select an Item"})})},{path:"stock",title:"Stock",component:(0,wt().jsx)(S9,{})},{path:"event",title:"Event",component:(0,wt().jsx)(k9,{})},{path:"dates",title:"Dates",component:(0,wt().jsx)(Y9,{})},{path:"filter",title:"Filter",component:(0,wt().jsx)(K9,{})},{path:"block",title:"Block",component:(0,wt().jsx)(tee,{})},{path:"volatility",title:"Volatility",component:(0,wt().jsx)(oee,{})}]},{path:"backtest",title:"Backtest",component:(0,wt().jsx)(ri,{}),children:[{path:null,title:"Backtests",component:(0,wt().jsx)(bte,{})},{path:":taskId",title:"Task Detail",component:(0,wt().jsx)(Dte,{})},{path:":taskId/log",title:"Log",component:(0,wt().jsx)(Pte,{})},{path:":uid/signal_inspect",title:"Inspect",component:(0,wt().jsx)(ine,{})}]},{path:"trading",component:(0,wt().jsx)(T7,{}),title:"Trading",children:[{path:null,title:"Trading Home",component:(0,wt().jsx)(I7,{})},{path:"accounts/:aid",title:"Accounts",component:(0,wt().jsx)($7,{})},{path:"ZInvest/:port",title:"Zinvest",component:(0,wt().jsx)(P7,{})},{path:"account/:account",title:"Account",component:(0,wt().jsx)(G7,{})},{path:"runner/:account/:runner",title:"Runner",component:(0,wt().jsx)(q7,{})}]},{path:"qqq",title:"QQQ",component:(0,wt().jsx)(hne,{}),children:[{path:null,title:"Strategy",component:(0,wt().jsx)(p9,{})},{path:"signal_search",title:"Signal Search",component:(0,wt().jsx)(yne,{})}]},{path:"accountG",title:"Account Group",component:(0,wt().jsx)(xne,{})},{path:"accounts",title:"Accounts",component:(0,wt().jsx)(V7,{})},{path:"zinvest",title:"Zinvest",component:(0,wt().jsx)(j7,{})},{path:"option/:contract/:startDate",title:"Option",component:(0,wt().jsx)(oie,{})},{path:"stock/:stockId",title:"Stock",component:(0,wt().jsx)(aie,{})},{path:"stockChart/:symbol/:date",title:"Stock Chart",component:(0,wt().jsx)(sie,{})},{path:"strategy/log/:taskId",title:"Strategy Log",component:(0,wt().jsx)(Rte,{})},{path:"orders",title:"Orders",component:(0,wt().jsx)(fie,{})},{path:"order_inspect/:orderId",title:"Order Inspect",component:(0,wt().jsx)(hie,{})},{path:"symbol",title:"Symbol",component:(0,wt().jsx)(vie,{})},{path:"netflow",title:"Net Flow",component:(0,wt().jsx)(soe,{})},{path:"strategy_new",title:"Strategy New",component:(0,wt().jsx)(Gre,{})},{path:"task_new",title:"Tasks",component:(0,wt().jsx)(ri,{}),children:[{path:null,title:"Tasks New",component:(0,wt().jsx)(doe,{})},{path:":stockId/:strategyId",title:"Strategy Detail",component:(0,wt().jsx)(goe,{})}]}],Aoe=[["Main","/"],["Backtest","/backtest"],["Trading","/trading",[["ZInvest","/zinvest"],["Strategy","/accounts"]]],["Account Group","/accountG"],["Strategy New","/strategy_new"],["Tasks New","/task_new"]];function koe(e){return(0,qe().Ay)("MuiAppBar",e)}(0,Ze().A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Coe=["className","color","enableColorOnDark","position"],Moe=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,Ioe=(0,H().Ay)(Os,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,U().A)(n.position)}`],t[`color${(0,U().A)(n.color)}`]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,Dt().A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,Dt().A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,Dt().A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,Dt().A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Moe(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:Moe(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:Moe(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:Moe(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),Toe=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiAppBar"}),{className:r,color:i="primary",enableColorOnDark:o=!1,position:a="fixed"}=n,s=(0,jt().A)(n,Coe),l=(0,Dt().A)({},n,{color:i,position:a,enableColorOnDark:o}),u=(e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${(0,U().A)(t)}`,`position${(0,U().A)(n)}`]};return(0,$e().A)(i,koe,r)})(l);return(0,wt().jsx)(Ioe,(0,Dt().A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,Pt().A)(u.root,r,"fixed"===a&&"mui-fixed"),ref:t},s))}),Doe=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function joe(e,t,n){var r;const i=function(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=(0,ee().A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=o.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"===typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?i?`translateX(${i.right+s-r.left}px)`:`translateX(${o.innerWidth+s-r.left}px)`:"right"===e?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Poe=St().forwardRef(function(e,t){const n=Ja(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:u="down",easing:c=r,in:d,onEnter:h,onEntered:p,onEntering:f,onExit:g,onExited:m,onExiting:v,style:y,timeout:x=i,TransitionComponent:b=Qa}=e,w=(0,jt().A)(e,Doe),S=St().useRef(null),_=(0,se().A)(va(s),S,t),A=e=>t=>{e&&(void 0===t?e(S.current):e(S.current,t))},k=A((e,t)=>{joe(u,e,l),es(e),h&&h(e,t)}),C=A((e,t)=>{const r=ts({timeout:x,style:y,easing:c},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,Dt().A)({},r)),e.style.transition=n.transitions.create("transform",(0,Dt().A)({},r)),e.style.webkitTransform="none",e.style.transform="none",f&&f(e,t)}),M=A(p),I=A(v),T=A(e=>{const t=ts({timeout:x,style:y,easing:c},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),joe(u,e,l),g&&g(e)}),D=A(e=>{e.style.webkitTransition="",e.style.transition="",m&&m(e)}),j=St().useCallback(()=>{S.current&&joe(u,S.current,l)},[u,l]);return St().useEffect(()=>{if(d||"down"===u||"right"===u)return;const e=(0,q().A)(()=>{S.current&&joe(u,S.current,l)}),t=(0,ee().A)(S.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[u,d,l]),St().useEffect(()=>{d||j()},[d,j]),(0,wt().jsx)(b,(0,Dt().A)({nodeRef:S,onEnter:k,onEntered:M,onEntering:C,onExit:T,onExited:D,onExiting:I,addEndListener:e=>{o&&o(S.current,e)},appear:a,in:d,timeout:x},w,{children:(e,t)=>St().cloneElement(s,(0,Dt().A)({ref:_,style:(0,Dt().A)({visibility:"exited"!==e||d?void 0:"hidden"},y,s.props.style)},t))}))});function Loe(e){return(0,qe().Ay)("MuiDrawer",e)}(0,Ze().A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Roe=["BackdropProps"],Eoe=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Noe=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Ooe=(0,H().Ay)(Ps,{name:"MuiDrawer",slot:"Root",overridesResolver:Noe})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}),zoe=(0,H().Ay)("div",{shouldForwardProp:$().A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Noe})({flex:"0 0 auto"}),Boe=(0,H().Ay)(Os,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,U().A)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,U().A)(n.anchor)}`]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})}),Foe={left:"right",right:"left",top:"down",bottom:"up"};const $oe=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiDrawer"}),r=Ja(),i=xa(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:h}={},onClose:p,open:f=!1,PaperProps:g={},SlideProps:m,TransitionComponent:v=Poe,transitionDuration:y=o,variant:x="temporary"}=n,b=(0,jt().A)(n.ModalProps,Roe),w=(0,jt().A)(n,Eoe),S=St().useRef(!1);St().useEffect(()=>{S.current=!0},[]);const A=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return-1!==["left","right"].indexOf(e)}(t)?Foe[t]:t}({direction:i?"rtl":"ltr"},a),k=a,C=(0,Dt().A)({},n,{anchor:k,elevation:c,open:f,variant:x},w),M=(e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,U().A)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,U().A)(n)}`]};return(0,$e().A)(i,Loe,t)})(C),I=(0,wt().jsx)(Boe,(0,Dt().A)({elevation:"temporary"===x?c:0,square:!0},g,{className:(0,Pt().A)(M.paper,g.className),ownerState:C,children:l}));if("permanent"===x)return(0,wt().jsx)(zoe,(0,Dt().A)({className:(0,Pt().A)(M.root,M.docked,u),ownerState:C,ref:t},w,{children:I}));const T=(0,wt().jsx)(v,(0,Dt().A)({in:f,direction:Foe[A],timeout:y,appear:S.current},m,{children:I}));return"persistent"===x?(0,wt().jsx)(zoe,(0,Dt().A)({className:(0,Pt().A)(M.root,M.docked,u),ownerState:C,ref:t},w,{children:T})):(0,wt().jsx)(Ooe,(0,Dt().A)({BackdropProps:(0,Dt().A)({},s,h,{transitionDuration:y}),className:(0,Pt().A)(M.root,M.modal,u),open:f,ownerState:C,onClose:p,hideBackdrop:d,ref:t},w,b,{children:T}))}),Voe=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Woe=(0,H().Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${M8.primary}`]:t.primary},{[`& .${M8.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(e=>{let{ownerState:t}=e;return(0,Dt().A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})}),Hoe=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:u,secondaryTypographyProps:c}=n,d=(0,jt().A)(n,Voe),{dense:h}=St().useContext(Ma);let p=null!=s?s:r,f=u;const g=(0,Dt().A)({},n,{disableTypography:o,inset:a,primary:!!p,secondary:!!f,dense:h}),m=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e,a={root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,$e().A)(a,C8,t)})(g);return null==p||p.type===F3||o||(p=(0,wt().jsx)(F3,(0,Dt().A)({variant:h?"body2":"body1",className:m.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:p}))),null==f||f.type===F3||o||(f=(0,wt().jsx)(F3,(0,Dt().A)({variant:"body2",className:m.secondary,color:"text.secondary",display:"block"},c,{children:f}))),(0,wt().jsxs)(Woe,(0,Dt().A)({className:(0,Pt().A)(m.root,i),ownerState:g,ref:t},d,{children:[p,f]}))});function Goe(e){return(0,qe().Ay)("MuiListItemButton",e)}const Uoe=(0,Ze().A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Xoe=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Yoe=(0,H().Ay)(lu,{shouldForwardProp:e=>(0,$().A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Dt().A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Uoe.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Uoe.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Uoe.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,pe().X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Uoe.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Uoe.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===n.alignItems&&{alignItems:"flex-start"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.dense&&{paddingTop:4,paddingBottom:4})}),qoe=St().forwardRef(function(e,t){const n=(0,_().b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:d=!1,className:h}=n,p=(0,jt().A)(n,Xoe),f=St().useContext(Ma),g=St().useMemo(()=>({dense:s||f.dense||!1,alignItems:r,disableGutters:l}),[r,f.dense,s,l]),m=St().useRef(null);(0,oe().A)(()=>{i&&m.current&&m.current.focus()},[i]);const v=(0,Dt().A)({},n,{alignItems:r,dense:g.dense,disableGutters:l,divider:u,selected:d}),y=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l={root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},u=(0,$e().A)(l,Goe,n);return(0,Dt().A)({},n,u)})(v),x=(0,se().A)(m,t);return(0,wt().jsx)(Ma.Provider,{value:g,children:(0,wt().jsx)(Yoe,(0,Dt().A)({ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:(0,Pt().A)(y.focusVisible,c),ownerState:v,className:(0,Pt().A)(y.root,h)},p,{classes:y,children:a}))})}),Zoe=["/favicon.gif","Riches Booster"];function Koe(e){let{naviItems:t}=e;const n=Fr(),r=U2(),[i,o]=(0,St().useState)("Rich Booster"),[a,s]=(0,St().useState)(!1),l=zr(),u=(0,St().useContext)(H2);(0,St().useEffect)(()=>{const e=l.pathname.match(/task\d+/g);document.title=1===(null===e||void 0===e?void 0:e.length)?e[0]:"React App"},[l]);const c=(e,t)=>{n(t),o(e),s(!1)};return t.length>0?r?(0,wt().jsxs)("div",{children:[(0,wt().jsx)(Toe,{position:"static",color:"transparent",children:(0,wt().jsx)(Ji,{maxWidth:"xl",children:(0,wt().jsxs)(Cie,{disableGutters:!0,children:[(0,wt().jsx)("img",{src:Zoe[0],style:{width:"64px",aspectRatio:"1/1"},alt:Zoe[1]}),(0,wt().jsx)(A8,{children:t.map(e=>(0,wt().jsx)(Mi,{className:"MyNavLink",to:e[1],style:e=>{let{isActive:t}=e;return{color:t?"red":""}},children:e[0]},e[1]))}),null!=u&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(w().A,{}),(0,wt().jsx)(F3,{children:1===u.userLevel?"Admin":"Guest"}),(0,wt().jsx)(F5,{onClick:()=>{Ou(),u.updateUserLevel(),n("/")},children:(0,wt().jsx)(x().A,{})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5c0f\u5c4f\u6a21\u5f0f:"}),(0,wt().jsx)(J5,{checked:u.enableSelect,onChange:e=>u.updateSelect(e.target.checked)})]})]})]})})}),(0,wt().jsx)("div",{className:"MainPage",children:(0,wt().jsx)("div",{style:{maxWidth:"1600px",width:"80vw"},children:(0,wt().jsx)(ri,{},"mainLayout")})})]},"LayoutDiv"):(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(A8,{sx:{flexGrow:1},children:(0,wt().jsx)(Toe,{position:"static",children:(0,wt().jsxs)(Cie,{children:[(0,wt().jsx)(F5,{size:"large",edge:"start",color:"inherit","aria-label":"menu",onClick:()=>{s(e=>!e)},children:(0,wt().jsx)(b().A,{})}),(0,wt().jsx)(F3,{variant:"h6",component:"div",sx:{flexGrow:1},children:i}),(0,wt().jsx)("img",{src:Zoe[0],style:{width:"64px",aspectRatio:"1/1",background:"transparent"},alt:Zoe[1]}),null!=u&&(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsx)(w().A,{}),(0,wt().jsx)(F3,{children:1===u.userLevel?"Admin":"Guest"}),(0,wt().jsx)(F5,{onClick:()=>{Ou(),u.updateUserLevel(),n("/")},children:(0,wt().jsx)(x().A,{})}),(0,wt().jsxs)("div",{children:[(0,wt().jsx)("span",{children:"\u5c0f\u5c4f\u6a21\u5f0f:"}),(0,wt().jsx)(J5,{checked:u.enableSelect,onChange:e=>u.updateSelect(e.target.checked)})]})]})]})})}),(0,wt().jsx)($oe,{anchor:"left",open:a,onClose:()=>s(!1),children:(0,wt().jsx)(ja,{children:t.map(e=>2===e.length?(0,wt().jsx)(qoe,{onClick:()=>{c(e[0],e[1])},children:(0,wt().jsx)(Hoe,{primary:e[0]})}):(0,wt().jsx)(Qoe,{handleNavigate:c,namePath:[e[0],e[1]],subItem:e[2]}))})}),(0,wt().jsx)(ri,{})]}):(0,wt().jsx)(ri,{})}function Qoe(e){const[t,n]=(0,St().useState)(!1);return(0,wt().jsxs)(wt().Fragment,{children:[(0,wt().jsxs)(qoe,{onClick:()=>n(e=>!e),children:[(0,wt().jsx)(Hoe,{primary:e.namePath[0]}),t?(0,wt().jsx)(v().A,{}):(0,wt().jsx)(y().A,{})]}),(0,wt().jsx)(x5,{in:t,timeout:"auto",unmountOnExit:!0,children:(0,wt().jsx)(ja,{component:"div",disablePadding:!0,children:e.subItem.map(t=>(0,wt().jsx)(qoe,{sx:{pl:4},onClick:()=>{e.handleNavigate(`${e.namePath[0]} - ${t[0]}`,t[1].startsWith("/")?t[1]:`${e.namePath[1]}/${t[1]}`)},children:(0,wt().jsx)(Hoe,{primary:t[0]})}))})})]})}function Joe(e,t){if(t&&null!=e.children){const t=e.path;return(0,wt().jsx)(ii,{path:t,element:e.component,children:e.children.map(e=>Joe(e,!0))},t)}return null==e.path?(0,wt().jsx)(ii,{index:!0,element:e.component},"/"):(0,wt().jsx)(ii,{path:e.path,element:e.component},e.path)}function eae(e,t){return function(e,t){return Fn({basename:null==t?void 0:t.basename,future:li({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(n={window:null==t?void 0:t.window},void 0===n&&(n={}),Zt(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return Xt("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:Yt(t)},null,n)),hydrationData:(null==t?void 0:t.hydrationData)||pi(),routes:e,mapRouteProperties:si,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize();var n}(ai((0,wt().jsx)(ii,{path:"/",element:(0,wt().jsx)(Koe,{naviItems:t}),children:e.map(e=>Joe(e,!0))})))}function tae(){const e=(0,St().useContext)(H2),t=null!=e?e.userLevel:-1;var n,r;if(t<0){n=eae((r=()=>{null!=e&&e.updateUserLevel()},[{path:null,title:"Login",component:(0,wt().jsx)(nd,{loginCB:r})}]),[])}else n=1===t?eae(_oe,Aoe):eae(woe,Soe);return t>=0?(0,wt().jsx)(W2,{children:(0,wt().jsx)(Cne,{children:(0,wt().jsx)(wi,{router:n})})}):(0,wt().jsx)(wi,{router:n})}const nae=function(){return(0,wt().jsx)(G2,{child:(0,wt().jsx)(tae,{})})},rae=e=>{e&&e instanceof Function&&n.e(453).then(()=>n(453)).then(t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:o,getTTFB:a}=t;n(e),r(e),i(e),o(e),a(e)})},iae=yt().createRoot(document.getElementById("root"));iae.render((0,wt().jsx)(St().StrictMode,{children:(0,wt().jsx)(nae,{})})),rae()})()})();
//# sourceMappingURL=main.4f59e370.js.map