rails_pulse 0.4.2 → 0.5.0.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -1
- data/README.md +15 -4
- data/app/assets/stylesheets/rails_pulse/components/chart.css +11 -0
- data/app/assets/stylesheets/rails_pulse/components/descriptive_list.css +19 -1
- data/app/assets/stylesheets/rails_pulse/components/row.css +3 -17
- data/app/controllers/concerns/chart_table_concern.rb +28 -69
- data/app/controllers/concerns/deployment_markers_concern.rb +3 -1
- data/app/controllers/concerns/metric_card_concern.rb +6 -7
- data/app/controllers/rails_pulse/api/v1/base_controller.rb +133 -0
- data/app/controllers/rails_pulse/api/v1/capabilities_controller.rb +27 -0
- data/app/controllers/rails_pulse/api/v1/coverage_controller.rb +158 -0
- data/app/controllers/rails_pulse/api/v1/deployments_controller.rb +40 -0
- data/app/controllers/rails_pulse/api/v1/exceptions_controller.rb +77 -0
- data/app/controllers/rails_pulse/api/v1/insights_controller.rb +62 -0
- data/app/controllers/rails_pulse/api/v1/job_runs_controller.rb +34 -0
- data/app/controllers/rails_pulse/api/v1/jobs_controller.rb +172 -0
- data/app/controllers/rails_pulse/api/v1/queries_controller.rb +123 -0
- data/app/controllers/rails_pulse/api/v1/requests_controller.rb +74 -0
- data/app/controllers/rails_pulse/api/v1/routes_controller.rb +103 -0
- data/app/controllers/rails_pulse/application_controller.rb +1 -1
- data/app/controllers/rails_pulse/dashboard_controller.rb +25 -21
- data/app/controllers/rails_pulse/deployments_controller.rb +23 -13
- data/app/controllers/rails_pulse/exceptions_controller.rb +10 -12
- data/app/controllers/rails_pulse/jobs_controller.rb +1 -2
- data/app/controllers/rails_pulse/queries_controller.rb +6 -5
- data/app/controllers/rails_pulse/requests_controller.rb +15 -14
- data/app/controllers/rails_pulse/routes_controller.rb +4 -8
- data/app/helpers/rails_pulse/application_helper.rb +15 -0
- data/app/helpers/rails_pulse/chart_helper.rb +9 -2
- data/app/helpers/rails_pulse/formatting_helper.rb +11 -12
- data/app/javascript/rails_pulse/controllers/chart_controller.js +80 -43
- data/app/jobs/rails_pulse/backfill_summaries_job.rb +4 -2
- data/app/jobs/rails_pulse/cloud_health_job.rb +11 -0
- data/app/jobs/rails_pulse/cloud_sync_job.rb +11 -0
- data/app/jobs/rails_pulse/summary_job.rb +13 -0
- data/app/models/concerns/rails_pulse/has_metadata.rb +15 -0
- data/app/models/concerns/rails_pulse/taggable.rb +5 -12
- data/app/models/rails_pulse/cards/base.rb +20 -11
- data/app/models/rails_pulse/charts/base.rb +5 -18
- data/app/models/rails_pulse/charts/percentile_chart_base.rb +3 -5
- data/app/models/rails_pulse/cleanup_run.rb +32 -0
- data/app/models/rails_pulse/cloud/buffered_batch.rb +55 -0
- data/app/models/rails_pulse/cloud/installation.rb +55 -0
- data/app/models/rails_pulse/dashboard/charts/response_time_percentiles.rb +4 -5
- data/app/models/rails_pulse/dashboard/charts/throughput_and_errors.rb +4 -5
- data/app/models/rails_pulse/dashboard/concerns/attention_classification.rb +104 -0
- data/app/models/rails_pulse/dashboard/concerns/time_range_helper.rb +25 -2
- data/app/models/rails_pulse/dashboard/health_summary.rb +38 -13
- data/app/models/rails_pulse/dashboard/needs_attention.rb +31 -98
- data/app/models/rails_pulse/dashboard/storage_pressure.rb +39 -63
- data/app/models/rails_pulse/dashboard/storage_status.rb +130 -39
- data/app/models/rails_pulse/deployment.rb +2 -7
- data/app/models/rails_pulse/event.rb +41 -0
- data/app/models/rails_pulse/exception_occurrence.rb +1 -1
- data/app/models/rails_pulse/exceptions/cards/exception_rate.rb +3 -6
- data/app/models/rails_pulse/exceptions/cards/open_groups.rb +1 -4
- data/app/models/rails_pulse/exceptions/cards/total_occurrences.rb +3 -6
- data/app/models/rails_pulse/exceptions/charts/occurrence_volume.rb +4 -7
- data/app/models/rails_pulse/job_run.rb +1 -1
- data/app/models/rails_pulse/jobs/cards/failure_rate.rb +8 -14
- data/app/models/rails_pulse/jobs/cards/p95_duration.rb +8 -14
- data/app/models/rails_pulse/jobs/cards/total_runs.rb +5 -11
- data/app/models/rails_pulse/jobs/charts/duration.rb +1 -2
- data/app/models/rails_pulse/jobs/charts/execution_volume.rb +1 -1
- data/app/models/rails_pulse/jobs/charts/failure_rate.rb +1 -2
- data/app/models/rails_pulse/like_pattern.rb +35 -0
- data/app/models/rails_pulse/queries/cards/average_query_times.rb +6 -12
- data/app/models/rails_pulse/queries/cards/database_load.rb +0 -9
- data/app/models/rails_pulse/queries/cards/execution_rate.rb +5 -11
- data/app/models/rails_pulse/queries/cards/percentile_query_times.rb +6 -12
- data/app/models/rails_pulse/queries/charts/database_load.rb +5 -8
- data/app/models/rails_pulse/queries/charts/execution_volume.rb +1 -1
- data/app/models/rails_pulse/request.rb +1 -1
- data/app/models/rails_pulse/routes/cards/error_rates.rb +5 -15
- data/app/models/rails_pulse/routes/cards/percentile_response_times.rb +5 -17
- data/app/models/rails_pulse/routes/cards/request_count_totals.rb +5 -17
- data/app/models/rails_pulse/routes/charts/error_rate.rb +1 -1
- data/app/models/rails_pulse/routes/charts/request_volume.rb +1 -1
- data/app/models/rails_pulse/summary.rb +5 -0
- data/app/models/rails_pulse/tables/base.rb +5 -6
- data/app/models/rails_pulse/time_range.rb +309 -0
- data/app/models/rails_pulse/time_window.rb +15 -0
- data/app/models/rails_pulse/writer_heartbeat.rb +90 -0
- data/app/serializers/rails_pulse/api/v1/deployment_serializer.rb +23 -0
- data/app/serializers/rails_pulse/api/v1/exception_group_serializer.rb +23 -0
- data/app/serializers/rails_pulse/api/v1/exception_occurrence_serializer.rb +22 -0
- data/app/serializers/rails_pulse/api/v1/job_run_serializer.rb +28 -0
- data/app/serializers/rails_pulse/api/v1/job_serializer.rb +26 -0
- data/app/serializers/rails_pulse/api/v1/query_serializer.rb +25 -0
- data/app/serializers/rails_pulse/api/v1/request_serializer.rb +22 -0
- data/app/serializers/rails_pulse/api/v1/route_serializer.rb +19 -0
- data/app/services/rails_pulse/cloud/batch.rb +83 -0
- data/app/services/rails_pulse/cloud/client.rb +68 -0
- data/app/services/rails_pulse/cloud/combined_metrics.rb +49 -0
- data/app/services/rails_pulse/cloud/health_item.rb +77 -0
- data/app/services/rails_pulse/cloud/path_prefix.rb +50 -0
- data/app/services/rails_pulse/cloud/preview.rb +83 -0
- data/app/services/rails_pulse/cloud/query_shape.rb +195 -0
- data/app/services/rails_pulse/cloud/record_items.rb +60 -0
- data/app/services/rails_pulse/cloud/route_pattern.rb +111 -0
- data/app/services/rails_pulse/cloud/summary_items.rb +188 -0
- data/app/services/rails_pulse/cloud/sync.rb +275 -0
- data/app/services/rails_pulse/config_recommendations.rb +132 -0
- data/app/services/rails_pulse/deployment_comparison.rb +177 -0
- data/app/services/rails_pulse/exception_capture_service.rb +1 -1
- data/app/services/rails_pulse/operations/change_point.rb +1 -1
- data/app/services/rails_pulse/operations/comparison.rb +1 -1
- data/app/services/rails_pulse/period_insights.rb +131 -0
- data/app/services/rails_pulse/sql_query_normalizer.rb +222 -122
- data/app/services/rails_pulse/summary_service/from_child_periods.rb +161 -0
- data/app/services/rails_pulse/summary_service/from_raw_rows.rb +115 -0
- data/app/services/rails_pulse/summary_service/metrics.rb +38 -0
- data/app/services/rails_pulse/summary_service.rb +121 -133
- data/app/services/rails_pulse/tag_filter_service.rb +5 -5
- data/app/views/layouts/rails_pulse/_time_range_selector.html.erb +4 -1
- data/app/views/rails_pulse/components/_operation_details_popover.html.erb +1 -1
- data/app/views/rails_pulse/components/_table_head.html.erb +2 -2
- data/app/views/rails_pulse/dashboard/_chart_panel.html.erb +6 -1
- data/app/views/rails_pulse/dashboard/_deployments_panel.html.erb +2 -2
- data/app/views/rails_pulse/dashboard/_health_badge.html.erb +29 -20
- data/app/views/rails_pulse/dashboard/_storage_panel.html.erb +13 -3
- data/app/views/rails_pulse/dashboard/index.html.erb +16 -2
- data/app/views/rails_pulse/jobs/_chart_tabs.html.erb +1 -0
- data/app/views/rails_pulse/jobs/index.html.erb +1 -1
- data/app/views/rails_pulse/queries/_chart_tabs.html.erb +1 -0
- data/app/views/rails_pulse/queries/index.html.erb +1 -1
- data/app/views/rails_pulse/queries/show.html.erb +1 -1
- data/app/views/rails_pulse/requests/index.html.erb +1 -1
- data/app/views/rails_pulse/routes/_chart_tabs.html.erb +1 -0
- data/app/views/rails_pulse/routes/index.html.erb +1 -1
- data/app/views/rails_pulse/routes/show.html.erb +1 -1
- data/app/views/rails_pulse/shared/_aggregation_zone_badge.html.erb +4 -0
- data/app/views/rails_pulse/storage/show.html.erb +39 -2
- data/config/routes.rb +23 -0
- data/db/rails_pulse_cloud_schema.rb +58 -0
- data/db/rails_pulse_migrate/20260506000001_create_rails_pulse_exceptions.rb +1 -1
- data/db/rails_pulse_migrate/20260921000001_create_rails_pulse_events.rb +21 -0
- data/db/rails_pulse_schema.rb +20 -2
- data/exe/rails-pulse +7 -0
- data/lib/generators/rails_pulse/base_methods.rb +19 -0
- data/lib/generators/rails_pulse/install_cloud_generator.rb +84 -0
- data/lib/generators/rails_pulse/templates/db/rails_pulse_cloud_schema.rb +58 -0
- data/lib/generators/rails_pulse/templates/db/rails_pulse_schema.rb +20 -2
- data/lib/generators/rails_pulse/templates/migrations/install_rails_pulse_cloud_tables.rb +30 -0
- data/lib/generators/rails_pulse/templates/rails_pulse.rb +71 -19
- data/lib/generators/rails_pulse/upgrade_generator.rb +9 -16
- data/lib/rails_pulse/cleanup_service.rb +37 -20
- data/lib/rails_pulse/cli/agent_files/agents.md +89 -0
- data/lib/rails_pulse/cli/agent_files/claude_skill.md +182 -0
- data/lib/rails_pulse/cli/base_command.rb +37 -0
- data/lib/rails_pulse/cli/client.rb +64 -0
- data/lib/rails_pulse/cli/config.rb +87 -0
- data/lib/rails_pulse/cli/configure.rb +75 -0
- data/lib/rails_pulse/cli/coverage.rb +91 -0
- data/lib/rails_pulse/cli/deployments.rb +54 -0
- data/lib/rails_pulse/cli/exceptions.rb +116 -0
- data/lib/rails_pulse/cli/formatter.rb +31 -0
- data/lib/rails_pulse/cli/insights.rb +70 -0
- data/lib/rails_pulse/cli/install.rb +145 -0
- data/lib/rails_pulse/cli/job_runs.rb +53 -0
- data/lib/rails_pulse/cli/jobs.rb +71 -0
- data/lib/rails_pulse/cli/main.rb +76 -0
- data/lib/rails_pulse/cli/mcp.rb +47 -0
- data/lib/rails_pulse/cli/queries.rb +67 -0
- data/lib/rails_pulse/cli/requests.rb +57 -0
- data/lib/rails_pulse/cli/routes.rb +73 -0
- data/lib/rails_pulse/configuration.rb +100 -2
- data/lib/rails_pulse/current.rb +11 -0
- data/lib/rails_pulse/engine.rb +12 -3
- data/lib/rails_pulse/installers/config_updater.rb +9 -2
- data/lib/rails_pulse/job_run_collector.rb +15 -15
- data/lib/rails_pulse/mcp/server.rb +78 -0
- data/lib/rails_pulse/mcp/tools/coverage.rb +96 -0
- data/lib/rails_pulse/mcp/tools/deployments.rb +117 -0
- data/lib/rails_pulse/mcp/tools/endpoint.rb +167 -0
- data/lib/rails_pulse/mcp/tools/errors.rb +104 -0
- data/lib/rails_pulse/mcp/tools/exception_detail.rb +118 -0
- data/lib/rails_pulse/mcp/tools/exceptions.rb +128 -0
- data/lib/rails_pulse/mcp/tools/helpers.rb +162 -0
- data/lib/rails_pulse/mcp/tools/insights.rb +99 -0
- data/lib/rails_pulse/mcp/tools/jobs.rb +155 -0
- data/lib/rails_pulse/mcp/tools/queries.rb +142 -0
- data/lib/rails_pulse/mcp/tools/routes.rb +108 -0
- data/lib/rails_pulse/mcp/tools/slow_requests.rb +118 -0
- data/lib/rails_pulse/middleware/request_collector.rb +9 -9
- data/lib/rails_pulse/scoped_inflector.rb +35 -0
- data/lib/rails_pulse/statistics.rb +27 -0
- data/lib/rails_pulse/subscribers/exception_subscriber.rb +2 -2
- data/lib/rails_pulse/subscribers/operation_subscriber.rb +15 -29
- data/lib/rails_pulse/tasks/status_reporter.rb +201 -0
- data/lib/rails_pulse/tracker.rb +76 -14
- data/lib/rails_pulse/version.rb +1 -1
- data/lib/rails_pulse.rb +0 -4
- data/lib/tasks/rails_pulse.rake +6 -0
- data/lib/tasks/rails_pulse_tasks.rake +7 -0
- data/public/rails-pulse-assets/rails-pulse.css +1 -1
- data/public/rails-pulse-assets/rails-pulse.js +13 -13
- metadata +123 -24
- data/app/controllers/concerns/page_timings.rb +0 -10
- data/app/controllers/concerns/response_range_concern.rb +0 -45
- data/app/controllers/concerns/time_range_concern.rb +0 -152
- data/app/controllers/concerns/zoom_range_concern.rb +0 -86
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
// Rails Pulse JavaScript Bundle - Auto-generated
|
|
2
|
-
(()=>{var ab=Object.defineProperty;var ob=r=>{throw TypeError(r)};var ML=(r,t,e)=>t in r?ab(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Sr=(r,t)=>{for(var e in t)ab(r,e,{get:t[e],enumerable:!0})};var se=(r,t,e)=>ML(r,typeof t!="symbol"?t+"":t,e),Rv=(r,t,e)=>t.has(r)||ob("Cannot "+e);var Bt=(r,t,e)=>(Rv(r,t,"read from private field"),e?e.call(r):t.get(r)),Ji=(r,t,e)=>t.has(r)?ob("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),Yl=(r,t,e,i)=>(Rv(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e),xa=(r,t,e)=>(Rv(r,t,"access private method"),e);var j0={};Sr(j0,{Axis:()=>xd,ChartView:()=>Ft,ComponentModel:()=>Le,ComponentView:()=>nt,List:()=>_i,Model:()=>Re,PRIORITY:()=>u0,SeriesModel:()=>tr,color:()=>ou,connect:()=>cB,dataTool:()=>yB,dependencies:()=>ZF,disConnect:()=>fB,disconnect:()=>yA,dispose:()=>hB,env:()=>fe,extendChartView:()=>Zz,extendComponentModel:()=>Gz,extendComponentView:()=>Yz,extendSeriesModel:()=>Wz,format:()=>Z0,getCoordinateSystemDimensions:()=>dB,getInstanceByDom:()=>h0,getInstanceById:()=>pB,getMap:()=>gB,graphic:()=>W0,helper:()=>F0,init:()=>uB,innerDrawElementOnCanvas:()=>js,matrix:()=>nn,number:()=>G0,parseGeoJSON:()=>yd,parseGeoJson:()=>yd,registerAction:()=>Xi,registerCoordinateSystem:()=>v0,registerCustomSeries:()=>vB,registerLayout:()=>m0,registerLoading:()=>Wp,registerLocale:()=>Uh,registerMap:()=>y0,registerPostInit:()=>p0,registerPostUpdate:()=>d0,registerPreprocessor:()=>Gp,registerProcessor:()=>Yp,registerTheme:()=>lc,registerTransform:()=>_0,registerUpdateLifecycle:()=>uc,registerVisual:()=>Sn,setCanvasCreator:()=>mB,setPlatformAPI:()=>gf,throttle:()=>Do,time:()=>Y0,use:()=>Pt,util:()=>X0,vector:()=>wr,version:()=>WF,zrUtil:()=>ye,zrender:()=>jf});var Fv=function(r,t){return Fv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Fv(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fv(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var jf={};Sr(jf,{dispose:()=>fN,disposeAll:()=>hN,getElementSSRData:()=>dN,getInstance:()=>pN,init:()=>$f,registerPainter:()=>Hm,registerSSRDataGetter:()=>Gm,version:()=>vN});var OL=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),IL=(function(){function r(){this.browser=new OL,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=typeof window<"u"}return r})(),Rn=new IL;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Rn.wxa=!0,Rn.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Rn.worker=!0:!Rn.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Rn.node=!0,Rn.svgSupported=!0):LL(navigator.userAgent,Rn);function LL(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var fe=Rn;var ye={};Sr(ye,{EPSILON:()=>KL,HashMap:()=>hb,RADIAN_TO_DEGREE:()=>Xv,assert:()=>ft,assignProps:()=>Gv,bind:()=>ee,clone:()=>ne,concatArray:()=>Zv,createCanvas:()=>GL,createHashMap:()=>Y,createObject:()=>tn,curry:()=>Ae,defaults:()=>he,disableUserSelect:()=>Kl,each:()=>w,eqNaN:()=>en,extend:()=>B,filter:()=>Be,find:()=>Yv,guid:()=>Wl,hasOwn:()=>We,indexOf:()=>ce,inherits:()=>Zl,isArray:()=>F,isArrayLike:()=>ct,isBuiltInObject:()=>zv,isDom:()=>ba,isFunction:()=>j,isGradientObject:()=>Qi,isImagePatternObject:()=>Wv,isNumber:()=>ge,isObject:()=>W,isPrimitive:()=>qo,isRegExp:()=>WL,isString:()=>H,isStringSafe:()=>jo,isTypedArray:()=>rt,keys:()=>De,logError:()=>Sa,map:()=>U,merge:()=>me,mergeAll:()=>Hv,mixin:()=>mt,noop:()=>Ze,normalizeCssArray:()=>wa,reduce:()=>zt,retrieve:()=>nr,retrieve2:()=>Z,retrieve3:()=>zr,setAsPrimitive:()=>Ta,slice:()=>Xl,trim:()=>Dt});var mf=12,PL="sans-serif",Br=mf+"px "+PL,NL=20,kL=100,RL="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function FL(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-NL)/kL;t[i]=n}return t}var BL=FL(RL),je={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,i){if(!r){var n=je.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Br),r.measureText(e);e=e||"",i=i||Br;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||mf,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=BL[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i},getTime:function(){return Date.now?Date.now():+new Date}};function gf(r){for(var t in je)je.hasOwnProperty(t)&&r[t]&&(je[t]=r[t])}var lb=zt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),ub=zt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),$o=Object.prototype.toString,_f=Array.prototype,zL=_f.forEach,VL=_f.filter,Vv=_f.slice,UL=_f.map,sb=function(){}.constructor,yf=sb?sb.prototype:null,Uv="__proto__",Bv=2311,HL=Math.pow(2,53)-1;function Wl(){return Bv>=HL&&(Bv=0),Bv++}function Sa(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function ne(r){if(r==null||typeof r!="object")return r;var t=r,e=$o.call(r);if(e==="[object Array]"){if(!qo(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=ne(r[i])}}else if(ub[e]){if(!qo(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!lb[e]&&!qo(r)&&!ba(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Uv&&(t[o]=ne(r[o]))}return t}function me(r,t,e){if(!W(t)||!W(r))return e?ne(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==Uv){var n=r[i],a=t[i];W(a)&&W(n)&&!F(a)&&!F(n)&&!ba(a)&&!ba(n)&&!zv(a)&&!zv(n)&&!qo(a)&&!qo(n)?me(n,a,e):(e||!(i in r))&&(r[i]=ne(t[i]))}return r}function Hv(r,t){for(var e=r[0],i=1,n=r.length;i<n;i++)e=me(e,r[i],t);return e}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Uv&&(r[e]=t[e]);return r}function Gv(r,t,e){r=r||{};for(var i=0;i<e.length;i++){var n=e[i];r[n]=t[n]}return r}function he(r,t,e){for(var i=De(t),n=0,a=i.length;n<a;n++){var o=i[n];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}var GL=je.createCanvas;function ce(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function Zl(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function mt(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else he(r,t,e)}function ct(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function w(r,t,e){if(r&&t)if(r.forEach&&r.forEach===zL)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function U(r,t,e){if(!r)return[];if(!t)return Xl(r);if(r.map&&r.map===UL)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function zt(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function Be(r,t,e){if(!r)return[];if(!t)return Xl(r);if(r.filter&&r.filter===VL)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function Yv(r,t,e){if(r&&t){for(var i=0,n=r.length;i<n;i++)if(t.call(e,r[i],i,r))return r[i]}}function De(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function YL(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(Vv.call(arguments)))}}var ee=yf&&j(yf.bind)?yf.call.bind(yf.bind):YL;function Ae(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Vv.call(arguments)))}}function F(r){return Array.isArray?Array.isArray(r):$o.call(r)==="[object Array]"}function j(r){return typeof r=="function"}function H(r){return typeof r=="string"}function jo(r){return $o.call(r)==="[object String]"}function ge(r){return typeof r=="number"}function W(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function zv(r){return!!lb[$o.call(r)]}function rt(r){return!!ub[$o.call(r)]}function ba(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Qi(r){return r.colorStops!=null}function Wv(r){return r.image!=null}function WL(r){return $o.call(r)==="[object RegExp]"}function en(r){return r!==r}function nr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function Z(r,t){return r??t}function zr(r,t,e){return r??t??e}function Xl(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Vv.apply(r,t)}function wa(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function ft(r,t){if(!r)throw new Error(t)}function Dt(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var cb="__ec_primitive__";function Ta(r){r[cb]=!0}function qo(r){return r[cb]}var ZL=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return De(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r})(),fb=typeof Map=="function";function XL(){return fb?new Map:new ZL}var hb=(function(){function r(t){var e=F(t);this.data=XL();var i=this;t instanceof r?t.each(n):t&&w(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return fb?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function Y(r){return new hb(r)}function Zv(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function tn(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&B(e,t),e}function Kl(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function We(r,t){return r.hasOwnProperty(t)}function Ze(){}var Xv=180/Math.PI,KL=Number.EPSILON||Math.pow(2,-52);var wr={};Sr(wr,{add:()=>xf,applyTransform:()=>ht,clone:()=>Kv,copy:()=>qL,create:()=>rn,dist:()=>jv,distSquare:()=>Fn,distance:()=>Jl,distanceSquare:()=>pb,div:()=>eP,dot:()=>tP,len:()=>qv,lenSquare:()=>$v,length:()=>jL,lengthSquare:()=>JL,lerp:()=>iP,max:()=>Ur,min:()=>Vr,mul:()=>QL,negate:()=>rP,normalize:()=>Ca,scale:()=>jl,scaleAndAdd:()=>$L,set:()=>ql,sub:()=>$l});function rn(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function qL(r,t){return r[0]=t[0],r[1]=t[1],r}function Kv(r){return[r[0],r[1]]}function ql(r,t,e){return r[0]=t,r[1]=e,r}function xf(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function $L(r,t,e,i){return r[0]=t[0]+e[0]*i,r[1]=t[1]+e[1]*i,r}function $l(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function qv(r){return Math.sqrt($v(r))}var jL=qv;function $v(r){return r[0]*r[0]+r[1]*r[1]}var JL=$v;function QL(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function eP(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function tP(r,t){return r[0]*t[0]+r[1]*t[1]}function jl(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Ca(r,t){var e=qv(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Jl(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var jv=Jl;function pb(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Fn=pb;function rP(r,t){return r[0]=-t[0],r[1]=-t[1],r}function iP(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function ht(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function Vr(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Ur(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Jo=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),nP=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Jo(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new Jo(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Jo(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Jo(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Jo(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Jo(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),db=nP;var aP=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,c=a[t][u];return c&&c.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var c=n[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,e[0]);break;case 2:c.h.call(s,e[0],e[1]);break;default:c.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),St=aP;var oP=Math.log(2);function Jv(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/oP);return r[e][l]}for(var u=i|1<<e,c=e+1;i&1<<c;)c++;for(var f=0,h=0,p=0;h<s;h++){var d=1<<h;d&n||(f+=(p%2?-1:1)*r[e][h]*Jv(r,t-1,c,u,n|d,a),p++)}return a[o]=f,f}function Qv(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=Jv(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Jv(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var bf="___zrEVENTSAVED",em=[];function vb(r,t,e,i,n){return Sf(em,t,i,n,!0)&&Sf(r,e,em[0],em[1])}function mb(r,t){r&&e(r),t&&e(t);function e(i){var n=i[bf];n&&(n.clearMarkers&&n.clearMarkers(),delete i[bf])}}function Sf(r,t,e,i,n){if(t.getBoundingClientRect&&fe.domSupported&&!tm(t)){var a=t[bf]||(t[bf]={}),o=sP(t,a),s=lP(o,a,n);if(s)return s(r,e,i),!0}return!1}function sP(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){w(e,function(c){c.parentNode&&c.parentNode.removeChild(c)})},e}function lP(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,p=c.top;o.push(h,p),l=l&&a&&h===a[f]&&p===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Qv(s,o):Qv(o,s))}function tm(r){return r.nodeName.toUpperCase()==="CANVAS"}var uP=/([&<>"'])/g,cP={"&":"&","<":"<",">":">",'"':""","'":"'"};function wt(r){return r==null?"":(r+"").replace(uP,function(t,e){return cP[e]})}var fP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rm=[],hP=fe.browser.firefox&&+fe.browser.version.split(".")[0]<39;function wf(r,t,e,i){return e=e||{},i?gb(r,t,e):hP&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):gb(r,t,e),e}function gb(r,t,e){if(fe.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(tm(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Sf(rm,r,i,n)){e.zrX=rm[0],e.zrY=rm[1];return}}e.zrX=e.zrY=0}function Tf(r){return r||window.event}function ar(r,t,e){if(t=Tf(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&wf(r,o,t,e)}else{wf(r,t,t,e);var a=pP(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&fP.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function pP(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function yb(r,t,e,i){r.addEventListener(t,e,i)}function _b(r,t,e,i){r.removeEventListener(t,e,i)}var Ei=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function im(r){return r.which===2||r.which===3}var bb=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=wf(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in nm)if(nm.hasOwnProperty(e)){var i=nm[e](this._track,t);if(i)return i}},r})();function xb(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function dP(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var nm={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=xb(i)/xb(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=dP(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};var nn={};Sr(nn,{clone:()=>vP,copy:()=>Aa,create:()=>kt,identity:()=>Hr,invert:()=>Tr,mul:()=>li,rotate:()=>Da,scale:()=>am,translate:()=>Qo});function kt(){return[1,0,0,1,0,0]}function Hr(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Aa(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function li(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Qo(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Da(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),f=Math.cos(e);return r[0]=n*f+s*c,r[1]=-n*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-i[0])+c*(u-i[1])+i[0],r[5]=f*(u-i[1])-c*(o-i[0])+i[1],r}function am(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Tr(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}function vP(r){var t=kt();return Aa(t,r),t}var mP=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r})(),ke=mP;var La=Math.min,es=Math.max,lm=Math.abs,Sb=["x","y"],gP=["width","height"],Ea=new ke,Ma=new ke,Oa=new ke,Ia=new ke,Cr=cm(),eu=Cr.minTv,um=Cr.maxTv,tu=[0,0],an=(function(){function r(t,e,i,n){om(this,t,e,i,n)}return r.set=function(t,e,i,n,a){return n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),t.x=e,t.y=i,t.width=n,t.height=a,t},r.prototype.union=function(t){var e=La(t.x,this.x),i=La(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=es(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=es(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){return yP(kt(),this,t)},r.prototype.intersect=function(t,e,i){return r.intersect(this,t,e,i)},r.intersect=function(t,e,i,n){i&&ke.set(i,0,0);var a=n&&n.outIntersectRect||null,o=n&&n.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!e)return!1;t instanceof r||(t=om(_P,t.x,t.y,t.width,t.height)),e instanceof r||(e=om(xP,e.x,e.y,e.width,e.height));var s=!!i;Cr.reset(n,s);var l=Cr.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,p=e.x+l,d=e.x+e.width-l,v=e.y+l,m=e.y+e.height-l;if(u>c||f>h||p>d||v>m)return!1;var g=!(c<p||d<u||h<v||m<f);return(s||a)&&(tu[0]=1/0,tu[1]=0,Tb(u,c,p,d,0,s,a,o),Tb(f,h,v,m,1,s,a,o),s&&ke.copy(i,g?Cr.useDir?Cr.dirMinTv:eu:um)),g},r.contain=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){wb(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,i){if(!i){t!==e&&wb(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ea.x=Oa.x=e.x,Ea.y=Ia.y=e.y,Ma.x=Ia.x=e.x+e.width,Ma.y=Oa.y=e.y+e.height,Ea.transform(i),Ia.transform(i),Ma.transform(i),Oa.transform(i),t.x=La(Ea.x,Ma.x,Oa.x,Ia.x),t.y=La(Ea.y,Ma.y,Oa.y,Ia.y);var l=es(Ea.x,Ma.x,Oa.x,Ia.x),u=es(Ea.y,Ma.y,Oa.y,Ia.y);t.width=l-t.x,t.height=u-t.y},r.calculateTransform=function(t,e,i){var n=i.width/e.width,a=i.height/e.height;return t=Hr(t||[]),Qo(t,t,ql(sm,-e.x,-e.y)),am(t,t,ql(sm,n,a)),Qo(t,t,ql(sm,i.x,i.y)),t},r})(),eY=an.create,om=an.set,wb=an.copy,yP=an.calculateTransform,tY=an.applyTransform,rY=an.contain,_P=new an(0,0,0,0),xP=new an(0,0,0,0),sm=[];function Tb(r,t,e,i,n,a,o,s){var l=lm(t-e),u=lm(i-r),c=La(l,u),f=Sb[n],h=Sb[1-n],p=gP[n];t<e||i<r?l<u?(a&&(um[f]=-l),s&&(o[f]=t,o[p]=0)):(a&&(um[f]=u),s&&(o[f]=r,o[p]=0)):(o&&(o[f]=es(r,e),o[p]=La(t,i)-o[f]),a&&(c<tu[0]||Cr.useDir)&&(tu[0]=La(c,tu[0]),(l<u||!Cr.bidirectional)&&(eu[f]=l,eu[h]=0,Cr.useDir&&Cr.calcDirMTV()),(l>=u||!Cr.bidirectional)&&(eu[f]=-u,eu[h]=0,Cr.useDir&&Cr.calcDirMTV())))}function cm(){var r=0,t=new ke,e=new ke,i={minTv:new ke,maxTv:new ke,useDir:!1,dirMinTv:new ke,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){i.touchThreshold=0,a&&a.touchThreshold!=null&&(i.touchThreshold=es(0,a.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,a&&a.direction!=null&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),e.copy(i.minTv),r=a.direction,i.bidirectional=a.bidirectional==null||!!a.bidirectional,i.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=i.minTv,o=i.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),c=l*a.y+u*a.x;if(n(c)){n(a.x)&&n(a.y)&&o.set(0,0);return}if(e.x=s*u/c,e.y=s*l/c,n(e.x)&&n(e.y)){o.set(0,0);return}(i.bidirectional||t.dot(e)>0)&&e.len()<o.len()&&o.copy(e)}};function n(a){return lm(a)<1e-10}return i}var ue=an;var Ab="silent";function bP(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:SP}}function SP(){Ei(this.event)}var wP=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(St),ru=(function(){function r(t,e){this.x=t,this.y=e}return r})(),TP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],fm=new ue(0,0,0,0),Db=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new ru(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new wP,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new db(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(w(TP,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=Eb(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new ru(i,n):this.findHover(i,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new ru(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=bP(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new ru(e,i);if(Cb(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ue(e-u,i-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(fm.copy(h.getBoundingRect()),h.transform&&fm.applyTransform(h.transform),fm.intersect(c)&&s.push(h))}if(s.length)for(var p=4,d=Math.PI/12,v=Math.PI*2,m=0;m<u;m+=p)for(var g=0;g<v;g+=d){var y=e+m*Math.cos(g),_=i+m*Math.sin(g);if(Cb(s,o,y,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new bb);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new ru;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(St);w(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){Db.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=Eb(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||jv(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function CP(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return n?Ab:!0}return!1}function Cb(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=CP(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==Ab)){t.target=o;break}}}function Eb(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var Mb=Db;var Lb=32,iu=7;function AP(r){for(var t=0;r>=Lb;)t|=r&1,r>>=1;return r+t}function Ob(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;DP(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function DP(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function Ib(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function hm(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var c=o+(l-o>>>1);a(r,t[e+c])>0?o=c+1:l=c}return l}function pm(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var c=o+(l-o>>>1);a(r,t[e+c])<0?l=c:o=c+1}return l}function EP(r,t){var e=iu,i,n,a=0,o=[];i=[],n=[];function s(p,d){i[a]=p,n[a]=d,a+=1}function l(){for(;a>1;){var p=a-2;if(p>=1&&n[p-1]<=n[p]+n[p+1]||p>=2&&n[p-2]<=n[p]+n[p-1])n[p-1]<n[p+1]&&p--;else if(n[p]>n[p+1])break;c(p)}}function u(){for(;a>1;){var p=a-2;p>0&&n[p-1]<n[p+1]&&p--,c(p)}}function c(p){var d=i[p],v=n[p],m=i[p+1],g=n[p+1];n[p]=v+g,p===a-3&&(i[p+1]=i[p+2],n[p+1]=n[p+2]),a--;var y=pm(r[m],r,d,v,0,t);d+=y,v-=y,v!==0&&(g=hm(r[d+v-1],r,m,g,g-1,t),g!==0&&(v<=g?f(d,v,m,g):h(d,v,m,g)))}function f(p,d,v,m){var g=0;for(g=0;g<d;g++)o[g]=r[p+g];var y=0,_=v,x=p;if(r[x++]=r[_++],--m===0){for(g=0;g<d;g++)r[x+g]=o[y+g];return}if(d===1){for(g=0;g<m;g++)r[x+g]=r[_+g];r[x+m]=o[y];return}for(var b=e,S,T,A;;){S=0,T=0,A=!1;do if(t(r[_],o[y])<0){if(r[x++]=r[_++],T++,S=0,--m===0){A=!0;break}}else if(r[x++]=o[y++],S++,T=0,--d===1){A=!0;break}while((S|T)<b);if(A)break;do{if(S=pm(r[_],o,y,d,0,t),S!==0){for(g=0;g<S;g++)r[x+g]=o[y+g];if(x+=S,y+=S,d-=S,d<=1){A=!0;break}}if(r[x++]=r[_++],--m===0){A=!0;break}if(T=hm(o[y],r,_,m,0,t),T!==0){for(g=0;g<T;g++)r[x+g]=r[_+g];if(x+=T,_+=T,m-=T,m===0){A=!0;break}}if(r[x++]=o[y++],--d===1){A=!0;break}b--}while(S>=iu||T>=iu);if(A)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(g=0;g<m;g++)r[x+g]=r[_+g];r[x+m]=o[y]}else{if(d===0)throw new Error;for(g=0;g<d;g++)r[x+g]=o[y+g]}}function h(p,d,v,m){var g=0;for(g=0;g<m;g++)o[g]=r[v+g];var y=p+d-1,_=m-1,x=v+m-1,b=0,S=0;if(r[x--]=r[y--],--d===0){for(b=x-(m-1),g=0;g<m;g++)r[b+g]=o[g];return}if(m===1){for(x-=d,y-=d,S=x+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[x]=o[_];return}for(var T=e;;){var A=0,E=0,M=!1;do if(t(o[_],r[y])<0){if(r[x--]=r[y--],A++,E=0,--d===0){M=!0;break}}else if(r[x--]=o[_--],E++,A=0,--m===1){M=!0;break}while((A|E)<T);if(M)break;do{if(A=d-pm(o[_],r,p,d,d-1,t),A!==0){for(x-=A,y-=A,d-=A,S=x+1,b=y+1,g=A-1;g>=0;g--)r[S+g]=r[b+g];if(d===0){M=!0;break}}if(r[x--]=o[_--],--m===1){M=!0;break}if(E=m-hm(r[y],o,0,m,m-1,t),E!==0){for(x-=E,_-=E,m-=E,S=x+1,b=_+1,g=0;g<E;g++)r[S+g]=o[b+g];if(m<=1){M=!0;break}}if(r[x--]=r[y--],--d===0){M=!0;break}T--}while(A>=iu||E>=iu);if(M)break;T<0&&(T=0),T+=2}if(e=T,e<1&&(e=1),m===1){for(x-=d,y-=d,S=x+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[x]=o[_]}else{if(m===0)throw new Error;for(b=x-(m-1),g=0;g<m;g++)r[b+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Pa(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<Lb){a=Ob(r,e,i,t),Ib(r,e,i,e+a,t);return}var o=EP(r,t),s=AP(n);do{if(a=Ob(r,e,i,t),a<s){var l=n;l>s&&(l=s),Ib(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var pt=1,Na=2,Bn=4;var Pb=!1;function dm(){Pb||(Pb=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Nb(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var MP=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Nb}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Pa(i,Nb)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath(),a=e&&e.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||n)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<e.length;l++)s[o++]=e[l];for(var u=n,c=t;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var f=t.childrenRef(),h=0;h<f.length;h++){var p=f[h];t.__dirty&&(p.__dirty|=pt),this._updateAndAddDisplayable(p,s,i)}t.__dirty=0}else{var d=t;isNaN(d.z)&&(dm(),d.z=0),isNaN(d.z2)&&(dm(),d.z2=0),isNaN(d.zlevel)&&(dm(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var v=t.getDecalElement&&t.getDecalElement();v&&this._updateAndAddDisplayable(v,s,i);var m=t.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,i);var g=t.getTextContent();g&&this._updateAndAddDisplayable(g,s,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=ce(this._roots,t);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),kb=MP;var Rb;Rb=fe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var nu=Rb;var Cf={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Cf.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?Cf.bounceIn(r*2)*.5:Cf.bounceOut(r*2-1)*.5+.5}},Af=Cf;var Df=Math.pow,Vn=Math.sqrt,Mf=1e-8,Bb=1e-4,Fb=Vn(3),Ef=1/3,Mi=rn(),Gr=rn(),ts=rn();function zn(r){return r>-Mf&&r<Mf}function zb(r){return r>Mf||r<-Mf}function Je(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function vm(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function ka(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,p=0;if(zn(c)&&zn(f))if(zn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[p++]=d)}else{var v=f*f-4*c*h;if(zn(v)){var m=f/c,d=-s/o+m,g=-m/2;d>=0&&d<=1&&(a[p++]=d),g>=0&&g<=1&&(a[p++]=g)}else if(v>0){var y=Vn(v),_=c*s+1.5*o*(-f+y),x=c*s+1.5*o*(-f-y);_<0?_=-Df(-_,Ef):_=Df(_,Ef),x<0?x=-Df(-x,Ef):x=Df(x,Ef);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[p++]=d)}else{var b=(2*c*s-3*o*f)/(2*Vn(c*c*c)),S=Math.acos(b)/3,T=Vn(c),A=Math.cos(S),d=(-s-2*T*A)/(3*o),g=(-s+T*(A+Fb*Math.sin(S)))/(3*o),E=(-s+T*(A-Fb*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[p++]=d),g>=0&&g<=1&&(a[p++]=g),E>=0&&E<=1&&(a[p++]=E)}}return p}function Of(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(zn(o)){if(zb(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var c=a*a-4*o*s;if(zn(c))n[0]=-a/(2*o);else if(c>0){var f=Vn(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function rs(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,c=(l-s)*n+s,f=(c-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=i}function Vb(r,t,e,i,n,a,o,s,l,u,c){var f,h=.005,p=1/0,d,v,m,g;Mi[0]=l,Mi[1]=u;for(var y=0;y<1;y+=.05)Gr[0]=Je(r,e,n,o,y),Gr[1]=Je(t,i,a,s,y),m=Fn(Mi,Gr),m<p&&(f=y,p=m);p=1/0;for(var _=0;_<32&&!(h<Bb);_++)d=f-h,v=f+h,Gr[0]=Je(r,e,n,o,d),Gr[1]=Je(t,i,a,s,d),m=Fn(Gr,Mi),d>=0&&m<p?(f=d,p=m):(ts[0]=Je(r,e,n,o,v),ts[1]=Je(t,i,a,s,v),g=Fn(ts,Mi),v<=1&&g<p?(f=v,p=g):h*=.5);return c&&(c[0]=Je(r,e,n,o,f),c[1]=Je(t,i,a,s,f)),Vn(p)}function Ub(r,t,e,i,n,a,o,s,l){for(var u=r,c=t,f=0,h=1/l,p=1;p<=l;p++){var d=p*h,v=Je(r,e,n,o,d),m=Je(t,i,a,s,d),g=v-u,y=m-c;f+=Math.sqrt(g*g+y*y),u=v,c=m}return f}function Tt(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function mm(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function Hb(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(zn(a)){if(zb(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var c=o*o-4*a*s;if(zn(c)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var f=Vn(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function If(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function is(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function Gb(r,t,e,i,n,a,o,s,l){var u,c=.005,f=1/0;Mi[0]=o,Mi[1]=s;for(var h=0;h<1;h+=.05){Gr[0]=Tt(r,e,n,h),Gr[1]=Tt(t,i,a,h);var p=Fn(Mi,Gr);p<f&&(u=h,f=p)}f=1/0;for(var d=0;d<32&&!(c<Bb);d++){var v=u-c,m=u+c;Gr[0]=Tt(r,e,n,v),Gr[1]=Tt(t,i,a,v);var p=Fn(Gr,Mi);if(v>=0&&p<f)u=v,f=p;else{ts[0]=Tt(r,e,n,m),ts[1]=Tt(t,i,a,m);var g=Fn(ts,Mi);m<=1&&g<f?(u=m,f=g):c*=.5}}return l&&(l[0]=Tt(r,e,n,u),l[1]=Tt(t,i,a,u)),Vn(f)}function Yb(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,p=Tt(r,e,n,h),d=Tt(t,i,a,h),v=p-s,m=d-l;u+=Math.sqrt(v*v+m*m),s=p,l=d}return u}var OP=/cubic-bezier\(([0-9,\.e ]+)\)/;function Lf(r){var t=r&&OP.exec(r);if(t){var e=t[1].split(","),i=+Dt(e[0]),n=+Dt(e[1]),a=+Dt(e[2]),o=+Dt(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:ka(0,i,a,1,l,s)&&Je(0,n,o,1,s[0])}}}var IP=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Ze,this.ondestroy=t.ondestroy||Ze,this.onrestart=t.onrestart||Ze,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=j(t)?t:Af[t]||Lf(t)},r})(),Wb=IP;var ou={};Sr(ou,{fastLerp:()=>$b,fastMapToColor:()=>FP,lerp:()=>kf,lift:()=>bm,liftColor:()=>Ff,lum:()=>Ra,mapToColor:()=>BP,modifyAlpha:()=>Rf,modifyHSL:()=>as,parse:()=>Vt,parseCssFloat:()=>Hn,parseCssInt:()=>Nf,random:()=>zP,stringify:()=>Ii,toHex:()=>RP});var Zb=(function(){function r(t){this.value=t}return r})();var LP=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Zb(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})();var PP=(function(){function r(t){this._list=new LP,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new Zb(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Oi=PP;var Xb={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 ui(r){return r=Math.round(r),r<0?0:r>255?255:r}function NP(r){return r=Math.round(r),r<0?0:r>360?360:r}function au(r){return r<0?0:r>1?1:r}function Nf(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ui(parseFloat(t)/100*255):ui(parseInt(t,10))}function Hn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?au(parseFloat(t)/100):au(parseFloat(t))}function ym(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Un(r,t,e){return r+(t-r)*e}function Yr(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function _m(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var qb=new Oi(20),Pf=null;function ns(r,t){Pf&&_m(Pf,t),Pf=qb.put(r,Pf||t.slice())}function Vt(r,t){if(r){t=t||[];var e=qb.get(r);if(e)return _m(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Xb)return _m(t,Xb[i]),ns(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){Yr(t,0,0,0,1);return}return Yr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),ns(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){Yr(t,0,0,0,1);return}return Yr(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),ns(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Yr(t,+u[0],+u[1],+u[2],1):Yr(t,0,0,0,1);c=Hn(u.pop());case"rgb":if(u.length>=3)return Yr(t,Nf(u[0]),Nf(u[1]),Nf(u[2]),u.length===3?c:Hn(u[3])),ns(r,t),t;Yr(t,0,0,0,1);return;case"hsla":if(u.length!==4){Yr(t,0,0,0,1);return}return u[3]=Hn(u[3]),xm(u,t),ns(r,t),t;case"hsl":if(u.length!==3){Yr(t,0,0,0,1);return}return xm(u,t),ns(r,t),t;default:return}}Yr(t,0,0,0,1)}}function xm(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=Hn(r[1]),n=Hn(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],Yr(t,ui(ym(o,a,e+1/3)*255),ui(ym(o,a,e)*255),ui(ym(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function kP(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var c=((a-t)/6+o/2)/o,f=((a-e)/6+o/2)/o,h=((a-i)/6+o/2)/o;t===a?l=h-f:e===a?l=1/3+c-h:i===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var p=[l*360,u,s];return r[3]!=null&&p.push(r[3]),p}}function bm(r,t){var e=Vt(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return Ii(e,e.length===4?"rgba":"rgb")}}function RP(r){var t=Vt(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function $b(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=ui(Un(o[0],s[0],l)),e[1]=ui(Un(o[1],s[1],l)),e[2]=ui(Un(o[2],s[2],l)),e[3]=au(Un(o[3],s[3],l)),e}}var FP=$b;function kf(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Vt(t[n]),s=Vt(t[a]),l=i-n,u=Ii([ui(Un(o[0],s[0],l)),ui(Un(o[1],s[1],l)),ui(Un(o[2],s[2],l)),au(Un(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var BP=kf;function as(r,t,e,i){var n=Vt(r);if(r)return n=kP(n),t!=null&&(n[0]=NP(j(t)?t(n[0]):t)),e!=null&&(n[1]=Hn(j(e)?e(n[1]):e)),i!=null&&(n[2]=Hn(j(i)?i(n[2]):i)),Ii(xm(n),"rgba")}function Rf(r,t){var e=Vt(r);if(e&&t!=null)return e[3]=au(t),Ii(e,"rgba")}function Ii(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Ra(r,t){var e=Vt(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function zP(){return Ii([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var Kb=new Oi(100);function Ff(r){if(H(r)){var t=Kb.get(r);return t||(t=bm(r,-.1),Kb.put(r,t)),t}else if(Qi(r)){var e=B({},r);return e.colorStops=U(r.colorStops,function(i){return{offset:i.offset,color:bm(i.color,-.1)}}),e}return r}function jb(r){return r.type==="linear"}function Jb(r){return r.type==="radial"}var MY=(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(r){return Buffer.from(r).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(r){return btoa(unescape(encodeURIComponent(r)))}:function(r){return null}})();var wm=Array.prototype.slice;function on(r,t,e){return(t-r)*e+r}function Sm(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=on(t[a],e[a],i);return r}function VP(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=on(t[o][s],e[o][s],i)}return r}function Bf(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function Qb(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*i}return r}function UP(r,t){for(var e=r.length,i=t.length,n=e>i?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function HP(r,t,e){var i=r,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(e===1?n[l]:wm.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(e===1)isNaN(i[l])&&(i[l]=n[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=n[l][c])}}function uu(r){if(ct(r)){var t=r.length;if(ct(r[0])){for(var e=[],i=0;i<t;i++)e.push(wm.call(r[i]));return e}return wm.call(r)}return r}function Uf(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function GP(r){return ct(r&&r[0])?2:1}var zf=0,Hf=1,rS=2,lu=3,Tm=4,Cm=5,eS=6;function tS(r){return r===Tm||r===Cm}function Vf(r){return r===Hf||r===rS}var su=[0,0,0,0],YP=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=eS,l=e;if(ct(e)){var u=GP(e);s=u,(u===1&&!ge(e[0])||u===2&&!ge(e[0][0]))&&(o=!0)}else if(ge(e)&&!en(e))s=zf;else if(H(e))if(!isNaN(+e))s=zf;else{var c=Vt(e);c&&(l=c,s=lu)}else if(Qi(e)){var f=B({},l);f.colorStops=U(e.colorStops,function(p){return{offset:p.offset,color:Vt(p.color)}}),jb(e)?s=Tm:Jb(e)&&(s=Cm),l=f}a===0?this.valType=s:(s!==this.valType||s===eS)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return i&&(h.easing=i,h.easingFunc=j(i)?i:Af[i]||Lf(i)),n.push(h),h},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(v,m){return v.time-m.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Vf(n),u=tS(n),c=0;c<a;c++){var f=i[c],h=f.value,p=o.value;f.percent=f.time/t,s||(l&&c!==a-1?HP(h,p,n):u&&UP(h.colorStops,p.colorStops))}if(!s&&n!==Cm&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var d=i[0].value,c=0;c<a;c++)n===zf?i[c].additiveValue=i[c].value-d:n===lu?i[c].additiveValue=Bf([],i[c].value,d,-1):Vf(n)&&(i[c].additiveValue=n===Hf?Bf([],i[c].value,d,-1):Qb([],i[c].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===lu,c,f=this._lastFr,h=Math.min,p,d;if(s===1)p=d=o[0];else{if(e<0)c=0;else if(e<this._lastFrP){var v=h(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=e);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>e);c++);c=h(c-1,s-2)}d=o[c+1],p=o[c]}if(p&&d){this._lastFr=c,this._lastFrP=e;var m=d.percent-p.percent,g=m===0?1:h((e-p.percent)/m,1);d.easingFunc&&(g=d.easingFunc(g));var y=i?this._additiveValue:u?su:t[l];if((Vf(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=g<1?p.rawValue:d.rawValue;else if(Vf(a))a===Hf?Sm(y,p[n],d[n],g):VP(y,p[n],d[n],g);else if(tS(a)){var _=p[n],x=d[n],b=a===Tm;t[l]={type:b?"linear":"radial",x:on(_.x,x.x,g),y:on(_.y,x.y,g),colorStops:U(_.colorStops,function(T,A){var E=x.colorStops[A];return{offset:on(T.offset,E.offset,g),color:Uf(Sm([],T.color,E.color,g))}}),global:x.global},b?(t[l].x2=on(_.x2,x.x2,g),t[l].y2=on(_.y2,x.y2,g)):t[l].r=on(_.r,x.r,g)}else if(u)Sm(y,p[n],d[n],g),i||(t[l]=Uf(y));else{var S=on(p[n],d[n],g);i?this._additiveValue=S:t[l]=S}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===zf?t[i]=t[i]+n:e===lu?(Vt(t[i],su),Bf(su,su,n,1),t[i]=Uf(su)):e===Hf?Bf(t[i],t[i],n,1):e===rS&&Qb(t[i],t[i],n,1)},r})(),WP=(function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Sa("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,De(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new YP(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===lu&&u&&(u=Uf(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,uu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,uu(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(e._target[s.propName]=f.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var h=new Wb({life:n,loop:this._loop,delay:this._delay||0,onframe:function(p){e._started=2;var d=e._additiveAnimators;if(d){for(var v=!1,m=0;m<d.length;m++)if(d[m]._clip){v=!0;break}v||(e._additiveAnimators=null)}for(var m=0;m<i.length;m++)i[m].step(e._target,p);var g=e._onframeCbs;if(g)for(var m=0;m<g.length;m++)g[m](e._target,p)},ondestroy:function(){e._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&h.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return U(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var a=e[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(t[a]=uu(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||De(t);for(var i=0;i<e.length;i++){var n=e[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})(),cu=WP;function Fa(){return new Date().getTime()}var ZP=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return 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 i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=Fa()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(nu(i),!e._paused&&e.update())}nu(i)},t.prototype.start=function(){this._running||(this._time=Fa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Fa(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Fa()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new cu(e,i.loop);return this.addAnimator(n),n},t})(St),iS=ZP;var XP=300,Am=fe.domSupported,Dm=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=U(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}})(),nS={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},aS=!1;function Om(r){var t=r.pointerType;return t==="pen"||t==="touch"}function KP(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Em(r){r&&(r.zrByTouch=!0)}function qP(r,t){return ar(r.dom,new $P(r,t),!0)}function sS(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var $P=(function(){function r(t,e){this.stopPropagation=Ze,this.stopImmediatePropagation=Ze,this.preventDefault=Ze,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),ci={mousedown:function(r){r=ar(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ar(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ar(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ar(this.dom,r);var t=r.toElement||r.relatedTarget;sS(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){aS=!0,r=ar(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){aS||(r=ar(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ar(this.dom,r),Em(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),ci.mousemove.call(this,r),ci.mousedown.call(this,r)},touchmove:function(r){r=ar(this.dom,r),Em(r),this.handler.processGesture(r,"change"),ci.mousemove.call(this,r)},touchend:function(r){r=ar(this.dom,r),Em(r),this.handler.processGesture(r,"end"),ci.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<XP&&ci.click.call(this,r)},pointerdown:function(r){ci.mousedown.call(this,r)},pointermove:function(r){Om(r)||ci.mousemove.call(this,r)},pointerup:function(r){ci.mouseup.call(this,r)},pointerout:function(r){Om(r)||ci.mouseout.call(this,r)}};w(["click","dblclick","contextmenu"],function(r){ci[r]=function(t){t=ar(this.dom,t),this.trigger(r,t)}});var Im={pointermove:function(r){Om(r)||Im.mousemove.call(this,r)},pointerup:function(r){Im.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function jP(r,t){var e=t.domHandlers;fe.pointerEventsSupported?w(Dm.pointer,function(i){Gf(t,i,function(n){e[i].call(r,n)})}):(fe.touchEventsSupported&&w(Dm.touch,function(i){Gf(t,i,function(n){e[i].call(r,n),KP(t)})}),w(Dm.mouse,function(i){Gf(t,i,function(n){n=Tf(n),t.touching||e[i].call(r,n)})}))}function JP(r,t){fe.pointerEventsSupported?w(nS.pointer,e):fe.touchEventsSupported||w(nS.mouse,e);function e(i){function n(a){a=Tf(a),sS(r,a.target)||(a=qP(r,a),t.domHandlers[i].call(r,a))}Gf(t,i,n,{capture:!0})}}function Gf(r,t,e,i){r.mounted[t]=e,r.listenerOpts[t]=i,yb(r.domTarget,t,e,i)}function Mm(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&_b(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var oS=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),QP=(function(r){N(t,r);function t(e,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new oS(e,ci),Am&&(n._globalHandlerScope=new oS(document,Im)),jP(n,n._localHandlerScope),n}return t.prototype.dispose=function(){Mm(this._localHandlerScope),Am&&Mm(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,Am&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?JP(this,i):Mm(i)}},t})(St),lS=QP;var uS=1;fe.hasGlobalWindow&&(uS=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ba=uS,fu=.4,hu="#333",pu="#ccc",cS="#eee";var fS=Hr,hS=5e-5;function za(r){return r>hS||r<-hS}var Va=[],os=[],Lm=kt(),Pm=Math.abs,pS=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return eN(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return za(this.rotation)||za(this.x)||za(this.y)||za(this.scaleX-1)||za(this.scaleY-1)||za(this.skewX)||za(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(fS(i),this.invTransform=null);return}i=i||kt(),e?this.getLocalTransform(i):fS(i),t&&(e?li(i,t,i):Aa(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i),this.invTransform=this.invTransform||kt(),Tr(this.invTransform,i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Va);var i=Va[0]<0?-1:1,n=Va[1]<0?-1:1,a=((Va[0]-i)*e+i)/Va[0]||0,o=((Va[1]-n)*e+n)/Va[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||kt(),li(os,t.invTransform,e),e=os);var i=this.originX,n=this.originY;(i||n)&&(Lm[4]=i,Lm[5]=n,li(os,e,Lm),os[4]-=i,os[5]-=n,e=os),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ht(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ht(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&Pm(t[0]-1)>1e-10&&Pm(t[3]-1)>1e-10?Math.sqrt(Pm(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){ls(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,h=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,v=n+l;e[4]=-d*a-h*v*o,e[5]=-v*o-p*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=p*a,e[2]=h*o,u&&Da(e,e,u),e[4]+=i+c,e[5]+=n+f,e},r.initDefaultProps=(function(){var t=r.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})(),r})(),eN=pS.getLocalTransform;var ss=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ls(r,t){return Gv(r,t,ss)}var us=pS;function hi(r){Yf||(Yf=new Oi(100)),r=r||Br;var t=Yf.get(r);return t||(t={font:r,strWidthCache:new Oi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:je.measureText("\u56FD",r).width,asciiCharWidth:je.measureText("a",r).width},Yf.put(r,t)),t}var Yf;function tN(r){if(!(Nm>=dS)){r=r||Br;for(var t=[],e=+new Date,i=0;i<=127;i++)t[i]=je.measureText(String.fromCharCode(i),r).width;var n=+new Date-e;return n>16?Nm=dS:n>2&&Nm++,t}}var Nm=0,dS=5;function km(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=tN(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function pi(r,t){var e=r.strWidthCache,i=e.get(t);return i==null&&(i=je.measureText(t,r.font).width,e.put(t,i)),i}function vS(r,t,e,i){var n=pi(hi(t),r),a=du(t),o=Gn(0,n,e),s=sn(0,a,i),l=new ue(o,s,n,a);return l}function Wf(r,t,e,i){var n=((r||"")+"").split(`
|
|
3
|
-
`),a=n.length;if(a===1)return vS(n[0],t,e,i);for(var o=new ue(0,0,0,0),s=0;s<n.length;s++){var l=vS(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function Gn(r,t,e,i){return e==="right"?i?r+=t:r-=t:e==="center"&&(i?r+=t/2:r-=t/2),r}function sn(r,t,e,i){return e==="middle"?i?r+=t/2:r-=t/2:e==="bottom"&&(i?r+=t:r-=t),r}function du(r){return hi(r).stWideCharWidth}function fi(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Ua(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,c="left",f="top";if(i instanceof Array)l+=fi(i[0],e.width),u+=fi(i[1],e.height),c=null,f=null;else switch(i){case"left":l-=n,u+=s,c="right",f="middle";break;case"right":l+=n+o,u+=s,f="middle";break;case"top":l+=o/2,u-=n,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+n,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=n,u+=s,f="middle";break;case"insideRight":l+=o-n,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=n,c="center";break;case"insideBottom":l+=o/2,u+=a-n,c="center",f="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=a-n,f="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var Rm="__zr_normal__",Fm=ss.concat(["ignore"]),rN=zt(ss,function(r,t){return r[t]=!0,r},{ignore:!1}),cs={},iN=new ue(0,0,0,0),Zf=[],Xf=0,fs=1,Vm=(function(){function r(t){this.id=Wl(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;a.copyTransform(e);var c=i.position!=null,f=i.autoOverflowArea,h=void 0;if((f||c)&&(h=iN,i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(cs,i,h):Ua(cs,i,h),a.x=cs.x,a.y=cs.y,o=cs.align,s=cs.verticalAlign;var p=i.origin;if(p&&i.rotation!=null){var d=void 0,v=void 0;p==="center"?(d=h.width*.5,v=h.height*.5):(d=fi(p[0],h.width),v=fi(p[1],h.height)),u=!0,a.originX=-a.x+d+(n?0:h.x),a.originY=-a.y+v+(n?0:h.y)}}i.rotation!=null&&(a.rotation=i.rotation);var m=i.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=g.overflowRect=g.overflowRect||new ue(0,0,0,0);a.getLocalTransform(Zf),Tr(Zf,Zf),ue.copy(y,h),y.applyTransform(Zf)}else g.overflowRect=null;var _=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,x=void 0,b=void 0,S=void 0;_&&this.canBeInsideText()?(x=i.insideFill,b=i.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(x),S=!0)):(x=i.outsideFill,b=i.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(x),S=!0)),x=x||"#000",(x!==g.fill||b!==g.stroke||S!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=x,g.stroke=b,g.autoStroke=S,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=pt,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?pu:hu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Vt(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Ii(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(W(t))for(var i=t,n=De(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==Rm)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Fm)},r.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Rm,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===Rm,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ce(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Sa("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=this._textContent,f=gS(this,c,u,n);f&&!this.__inHover&&(this.__inHover=f),this._applyStateObj(t,u,this._normalState,e,_S(this,i,l),l);var h=this._textGuide;return c&&c.useState(t,e,i,!!f),h&&h.useState(t,e,i,!!f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=Xf,this.__dirty&=~pt),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&n.push(c)}var f=n[o-1],h=this._textContent,p=gS(this,h,f,i);p&&!this.__inHover&&(this.__inHover=p);var d=this._mergeStates(n),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,_S(this,e,v),v);var m=this._textGuide;h&&h.useStates(t,e,!!p),m&&m.useStates(t,e,!!p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this.__inHover=Xf,this.__dirty&=~pt)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=ce(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=ce(n,t),o=ce(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n<t.length;n++){var a=t[n];B(e,a),a.textConfig&&(i=i||{},B(i,a.textConfig))}return i&&(e.textConfig=i),e},r.prototype._applyStateObj=function(t,e,i,n,a,o){if(this.__inHover!==fs){var s=!(e&&n);e&&e.textConfig?(this.textConfig=B({},n?this.textConfig:i.textConfig),B(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<Fm.length;c++){var f=Fm[c],h=a&&rN[f];e&&e[f]!=null?h?(u=!0,l[f]=e[f]):this[f]=e[f]:s&&i[f]!=null&&(h?(u=!0,l[f]=i[f]):this[f]=i[f])}if(!a)for(var c=0;c<this.animators.length;c++){var p=this.animators[c],d=p.targetName;p.getLoop()||p.__changeFinalValue(d?(e||i)[d]:e||i)}u&&this._transitionState(t,l,o)}},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new us,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),B(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=pt;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,i){var n=t?this[t]:this,a=new cu(n,e,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var a=n.animators,o=ce(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,i){Bm(this,t,e,i)},r.prototype.animateFrom=function(t,e,i){Bm(this,t,e,i,!0)},r.prototype._transitionState=function(t,e,i,n){for(var a=Bm(this,e,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=Xf,t.__dirty=pt;var e={};function i(a,o,s){e[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),e[a+o+s]=!0)}function n(a,o,s,l){Object.defineProperty(t,a,{get:function(){if(!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(h){c[s]=h}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(h){c[l]=h}})}}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))})(),r})();mt(Vm,St);mt(Vm,us);function Bm(r,t,e,i,n){e=e||{};var a=[];xS(r,"",r,t,e,i,a,n);var o=a.length,s=!1,l=e.done,u=e.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,v){e.during(v)});for(var h=0;h<a.length;h++){var p=a[h];c&&p.done(c),f&&p.aborted(f),e.force&&p.duration(e.duration),p.start(e.easing)}return a}function zm(r,t,e){for(var i=0;i<e;i++)r[i]=t[i]}function nN(r){return ct(r[0])}function aN(r,t,e){if(ct(t[e]))if(ct(r[e])||(r[e]=[]),rt(t[e])){var i=t[e].length;r[e].length!==i&&(r[e]=new t[e].constructor(i),zm(r[e],t[e],i))}else{var n=t[e],a=r[e],o=n.length;if(nN(n))for(var s=n[0].length,l=0;l<o;l++)a[l]?zm(a[l],n[l],s):a[l]=Array.prototype.slice.call(n[l]);else zm(a,n,o);a.length=n.length}else r[e]=t[e]}function oN(r,t){return r===t||ct(r)&&ct(t)&&sN(r,t)}function sN(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function xS(r,t,e,i,n,a,o,s){for(var l=De(i),u=n.duration,c=n.delay,f=n.additive,h=n.setToFinal,p=!W(a),d=r.animators,v=[],m=0;m<l.length;m++){var g=l[m],y=i[g];if(y!=null&&e[g]!=null&&(p||a[g]))if(W(y)&&!ct(y)&&!Qi(y)){if(t){s||(e[g]=y,r.updateDuringAnimation(t));continue}xS(r,g,e[g],y,n,a&&a[g],o,s)}else v.push(g);else s||(e[g]=y,r.updateDuringAnimation(t),v.push(g))}var _=v.length;if(!f&&_)for(var x=0;x<d.length;x++){var b=d[x];if(b.targetName===t){var S=b.stopTracks(v);if(S){var T=ce(d,b);d.splice(T,1)}}}if(n.force||(v=Be(v,function(O){return!oN(i[O],e[O])}),_=v.length),_>0||n.force&&!o.length){var A=void 0,E=void 0,M=void 0;if(s){E={},h&&(A={});for(var x=0;x<_;x++){var g=v[x];E[g]=e[g],h?A[g]=i[g]:e[g]=i[g]}}else if(h){M={};for(var x=0;x<_;x++){var g=v[x];M[g]=uu(e[g]),aN(e,i,g)}}var b=new cu(e,!1,!1,f?Be(d,function(L){return L.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),h&&A&&b.whenWithKeys(0,A,v),M&&b.whenWithKeys(0,M,v),b.whenWithKeys(u??500,s?E:i,v).delay(c||0),r.addAnimator(b,t),o.push(b)}}function gS(r,t,e,i){return!(e&&e.hoverLayer||i)||yS(r)||t&&yS(t)?Xf:fs}function yS(r){return r.type==="text"||r.type==="tspan"}function _S(r,t,e){return!t&&!r.__inHover&&e&&e.duration>0}var Kf=Vm;var bS=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return 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 i=this._children,n=0;n<i.length;n++)if(i[n].name===e)return i[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,i){if(e&&e!==this&&e.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=ce(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=ce(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n<e.length;n++){var a=e[n];i&&a.removeSelfFromZr(i),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];e.call(i,o,a)}return this},t.prototype.traverse=function(e,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=e.call(i,a);a.isGroup&&!o&&a.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var i=new ue(0,0,0,0),n=e||this._children,a=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(ue.applyTransform(i,u,c),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},t})(Kf);bS.prototype.type="group";var Ee=bS;var qf={},Ha={};function lN(r){delete Ha[r]}function uN(r){if(!r)return!1;if(typeof r=="string")return Ra(r,1)<fu;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=Ra(t[n].color,1);return e/=i,e<fu}return!1}var cN=(function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new kb,o=i.renderer||"canvas";qf[o]||(o=De(qf)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new qf[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!fe.node&&!fe.worker&&!l?new lS(s.getViewportRoot(),s.root):null,c=i.useCoarsePointer,f=c==null||c==="auto"?fe.touchEventsSupported:!!c,h=44,p;f&&(p=Z(i.pointerSize,h)),this.handler=new Mb(a,s,u,s.root,p),this.animation=new iS({stage:{update:l?null:function(){return n._flush(!1)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=uN(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},r.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!0)},r.prototype._flush=function(t){var e,i=Fa(),n=this._needsRefresh,a=this._needsRefreshHover;(n||a)&&(e=!0,this._refresh({animUpdate:t,refresh:n,refreshHover:a}));var o=Fa();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Ee&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){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,lN(this.id))},r})();function $f(r,t){var e=new cN(Wl(),r,t);return Ha[e.id]=e,e}function fN(r){r.dispose()}function hN(){for(var r in Ha)Ha.hasOwnProperty(r)&&Ha[r].dispose();Ha={}}function pN(r){return Ha[r]}function Hm(r,t){qf[r]=t}var Um;function dN(r){if(typeof Um=="function")return Um(r)}function Gm(r){Um=r}var vN="6.1.0";var SS=1e-4,Jf=20;function mN(r){return r.replace(/^\s+|\s+$/g,"")}var Xe=Math.min,Se=Math.max,Ge=Math.abs,or=Math.round,sr=Math.floor,Li=Math.ceil,Wn=Math.pow,Yn=Math.log,vu=Math.LN10,gN=Math.PI,yN=Math.random;function $e(r,t,e,i){var n=t[0],a=t[1],o=e[0],s=e[1],l=a-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}var Ve=_N;function _N(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Qf(r,t,e)}function Qf(r,t,e){return H(r)?xN(r)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function xN(r){return!!mN(r).match(/%$/)}function we(r,t,e){return isNaN(t)?e?""+r:+r:(t=Xe(Se(0,t),Jf),r=(+r).toFixed(t),e?r:+r)}function wS(r,t,e){return t==null&&(t=10),we(r,t,e)}function Ct(r){return r.sort(function(t,e){return t-e}),r}function Kt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(or(r*t)/t===r)return e}return Ym(r)}function Ym(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Se(0,o-i)}function TS(r,t){var e=sr(Yn(r[1]-r[0])/vu),i=or(Yn(Ge(t[1]-t[0]))/vu),n=Xe(Se(-e+i,0),Jf);return isFinite(n)?n:Jf}function eh(r,t,e){var i=Ge(r[1]-r[0]);if(!isFinite(i)||i===0)return NaN;var n=Yn(2*Ge(e||1)*Ge(i))/vu,a=Yn(Ge(t))/vu,o=Se(0,Li(-n+a));return isFinite(o)||(o=NaN),o}function CS(r,t,e){if(!r[t])return 0;var i=bN(r,e);return i[t]||0}function bN(r,t){var e=zt(r,function(p,d){return p+(isNaN(d)?0:d)},0);if(e===0)return[];for(var i=Wn(10,t),n=U(r,function(p){return(isNaN(p)?0:p)/e*i*100}),a=i*100,o=U(n,function(p){return sr(p)}),s=zt(o,function(p,d){return p+d},0),l=U(n,function(p,d){return p-o[d]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return U(o,function(p){return p/i})}function ln(r,t){var e=Se(Kt(r),Kt(t)),i=r+t;return e>Jf?i:we(i,e)}var mu=Wn(2,53)-1;function gu(r){var t=gN*2;return(r%t+t)%t}function Ga(r){return r>-SS&&r<SS}var SN=/^(?:(\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 qt(r){if(r instanceof Date)return r;if(H(r)){var t=SN.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else 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)}else if(r==null)return new Date(NaN);return new Date(or(r))}function hs(r){return Wn(10,ps(r))}function ps(r){if(r===0)return 0;var t=sr(Yn(r)/vu);return r/Wn(10,t)>=10&&t++,t}var Wm=2;function un(r,t){var e=ps(r),i=Wn(10,e),n=r/i,a;return t===Wm?a=1:t?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,we(r,-e)}function AS(r,t){var e=(r.length-1)*t+1,i=sr(e),n=+r[i-1],a=e-i;return a?n+a*(r[i]-n):n}function DS(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-e),t=n[o],e=a[o];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Wr(r){var t=parseFloat(r);return t==r&&(t!==0||!H(r)||r.indexOf("x")<=0)?t:NaN}function yu(r){return!isNaN(Wr(r))}function _u(){return or(yN()*9)}function ES(r,t){return t===0?r:ES(t,r%t)}function Zm(r,t){return r==null?t:t==null?r:r*t/ES(r,t)}function gt(r){return r!=null&&isFinite(r)}var wN="[ECharts] ",MS={},TN=typeof console<"u"&&console.warn&&console.log;function CN(r,t,e){if(TN){if(e){if(MS[t])return;MS[t]=!0}console[r](wN+t)}}function Xm(r,t){CN("error",r,t)}function Et(r){throw new Error(r)}function OS(r,t,e){return(t-r)*e+r}var IS="series\0",AN="\0_ec_\0";function Qe(r){return r instanceof Array?r:r==null?[]:[r]}function Su(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i<n;i++){var a=e[i];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var Km=["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 cn(r){return W(r)&&!F(r)&&!(r instanceof Date)?r.value:r}function LS(r){return W(r)&&!(r instanceof Array)}function PS(r,t,e){var i=e==="normalMerge",n=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=Y();w(t,function(l,u){if(!W(l)){t[u]=null;return}});var s=DN(r,o,e);return(i||n)&&EN(s,r,o,t),i&&MN(s,t),i||n?ON(s,t,n):a&&IN(s,t),LN(s),s}function DN(r,t,e){var i=[];if(e==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&t.set(a.id,n),i.push({existing:e==="replaceMerge"||ds(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function EN(r,t,e,i){w(i,function(n,a){if(!(!n||n.id==null)){var o=bu(n.id),s=e.get(o);if(s!=null){var l=r[s];ft(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],i[a]=null}}})}function MN(r,t){w(t,function(e,i){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||e.id==null)&&!ds(e)&&!ds(a)&&NS("name",a,e)){r[n].newOption=e,t[i]=null;return}}})}function ON(r,t,e){w(t,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||ds(n.existing)||n.existing&&i.id!=null&&!NS("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=e):r.push({newOption:i,brandNew:e,existing:null,keyInfo:null}),a++}})}function IN(r,t){w(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function LN(r){var t=Y();w(r,function(e){var i=e.existing;i&&t.set(i.id,e)}),w(r,function(e){var i=e.newOption;ft(!i||i.id==null||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})}),w(r,function(e,i){var n=e.existing,a=e.newOption,o=e.keyInfo;if(W(a)){if(o.name=a.name!=null?bu(a.name):n?n.name:IS+i,n)o.id=bu(n.id);else if(a.id!=null)o.id=bu(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function NS(r,t,e){var i=Ar(t[r],null),n=Ar(e[r],null);return i!=null&&n!=null&&i===n}function bu(r){return Ar(r,"")}function Ar(r,t){return r==null?t:H(r)?r:ge(r)||jo(r)?r+"":t}function vs(r){var t=r.name;return!!(t&&t.indexOf(IS))}function ds(r){return r&&r.id!=null&&bu(r.id).indexOf(AN)===0}function kS(r,t,e){w(r,function(i){var n=i.newOption;W(n)&&(i.keyInfo.mainType=t,i.keyInfo.subType=PN(t,n,i.existing,e))})}function PN(r,t,e,i){var n=t.type?t.type:e?e.subType:i.determineSubType(r,t);return n}function Zr(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return F(t.dataIndex)?U(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return F(t.name)?U(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function re(){var r="__ec_inner_"+NN++;return function(t){return t[r]||(t[r]={})}}var NN=_u();function th(r,t,e){var i=wu(t,e),n=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,c){var f=Zn(r,c,u,{useDefault:l===c,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function wu(r,t){var e;if(H(r)){var i={};i[r+"Index"]=0,e=i}else e=r;var n=Y(),a={},o=!1;return w(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||t&&t.includeMainTypes&&ce(t.includeMainTypes,c)<0)){o=o||!!c;var h=n.get(c)||n.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:a}}var at={useDefault:!0,enableAll:!1,enableNone:!1},RS={useDefault:!1,enableAll:!0,enableNone:!0};function Zn(r,t,e,i){i=i||at;var n=e.index,a=e.id,o=e.name,s={models:null,specified:n!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(t))?[l]:[],s}if(n==="none"||n===!1){if(i.enableNone)return s.models=[],s;n=-1}return n==="all"&&(i.enableAll?n=a=o=null:n=-1),s.models=r.queryComponents({mainType:t,index:n,id:a,name:o}),s}function FS(r,t,e){var i={};i[t+"Id"]=r[t+"Id"],i[t+"Index"]=r[t+"Index"],i[t+"Name"]=r[t+"Name"];var n={mainType:t,query:i};return e&&(n.subType=e),n}function qm(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function BS(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function zS(r){return r==="auto"?fe.domSupported?"html":"richText":r||"html"}function $m(r,t,e,i,n){var a=t==null||t==="auto";if(i==null)return i;if(ge(i)){var o=OS(e||0,i,n);return we(o,a?Math.max(Kt(e||0),Kt(i)):t)}else{if(H(i))return n<1?e:i;for(var s=[],l=e,u=i,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=r.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(n<1&&l?l:u)[f];else{var p=l&&l[f]?l[f]:0,d=u[f],o=OS(p,d,n);s[f]=we(o,a?Math.max(Kt(p),Kt(d)):t)}}return s}}var DW=(function(){function r(){}return r.prototype.reset=function(t,e,i,n){return this._list=t,this._step=n=n||1,this._idx=e,this._end=i??(n>0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Rt(){return[1/0,-1/0]}function Tu(r,t){di(t)&&(t<r[0]&&(r[0]=t),t>r[1]&&(r[1]=t))}function jm(r,t){di(t)&&t<r[0]&&(r[0]=t)}function Jm(r,t){di(t)&&t>r[1]&&(r[1]=t)}function VS(r,t){fn(t[0],t[1])&&(t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1]))}function di(r){return r!=null&&isFinite(r)}function fn(r,t){return di(r)&&di(t)&&r<=t}function US(r){var t=r[1]-r[0];return isFinite(t)&&t>=0}function ms(r){fn(r[0],r[1])&&r[0]>r[1]&&(r[0]=r[1])}function gs(){var r="__ec_once_"+kN++;return function(t,e){We(t,r)||(t[r]=1,e())}}var kN=_u();function ys(r,t,e){var i=Y(),n=0;w(r,function(a){var o=t(a),s=i.get(o)||0;e&&e(a,s),!s&&!e&&(r[n++]=a),i.set(o,s+1)}),e||(r.length=n)}function HS(r){return r.value+""}function GS(r){return r+""}function YS(r,t){return Z(t,!0)?r.seriesIndex+2:0}function rh(r,t,e){var i=r.getData().count();return{progressiveRender:e.progressiveEnabled&&t.incrementalPrepareRender&&i>=e.threshold,large:r.get("large")&&i>=r.get("largeThreshold"),modDataCount:r.get("progressiveChunkMode")==="mod"?r.getData().count():null}}function _s(r){return{overallReset:r}}var RN=".",Wa="___EC__COMPONENT__CONTAINER___",WS="___EC__EXTENDED_CLASS___";function lr(r){var t={main:"",sub:""};if(r){var e=r.split(RN);t.main=e[0]||"",t.sub=e[1]||""}return t}function FN(r){ft(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function ZS(r){return!!(r&&r[WS])}function xs(r,t){r.$constructor=r,r.extend=function(e){var i=this,n;return BN(i)?n=(function(a){N(o,a);function o(){return a.apply(this,arguments)||this}return o})(i):(n=function(){(e.$constructor||i).apply(this,arguments)},Zl(n,this)),B(n.prototype,e),n[WS]=!0,n.extend=this.extend,n.superCall=VN,n.superApply=UN,n.superClass=i,n}}function BN(r){return j(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function ih(r,t){r.extend=t.extend}var zN=Math.round(Math.random()*10);function XS(r){var t=["__\0is_clz",zN++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function VN(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(r,e)}function UN(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Xn(r){var t={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){FN(n),i.prototype.type=n;var a=lr(n);if(!a.sub)t[a.main]=i;else if(a.sub!==Wa){var o=e(a);o[a.sub]=i}}return i},r.getClass=function(i,n,a){var o=t[i];if(o&&o[Wa]&&(o=n?o[n]:null),a&&!o)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return o},r.getClassesByMainType=function(i){var n=lr(i),a=[],o=t[n.main];return o&&o[Wa]?w(o,function(s,l){l!==Wa&&a.push(s)}):a.push(o),a},r.hasClass=function(i){var n=lr(i);return!!t[n.main]},r.getAllClassMainTypes=function(){var i=[];return w(t,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=lr(i),a=t[n.main];return a&&a[Wa]};function e(i){var n=t[i.main];return(!n||!n[Wa])&&(n=t[i.main]={},n[Wa]=!0),n}}function Pi(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(i,n,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&ce(n,l)>=0||a&&ce(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var HN=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],GN=Pi(HN),KS=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return GN(this,t,e)},r})();var eg=new Oi(50);function $S(r){if(typeof r=="string"){var t=eg.get(r);return t&&t.image}else return r}function tg(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=eg.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!bs(t)&&a.pending.push(o)):(t=je.loadImage(r,qS,qS),t.__zrImageSrc=r,eg.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function qS(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function bs(r){return r&&r.width&&r.height}var rg=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ng(r,t,e,i,n){var a={};return ew(a,r,t,e,i,n),a.text}function ew(r,t,e,i,n,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
2
|
+
(()=>{var ab=Object.defineProperty;var ob=r=>{throw TypeError(r)};var ML=(r,t,e)=>t in r?ab(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Sr=(r,t)=>{for(var e in t)ab(r,e,{get:t[e],enumerable:!0})};var se=(r,t,e)=>ML(r,typeof t!="symbol"?t+"":t,e),Rv=(r,t,e)=>t.has(r)||ob("Cannot "+e);var Bt=(r,t,e)=>(Rv(r,t,"read from private field"),e?e.call(r):t.get(r)),Ji=(r,t,e)=>t.has(r)?ob("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),Yl=(r,t,e,i)=>(Rv(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e),xa=(r,t,e)=>(Rv(r,t,"access private method"),e);var $0={};Sr($0,{Axis:()=>xd,ChartView:()=>Ft,ComponentModel:()=>Le,ComponentView:()=>nt,List:()=>_i,Model:()=>Re,PRIORITY:()=>u0,SeriesModel:()=>tr,color:()=>ou,connect:()=>cB,dataTool:()=>yB,dependencies:()=>ZF,disConnect:()=>fB,disconnect:()=>yA,dispose:()=>hB,env:()=>fe,extendChartView:()=>Zz,extendComponentModel:()=>Gz,extendComponentView:()=>Yz,extendSeriesModel:()=>Wz,format:()=>Z0,getCoordinateSystemDimensions:()=>dB,getInstanceByDom:()=>h0,getInstanceById:()=>pB,getMap:()=>gB,graphic:()=>W0,helper:()=>F0,init:()=>uB,innerDrawElementOnCanvas:()=>$s,matrix:()=>nn,number:()=>G0,parseGeoJSON:()=>yd,parseGeoJson:()=>yd,registerAction:()=>Xi,registerCoordinateSystem:()=>v0,registerCustomSeries:()=>vB,registerLayout:()=>m0,registerLoading:()=>Wp,registerLocale:()=>Uh,registerMap:()=>y0,registerPostInit:()=>p0,registerPostUpdate:()=>d0,registerPreprocessor:()=>Gp,registerProcessor:()=>Yp,registerTheme:()=>lc,registerTransform:()=>_0,registerUpdateLifecycle:()=>uc,registerVisual:()=>Sn,setCanvasCreator:()=>mB,setPlatformAPI:()=>gf,throttle:()=>Do,time:()=>Y0,use:()=>Pt,util:()=>X0,vector:()=>wr,version:()=>WF,zrUtil:()=>ye,zrender:()=>$f});var Fv=function(r,t){return Fv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Fv(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fv(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var $f={};Sr($f,{dispose:()=>fN,disposeAll:()=>hN,getElementSSRData:()=>dN,getInstance:()=>pN,init:()=>jf,registerPainter:()=>Hm,registerSSRDataGetter:()=>Gm,version:()=>vN});var OL=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),IL=(function(){function r(){this.browser=new OL,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=typeof window<"u"}return r})(),Rn=new IL;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Rn.wxa=!0,Rn.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Rn.worker=!0:!Rn.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Rn.node=!0,Rn.svgSupported=!0):LL(navigator.userAgent,Rn);function LL(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var fe=Rn;var ye={};Sr(ye,{EPSILON:()=>KL,HashMap:()=>hb,RADIAN_TO_DEGREE:()=>Xv,assert:()=>ft,assignProps:()=>Gv,bind:()=>ee,clone:()=>ne,concatArray:()=>Zv,createCanvas:()=>GL,createHashMap:()=>Y,createObject:()=>tn,curry:()=>Ae,defaults:()=>he,disableUserSelect:()=>Kl,each:()=>w,eqNaN:()=>en,extend:()=>B,filter:()=>Be,find:()=>Yv,guid:()=>Wl,hasOwn:()=>We,indexOf:()=>ce,inherits:()=>Zl,isArray:()=>F,isArrayLike:()=>ct,isBuiltInObject:()=>zv,isDom:()=>ba,isFunction:()=>$,isGradientObject:()=>Qi,isImagePatternObject:()=>Wv,isNumber:()=>ge,isObject:()=>W,isPrimitive:()=>qo,isRegExp:()=>WL,isString:()=>H,isStringSafe:()=>$o,isTypedArray:()=>rt,keys:()=>De,logError:()=>Sa,map:()=>U,merge:()=>me,mergeAll:()=>Hv,mixin:()=>mt,noop:()=>Ze,normalizeCssArray:()=>wa,reduce:()=>zt,retrieve:()=>nr,retrieve2:()=>Z,retrieve3:()=>zr,setAsPrimitive:()=>Ta,slice:()=>Xl,trim:()=>Dt});var mf=12,PL="sans-serif",Br=mf+"px "+PL,NL=20,kL=100,RL="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function FL(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-NL)/kL;t[i]=n}return t}var BL=FL(RL),$e={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,i){if(!r){var n=$e.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Br),r.measureText(e);e=e||"",i=i||Br;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||mf,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=BL[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i},getTime:function(){return Date.now?Date.now():+new Date}};function gf(r){for(var t in $e)$e.hasOwnProperty(t)&&r[t]&&($e[t]=r[t])}var lb=zt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),ub=zt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),jo=Object.prototype.toString,_f=Array.prototype,zL=_f.forEach,VL=_f.filter,Vv=_f.slice,UL=_f.map,sb=function(){}.constructor,yf=sb?sb.prototype:null,Uv="__proto__",Bv=2311,HL=Math.pow(2,53)-1;function Wl(){return Bv>=HL&&(Bv=0),Bv++}function Sa(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function ne(r){if(r==null||typeof r!="object")return r;var t=r,e=jo.call(r);if(e==="[object Array]"){if(!qo(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=ne(r[i])}}else if(ub[e]){if(!qo(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!lb[e]&&!qo(r)&&!ba(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Uv&&(t[o]=ne(r[o]))}return t}function me(r,t,e){if(!W(t)||!W(r))return e?ne(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==Uv){var n=r[i],a=t[i];W(a)&&W(n)&&!F(a)&&!F(n)&&!ba(a)&&!ba(n)&&!zv(a)&&!zv(n)&&!qo(a)&&!qo(n)?me(n,a,e):(e||!(i in r))&&(r[i]=ne(t[i]))}return r}function Hv(r,t){for(var e=r[0],i=1,n=r.length;i<n;i++)e=me(e,r[i],t);return e}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Uv&&(r[e]=t[e]);return r}function Gv(r,t,e){r=r||{};for(var i=0;i<e.length;i++){var n=e[i];r[n]=t[n]}return r}function he(r,t,e){for(var i=De(t),n=0,a=i.length;n<a;n++){var o=i[n];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}var GL=$e.createCanvas;function ce(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function Zl(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function mt(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else he(r,t,e)}function ct(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function w(r,t,e){if(r&&t)if(r.forEach&&r.forEach===zL)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function U(r,t,e){if(!r)return[];if(!t)return Xl(r);if(r.map&&r.map===UL)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function zt(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function Be(r,t,e){if(!r)return[];if(!t)return Xl(r);if(r.filter&&r.filter===VL)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function Yv(r,t,e){if(r&&t){for(var i=0,n=r.length;i<n;i++)if(t.call(e,r[i],i,r))return r[i]}}function De(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function YL(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(Vv.call(arguments)))}}var ee=yf&&$(yf.bind)?yf.call.bind(yf.bind):YL;function Ae(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Vv.call(arguments)))}}function F(r){return Array.isArray?Array.isArray(r):jo.call(r)==="[object Array]"}function $(r){return typeof r=="function"}function H(r){return typeof r=="string"}function $o(r){return jo.call(r)==="[object String]"}function ge(r){return typeof r=="number"}function W(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function zv(r){return!!lb[jo.call(r)]}function rt(r){return!!ub[jo.call(r)]}function ba(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Qi(r){return r.colorStops!=null}function Wv(r){return r.image!=null}function WL(r){return jo.call(r)==="[object RegExp]"}function en(r){return r!==r}function nr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function Z(r,t){return r??t}function zr(r,t,e){return r??t??e}function Xl(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Vv.apply(r,t)}function wa(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function ft(r,t){if(!r)throw new Error(t)}function Dt(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var cb="__ec_primitive__";function Ta(r){r[cb]=!0}function qo(r){return r[cb]}var ZL=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return De(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r})(),fb=typeof Map=="function";function XL(){return fb?new Map:new ZL}var hb=(function(){function r(t){var e=F(t);this.data=XL();var i=this;t instanceof r?t.each(n):t&&w(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return fb?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function Y(r){return new hb(r)}function Zv(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function tn(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&B(e,t),e}function Kl(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function We(r,t){return r.hasOwnProperty(t)}function Ze(){}var Xv=180/Math.PI,KL=Number.EPSILON||Math.pow(2,-52);var wr={};Sr(wr,{add:()=>xf,applyTransform:()=>ht,clone:()=>Kv,copy:()=>qL,create:()=>rn,dist:()=>$v,distSquare:()=>Fn,distance:()=>Jl,distanceSquare:()=>pb,div:()=>eP,dot:()=>tP,len:()=>qv,lenSquare:()=>jv,length:()=>$L,lengthSquare:()=>JL,lerp:()=>iP,max:()=>Ur,min:()=>Vr,mul:()=>QL,negate:()=>rP,normalize:()=>Ca,scale:()=>$l,scaleAndAdd:()=>jL,set:()=>ql,sub:()=>jl});function rn(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function qL(r,t){return r[0]=t[0],r[1]=t[1],r}function Kv(r){return[r[0],r[1]]}function ql(r,t,e){return r[0]=t,r[1]=e,r}function xf(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function jL(r,t,e,i){return r[0]=t[0]+e[0]*i,r[1]=t[1]+e[1]*i,r}function jl(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function qv(r){return Math.sqrt(jv(r))}var $L=qv;function jv(r){return r[0]*r[0]+r[1]*r[1]}var JL=jv;function QL(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function eP(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function tP(r,t){return r[0]*t[0]+r[1]*t[1]}function $l(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Ca(r,t){var e=qv(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Jl(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var $v=Jl;function pb(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Fn=pb;function rP(r,t){return r[0]=-t[0],r[1]=-t[1],r}function iP(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function ht(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function Vr(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Ur(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Jo=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),nP=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Jo(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new Jo(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Jo(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Jo(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Jo(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Jo(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),db=nP;var aP=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,c=a[t][u];return c&&c.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var c=n[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,e[0]);break;case 2:c.h.call(s,e[0],e[1]);break;default:c.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),St=aP;var oP=Math.log(2);function Jv(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/oP);return r[e][l]}for(var u=i|1<<e,c=e+1;i&1<<c;)c++;for(var f=0,h=0,p=0;h<s;h++){var d=1<<h;d&n||(f+=(p%2?-1:1)*r[e][h]*Jv(r,t-1,c,u,n|d,a),p++)}return a[o]=f,f}function Qv(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=Jv(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Jv(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var bf="___zrEVENTSAVED",em=[];function vb(r,t,e,i,n){return Sf(em,t,i,n,!0)&&Sf(r,e,em[0],em[1])}function mb(r,t){r&&e(r),t&&e(t);function e(i){var n=i[bf];n&&(n.clearMarkers&&n.clearMarkers(),delete i[bf])}}function Sf(r,t,e,i,n){if(t.getBoundingClientRect&&fe.domSupported&&!tm(t)){var a=t[bf]||(t[bf]={}),o=sP(t,a),s=lP(o,a,n);if(s)return s(r,e,i),!0}return!1}function sP(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){w(e,function(c){c.parentNode&&c.parentNode.removeChild(c)})},e}function lP(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,p=c.top;o.push(h,p),l=l&&a&&h===a[f]&&p===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Qv(s,o):Qv(o,s))}function tm(r){return r.nodeName.toUpperCase()==="CANVAS"}var uP=/([&<>"'])/g,cP={"&":"&","<":"<",">":">",'"':""","'":"'"};function wt(r){return r==null?"":(r+"").replace(uP,function(t,e){return cP[e]})}var fP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rm=[],hP=fe.browser.firefox&&+fe.browser.version.split(".")[0]<39;function wf(r,t,e,i){return e=e||{},i?gb(r,t,e):hP&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):gb(r,t,e),e}function gb(r,t,e){if(fe.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(tm(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Sf(rm,r,i,n)){e.zrX=rm[0],e.zrY=rm[1];return}}e.zrX=e.zrY=0}function Tf(r){return r||window.event}function ar(r,t,e){if(t=Tf(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&wf(r,o,t,e)}else{wf(r,t,t,e);var a=pP(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&fP.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function pP(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function yb(r,t,e,i){r.addEventListener(t,e,i)}function _b(r,t,e,i){r.removeEventListener(t,e,i)}var Ei=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function im(r){return r.which===2||r.which===3}var bb=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=wf(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in nm)if(nm.hasOwnProperty(e)){var i=nm[e](this._track,t);if(i)return i}},r})();function xb(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function dP(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var nm={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=xb(i)/xb(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=dP(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};var nn={};Sr(nn,{clone:()=>vP,copy:()=>Aa,create:()=>kt,identity:()=>Hr,invert:()=>Tr,mul:()=>li,rotate:()=>Da,scale:()=>am,translate:()=>Qo});function kt(){return[1,0,0,1,0,0]}function Hr(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Aa(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function li(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Qo(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Da(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),f=Math.cos(e);return r[0]=n*f+s*c,r[1]=-n*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-i[0])+c*(u-i[1])+i[0],r[5]=f*(u-i[1])-c*(o-i[0])+i[1],r}function am(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Tr(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}function vP(r){var t=kt();return Aa(t,r),t}var mP=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r})(),ke=mP;var La=Math.min,es=Math.max,lm=Math.abs,Sb=["x","y"],gP=["width","height"],Ea=new ke,Ma=new ke,Oa=new ke,Ia=new ke,Cr=cm(),eu=Cr.minTv,um=Cr.maxTv,tu=[0,0],an=(function(){function r(t,e,i,n){om(this,t,e,i,n)}return r.set=function(t,e,i,n,a){return n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),t.x=e,t.y=i,t.width=n,t.height=a,t},r.prototype.union=function(t){var e=La(t.x,this.x),i=La(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=es(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=es(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){return yP(kt(),this,t)},r.prototype.intersect=function(t,e,i){return r.intersect(this,t,e,i)},r.intersect=function(t,e,i,n){i&&ke.set(i,0,0);var a=n&&n.outIntersectRect||null,o=n&&n.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!e)return!1;t instanceof r||(t=om(_P,t.x,t.y,t.width,t.height)),e instanceof r||(e=om(xP,e.x,e.y,e.width,e.height));var s=!!i;Cr.reset(n,s);var l=Cr.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,p=e.x+l,d=e.x+e.width-l,v=e.y+l,m=e.y+e.height-l;if(u>c||f>h||p>d||v>m)return!1;var g=!(c<p||d<u||h<v||m<f);return(s||a)&&(tu[0]=1/0,tu[1]=0,Tb(u,c,p,d,0,s,a,o),Tb(f,h,v,m,1,s,a,o),s&&ke.copy(i,g?Cr.useDir?Cr.dirMinTv:eu:um)),g},r.contain=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){wb(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,i){if(!i){t!==e&&wb(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ea.x=Oa.x=e.x,Ea.y=Ia.y=e.y,Ma.x=Ia.x=e.x+e.width,Ma.y=Oa.y=e.y+e.height,Ea.transform(i),Ia.transform(i),Ma.transform(i),Oa.transform(i),t.x=La(Ea.x,Ma.x,Oa.x,Ia.x),t.y=La(Ea.y,Ma.y,Oa.y,Ia.y);var l=es(Ea.x,Ma.x,Oa.x,Ia.x),u=es(Ea.y,Ma.y,Oa.y,Ia.y);t.width=l-t.x,t.height=u-t.y},r.calculateTransform=function(t,e,i){var n=i.width/e.width,a=i.height/e.height;return t=Hr(t||[]),Qo(t,t,ql(sm,-e.x,-e.y)),am(t,t,ql(sm,n,a)),Qo(t,t,ql(sm,i.x,i.y)),t},r})(),eY=an.create,om=an.set,wb=an.copy,yP=an.calculateTransform,tY=an.applyTransform,rY=an.contain,_P=new an(0,0,0,0),xP=new an(0,0,0,0),sm=[];function Tb(r,t,e,i,n,a,o,s){var l=lm(t-e),u=lm(i-r),c=La(l,u),f=Sb[n],h=Sb[1-n],p=gP[n];t<e||i<r?l<u?(a&&(um[f]=-l),s&&(o[f]=t,o[p]=0)):(a&&(um[f]=u),s&&(o[f]=r,o[p]=0)):(o&&(o[f]=es(r,e),o[p]=La(t,i)-o[f]),a&&(c<tu[0]||Cr.useDir)&&(tu[0]=La(c,tu[0]),(l<u||!Cr.bidirectional)&&(eu[f]=l,eu[h]=0,Cr.useDir&&Cr.calcDirMTV()),(l>=u||!Cr.bidirectional)&&(eu[f]=-u,eu[h]=0,Cr.useDir&&Cr.calcDirMTV())))}function cm(){var r=0,t=new ke,e=new ke,i={minTv:new ke,maxTv:new ke,useDir:!1,dirMinTv:new ke,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){i.touchThreshold=0,a&&a.touchThreshold!=null&&(i.touchThreshold=es(0,a.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,a&&a.direction!=null&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),e.copy(i.minTv),r=a.direction,i.bidirectional=a.bidirectional==null||!!a.bidirectional,i.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=i.minTv,o=i.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),c=l*a.y+u*a.x;if(n(c)){n(a.x)&&n(a.y)&&o.set(0,0);return}if(e.x=s*u/c,e.y=s*l/c,n(e.x)&&n(e.y)){o.set(0,0);return}(i.bidirectional||t.dot(e)>0)&&e.len()<o.len()&&o.copy(e)}};function n(a){return lm(a)<1e-10}return i}var ue=an;var Ab="silent";function bP(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:SP}}function SP(){Ei(this.event)}var wP=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(St),ru=(function(){function r(t,e){this.x=t,this.y=e}return r})(),TP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],fm=new ue(0,0,0,0),Db=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new ru(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new wP,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new db(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(w(TP,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=Eb(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new ru(i,n):this.findHover(i,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new ru(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=bP(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new ru(e,i);if(Cb(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ue(e-u,i-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(fm.copy(h.getBoundingRect()),h.transform&&fm.applyTransform(h.transform),fm.intersect(c)&&s.push(h))}if(s.length)for(var p=4,d=Math.PI/12,v=Math.PI*2,m=0;m<u;m+=p)for(var g=0;g<v;g+=d){var y=e+m*Math.cos(g),_=i+m*Math.sin(g);if(Cb(s,o,y,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new bb);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new ru;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(St);w(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){Db.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=Eb(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||$v(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function CP(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return n?Ab:!0}return!1}function Cb(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=CP(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==Ab)){t.target=o;break}}}function Eb(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var Mb=Db;var Lb=32,iu=7;function AP(r){for(var t=0;r>=Lb;)t|=r&1,r>>=1;return r+t}function Ob(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;DP(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function DP(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function Ib(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function hm(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var c=o+(l-o>>>1);a(r,t[e+c])>0?o=c+1:l=c}return l}function pm(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var c=o+(l-o>>>1);a(r,t[e+c])<0?l=c:o=c+1}return l}function EP(r,t){var e=iu,i,n,a=0,o=[];i=[],n=[];function s(p,d){i[a]=p,n[a]=d,a+=1}function l(){for(;a>1;){var p=a-2;if(p>=1&&n[p-1]<=n[p]+n[p+1]||p>=2&&n[p-2]<=n[p]+n[p-1])n[p-1]<n[p+1]&&p--;else if(n[p]>n[p+1])break;c(p)}}function u(){for(;a>1;){var p=a-2;p>0&&n[p-1]<n[p+1]&&p--,c(p)}}function c(p){var d=i[p],v=n[p],m=i[p+1],g=n[p+1];n[p]=v+g,p===a-3&&(i[p+1]=i[p+2],n[p+1]=n[p+2]),a--;var y=pm(r[m],r,d,v,0,t);d+=y,v-=y,v!==0&&(g=hm(r[d+v-1],r,m,g,g-1,t),g!==0&&(v<=g?f(d,v,m,g):h(d,v,m,g)))}function f(p,d,v,m){var g=0;for(g=0;g<d;g++)o[g]=r[p+g];var y=0,_=v,x=p;if(r[x++]=r[_++],--m===0){for(g=0;g<d;g++)r[x+g]=o[y+g];return}if(d===1){for(g=0;g<m;g++)r[x+g]=r[_+g];r[x+m]=o[y];return}for(var b=e,S,T,A;;){S=0,T=0,A=!1;do if(t(r[_],o[y])<0){if(r[x++]=r[_++],T++,S=0,--m===0){A=!0;break}}else if(r[x++]=o[y++],S++,T=0,--d===1){A=!0;break}while((S|T)<b);if(A)break;do{if(S=pm(r[_],o,y,d,0,t),S!==0){for(g=0;g<S;g++)r[x+g]=o[y+g];if(x+=S,y+=S,d-=S,d<=1){A=!0;break}}if(r[x++]=r[_++],--m===0){A=!0;break}if(T=hm(o[y],r,_,m,0,t),T!==0){for(g=0;g<T;g++)r[x+g]=r[_+g];if(x+=T,_+=T,m-=T,m===0){A=!0;break}}if(r[x++]=o[y++],--d===1){A=!0;break}b--}while(S>=iu||T>=iu);if(A)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(g=0;g<m;g++)r[x+g]=r[_+g];r[x+m]=o[y]}else{if(d===0)throw new Error;for(g=0;g<d;g++)r[x+g]=o[y+g]}}function h(p,d,v,m){var g=0;for(g=0;g<m;g++)o[g]=r[v+g];var y=p+d-1,_=m-1,x=v+m-1,b=0,S=0;if(r[x--]=r[y--],--d===0){for(b=x-(m-1),g=0;g<m;g++)r[b+g]=o[g];return}if(m===1){for(x-=d,y-=d,S=x+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[x]=o[_];return}for(var T=e;;){var A=0,E=0,M=!1;do if(t(o[_],r[y])<0){if(r[x--]=r[y--],A++,E=0,--d===0){M=!0;break}}else if(r[x--]=o[_--],E++,A=0,--m===1){M=!0;break}while((A|E)<T);if(M)break;do{if(A=d-pm(o[_],r,p,d,d-1,t),A!==0){for(x-=A,y-=A,d-=A,S=x+1,b=y+1,g=A-1;g>=0;g--)r[S+g]=r[b+g];if(d===0){M=!0;break}}if(r[x--]=o[_--],--m===1){M=!0;break}if(E=m-hm(r[y],o,0,m,m-1,t),E!==0){for(x-=E,_-=E,m-=E,S=x+1,b=_+1,g=0;g<E;g++)r[S+g]=o[b+g];if(m<=1){M=!0;break}}if(r[x--]=r[y--],--d===0){M=!0;break}T--}while(A>=iu||E>=iu);if(M)break;T<0&&(T=0),T+=2}if(e=T,e<1&&(e=1),m===1){for(x-=d,y-=d,S=x+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[x]=o[_]}else{if(m===0)throw new Error;for(b=x-(m-1),g=0;g<m;g++)r[b+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Pa(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<Lb){a=Ob(r,e,i,t),Ib(r,e,i,e+a,t);return}var o=EP(r,t),s=AP(n);do{if(a=Ob(r,e,i,t),a<s){var l=n;l>s&&(l=s),Ib(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var pt=1,Na=2,Bn=4;var Pb=!1;function dm(){Pb||(Pb=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Nb(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var MP=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Nb}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Pa(i,Nb)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath(),a=e&&e.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||n)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<e.length;l++)s[o++]=e[l];for(var u=n,c=t;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var f=t.childrenRef(),h=0;h<f.length;h++){var p=f[h];t.__dirty&&(p.__dirty|=pt),this._updateAndAddDisplayable(p,s,i)}t.__dirty=0}else{var d=t;isNaN(d.z)&&(dm(),d.z=0),isNaN(d.z2)&&(dm(),d.z2=0),isNaN(d.zlevel)&&(dm(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var v=t.getDecalElement&&t.getDecalElement();v&&this._updateAndAddDisplayable(v,s,i);var m=t.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,i);var g=t.getTextContent();g&&this._updateAndAddDisplayable(g,s,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=ce(this._roots,t);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),kb=MP;var Rb;Rb=fe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var nu=Rb;var Cf={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Cf.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?Cf.bounceIn(r*2)*.5:Cf.bounceOut(r*2-1)*.5+.5}},Af=Cf;var Df=Math.pow,Vn=Math.sqrt,Mf=1e-8,Bb=1e-4,Fb=Vn(3),Ef=1/3,Mi=rn(),Gr=rn(),ts=rn();function zn(r){return r>-Mf&&r<Mf}function zb(r){return r>Mf||r<-Mf}function Je(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function vm(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function ka(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,p=0;if(zn(c)&&zn(f))if(zn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[p++]=d)}else{var v=f*f-4*c*h;if(zn(v)){var m=f/c,d=-s/o+m,g=-m/2;d>=0&&d<=1&&(a[p++]=d),g>=0&&g<=1&&(a[p++]=g)}else if(v>0){var y=Vn(v),_=c*s+1.5*o*(-f+y),x=c*s+1.5*o*(-f-y);_<0?_=-Df(-_,Ef):_=Df(_,Ef),x<0?x=-Df(-x,Ef):x=Df(x,Ef);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[p++]=d)}else{var b=(2*c*s-3*o*f)/(2*Vn(c*c*c)),S=Math.acos(b)/3,T=Vn(c),A=Math.cos(S),d=(-s-2*T*A)/(3*o),g=(-s+T*(A+Fb*Math.sin(S)))/(3*o),E=(-s+T*(A-Fb*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[p++]=d),g>=0&&g<=1&&(a[p++]=g),E>=0&&E<=1&&(a[p++]=E)}}return p}function Of(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(zn(o)){if(zb(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var c=a*a-4*o*s;if(zn(c))n[0]=-a/(2*o);else if(c>0){var f=Vn(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function rs(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,c=(l-s)*n+s,f=(c-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=i}function Vb(r,t,e,i,n,a,o,s,l,u,c){var f,h=.005,p=1/0,d,v,m,g;Mi[0]=l,Mi[1]=u;for(var y=0;y<1;y+=.05)Gr[0]=Je(r,e,n,o,y),Gr[1]=Je(t,i,a,s,y),m=Fn(Mi,Gr),m<p&&(f=y,p=m);p=1/0;for(var _=0;_<32&&!(h<Bb);_++)d=f-h,v=f+h,Gr[0]=Je(r,e,n,o,d),Gr[1]=Je(t,i,a,s,d),m=Fn(Gr,Mi),d>=0&&m<p?(f=d,p=m):(ts[0]=Je(r,e,n,o,v),ts[1]=Je(t,i,a,s,v),g=Fn(ts,Mi),v<=1&&g<p?(f=v,p=g):h*=.5);return c&&(c[0]=Je(r,e,n,o,f),c[1]=Je(t,i,a,s,f)),Vn(p)}function Ub(r,t,e,i,n,a,o,s,l){for(var u=r,c=t,f=0,h=1/l,p=1;p<=l;p++){var d=p*h,v=Je(r,e,n,o,d),m=Je(t,i,a,s,d),g=v-u,y=m-c;f+=Math.sqrt(g*g+y*y),u=v,c=m}return f}function Tt(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function mm(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function Hb(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(zn(a)){if(zb(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var c=o*o-4*a*s;if(zn(c)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var f=Vn(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function If(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function is(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function Gb(r,t,e,i,n,a,o,s,l){var u,c=.005,f=1/0;Mi[0]=o,Mi[1]=s;for(var h=0;h<1;h+=.05){Gr[0]=Tt(r,e,n,h),Gr[1]=Tt(t,i,a,h);var p=Fn(Mi,Gr);p<f&&(u=h,f=p)}f=1/0;for(var d=0;d<32&&!(c<Bb);d++){var v=u-c,m=u+c;Gr[0]=Tt(r,e,n,v),Gr[1]=Tt(t,i,a,v);var p=Fn(Gr,Mi);if(v>=0&&p<f)u=v,f=p;else{ts[0]=Tt(r,e,n,m),ts[1]=Tt(t,i,a,m);var g=Fn(ts,Mi);m<=1&&g<f?(u=m,f=g):c*=.5}}return l&&(l[0]=Tt(r,e,n,u),l[1]=Tt(t,i,a,u)),Vn(f)}function Yb(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,p=Tt(r,e,n,h),d=Tt(t,i,a,h),v=p-s,m=d-l;u+=Math.sqrt(v*v+m*m),s=p,l=d}return u}var OP=/cubic-bezier\(([0-9,\.e ]+)\)/;function Lf(r){var t=r&&OP.exec(r);if(t){var e=t[1].split(","),i=+Dt(e[0]),n=+Dt(e[1]),a=+Dt(e[2]),o=+Dt(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:ka(0,i,a,1,l,s)&&Je(0,n,o,1,s[0])}}}var IP=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Ze,this.ondestroy=t.ondestroy||Ze,this.onrestart=t.onrestart||Ze,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=$(t)?t:Af[t]||Lf(t)},r})(),Wb=IP;var ou={};Sr(ou,{fastLerp:()=>jb,fastMapToColor:()=>FP,lerp:()=>kf,lift:()=>bm,liftColor:()=>Ff,lum:()=>Ra,mapToColor:()=>BP,modifyAlpha:()=>Rf,modifyHSL:()=>as,parse:()=>Vt,parseCssFloat:()=>Hn,parseCssInt:()=>Nf,random:()=>zP,stringify:()=>Ii,toHex:()=>RP});var Zb=(function(){function r(t){this.value=t}return r})();var LP=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Zb(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})();var PP=(function(){function r(t){this._list=new LP,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new Zb(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Oi=PP;var Xb={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 ui(r){return r=Math.round(r),r<0?0:r>255?255:r}function NP(r){return r=Math.round(r),r<0?0:r>360?360:r}function au(r){return r<0?0:r>1?1:r}function Nf(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ui(parseFloat(t)/100*255):ui(parseInt(t,10))}function Hn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?au(parseFloat(t)/100):au(parseFloat(t))}function ym(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Un(r,t,e){return r+(t-r)*e}function Yr(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function _m(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var qb=new Oi(20),Pf=null;function ns(r,t){Pf&&_m(Pf,t),Pf=qb.put(r,Pf||t.slice())}function Vt(r,t){if(r){t=t||[];var e=qb.get(r);if(e)return _m(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Xb)return _m(t,Xb[i]),ns(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){Yr(t,0,0,0,1);return}return Yr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),ns(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){Yr(t,0,0,0,1);return}return Yr(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),ns(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Yr(t,+u[0],+u[1],+u[2],1):Yr(t,0,0,0,1);c=Hn(u.pop());case"rgb":if(u.length>=3)return Yr(t,Nf(u[0]),Nf(u[1]),Nf(u[2]),u.length===3?c:Hn(u[3])),ns(r,t),t;Yr(t,0,0,0,1);return;case"hsla":if(u.length!==4){Yr(t,0,0,0,1);return}return u[3]=Hn(u[3]),xm(u,t),ns(r,t),t;case"hsl":if(u.length!==3){Yr(t,0,0,0,1);return}return xm(u,t),ns(r,t),t;default:return}}Yr(t,0,0,0,1)}}function xm(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=Hn(r[1]),n=Hn(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],Yr(t,ui(ym(o,a,e+1/3)*255),ui(ym(o,a,e)*255),ui(ym(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function kP(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var c=((a-t)/6+o/2)/o,f=((a-e)/6+o/2)/o,h=((a-i)/6+o/2)/o;t===a?l=h-f:e===a?l=1/3+c-h:i===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var p=[l*360,u,s];return r[3]!=null&&p.push(r[3]),p}}function bm(r,t){var e=Vt(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return Ii(e,e.length===4?"rgba":"rgb")}}function RP(r){var t=Vt(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function jb(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=ui(Un(o[0],s[0],l)),e[1]=ui(Un(o[1],s[1],l)),e[2]=ui(Un(o[2],s[2],l)),e[3]=au(Un(o[3],s[3],l)),e}}var FP=jb;function kf(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Vt(t[n]),s=Vt(t[a]),l=i-n,u=Ii([ui(Un(o[0],s[0],l)),ui(Un(o[1],s[1],l)),ui(Un(o[2],s[2],l)),au(Un(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var BP=kf;function as(r,t,e,i){var n=Vt(r);if(r)return n=kP(n),t!=null&&(n[0]=NP($(t)?t(n[0]):t)),e!=null&&(n[1]=Hn($(e)?e(n[1]):e)),i!=null&&(n[2]=Hn($(i)?i(n[2]):i)),Ii(xm(n),"rgba")}function Rf(r,t){var e=Vt(r);if(e&&t!=null)return e[3]=au(t),Ii(e,"rgba")}function Ii(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Ra(r,t){var e=Vt(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function zP(){return Ii([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var Kb=new Oi(100);function Ff(r){if(H(r)){var t=Kb.get(r);return t||(t=bm(r,-.1),Kb.put(r,t)),t}else if(Qi(r)){var e=B({},r);return e.colorStops=U(r.colorStops,function(i){return{offset:i.offset,color:bm(i.color,-.1)}}),e}return r}function $b(r){return r.type==="linear"}function Jb(r){return r.type==="radial"}var MY=(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(r){return Buffer.from(r).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(r){return btoa(unescape(encodeURIComponent(r)))}:function(r){return null}})();var wm=Array.prototype.slice;function on(r,t,e){return(t-r)*e+r}function Sm(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=on(t[a],e[a],i);return r}function VP(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=on(t[o][s],e[o][s],i)}return r}function Bf(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function Qb(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*i}return r}function UP(r,t){for(var e=r.length,i=t.length,n=e>i?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function HP(r,t,e){var i=r,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(e===1?n[l]:wm.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(e===1)isNaN(i[l])&&(i[l]=n[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=n[l][c])}}function uu(r){if(ct(r)){var t=r.length;if(ct(r[0])){for(var e=[],i=0;i<t;i++)e.push(wm.call(r[i]));return e}return wm.call(r)}return r}function Uf(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function GP(r){return ct(r&&r[0])?2:1}var zf=0,Hf=1,rS=2,lu=3,Tm=4,Cm=5,eS=6;function tS(r){return r===Tm||r===Cm}function Vf(r){return r===Hf||r===rS}var su=[0,0,0,0],YP=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=eS,l=e;if(ct(e)){var u=GP(e);s=u,(u===1&&!ge(e[0])||u===2&&!ge(e[0][0]))&&(o=!0)}else if(ge(e)&&!en(e))s=zf;else if(H(e))if(!isNaN(+e))s=zf;else{var c=Vt(e);c&&(l=c,s=lu)}else if(Qi(e)){var f=B({},l);f.colorStops=U(e.colorStops,function(p){return{offset:p.offset,color:Vt(p.color)}}),$b(e)?s=Tm:Jb(e)&&(s=Cm),l=f}a===0?this.valType=s:(s!==this.valType||s===eS)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return i&&(h.easing=i,h.easingFunc=$(i)?i:Af[i]||Lf(i)),n.push(h),h},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(v,m){return v.time-m.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Vf(n),u=tS(n),c=0;c<a;c++){var f=i[c],h=f.value,p=o.value;f.percent=f.time/t,s||(l&&c!==a-1?HP(h,p,n):u&&UP(h.colorStops,p.colorStops))}if(!s&&n!==Cm&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var d=i[0].value,c=0;c<a;c++)n===zf?i[c].additiveValue=i[c].value-d:n===lu?i[c].additiveValue=Bf([],i[c].value,d,-1):Vf(n)&&(i[c].additiveValue=n===Hf?Bf([],i[c].value,d,-1):Qb([],i[c].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===lu,c,f=this._lastFr,h=Math.min,p,d;if(s===1)p=d=o[0];else{if(e<0)c=0;else if(e<this._lastFrP){var v=h(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=e);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>e);c++);c=h(c-1,s-2)}d=o[c+1],p=o[c]}if(p&&d){this._lastFr=c,this._lastFrP=e;var m=d.percent-p.percent,g=m===0?1:h((e-p.percent)/m,1);d.easingFunc&&(g=d.easingFunc(g));var y=i?this._additiveValue:u?su:t[l];if((Vf(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=g<1?p.rawValue:d.rawValue;else if(Vf(a))a===Hf?Sm(y,p[n],d[n],g):VP(y,p[n],d[n],g);else if(tS(a)){var _=p[n],x=d[n],b=a===Tm;t[l]={type:b?"linear":"radial",x:on(_.x,x.x,g),y:on(_.y,x.y,g),colorStops:U(_.colorStops,function(T,A){var E=x.colorStops[A];return{offset:on(T.offset,E.offset,g),color:Uf(Sm([],T.color,E.color,g))}}),global:x.global},b?(t[l].x2=on(_.x2,x.x2,g),t[l].y2=on(_.y2,x.y2,g)):t[l].r=on(_.r,x.r,g)}else if(u)Sm(y,p[n],d[n],g),i||(t[l]=Uf(y));else{var S=on(p[n],d[n],g);i?this._additiveValue=S:t[l]=S}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===zf?t[i]=t[i]+n:e===lu?(Vt(t[i],su),Bf(su,su,n,1),t[i]=Uf(su)):e===Hf?Bf(t[i],t[i],n,1):e===rS&&Qb(t[i],t[i],n,1)},r})(),WP=(function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Sa("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,De(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new YP(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===lu&&u&&(u=Uf(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,uu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,uu(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(e._target[s.propName]=f.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var h=new Wb({life:n,loop:this._loop,delay:this._delay||0,onframe:function(p){e._started=2;var d=e._additiveAnimators;if(d){for(var v=!1,m=0;m<d.length;m++)if(d[m]._clip){v=!0;break}v||(e._additiveAnimators=null)}for(var m=0;m<i.length;m++)i[m].step(e._target,p);var g=e._onframeCbs;if(g)for(var m=0;m<g.length;m++)g[m](e._target,p)},ondestroy:function(){e._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&h.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return U(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var a=e[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(t[a]=uu(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||De(t);for(var i=0;i<e.length;i++){var n=e[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})(),cu=WP;function Fa(){return new Date().getTime()}var ZP=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return 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 i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=Fa()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(nu(i),!e._paused&&e.update())}nu(i)},t.prototype.start=function(){this._running||(this._time=Fa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Fa(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Fa()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new cu(e,i.loop);return this.addAnimator(n),n},t})(St),iS=ZP;var XP=300,Am=fe.domSupported,Dm=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=U(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}})(),nS={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},aS=!1;function Om(r){var t=r.pointerType;return t==="pen"||t==="touch"}function KP(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Em(r){r&&(r.zrByTouch=!0)}function qP(r,t){return ar(r.dom,new jP(r,t),!0)}function sS(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var jP=(function(){function r(t,e){this.stopPropagation=Ze,this.stopImmediatePropagation=Ze,this.preventDefault=Ze,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),ci={mousedown:function(r){r=ar(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ar(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ar(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ar(this.dom,r);var t=r.toElement||r.relatedTarget;sS(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){aS=!0,r=ar(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){aS||(r=ar(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ar(this.dom,r),Em(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),ci.mousemove.call(this,r),ci.mousedown.call(this,r)},touchmove:function(r){r=ar(this.dom,r),Em(r),this.handler.processGesture(r,"change"),ci.mousemove.call(this,r)},touchend:function(r){r=ar(this.dom,r),Em(r),this.handler.processGesture(r,"end"),ci.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<XP&&ci.click.call(this,r)},pointerdown:function(r){ci.mousedown.call(this,r)},pointermove:function(r){Om(r)||ci.mousemove.call(this,r)},pointerup:function(r){ci.mouseup.call(this,r)},pointerout:function(r){Om(r)||ci.mouseout.call(this,r)}};w(["click","dblclick","contextmenu"],function(r){ci[r]=function(t){t=ar(this.dom,t),this.trigger(r,t)}});var Im={pointermove:function(r){Om(r)||Im.mousemove.call(this,r)},pointerup:function(r){Im.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function $P(r,t){var e=t.domHandlers;fe.pointerEventsSupported?w(Dm.pointer,function(i){Gf(t,i,function(n){e[i].call(r,n)})}):(fe.touchEventsSupported&&w(Dm.touch,function(i){Gf(t,i,function(n){e[i].call(r,n),KP(t)})}),w(Dm.mouse,function(i){Gf(t,i,function(n){n=Tf(n),t.touching||e[i].call(r,n)})}))}function JP(r,t){fe.pointerEventsSupported?w(nS.pointer,e):fe.touchEventsSupported||w(nS.mouse,e);function e(i){function n(a){a=Tf(a),sS(r,a.target)||(a=qP(r,a),t.domHandlers[i].call(r,a))}Gf(t,i,n,{capture:!0})}}function Gf(r,t,e,i){r.mounted[t]=e,r.listenerOpts[t]=i,yb(r.domTarget,t,e,i)}function Mm(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&_b(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var oS=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),QP=(function(r){N(t,r);function t(e,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new oS(e,ci),Am&&(n._globalHandlerScope=new oS(document,Im)),$P(n,n._localHandlerScope),n}return t.prototype.dispose=function(){Mm(this._localHandlerScope),Am&&Mm(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,Am&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?JP(this,i):Mm(i)}},t})(St),lS=QP;var uS=1;fe.hasGlobalWindow&&(uS=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ba=uS,fu=.4,hu="#333",pu="#ccc",cS="#eee";var fS=Hr,hS=5e-5;function za(r){return r>hS||r<-hS}var Va=[],os=[],Lm=kt(),Pm=Math.abs,pS=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return eN(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return za(this.rotation)||za(this.x)||za(this.y)||za(this.scaleX-1)||za(this.scaleY-1)||za(this.skewX)||za(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(fS(i),this.invTransform=null);return}i=i||kt(),e?this.getLocalTransform(i):fS(i),t&&(e?li(i,t,i):Aa(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i),this.invTransform=this.invTransform||kt(),Tr(this.invTransform,i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Va);var i=Va[0]<0?-1:1,n=Va[1]<0?-1:1,a=((Va[0]-i)*e+i)/Va[0]||0,o=((Va[1]-n)*e+n)/Va[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||kt(),li(os,t.invTransform,e),e=os);var i=this.originX,n=this.originY;(i||n)&&(Lm[4]=i,Lm[5]=n,li(os,e,Lm),os[4]-=i,os[5]-=n,e=os),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ht(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ht(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&Pm(t[0]-1)>1e-10&&Pm(t[3]-1)>1e-10?Math.sqrt(Pm(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){ls(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,h=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,v=n+l;e[4]=-d*a-h*v*o,e[5]=-v*o-p*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=p*a,e[2]=h*o,u&&Da(e,e,u),e[4]+=i+c,e[5]+=n+f,e},r.initDefaultProps=(function(){var t=r.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})(),r})(),eN=pS.getLocalTransform;var ss=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ls(r,t){return Gv(r,t,ss)}var us=pS;function hi(r){Yf||(Yf=new Oi(100)),r=r||Br;var t=Yf.get(r);return t||(t={font:r,strWidthCache:new Oi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:$e.measureText("\u56FD",r).width,asciiCharWidth:$e.measureText("a",r).width},Yf.put(r,t)),t}var Yf;function tN(r){if(!(Nm>=dS)){r=r||Br;for(var t=[],e=+new Date,i=0;i<=127;i++)t[i]=$e.measureText(String.fromCharCode(i),r).width;var n=+new Date-e;return n>16?Nm=dS:n>2&&Nm++,t}}var Nm=0,dS=5;function km(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=tN(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function pi(r,t){var e=r.strWidthCache,i=e.get(t);return i==null&&(i=$e.measureText(t,r.font).width,e.put(t,i)),i}function vS(r,t,e,i){var n=pi(hi(t),r),a=du(t),o=Gn(0,n,e),s=sn(0,a,i),l=new ue(o,s,n,a);return l}function Wf(r,t,e,i){var n=((r||"")+"").split(`
|
|
3
|
+
`),a=n.length;if(a===1)return vS(n[0],t,e,i);for(var o=new ue(0,0,0,0),s=0;s<n.length;s++){var l=vS(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function Gn(r,t,e,i){return e==="right"?i?r+=t:r-=t:e==="center"&&(i?r+=t/2:r-=t/2),r}function sn(r,t,e,i){return e==="middle"?i?r+=t/2:r-=t/2:e==="bottom"&&(i?r+=t:r-=t),r}function du(r){return hi(r).stWideCharWidth}function fi(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Ua(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,c="left",f="top";if(i instanceof Array)l+=fi(i[0],e.width),u+=fi(i[1],e.height),c=null,f=null;else switch(i){case"left":l-=n,u+=s,c="right",f="middle";break;case"right":l+=n+o,u+=s,f="middle";break;case"top":l+=o/2,u-=n,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+n,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=n,u+=s,f="middle";break;case"insideRight":l+=o-n,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=n,c="center";break;case"insideBottom":l+=o/2,u+=a-n,c="center",f="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=a-n,f="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var Rm="__zr_normal__",Fm=ss.concat(["ignore"]),rN=zt(ss,function(r,t){return r[t]=!0,r},{ignore:!1}),cs={},iN=new ue(0,0,0,0),Zf=[],Xf=0,fs=1,Vm=(function(){function r(t){this.id=Wl(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;a.copyTransform(e);var c=i.position!=null,f=i.autoOverflowArea,h=void 0;if((f||c)&&(h=iN,i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(cs,i,h):Ua(cs,i,h),a.x=cs.x,a.y=cs.y,o=cs.align,s=cs.verticalAlign;var p=i.origin;if(p&&i.rotation!=null){var d=void 0,v=void 0;p==="center"?(d=h.width*.5,v=h.height*.5):(d=fi(p[0],h.width),v=fi(p[1],h.height)),u=!0,a.originX=-a.x+d+(n?0:h.x),a.originY=-a.y+v+(n?0:h.y)}}i.rotation!=null&&(a.rotation=i.rotation);var m=i.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=g.overflowRect=g.overflowRect||new ue(0,0,0,0);a.getLocalTransform(Zf),Tr(Zf,Zf),ue.copy(y,h),y.applyTransform(Zf)}else g.overflowRect=null;var _=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,x=void 0,b=void 0,S=void 0;_&&this.canBeInsideText()?(x=i.insideFill,b=i.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(x),S=!0)):(x=i.outsideFill,b=i.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(x),S=!0)),x=x||"#000",(x!==g.fill||b!==g.stroke||S!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=x,g.stroke=b,g.autoStroke=S,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=pt,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?pu:hu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Vt(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Ii(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(W(t))for(var i=t,n=De(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==Rm)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Fm)},r.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Rm,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===Rm,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ce(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Sa("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=this._textContent,f=gS(this,c,u,n);f&&!this.__inHover&&(this.__inHover=f),this._applyStateObj(t,u,this._normalState,e,_S(this,i,l),l);var h=this._textGuide;return c&&c.useState(t,e,i,!!f),h&&h.useState(t,e,i,!!f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=Xf,this.__dirty&=~pt),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&n.push(c)}var f=n[o-1],h=this._textContent,p=gS(this,h,f,i);p&&!this.__inHover&&(this.__inHover=p);var d=this._mergeStates(n),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,_S(this,e,v),v);var m=this._textGuide;h&&h.useStates(t,e,!!p),m&&m.useStates(t,e,!!p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this.__inHover=Xf,this.__dirty&=~pt)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=ce(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=ce(n,t),o=ce(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n<t.length;n++){var a=t[n];B(e,a),a.textConfig&&(i=i||{},B(i,a.textConfig))}return i&&(e.textConfig=i),e},r.prototype._applyStateObj=function(t,e,i,n,a,o){if(this.__inHover!==fs){var s=!(e&&n);e&&e.textConfig?(this.textConfig=B({},n?this.textConfig:i.textConfig),B(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<Fm.length;c++){var f=Fm[c],h=a&&rN[f];e&&e[f]!=null?h?(u=!0,l[f]=e[f]):this[f]=e[f]:s&&i[f]!=null&&(h?(u=!0,l[f]=i[f]):this[f]=i[f])}if(!a)for(var c=0;c<this.animators.length;c++){var p=this.animators[c],d=p.targetName;p.getLoop()||p.__changeFinalValue(d?(e||i)[d]:e||i)}u&&this._transitionState(t,l,o)}},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new us,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),B(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=pt;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,i){var n=t?this[t]:this,a=new cu(n,e,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var a=n.animators,o=ce(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,i){Bm(this,t,e,i)},r.prototype.animateFrom=function(t,e,i){Bm(this,t,e,i,!0)},r.prototype._transitionState=function(t,e,i,n){for(var a=Bm(this,e,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=Xf,t.__dirty=pt;var e={};function i(a,o,s){e[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),e[a+o+s]=!0)}function n(a,o,s,l){Object.defineProperty(t,a,{get:function(){if(!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(h){c[s]=h}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(h){c[l]=h}})}}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))})(),r})();mt(Vm,St);mt(Vm,us);function Bm(r,t,e,i,n){e=e||{};var a=[];xS(r,"",r,t,e,i,a,n);var o=a.length,s=!1,l=e.done,u=e.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,v){e.during(v)});for(var h=0;h<a.length;h++){var p=a[h];c&&p.done(c),f&&p.aborted(f),e.force&&p.duration(e.duration),p.start(e.easing)}return a}function zm(r,t,e){for(var i=0;i<e;i++)r[i]=t[i]}function nN(r){return ct(r[0])}function aN(r,t,e){if(ct(t[e]))if(ct(r[e])||(r[e]=[]),rt(t[e])){var i=t[e].length;r[e].length!==i&&(r[e]=new t[e].constructor(i),zm(r[e],t[e],i))}else{var n=t[e],a=r[e],o=n.length;if(nN(n))for(var s=n[0].length,l=0;l<o;l++)a[l]?zm(a[l],n[l],s):a[l]=Array.prototype.slice.call(n[l]);else zm(a,n,o);a.length=n.length}else r[e]=t[e]}function oN(r,t){return r===t||ct(r)&&ct(t)&&sN(r,t)}function sN(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function xS(r,t,e,i,n,a,o,s){for(var l=De(i),u=n.duration,c=n.delay,f=n.additive,h=n.setToFinal,p=!W(a),d=r.animators,v=[],m=0;m<l.length;m++){var g=l[m],y=i[g];if(y!=null&&e[g]!=null&&(p||a[g]))if(W(y)&&!ct(y)&&!Qi(y)){if(t){s||(e[g]=y,r.updateDuringAnimation(t));continue}xS(r,g,e[g],y,n,a&&a[g],o,s)}else v.push(g);else s||(e[g]=y,r.updateDuringAnimation(t),v.push(g))}var _=v.length;if(!f&&_)for(var x=0;x<d.length;x++){var b=d[x];if(b.targetName===t){var S=b.stopTracks(v);if(S){var T=ce(d,b);d.splice(T,1)}}}if(n.force||(v=Be(v,function(O){return!oN(i[O],e[O])}),_=v.length),_>0||n.force&&!o.length){var A=void 0,E=void 0,M=void 0;if(s){E={},h&&(A={});for(var x=0;x<_;x++){var g=v[x];E[g]=e[g],h?A[g]=i[g]:e[g]=i[g]}}else if(h){M={};for(var x=0;x<_;x++){var g=v[x];M[g]=uu(e[g]),aN(e,i,g)}}var b=new cu(e,!1,!1,f?Be(d,function(L){return L.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),h&&A&&b.whenWithKeys(0,A,v),M&&b.whenWithKeys(0,M,v),b.whenWithKeys(u??500,s?E:i,v).delay(c||0),r.addAnimator(b,t),o.push(b)}}function gS(r,t,e,i){return!(e&&e.hoverLayer||i)||yS(r)||t&&yS(t)?Xf:fs}function yS(r){return r.type==="text"||r.type==="tspan"}function _S(r,t,e){return!t&&!r.__inHover&&e&&e.duration>0}var Kf=Vm;var bS=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return 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 i=this._children,n=0;n<i.length;n++)if(i[n].name===e)return i[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,i){if(e&&e!==this&&e.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=ce(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=ce(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n<e.length;n++){var a=e[n];i&&a.removeSelfFromZr(i),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];e.call(i,o,a)}return this},t.prototype.traverse=function(e,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=e.call(i,a);a.isGroup&&!o&&a.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var i=new ue(0,0,0,0),n=e||this._children,a=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(ue.applyTransform(i,u,c),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},t})(Kf);bS.prototype.type="group";var Ee=bS;var qf={},Ha={};function lN(r){delete Ha[r]}function uN(r){if(!r)return!1;if(typeof r=="string")return Ra(r,1)<fu;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=Ra(t[n].color,1);return e/=i,e<fu}return!1}var cN=(function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new kb,o=i.renderer||"canvas";qf[o]||(o=De(qf)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new qf[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!fe.node&&!fe.worker&&!l?new lS(s.getViewportRoot(),s.root):null,c=i.useCoarsePointer,f=c==null||c==="auto"?fe.touchEventsSupported:!!c,h=44,p;f&&(p=Z(i.pointerSize,h)),this.handler=new Mb(a,s,u,s.root,p),this.animation=new iS({stage:{update:l?null:function(){return n._flush(!1)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=uN(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},r.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!0)},r.prototype._flush=function(t){var e,i=Fa(),n=this._needsRefresh,a=this._needsRefreshHover;(n||a)&&(e=!0,this._refresh({animUpdate:t,refresh:n,refreshHover:a}));var o=Fa();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Ee&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){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,lN(this.id))},r})();function jf(r,t){var e=new cN(Wl(),r,t);return Ha[e.id]=e,e}function fN(r){r.dispose()}function hN(){for(var r in Ha)Ha.hasOwnProperty(r)&&Ha[r].dispose();Ha={}}function pN(r){return Ha[r]}function Hm(r,t){qf[r]=t}var Um;function dN(r){if(typeof Um=="function")return Um(r)}function Gm(r){Um=r}var vN="6.1.0";var SS=1e-4,Jf=20;function mN(r){return r.replace(/^\s+|\s+$/g,"")}var Xe=Math.min,Se=Math.max,Ge=Math.abs,or=Math.round,sr=Math.floor,Li=Math.ceil,Wn=Math.pow,Yn=Math.log,vu=Math.LN10,gN=Math.PI,yN=Math.random;function je(r,t,e,i){var n=t[0],a=t[1],o=e[0],s=e[1],l=a-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}var Ve=_N;function _N(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Qf(r,t,e)}function Qf(r,t,e){return H(r)?xN(r)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function xN(r){return!!mN(r).match(/%$/)}function we(r,t,e){return isNaN(t)?e?""+r:+r:(t=Xe(Se(0,t),Jf),r=(+r).toFixed(t),e?r:+r)}function wS(r,t,e){return t==null&&(t=10),we(r,t,e)}function Ct(r){return r.sort(function(t,e){return t-e}),r}function Kt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(or(r*t)/t===r)return e}return Ym(r)}function Ym(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Se(0,o-i)}function TS(r,t){var e=sr(Yn(r[1]-r[0])/vu),i=or(Yn(Ge(t[1]-t[0]))/vu),n=Xe(Se(-e+i,0),Jf);return isFinite(n)?n:Jf}function eh(r,t,e){var i=Ge(r[1]-r[0]);if(!isFinite(i)||i===0)return NaN;var n=Yn(2*Ge(e||1)*Ge(i))/vu,a=Yn(Ge(t))/vu,o=Se(0,Li(-n+a));return isFinite(o)||(o=NaN),o}function CS(r,t,e){if(!r[t])return 0;var i=bN(r,e);return i[t]||0}function bN(r,t){var e=zt(r,function(p,d){return p+(isNaN(d)?0:d)},0);if(e===0)return[];for(var i=Wn(10,t),n=U(r,function(p){return(isNaN(p)?0:p)/e*i*100}),a=i*100,o=U(n,function(p){return sr(p)}),s=zt(o,function(p,d){return p+d},0),l=U(n,function(p,d){return p-o[d]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return U(o,function(p){return p/i})}function ln(r,t){var e=Se(Kt(r),Kt(t)),i=r+t;return e>Jf?i:we(i,e)}var mu=Wn(2,53)-1;function gu(r){var t=gN*2;return(r%t+t)%t}function Ga(r){return r>-SS&&r<SS}var SN=/^(?:(\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 qt(r){if(r instanceof Date)return r;if(H(r)){var t=SN.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else 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)}else if(r==null)return new Date(NaN);return new Date(or(r))}function hs(r){return Wn(10,ps(r))}function ps(r){if(r===0)return 0;var t=sr(Yn(r)/vu);return r/Wn(10,t)>=10&&t++,t}var Wm=2;function un(r,t){var e=ps(r),i=Wn(10,e),n=r/i,a;return t===Wm?a=1:t?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,we(r,-e)}function AS(r,t){var e=(r.length-1)*t+1,i=sr(e),n=+r[i-1],a=e-i;return a?n+a*(r[i]-n):n}function DS(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-e),t=n[o],e=a[o];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Wr(r){var t=parseFloat(r);return t==r&&(t!==0||!H(r)||r.indexOf("x")<=0)?t:NaN}function yu(r){return!isNaN(Wr(r))}function _u(){return or(yN()*9)}function ES(r,t){return t===0?r:ES(t,r%t)}function Zm(r,t){return r==null?t:t==null?r:r*t/ES(r,t)}function gt(r){return r!=null&&isFinite(r)}var wN="[ECharts] ",MS={},TN=typeof console<"u"&&console.warn&&console.log;function CN(r,t,e){if(TN){if(e){if(MS[t])return;MS[t]=!0}console[r](wN+t)}}function Xm(r,t){CN("error",r,t)}function Et(r){throw new Error(r)}function OS(r,t,e){return(t-r)*e+r}var IS="series\0",AN="\0_ec_\0";function Qe(r){return r instanceof Array?r:r==null?[]:[r]}function Su(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i<n;i++){var a=e[i];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var Km=["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 cn(r){return W(r)&&!F(r)&&!(r instanceof Date)?r.value:r}function LS(r){return W(r)&&!(r instanceof Array)}function PS(r,t,e){var i=e==="normalMerge",n=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=Y();w(t,function(l,u){if(!W(l)){t[u]=null;return}});var s=DN(r,o,e);return(i||n)&&EN(s,r,o,t),i&&MN(s,t),i||n?ON(s,t,n):a&&IN(s,t),LN(s),s}function DN(r,t,e){var i=[];if(e==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&t.set(a.id,n),i.push({existing:e==="replaceMerge"||ds(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function EN(r,t,e,i){w(i,function(n,a){if(!(!n||n.id==null)){var o=bu(n.id),s=e.get(o);if(s!=null){var l=r[s];ft(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],i[a]=null}}})}function MN(r,t){w(t,function(e,i){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||e.id==null)&&!ds(e)&&!ds(a)&&NS("name",a,e)){r[n].newOption=e,t[i]=null;return}}})}function ON(r,t,e){w(t,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||ds(n.existing)||n.existing&&i.id!=null&&!NS("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=e):r.push({newOption:i,brandNew:e,existing:null,keyInfo:null}),a++}})}function IN(r,t){w(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function LN(r){var t=Y();w(r,function(e){var i=e.existing;i&&t.set(i.id,e)}),w(r,function(e){var i=e.newOption;ft(!i||i.id==null||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})}),w(r,function(e,i){var n=e.existing,a=e.newOption,o=e.keyInfo;if(W(a)){if(o.name=a.name!=null?bu(a.name):n?n.name:IS+i,n)o.id=bu(n.id);else if(a.id!=null)o.id=bu(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function NS(r,t,e){var i=Ar(t[r],null),n=Ar(e[r],null);return i!=null&&n!=null&&i===n}function bu(r){return Ar(r,"")}function Ar(r,t){return r==null?t:H(r)?r:ge(r)||$o(r)?r+"":t}function vs(r){var t=r.name;return!!(t&&t.indexOf(IS))}function ds(r){return r&&r.id!=null&&bu(r.id).indexOf(AN)===0}function kS(r,t,e){w(r,function(i){var n=i.newOption;W(n)&&(i.keyInfo.mainType=t,i.keyInfo.subType=PN(t,n,i.existing,e))})}function PN(r,t,e,i){var n=t.type?t.type:e?e.subType:i.determineSubType(r,t);return n}function Zr(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return F(t.dataIndex)?U(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return F(t.name)?U(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function re(){var r="__ec_inner_"+NN++;return function(t){return t[r]||(t[r]={})}}var NN=_u();function th(r,t,e){var i=wu(t,e),n=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,c){var f=Zn(r,c,u,{useDefault:l===c,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function wu(r,t){var e;if(H(r)){var i={};i[r+"Index"]=0,e=i}else e=r;var n=Y(),a={},o=!1;return w(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||t&&t.includeMainTypes&&ce(t.includeMainTypes,c)<0)){o=o||!!c;var h=n.get(c)||n.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:a}}var at={useDefault:!0,enableAll:!1,enableNone:!1},RS={useDefault:!1,enableAll:!0,enableNone:!0};function Zn(r,t,e,i){i=i||at;var n=e.index,a=e.id,o=e.name,s={models:null,specified:n!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(t))?[l]:[],s}if(n==="none"||n===!1){if(i.enableNone)return s.models=[],s;n=-1}return n==="all"&&(i.enableAll?n=a=o=null:n=-1),s.models=r.queryComponents({mainType:t,index:n,id:a,name:o}),s}function FS(r,t,e){var i={};i[t+"Id"]=r[t+"Id"],i[t+"Index"]=r[t+"Index"],i[t+"Name"]=r[t+"Name"];var n={mainType:t,query:i};return e&&(n.subType=e),n}function qm(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function BS(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function zS(r){return r==="auto"?fe.domSupported?"html":"richText":r||"html"}function jm(r,t,e,i,n){var a=t==null||t==="auto";if(i==null)return i;if(ge(i)){var o=OS(e||0,i,n);return we(o,a?Math.max(Kt(e||0),Kt(i)):t)}else{if(H(i))return n<1?e:i;for(var s=[],l=e,u=i,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=r.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(n<1&&l?l:u)[f];else{var p=l&&l[f]?l[f]:0,d=u[f],o=OS(p,d,n);s[f]=we(o,a?Math.max(Kt(p),Kt(d)):t)}}return s}}var DW=(function(){function r(){}return r.prototype.reset=function(t,e,i,n){return this._list=t,this._step=n=n||1,this._idx=e,this._end=i??(n>0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Rt(){return[1/0,-1/0]}function Tu(r,t){di(t)&&(t<r[0]&&(r[0]=t),t>r[1]&&(r[1]=t))}function $m(r,t){di(t)&&t<r[0]&&(r[0]=t)}function Jm(r,t){di(t)&&t>r[1]&&(r[1]=t)}function VS(r,t){fn(t[0],t[1])&&(t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1]))}function di(r){return r!=null&&isFinite(r)}function fn(r,t){return di(r)&&di(t)&&r<=t}function US(r){var t=r[1]-r[0];return isFinite(t)&&t>=0}function ms(r){fn(r[0],r[1])&&r[0]>r[1]&&(r[0]=r[1])}function gs(){var r="__ec_once_"+kN++;return function(t,e){We(t,r)||(t[r]=1,e())}}var kN=_u();function ys(r,t,e){var i=Y(),n=0;w(r,function(a){var o=t(a),s=i.get(o)||0;e&&e(a,s),!s&&!e&&(r[n++]=a),i.set(o,s+1)}),e||(r.length=n)}function HS(r){return r.value+""}function GS(r){return r+""}function YS(r,t){return Z(t,!0)?r.seriesIndex+2:0}function rh(r,t,e){var i=r.getData().count();return{progressiveRender:e.progressiveEnabled&&t.incrementalPrepareRender&&i>=e.threshold,large:r.get("large")&&i>=r.get("largeThreshold"),modDataCount:r.get("progressiveChunkMode")==="mod"?r.getData().count():null}}function _s(r){return{overallReset:r}}var RN=".",Wa="___EC__COMPONENT__CONTAINER___",WS="___EC__EXTENDED_CLASS___";function lr(r){var t={main:"",sub:""};if(r){var e=r.split(RN);t.main=e[0]||"",t.sub=e[1]||""}return t}function FN(r){ft(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function ZS(r){return!!(r&&r[WS])}function xs(r,t){r.$constructor=r,r.extend=function(e){var i=this,n;return BN(i)?n=(function(a){N(o,a);function o(){return a.apply(this,arguments)||this}return o})(i):(n=function(){(e.$constructor||i).apply(this,arguments)},Zl(n,this)),B(n.prototype,e),n[WS]=!0,n.extend=this.extend,n.superCall=VN,n.superApply=UN,n.superClass=i,n}}function BN(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function ih(r,t){r.extend=t.extend}var zN=Math.round(Math.random()*10);function XS(r){var t=["__\0is_clz",zN++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function VN(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(r,e)}function UN(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Xn(r){var t={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){FN(n),i.prototype.type=n;var a=lr(n);if(!a.sub)t[a.main]=i;else if(a.sub!==Wa){var o=e(a);o[a.sub]=i}}return i},r.getClass=function(i,n,a){var o=t[i];if(o&&o[Wa]&&(o=n?o[n]:null),a&&!o)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return o},r.getClassesByMainType=function(i){var n=lr(i),a=[],o=t[n.main];return o&&o[Wa]?w(o,function(s,l){l!==Wa&&a.push(s)}):a.push(o),a},r.hasClass=function(i){var n=lr(i);return!!t[n.main]},r.getAllClassMainTypes=function(){var i=[];return w(t,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=lr(i),a=t[n.main];return a&&a[Wa]};function e(i){var n=t[i.main];return(!n||!n[Wa])&&(n=t[i.main]={},n[Wa]=!0),n}}function Pi(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(i,n,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&ce(n,l)>=0||a&&ce(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var HN=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],GN=Pi(HN),KS=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return GN(this,t,e)},r})();var eg=new Oi(50);function jS(r){if(typeof r=="string"){var t=eg.get(r);return t&&t.image}else return r}function tg(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=eg.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!bs(t)&&a.pending.push(o)):(t=$e.loadImage(r,qS,qS),t.__zrImageSrc=r,eg.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function qS(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function bs(r){return r&&r.width&&r.height}var rg=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function ng(r,t,e,i,n){var a={};return ew(a,r,t,e,i,n),a.text}function ew(r,t,e,i,n,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
4
4
|
`);a=tw(e,i,n,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)rw(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
5
5
|
`),r.isTruncated=s}function tw(r,t,e,i){i=i||{};var n=B({},i);e=Z(e,"..."),n.maxIterations=Z(i.maxIterations,2);var a=n.minChar=Z(i.minChar,0),o=n.fontMeasureInfo=hi(t),s=o.asciiCharWidth;n.placeholder=Z(i.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<a&&l>=s;u++)l-=s;var c=pi(o,e);return c>l&&(e="",c=0),l=r-c,n.ellipsis=e,n.ellipsisWidth=c,n.contentWidth=l,n.containerWidth=r,n}function rw(r,t,e){var i=e.containerWidth,n=e.contentWidth,a=e.fontMeasureInfo;if(!i){r.textLine="",r.isTruncated=!1;return}var o=pi(a,t);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?WN(t,n,a):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=pi(a,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function WN(r,t,e){for(var i=0,n=0,a=r.length;n<a&&i<t;n++)i+=km(e,r.charCodeAt(n));return n}function iw(r,t,e,i){var n=og(r),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,c=a==="truncate",f=du(u),h=Z(t.lineHeight,f),p=t.lineOverflow==="truncate",d=!1,v=t.width;v==null&&e!=null&&(v=e-s);var m=t.height;m==null&&i!=null&&(m=i-l);var g;v!=null&&(a==="break"||a==="breakAll")?g=n?aw(n,t.font,v,a==="breakAll",0).lines:[]:g=n?n.split(`
|
|
6
|
-
`):[];var y=g.length*h;if(m==null&&(m=y),y>m&&p){var _=Math.floor(m/h);d=d||g.length>_,g=g.slice(0,_),y=g.length*h}if(n&&c&&v!=null)for(var x=tw(v,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},S=0;S<g.length;S++)rw(b,g[S],x),g[S]=b.textLine,d=d||b.isTruncated;for(var T=m,A=0,E=hi(u),S=0;S<g.length;S++)A=Math.max(pi(E,g[S]),A);v==null&&(v=A);var M=v;return T+=l,M+=s,{lines:g,height:m,outerWidth:M,outerHeight:T,lineHeight:h,calculatedLineHeight:f,contentWidth:A,contentHeight:y,width:v,isTruncated:d}}var ZN=(function(){function r(){}return r})()
|
|
6
|
+
`):[];var y=g.length*h;if(m==null&&(m=y),y>m&&p){var _=Math.floor(m/h);d=d||g.length>_,g=g.slice(0,_),y=g.length*h}if(n&&c&&v!=null)for(var x=tw(v,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},S=0;S<g.length;S++)rw(b,g[S],x),g[S]=b.textLine,d=d||b.isTruncated;for(var T=m,A=0,E=hi(u),S=0;S<g.length;S++)A=Math.max(pi(E,g[S]),A);v==null&&(v=A);var M=v;return T+=l,M+=s,{lines:g,height:m,outerWidth:M,outerHeight:T,lineHeight:h,calculatedLineHeight:f,contentWidth:A,contentHeight:y,width:v,isTruncated:d}}var ZN=(function(){function r(){}return r})(),$S=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),XN=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function nw(r,t,e,i,n){var a=new XN,o=og(r);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=t.width;c==null&&e!=null&&(c=e-l);var f=t.height;f==null&&i!=null&&(f=i-u);for(var h=t.overflow,p=(h==="break"||h==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:h==="breakAll"}:null,d=rg.lastIndex=0,v;(v=rg.exec(o))!=null;){var m=v.index;m>d&&ig(a,o.substring(d,m),t,p),ig(a,v[2],t,p,v[1]),d=rg.lastIndex}d<o.length&&ig(a,o.substring(d,o.length),t,p);var g=[],y=0,_=0,x=h==="truncate",b=t.lineOverflow==="truncate",S={};function T(Pe,vt,bt){Pe.width=vt,Pe.lineHeight=bt,y+=bt,_=Math.max(_,vt)}e:for(var A=0;A<a.lines.length;A++){for(var E=a.lines[A],M=0,O=0,L=0;L<E.tokens.length;L++){var I=E.tokens[L],k=I.styleName&&t.rich[I.styleName]||{},z=I.textPadding=k.padding,V=z?z[1]+z[3]:0,q=I.font=k.font||t.font;I.contentHeight=du(q);var G=Z(k.height,I.contentHeight);if(I.innerHeight=G,z&&(G+=z[0]+z[2]),I.height=G,I.lineHeight=zr(k.lineHeight,t.lineHeight,G),I.align=k&&k.align||n,I.verticalAlign=k&&k.verticalAlign||"middle",b&&f!=null&&y+I.lineHeight>f){var j=a.lines.length;L>0?(E.tokens=E.tokens.slice(0,L),T(E,O,M),a.lines=a.lines.slice(0,A+1)):a.lines=a.lines.slice(0,A),a.isTruncated=a.isTruncated||a.lines.length<j;break e}var oe=k.width,ie=oe==null||oe==="auto";if(typeof oe=="string"&&oe.charAt(oe.length-1)==="%")I.percentWidth=oe,g.push(I),I.contentWidth=pi(hi(q),I.text);else{if(ie){var pe=k.backgroundColor,de=pe&&pe.image;de&&(de=jS(de),bs(de)&&(I.width=Math.max(I.width,de.width*G/de.height)))}var te=x&&c!=null?c-O:null;te!=null&&te<I.width?!ie||te<V?(I.text="",I.width=I.contentWidth=0):(ew(S,I.text,te-V,q,t.ellipsis,{minChar:t.truncateMinChar}),I.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,I.width=I.contentWidth=pi(hi(q),I.text)):I.contentWidth=pi(hi(q),I.text)}I.width+=V,O+=I.width,k&&(M=Math.max(M,I.lineHeight))}T(E,O,M)}a.outerWidth=a.width=Z(c,_),a.outerHeight=a.height=Z(f,y),a.contentHeight=y,a.contentWidth=_,a.outerWidth+=l,a.outerHeight+=u;for(var A=0;A<g.length;A++){var I=g[A],Te=I.percentWidth;I.width=parseInt(Te,10)/100*a.width}return a}function ig(r,t,e,i,n){var a=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,c,f;if(i){var h=o.padding,p=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var d=fi(o.width,i.width)+p;s.length>0&&d+i.accumWidth>i.width&&(c=t.split(`
|
|
7
7
|
`),u=!0),i.accumWidth=d}else{var v=aw(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=v.accumWidth+p,f=v.linesWidths,c=v.lines}}c||(c=t.split(`
|
|
8
|
-
`));for(var m=hi(l),g=0;g<c.length;g++){var y=c[g],_=new ZN;if(_.styleName=n,_.text=y,_.isLineHolder=!y&&!a,typeof o.width=="number"?_.width=o.width:_.width=f?f[g]:pi(m,y),!g&&!u){var x=(s[s.length-1]||(s[0]=new
|
|
9
|
-
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=km(f,p.charCodeAt(0)),v=i?!1:!$N(p);if(a.length?c+d>e:n+c+d>e){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=p,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=p,c=d)):v?(a.push(l),o.push(u),l=p,u=d):(a.push(p),o.push(d));continue}c+=d,v?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=n),{accumWidth:c,lines:a,linesWidths:o}}function ag(r,t,e,i,n,a){if(r.baseX=e,r.baseY=i,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;ue.set(JS,Gn(e,o,n),sn(i,s,a),o,s),ue.intersect(t,JS,null,QS);var l=QS.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Gn(l.x,l.width,n,!0),r.baseY=sn(l.y,l.height,a,!0)}}var JS=new ue(0,0,0,0),QS={outIntersectRect:{},clamp:!0};function og(r){return r!=null?r+="":r=""}function ow(r){var t=og(r.text),e=r.font,i=pi(hi(e),t),n=du(e);return nh(r,i,n,null)}function nh(r,t,e,i){var n=new ue(Gn(r.x||0,t,r.textAlign),sn(r.y||0,e,r.textBaseline),t,e),a=i??(sg(r)?r.lineWidth:0);return a>0&&(n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a),n}function sg(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var cg="__zr_style_"+Math.round(Math.random()*10),Ni={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Za={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ni[cg]=!0;var sw=["z","z2","invisible"],jN=["invisible"],JN=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=De(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&QN(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ue(0,0,0,0)),i?ue.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ue(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){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:B(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Na,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Na)},t.prototype.styleUpdated=function(){this.__dirty&=~Na},t.prototype.createStyle=function(e){return tn(Ni,e)},t.prototype.useStyle=function(e){e[cg]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[cg]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,sw)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u=this.__inHover===fs,c;if(i&&i.style?o?a?c=i.style:(c=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(c,i.style)):(c=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(c,i.style)):l&&(c=n.style),c)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=De(f),p=0;p<h.length;p++){var d=h[p];d in c&&(c[d]=c[d],this.style[d]=f[d])}for(var v=De(c),p=0;p<v.length;p++){var d=v[p];this.style[d]=this.style[d]}this._transitionState(e,{style:c},s,this.getAnimationStyleProps())}else u?this._useHoverStyle(c):this.useStyle(c);if(!u)for(var m=this.__inHover?jN:sw,p=0;p<m.length;p++){var d=m[p];i&&i[d]!=null?this[d]=i[d]:l&&n[d]!=null&&(this[d]=n[d])}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,i){return B(e,i),e},t.prototype.getAnimationStyleProps=function(){return Za},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=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=pt|Na})(),t})(Kf),lg=new ue(0,0,0,0),ug=new ue(0,0,0,0);function QN(r,t,e){return lg.copy(r.getBoundingRect()),r.transform&&lg.applyTransform(r.transform),ug.width=t,ug.height=e,!lg.intersect(ug)}var ki=JN;var Xr=Math.min,Kr=Math.max,fg=Math.sin,hg=Math.cos,Xa=Math.PI*2,ah=rn(),oh=rn(),sh=rn();function pg(r,t,e,i,n,a){n[0]=Xr(r,e),n[1]=Xr(t,i),a[0]=Kr(r,e),a[1]=Kr(t,i)}var lw=[],uw=[];function cw(r,t,e,i,n,a,o,s,l,u){var c=Of,f=Je,h=c(r,e,n,o,lw);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var d=f(r,e,n,o,lw[p]);l[0]=Xr(d,l[0]),u[0]=Kr(d,u[0])}h=c(t,i,a,s,uw);for(var p=0;p<h;p++){var v=f(t,i,a,s,uw[p]);l[1]=Xr(v,l[1]),u[1]=Kr(v,u[1])}l[0]=Xr(r,l[0]),u[0]=Kr(r,u[0]),l[0]=Xr(o,l[0]),u[0]=Kr(o,u[0]),l[1]=Xr(t,l[1]),u[1]=Kr(t,u[1]),l[1]=Xr(s,l[1]),u[1]=Kr(s,u[1])}function fw(r,t,e,i,n,a,o,s){var l=If,u=Tt,c=Kr(Xr(l(r,e,n),1),0),f=Kr(Xr(l(t,i,a),1),0),h=u(r,e,n,c),p=u(t,i,a,f);o[0]=Xr(r,n,h),o[1]=Xr(t,a,p),s[0]=Kr(r,n,h),s[1]=Kr(t,a,p)}function hw(r,t,e,i,n,a,o,s,l){var u=Vr,c=Ur,f=Math.abs(n-a);if(f%Xa<1e-4&&f>1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(ah[0]=hg(n)*e+r,ah[1]=fg(n)*i+t,oh[0]=hg(a)*e+r,oh[1]=fg(a)*i+t,u(s,ah,oh),c(l,ah,oh),n=n%Xa,n<0&&(n=n+Xa),a=a%Xa,a<0&&(a=a+Xa),n>a&&!o?a+=Xa:n<a&&o&&(n+=Xa),o){var h=a;a=n,n=h}for(var p=0;p<a;p+=Math.PI/2)p>n&&(sh[0]=hg(p)*e+r,sh[1]=fg(p)*i+t,u(s,sh,s),c(l,sh,l))}var Ue={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ka=[],qa=[],Ri=[],Kn=[],Fi=[],Bi=[],dg=Math.min,vg=Math.max,$a=Math.cos,ja=Math.sin,hn=Math.abs,yg=Math.PI,qn=yg*2,mg=typeof Float32Array<"u",Cu=[];function gg(r){var t=Math.round(r/yg*1e8)/1e8;return t%2*yg}function ek(r,t){var e=gg(r[0]);e<0&&(e+=qn);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=qn?n=e+qn:t&&e-n>=qn?n=e-qn:!t&&e>n?n=e+(qn-gg(e-n)):t&&e<n&&(n=e-(qn-gg(n-e))),r[0]=e,r[1]=n}var tk=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,i){i=i||0,i>0&&(this._ux=hn(i/Ba/t)||0,this._uy=hn(i/Ba/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ue.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=hn(t-this._xi),n=hn(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Ue.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(Ue.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Ue.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),Cu[0]=n,Cu[1]=a,ek(Cu,o),n=Cu[0],a=Cu[1];var s=a-n;return this.addData(Ue.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=$a(a)*i+t,this._yi=ja(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ue.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ue.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&mg&&(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e}},r.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();var o=this.data;if(mg&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(n+i),n>0&&o))for(var s=0;s<n;s++)this.data[s]=o[s];for(var a=0;a<e;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[n++]=l[s];this._len=n}},r.prototype.addData=function(t,e,i,n,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,mg&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Ri[0]=Ri[1]=Fi[0]=Fi[1]=Number.MAX_VALUE,Kn[0]=Kn[1]=Bi[0]=Bi[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],i=t[o+1],n=e,a=i),s){case Ue.M:e=n=t[o++],i=a=t[o++],Fi[0]=n,Fi[1]=a,Bi[0]=n,Bi[1]=a;break;case Ue.L:pg(e,i,t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.C:cw(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.Q:fw(e,i,t[o++],t[o++],t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.A:var u=t[o++],c=t[o++],f=t[o++],h=t[o++],p=t[o++],d=t[o++]+p;o+=1;var v=!t[o++];l&&(n=$a(p)*f+u,a=ja(p)*h+c),hw(u,c,f,h,p,d,v,Fi,Bi),e=$a(d)*f+u,i=ja(d)*h+c;break;case Ue.R:n=e=t[o++],a=i=t[o++];var m=t[o++],g=t[o++];pg(n,a,n+m,a+g,Fi,Bi);break;case Ue.Z:e=n,i=a;break}Vr(Ri,Ri,Fi),Ur(Kn,Kn,Bi)}return o===0&&(Ri[0]=Ri[1]=Kn[0]=Kn[1]=0),new ue(Ri[0],Ri[1],Kn[0]-Ri[0],Kn[1]-Ri[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<e;){var p=t[h++],d=h===1;d&&(a=t[h],o=t[h+1],s=a,l=o);var v=-1;switch(p){case Ue.M:a=s=t[h++],o=l=t[h++];break;case Ue.L:{var m=t[h++],g=t[h++],y=m-a,_=g-o;(hn(y)>i||hn(_)>n||h===e-1)&&(v=Math.sqrt(y*y+_*_),a=m,o=g);break}case Ue.C:{var x=t[h++],b=t[h++],m=t[h++],g=t[h++],S=t[h++],T=t[h++];v=Ub(a,o,x,b,m,g,S,T,10),a=S,o=T;break}case Ue.Q:{var x=t[h++],b=t[h++],m=t[h++],g=t[h++];v=Yb(a,o,x,b,m,g,10),a=m,o=g;break}case Ue.A:var A=t[h++],E=t[h++],M=t[h++],O=t[h++],L=t[h++],I=t[h++],k=I+L;h+=1,d&&(s=$a(L)*M+A,l=ja(L)*O+E),v=vg(M,O)*dg(qn,Math.abs(I)),a=$a(k)*M+A,o=ja(k)*O+E;break;case Ue.R:{s=a=t[h++],l=o=t[h++];var z=t[h++],V=t[h++];v=z*2+V*2;break}case Ue.Z:{var y=s-a,_=l-o;v=Math.sqrt(y*y+_*_),a=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,p=e<1,d,v,m=0,g=0,y,_=0,x,b;if(!(p&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,v=this._pathLen,y=e*v,!y)))e:for(var S=0;S<o;){var T=i[S++],A=S===1;switch(A&&(u=i[S],c=i[S+1],s=u,l=c),T!==Ue.L&&_>0&&(t.lineTo(x,b),_=0),T){case Ue.M:s=u=i[S++],l=c=i[S++],t.moveTo(u,c);break;case Ue.L:{f=i[S++],h=i[S++];var E=hn(f-u),M=hn(h-c);if(E>n||M>a){if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;t.lineTo(u*(1-L)+f*L,c*(1-L)+h*L);break e}m+=O}t.lineTo(f,h),u=f,c=h,_=0}else{var I=E*E+M*M;I>_&&(x=f,b=h,_=I)}break}case Ue.C:{var k=i[S++],z=i[S++],V=i[S++],q=i[S++],G=i[S++],$=i[S++];if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;rs(u,k,V,G,L,Ka),rs(c,z,q,$,L,qa),t.bezierCurveTo(Ka[1],qa[1],Ka[2],qa[2],Ka[3],qa[3]);break e}m+=O}t.bezierCurveTo(k,z,V,q,G,$),u=G,c=$;break}case Ue.Q:{var k=i[S++],z=i[S++],V=i[S++],q=i[S++];if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;is(u,k,V,L,Ka),is(c,z,q,L,qa),t.quadraticCurveTo(Ka[1],qa[1],Ka[2],qa[2]);break e}m+=O}t.quadraticCurveTo(k,z,V,q),u=V,c=q;break}case Ue.A:var oe=i[S++],ie=i[S++],pe=i[S++],de=i[S++],te=i[S++],Te=i[S++],Pe=i[S++],vt=!i[S++],bt=pe>de?pe:de,ze=hn(pe-de)>.001,ut=te+Te,Ce=!1;if(p){var O=d[g++];m+O>y&&(ut=te+Te*(y-m)/O,Ce=!0),m+=O}if(ze&&t.ellipse?t.ellipse(oe,ie,pe,de,Pe,te,ut,vt):t.arc(oe,ie,bt,te,ut,vt),Ce)break e;A&&(s=$a(te)*pe+oe,l=ja(te)*de+ie),u=$a(ut)*pe+oe,c=ja(ut)*de+ie;break;case Ue.R:s=u=i[S],l=c=i[S+1],f=i[S++],h=i[S++];var Ie=i[S++],$i=i[S++];if(p){var O=d[g++];if(m+O>y){var Nt=y-m;t.moveTo(f,h),t.lineTo(f+dg(Nt,Ie),h),Nt-=Ie,Nt>0&&t.lineTo(f+Ie,h+dg(Nt,$i)),Nt-=$i,Nt>0&&t.lineTo(f+vg(Ie-Nt,0),h+$i),Nt-=Ie,Nt>0&&t.lineTo(f,h+vg($i-Nt,0));break e}m+=O}t.rect(f,h,Ie,$i);break;case Ue.Z:if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;t.lineTo(u*(1-L)+s*L,c*(1-L)+l*L);break e}m+=O}t.closePath(),u=s,c=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Ue,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})(),Dr=tk;function Ja(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-i)/(r-e),u=(r*i-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function pw(r,t,e,i,n,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>t+f&&c>i+f&&c>a+f&&c>s+f||c<t-f&&c<i-f&&c<a-f&&c<s-f||u>r+f&&u>e+f&&u>n+f&&u>o+f||u<r-f&&u<e-f&&u<n-f&&u<o-f)return!1;var h=Vb(r,t,e,i,n,a,o,s,u,c,null);return h<=f/2}function dw(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var c=Gb(r,t,e,i,n,a,s,l,null);return c<=u/2}var vw=Math.PI*2;function Au(r){return r%=vw,r<0&&(r+=vw),r}var Du=Math.PI*2;function mw(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>e||c+u<e)return!1;if(Math.abs(i-n)%Du<1e-4)return!0;if(a){var f=i;i=Au(n),n=Au(f)}else i=Au(i),n=Au(n);i>n&&(n+=Du);var h=Math.atan2(l,s);return h<0&&(h+=Du),h>=i&&h<=n||h+Du>=i&&h+Du<=n}function qr(r,t,e,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var $n=Dr.CMD,Qa=Math.PI*2,ok=1e-4;function sk(r,t){return Math.abs(r-t)<ok}var $t=[-1,-1,-1],$r=[-1,-1];function lk(){var r=$r[0];$r[0]=$r[1],$r[1]=r}function uk(r,t,e,i,n,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var c=ka(t,i,a,s,u,$t);if(c===0)return 0;for(var f=0,h=-1,p=void 0,d=void 0,v=0;v<c;v++){var m=$t[v],g=m===0||m===1?.5:1,y=Je(r,e,n,o,m);y<l||(h<0&&(h=Of(t,i,a,s,$r),$r[1]<$r[0]&&h>1&&lk(),p=Je(t,i,a,s,$r[0]),h>1&&(d=Je(t,i,a,s,$r[1]))),h===2?m<$r[0]?f+=p<t?g:-g:m<$r[1]?f+=d<p?g:-g:f+=s<d?g:-g:m<$r[0]?f+=p<t?g:-g:f+=s<p?g:-g)}return f}function ck(r,t,e,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=Hb(t,i,a,s,$t);if(l===0)return 0;var u=If(t,i,a);if(u>=0&&u<=1){for(var c=0,f=Tt(t,i,a,u),h=0;h<l;h++){var p=$t[h]===0||$t[h]===1?.5:1,d=Tt(r,e,n,$t[h]);d<o||($t[h]<u?c+=f<t?p:-p:c+=a<f?p:-p)}return c}else{var p=$t[0]===0||$t[0]===1?.5:1,d=Tt(r,e,n,$t[0]);return d<o?0:a<t?p:-p}}function fk(r,t,e,i,n,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);$t[0]=-l,$t[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Qa-1e-4){i=0,n=Qa;var c=a?1:-1;return o>=$t[0]+r&&o<=$t[1]+r?c:0}if(i>n){var f=i;i=n,n=f}i<0&&(i+=Qa,n+=Qa);for(var h=0,p=0;p<2;p++){var d=$t[p];if(d+r>o){var v=Math.atan2(s,d),c=a?1:-1;v<0&&(v=Qa+v),(v>=i&&v<=n||v+Qa>=i&&v+Qa<=n)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),h+=c)}}return h}function gw(r,t,e,i,n){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,p,d=0;d<o;){var v=a[d++],m=d===1;switch(v===$n.M&&d>1&&(e||(s+=qr(l,u,c,f,i,n))),m&&(l=a[d],u=a[d+1],c=l,f=u),v){case $n.M:c=a[d++],f=a[d++],l=c,u=f;break;case $n.L:if(e){if(Ja(l,u,a[d],a[d+1],t,i,n))return!0}else s+=qr(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case $n.C:if(e){if(pw(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=uk(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case $n.Q:if(e){if(dw(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=ck(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case $n.A:var g=a[d++],y=a[d++],_=a[d++],x=a[d++],b=a[d++],S=a[d++];d+=1;var T=!!(1-a[d++]);h=Math.cos(b)*_+g,p=Math.sin(b)*x+y,m?(c=h,f=p):s+=qr(l,u,h,p,i,n);var A=(i-g)*x/_+g;if(e){if(mw(g,y,x,b,b+S,T,t,A,n))return!0}else s+=fk(g,y,x,b,b+S,T,A,n);l=Math.cos(b+S)*_+g,u=Math.sin(b+S)*x+y;break;case $n.R:c=l=a[d++],f=u=a[d++];var E=a[d++],M=a[d++];if(h=c+E,p=f+M,e){if(Ja(c,f,h,f,t,i,n)||Ja(h,f,h,p,t,i,n)||Ja(h,p,c,p,t,i,n)||Ja(c,p,c,f,t,i,n))return!0}else s+=qr(h,f,h,p,i,n),s+=qr(c,p,c,f,i,n);break;case $n.Z:if(e){if(Ja(l,u,c,f,t,i,n))return!0}else s+=qr(l,u,c,f,i,n);l=c,u=f;break}}return!e&&!sk(u,f)&&(s+=qr(l,u,c,f,i,n)||0),s!==0}function yw(r,t,e){return gw(r,0,!1,t,e)}function _w(r,t,e,i){return gw(r,t,!0,e,i)}var xg=he({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ni),pk={style:he({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Za.style)},_g=ss.concat(["invisible","culling","z","z2","zlevel","parent"]),dk=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<_g.length;++s)n[_g[s]]=this[_g[s]];n.__dirty|=pt}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var i=De(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=e[o];o==="style"?this.style?B(this.style,s):this.useStyle(s):o==="shape"?B(this.shape,s):r.prototype.attrKV.call(this,o,s)}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(e!=="none"){if(H(e)){var i=Ra(e,0);return i>.5?hu:i>.2?cS:pu}else if(e)return pu}return hu},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(H(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Ra(e,0)<fu;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~Bn},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 Dr(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Bn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),_w(s,l/u,e,i)))return!0}if(this.hasFill())return yw(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Bn,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){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:B(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Bn)},t.prototype.createStyle=function(e){return tn(xg,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){if(r.prototype._applyStateObj.call(this,e,i,n,a,o,s),this.__inHover!==fs){var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=B({},n.shape),B(u,i.shape)):(u=B({},a?this.shape:n.shape),B(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=B({},this.shape);for(var c={},f=De(u),h=0;h<f.length;h++){var p=f[h];typeof u[p]=="object"?this.shape[p]=u[p]:c[p]=u[p]}this._transitionState(e,{shape:c},s)}else this.shape=u,this.dirtyShape()}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return pk},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var i=(function(a){N(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ne(e.style)},o.prototype.getDefaultShape=function(){return ne(e.shape)},o})(t);for(var n in e)typeof e[n]=="function"&&(i.prototype[n]=e[n]);return i},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=pt|Na|Bn})(),t})(ki),ve=dk;var vk=he({strokeFirst:!0,font:Br,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},xg),xw=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return sg(this.style)},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return tn(vk,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=ow(this.style)),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(ki);xw.prototype.type="tspan";var Eu=xw;var mk=he({x:0,y:0},Ni),gk={style:he({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Za.style)};function yk(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var bw=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return tn(mk,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=yk(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return gk},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ue(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(ki);bw.prototype.type="image";var ur=bw;function Sw(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,c;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>n&&(f=s+l,s*=n/f,l*=n/f),u+c>n&&(f=u+c,u*=n/f,c*=n/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+c,i+a),c!==0&&r.arc(e+c,i+a-c,c,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5),r.closePath()}var Ss=Math.round;function lh(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(Ss(i*2)===Ss(n*2)&&(r.x1=r.x2=jn(i,s,!0)),Ss(a*2)===Ss(o*2)&&(r.y1=r.y2=jn(a,s,!0))),r}}function uh(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=jn(i,s,!0),r.y=jn(n,s,!0),r.width=Math.max(jn(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(jn(n+o,s,!1)-r.y,o===0?0:1)),r}}function jn(r,t,e){if(!t)return r;var i=Ss(r*2);return(i+Ss(t))%2===0?i/2:(i+(e?1:-1))/2}var bk=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})();var Sk={},ww=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new bk},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=uh(Sk,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?Sw(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(ve);ww.prototype.type="rect";var Oe=ww;var Tw={fill:"#000"},Cw=2,zi={},wk={style:he({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},Za.style)},Pw=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Tw,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Ek(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ue(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Tw},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var n=i.rich,a=e.rich||n&&{};return B(e,i),n&&a?(this._mergeRich(a,n),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,i){for(var n=De(i),a=0;a<n.length;a++){var o=n[a];e[o]=e[o]||{},B(e[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return wk},t.prototype._getOrCreateChild=function(e){var i=this._children[this._childCursor];return(!i||!(i instanceof e))&&(i=new e),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var e=this.style,i=e.font||Br,n=e.padding,a=this._defaultStyle,o=e.x||0,s=e.y||0,l=e.align||a.align||"left",u=e.verticalAlign||a.verticalAlign||"top";ag(zi,a.overflowRect,o,s,l,u),o=zi.baseX,s=zi.baseY;var c=Lw(e),f=iw(c,e,zi.outerWidth,zi.outerHeight),h=bg(e),p=!!e.backgroundColor,d=f.outerHeight,v=f.outerWidth,m=f.lines,g=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,_=sn(s,f.contentHeight,u);if(h||n){var x=Gn(o,v,l),b=sn(s,d,u);h&&this._renderBackground(e,e,x,b,v,d)}_+=g/2,n&&(y=Iw(o,l,n),u==="top"?_+=n[0]:u==="bottom"&&(_-=n[2]));for(var S=0,T=!1,A=!1,E=Ow("fill"in e?e.fill:(A=!0,a.fill)),M=Mw("stroke"in e?e.stroke:!p&&(!a.autoStroke||A)?(S=Cw,T=!0,a.stroke):null),O=e.textShadowBlur>0,L=0;L<m.length;L++){var I=this._getOrCreateChild(Eu),k=I.createStyle();I.useStyle(k),k.text=m[L],k.x=y,k.y=_,l&&(k.textAlign=l),k.textBaseline="middle",k.opacity=e.opacity,k.strokeFirst=!0,O&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||"transparent",k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=M,k.fill=E,M&&(k.lineWidth=e.lineWidth||S,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=i,Dw(k,e),_+=g,I.setBoundingRect(nh(k,f.contentWidth,f.calculatedLineHeight,T?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,i=this._defaultStyle,n=e.align||i.align,a=e.verticalAlign||i.verticalAlign,o=e.x||0,s=e.y||0;ag(zi,i.overflowRect,o,s,n,a),o=zi.baseX,s=zi.baseY;var l=Lw(e),u=nw(l,e,zi.outerWidth,zi.outerHeight,n),c=u.width,f=u.outerWidth,h=u.outerHeight,p=e.padding;this.isTruncated=!!u.isTruncated;var d=Gn(o,f,n),v=sn(s,h,a),m=d,g=v;p&&(m+=p[3],g+=p[0]);var y=m+c;bg(e)&&this._renderBackground(e,e,d,v,f,h);for(var _=!!e.backgroundColor,x=0;x<u.lines.length;x++){for(var b=u.lines[x],S=b.tokens,T=S.length,A=b.lineHeight,E=b.width,M=0,O=m,L=y,I=T-1,k=void 0;M<T&&(k=S[M],!k.align||k.align==="left");)this._placeToken(k,e,A,g,O,"left",_),E-=k.width,O+=k.width,M++;for(;I>=0&&(k=S[I],k.align==="right");)this._placeToken(k,e,A,g,L,"right",_),E-=k.width,L-=k.width,I--;for(O+=(c-(O-m)-(y-L)-E)/2;M<=I;)k=S[M],this._placeToken(k,e,A,g,O+k.width/2,"center",_),O+=k.width,M++;g+=A}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,f=a+n/2;c==="top"?f=a+e.height/2:c==="bottom"&&(f=a+n-e.height/2);var h=!e.isLineHolder&&bg(u);h&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,f-e.height/2,e.width,e.height);var p=!!u.backgroundColor,d=e.textPadding;d&&(o=Iw(o,s,d),f-=e.height/2-d[0]-e.innerHeight/2);var v=this._getOrCreateChild(Eu),m=v.createStyle();v.useStyle(m);var g=this._defaultStyle,y=!1,_=0,x=!1,b=Ow("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,g.fill)),S=Mw("stroke"in u?u.stroke:"stroke"in i?i.stroke:!p&&!l&&(!g.autoStroke||y)?(_=Cw,x=!0,g.stroke):null),T=u.textShadowBlur>0||i.textShadowBlur>0;m.text=e.text,m.x=o,m.y=f,T&&(m.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,m.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=e.font||Br,m.opacity=zr(u.opacity,i.opacity,1),Dw(m,u),S&&(m.lineWidth=zr(u.lineWidth,i.lineWidth,_),m.lineDash=Z(u.lineDash,i.lineDash),m.lineDashOffset=i.lineDashOffset||0,m.stroke=S),b&&(m.fill=b),v.setBoundingRect(nh(m,e.contentWidth,e.contentHeight,x?0:null))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,f=l&&l.image,h=l&&!f,p=e.borderRadius,d=this,v,m;if(h||e.lineHeight||u&&c){v=this._getOrCreateChild(Oe),v.useStyle(v.createStyle()),v.style.fill=null;var g=v.shape;g.x=n,g.y=a,g.width=o,g.height=s,g.r=p,v.dirtyShape()}if(h){var y=v.style;y.fill=l||null,y.fillOpacity=Z(e.fillOpacity,1)}else if(f){m=this._getOrCreateChild(ur),m.onload=function(){d.dirtyStyle()};var _=m.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Z(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(v||m).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=zr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return Dk(e)&&(i=[e.fontStyle,e.fontWeight,Ak(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Dt(i)||e.textFont||e.font},t})(ki),Tk={left:!0,right:1,center:1},Ck={top:1,bottom:1,middle:1},Aw=["fontStyle","fontWeight","fontSize","fontFamily"];function Ak(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?mf+"px":r+"px"}function Dw(r,t){for(var e=0;e<Aw.length;e++){var i=Aw[e],n=t[i];n!=null&&(r[i]=n)}}function Dk(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Ek(r){return Ew(r),w(r.rich,Ew),r}function Ew(r){if(r){r.font=Pw.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||Tk[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||Ck[e]?e:"top";var i=r.padding;i&&(r.padding=wa(r.padding))}}function Mw(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Ow(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Iw(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Lw(r){var t=r.text;return t!=null&&(t+=""),t}function bg(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var He=Pw;var _e=re(),Nw=function(r,t,e,i){if(i){var n=_e(i);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=_e(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}};var Jn="undefined",ch="series",fh=Y(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),At="original",yt="arrayRows",jt="objectRows",Er="keyedColumns",Mr="typedArray",Sg="unknown",Or="column",Vi="row";var Mk=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Ok=(function(){function r(t){w(Mk,function(e){this[e]=ee(t[e],t)},this)}return r})();function kw(r,t){return t.mainType===ch?r.getViewOfSeriesModel(t):r.getViewOfComponentModel(t)}var hh=Ok;var Rw=1,Fw={},Hw=re(),Cg=re(),Ag=0,Mu=1,Ou=2,Jt=["emphasis","blur","select"],Dg=["normal","emphasis","blur","select"],Ik=10,Lk=9,Qn="highlight",Iu="downplay",Lu="select",dh="unselect",Pu="toggleSelect",vh="selectchanged";function ws(r){return r!=null&&r!=="none"}function mh(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function Gw(r){mh(r,"emphasis",Ou)}function Yw(r){r.hoverState===Ou&&mh(r,"normal",Ag)}function Eg(r){mh(r,"blur",Mu)}function Ww(r){r.hoverState===Mu&&mh(r,"normal",Ag)}function Pk(r){r.selected=!0}function Nk(r){r.selected=!1}function Bw(r,t,e){t(r,e)}function pn(r,t,e){Bw(r,t,e),r.isGroup&&r.traverse(function(i){Bw(i,t,e)})}function Mg(r,t){switch(t){case"emphasis":r.hoverState=Ou;break;case"normal":r.hoverState=Ag;break;case"blur":r.hoverState=Mu;break;case"select":r.selected=!0}}function kk(r,t,e,i){for(var n=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=n[s];a[s]=l??(i&&i[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function Rk(r,t,e,i){var n=e&&ce(e,"select")>=0,a=!1;if(r instanceof ve){var o=Hw(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ws(s)||ws(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=B({},i),u=B({},u),u.fill=s):!ws(u.fill)&&ws(s)?(a=!0,i=B({},i),u=B({},u),u.fill=Ff(s)):!ws(u.stroke)&&ws(l)&&(a||(i=B({},i),u=B({},u)),u.stroke=Ff(l)),i.style=u}}if(i&&i.z2==null){a||(i=B({},i));var c=r.z2EmphasisLift;i.z2=r.z2+(c??Ik)}return i}function Fk(r,t,e){if(e&&e.z2==null){e=B({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??Lk)}return e}function Bk(r,t,e){var i=ce(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:kk(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:i?n:a.opacity*.1},o),e.style=o),e}function wg(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Rk(this,r,t,e);if(r==="blur")return Bk(this,r,e);if(r==="select")return Fk(this,r,e)}return e}function zk(r){r.stateProxy=wg;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=wg),e&&(e.stateProxy=wg)}function zw(r,t){!Zw(r,t)&&!r.__highByOuter&&pn(r,Gw)}function Vw(r,t){!Zw(r,t)&&!r.__highByOuter&&pn(r,Yw)}function dn(r,t){r.__highByOuter|=1<<(t||0),pn(r,Gw)}function vn(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&pn(r,Yw)}function gh(r){pn(r,Eg)}function Nu(r){pn(r,Ww)}function Og(r){pn(r,Pk)}function Ig(r){pn(r,Nk)}function Zw(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Lg(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=Cg(a),s=kw(r,a),l=n==="series";!l&&i.push(s),o.isBlured&&(s.group.traverse(function(u){Ww(u)}),l&&e.push(a)),o.isBlured=!1}),w(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Tg(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&Nu(h)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(e==="series"&&!c||e==="coordinateSystem"&&!h||t==="series"&&c)){var p=i.getViewOfSeriesModel(u);if(p.group.traverse(function(m){m.__highByOuter&&c&&t==="self"||Eg(m)}),ct(t))a(u.getData(),t);else if(W(t))for(var d=De(t),v=0;v<d.length;v++)a(u.getData(d[v]),t[d[v]]);l.push(u),Cg(u).isBlured=!0}}),n.eachComponent(function(u,c){if(u!=="series"){var f=i.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,n)}})}}function ph(r,t,e){if(!(r==null||t==null)){var i=e.getModel().getComponent(r,t);if(i){Cg(i).isBlured=!0;var n=e.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){Eg(a)})}}}function Xw(r,t,e){var i=r.seriesIndex,n=r.getData(t.dataType);if(n){var a=Zr(n,t);a=(F(a)?a[0]:a)||0;var o=n.getItemGraphicEl(a);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=_e(o);Tg(i,u.focus,u.blurScope,e)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&Tg(i,c,f,e)}}}function yh(r,t,e,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var a=i.getModel().getComponent(r,t);if(!a)return n;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(_e(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Kw(r,t,e){var i=_e(r),n=yh(i.componentMainType,i.componentIndex,i.componentHighDownName,e),a=n.dispatchers,o=n.focusSelf;a?(o&&ph(i.componentMainType,i.componentIndex,e),w(a,function(s){return zw(s,t)})):(Tg(i.seriesIndex,i.focus,i.blurScope,e),i.focus==="self"&&ph(i.componentMainType,i.componentIndex,e),zw(r,t))}function qw(r,t,e){Lg(e);var i=_e(r),n=yh(i.componentMainType,i.componentIndex,i.componentHighDownName,e).dispatchers;n?w(n,function(a){return Vw(a,t)}):Vw(r,t)}function $w(r,t,e){if(_h(t)){var i=t.dataType,n=r.getData(i),a=Zr(n,t);F(a)||(a=[a]),r[t.type===Pu?"toggleSelect":t.type===Lu?"select":"unselect"](a,i)}}function Pg(r){var t=r.getAllData();w(t,function(e){var i=e.data,n=e.type;i.eachItemGraphicEl(function(a,o){r.isSelected(o,n)?Og(a):Ig(a)})})}function jw(r){var t=[];return r.eachSeries(function(e){var i=e.getAllData();w(i,function(n){var a=n.data,o=n.type,s=e.getSelectedDataIndices();if(s.length>0){var l={dataIndex:s,seriesIndex:e.seriesIndex};o!=null&&(l.dataType=o),t.push(l)}})}),t}function ea(r,t,e){Jw(r,!0),pn(r,zk),Uk(r,t,e)}function Vk(r){Jw(r,!1)}function vi(r,t,e,i){i?Vk(r):ea(r,t,e)}function Uk(r,t,e){var i=_e(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var Uw=["emphasis","blur","select"],Hk={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function eo(r,t,e,i){e=e||"itemStyle";for(var n=0;n<Uw.length;n++){var a=Uw[n],o=t.getModel([a,e]),s=r.ensureState(a);s.style=i?i(o):o[Hk[e]]()}}function Jw(r,t){var e=t===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function ku(r){return!!(r&&r.__highDownDispatcher)}function Qw(r){var t=Fw[r];return t==null&&Rw<=32&&(t=Fw[r]=Rw++),t}function _h(r){var t=r.type;return t===Lu||t===dh||t===Pu}function Ng(r){var t=r.type;return t===Qn||t===Iu}function eT(r){var t=Hw(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var ot={};Sr(ot,{Arc:()=>ao,BezierCurve:()=>no,BoundingRect:()=>ue,Circle:()=>to,CompoundPath:()=>Th,Ellipse:()=>Fu,Group:()=>Ee,HOVER_LAYER_FOR_INCREMENTAL:()=>co,HOVER_LAYER_FROM_THRESHOLD:()=>Xg,HOVER_LAYER_NO:()=>Zg,Image:()=>ur,IncrementalDisplayable:()=>Ih,Line:()=>Qt,LinearGradient:()=>As,OrientedBoundingRect:()=>Oh,Path:()=>ve,Point:()=>ke,Polygon:()=>Gi,Polyline:()=>io,RadialGradient:()=>Ah,Rect:()=>Oe,Ring:()=>Vu,Sector:()=>Hi,Text:()=>He,WH:()=>uo,XY:()=>mn,applyTransform:()=>ho,calcZ2Range:()=>CR,clipPointsByRect:()=>ey,clipRectByRect:()=>ty,createIcon:()=>po,decomposeTransform:()=>DR,ensureCopyRect:()=>Ps,ensureCopyTransform:()=>Rh,expandOrShrinkRect:()=>Is,extendPath:()=>qg,extendShape:()=>Kg,getCurrentCanvasPainter:()=>ER,getShapeClass:()=>$g,getTransform:()=>Gu,groupTransition:()=>Qg,initProps:()=>Ot,isBoundingRectAxisAligned:()=>kh,isElementRemoved:()=>lo,lineLineIntersect:()=>LT,linePolygonIntersect:()=>wR,makeImage:()=>Hu,makePath:()=>Os,mergePath:()=>jg,payloadDisableAnimation:()=>AR,registerShape:()=>Ir,removeElement:()=>Es,removeElementWithFadeOut:()=>Ms,resizePath:()=>Nh,retrieveZInfo:()=>Yi,setTooltipConfig:()=>Ls,subPixelOptimize:()=>bR,subPixelOptimizeLine:()=>fo,subPixelOptimizeRect:()=>xR,transformDirection:()=>Jg,traverseElements:()=>gn,traverseUpdateZ:()=>Yu,updateProps:()=>Ke});var Ts=Dr.CMD,Gk=[[],[],[]],tT=Math.sqrt,Yk=Math.atan2;function kg(r,t){if(t){var e=r.data,i=r.len(),n,a,o,s,l,u,c=Ts.M,f=Ts.C,h=Ts.L,p=Ts.R,d=Ts.A,v=Ts.Q;for(o=0,s=0;o<i;){switch(n=e[o++],s=o,a=0,n){case c:a=1;break;case h:a=1;break;case f:a=3;break;case v:a=2;break;case d:var m=t[4],g=t[5],y=tT(t[0]*t[0]+t[1]*t[1]),_=tT(t[2]*t[2]+t[3]*t[3]),x=Yk(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=m,e[o]*=_,e[o++]+=g,e[o++]*=y,e[o++]*=_,e[o++]+=x,e[o++]+=x,o+=2,s=o;break;case p:u[0]=e[o++],u[1]=e[o++],ht(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],ht(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=Gk[l];b[0]=e[o++],b[1]=e[o++],ht(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var Rg=Math.sqrt,xh=Math.sin,bh=Math.cos,Ru=Math.PI;function rT(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Fg(r,t){return(r[0]*t[0]+r[1]*t[1])/(rT(r)*rT(t))}function iT(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Fg(r,t))}function nT(r,t,e,i,n,a,o,s,l,u,c){var f=l*(Ru/180),h=bh(f)*(r-e)/2+xh(f)*(t-i)/2,p=-1*xh(f)*(r-e)/2+bh(f)*(t-i)/2,d=h*h/(o*o)+p*p/(s*s);d>1&&(o*=Rg(d),s*=Rg(d));var v=(n===a?-1:1)*Rg((o*o*(s*s)-o*o*(p*p)-s*s*(h*h))/(o*o*(p*p)+s*s*(h*h)))||0,m=v*o*p/s,g=v*-s*h/o,y=(r+e)/2+bh(f)*m-xh(f)*g,_=(t+i)/2+xh(f)*m+bh(f)*g,x=iT([1,0],[(h-m)/o,(p-g)/s]),b=[(h-m)/o,(p-g)/s],S=[(-1*h-m)/o,(-1*p-g)/s],T=iT(b,S);if(Fg(b,S)<=-1&&(T=Ru),Fg(b,S)>=1&&(T=0),T<0){var A=Math.round(T/Ru*1e6)/1e6;T=Ru*2+A%2*Ru}c.addData(u,y,_,o,s,x,T,f,a)}var Wk=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Zk=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Xk(r){var t=new Dr;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Dr.CMD,l=r.match(Wk);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,p=c.match(Zk)||[],d=p.length,v=0;v<d;v++)p[v]=parseFloat(p[v]);for(var m=0;m<d;){var g=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0,A=e,E=i,M=void 0,O=void 0;switch(f){case"l":e+=p[m++],i+=p[m++],h=s.L,t.addData(h,e,i);break;case"L":e=p[m++],i=p[m++],h=s.L,t.addData(h,e,i);break;case"m":e+=p[m++],i+=p[m++],h=s.M,t.addData(h,e,i),n=e,a=i,f="l";break;case"M":e=p[m++],i=p[m++],h=s.M,t.addData(h,e,i),n=e,a=i,f="L";break;case"h":e+=p[m++],h=s.L,t.addData(h,e,i);break;case"H":e=p[m++],h=s.L,t.addData(h,e,i);break;case"v":i+=p[m++],h=s.L,t.addData(h,e,i);break;case"V":i=p[m++],h=s.L,t.addData(h,e,i);break;case"C":h=s.C,t.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),e=p[m-2],i=p[m-1];break;case"c":h=s.C,t.addData(h,p[m++]+e,p[m++]+i,p[m++]+e,p[m++]+i,p[m++]+e,p[m++]+i),e+=p[m-2],i+=p[m-1];break;case"S":g=e,y=i,M=t.len(),O=t.data,o===s.C&&(g+=e-O[M-4],y+=i-O[M-3]),h=s.C,A=p[m++],E=p[m++],e=p[m++],i=p[m++],t.addData(h,g,y,A,E,e,i);break;case"s":g=e,y=i,M=t.len(),O=t.data,o===s.C&&(g+=e-O[M-4],y+=i-O[M-3]),h=s.C,A=e+p[m++],E=i+p[m++],e+=p[m++],i+=p[m++],t.addData(h,g,y,A,E,e,i);break;case"Q":A=p[m++],E=p[m++],e=p[m++],i=p[m++],h=s.Q,t.addData(h,A,E,e,i);break;case"q":A=p[m++]+e,E=p[m++]+i,e+=p[m++],i+=p[m++],h=s.Q,t.addData(h,A,E,e,i);break;case"T":g=e,y=i,M=t.len(),O=t.data,o===s.Q&&(g+=e-O[M-4],y+=i-O[M-3]),e=p[m++],i=p[m++],h=s.Q,t.addData(h,g,y,e,i);break;case"t":g=e,y=i,M=t.len(),O=t.data,o===s.Q&&(g+=e-O[M-4],y+=i-O[M-3]),e+=p[m++],i+=p[m++],h=s.Q,t.addData(h,g,y,e,i);break;case"A":_=p[m++],x=p[m++],b=p[m++],S=p[m++],T=p[m++],A=e,E=i,e=p[m++],i=p[m++],h=s.A,nT(A,E,e,i,S,T,_,x,b,h,t);break;case"a":_=p[m++],x=p[m++],b=p[m++],S=p[m++],T=p[m++],A=e,E=i,e+=p[m++],i+=p[m++],h=s.A,nT(A,E,e,i,S,T,_,x,b,h,t);break}}(f==="z"||f==="Z")&&(h=s.Z,t.addData(h),e=n,i=a),o=h}return t.toStatic(),t}var aT=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(ve);function oT(r){return r.setData!=null}function sT(r,t){var e=Xk(r),i=B({},t);return i.buildPath=function(n){var a=oT(n);if(a&&n.canSave()){n.appendPath(e);var o=n.getContext();o&&n.rebuildPath(o,1)}else{var o=a?n.getContext():n;o&&e.rebuildPath(o,1)}},i.applyTransform=function(n){kg(e,n),this.dirtyShape()},i}function lT(r,t){return new aT(sT(r,t))}function uT(r,t){var e=sT(r,t),i=(function(n){N(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})(aT);return i}function cT(r,t){for(var e=[],i=r.length,n=0;n<i;n++){var a=r[n];e.push(a.getUpdatedPathProxy(!0))}var o=new ve(t);return o.createPathProxy(),o.buildPath=function(s){if(oT(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var qk=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})();var fT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new qk},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t})(ve);fT.prototype.type="circle";var to=fT;var $k=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})();var hT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new $k},t.prototype.buildPath=function(e,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*n,c=l*n;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),e.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),e.closePath()},t})(ve);hT.prototype.type="ellipse";var Fu=hT;var dT=Math.PI,Bg=dT*2,ro=Math.sin,Cs=Math.cos,jk=Math.acos,Ut=Math.atan2,pT=Math.abs,zu=Math.sqrt,Bu=Math.max,Ui=Math.min,mi=1e-4;function Jk(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,c=o-n,f=s-a,h=f*l-c*u;if(!(h*h<mi))return h=(c*(t-a)-f*(r-n))/h,[r+h*l,t+h*u]}function Sh(r,t,e,i,n,a,o){var s=r-e,l=t-i,u=(o?a:-a)/zu(s*s+l*l),c=u*l,f=-u*s,h=r+c,p=t+f,d=e+c,v=i+f,m=(h+d)/2,g=(p+v)/2,y=d-h,_=v-p,x=y*y+_*_,b=n-a,S=h*v-d*p,T=(_<0?-1:1)*zu(Bu(0,b*b*x-S*S)),A=(S*_-y*T)/x,E=(-S*y-_*T)/x,M=(S*_+y*T)/x,O=(-S*y+_*T)/x,L=A-m,I=E-g,k=M-m,z=O-g;return L*L+I*I>k*k+z*z&&(A=M,E=O),{cx:A,cy:E,x0:-c,y0:-f,x1:A*(n/b-1),y1:E*(n/b-1)}}function Qk(r){var t;if(F(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function vT(r,t){var e,i=Bu(t.r,0),n=Bu(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,p=pT(u-l),d=p>Bg&&p%Bg;if(d>mi&&(p=d),!(i>mi))r.moveTo(c,f);else if(p>Bg-mi)r.moveTo(c+i*Cs(l),f+i*ro(l)),r.arc(c,f,i,l,u,!h),n>mi&&(r.moveTo(c+n*Cs(u),f+n*ro(u)),r.arc(c,f,n,u,l,h));else{var v=void 0,m=void 0,g=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0,A=void 0,E=void 0,M=void 0,O=void 0,L=void 0,I=void 0,k=void 0,z=i*Cs(l),V=i*ro(l),q=n*Cs(u),G=n*ro(u),$=p>mi;if($){var oe=t.cornerRadius;oe&&(e=Qk(oe),v=e[0],m=e[1],g=e[2],y=e[3]);var ie=pT(i-n)/2;if(_=Ui(ie,g),x=Ui(ie,y),b=Ui(ie,v),S=Ui(ie,m),E=T=Bu(_,x),M=A=Bu(b,S),(T>mi||A>mi)&&(O=i*Cs(u),L=i*ro(u),I=n*Cs(l),k=n*ro(l),p<dT)){var pe=Jk(z,V,I,k,O,L,q,G);if(pe){var de=z-pe[0],te=V-pe[1],Te=O-pe[0],Pe=L-pe[1],vt=1/ro(jk((de*Te+te*Pe)/(zu(de*de+te*te)*zu(Te*Te+Pe*Pe)))/2),bt=zu(pe[0]*pe[0]+pe[1]*pe[1]);E=Ui(T,(i-bt)/(vt+1)),M=Ui(A,(n-bt)/(vt-1))}}}if(!$)r.moveTo(c+z,f+V);else if(E>mi){var ze=Ui(g,E),ut=Ui(y,E),Ce=Sh(I,k,z,V,i,ze,h),Ie=Sh(O,L,q,G,i,ut,h);r.moveTo(c+Ce.cx+Ce.x0,f+Ce.cy+Ce.y0),E<T&&ze===ut?r.arc(c+Ce.cx,f+Ce.cy,E,Ut(Ce.y0,Ce.x0),Ut(Ie.y0,Ie.x0),!h):(ze>0&&r.arc(c+Ce.cx,f+Ce.cy,ze,Ut(Ce.y0,Ce.x0),Ut(Ce.y1,Ce.x1),!h),r.arc(c,f,i,Ut(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Ut(Ie.cy+Ie.y1,Ie.cx+Ie.x1),!h),ut>0&&r.arc(c+Ie.cx,f+Ie.cy,ut,Ut(Ie.y1,Ie.x1),Ut(Ie.y0,Ie.x0),!h))}else r.moveTo(c+z,f+V),r.arc(c,f,i,l,u,!h);if(!(n>mi)||!$)r.lineTo(c+q,f+G);else if(M>mi){var ze=Ui(v,M),ut=Ui(m,M),Ce=Sh(q,G,O,L,n,-ut,h),Ie=Sh(z,V,I,k,n,-ze,h);r.lineTo(c+Ce.cx+Ce.x0,f+Ce.cy+Ce.y0),M<A&&ze===ut?r.arc(c+Ce.cx,f+Ce.cy,M,Ut(Ce.y0,Ce.x0),Ut(Ie.y0,Ie.x0),!h):(ut>0&&r.arc(c+Ce.cx,f+Ce.cy,ut,Ut(Ce.y0,Ce.x0),Ut(Ce.y1,Ce.x1),!h),r.arc(c,f,n,Ut(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Ut(Ie.cy+Ie.y1,Ie.cx+Ie.x1),h),ze>0&&r.arc(c+Ie.cx,f+Ie.cy,ze,Ut(Ie.y1,Ie.x1),Ut(Ie.y0,Ie.x0),!h))}else r.lineTo(c+q,f+G),r.arc(c,f,n,u,l,h)}r.closePath()}}}var tR=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})();var mT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new tR},t.prototype.buildPath=function(e,i){vT(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(ve);mT.prototype.type="sector";var Hi=mT;var rR=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})();var gT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new rR},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t})(ve);gT.prototype.type="ring";var Vu=gT;function zg(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,c,f;if(i){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,p=r.length;h<p;h++)Vr(c,c,r[h]),Ur(f,f,r[h]);Vr(c,c,i[0]),Ur(f,f,i[1])}for(var h=0,p=r.length;h<p;h++){var d=r[h];if(e)l=r[h?h-1:p-1],u=r[(h+1)%p];else if(h===0||h===p-1){n.push(Kv(r[h]));continue}else l=r[h-1],u=r[h+1];$l(a,u,l),jl(a,a,t);var v=Jl(d,l),m=Jl(d,u),g=v+m;g!==0&&(v/=g,m/=g),jl(o,a,-v),jl(s,a,m);var y=xf([],d,o),_=xf([],d,s);i&&(Ur(y,y,c),Vr(y,y,f),Ur(_,_,c),Vr(_,_,f)),n.push(y),n.push(_)}return e&&n.push(n.shift()),n}function wh(r,t,e){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=zg(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,f=n.length;s<f;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var iR=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})();var _T=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new iR},t.prototype.buildPath=function(e,i){wh(e,i,!0)},t})(ve);_T.prototype.type="polygon";var Gi=_T;var nR=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})();var xT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nR},t.prototype.buildPath=function(e,i){wh(e,i,!1)},t})(ve);xT.prototype.type="polyline";var io=xT;var aR={},oR=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();var bT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new oR},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=lh(aR,i,this.style);n=l.x1,a=l.y1,o=l.x2,s=l.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(n,a),u<1&&(o=n*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var i=this.shape;return[i.x1*(1-e)+i.x2*e,i.y1*(1-e)+i.y2*e]},t})(ve);bT.prototype.type="line";var Qt=bT;var cr=[],sR=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function ST(r,t,e){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(e?vm:Je)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?vm:Je)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?mm:Tt)(r.x1,r.cpx1,r.x2,t),(e?mm:Tt)(r.y1,r.cpy1,r.y2,t)]}var wT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new sR},t.prototype.buildPath=function(e,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,f=i.cpy2,h=i.percent;h!==0&&(e.moveTo(n,a),c==null||f==null?(h<1&&(is(n,l,o,h,cr),l=cr[1],o=cr[2],is(a,u,s,h,cr),u=cr[1],s=cr[2]),e.quadraticCurveTo(l,u,o,s)):(h<1&&(rs(n,l,c,o,h,cr),l=cr[1],c=cr[2],o=cr[3],rs(a,u,f,s,h,cr),u=cr[1],f=cr[2],s=cr[3]),e.bezierCurveTo(l,u,c,f,o,s)))},t.prototype.pointAt=function(e){return ST(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=ST(this.shape,e,!0);return Ca(i,i)},t})(ve);wT.prototype.type="bezier-curve";var no=wT;var lR=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})();var TT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new lR},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(s),f=Math.sin(s);e.moveTo(c*o+n,f*o+a),e.arc(n,a,o,s,l,!u)},t})(ve);TT.prototype.type="arc";var ao=TT;var uR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),n=0;n<e.length;n++)i=i||e[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(i[0],i[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(e,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],i=0;i<e.length;i++)e[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ve.prototype.getBoundingRect.call(this)},t})(ve),Th=uR;var cR=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),Ch=cR;var fR=(function(r){N(t,r);function t(e,i,n,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(Ch),As=fR;var hR=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t})(Ch),Ah=hR;var Vg=Math.min,pR=Math.max,Dh=Math.abs,oo=[0,0],so=[0,0],Mt=cm(),Eh=Mt.minTv,Mh=Mt.maxTv,dR=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ke;for(var i=0;i<2;i++)this._axes[i]=new ke;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),e)for(var u=0;u<4;u++)i[u].transform(e);ke.sub(n[0],i[1],i[0]),ke.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(t,e,i){var n=!0,a=!e;return e&&ke.set(e,0,0),Mt.reset(i,!a),!this._intersectCheckOneSide(this,t,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(n=!1,a)||!a&&!Mt.negativeSize&&ke.copy(e,n?Mt.useDir?Mt.dirMinTv:Eh:Mh),n},r.prototype._intersectCheckOneSide=function(t,e,i,n){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,oo),t._getProjMinMaxOnAxis(o,e._corners,so),Mt.negativeSize||oo[1]<so[0]||oo[0]>so[1]){if(a=!1,Mt.negativeSize||i)return a;var l=Dh(so[0]-oo[1]),u=Dh(oo[0]-so[1]);Vg(l,u)>Mh.len()&&(l<u?ke.scale(Mh,s,-l*n):ke.scale(Mh,s,u*n))}else if(!i){var l=Dh(so[0]-oo[1]),u=Dh(oo[0]-so[1]);(Mt.useDir||Vg(l,u)<Eh.len())&&((l<u||!Mt.bidirectional)&&(ke.scale(Eh,s,l*n),Mt.useDir&&Mt.calcDirMTV()),(l>=u||!Mt.bidirectional)&&(ke.scale(Eh,s,-u*n),Mt.useDir&&Mt.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u<e.length;u++){var c=e[u].dot(n)+a[t];s=Vg(c,s),l=pR(c,l)}i[0]=s+Mt.touchThreshold,i[1]=l-Mt.touchThreshold,Mt.negativeSize=i[1]<i[0]},r})(),Oh=dR;var Ug=0,CT=1,AT=2,DT=1,Ds=0;var vR=[],mR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=CT,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},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,i){i?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,i){i=i||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var i=this._cursor;i<this._displayables.length;i++)e&&e(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)e&&e(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.parent=this,i.update(),i.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ue(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(vR)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,i))return!0}return!1},t})(ki),Ih=mR;var gR=re();function yR(r,t,e,i,n){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;i?(u=Z(i.duration,200),c=Z(i.easing,"cubicOut"),f=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),f=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),j(f)&&(f=f(e,n)),j(u)&&(u=u(e));var h={duration:u||0,delay:f,easing:c};return h}else return null}function Hg(r,t,e,i,n,a,o){var s=!1,l;j(n)?(o=a,a=n,n=null):W(n)&&(a=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var c=yR(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,n):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,p=c.easing,d={duration:f,delay:h||0,easing:p,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Ke(r,t,e,i,n,a){Hg("update",r,t,e,i,n,a)}function Ot(r,t,e,i,n,a){Hg("enter",r,t,e,i,n,a)}function lo(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function Es(r,t,e,i,n,a){lo(r)||Hg("leave",r,t,e,i,n,a)}function ET(r,t,e,i){r.removeTextContent(),r.removeTextGuideLine(),Es(r,{style:{opacity:0}},t,e,i)}function Ms(r,t,e){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||ET(n,t,e,i)}):ET(r,t,e,i)}function Lh(r){gR(r).oldStyle=r.style}var Yg={},mn=["x","y"],uo=["width","height"],Zg=0,Xg=1,co=2;function Kg(r){return ve.extend(r)}var _R=uT;function qg(r,t){return _R(r,t)}function Ir(r,t){Yg[r]=t}function $g(r){if(Yg.hasOwnProperty(r))return Yg[r]}function Os(r,t,e,i){var n=lT(r,t);return e&&(i==="center"&&(e=IT(e,n.getBoundingRect())),Nh(n,e)),n}function Hu(r,t,e){var i=new ur({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var a={width:n.width,height:n.height};i.setStyle(IT(t,a))}}});return i}function IT(r,t){var e=t.width/t.height,i=r.height*e,n;i<=r.width?n=r.height:(i=r.width,n=i/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-i/2,y:o-n/2,width:i,height:n}}var jg=cT;function Nh(r,t){if(r.applyTransform){var e=r.getBoundingRect(),i=e.calculateTransform(t);r.applyTransform(i)}}function fo(r,t){return lh(r,r,{lineWidth:t}),r}function xR(r,t){return uh(r,r,t),r}var bR=jn;function Gu(r,t){for(var e=Hr([]);r&&r!==t;)li(e,r.getLocalTransform(),e),r=r.parent;return e}function ho(r,t,e){return t&&!ct(t)&&(t=us.getLocalTransform(t)),e&&(t=Tr([],t)),ht([],r,t)}function Jg(r,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Ge(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:Ge(2*t[4]/t[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=ho(a,t,e),Ge(a[0])>Ge(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function MT(r){return!r.isGroup}function SR(r){return r.shape!=null}function Qg(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){MT(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return SR(o)&&(s.shape=ne(o.shape)),s}var a=i(r);t.traverse(function(o){if(MT(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Ke(o,l,e,_e(o).dataIndex)}}})}function ey(r,t){return U(r,function(e){var i=e[0];i=Se(i,t.x),i=Xe(i,t.x+t.width);var n=e[1];return n=Se(n,t.y),n=Xe(n,t.y+t.height),[i,n]})}function ty(r,t){var e=Se(r.x,t.x),i=Xe(r.x+r.width,t.x+t.width),n=Se(r.y,t.y),a=Xe(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function po(r,t,e){var i=B({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),he(n,e),new ur(i)):Os(r.replace("path://",""),i,e,"center")}function wR(r,t,e,i,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(LT(r,t,e,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function LT(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,c=o-n,f=s-a,h=Gg(c,f,l,u);if(TR(h))return!1;var p=r-n,d=t-a,v=Gg(p,d,l,u)/h;if(v<0||v>1)return!1;var m=Gg(p,d,c,f)/h;return!(m<0||m>1)}function Gg(r,t,e,i){return r*i-e*t}function TR(r){return r<=1e-6&&r>=-1e-6}function Is(r,t,e,i,n){return t==null||(ge(t)?qe[0]=qe[1]=qe[2]=qe[3]=t:(qe[0]=t[0],qe[1]=t[1],qe[2]=t[2],qe[3]=t[3]),i&&(qe[0]=Se(0,qe[0]),qe[1]=Se(0,qe[1]),qe[2]=Se(0,qe[2]),qe[3]=Se(0,qe[3])),e&&(qe[0]=-qe[0],qe[1]=-qe[1],qe[2]=-qe[2],qe[3]=-qe[3]),OT(r,qe,"x","width",3,1,n&&n[0]||0),OT(r,qe,"y","height",0,2,n&&n[1]||0)),r}var qe=[0,0,0,0];function OT(r,t,e,i,n,a,o){var s=t[a]+t[n],l=r[i];r[i]+=s,o=Se(0,Xe(o,l)),r[i]<o?(r[i]=o,r[e]+=t[n]>=0?-t[n]:t[a]>=0?l+t[a]:Ge(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function Ls(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=H(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&w(De(l),function(c){We(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=_e(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:he({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Wg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function gn(r,t){if(r)if(F(r))for(var e=0;e<r.length;e++)Wg(r[e],t);else Wg(r,t)}function kh(r){return!r||Ge(r[1])<Ph&&Ge(r[2])<Ph||Ge(r[0])<Ph&&Ge(r[3])<Ph}var Ph=1e-5;function Ps(r,t){return r?ue.copy(r,t):t.clone()}function Rh(r,t){return t?Aa(r||kt(),t):void 0}function Yi(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function CR(r){var t=-1/0,e=1/0;Wg(r,function(a){i(a),i(a.getTextContent()),i(a.getTextGuideLine())});function i(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)n(a.states[o[s]]);n(a)}}function n(a){if(a){var o=a.z2;o>t&&(t=o),o<e&&(e=o)}}return e>t&&(e=t=0),{min:e,max:t}}function Yu(r,t,e){PT(r,t,e,-1/0)}function PT(r,t,e,i){if(r.ignoreModelZ)return i;var n=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)i=Se(PT(s[l],t,e,i),i);else r.z=t,r.zlevel=e,i=Se(r.z2||0,i);if(n&&(n.z=t,n.zlevel=e,isFinite(i)&&(n.z2=i+2)),a){var u=r.textGuideLineConfig;a.z=t,a.zlevel=e,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function AR(r){return r.animation={duration:0},r}function DR(r,t){return t?Aa(Uu.transform,t):Hr(Uu.transform),Uu.decomposeTransform(),ls(r,Uu),r}var Uu=new us;Uu.transform=kt();function ER(r){var t=r.getZr().painter;return t.getType()==="canvas"?t:null}Ir("circle",to);Ir("ellipse",Fu);Ir("sector",Hi);Ir("ring",Vu);Ir("polygon",Gi);Ir("polyline",io);Ir("rect",Oe);Ir("line",Qt);Ir("bezierCurve",no);Ir("arc",ao);var Fh={};function MR(r,t){for(var e=0;e<Jt.length;e++){var i=Jt[e],n=t[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function NT(r,t,e){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=j(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<Jt.length;u++){var c=Jt[u],f=t[c];l[c]=Z(i?i.getFormattedLabel(n,c,null,a,f&&f.get("formatter")):null,s)}return l}function jr(r,t,e,i){e=e||Fh;for(var n=r instanceof He,a=!1,o=0;o<Dg.length;o++){var s=t[Dg[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new He,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=NT(e,t),c=t.normal,f=!!c.getShallow("show"),h=Lr(c,i&&i.normal,e,!1,!n);h.text=u.normal,n||r.setTextConfig(kT(c,e,!1));for(var o=0;o<Jt.length;o++){var p=Jt[o],s=t[p];if(s){var d=l.ensureState(p),v=!!Z(s.getShallow("show"),f);if(v!==f&&(d.ignore=!v),d.style=Lr(s,i&&i[p],e,!0,!n),d.style.text=u[p],!n){var m=r.ensureState(p);m.textConfig=kT(s,e,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),e.enableTextSetter&&(Ns(l).setLabelText=function(g){var y=NT(e,t,g);MR(l,y)})}else l&&(l.ignore=!0);r.dirty()}function fr(r,t){t=t||"label";for(var e={normal:r.getModel(t)},i=0;i<Jt.length;i++){var n=Jt[i];e[n]=r.getModel([n,t])}return e}function Lr(r,t,e,i,n){var a={};return OR(a,r,e,i,n),t&&B(a,t),a}function kT(r,t,e){t=t||{};var i={},n,a=r.getShallow("rotate"),o=Z(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(i.position=n),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(i.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(i.layoutRect=t.layoutRect),i}function OR(r,t,e,i,n){e=e||Fh;var a=t.ecModel,o=a&&a.option.textStyle,s=IR(t),l;if(s){l={};var u="richInheritPlainLabel",c=Z(t.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var h=t.getModel(["rich",f]);zT(l[f]={},h,o,t,c,e,i,n,!1,!0)}}l&&(r.rich=l);var p=t.get("overflow");p&&(r.overflow=p);var d=t.get("lineOverflow");d&&(r.lineOverflow=d);var v=r,m=t.get("minMargin");if(m!=null)m=ge(m)?m/2:0,v.margin=[m,m,m,m],v.__marginType=vo.minMargin;else{var g=t.get("textMargin");g!=null&&(v.margin=wa(g),v.__marginType=vo.textMargin)}zT(r,t,o,null,null,e,i,n,!0,!1)}function IR(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Fh).rich;if(e){t=t||{};for(var i=De(e),n=0;n<i.length;n++){var a=i[n];t[a]=1}}r=r.parentModel}return t}var RT=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],FT=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],BT=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function zT(r,t,e,i,n,a,o,s,l,u){e=!o&&e||Fh;var c=a&&a.inheritColor,f=t.getShallow("color"),h=t.getShallow("textBorderColor"),p=Z(t.getShallow("opacity"),e.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(h==="inherit"||h==="auto")&&(c?h=c:h=null),s||(f=f||e.color,h=h||e.textBorderColor),f!=null&&(r.fill=f),h!=null&&(r.stroke=h);var d=Z(t.getShallow("textBorderWidth"),e.textBorderWidth);d!=null&&(r.lineWidth=d);var v=Z(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var m=Z(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);m!=null&&(r.lineDashOffset=m),!o&&p==null&&!u&&(p=a&&a.defaultOpacity),p!=null&&(r.opacity=p),!o&&!s&&r.fill==null&&a.inheritColor&&(r.fill=a.inheritColor);for(var g=0;g<RT.length;g++){var y=RT[g],_=n!==!1&&i?zr(t.getShallow(y),i.getShallow(y),e[y]):Z(t.getShallow(y),e[y]);_!=null&&(r[y]=_)}for(var g=0;g<FT.length;g++){var y=FT[g],_=t.getShallow(y);_!=null&&(r[y]=_)}if(r.verticalAlign==null){var x=t.getShallow("baseline");x!=null&&(r.verticalAlign=x)}if(!l||!a.disableBox){for(var g=0;g<BT.length;g++){var y=BT[g],_=t.getShallow(y);_!=null&&(r[y]=_)}var b=t.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function VT(r,t){var e=t&&t.getModel("textStyle");return Dt([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Ns=re();function UT(r,t,e,i){if(r){var n=Ns(r);n.prevValue=n.value,n.value=e;var a=t.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=t)}}var vo={minMargin:1,textMargin:2};var LR=["textStyle","color"],ry=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],iy=new He,PR=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(LR):null)},r.prototype.getFont=function(){return VT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<ry.length;i++)e[ry[i]]=this.getShallow(ry[i]);return iy.useStyle(e),iy.update(),iy.getBoundingRect()},r})(),HT=PR;var ny=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],NR=Pi(ny),GT=(function(){function r(){}return r.prototype.getLineStyle=function(t){return NR(this,t)},r})();var ay=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],kR=Pi(ay),YT=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return kR(this,t,e)},r})();var mo=(function(){function r(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return r.prototype.init=function(t,e,i){for(var n=[],a=3;a<arguments.length;a++)n[a-3]=arguments[a]},r.prototype.mergeOption=function(t,e){me(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var i=this.option,n=i==null?i:i[t];if(n==null&&!e){var a=this.parentModel;a&&(n=a.getShallow(t))}return n},r.prototype.getModel=function(t,e){var i=t!=null,n=i?this.parsePath(t):null,a=i?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(ne(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!fe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&!(t[n]&&(i=i&&typeof i=="object"?i[t[n]]:null,i==null));n++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},r})();xs(mo);XS(mo);mt(mo,GT);mt(mo,YT);mt(mo,KS);mt(mo,HT);var Re=mo;var RR=Math.round(Math.random()*10);function ta(r){return[r||"",RR++].join("_")}function WT(r){var t={};r.registerSubTypeDefaulter=function(e,i){var n=lr(e);t[n.main]=i},r.determineSubType=function(e,i){var n=i.type;if(!n){var a=lr(e).main;r.hasSubTypes(e)&&t[a]&&(n=t[a](i))}return n}}function ZT(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),c=u.graph,f=u.noEntryList,h={};for(w(a,function(y){h[y]=!0});f.length;){var p=f.pop(),d=c[p],v=!!h[p];v&&(s.call(l,p,d.originalDeps.slice()),delete h[p]),w(d.successor,v?g:m)}w(h,function(){var y="";throw new Error(y)});function m(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function g(y){h[y]=!0,m(y)}};function e(a){var o={},s=[];return w(a,function(l){var u=i(o,l),c=u.originalDeps=t(l),f=n(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),w(f,function(h){ce(u.predecessor,h)<0&&u.predecessor.push(h);var p=i(o,h);ce(p.successor,h)<0&&p.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function n(a,o){var s=[];return w(a,function(l){ce(o,l)>=0&&s.push(l)}),s}}function ra(r,t){return me(me({},r,!0),t,!0)}var XT={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:". "}}}};var KT={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 zh="ZH",sy="EN",ks=sy,Bh={},ly={},Vh=fe.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ks).toUpperCase();return r.indexOf(zh)>-1?zh:ks})():ks;function Uh(r,t){r=r.toUpperCase(),ly[r]=new Re(t),Bh[r]=t}function qT(r){if(H(r)){var t=Bh[r.toUpperCase()]||{};return r===zh||r===sy?ne(t):me(ne(t),ne(Bh[ks]),!1)}else return me(ne(r),ne(Bh[ks]),!1)}function $T(r){return ly[r]}function jT(){return ly[ks]}Uh(sy,XT);Uh(zh,KT);var FR=null;function it(){return FR}function Hh(r,t){var e=it(),i=t.breakOption,n=t.breakParsed;return!n&&e&&(n=e.parseAxisBreakOption(i,r)),n}function go(r){var t=r.brk;return t?t.breaks:[]}function yo(r){var t=r.brk;return t?t.hasBreaks():!1}var Wh=1e3,Zh=Wh*60,Rs=Zh*60,Pr=Rs*24,uy=Pr*365,BR={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Yh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},zR="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Gh="{yyyy}-{MM}-{dd}",cy={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gh,hour:Gh+" "+Yh.hour,minute:Gh+" "+Yh.minute,second:Gh+" "+Yh.second,millisecond:zR},hr=["year","month","day","hour","minute","second","millisecond"],JT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function QT(r){return!H(r)&&!j(r)?VR(r):r}function VR(r){r=r||{};var t={},e=!0;return w(hr,function(i){e&&(e=r[i]==null)}),w(hr,function(i,n){var a=r[i];t[i]={};for(var o=null,s=n;s>=0;s--){var l=hr[s],u=W(a)&&!F(a)?a[l]:a,c=void 0;F(u)?(c=u.slice(),o=c[0]||""):H(u)?(o=u,c=[o]):(o==null?o=Yh[i]:BR[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],e&&(c[1]="{primary|"+o+"}")),t[i][l]=c}}),t}function Ht(r,t){return r+="","0000".substr(0,t-r.length)+r}function Fs(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function eC(r){return r===Fs(r)}function tC(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function yn(r,t,e,i){var n=qt(r),a=n[fy(e)](),o=n[Xh(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[Kh(e)](),u=n["get"+(e?"UTC":"")+"Day"](),c=n[qh(e)](),f=(c-1)%12+1,h=n[$h(e)](),p=n[jh(e)](),d=n[Jh(e)](),v=c>=12?"pm":"am",m=v.toUpperCase(),g=i instanceof Re?i:$T(i||Vh)||jT(),y=g.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Ht(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Ht(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ht(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ht(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Ht(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Ht(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Ht(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Ht(d,3)).replace(/{S}/g,d+"")}function rC(r,t,e,i,n){var a=null;if(H(e))a=e;else if(j(e)){var o={time:r.time,level:r.time?r.time.level:0},s=it();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=_o(r.value,n);a=e[c][c][0]}}return yn(new Date(r.value),a,n,i)}function _o(r,t){var e=qt(r),i=e[Xh(t)]()+1,n=e[Kh(t)](),a=e[qh(t)](),o=e[$h(t)](),s=e[jh(t)](),l=e[Jh(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,p=h&&n===1,d=p&&i===1;return d?"year":p?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Bs(r,t,e){switch(t){case"year":r[hy(e)](0);case"month":r[py(e)](1);case"day":r[dy(e)](0);case"hour":r[vy(e)](0);case"minute":r[my(e)](0);case"second":r[gy(e)](0)}return r}function fy(r){return r?"getUTCFullYear":"getFullYear"}function Xh(r){return r?"getUTCMonth":"getMonth"}function Kh(r){return r?"getUTCDate":"getDate"}function qh(r){return r?"getUTCHours":"getHours"}function $h(r){return r?"getUTCMinutes":"getMinutes"}function jh(r){return r?"getUTCSeconds":"getSeconds"}function Jh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function iC(r){return r?"setUTCFullYear":"setFullYear"}function hy(r){return r?"setUTCMonth":"setMonth"}function py(r){return r?"setUTCDate":"setDate"}function dy(r){return r?"setUTCHours":"setHours"}function vy(r){return r?"setUTCMinutes":"setMinutes"}function my(r){return r?"setUTCSeconds":"setSeconds"}function gy(r){return r?"setUTCMilliseconds":"setMilliseconds"}function yy(r,t,e,i,n,a,o,s){var l=new He({style:{text:r,font:t,align:e,verticalAlign:i,padding:n,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Wu(r){if(!yu(r))return H(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function zs(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Wi=wa;function Qh(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&Dt(c)?c:"-"}function a(c){return gt(c)}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?qt(r):r;if(isNaN(+l)){if(s)return"-"}else return yn(l,i,e)}if(t==="ordinal")return jo(r)?n(r):ge(r)&&a(r)?r+"":"-";var u=Wr(r);return a(u)?Wu(u):jo(r)?n(r):typeof r=="boolean"?r+"":"-"}var nC=["a","b","c","d","e","f","g"],_y=function(r,t){return"{"+r+(t??"")+"}"};function Vs(r,t,e){F(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a<n.length;a++){var o=nC[a];r=r.replace(_y(o),_y(o,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(_y(nC[l],s),e?wt(u):u)}return r}function ep(r,t){var e=H(r)?{color:r,extraCssText:t}:r||{},i=e.color,n=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wt(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wt(i)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function aC(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
10
|
-
yyyy`);var i=qt(t),n=e?"getUTC":"get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),c=i[n+"Seconds"](),f=i[n+"Milliseconds"]();return r=r.replace("MM",Ht(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Ht(a%100+"",2)).replace("dd",Ht(s,2)).replace("d",s).replace("hh",Ht(l,2)).replace("h",l).replace("mm",Ht(u,2)).replace("m",u).replace("ss",Ht(c,2)).replace("s",c).replace("SSS",Ht(f,3)),r}function oC(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function gi(r,t){return t=t||"transparent",H(r)?r:W(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}var tp={},by={},UR=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=i(tp,!0),this._normalMasterList=i(by,!1);function i(n,a){var o=[];return w(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){w(this._normalMasterList,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){tp[t]=e;return}by[t]=e},r.get=function(t){return by[t]||tp[t]},r})();function HR(r){return!!tp[r]}var GR=1,sC=2;var YR=Y();function ip(r){var t=r.getShallow("coord",!0),e=GR;if(t==null){var i=YR.get(r.type);i&&i.getCoord2&&(e=sC,t=i.getCoord2(r))}return{coord:t,from:e}}var Us=0,rp=1,WR=2;function ZR(r,t){var e=r.getShallow("coordinateSystem"),i=r.getShallow("coordinateSystemUsage",!0),n=i!=null,a=Us;if(e){var o=r.mainType==="series";i==null&&(i=o?"data":"box"),i==="data"?(a=rp,o||(a=Us)):i==="box"&&(a=WR,!o&&!HR(e)&&(a=Us))}return{coordSysType:e,kind:a}}function lC(r){var t=r.targetModel,e=r.coordSysType,i=r.coordSysProvider,n=r.isDefaultDataCoordSys,a=r.allowNotFound,o=ZR(t,!0),s=o.kind,l=o.coordSysType;if(n&&s!==rp&&(s=rp,l=e),s===Us||l!==e)return Us;var u=i(e,t);return u?(s===rp?t.coordinateSystem=u:t.boxCoordinateSystem=u,s):Us}var Hs=UR;var op=w,XR=["left","right","top","bottom","width","height"],np=[["width","left","right"],["height","top","bottom"]];function Sy(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),p,d;if(r==="horizontal"){var v=c.width+(h?-h.x+c.x:0);p=a+v,p>i||l.newline?(a=0,p=v,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);d=o+m,d>n||l.newline?(a+=s+e,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=p+e:o=d+e)})}var xo=Sy,CX=Ae(Sy,"vertical"),AX=Ae(Sy,"horizontal");function uC(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function Jr(r,t,e){e=Wi(e||0);var i=t.width,n=t.height,a=Ve(r.left,i),o=Ve(r.top,n),s=Ve(r.right,i),l=Ve(r.bottom,n),u=Ve(r.width,i),c=Ve(r.height,n),f=e[2]+e[0],h=e[1]+e[3],p=r.aspect;switch(isNaN(u)&&(u=i-s-h-a),isNaN(c)&&(c=n-l-f-o),p!=null&&(isNaN(u)&&isNaN(c)&&(p>i/n?u=i*.8:c=n*.8),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(a)&&(a=i-s-u-h),isNaN(o)&&(o=n-l-c-f),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-e[0];break;case"bottom":o=n-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=i-h-a-(s||0)),isNaN(c)&&(c=n-f-o-(l||0));var d=new ue((t.x||0)+a+e[3],(t.y||0)+o+e[0],u,c);return d.margin=e,d}var ap={rect:1,point:2};function Gs(r,t,e){var i,n,a,o=r.boxCoordinateSystem,s;if(o){var l=ip(r),u=l.coord,c=l.from;if(o.dataToLayout){a=ap.rect,s=c;var f=o.dataToLayout(u);i=f.contentRect||f.rect}else e&&e.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=ap.point,s=c,n=o.dataToPoint(u))}return a==null&&(a=ap.rect),a===ap.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),n=[i.x+i.width/2,i.y+i.height/2]),{type:a,refContainer:i,refPoint:n,boxCoordFrom:s}}function ia(r){var t=r.layoutMode||r.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function Nr(r,t,e){var i=e&&e.ignoreSize;!F(i)&&(i=[i,i]);var n=o(np[0],0),a=o(np[1],1);l(np[0],r,n),l(np[1],r,a);function o(u,c){var f={},h=0,p={},d=0,v=2;if(op(u,function(y){p[y]=r[y]}),op(u,function(y){We(t,y)&&(f[y]=p[y]=t[y]),s(f,y)&&h++,s(p,y)&&d++}),i[c])return s(t,u[1])?p[u[2]]=null:s(t,u[2])&&(p[u[1]]=null),p;if(d===v||!h)return p;if(h>=v)return f;for(var m=0;m<u.length;m++){var g=u[m];if(!We(f,g)&&We(r,g)){f[g]=r[g];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){op(u,function(h){c[h]=f[h]})}}function Qr(r){return KR({},r)}function KR(r,t){return t&&r&&op(XR,function(e){We(t,e)&&(r[e]=t[e])}),r}var qR=re(),Ys=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.uid=ta("ec_cpt_model"),a}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=ia(this),a=n?Qr(e):{},o=i.getTheme();me(e,o.get(this.mainType)),me(e,this.getDefaultOption()),n&&Nr(e,a,n)},t.prototype.mergeOption=function(e,i){me(this.option,e,!0);var n=ia(this);n&&Nr(this.option,e,n)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!ZS(e))return e.defaultOption;var i=qR(this);if(!i.defaultOption){for(var n=[],a=e;a;){var o=a.prototype.defaultOption;o&&n.push(o),a=a.superClass}for(var s={},l=n.length-1;l>=0;l--)s=me(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return Zn(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){return uC(this,!1)},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})(Re);ih(Ys,Re);Xn(Ys);WT(Ys);ZT(Ys,$R);function $R(r){var t=[];return w(Ys.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return lr(e).main}),r!=="dataset"&&ce(t,"dataset")<=0&&t.unshift("dataset"),t}var Le=Ys;var bo={color:{},darkColor:{},size:{}},st=bo.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};B(st,{primary:st.neutral80,secondary:st.neutral70,tertiary:st.neutral60,quaternary:st.neutral50,disabled:st.neutral20,border:st.neutral30,borderTint:st.neutral20,borderShade:st.neutral40,background:st.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:st.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:st.neutral70,axisLineTint:st.neutral40,axisTick:st.neutral70,axisTickMinor:st.neutral60,axisLabel:st.neutral70,axisSplitLine:st.neutral15,axisMinorSplitLine:st.neutral05});for(na in st)st.hasOwnProperty(na)&&(wy=st[na],na==="theme"?bo.darkColor.theme=st.theme.slice():na==="highlight"?bo.darkColor.highlight="rgba(255,231,130,0.4)":na.indexOf("accent")===0?bo.darkColor[na]=as(wy,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):bo.darkColor[na]=as(wy,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)}));var wy,na;bo.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var K=bo;var cC="";typeof navigator<"u"&&(cC=navigator.platform||"");var Ws="rgba(0, 0, 0, 0.2)",fC=K.color.theme[0],jR=as(fC,null,null,.9),lp={darkMode:"auto",colorBy:"series",color:K.color.theme,gradientColor:[jR,fC],aria:{decal:{decals:[{color:Ws,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ws,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ws,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ws,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ws,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ws,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:cC.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 er={Must:1,Might:2,Not:3},hC=re();function pC(r){hC(r).datasetMap=Y()}function dC(r,t,e){var i={},n=Ty(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=hC(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,c,f;r=r.slice(),w(r,function(v,m){var g=W(v)?v:r[m]={name:v};g.type==="ordinal"&&c==null&&(c=m,f=d(g)),i[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});w(r,function(v,m){var g=v.name,y=d(v);if(c==null){var _=h.valueWayDim;p(i[g],_,y),p(o,_,y),h.valueWayDim+=y}else if(c===m)p(i[g],0,y),p(a,0,y);else{var _=h.categoryWayDim;p(i[g],_,y),p(o,_,y),h.categoryWayDim+=y}});function p(v,m,g){for(var y=0;y<g;y++)v.push(m+y)}function d(v){var m=v.dimsDef;return m?m.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function Ty(r){var t=r.get("data",!0);if(!t)return Zn(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},at).models[0]}function vC(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Zn(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},at).models}function up(r,t){return JR(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function JR(r,t,e,i,n,a){var o,s=5;if(rt(r))return er.Not;var l,u;if(i){var c=i[a];W(c)?(l=c.name,u=c.type):H(c)&&(l=c)}if(u!=null)return u==="ordinal"?er.Must:er.Not;if(t===yt){var f=r;if(e===Vi){for(var h=f[a],p=0;p<(h||[]).length&&p<s;p++)if((o=x(h[n+p]))!=null)return o}else for(var p=0;p<f.length&&p<s;p++){var d=f[n+p];if(d&&(o=x(d[a]))!=null)return o}}else if(t===jt){var v=r;if(!l)return er.Not;for(var p=0;p<v.length&&p<s;p++){var m=v[p];if(m&&(o=x(m[l]))!=null)return o}}else if(t===Er){var g=r;if(!l)return er.Not;var h=g[l];if(!h||rt(h))return er.Not;for(var p=0;p<h.length&&p<s;p++)if((o=x(h[p]))!=null)return o}else if(t===At)for(var y=r,p=0;p<y.length&&p<s;p++){var m=y[p],_=cn(m);if(!F(_))return er.Not;if((o=x(_[a]))!=null)return o}function x(b){var S=H(b);if(b!=null&&isFinite(Number(b))&&b!=="")return S?er.Might:er.Not;if(S&&b!=="-")return er.Must}return er.Not}var QR=Y();function mC(r,t,e){var i=QR.get(t);if(!i)return e;var n=i(r);if(!n)return e;if(0)for(var a;a<n.length;a++);return e.concat(n)}var gC=re(),WX=re(),Zu=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,i){var n=Qe(this.get("color",!0)),a=this.get("colorLayer",!0);return t2(this,gC,n,a,t,e,i)},r.prototype.clearColorPalette=function(){r2(this,gC)},r})();function e2(r,t){for(var e=r.length,i=0;i<e;i++)if(r[i].length>t)return r[i];return r[e-1]}function t2(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!i?e:e2(i,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return n&&(u[n]=f),s.paletteIdx=(l+1)%c.length,f}}function r2(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var cp,Xu,yC,_C="\0_ec_inner",i2=1;var wC=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Re(a),this._locale=new Re(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=SC(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,SC(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?yC(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&w(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Y(),u=i&&i.replaceMergeMainTypeMap;pC(this),w(e,function(f,h){f!=null&&(Le.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?ne(f):me(n[h],f,!0))}),u&&u.each(function(f,h){Le.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Le.topologicalTravel(s,Le.getAllClassMainTypes(),c,this);function c(f){var h=mC(this,f,Qe(e[f])),p=a.get(f),d=p?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=PS(p,h,d);kS(v,f,Le),n[f]=null,a.set(f,null),o.set(f,0);var m=[],g=[],y=0,_,x;w(v,function(b,S){var T=b.existing,A=b.newOption;if(!A)T&&(T.mergeOption({},this),T.optionUpdated({},!1));else{var E=f==="series",M=Le.getClass(f,b.keyInfo.subType,!E);if(!M){if(0)var O,L;return}if(f==="tooltip"){if(_)return;_=!0}if(T&&T.constructor===M)T.name=b.keyInfo.name,T.mergeOption(A,this),T.optionUpdated(A,!1);else{var I=B({componentIndex:S},b.keyInfo);T=new M(A,this,this,I),B(T,I),b.brandNew&&(T.__requireNewView=!0),T.init(A,this,this),T.optionUpdated(null,!0)}}T?(m.push(T.option),g.push(T),y++):(m.push(void 0),g.push(void 0))},this),n[f]=m,a.set(f,g),o.set(f,y),f==="series"&&cp(this)}this._seriesIndices||cp(this)},t.prototype.getOption=function(){var e=ne(this.option);return w(e,function(i,n){if(Le.hasClass(n)){for(var a=Qe(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ds(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[_C],e},t.prototype.setTheme=function(e){this._theme=new Re(e),this._resetOption("recreate",null)},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,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var n=e.index,a=e.id,o=e.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],w(Qe(n),function(u){s[u]&&l.push(s[u])})):a!=null?l=xC("id",a,s):o!=null?l=xC("name",o,s):l=Be(s,function(u){return!!u}),bC(l,e)},t.prototype.findComponents=function(e){var i=e.query,n=e.mainType,a=s(i),o=a?this.queryComponents(a):Be(this._componentsMap.get(n),function(u){return!!u});return l(bC(o,e));function s(u){var c=n+"Index",f=n+"Id",h=n+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:n,index:u[c],id:u[f],name:u[h]}:null}function l(u){return e.filter?Be(u,e.filter):u}},t.prototype.eachComponent=function(e,i,n){var a=this._componentsMap;if(j(e)){var o=i,s=e;a.each(function(f,h){for(var p=0;f&&p<f.length;p++){var d=f[p];d&&s.call(o,h,d,d.componentIndex)}})}else for(var l=H(e)?a.get(e):W(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=Ar(e,null);return Be(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Be(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return Be(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){Xu(this),w(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];e.call(i,a,n)},this)},t.prototype.eachRawSeries=function(e,i){w(this._componentsMap.get("series"),function(n){n&&e.call(i,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,n){Xu(this),w(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&i.call(n,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,i,n){return w(this.getSeriesByType(e),i,n)},t.prototype.isSeriesFiltered=function(e){return Xu(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){Xu(this);var n=[];w(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(i,o,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=Y(n)},t.prototype.restoreData=function(e){cp(this);var i=this._componentsMap,n=[];i.each(function(a,o){Le.hasClass(o)&&n.push(o)}),Le.topologicalTravel(n,Le.getAllClassMainTypes(),function(a){w(i.get(a),function(o){o&&(a!=="series"||!n2(o,e))&&o.restoreData()})})},t.internalField=(function(){cp=function(e){var i=e._seriesIndices=[];w(e._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),e._seriesIndicesMap=Y(i)},Xu=function(e){},yC=function(e,i){e.option={},e.option[_C]=i2,e._componentsMap=Y({series:[]}),e._componentsCount=Y();var n=i.aria;W(n)&&n.enabled==null&&(n.enabled=!0),a2(i,e._theme.option),me(i,lp,!1),e._mergeOption(i,null)}})(),t})(Re);function n2(r,t){if(t){var e=t.seriesIndex,i=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||i!=null&&r.id!==i||n!=null&&r.name!==n}}function a2(r,t){var e=r.color&&!r.colorLayer;w(t,function(i,n){n==="colorLayer"&&e||n==="color"&&r.color||Le.hasClass(n)||(typeof i=="object"?r[n]=r[n]?me(r[n],i,!1):ne(i):r[n]==null&&(r[n]=i))})}function xC(r,t,e){if(F(t)){var i=Y();return w(t,function(a){if(a!=null){var o=Ar(a,null);o!=null&&i.set(a,!0)}}),Be(e,function(a){return a&&i.get(a[r])})}else{var n=Ar(t,null);return Be(e,function(a){return a&&n!=null&&a[r]===n})}}function bC(r,t){return t.hasOwnProperty("subType")?Be(r,function(e){return e&&e.subType===t.subType}):r}function SC(r){var t=Y();return r&&w(Qe(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mt(wC,Zu);var fp=wC;var o2=/^(min|max)?(.+)$/,s2=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,i){t&&(w(Qe(t.series),function(o){o&&o.data&&rt(o.data)&&Ta(o.data)}),w(Qe(t.dataset),function(o){o&&o.source&&rt(o.source)&&Ta(o.source)})),t=ne(t);var n=this._optionBackup,a=l2(t,e,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],ne(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=ne(i[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!n.length&&!a)return s;for(var l=0,u=n.length;l<u;l++)u2(n[l].query,e,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!f2(o,this._currentMediaIndices)&&(s=U(o,function(c){return ne(c===-1?a.option:n[c].option)})),this._currentMediaIndices=o,s},r})();function l2(r,t,e){var i=[],n,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(r.options=r.media=null),a=r),c&&F(u)&&w(u,function(p){p&&p.option&&(p.query?i.push(p):n||(n=p))}),h(a),w(l,function(p){return h(p)}),w(i,function(p){return h(p.option)});function h(p){w(t,function(d){d(p,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function u2(r,t,e){var i={width:t,height:e,aspectratio:t/e},n=!0;return w(r,function(a,o){var s=o.match(o2);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();c2(i[u],a,l)||(n=!1)}}),n}function c2(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function f2(r,t){return r.join(",")===t.join(",")}var TC=s2;var yi=w,qu=W,CC=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Cy(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=CC.length;e<i;e++){var n=CC[e],a=t.normal,o=t.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?me(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?me(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function Gt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var i=r[t].normal,n=r[t].emphasis;i&&(e?(r[t].normal=r[t].emphasis=null,he(r[t],i)):r[t]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function Ku(r){Gt(r,"itemStyle"),Gt(r,"lineStyle"),Gt(r,"areaStyle"),Gt(r,"label"),Gt(r,"labelLine"),Gt(r,"upperLabel"),Gt(r,"edgeLabel")}function dt(r,t){var e=qu(r)&&r[t],i=qu(e)&&e.textStyle;if(i)for(var n=0,a=Km.length;n<a;n++){var o=Km[n];i.hasOwnProperty(o)&&(e[o]=i[o])}}function ei(r){r&&(Ku(r),dt(r,"label"),r.emphasis&&dt(r.emphasis,"label"))}function h2(r){if(qu(r)){Cy(r),Ku(r),dt(r,"label"),dt(r,"upperLabel"),dt(r,"edgeLabel"),r.emphasis&&(dt(r.emphasis,"label"),dt(r.emphasis,"upperLabel"),dt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Cy(t),ei(t));var e=r.markLine;e&&(Cy(e),ei(e));var i=r.markArea;i&&ei(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!rt(a))for(var o=0;o<a.length;o++)ei(a[o]);w(r.categories,function(u){Ku(u)})}if(n&&!rt(n))for(var o=0;o<n.length;o++)ei(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ei(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)F(l[o])?(ei(l[o][0]),ei(l[o][1])):ei(l[o]);r.type==="gauge"?(dt(r,"axisLabel"),dt(r,"title"),dt(r,"detail")):r.type==="treemap"?(Gt(r.breadcrumb,"itemStyle"),w(r.levels,function(u){Ku(u)})):r.type==="tree"&&Ku(r.leaves)}}function _n(r){return F(r)?r:r?[r]:[]}function AC(r){return(F(r)?r[0]:r)||{}}function Ay(r,t){yi(_n(r.series),function(i){qu(i)&&h2(i)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),yi(e,function(i){yi(_n(r[i]),function(n){n&&(dt(n,"axisLabel"),dt(n.axisPointer,"label"))})}),yi(_n(r.parallel),function(i){var n=i&&i.parallelAxisDefault;dt(n,"axisLabel"),dt(n&&n.axisPointer,"label")}),yi(_n(r.calendar),function(i){Gt(i,"itemStyle"),dt(i,"dayLabel"),dt(i,"monthLabel"),dt(i,"yearLabel")}),yi(_n(r.radar),function(i){dt(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),yi(_n(r.geo),function(i){qu(i)&&(ei(i),yi(_n(i.regions),function(n){ei(n)}))}),yi(_n(r.timeline),function(i){ei(i),Gt(i,"label"),Gt(i,"itemStyle"),Gt(i,"controlStyle",!0);var n=i.data;F(n)&&w(n,function(a){W(a)&&(Gt(a,"label"),Gt(a,"itemStyle"))})}),yi(_n(r.toolbox),function(i){Gt(i,"iconStyle"),yi(i.feature,function(n){Gt(n,"iconStyle")})}),dt(AC(r.axisPointer),"label"),dt(AC(r.tooltip).axisPointer,"label")}function p2(r,t){for(var e=t.split(","),i=r,n=0;n<e.length&&(i=i&&i[e[n]],i!=null);n++);return i}function d2(r,t,e,i){for(var n=t.split(","),a=r,o,s=0;s<n.length-1;s++)o=n[s],a[o]==null&&(a[o]={}),a=a[o];(i||a[n[s]]==null)&&(a[n[s]]=e)}function DC(r){r&&w(v2,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var v2=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],m2=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Dy=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function $u(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Dy.length;e++){var i=Dy[e][1],n=Dy[e][0];t[i]!=null&&(t[n]=t[i])}}function EC(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function MC(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function g2(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function OC(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&OC(r[e].children,t)}function hp(r,t){Ay(r,t),r.series=Qe(r.series),w(r.series,function(e){if(W(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),EC(e.label);var n=e.data;if(n&&!rt(n))for(var a=0;a<n.length;a++)EC(n[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=p2(e,"pointer.color");o!=null&&d2(e,"itemStyle.color",o)}else if(i==="bar"){$u(e),$u(e.backgroundStyle),$u(e.emphasis);var n=e.data;if(n&&!rt(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&($u(n[a]),$u(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),MC(e),OC(e.data,MC)}else i==="graph"||i==="sankey"?g2(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&he(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),DC(e)}}),r.dataRange&&(r.visualMap=r.dataRange),w(m2,function(e){var i=r[e];i&&(F(i)||(i=[i]),w(i,function(n){DC(n)}))})}var IC=_s(y2);function y2(r){var t=Y();r.eachSeries(function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.push(o)}}),t.each(function(e){if(e.length!==0){var i=e[0].seriesModel,n=i.get("stackOrder")||"seriesAsc";n==="seriesDesc"&&e.reverse(),w(e,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?e[o-1].seriesModel:null)}),_2(e)}})}function _2(r){w(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return n;var p,d;s?d=o.getRawIndex(f):p=o.get(t.stackedByDimension,f);for(var v=NaN,m=e-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,p)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=ln(h,y),v=y;break}}}return i[0]=h,i[1]=v,i})})}var pp=(function(){function r(t){this.data=t.data||(t.sourceFormat===Er?{}:[]),this.sourceFormat=t.sourceFormat||Sg,this.seriesLayoutBy=t.seriesLayoutBy||Or,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];n.type==null&&up(this,i)===er.Must&&(n.type="ordinal")}}return r})();function Zs(r){return r instanceof pp}function ju(r,t,e){e=e||Ey(r);var i=t.seriesLayoutBy,n=x2(r,e,i,t.sourceHeader,t.dimensions),a=new pp({data:r,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:ne(t)});return a}function Xs(r){return new pp({data:r,sourceFormat:rt(r)?Mr:At})}function NC(r){return new pp({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ne(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function Ey(r){var t=Sg;if(rt(r))t=Mr;else if(F(r)){r.length===0&&(t=yt);for(var e=0,i=r.length;e<i;e++){var n=r[e];if(n!=null){if(F(n)||rt(n)){t=yt;break}else if(W(n)){t=jt;break}}}}else if(W(r)){for(var a in r)if(We(r,a)&&ct(r[a])){t=Er;break}}return t}function x2(r,t,e,i,n){var a,o;if(!r)return{dimensionsDefine:LC(n),startIndex:o,dimensionsDetectedCount:a};if(t===yt){var s=r;i==="auto"||i==null?PC(function(u){u!=null&&u!=="-"&&(H(u)?o==null&&(o=1):o=0)},e,s,10):o=ge(i)?i:i?1:0,!n&&o===1&&(n=[],PC(function(u,c){n[c]=u!=null?u+"":""},e,s,1/0)),a=n?n.length:e===Vi?s.length:s[0]?s[0].length:null}else if(t===jt)n||(n=b2(r));else if(t===Er)n||(n=[],w(r,function(u,c){n.push(c)}));else if(t===At){var l=cn(r[0]);a=F(l)&&l.length||1}return{startIndex:o,dimensionsDefine:LC(n),dimensionsDetectedCount:a}}function b2(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return De(e)}function LC(r){if(r){var t=Y();return U(r,function(e,i){e=W(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=t.get(n.name);return a?n.name+="-"+a.count++:t.set(n.name,{count:1}),n})}}function PC(r,t,e,i){if(t===Vi)for(var n=0;n<e.length&&n<i;n++)r(e[n]?e[n][0]:null,n);else for(var a=e[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function dp(r){var t=r.sourceFormat;return t===jt||t===Er}var So,wo,To,Co,kC,RC,mp=(function(){function r(t,e){var i=Zs(t)?t:Xs(t);this._source=i;var n=this._data=i.data,a=i.sourceFormat,o=i.seriesLayoutBy;if(a===Mr&&(this._offset=0,this._dimSize=e,this._data=n),0)var s;RC(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;RC=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,p=kC[Py(u,c)];if(B(o,p),u===Mr)o.getItem=e,o.count=n,o.fillStorage=i;else{var d=Oy(u,c);o.getItem=ee(d,null,s,f,h);var v=Iy(u,c);o.count=ee(v,null,s,f,h)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},i=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var p=u[h],d=p[0]==null?1/0:p[0],v=p[1]==null?-1/0:p[1],m=s-o,g=l[h],y=0;y<m;y++){var _=c[y*f+h];g[o+y]=_,_<d&&(d=_),_>v&&(v=_)}p[0]=d,p[1]=v}},n=function(){return this._data?this._data.length/this._dimSize:0};kC=(t={},t[yt+"_"+Or]={pure:!0,appendData:a},t[yt+"_"+Vi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[jt]={pure:!0,appendData:a},t[Er]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[At]={appendData:a},t[Mr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})();var vp=function(r){F(r)||Xm("series.data or dataset.source must be an array.")},MK=(So={},So[yt+"_"+Or]=vp,So[yt+"_"+Vi]=vp,So[jt]=vp,So[Er]=function(r,t){for(var e=0;e<t.length;e++){var i=t[e].name;i==null&&Xm("dimension name must not be null/undefined.")}},So[At]=vp,So),FC=function(r,t,e,i){return r[i]},S2=(wo={},wo[yt+"_"+Or]=function(r,t,e,i){return r[i+t]},wo[yt+"_"+Vi]=function(r,t,e,i,n){i+=t;for(var a=n||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},wo[jt]=FC,wo[Er]=function(r,t,e,i,n){for(var a=n||[],o=0;o<e.length;o++){var s=e[o].name,l=s!=null?r[s]:null;a[o]=l?l[i]:null}return a},wo[At]=FC,wo);function Oy(r,t){var e=S2[Py(r,t)];return e}var BC=function(r,t,e){return r.length},w2=(To={},To[yt+"_"+Or]=function(r,t,e){return Math.max(0,r.length-t)},To[yt+"_"+Vi]=function(r,t,e){var i=r[0];return i?Math.max(0,i.length-t):0},To[jt]=BC,To[Er]=function(r,t,e){var i=e[0].name,n=i!=null?r[i]:null;return n?n.length:0},To[At]=BC,To);function Iy(r,t){var e=w2[Py(r,t)];return e}var My=function(r,t,e){return r[t]},T2=(Co={},Co[yt]=My,Co[jt]=function(r,t,e){return r[e]},Co[Er]=My,Co[At]=function(r,t,e){var i=cn(r);return i instanceof Array?i[t]:i},Co[Mr]=My,Co);function Ly(r){var t=T2[r];return t}function Py(r,t){return r===yt?r+"_"+t:r}function xn(r,t,e){if(r){var i=r.getRawDataItem(t);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return Ly(a)(i,o,s)}else{var l=i;return a===At&&(l=cn(i)),l}}}}var C2=/\{@(.+?)\}/g,Ju=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",p=i.userOutput&&i.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:n,color:u,borderColor:c,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,i,n,a,o){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);if(o&&(l.value=o.interpolatedValue),n!=null&&F(l.value)&&(l.value=l.value[n]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(j(a))return l.status=e,l.dimensionIndex=n,a(l);if(H(a)){var c=Vs(a,l);return c.replace(C2,function(f,h){var p=h.length,d=h;d.charAt(0)==="["&&d.charAt(p-1)==="]"&&(d=+d.slice(1,p-1));var v=xn(s,t,d);if(o&&F(o.interpolatedValue)){var m=s.getDimensionIndex(d);m>=0&&(v=o.interpolatedValue[m])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(t,e){return xn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r})();function Ny(r){var t,e;return W(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function aa(r){return new A2(r)}var A2=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(f||p<d)){var v=this._progress;if(F(v))for(var m=0;m<v.length;m++)this._doProgress(v[m],p,d,l,u);else this._doProgress(v,p,d,l,u)}this._dueIndex=d;var g=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,i,n,a){zC.reset(e,i,n,a),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:zC.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,i;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(i=e.forceFirstProgress,e=e.progress),F(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r})();var zC=(function(){var r,t,e,i,n,a={reset:function(l,u,c,f){t=l,r=u,e=c,i=f,n=Math.ceil(i/e),a.next=e>1&&i>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<i?l:t;return t++,u}})();function ti(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!ge(r)&&r!=null&&r!=="-"&&(r=+qt(r)),r==null||r===""?NaN:Number(r))}var VK=Y({number:function(r){return parseFloat(r)},time:function(r){return+qt(r)},trim:function(r){return H(r)?Dt(r):r}});var D2={lt:function(r,t){return r<t},lte:function(r,t){return r<=t},gt:function(r,t){return r>t},gte:function(r,t){return r>=t}},UK=(function(){function r(t,e){if(!ge(e)){var i="";Et(i)}this._opFn=D2[t],this._rvalFloat=Wr(e)}return r.prototype.evaluate=function(t){return ge(t)?this._opFn(t,this._rvalFloat):this._opFn(Wr(t),this._rvalFloat)},r})(),VC=(function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=ge(t)?t:Wr(t),n=ge(e)?e:Wr(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=H(t),l=H(e);s&&(i=l?t:0),l&&(n=s?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r})();var HK=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Wr(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(e=Wr(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function gp(r){var t="",e=-1/0,i=-1/0,n=1/0,a=1/0;return r&&(r.g!=null&&(t+="G"+r.g,e=r.g),r.ge!=null&&(t+="GE"+r.ge,i=r.ge),r.l!=null&&(t+="L"+r.l,n=r.l),r.le!=null&&(t+="LE"+r.le,a=r.le)),{key:t,g:e,ge:i,l:n,le:a}}function yp(r,t){return t>r.g&&t>=r.ge&&t<r.l&&t<=r.le}var E2=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ti(t,e)},r})();function M2(r,t){var e=new E2,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Or&&Et(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(v,m){var g=v.name,y={index:m,name:g,displayName:v.displayName};if(s.push(y),g!=null){var _="";We(l,g)&&Et(_),l[g]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=Oy(n,Or);t.__isBuiltIn&&(e.getRawDataItem=function(v){return f(i,a,s,v)},e.getRawData=ee(O2,null,r)),e.cloneRawData=ee(I2,null,r);var h=Iy(n,Or);e.count=ee(h,null,i,a,s);var p=Ly(n);e.retrieveValue=function(v,m){var g=f(i,a,s,v);return d(g,m)};var d=e.retrieveValueFromItem=function(v,m){if(v!=null){var g=s[m];if(g)return p(v,m,g.name)}};return e.getDimensionInfo=ee(L2,null,s,l),e.cloneAllDimensionInfo=ee(P2,null,s),e}function O2(r){var t=r.sourceFormat;if(!ky(t)){var e="";Et(e)}return r.data}function I2(r){var t=r.sourceFormat,e=r.data;if(!ky(t)){var i="";Et(i)}if(t===yt){for(var n=[],a=0,o=e.length;a<o;a++)n.push(e[a].slice());return n}else if(t===jt){for(var n=[],a=0,o=e.length;a<o;a++)n.push(B({},e[a]));return n}}function L2(r,t,e){if(e!=null){if(ge(e)||!isNaN(e)&&!We(t,e))return r[e];if(We(t,e))return t[e]}}function P2(r){return ne(r)}var UC=Y();function HC(r){r=ne(r);var t=r.type,e="";t||Et(e);var i=t.split(":");i.length!==2&&Et(e);var n=!1;i[0]==="echarts"&&(t=i[1],n=!0),r.__isBuiltIn=n,UC.set(t,r)}function GC(r,t,e){var i=Qe(r),n=i.length,a="";n||Et(a);for(var o=0,s=n;o<s;o++){var l=i[o];t=N2(l,t,e,n===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function N2(r,t,e,i){var n="";t.length||Et(n),W(r)||Et(n);var a=r.type,o=UC.get(a);o||Et(n);var s=U(t,function(c){return M2(c,o)}),l=Qe(o.transform({upstream:s[0],upstreamList:s,config:ne(r.config)}));if(0&&r.print)var u;return U(l,function(c,f){var h="";W(c)||Et(h),c.data||Et(h);var p=Ey(c.data);ky(p)||Et(h);var d,v=t[0];if(v&&f===0&&!c.dimensions){var m=v.startIndex;m&&(c.data=v.data.slice(0,m).concat(c.data)),d={seriesLayoutBy:Or,sourceHeader:m,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Or,sourceHeader:0,dimensions:c.dimensions};return ju(c.data,d,null)})}function ky(r){return r===yt||r===jt}var k2=typeof Uint32Array===Jn?Array:Uint32Array,R2=typeof Uint16Array===Jn?Array:Uint16Array,Fy=typeof Int32Array===Jn?Array:Int32Array,YC=typeof Float64Array===Jn?Array:Float64Array,ZC={float:YC,int:Fy,ordinal:Array,number:Array,time:YC},Ry;function Ks(r){return r>65535?k2:R2}function F2(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function WC(r,t,e,i,n){var a=ZC[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(i)}var B2=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Y()}return r.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),a=this.defaultDimValueGetter=Ry[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[];var o=dp(n);this._dimensions=U(e,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(t);if(a!=null){if(n[a].type===e)return a}else a=n.length;return n[a]={type:e},i.set(t,a),this._chunks[a]=new ZC[e||"float"](this._rawCount),this._rawExtent[a]=Rt(),a},r.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],a=this._rawExtent,o=n.ordinalOffset||0,s=i.length;o===0&&(a[t]=Rt());for(var l=a[t],u=o;u<s;u++){var c=i[u]=e.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],i=e.ordinalMeta;return i},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var c=n[u];WC(i,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var p=h-s,d=0;d<a;d++){var c=n[d],v=Ry.arrayRows.call(this,t[p]||f,c.property,p,d);i[d][h]=v;var m=o[d];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Rt()),WC(a,c,f.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,a,l);else for(var h=[],p=t;p<e;p++){h=n.getItem(p,h);for(var d=0;d<s;d++){var v=a[d],m=this._dimValueGetter(h,u[d],p,d);v[p]=m;var g=l[d];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var i=[],n=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=t;for(var a=0,o=n.length;a<o;a++)i.push(this.get(n[a],e));return i},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],i=0;if(e)for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},r.prototype.getMedian=function(t){var e=[];this.each([t],function(n){isNaN(n)||e.push(n)}),Ct(e);var i=this.count();return i===0?0:i%2===1?e[(i-1)/2]:(e[i/2]+e[i/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&i<this._count&&i===t)return t;for(var n=0,a=this._count-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a<n;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else{var i=Ks(this._rawCount);t=new i(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=Ks(i._rawCount),o=new a(n),s=[],l=t.length,u=0,c=t[0],f=i._chunks,h=0;h<n;h++){var p=void 0,d=i.getRawIndex(h);if(l===0)p=e(h);else if(l===1){var v=f[c][d];p=e(v,h)}else{for(var m=0;m<l;m++)s[m]=f[t[m]][d];s[m]=h,p=e.apply(null,s)}p&&(o[u++]=d)}return u<n&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=De(t),a=n.length;if(!a)return this;var o=e.count(),s=Ks(e._rawCount),l=new s(o),u=0,c=n[0],f=t[c][0],h=t[c][1],p=e._chunks,d=!1;if(!e._indices){var v=0;if(a===1){for(var m=p[n[0]],g=0;g<i;g++){var y=m[g];(y>=f&&y<=h||isNaN(y))&&(l[u++]=v),v++}d=!0}else if(a===2){for(var m=p[n[0]],_=p[n[1]],x=t[n[1]][0],b=t[n[1]][1],g=0;g<i;g++){var y=m[g],S=_[g];(y>=f&&y<=h||isNaN(y))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=v),v++}d=!0}}if(!d)if(a===1)for(var g=0;g<o;g++){var T=e.getRawIndex(g),y=p[n[0]][T];(y>=f&&y<=h||isNaN(y))&&(l[u++]=T)}else for(var g=0;g<o;g++){for(var A=!0,T=e.getRawIndex(g),E=0;E<a;E++){var M=n[E],y=p[M][T];(y<t[M][0]||y>t[M][1])&&(A=!1)}A&&(l[u++]=e.getRawIndex(g))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,i){for(var n=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<e.length;c++)u[e[c]]=Rt();for(var f=0;f<s;f++){for(var h=t.getRawIndex(f),p=0;p<o;p++)l[p]=n[e[p]][h];l[o]=f;var d=i&&i.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var c=0;c<d.length;c++){var v=e[c],m=d[c],g=u[v],y=n[v];y&&(y[h]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,h,p=new(Ks(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));p[s++]=u;for(var d=1;d<o-1;d+=l){for(var v=Math.min(d+l,o-1),m=Math.min(d+l*2,o),g=(m+v)/2,y=0,_=v;_<m;_++){var x=this.getRawIndex(_),b=a[x];isNaN(b)||(y+=b)}y/=m-v;var S=d,T=Math.min(d+l,o),A=d-1,E=a[u];c=-1,h=S;for(var M=-1,O=0,_=S;_<T;_++){var x=this.getRawIndex(_),b=a[x];if(isNaN(b)){O++,M<0&&(M=x);continue}f=Math.abs((A-g)*(b-E)-(A-_)*(y-E)),f>c&&(c=f,h=x)}O>0&&O<T-S&&(p[s++]=Math.min(M,h),h=Math.max(M,h)),p[s++]=h,u=h}return p[s++]=this.getRawIndex(o-1),i._count=s,i._indices=p,i.getRawIndex=this._getRawIdx,i},r.prototype.minmaxDownSample=function(t,e){for(var i=this.clone([t],!0),n=i._chunks,a=Math.floor(1/e),o=n[t],s=this.count(),l=new(Ks(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,h=o[this.getRawIndex(f)],p=c,d=o[this.getRawIndex(p)],v=a;c+a>s&&(v=s-c);for(var m=0;m<v;m++){var g=this.getRawIndex(c+m),y=o[g];y<h&&(h=y,f=c+m),y>d&&(d=y,p=c+m)}var _=this.getRawIndex(f),x=this.getRawIndex(p);f<p?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},r.prototype.downSample=function(t,e,i,n){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],c=this.count(),f=a._rawExtent[t]=Rt(),h=new(Ks(this._rawCount))(Math.ceil(c/l)),p=0,d=0;d<c;d+=l){l>c-d&&(l=c-d,s.length=l);for(var v=0;v<l;v++){var m=this.getRawIndex(d+v);s[v]=u[m]}var g=i(s),y=this.getRawIndex(Math.min(d+n(s,g)||0,c-1));u[y]=g,g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g),h[p++]=y}return a._count=p,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:e(a);break;case 1:e(n[t[0]][s],a);break;case 2:e(n[t[0]][s],n[t[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t,e){var i=this._chunks[t],n=Rt();if(!i)return n;var a=this.count(),o=!this._indices&&!e;if(o)return this._rawExtent[t].slice();var s=this._extent,l=s[t]||(s[t]={}),u=gp(e),c=u.key,f=l[c];if(f)return f.slice();for(var h=n[0],p=n[1],d=0;d<a;d++){var v=this.getRawIndex(d),m=i[v];(!e||yp(u,m))&&(m<h&&(h=m),m>p&&(p=m))}return l[c]=[h,p]},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][e]);return i},r.prototype.clone=function(t,e){var i=new r,n=this._chunks,a=t&&zt(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<n.length;o++)i._chunks[o]=a[o]?F2(n[o]):n[o];else i._chunks=n;return this._copyCommonProps(i),e||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ne(this._extent),t._rawExtent=ne(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,i,n,a){return ti(e[a],this._dimensions[a])}Ry={arrayRows:t,objectRows:function(e,i,n,a){return ti(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return ti(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}})(),r})(),Qu=B2;var KC=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(_p(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rt(s)?Mr:At,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},p=Z(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=Z(f.sourceHeader,h.sourceHeader),v=Z(f.dimensions,h.dimensions),m=p!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||v;n=m?[ju(s,{seriesLayoutBy:p,sourceHeader:d,dimensions:v},l)]:[]}else{var g=t;if(i){var y=this._applyTransform(e);n=y.sourceList,a=y.upstreamSignList}else{var _=g.get("source",!0);n=[ju(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&XC(a)}var o,s=[],l=[];return w(t,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&XC(f),s.push(c),l.push(u._getVersionSign())}),i?o=GC(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[NC(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,i){var n=0,a=this._storeList,o=a[n];o||(o=a[n]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];_p(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,i):(s=new Qu,s.initData(new mp(e,t.length),t)),o[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(_p(t)){var e=Ty(t);return e?[e.getSourceManager()]:[]}else return U(vC(t),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,i,n;if(_p(t))e=t.get("seriesLayoutBy",!0),i=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:i,dimensions:n}},r})();function _p(r){return r.mainType==="series"}function XC(r){throw new Error(r)}var z2="line-height:1";function qC(r){var t=r.lineHeight;return t==null?z2:"line-height:"+wt(t+"")+"px"}function $C(r,t){var e=r.color||K.color.tertiary,i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||K.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+wt(i+"")+"px;color:"+wt(e)+";font-weight:"+wt(n+""),valueStyle:"font-size:"+wt(o+"")+"px;color:"+wt(a)+";font-weight:"+wt(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var V2=[0,10,20,30],U2=["",`
|
|
8
|
+
`));for(var m=hi(l),g=0;g<c.length;g++){var y=c[g],_=new ZN;if(_.styleName=n,_.text=y,_.isLineHolder=!y&&!a,typeof o.width=="number"?_.width=o.width:_.width=f?f[g]:pi(m,y),!g&&!u){var x=(s[s.length-1]||(s[0]=new $S)).tokens,b=x.length;b===1&&x[0].isLineHolder?x[0]=_:(y||!b||a)&&x.push(_)}else s.push(new $S([_]))}}function KN(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var qN=zt(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function jN(r){return KN(r)?!!qN[r]:!0}function aw(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,c=0,f=hi(t),h=0;h<r.length;h++){var p=r.charAt(h);if(p===`
|
|
9
|
+
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=km(f,p.charCodeAt(0)),v=i?!1:!jN(p);if(a.length?c+d>e:n+c+d>e){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=p,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=p,c=d)):v?(a.push(l),o.push(u),l=p,u=d):(a.push(p),o.push(d));continue}c+=d,v?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=n),{accumWidth:c,lines:a,linesWidths:o}}function ag(r,t,e,i,n,a){if(r.baseX=e,r.baseY=i,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;ue.set(JS,Gn(e,o,n),sn(i,s,a),o,s),ue.intersect(t,JS,null,QS);var l=QS.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Gn(l.x,l.width,n,!0),r.baseY=sn(l.y,l.height,a,!0)}}var JS=new ue(0,0,0,0),QS={outIntersectRect:{},clamp:!0};function og(r){return r!=null?r+="":r=""}function ow(r){var t=og(r.text),e=r.font,i=pi(hi(e),t),n=du(e);return nh(r,i,n,null)}function nh(r,t,e,i){var n=new ue(Gn(r.x||0,t,r.textAlign),sn(r.y||0,e,r.textBaseline),t,e),a=i??(sg(r)?r.lineWidth:0);return a>0&&(n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a),n}function sg(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var cg="__zr_style_"+Math.round(Math.random()*10),Ni={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Za={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ni[cg]=!0;var sw=["z","z2","invisible"],$N=["invisible"],JN=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=De(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&QN(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ue(0,0,0,0)),i?ue.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ue(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){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:B(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Na,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Na)},t.prototype.styleUpdated=function(){this.__dirty&=~Na},t.prototype.createStyle=function(e){return tn(Ni,e)},t.prototype.useStyle=function(e){e[cg]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[cg]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,sw)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u=this.__inHover===fs,c;if(i&&i.style?o?a?c=i.style:(c=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(c,i.style)):(c=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(c,i.style)):l&&(c=n.style),c)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=De(f),p=0;p<h.length;p++){var d=h[p];d in c&&(c[d]=c[d],this.style[d]=f[d])}for(var v=De(c),p=0;p<v.length;p++){var d=v[p];this.style[d]=this.style[d]}this._transitionState(e,{style:c},s,this.getAnimationStyleProps())}else u?this._useHoverStyle(c):this.useStyle(c);if(!u)for(var m=this.__inHover?$N:sw,p=0;p<m.length;p++){var d=m[p];i&&i[d]!=null?this[d]=i[d]:l&&n[d]!=null&&(this[d]=n[d])}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,i){return B(e,i),e},t.prototype.getAnimationStyleProps=function(){return Za},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=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=pt|Na})(),t})(Kf),lg=new ue(0,0,0,0),ug=new ue(0,0,0,0);function QN(r,t,e){return lg.copy(r.getBoundingRect()),r.transform&&lg.applyTransform(r.transform),ug.width=t,ug.height=e,!lg.intersect(ug)}var ki=JN;var Xr=Math.min,Kr=Math.max,fg=Math.sin,hg=Math.cos,Xa=Math.PI*2,ah=rn(),oh=rn(),sh=rn();function pg(r,t,e,i,n,a){n[0]=Xr(r,e),n[1]=Xr(t,i),a[0]=Kr(r,e),a[1]=Kr(t,i)}var lw=[],uw=[];function cw(r,t,e,i,n,a,o,s,l,u){var c=Of,f=Je,h=c(r,e,n,o,lw);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var d=f(r,e,n,o,lw[p]);l[0]=Xr(d,l[0]),u[0]=Kr(d,u[0])}h=c(t,i,a,s,uw);for(var p=0;p<h;p++){var v=f(t,i,a,s,uw[p]);l[1]=Xr(v,l[1]),u[1]=Kr(v,u[1])}l[0]=Xr(r,l[0]),u[0]=Kr(r,u[0]),l[0]=Xr(o,l[0]),u[0]=Kr(o,u[0]),l[1]=Xr(t,l[1]),u[1]=Kr(t,u[1]),l[1]=Xr(s,l[1]),u[1]=Kr(s,u[1])}function fw(r,t,e,i,n,a,o,s){var l=If,u=Tt,c=Kr(Xr(l(r,e,n),1),0),f=Kr(Xr(l(t,i,a),1),0),h=u(r,e,n,c),p=u(t,i,a,f);o[0]=Xr(r,n,h),o[1]=Xr(t,a,p),s[0]=Kr(r,n,h),s[1]=Kr(t,a,p)}function hw(r,t,e,i,n,a,o,s,l){var u=Vr,c=Ur,f=Math.abs(n-a);if(f%Xa<1e-4&&f>1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(ah[0]=hg(n)*e+r,ah[1]=fg(n)*i+t,oh[0]=hg(a)*e+r,oh[1]=fg(a)*i+t,u(s,ah,oh),c(l,ah,oh),n=n%Xa,n<0&&(n=n+Xa),a=a%Xa,a<0&&(a=a+Xa),n>a&&!o?a+=Xa:n<a&&o&&(n+=Xa),o){var h=a;a=n,n=h}for(var p=0;p<a;p+=Math.PI/2)p>n&&(sh[0]=hg(p)*e+r,sh[1]=fg(p)*i+t,u(s,sh,s),c(l,sh,l))}var Ue={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ka=[],qa=[],Ri=[],Kn=[],Fi=[],Bi=[],dg=Math.min,vg=Math.max,ja=Math.cos,$a=Math.sin,hn=Math.abs,yg=Math.PI,qn=yg*2,mg=typeof Float32Array<"u",Cu=[];function gg(r){var t=Math.round(r/yg*1e8)/1e8;return t%2*yg}function ek(r,t){var e=gg(r[0]);e<0&&(e+=qn);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=qn?n=e+qn:t&&e-n>=qn?n=e-qn:!t&&e>n?n=e+(qn-gg(e-n)):t&&e<n&&(n=e-(qn-gg(n-e))),r[0]=e,r[1]=n}var tk=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,i){i=i||0,i>0&&(this._ux=hn(i/Ba/t)||0,this._uy=hn(i/Ba/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ue.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=hn(t-this._xi),n=hn(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Ue.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(Ue.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Ue.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),Cu[0]=n,Cu[1]=a,ek(Cu,o),n=Cu[0],a=Cu[1];var s=a-n;return this.addData(Ue.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=ja(a)*i+t,this._yi=$a(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ue.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ue.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&mg&&(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e}},r.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();var o=this.data;if(mg&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(n+i),n>0&&o))for(var s=0;s<n;s++)this.data[s]=o[s];for(var a=0;a<e;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[n++]=l[s];this._len=n}},r.prototype.addData=function(t,e,i,n,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,mg&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Ri[0]=Ri[1]=Fi[0]=Fi[1]=Number.MAX_VALUE,Kn[0]=Kn[1]=Bi[0]=Bi[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],i=t[o+1],n=e,a=i),s){case Ue.M:e=n=t[o++],i=a=t[o++],Fi[0]=n,Fi[1]=a,Bi[0]=n,Bi[1]=a;break;case Ue.L:pg(e,i,t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.C:cw(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.Q:fw(e,i,t[o++],t[o++],t[o],t[o+1],Fi,Bi),e=t[o++],i=t[o++];break;case Ue.A:var u=t[o++],c=t[o++],f=t[o++],h=t[o++],p=t[o++],d=t[o++]+p;o+=1;var v=!t[o++];l&&(n=ja(p)*f+u,a=$a(p)*h+c),hw(u,c,f,h,p,d,v,Fi,Bi),e=ja(d)*f+u,i=$a(d)*h+c;break;case Ue.R:n=e=t[o++],a=i=t[o++];var m=t[o++],g=t[o++];pg(n,a,n+m,a+g,Fi,Bi);break;case Ue.Z:e=n,i=a;break}Vr(Ri,Ri,Fi),Ur(Kn,Kn,Bi)}return o===0&&(Ri[0]=Ri[1]=Kn[0]=Kn[1]=0),new ue(Ri[0],Ri[1],Kn[0]-Ri[0],Kn[1]-Ri[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<e;){var p=t[h++],d=h===1;d&&(a=t[h],o=t[h+1],s=a,l=o);var v=-1;switch(p){case Ue.M:a=s=t[h++],o=l=t[h++];break;case Ue.L:{var m=t[h++],g=t[h++],y=m-a,_=g-o;(hn(y)>i||hn(_)>n||h===e-1)&&(v=Math.sqrt(y*y+_*_),a=m,o=g);break}case Ue.C:{var x=t[h++],b=t[h++],m=t[h++],g=t[h++],S=t[h++],T=t[h++];v=Ub(a,o,x,b,m,g,S,T,10),a=S,o=T;break}case Ue.Q:{var x=t[h++],b=t[h++],m=t[h++],g=t[h++];v=Yb(a,o,x,b,m,g,10),a=m,o=g;break}case Ue.A:var A=t[h++],E=t[h++],M=t[h++],O=t[h++],L=t[h++],I=t[h++],k=I+L;h+=1,d&&(s=ja(L)*M+A,l=$a(L)*O+E),v=vg(M,O)*dg(qn,Math.abs(I)),a=ja(k)*M+A,o=$a(k)*O+E;break;case Ue.R:{s=a=t[h++],l=o=t[h++];var z=t[h++],V=t[h++];v=z*2+V*2;break}case Ue.Z:{var y=s-a,_=l-o;v=Math.sqrt(y*y+_*_),a=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,p=e<1,d,v,m=0,g=0,y,_=0,x,b;if(!(p&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,v=this._pathLen,y=e*v,!y)))e:for(var S=0;S<o;){var T=i[S++],A=S===1;switch(A&&(u=i[S],c=i[S+1],s=u,l=c),T!==Ue.L&&_>0&&(t.lineTo(x,b),_=0),T){case Ue.M:s=u=i[S++],l=c=i[S++],t.moveTo(u,c);break;case Ue.L:{f=i[S++],h=i[S++];var E=hn(f-u),M=hn(h-c);if(E>n||M>a){if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;t.lineTo(u*(1-L)+f*L,c*(1-L)+h*L);break e}m+=O}t.lineTo(f,h),u=f,c=h,_=0}else{var I=E*E+M*M;I>_&&(x=f,b=h,_=I)}break}case Ue.C:{var k=i[S++],z=i[S++],V=i[S++],q=i[S++],G=i[S++],j=i[S++];if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;rs(u,k,V,G,L,Ka),rs(c,z,q,j,L,qa),t.bezierCurveTo(Ka[1],qa[1],Ka[2],qa[2],Ka[3],qa[3]);break e}m+=O}t.bezierCurveTo(k,z,V,q,G,j),u=G,c=j;break}case Ue.Q:{var k=i[S++],z=i[S++],V=i[S++],q=i[S++];if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;is(u,k,V,L,Ka),is(c,z,q,L,qa),t.quadraticCurveTo(Ka[1],qa[1],Ka[2],qa[2]);break e}m+=O}t.quadraticCurveTo(k,z,V,q),u=V,c=q;break}case Ue.A:var oe=i[S++],ie=i[S++],pe=i[S++],de=i[S++],te=i[S++],Te=i[S++],Pe=i[S++],vt=!i[S++],bt=pe>de?pe:de,ze=hn(pe-de)>.001,ut=te+Te,Ce=!1;if(p){var O=d[g++];m+O>y&&(ut=te+Te*(y-m)/O,Ce=!0),m+=O}if(ze&&t.ellipse?t.ellipse(oe,ie,pe,de,Pe,te,ut,vt):t.arc(oe,ie,bt,te,ut,vt),Ce)break e;A&&(s=ja(te)*pe+oe,l=$a(te)*de+ie),u=ja(ut)*pe+oe,c=$a(ut)*de+ie;break;case Ue.R:s=u=i[S],l=c=i[S+1],f=i[S++],h=i[S++];var Ie=i[S++],ji=i[S++];if(p){var O=d[g++];if(m+O>y){var Nt=y-m;t.moveTo(f,h),t.lineTo(f+dg(Nt,Ie),h),Nt-=Ie,Nt>0&&t.lineTo(f+Ie,h+dg(Nt,ji)),Nt-=ji,Nt>0&&t.lineTo(f+vg(Ie-Nt,0),h+ji),Nt-=Ie,Nt>0&&t.lineTo(f,h+vg(ji-Nt,0));break e}m+=O}t.rect(f,h,Ie,ji);break;case Ue.Z:if(p){var O=d[g++];if(m+O>y){var L=(y-m)/O;t.lineTo(u*(1-L)+s*L,c*(1-L)+l*L);break e}m+=O}t.closePath(),u=s,c=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Ue,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})(),Dr=tk;function Ja(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-i)/(r-e),u=(r*i-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function pw(r,t,e,i,n,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>t+f&&c>i+f&&c>a+f&&c>s+f||c<t-f&&c<i-f&&c<a-f&&c<s-f||u>r+f&&u>e+f&&u>n+f&&u>o+f||u<r-f&&u<e-f&&u<n-f&&u<o-f)return!1;var h=Vb(r,t,e,i,n,a,o,s,u,c,null);return h<=f/2}function dw(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var c=Gb(r,t,e,i,n,a,s,l,null);return c<=u/2}var vw=Math.PI*2;function Au(r){return r%=vw,r<0&&(r+=vw),r}var Du=Math.PI*2;function mw(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>e||c+u<e)return!1;if(Math.abs(i-n)%Du<1e-4)return!0;if(a){var f=i;i=Au(n),n=Au(f)}else i=Au(i),n=Au(n);i>n&&(n+=Du);var h=Math.atan2(l,s);return h<0&&(h+=Du),h>=i&&h<=n||h+Du>=i&&h+Du<=n}function qr(r,t,e,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var jn=Dr.CMD,Qa=Math.PI*2,ok=1e-4;function sk(r,t){return Math.abs(r-t)<ok}var jt=[-1,-1,-1],jr=[-1,-1];function lk(){var r=jr[0];jr[0]=jr[1],jr[1]=r}function uk(r,t,e,i,n,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var c=ka(t,i,a,s,u,jt);if(c===0)return 0;for(var f=0,h=-1,p=void 0,d=void 0,v=0;v<c;v++){var m=jt[v],g=m===0||m===1?.5:1,y=Je(r,e,n,o,m);y<l||(h<0&&(h=Of(t,i,a,s,jr),jr[1]<jr[0]&&h>1&&lk(),p=Je(t,i,a,s,jr[0]),h>1&&(d=Je(t,i,a,s,jr[1]))),h===2?m<jr[0]?f+=p<t?g:-g:m<jr[1]?f+=d<p?g:-g:f+=s<d?g:-g:m<jr[0]?f+=p<t?g:-g:f+=s<p?g:-g)}return f}function ck(r,t,e,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=Hb(t,i,a,s,jt);if(l===0)return 0;var u=If(t,i,a);if(u>=0&&u<=1){for(var c=0,f=Tt(t,i,a,u),h=0;h<l;h++){var p=jt[h]===0||jt[h]===1?.5:1,d=Tt(r,e,n,jt[h]);d<o||(jt[h]<u?c+=f<t?p:-p:c+=a<f?p:-p)}return c}else{var p=jt[0]===0||jt[0]===1?.5:1,d=Tt(r,e,n,jt[0]);return d<o?0:a<t?p:-p}}function fk(r,t,e,i,n,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);jt[0]=-l,jt[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Qa-1e-4){i=0,n=Qa;var c=a?1:-1;return o>=jt[0]+r&&o<=jt[1]+r?c:0}if(i>n){var f=i;i=n,n=f}i<0&&(i+=Qa,n+=Qa);for(var h=0,p=0;p<2;p++){var d=jt[p];if(d+r>o){var v=Math.atan2(s,d),c=a?1:-1;v<0&&(v=Qa+v),(v>=i&&v<=n||v+Qa>=i&&v+Qa<=n)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),h+=c)}}return h}function gw(r,t,e,i,n){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,p,d=0;d<o;){var v=a[d++],m=d===1;switch(v===jn.M&&d>1&&(e||(s+=qr(l,u,c,f,i,n))),m&&(l=a[d],u=a[d+1],c=l,f=u),v){case jn.M:c=a[d++],f=a[d++],l=c,u=f;break;case jn.L:if(e){if(Ja(l,u,a[d],a[d+1],t,i,n))return!0}else s+=qr(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case jn.C:if(e){if(pw(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=uk(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case jn.Q:if(e){if(dw(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=ck(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case jn.A:var g=a[d++],y=a[d++],_=a[d++],x=a[d++],b=a[d++],S=a[d++];d+=1;var T=!!(1-a[d++]);h=Math.cos(b)*_+g,p=Math.sin(b)*x+y,m?(c=h,f=p):s+=qr(l,u,h,p,i,n);var A=(i-g)*x/_+g;if(e){if(mw(g,y,x,b,b+S,T,t,A,n))return!0}else s+=fk(g,y,x,b,b+S,T,A,n);l=Math.cos(b+S)*_+g,u=Math.sin(b+S)*x+y;break;case jn.R:c=l=a[d++],f=u=a[d++];var E=a[d++],M=a[d++];if(h=c+E,p=f+M,e){if(Ja(c,f,h,f,t,i,n)||Ja(h,f,h,p,t,i,n)||Ja(h,p,c,p,t,i,n)||Ja(c,p,c,f,t,i,n))return!0}else s+=qr(h,f,h,p,i,n),s+=qr(c,p,c,f,i,n);break;case jn.Z:if(e){if(Ja(l,u,c,f,t,i,n))return!0}else s+=qr(l,u,c,f,i,n);l=c,u=f;break}}return!e&&!sk(u,f)&&(s+=qr(l,u,c,f,i,n)||0),s!==0}function yw(r,t,e){return gw(r,0,!1,t,e)}function _w(r,t,e,i){return gw(r,t,!0,e,i)}var xg=he({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ni),pk={style:he({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Za.style)},_g=ss.concat(["invisible","culling","z","z2","zlevel","parent"]),dk=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<_g.length;++s)n[_g[s]]=this[_g[s]];n.__dirty|=pt}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var i=De(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=e[o];o==="style"?this.style?B(this.style,s):this.useStyle(s):o==="shape"?B(this.shape,s):r.prototype.attrKV.call(this,o,s)}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(e!=="none"){if(H(e)){var i=Ra(e,0);return i>.5?hu:i>.2?cS:pu}else if(e)return pu}return hu},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(H(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Ra(e,0)<fu;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~Bn},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 Dr(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Bn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),_w(s,l/u,e,i)))return!0}if(this.hasFill())return yw(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Bn,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){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:B(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Bn)},t.prototype.createStyle=function(e){return tn(xg,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){if(r.prototype._applyStateObj.call(this,e,i,n,a,o,s),this.__inHover!==fs){var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=B({},n.shape),B(u,i.shape)):(u=B({},a?this.shape:n.shape),B(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=B({},this.shape);for(var c={},f=De(u),h=0;h<f.length;h++){var p=f[h];typeof u[p]=="object"?this.shape[p]=u[p]:c[p]=u[p]}this._transitionState(e,{shape:c},s)}else this.shape=u,this.dirtyShape()}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return pk},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var i=(function(a){N(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ne(e.style)},o.prototype.getDefaultShape=function(){return ne(e.shape)},o})(t);for(var n in e)typeof e[n]=="function"&&(i.prototype[n]=e[n]);return i},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=pt|Na|Bn})(),t})(ki),ve=dk;var vk=he({strokeFirst:!0,font:Br,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},xg),xw=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return sg(this.style)},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return tn(vk,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=ow(this.style)),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(ki);xw.prototype.type="tspan";var Eu=xw;var mk=he({x:0,y:0},Ni),gk={style:he({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Za.style)};function yk(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var bw=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return tn(mk,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=yk(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return gk},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ue(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(ki);bw.prototype.type="image";var ur=bw;function Sw(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,c;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>n&&(f=s+l,s*=n/f,l*=n/f),u+c>n&&(f=u+c,u*=n/f,c*=n/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+c,i+a),c!==0&&r.arc(e+c,i+a-c,c,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5),r.closePath()}var Ss=Math.round;function lh(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(Ss(i*2)===Ss(n*2)&&(r.x1=r.x2=$n(i,s,!0)),Ss(a*2)===Ss(o*2)&&(r.y1=r.y2=$n(a,s,!0))),r}}function uh(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=$n(i,s,!0),r.y=$n(n,s,!0),r.width=Math.max($n(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max($n(n+o,s,!1)-r.y,o===0?0:1)),r}}function $n(r,t,e){if(!t)return r;var i=Ss(r*2);return(i+Ss(t))%2===0?i/2:(i+(e?1:-1))/2}var bk=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})();var Sk={},ww=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new bk},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=uh(Sk,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?Sw(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(ve);ww.prototype.type="rect";var Oe=ww;var Tw={fill:"#000"},Cw=2,zi={},wk={style:he({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},Za.style)},Pw=(function(r){N(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Tw,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Ek(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ue(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Tw},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var n=i.rich,a=e.rich||n&&{};return B(e,i),n&&a?(this._mergeRich(a,n),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,i){for(var n=De(i),a=0;a<n.length;a++){var o=n[a];e[o]=e[o]||{},B(e[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return wk},t.prototype._getOrCreateChild=function(e){var i=this._children[this._childCursor];return(!i||!(i instanceof e))&&(i=new e),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var e=this.style,i=e.font||Br,n=e.padding,a=this._defaultStyle,o=e.x||0,s=e.y||0,l=e.align||a.align||"left",u=e.verticalAlign||a.verticalAlign||"top";ag(zi,a.overflowRect,o,s,l,u),o=zi.baseX,s=zi.baseY;var c=Lw(e),f=iw(c,e,zi.outerWidth,zi.outerHeight),h=bg(e),p=!!e.backgroundColor,d=f.outerHeight,v=f.outerWidth,m=f.lines,g=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,_=sn(s,f.contentHeight,u);if(h||n){var x=Gn(o,v,l),b=sn(s,d,u);h&&this._renderBackground(e,e,x,b,v,d)}_+=g/2,n&&(y=Iw(o,l,n),u==="top"?_+=n[0]:u==="bottom"&&(_-=n[2]));for(var S=0,T=!1,A=!1,E=Ow("fill"in e?e.fill:(A=!0,a.fill)),M=Mw("stroke"in e?e.stroke:!p&&(!a.autoStroke||A)?(S=Cw,T=!0,a.stroke):null),O=e.textShadowBlur>0,L=0;L<m.length;L++){var I=this._getOrCreateChild(Eu),k=I.createStyle();I.useStyle(k),k.text=m[L],k.x=y,k.y=_,l&&(k.textAlign=l),k.textBaseline="middle",k.opacity=e.opacity,k.strokeFirst=!0,O&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||"transparent",k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=M,k.fill=E,M&&(k.lineWidth=e.lineWidth||S,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=i,Dw(k,e),_+=g,I.setBoundingRect(nh(k,f.contentWidth,f.calculatedLineHeight,T?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,i=this._defaultStyle,n=e.align||i.align,a=e.verticalAlign||i.verticalAlign,o=e.x||0,s=e.y||0;ag(zi,i.overflowRect,o,s,n,a),o=zi.baseX,s=zi.baseY;var l=Lw(e),u=nw(l,e,zi.outerWidth,zi.outerHeight,n),c=u.width,f=u.outerWidth,h=u.outerHeight,p=e.padding;this.isTruncated=!!u.isTruncated;var d=Gn(o,f,n),v=sn(s,h,a),m=d,g=v;p&&(m+=p[3],g+=p[0]);var y=m+c;bg(e)&&this._renderBackground(e,e,d,v,f,h);for(var _=!!e.backgroundColor,x=0;x<u.lines.length;x++){for(var b=u.lines[x],S=b.tokens,T=S.length,A=b.lineHeight,E=b.width,M=0,O=m,L=y,I=T-1,k=void 0;M<T&&(k=S[M],!k.align||k.align==="left");)this._placeToken(k,e,A,g,O,"left",_),E-=k.width,O+=k.width,M++;for(;I>=0&&(k=S[I],k.align==="right");)this._placeToken(k,e,A,g,L,"right",_),E-=k.width,L-=k.width,I--;for(O+=(c-(O-m)-(y-L)-E)/2;M<=I;)k=S[M],this._placeToken(k,e,A,g,O+k.width/2,"center",_),O+=k.width,M++;g+=A}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,f=a+n/2;c==="top"?f=a+e.height/2:c==="bottom"&&(f=a+n-e.height/2);var h=!e.isLineHolder&&bg(u);h&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,f-e.height/2,e.width,e.height);var p=!!u.backgroundColor,d=e.textPadding;d&&(o=Iw(o,s,d),f-=e.height/2-d[0]-e.innerHeight/2);var v=this._getOrCreateChild(Eu),m=v.createStyle();v.useStyle(m);var g=this._defaultStyle,y=!1,_=0,x=!1,b=Ow("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,g.fill)),S=Mw("stroke"in u?u.stroke:"stroke"in i?i.stroke:!p&&!l&&(!g.autoStroke||y)?(_=Cw,x=!0,g.stroke):null),T=u.textShadowBlur>0||i.textShadowBlur>0;m.text=e.text,m.x=o,m.y=f,T&&(m.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,m.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=e.font||Br,m.opacity=zr(u.opacity,i.opacity,1),Dw(m,u),S&&(m.lineWidth=zr(u.lineWidth,i.lineWidth,_),m.lineDash=Z(u.lineDash,i.lineDash),m.lineDashOffset=i.lineDashOffset||0,m.stroke=S),b&&(m.fill=b),v.setBoundingRect(nh(m,e.contentWidth,e.contentHeight,x?0:null))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,f=l&&l.image,h=l&&!f,p=e.borderRadius,d=this,v,m;if(h||e.lineHeight||u&&c){v=this._getOrCreateChild(Oe),v.useStyle(v.createStyle()),v.style.fill=null;var g=v.shape;g.x=n,g.y=a,g.width=o,g.height=s,g.r=p,v.dirtyShape()}if(h){var y=v.style;y.fill=l||null,y.fillOpacity=Z(e.fillOpacity,1)}else if(f){m=this._getOrCreateChild(ur),m.onload=function(){d.dirtyStyle()};var _=m.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Z(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(v||m).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=zr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return Dk(e)&&(i=[e.fontStyle,e.fontWeight,Ak(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Dt(i)||e.textFont||e.font},t})(ki),Tk={left:!0,right:1,center:1},Ck={top:1,bottom:1,middle:1},Aw=["fontStyle","fontWeight","fontSize","fontFamily"];function Ak(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?mf+"px":r+"px"}function Dw(r,t){for(var e=0;e<Aw.length;e++){var i=Aw[e],n=t[i];n!=null&&(r[i]=n)}}function Dk(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Ek(r){return Ew(r),w(r.rich,Ew),r}function Ew(r){if(r){r.font=Pw.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||Tk[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||Ck[e]?e:"top";var i=r.padding;i&&(r.padding=wa(r.padding))}}function Mw(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Ow(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Iw(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Lw(r){var t=r.text;return t!=null&&(t+=""),t}function bg(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var He=Pw;var _e=re(),Nw=function(r,t,e,i){if(i){var n=_e(i);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=_e(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}};var Jn="undefined",ch="series",fh=Y(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),At="original",yt="arrayRows",$t="objectRows",Er="keyedColumns",Mr="typedArray",Sg="unknown",Or="column",Vi="row";var Mk=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Ok=(function(){function r(t){w(Mk,function(e){this[e]=ee(t[e],t)},this)}return r})();function kw(r,t){return t.mainType===ch?r.getViewOfSeriesModel(t):r.getViewOfComponentModel(t)}var hh=Ok;var Rw=1,Fw={},Hw=re(),Cg=re(),Ag=0,Mu=1,Ou=2,Jt=["emphasis","blur","select"],Dg=["normal","emphasis","blur","select"],Ik=10,Lk=9,Qn="highlight",Iu="downplay",Lu="select",dh="unselect",Pu="toggleSelect",vh="selectchanged";function ws(r){return r!=null&&r!=="none"}function mh(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function Gw(r){mh(r,"emphasis",Ou)}function Yw(r){r.hoverState===Ou&&mh(r,"normal",Ag)}function Eg(r){mh(r,"blur",Mu)}function Ww(r){r.hoverState===Mu&&mh(r,"normal",Ag)}function Pk(r){r.selected=!0}function Nk(r){r.selected=!1}function Bw(r,t,e){t(r,e)}function pn(r,t,e){Bw(r,t,e),r.isGroup&&r.traverse(function(i){Bw(i,t,e)})}function Mg(r,t){switch(t){case"emphasis":r.hoverState=Ou;break;case"normal":r.hoverState=Ag;break;case"blur":r.hoverState=Mu;break;case"select":r.selected=!0}}function kk(r,t,e,i){for(var n=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=n[s];a[s]=l??(i&&i[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function Rk(r,t,e,i){var n=e&&ce(e,"select")>=0,a=!1;if(r instanceof ve){var o=Hw(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ws(s)||ws(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=B({},i),u=B({},u),u.fill=s):!ws(u.fill)&&ws(s)?(a=!0,i=B({},i),u=B({},u),u.fill=Ff(s)):!ws(u.stroke)&&ws(l)&&(a||(i=B({},i),u=B({},u)),u.stroke=Ff(l)),i.style=u}}if(i&&i.z2==null){a||(i=B({},i));var c=r.z2EmphasisLift;i.z2=r.z2+(c??Ik)}return i}function Fk(r,t,e){if(e&&e.z2==null){e=B({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??Lk)}return e}function Bk(r,t,e){var i=ce(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:kk(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:i?n:a.opacity*.1},o),e.style=o),e}function wg(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Rk(this,r,t,e);if(r==="blur")return Bk(this,r,e);if(r==="select")return Fk(this,r,e)}return e}function zk(r){r.stateProxy=wg;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=wg),e&&(e.stateProxy=wg)}function zw(r,t){!Zw(r,t)&&!r.__highByOuter&&pn(r,Gw)}function Vw(r,t){!Zw(r,t)&&!r.__highByOuter&&pn(r,Yw)}function dn(r,t){r.__highByOuter|=1<<(t||0),pn(r,Gw)}function vn(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&pn(r,Yw)}function gh(r){pn(r,Eg)}function Nu(r){pn(r,Ww)}function Og(r){pn(r,Pk)}function Ig(r){pn(r,Nk)}function Zw(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Lg(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=Cg(a),s=kw(r,a),l=n==="series";!l&&i.push(s),o.isBlured&&(s.group.traverse(function(u){Ww(u)}),l&&e.push(a)),o.isBlured=!1}),w(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Tg(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&Nu(h)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(e==="series"&&!c||e==="coordinateSystem"&&!h||t==="series"&&c)){var p=i.getViewOfSeriesModel(u);if(p.group.traverse(function(m){m.__highByOuter&&c&&t==="self"||Eg(m)}),ct(t))a(u.getData(),t);else if(W(t))for(var d=De(t),v=0;v<d.length;v++)a(u.getData(d[v]),t[d[v]]);l.push(u),Cg(u).isBlured=!0}}),n.eachComponent(function(u,c){if(u!=="series"){var f=i.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,n)}})}}function ph(r,t,e){if(!(r==null||t==null)){var i=e.getModel().getComponent(r,t);if(i){Cg(i).isBlured=!0;var n=e.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){Eg(a)})}}}function Xw(r,t,e){var i=r.seriesIndex,n=r.getData(t.dataType);if(n){var a=Zr(n,t);a=(F(a)?a[0]:a)||0;var o=n.getItemGraphicEl(a);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=_e(o);Tg(i,u.focus,u.blurScope,e)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&Tg(i,c,f,e)}}}function yh(r,t,e,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var a=i.getModel().getComponent(r,t);if(!a)return n;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(_e(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Kw(r,t,e){var i=_e(r),n=yh(i.componentMainType,i.componentIndex,i.componentHighDownName,e),a=n.dispatchers,o=n.focusSelf;a?(o&&ph(i.componentMainType,i.componentIndex,e),w(a,function(s){return zw(s,t)})):(Tg(i.seriesIndex,i.focus,i.blurScope,e),i.focus==="self"&&ph(i.componentMainType,i.componentIndex,e),zw(r,t))}function qw(r,t,e){Lg(e);var i=_e(r),n=yh(i.componentMainType,i.componentIndex,i.componentHighDownName,e).dispatchers;n?w(n,function(a){return Vw(a,t)}):Vw(r,t)}function jw(r,t,e){if(_h(t)){var i=t.dataType,n=r.getData(i),a=Zr(n,t);F(a)||(a=[a]),r[t.type===Pu?"toggleSelect":t.type===Lu?"select":"unselect"](a,i)}}function Pg(r){var t=r.getAllData();w(t,function(e){var i=e.data,n=e.type;i.eachItemGraphicEl(function(a,o){r.isSelected(o,n)?Og(a):Ig(a)})})}function $w(r){var t=[];return r.eachSeries(function(e){var i=e.getAllData();w(i,function(n){var a=n.data,o=n.type,s=e.getSelectedDataIndices();if(s.length>0){var l={dataIndex:s,seriesIndex:e.seriesIndex};o!=null&&(l.dataType=o),t.push(l)}})}),t}function ea(r,t,e){Jw(r,!0),pn(r,zk),Uk(r,t,e)}function Vk(r){Jw(r,!1)}function vi(r,t,e,i){i?Vk(r):ea(r,t,e)}function Uk(r,t,e){var i=_e(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var Uw=["emphasis","blur","select"],Hk={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function eo(r,t,e,i){e=e||"itemStyle";for(var n=0;n<Uw.length;n++){var a=Uw[n],o=t.getModel([a,e]),s=r.ensureState(a);s.style=i?i(o):o[Hk[e]]()}}function Jw(r,t){var e=t===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function ku(r){return!!(r&&r.__highDownDispatcher)}function Qw(r){var t=Fw[r];return t==null&&Rw<=32&&(t=Fw[r]=Rw++),t}function _h(r){var t=r.type;return t===Lu||t===dh||t===Pu}function Ng(r){var t=r.type;return t===Qn||t===Iu}function eT(r){var t=Hw(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var ot={};Sr(ot,{Arc:()=>ao,BezierCurve:()=>no,BoundingRect:()=>ue,Circle:()=>to,CompoundPath:()=>Th,Ellipse:()=>Fu,Group:()=>Ee,HOVER_LAYER_FOR_INCREMENTAL:()=>co,HOVER_LAYER_FROM_THRESHOLD:()=>Xg,HOVER_LAYER_NO:()=>Zg,Image:()=>ur,IncrementalDisplayable:()=>Ih,Line:()=>Qt,LinearGradient:()=>As,OrientedBoundingRect:()=>Oh,Path:()=>ve,Point:()=>ke,Polygon:()=>Gi,Polyline:()=>io,RadialGradient:()=>Ah,Rect:()=>Oe,Ring:()=>Vu,Sector:()=>Hi,Text:()=>He,WH:()=>uo,XY:()=>mn,applyTransform:()=>ho,calcZ2Range:()=>CR,clipPointsByRect:()=>ey,clipRectByRect:()=>ty,createIcon:()=>po,decomposeTransform:()=>DR,ensureCopyRect:()=>Ps,ensureCopyTransform:()=>Rh,expandOrShrinkRect:()=>Is,extendPath:()=>qg,extendShape:()=>Kg,getCurrentCanvasPainter:()=>ER,getShapeClass:()=>jg,getTransform:()=>Gu,groupTransition:()=>Qg,initProps:()=>Ot,isBoundingRectAxisAligned:()=>kh,isElementRemoved:()=>lo,lineLineIntersect:()=>LT,linePolygonIntersect:()=>wR,makeImage:()=>Hu,makePath:()=>Os,mergePath:()=>$g,payloadDisableAnimation:()=>AR,registerShape:()=>Ir,removeElement:()=>Es,removeElementWithFadeOut:()=>Ms,resizePath:()=>Nh,retrieveZInfo:()=>Yi,setTooltipConfig:()=>Ls,subPixelOptimize:()=>bR,subPixelOptimizeLine:()=>fo,subPixelOptimizeRect:()=>xR,transformDirection:()=>Jg,traverseElements:()=>gn,traverseUpdateZ:()=>Yu,updateProps:()=>Ke});var Ts=Dr.CMD,Gk=[[],[],[]],tT=Math.sqrt,Yk=Math.atan2;function kg(r,t){if(t){var e=r.data,i=r.len(),n,a,o,s,l,u,c=Ts.M,f=Ts.C,h=Ts.L,p=Ts.R,d=Ts.A,v=Ts.Q;for(o=0,s=0;o<i;){switch(n=e[o++],s=o,a=0,n){case c:a=1;break;case h:a=1;break;case f:a=3;break;case v:a=2;break;case d:var m=t[4],g=t[5],y=tT(t[0]*t[0]+t[1]*t[1]),_=tT(t[2]*t[2]+t[3]*t[3]),x=Yk(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=m,e[o]*=_,e[o++]+=g,e[o++]*=y,e[o++]*=_,e[o++]+=x,e[o++]+=x,o+=2,s=o;break;case p:u[0]=e[o++],u[1]=e[o++],ht(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],ht(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=Gk[l];b[0]=e[o++],b[1]=e[o++],ht(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var Rg=Math.sqrt,xh=Math.sin,bh=Math.cos,Ru=Math.PI;function rT(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Fg(r,t){return(r[0]*t[0]+r[1]*t[1])/(rT(r)*rT(t))}function iT(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Fg(r,t))}function nT(r,t,e,i,n,a,o,s,l,u,c){var f=l*(Ru/180),h=bh(f)*(r-e)/2+xh(f)*(t-i)/2,p=-1*xh(f)*(r-e)/2+bh(f)*(t-i)/2,d=h*h/(o*o)+p*p/(s*s);d>1&&(o*=Rg(d),s*=Rg(d));var v=(n===a?-1:1)*Rg((o*o*(s*s)-o*o*(p*p)-s*s*(h*h))/(o*o*(p*p)+s*s*(h*h)))||0,m=v*o*p/s,g=v*-s*h/o,y=(r+e)/2+bh(f)*m-xh(f)*g,_=(t+i)/2+xh(f)*m+bh(f)*g,x=iT([1,0],[(h-m)/o,(p-g)/s]),b=[(h-m)/o,(p-g)/s],S=[(-1*h-m)/o,(-1*p-g)/s],T=iT(b,S);if(Fg(b,S)<=-1&&(T=Ru),Fg(b,S)>=1&&(T=0),T<0){var A=Math.round(T/Ru*1e6)/1e6;T=Ru*2+A%2*Ru}c.addData(u,y,_,o,s,x,T,f,a)}var Wk=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Zk=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Xk(r){var t=new Dr;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Dr.CMD,l=r.match(Wk);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,p=c.match(Zk)||[],d=p.length,v=0;v<d;v++)p[v]=parseFloat(p[v]);for(var m=0;m<d;){var g=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0,A=e,E=i,M=void 0,O=void 0;switch(f){case"l":e+=p[m++],i+=p[m++],h=s.L,t.addData(h,e,i);break;case"L":e=p[m++],i=p[m++],h=s.L,t.addData(h,e,i);break;case"m":e+=p[m++],i+=p[m++],h=s.M,t.addData(h,e,i),n=e,a=i,f="l";break;case"M":e=p[m++],i=p[m++],h=s.M,t.addData(h,e,i),n=e,a=i,f="L";break;case"h":e+=p[m++],h=s.L,t.addData(h,e,i);break;case"H":e=p[m++],h=s.L,t.addData(h,e,i);break;case"v":i+=p[m++],h=s.L,t.addData(h,e,i);break;case"V":i=p[m++],h=s.L,t.addData(h,e,i);break;case"C":h=s.C,t.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),e=p[m-2],i=p[m-1];break;case"c":h=s.C,t.addData(h,p[m++]+e,p[m++]+i,p[m++]+e,p[m++]+i,p[m++]+e,p[m++]+i),e+=p[m-2],i+=p[m-1];break;case"S":g=e,y=i,M=t.len(),O=t.data,o===s.C&&(g+=e-O[M-4],y+=i-O[M-3]),h=s.C,A=p[m++],E=p[m++],e=p[m++],i=p[m++],t.addData(h,g,y,A,E,e,i);break;case"s":g=e,y=i,M=t.len(),O=t.data,o===s.C&&(g+=e-O[M-4],y+=i-O[M-3]),h=s.C,A=e+p[m++],E=i+p[m++],e+=p[m++],i+=p[m++],t.addData(h,g,y,A,E,e,i);break;case"Q":A=p[m++],E=p[m++],e=p[m++],i=p[m++],h=s.Q,t.addData(h,A,E,e,i);break;case"q":A=p[m++]+e,E=p[m++]+i,e+=p[m++],i+=p[m++],h=s.Q,t.addData(h,A,E,e,i);break;case"T":g=e,y=i,M=t.len(),O=t.data,o===s.Q&&(g+=e-O[M-4],y+=i-O[M-3]),e=p[m++],i=p[m++],h=s.Q,t.addData(h,g,y,e,i);break;case"t":g=e,y=i,M=t.len(),O=t.data,o===s.Q&&(g+=e-O[M-4],y+=i-O[M-3]),e+=p[m++],i+=p[m++],h=s.Q,t.addData(h,g,y,e,i);break;case"A":_=p[m++],x=p[m++],b=p[m++],S=p[m++],T=p[m++],A=e,E=i,e=p[m++],i=p[m++],h=s.A,nT(A,E,e,i,S,T,_,x,b,h,t);break;case"a":_=p[m++],x=p[m++],b=p[m++],S=p[m++],T=p[m++],A=e,E=i,e+=p[m++],i+=p[m++],h=s.A,nT(A,E,e,i,S,T,_,x,b,h,t);break}}(f==="z"||f==="Z")&&(h=s.Z,t.addData(h),e=n,i=a),o=h}return t.toStatic(),t}var aT=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(ve);function oT(r){return r.setData!=null}function sT(r,t){var e=Xk(r),i=B({},t);return i.buildPath=function(n){var a=oT(n);if(a&&n.canSave()){n.appendPath(e);var o=n.getContext();o&&n.rebuildPath(o,1)}else{var o=a?n.getContext():n;o&&e.rebuildPath(o,1)}},i.applyTransform=function(n){kg(e,n),this.dirtyShape()},i}function lT(r,t){return new aT(sT(r,t))}function uT(r,t){var e=sT(r,t),i=(function(n){N(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})(aT);return i}function cT(r,t){for(var e=[],i=r.length,n=0;n<i;n++){var a=r[n];e.push(a.getUpdatedPathProxy(!0))}var o=new ve(t);return o.createPathProxy(),o.buildPath=function(s){if(oT(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var qk=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})();var fT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new qk},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t})(ve);fT.prototype.type="circle";var to=fT;var jk=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})();var hT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new jk},t.prototype.buildPath=function(e,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*n,c=l*n;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),e.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),e.closePath()},t})(ve);hT.prototype.type="ellipse";var Fu=hT;var dT=Math.PI,Bg=dT*2,ro=Math.sin,Cs=Math.cos,$k=Math.acos,Ut=Math.atan2,pT=Math.abs,zu=Math.sqrt,Bu=Math.max,Ui=Math.min,mi=1e-4;function Jk(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,c=o-n,f=s-a,h=f*l-c*u;if(!(h*h<mi))return h=(c*(t-a)-f*(r-n))/h,[r+h*l,t+h*u]}function Sh(r,t,e,i,n,a,o){var s=r-e,l=t-i,u=(o?a:-a)/zu(s*s+l*l),c=u*l,f=-u*s,h=r+c,p=t+f,d=e+c,v=i+f,m=(h+d)/2,g=(p+v)/2,y=d-h,_=v-p,x=y*y+_*_,b=n-a,S=h*v-d*p,T=(_<0?-1:1)*zu(Bu(0,b*b*x-S*S)),A=(S*_-y*T)/x,E=(-S*y-_*T)/x,M=(S*_+y*T)/x,O=(-S*y+_*T)/x,L=A-m,I=E-g,k=M-m,z=O-g;return L*L+I*I>k*k+z*z&&(A=M,E=O),{cx:A,cy:E,x0:-c,y0:-f,x1:A*(n/b-1),y1:E*(n/b-1)}}function Qk(r){var t;if(F(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function vT(r,t){var e,i=Bu(t.r,0),n=Bu(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,p=pT(u-l),d=p>Bg&&p%Bg;if(d>mi&&(p=d),!(i>mi))r.moveTo(c,f);else if(p>Bg-mi)r.moveTo(c+i*Cs(l),f+i*ro(l)),r.arc(c,f,i,l,u,!h),n>mi&&(r.moveTo(c+n*Cs(u),f+n*ro(u)),r.arc(c,f,n,u,l,h));else{var v=void 0,m=void 0,g=void 0,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0,A=void 0,E=void 0,M=void 0,O=void 0,L=void 0,I=void 0,k=void 0,z=i*Cs(l),V=i*ro(l),q=n*Cs(u),G=n*ro(u),j=p>mi;if(j){var oe=t.cornerRadius;oe&&(e=Qk(oe),v=e[0],m=e[1],g=e[2],y=e[3]);var ie=pT(i-n)/2;if(_=Ui(ie,g),x=Ui(ie,y),b=Ui(ie,v),S=Ui(ie,m),E=T=Bu(_,x),M=A=Bu(b,S),(T>mi||A>mi)&&(O=i*Cs(u),L=i*ro(u),I=n*Cs(l),k=n*ro(l),p<dT)){var pe=Jk(z,V,I,k,O,L,q,G);if(pe){var de=z-pe[0],te=V-pe[1],Te=O-pe[0],Pe=L-pe[1],vt=1/ro($k((de*Te+te*Pe)/(zu(de*de+te*te)*zu(Te*Te+Pe*Pe)))/2),bt=zu(pe[0]*pe[0]+pe[1]*pe[1]);E=Ui(T,(i-bt)/(vt+1)),M=Ui(A,(n-bt)/(vt-1))}}}if(!j)r.moveTo(c+z,f+V);else if(E>mi){var ze=Ui(g,E),ut=Ui(y,E),Ce=Sh(I,k,z,V,i,ze,h),Ie=Sh(O,L,q,G,i,ut,h);r.moveTo(c+Ce.cx+Ce.x0,f+Ce.cy+Ce.y0),E<T&&ze===ut?r.arc(c+Ce.cx,f+Ce.cy,E,Ut(Ce.y0,Ce.x0),Ut(Ie.y0,Ie.x0),!h):(ze>0&&r.arc(c+Ce.cx,f+Ce.cy,ze,Ut(Ce.y0,Ce.x0),Ut(Ce.y1,Ce.x1),!h),r.arc(c,f,i,Ut(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Ut(Ie.cy+Ie.y1,Ie.cx+Ie.x1),!h),ut>0&&r.arc(c+Ie.cx,f+Ie.cy,ut,Ut(Ie.y1,Ie.x1),Ut(Ie.y0,Ie.x0),!h))}else r.moveTo(c+z,f+V),r.arc(c,f,i,l,u,!h);if(!(n>mi)||!j)r.lineTo(c+q,f+G);else if(M>mi){var ze=Ui(v,M),ut=Ui(m,M),Ce=Sh(q,G,O,L,n,-ut,h),Ie=Sh(z,V,I,k,n,-ze,h);r.lineTo(c+Ce.cx+Ce.x0,f+Ce.cy+Ce.y0),M<A&&ze===ut?r.arc(c+Ce.cx,f+Ce.cy,M,Ut(Ce.y0,Ce.x0),Ut(Ie.y0,Ie.x0),!h):(ut>0&&r.arc(c+Ce.cx,f+Ce.cy,ut,Ut(Ce.y0,Ce.x0),Ut(Ce.y1,Ce.x1),!h),r.arc(c,f,n,Ut(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Ut(Ie.cy+Ie.y1,Ie.cx+Ie.x1),h),ze>0&&r.arc(c+Ie.cx,f+Ie.cy,ze,Ut(Ie.y1,Ie.x1),Ut(Ie.y0,Ie.x0),!h))}else r.lineTo(c+q,f+G),r.arc(c,f,n,u,l,h)}r.closePath()}}}var tR=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})();var mT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new tR},t.prototype.buildPath=function(e,i){vT(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(ve);mT.prototype.type="sector";var Hi=mT;var rR=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})();var gT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new rR},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t})(ve);gT.prototype.type="ring";var Vu=gT;function zg(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,c,f;if(i){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,p=r.length;h<p;h++)Vr(c,c,r[h]),Ur(f,f,r[h]);Vr(c,c,i[0]),Ur(f,f,i[1])}for(var h=0,p=r.length;h<p;h++){var d=r[h];if(e)l=r[h?h-1:p-1],u=r[(h+1)%p];else if(h===0||h===p-1){n.push(Kv(r[h]));continue}else l=r[h-1],u=r[h+1];jl(a,u,l),$l(a,a,t);var v=Jl(d,l),m=Jl(d,u),g=v+m;g!==0&&(v/=g,m/=g),$l(o,a,-v),$l(s,a,m);var y=xf([],d,o),_=xf([],d,s);i&&(Ur(y,y,c),Vr(y,y,f),Ur(_,_,c),Vr(_,_,f)),n.push(y),n.push(_)}return e&&n.push(n.shift()),n}function wh(r,t,e){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=zg(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,f=n.length;s<f;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var iR=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})();var _T=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new iR},t.prototype.buildPath=function(e,i){wh(e,i,!0)},t})(ve);_T.prototype.type="polygon";var Gi=_T;var nR=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})();var xT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nR},t.prototype.buildPath=function(e,i){wh(e,i,!1)},t})(ve);xT.prototype.type="polyline";var io=xT;var aR={},oR=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();var bT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new oR},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=lh(aR,i,this.style);n=l.x1,a=l.y1,o=l.x2,s=l.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(n,a),u<1&&(o=n*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var i=this.shape;return[i.x1*(1-e)+i.x2*e,i.y1*(1-e)+i.y2*e]},t})(ve);bT.prototype.type="line";var Qt=bT;var cr=[],sR=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function ST(r,t,e){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(e?vm:Je)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?vm:Je)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?mm:Tt)(r.x1,r.cpx1,r.x2,t),(e?mm:Tt)(r.y1,r.cpy1,r.y2,t)]}var wT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new sR},t.prototype.buildPath=function(e,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,f=i.cpy2,h=i.percent;h!==0&&(e.moveTo(n,a),c==null||f==null?(h<1&&(is(n,l,o,h,cr),l=cr[1],o=cr[2],is(a,u,s,h,cr),u=cr[1],s=cr[2]),e.quadraticCurveTo(l,u,o,s)):(h<1&&(rs(n,l,c,o,h,cr),l=cr[1],c=cr[2],o=cr[3],rs(a,u,f,s,h,cr),u=cr[1],f=cr[2],s=cr[3]),e.bezierCurveTo(l,u,c,f,o,s)))},t.prototype.pointAt=function(e){return ST(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=ST(this.shape,e,!0);return Ca(i,i)},t})(ve);wT.prototype.type="bezier-curve";var no=wT;var lR=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})();var TT=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new lR},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(s),f=Math.sin(s);e.moveTo(c*o+n,f*o+a),e.arc(n,a,o,s,l,!u)},t})(ve);TT.prototype.type="arc";var ao=TT;var uR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),n=0;n<e.length;n++)i=i||e[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(i[0],i[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(e,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],i=0;i<e.length;i++)e[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ve.prototype.getBoundingRect.call(this)},t})(ve),Th=uR;var cR=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),Ch=cR;var fR=(function(r){N(t,r);function t(e,i,n,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(Ch),As=fR;var hR=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t})(Ch),Ah=hR;var Vg=Math.min,pR=Math.max,Dh=Math.abs,oo=[0,0],so=[0,0],Mt=cm(),Eh=Mt.minTv,Mh=Mt.maxTv,dR=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ke;for(var i=0;i<2;i++)this._axes[i]=new ke;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),e)for(var u=0;u<4;u++)i[u].transform(e);ke.sub(n[0],i[1],i[0]),ke.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(t,e,i){var n=!0,a=!e;return e&&ke.set(e,0,0),Mt.reset(i,!a),!this._intersectCheckOneSide(this,t,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(n=!1,a)||!a&&!Mt.negativeSize&&ke.copy(e,n?Mt.useDir?Mt.dirMinTv:Eh:Mh),n},r.prototype._intersectCheckOneSide=function(t,e,i,n){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,oo),t._getProjMinMaxOnAxis(o,e._corners,so),Mt.negativeSize||oo[1]<so[0]||oo[0]>so[1]){if(a=!1,Mt.negativeSize||i)return a;var l=Dh(so[0]-oo[1]),u=Dh(oo[0]-so[1]);Vg(l,u)>Mh.len()&&(l<u?ke.scale(Mh,s,-l*n):ke.scale(Mh,s,u*n))}else if(!i){var l=Dh(so[0]-oo[1]),u=Dh(oo[0]-so[1]);(Mt.useDir||Vg(l,u)<Eh.len())&&((l<u||!Mt.bidirectional)&&(ke.scale(Eh,s,l*n),Mt.useDir&&Mt.calcDirMTV()),(l>=u||!Mt.bidirectional)&&(ke.scale(Eh,s,-u*n),Mt.useDir&&Mt.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u<e.length;u++){var c=e[u].dot(n)+a[t];s=Vg(c,s),l=pR(c,l)}i[0]=s+Mt.touchThreshold,i[1]=l-Mt.touchThreshold,Mt.negativeSize=i[1]<i[0]},r})(),Oh=dR;var Ug=0,CT=1,AT=2,DT=1,Ds=0;var vR=[],mR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=CT,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},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,i){i?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,i){i=i||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var i=this._cursor;i<this._displayables.length;i++)e&&e(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)e&&e(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.parent=this,i.update(),i.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ue(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(vR)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,i))return!0}return!1},t})(ki),Ih=mR;var gR=re();function yR(r,t,e,i,n){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;i?(u=Z(i.duration,200),c=Z(i.easing,"cubicOut"),f=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),f=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),$(f)&&(f=f(e,n)),$(u)&&(u=u(e));var h={duration:u||0,delay:f,easing:c};return h}else return null}function Hg(r,t,e,i,n,a,o){var s=!1,l;$(n)?(o=a,a=n,n=null):W(n)&&(a=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var c=yR(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,n):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,p=c.easing,d={duration:f,delay:h||0,easing:p,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Ke(r,t,e,i,n,a){Hg("update",r,t,e,i,n,a)}function Ot(r,t,e,i,n,a){Hg("enter",r,t,e,i,n,a)}function lo(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function Es(r,t,e,i,n,a){lo(r)||Hg("leave",r,t,e,i,n,a)}function ET(r,t,e,i){r.removeTextContent(),r.removeTextGuideLine(),Es(r,{style:{opacity:0}},t,e,i)}function Ms(r,t,e){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||ET(n,t,e,i)}):ET(r,t,e,i)}function Lh(r){gR(r).oldStyle=r.style}var Yg={},mn=["x","y"],uo=["width","height"],Zg=0,Xg=1,co=2;function Kg(r){return ve.extend(r)}var _R=uT;function qg(r,t){return _R(r,t)}function Ir(r,t){Yg[r]=t}function jg(r){if(Yg.hasOwnProperty(r))return Yg[r]}function Os(r,t,e,i){var n=lT(r,t);return e&&(i==="center"&&(e=IT(e,n.getBoundingRect())),Nh(n,e)),n}function Hu(r,t,e){var i=new ur({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var a={width:n.width,height:n.height};i.setStyle(IT(t,a))}}});return i}function IT(r,t){var e=t.width/t.height,i=r.height*e,n;i<=r.width?n=r.height:(i=r.width,n=i/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-i/2,y:o-n/2,width:i,height:n}}var $g=cT;function Nh(r,t){if(r.applyTransform){var e=r.getBoundingRect(),i=e.calculateTransform(t);r.applyTransform(i)}}function fo(r,t){return lh(r,r,{lineWidth:t}),r}function xR(r,t){return uh(r,r,t),r}var bR=$n;function Gu(r,t){for(var e=Hr([]);r&&r!==t;)li(e,r.getLocalTransform(),e),r=r.parent;return e}function ho(r,t,e){return t&&!ct(t)&&(t=us.getLocalTransform(t)),e&&(t=Tr([],t)),ht([],r,t)}function Jg(r,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Ge(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:Ge(2*t[4]/t[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=ho(a,t,e),Ge(a[0])>Ge(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function MT(r){return!r.isGroup}function SR(r){return r.shape!=null}function Qg(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){MT(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return SR(o)&&(s.shape=ne(o.shape)),s}var a=i(r);t.traverse(function(o){if(MT(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Ke(o,l,e,_e(o).dataIndex)}}})}function ey(r,t){return U(r,function(e){var i=e[0];i=Se(i,t.x),i=Xe(i,t.x+t.width);var n=e[1];return n=Se(n,t.y),n=Xe(n,t.y+t.height),[i,n]})}function ty(r,t){var e=Se(r.x,t.x),i=Xe(r.x+r.width,t.x+t.width),n=Se(r.y,t.y),a=Xe(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function po(r,t,e){var i=B({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),he(n,e),new ur(i)):Os(r.replace("path://",""),i,e,"center")}function wR(r,t,e,i,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(LT(r,t,e,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function LT(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,c=o-n,f=s-a,h=Gg(c,f,l,u);if(TR(h))return!1;var p=r-n,d=t-a,v=Gg(p,d,l,u)/h;if(v<0||v>1)return!1;var m=Gg(p,d,c,f)/h;return!(m<0||m>1)}function Gg(r,t,e,i){return r*i-e*t}function TR(r){return r<=1e-6&&r>=-1e-6}function Is(r,t,e,i,n){return t==null||(ge(t)?qe[0]=qe[1]=qe[2]=qe[3]=t:(qe[0]=t[0],qe[1]=t[1],qe[2]=t[2],qe[3]=t[3]),i&&(qe[0]=Se(0,qe[0]),qe[1]=Se(0,qe[1]),qe[2]=Se(0,qe[2]),qe[3]=Se(0,qe[3])),e&&(qe[0]=-qe[0],qe[1]=-qe[1],qe[2]=-qe[2],qe[3]=-qe[3]),OT(r,qe,"x","width",3,1,n&&n[0]||0),OT(r,qe,"y","height",0,2,n&&n[1]||0)),r}var qe=[0,0,0,0];function OT(r,t,e,i,n,a,o){var s=t[a]+t[n],l=r[i];r[i]+=s,o=Se(0,Xe(o,l)),r[i]<o?(r[i]=o,r[e]+=t[n]>=0?-t[n]:t[a]>=0?l+t[a]:Ge(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function Ls(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=H(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&w(De(l),function(c){We(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=_e(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:he({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Wg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function gn(r,t){if(r)if(F(r))for(var e=0;e<r.length;e++)Wg(r[e],t);else Wg(r,t)}function kh(r){return!r||Ge(r[1])<Ph&&Ge(r[2])<Ph||Ge(r[0])<Ph&&Ge(r[3])<Ph}var Ph=1e-5;function Ps(r,t){return r?ue.copy(r,t):t.clone()}function Rh(r,t){return t?Aa(r||kt(),t):void 0}function Yi(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function CR(r){var t=-1/0,e=1/0;Wg(r,function(a){i(a),i(a.getTextContent()),i(a.getTextGuideLine())});function i(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)n(a.states[o[s]]);n(a)}}function n(a){if(a){var o=a.z2;o>t&&(t=o),o<e&&(e=o)}}return e>t&&(e=t=0),{min:e,max:t}}function Yu(r,t,e){PT(r,t,e,-1/0)}function PT(r,t,e,i){if(r.ignoreModelZ)return i;var n=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)i=Se(PT(s[l],t,e,i),i);else r.z=t,r.zlevel=e,i=Se(r.z2||0,i);if(n&&(n.z=t,n.zlevel=e,isFinite(i)&&(n.z2=i+2)),a){var u=r.textGuideLineConfig;a.z=t,a.zlevel=e,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function AR(r){return r.animation={duration:0},r}function DR(r,t){return t?Aa(Uu.transform,t):Hr(Uu.transform),Uu.decomposeTransform(),ls(r,Uu),r}var Uu=new us;Uu.transform=kt();function ER(r){var t=r.getZr().painter;return t.getType()==="canvas"?t:null}Ir("circle",to);Ir("ellipse",Fu);Ir("sector",Hi);Ir("ring",Vu);Ir("polygon",Gi);Ir("polyline",io);Ir("rect",Oe);Ir("line",Qt);Ir("bezierCurve",no);Ir("arc",ao);var Fh={};function MR(r,t){for(var e=0;e<Jt.length;e++){var i=Jt[e],n=t[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function NT(r,t,e){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=$(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<Jt.length;u++){var c=Jt[u],f=t[c];l[c]=Z(i?i.getFormattedLabel(n,c,null,a,f&&f.get("formatter")):null,s)}return l}function $r(r,t,e,i){e=e||Fh;for(var n=r instanceof He,a=!1,o=0;o<Dg.length;o++){var s=t[Dg[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new He,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=NT(e,t),c=t.normal,f=!!c.getShallow("show"),h=Lr(c,i&&i.normal,e,!1,!n);h.text=u.normal,n||r.setTextConfig(kT(c,e,!1));for(var o=0;o<Jt.length;o++){var p=Jt[o],s=t[p];if(s){var d=l.ensureState(p),v=!!Z(s.getShallow("show"),f);if(v!==f&&(d.ignore=!v),d.style=Lr(s,i&&i[p],e,!0,!n),d.style.text=u[p],!n){var m=r.ensureState(p);m.textConfig=kT(s,e,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),e.enableTextSetter&&(Ns(l).setLabelText=function(g){var y=NT(e,t,g);MR(l,y)})}else l&&(l.ignore=!0);r.dirty()}function fr(r,t){t=t||"label";for(var e={normal:r.getModel(t)},i=0;i<Jt.length;i++){var n=Jt[i];e[n]=r.getModel([n,t])}return e}function Lr(r,t,e,i,n){var a={};return OR(a,r,e,i,n),t&&B(a,t),a}function kT(r,t,e){t=t||{};var i={},n,a=r.getShallow("rotate"),o=Z(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(i.position=n),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(i.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(i.layoutRect=t.layoutRect),i}function OR(r,t,e,i,n){e=e||Fh;var a=t.ecModel,o=a&&a.option.textStyle,s=IR(t),l;if(s){l={};var u="richInheritPlainLabel",c=Z(t.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var h=t.getModel(["rich",f]);zT(l[f]={},h,o,t,c,e,i,n,!1,!0)}}l&&(r.rich=l);var p=t.get("overflow");p&&(r.overflow=p);var d=t.get("lineOverflow");d&&(r.lineOverflow=d);var v=r,m=t.get("minMargin");if(m!=null)m=ge(m)?m/2:0,v.margin=[m,m,m,m],v.__marginType=vo.minMargin;else{var g=t.get("textMargin");g!=null&&(v.margin=wa(g),v.__marginType=vo.textMargin)}zT(r,t,o,null,null,e,i,n,!0,!1)}function IR(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Fh).rich;if(e){t=t||{};for(var i=De(e),n=0;n<i.length;n++){var a=i[n];t[a]=1}}r=r.parentModel}return t}var RT=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],FT=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],BT=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function zT(r,t,e,i,n,a,o,s,l,u){e=!o&&e||Fh;var c=a&&a.inheritColor,f=t.getShallow("color"),h=t.getShallow("textBorderColor"),p=Z(t.getShallow("opacity"),e.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(h==="inherit"||h==="auto")&&(c?h=c:h=null),s||(f=f||e.color,h=h||e.textBorderColor),f!=null&&(r.fill=f),h!=null&&(r.stroke=h);var d=Z(t.getShallow("textBorderWidth"),e.textBorderWidth);d!=null&&(r.lineWidth=d);var v=Z(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var m=Z(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);m!=null&&(r.lineDashOffset=m),!o&&p==null&&!u&&(p=a&&a.defaultOpacity),p!=null&&(r.opacity=p),!o&&!s&&r.fill==null&&a.inheritColor&&(r.fill=a.inheritColor);for(var g=0;g<RT.length;g++){var y=RT[g],_=n!==!1&&i?zr(t.getShallow(y),i.getShallow(y),e[y]):Z(t.getShallow(y),e[y]);_!=null&&(r[y]=_)}for(var g=0;g<FT.length;g++){var y=FT[g],_=t.getShallow(y);_!=null&&(r[y]=_)}if(r.verticalAlign==null){var x=t.getShallow("baseline");x!=null&&(r.verticalAlign=x)}if(!l||!a.disableBox){for(var g=0;g<BT.length;g++){var y=BT[g],_=t.getShallow(y);_!=null&&(r[y]=_)}var b=t.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function VT(r,t){var e=t&&t.getModel("textStyle");return Dt([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Ns=re();function UT(r,t,e,i){if(r){var n=Ns(r);n.prevValue=n.value,n.value=e;var a=t.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=t)}}var vo={minMargin:1,textMargin:2};var LR=["textStyle","color"],ry=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],iy=new He,PR=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(LR):null)},r.prototype.getFont=function(){return VT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<ry.length;i++)e[ry[i]]=this.getShallow(ry[i]);return iy.useStyle(e),iy.update(),iy.getBoundingRect()},r})(),HT=PR;var ny=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],NR=Pi(ny),GT=(function(){function r(){}return r.prototype.getLineStyle=function(t){return NR(this,t)},r})();var ay=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],kR=Pi(ay),YT=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return kR(this,t,e)},r})();var mo=(function(){function r(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return r.prototype.init=function(t,e,i){for(var n=[],a=3;a<arguments.length;a++)n[a-3]=arguments[a]},r.prototype.mergeOption=function(t,e){me(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var i=this.option,n=i==null?i:i[t];if(n==null&&!e){var a=this.parentModel;a&&(n=a.getShallow(t))}return n},r.prototype.getModel=function(t,e){var i=t!=null,n=i?this.parsePath(t):null,a=i?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(ne(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!fe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&!(t[n]&&(i=i&&typeof i=="object"?i[t[n]]:null,i==null));n++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},r})();xs(mo);XS(mo);mt(mo,GT);mt(mo,YT);mt(mo,KS);mt(mo,HT);var Re=mo;var RR=Math.round(Math.random()*10);function ta(r){return[r||"",RR++].join("_")}function WT(r){var t={};r.registerSubTypeDefaulter=function(e,i){var n=lr(e);t[n.main]=i},r.determineSubType=function(e,i){var n=i.type;if(!n){var a=lr(e).main;r.hasSubTypes(e)&&t[a]&&(n=t[a](i))}return n}}function ZT(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),c=u.graph,f=u.noEntryList,h={};for(w(a,function(y){h[y]=!0});f.length;){var p=f.pop(),d=c[p],v=!!h[p];v&&(s.call(l,p,d.originalDeps.slice()),delete h[p]),w(d.successor,v?g:m)}w(h,function(){var y="";throw new Error(y)});function m(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function g(y){h[y]=!0,m(y)}};function e(a){var o={},s=[];return w(a,function(l){var u=i(o,l),c=u.originalDeps=t(l),f=n(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),w(f,function(h){ce(u.predecessor,h)<0&&u.predecessor.push(h);var p=i(o,h);ce(p.successor,h)<0&&p.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function n(a,o){var s=[];return w(a,function(l){ce(o,l)>=0&&s.push(l)}),s}}function ra(r,t){return me(me({},r,!0),t,!0)}var XT={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:". "}}}};var KT={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 zh="ZH",sy="EN",ks=sy,Bh={},ly={},Vh=fe.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ks).toUpperCase();return r.indexOf(zh)>-1?zh:ks})():ks;function Uh(r,t){r=r.toUpperCase(),ly[r]=new Re(t),Bh[r]=t}function qT(r){if(H(r)){var t=Bh[r.toUpperCase()]||{};return r===zh||r===sy?ne(t):me(ne(t),ne(Bh[ks]),!1)}else return me(ne(r),ne(Bh[ks]),!1)}function jT(r){return ly[r]}function $T(){return ly[ks]}Uh(sy,XT);Uh(zh,KT);var FR=null;function it(){return FR}function Hh(r,t){var e=it(),i=t.breakOption,n=t.breakParsed;return!n&&e&&(n=e.parseAxisBreakOption(i,r)),n}function go(r){var t=r.brk;return t?t.breaks:[]}function yo(r){var t=r.brk;return t?t.hasBreaks():!1}var Wh=1e3,Zh=Wh*60,Rs=Zh*60,Pr=Rs*24,uy=Pr*365,BR={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Yh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},zR="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Gh="{yyyy}-{MM}-{dd}",cy={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gh,hour:Gh+" "+Yh.hour,minute:Gh+" "+Yh.minute,second:Gh+" "+Yh.second,millisecond:zR},hr=["year","month","day","hour","minute","second","millisecond"],JT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function QT(r){return!H(r)&&!$(r)?VR(r):r}function VR(r){r=r||{};var t={},e=!0;return w(hr,function(i){e&&(e=r[i]==null)}),w(hr,function(i,n){var a=r[i];t[i]={};for(var o=null,s=n;s>=0;s--){var l=hr[s],u=W(a)&&!F(a)?a[l]:a,c=void 0;F(u)?(c=u.slice(),o=c[0]||""):H(u)?(o=u,c=[o]):(o==null?o=Yh[i]:BR[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],e&&(c[1]="{primary|"+o+"}")),t[i][l]=c}}),t}function Ht(r,t){return r+="","0000".substr(0,t-r.length)+r}function Fs(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function eC(r){return r===Fs(r)}function tC(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function yn(r,t,e,i){var n=qt(r),a=n[fy(e)](),o=n[Xh(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[Kh(e)](),u=n["get"+(e?"UTC":"")+"Day"](),c=n[qh(e)](),f=(c-1)%12+1,h=n[jh(e)](),p=n[$h(e)](),d=n[Jh(e)](),v=c>=12?"pm":"am",m=v.toUpperCase(),g=i instanceof Re?i:jT(i||Vh)||$T(),y=g.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Ht(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Ht(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ht(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ht(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Ht(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Ht(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Ht(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Ht(d,3)).replace(/{S}/g,d+"")}function rC(r,t,e,i,n){var a=null;if(H(e))a=e;else if($(e)){var o={time:r.time,level:r.time?r.time.level:0},s=it();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=_o(r.value,n);a=e[c][c][0]}}return yn(new Date(r.value),a,n,i)}function _o(r,t){var e=qt(r),i=e[Xh(t)]()+1,n=e[Kh(t)](),a=e[qh(t)](),o=e[jh(t)](),s=e[$h(t)](),l=e[Jh(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,p=h&&n===1,d=p&&i===1;return d?"year":p?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Bs(r,t,e){switch(t){case"year":r[hy(e)](0);case"month":r[py(e)](1);case"day":r[dy(e)](0);case"hour":r[vy(e)](0);case"minute":r[my(e)](0);case"second":r[gy(e)](0)}return r}function fy(r){return r?"getUTCFullYear":"getFullYear"}function Xh(r){return r?"getUTCMonth":"getMonth"}function Kh(r){return r?"getUTCDate":"getDate"}function qh(r){return r?"getUTCHours":"getHours"}function jh(r){return r?"getUTCMinutes":"getMinutes"}function $h(r){return r?"getUTCSeconds":"getSeconds"}function Jh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function iC(r){return r?"setUTCFullYear":"setFullYear"}function hy(r){return r?"setUTCMonth":"setMonth"}function py(r){return r?"setUTCDate":"setDate"}function dy(r){return r?"setUTCHours":"setHours"}function vy(r){return r?"setUTCMinutes":"setMinutes"}function my(r){return r?"setUTCSeconds":"setSeconds"}function gy(r){return r?"setUTCMilliseconds":"setMilliseconds"}function yy(r,t,e,i,n,a,o,s){var l=new He({style:{text:r,font:t,align:e,verticalAlign:i,padding:n,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Wu(r){if(!yu(r))return H(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function zs(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Wi=wa;function Qh(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&Dt(c)?c:"-"}function a(c){return gt(c)}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?qt(r):r;if(isNaN(+l)){if(s)return"-"}else return yn(l,i,e)}if(t==="ordinal")return $o(r)?n(r):ge(r)&&a(r)?r+"":"-";var u=Wr(r);return a(u)?Wu(u):$o(r)?n(r):typeof r=="boolean"?r+"":"-"}var nC=["a","b","c","d","e","f","g"],_y=function(r,t){return"{"+r+(t??"")+"}"};function Vs(r,t,e){F(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a<n.length;a++){var o=nC[a];r=r.replace(_y(o),_y(o,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(_y(nC[l],s),e?wt(u):u)}return r}function ep(r,t){var e=H(r)?{color:r,extraCssText:t}:r||{},i=e.color,n=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wt(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wt(i)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function aC(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
10
|
+
yyyy`);var i=qt(t),n=e?"getUTC":"get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),c=i[n+"Seconds"](),f=i[n+"Milliseconds"]();return r=r.replace("MM",Ht(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Ht(a%100+"",2)).replace("dd",Ht(s,2)).replace("d",s).replace("hh",Ht(l,2)).replace("h",l).replace("mm",Ht(u,2)).replace("m",u).replace("ss",Ht(c,2)).replace("s",c).replace("SSS",Ht(f,3)),r}function oC(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function gi(r,t){return t=t||"transparent",H(r)?r:W(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}var tp={},by={},UR=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=i(tp,!0),this._normalMasterList=i(by,!1);function i(n,a){var o=[];return w(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){w(this._normalMasterList,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){tp[t]=e;return}by[t]=e},r.get=function(t){return by[t]||tp[t]},r})();function HR(r){return!!tp[r]}var GR=1,sC=2;var YR=Y();function ip(r){var t=r.getShallow("coord",!0),e=GR;if(t==null){var i=YR.get(r.type);i&&i.getCoord2&&(e=sC,t=i.getCoord2(r))}return{coord:t,from:e}}var Us=0,rp=1,WR=2;function ZR(r,t){var e=r.getShallow("coordinateSystem"),i=r.getShallow("coordinateSystemUsage",!0),n=i!=null,a=Us;if(e){var o=r.mainType==="series";i==null&&(i=o?"data":"box"),i==="data"?(a=rp,o||(a=Us)):i==="box"&&(a=WR,!o&&!HR(e)&&(a=Us))}return{coordSysType:e,kind:a}}function lC(r){var t=r.targetModel,e=r.coordSysType,i=r.coordSysProvider,n=r.isDefaultDataCoordSys,a=r.allowNotFound,o=ZR(t,!0),s=o.kind,l=o.coordSysType;if(n&&s!==rp&&(s=rp,l=e),s===Us||l!==e)return Us;var u=i(e,t);return u?(s===rp?t.coordinateSystem=u:t.boxCoordinateSystem=u,s):Us}var Hs=UR;var op=w,XR=["left","right","top","bottom","width","height"],np=[["width","left","right"],["height","top","bottom"]];function Sy(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),p,d;if(r==="horizontal"){var v=c.width+(h?-h.x+c.x:0);p=a+v,p>i||l.newline?(a=0,p=v,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);d=o+m,d>n||l.newline?(a+=s+e,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=p+e:o=d+e)})}var xo=Sy,CX=Ae(Sy,"vertical"),AX=Ae(Sy,"horizontal");function uC(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function Jr(r,t,e){e=Wi(e||0);var i=t.width,n=t.height,a=Ve(r.left,i),o=Ve(r.top,n),s=Ve(r.right,i),l=Ve(r.bottom,n),u=Ve(r.width,i),c=Ve(r.height,n),f=e[2]+e[0],h=e[1]+e[3],p=r.aspect;switch(isNaN(u)&&(u=i-s-h-a),isNaN(c)&&(c=n-l-f-o),p!=null&&(isNaN(u)&&isNaN(c)&&(p>i/n?u=i*.8:c=n*.8),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(a)&&(a=i-s-u-h),isNaN(o)&&(o=n-l-c-f),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-e[0];break;case"bottom":o=n-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=i-h-a-(s||0)),isNaN(c)&&(c=n-f-o-(l||0));var d=new ue((t.x||0)+a+e[3],(t.y||0)+o+e[0],u,c);return d.margin=e,d}var ap={rect:1,point:2};function Gs(r,t,e){var i,n,a,o=r.boxCoordinateSystem,s;if(o){var l=ip(r),u=l.coord,c=l.from;if(o.dataToLayout){a=ap.rect,s=c;var f=o.dataToLayout(u);i=f.contentRect||f.rect}else e&&e.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=ap.point,s=c,n=o.dataToPoint(u))}return a==null&&(a=ap.rect),a===ap.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),n=[i.x+i.width/2,i.y+i.height/2]),{type:a,refContainer:i,refPoint:n,boxCoordFrom:s}}function ia(r){var t=r.layoutMode||r.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function Nr(r,t,e){var i=e&&e.ignoreSize;!F(i)&&(i=[i,i]);var n=o(np[0],0),a=o(np[1],1);l(np[0],r,n),l(np[1],r,a);function o(u,c){var f={},h=0,p={},d=0,v=2;if(op(u,function(y){p[y]=r[y]}),op(u,function(y){We(t,y)&&(f[y]=p[y]=t[y]),s(f,y)&&h++,s(p,y)&&d++}),i[c])return s(t,u[1])?p[u[2]]=null:s(t,u[2])&&(p[u[1]]=null),p;if(d===v||!h)return p;if(h>=v)return f;for(var m=0;m<u.length;m++){var g=u[m];if(!We(f,g)&&We(r,g)){f[g]=r[g];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){op(u,function(h){c[h]=f[h]})}}function Qr(r){return KR({},r)}function KR(r,t){return t&&r&&op(XR,function(e){We(t,e)&&(r[e]=t[e])}),r}var qR=re(),Ys=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.uid=ta("ec_cpt_model"),a}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=ia(this),a=n?Qr(e):{},o=i.getTheme();me(e,o.get(this.mainType)),me(e,this.getDefaultOption()),n&&Nr(e,a,n)},t.prototype.mergeOption=function(e,i){me(this.option,e,!0);var n=ia(this);n&&Nr(this.option,e,n)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!ZS(e))return e.defaultOption;var i=qR(this);if(!i.defaultOption){for(var n=[],a=e;a;){var o=a.prototype.defaultOption;o&&n.push(o),a=a.superClass}for(var s={},l=n.length-1;l>=0;l--)s=me(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return Zn(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){return uC(this,!1)},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})(Re);ih(Ys,Re);Xn(Ys);WT(Ys);ZT(Ys,jR);function jR(r){var t=[];return w(Ys.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return lr(e).main}),r!=="dataset"&&ce(t,"dataset")<=0&&t.unshift("dataset"),t}var Le=Ys;var bo={color:{},darkColor:{},size:{}},st=bo.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};B(st,{primary:st.neutral80,secondary:st.neutral70,tertiary:st.neutral60,quaternary:st.neutral50,disabled:st.neutral20,border:st.neutral30,borderTint:st.neutral20,borderShade:st.neutral40,background:st.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:st.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:st.neutral70,axisLineTint:st.neutral40,axisTick:st.neutral70,axisTickMinor:st.neutral60,axisLabel:st.neutral70,axisSplitLine:st.neutral15,axisMinorSplitLine:st.neutral05});for(na in st)st.hasOwnProperty(na)&&(wy=st[na],na==="theme"?bo.darkColor.theme=st.theme.slice():na==="highlight"?bo.darkColor.highlight="rgba(255,231,130,0.4)":na.indexOf("accent")===0?bo.darkColor[na]=as(wy,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):bo.darkColor[na]=as(wy,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)}));var wy,na;bo.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var K=bo;var cC="";typeof navigator<"u"&&(cC=navigator.platform||"");var Ws="rgba(0, 0, 0, 0.2)",fC=K.color.theme[0],$R=as(fC,null,null,.9),lp={darkMode:"auto",colorBy:"series",color:K.color.theme,gradientColor:[$R,fC],aria:{decal:{decals:[{color:Ws,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ws,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ws,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ws,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ws,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ws,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:cC.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 er={Must:1,Might:2,Not:3},hC=re();function pC(r){hC(r).datasetMap=Y()}function dC(r,t,e){var i={},n=Ty(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=hC(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,c,f;r=r.slice(),w(r,function(v,m){var g=W(v)?v:r[m]={name:v};g.type==="ordinal"&&c==null&&(c=m,f=d(g)),i[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});w(r,function(v,m){var g=v.name,y=d(v);if(c==null){var _=h.valueWayDim;p(i[g],_,y),p(o,_,y),h.valueWayDim+=y}else if(c===m)p(i[g],0,y),p(a,0,y);else{var _=h.categoryWayDim;p(i[g],_,y),p(o,_,y),h.categoryWayDim+=y}});function p(v,m,g){for(var y=0;y<g;y++)v.push(m+y)}function d(v){var m=v.dimsDef;return m?m.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function Ty(r){var t=r.get("data",!0);if(!t)return Zn(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},at).models[0]}function vC(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Zn(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},at).models}function up(r,t){return JR(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function JR(r,t,e,i,n,a){var o,s=5;if(rt(r))return er.Not;var l,u;if(i){var c=i[a];W(c)?(l=c.name,u=c.type):H(c)&&(l=c)}if(u!=null)return u==="ordinal"?er.Must:er.Not;if(t===yt){var f=r;if(e===Vi){for(var h=f[a],p=0;p<(h||[]).length&&p<s;p++)if((o=x(h[n+p]))!=null)return o}else for(var p=0;p<f.length&&p<s;p++){var d=f[n+p];if(d&&(o=x(d[a]))!=null)return o}}else if(t===$t){var v=r;if(!l)return er.Not;for(var p=0;p<v.length&&p<s;p++){var m=v[p];if(m&&(o=x(m[l]))!=null)return o}}else if(t===Er){var g=r;if(!l)return er.Not;var h=g[l];if(!h||rt(h))return er.Not;for(var p=0;p<h.length&&p<s;p++)if((o=x(h[p]))!=null)return o}else if(t===At)for(var y=r,p=0;p<y.length&&p<s;p++){var m=y[p],_=cn(m);if(!F(_))return er.Not;if((o=x(_[a]))!=null)return o}function x(b){var S=H(b);if(b!=null&&isFinite(Number(b))&&b!=="")return S?er.Might:er.Not;if(S&&b!=="-")return er.Must}return er.Not}var QR=Y();function mC(r,t,e){var i=QR.get(t);if(!i)return e;var n=i(r);if(!n)return e;if(0)for(var a;a<n.length;a++);return e.concat(n)}var gC=re(),WX=re(),Zu=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,i){var n=Qe(this.get("color",!0)),a=this.get("colorLayer",!0);return t2(this,gC,n,a,t,e,i)},r.prototype.clearColorPalette=function(){r2(this,gC)},r})();function e2(r,t){for(var e=r.length,i=0;i<e;i++)if(r[i].length>t)return r[i];return r[e-1]}function t2(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!i?e:e2(i,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return n&&(u[n]=f),s.paletteIdx=(l+1)%c.length,f}}function r2(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var cp,Xu,yC,_C="\0_ec_inner",i2=1;var wC=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Re(a),this._locale=new Re(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=SC(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,SC(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?yC(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&w(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Y(),u=i&&i.replaceMergeMainTypeMap;pC(this),w(e,function(f,h){f!=null&&(Le.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?ne(f):me(n[h],f,!0))}),u&&u.each(function(f,h){Le.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Le.topologicalTravel(s,Le.getAllClassMainTypes(),c,this);function c(f){var h=mC(this,f,Qe(e[f])),p=a.get(f),d=p?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=PS(p,h,d);kS(v,f,Le),n[f]=null,a.set(f,null),o.set(f,0);var m=[],g=[],y=0,_,x;w(v,function(b,S){var T=b.existing,A=b.newOption;if(!A)T&&(T.mergeOption({},this),T.optionUpdated({},!1));else{var E=f==="series",M=Le.getClass(f,b.keyInfo.subType,!E);if(!M){if(0)var O,L;return}if(f==="tooltip"){if(_)return;_=!0}if(T&&T.constructor===M)T.name=b.keyInfo.name,T.mergeOption(A,this),T.optionUpdated(A,!1);else{var I=B({componentIndex:S},b.keyInfo);T=new M(A,this,this,I),B(T,I),b.brandNew&&(T.__requireNewView=!0),T.init(A,this,this),T.optionUpdated(null,!0)}}T?(m.push(T.option),g.push(T),y++):(m.push(void 0),g.push(void 0))},this),n[f]=m,a.set(f,g),o.set(f,y),f==="series"&&cp(this)}this._seriesIndices||cp(this)},t.prototype.getOption=function(){var e=ne(this.option);return w(e,function(i,n){if(Le.hasClass(n)){for(var a=Qe(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ds(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[_C],e},t.prototype.setTheme=function(e){this._theme=new Re(e),this._resetOption("recreate",null)},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,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var n=e.index,a=e.id,o=e.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],w(Qe(n),function(u){s[u]&&l.push(s[u])})):a!=null?l=xC("id",a,s):o!=null?l=xC("name",o,s):l=Be(s,function(u){return!!u}),bC(l,e)},t.prototype.findComponents=function(e){var i=e.query,n=e.mainType,a=s(i),o=a?this.queryComponents(a):Be(this._componentsMap.get(n),function(u){return!!u});return l(bC(o,e));function s(u){var c=n+"Index",f=n+"Id",h=n+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:n,index:u[c],id:u[f],name:u[h]}:null}function l(u){return e.filter?Be(u,e.filter):u}},t.prototype.eachComponent=function(e,i,n){var a=this._componentsMap;if($(e)){var o=i,s=e;a.each(function(f,h){for(var p=0;f&&p<f.length;p++){var d=f[p];d&&s.call(o,h,d,d.componentIndex)}})}else for(var l=H(e)?a.get(e):W(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=Ar(e,null);return Be(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Be(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return Be(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){Xu(this),w(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];e.call(i,a,n)},this)},t.prototype.eachRawSeries=function(e,i){w(this._componentsMap.get("series"),function(n){n&&e.call(i,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,n){Xu(this),w(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&i.call(n,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,i,n){return w(this.getSeriesByType(e),i,n)},t.prototype.isSeriesFiltered=function(e){return Xu(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){Xu(this);var n=[];w(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(i,o,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=Y(n)},t.prototype.restoreData=function(e){cp(this);var i=this._componentsMap,n=[];i.each(function(a,o){Le.hasClass(o)&&n.push(o)}),Le.topologicalTravel(n,Le.getAllClassMainTypes(),function(a){w(i.get(a),function(o){o&&(a!=="series"||!n2(o,e))&&o.restoreData()})})},t.internalField=(function(){cp=function(e){var i=e._seriesIndices=[];w(e._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),e._seriesIndicesMap=Y(i)},Xu=function(e){},yC=function(e,i){e.option={},e.option[_C]=i2,e._componentsMap=Y({series:[]}),e._componentsCount=Y();var n=i.aria;W(n)&&n.enabled==null&&(n.enabled=!0),a2(i,e._theme.option),me(i,lp,!1),e._mergeOption(i,null)}})(),t})(Re);function n2(r,t){if(t){var e=t.seriesIndex,i=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||i!=null&&r.id!==i||n!=null&&r.name!==n}}function a2(r,t){var e=r.color&&!r.colorLayer;w(t,function(i,n){n==="colorLayer"&&e||n==="color"&&r.color||Le.hasClass(n)||(typeof i=="object"?r[n]=r[n]?me(r[n],i,!1):ne(i):r[n]==null&&(r[n]=i))})}function xC(r,t,e){if(F(t)){var i=Y();return w(t,function(a){if(a!=null){var o=Ar(a,null);o!=null&&i.set(a,!0)}}),Be(e,function(a){return a&&i.get(a[r])})}else{var n=Ar(t,null);return Be(e,function(a){return a&&n!=null&&a[r]===n})}}function bC(r,t){return t.hasOwnProperty("subType")?Be(r,function(e){return e&&e.subType===t.subType}):r}function SC(r){var t=Y();return r&&w(Qe(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mt(wC,Zu);var fp=wC;var o2=/^(min|max)?(.+)$/,s2=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,i){t&&(w(Qe(t.series),function(o){o&&o.data&&rt(o.data)&&Ta(o.data)}),w(Qe(t.dataset),function(o){o&&o.source&&rt(o.source)&&Ta(o.source)})),t=ne(t);var n=this._optionBackup,a=l2(t,e,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],ne(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=ne(i[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!n.length&&!a)return s;for(var l=0,u=n.length;l<u;l++)u2(n[l].query,e,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!f2(o,this._currentMediaIndices)&&(s=U(o,function(c){return ne(c===-1?a.option:n[c].option)})),this._currentMediaIndices=o,s},r})();function l2(r,t,e){var i=[],n,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(r.options=r.media=null),a=r),c&&F(u)&&w(u,function(p){p&&p.option&&(p.query?i.push(p):n||(n=p))}),h(a),w(l,function(p){return h(p)}),w(i,function(p){return h(p.option)});function h(p){w(t,function(d){d(p,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function u2(r,t,e){var i={width:t,height:e,aspectratio:t/e},n=!0;return w(r,function(a,o){var s=o.match(o2);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();c2(i[u],a,l)||(n=!1)}}),n}function c2(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function f2(r,t){return r.join(",")===t.join(",")}var TC=s2;var yi=w,qu=W,CC=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Cy(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=CC.length;e<i;e++){var n=CC[e],a=t.normal,o=t.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?me(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?me(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function Gt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var i=r[t].normal,n=r[t].emphasis;i&&(e?(r[t].normal=r[t].emphasis=null,he(r[t],i)):r[t]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function Ku(r){Gt(r,"itemStyle"),Gt(r,"lineStyle"),Gt(r,"areaStyle"),Gt(r,"label"),Gt(r,"labelLine"),Gt(r,"upperLabel"),Gt(r,"edgeLabel")}function dt(r,t){var e=qu(r)&&r[t],i=qu(e)&&e.textStyle;if(i)for(var n=0,a=Km.length;n<a;n++){var o=Km[n];i.hasOwnProperty(o)&&(e[o]=i[o])}}function ei(r){r&&(Ku(r),dt(r,"label"),r.emphasis&&dt(r.emphasis,"label"))}function h2(r){if(qu(r)){Cy(r),Ku(r),dt(r,"label"),dt(r,"upperLabel"),dt(r,"edgeLabel"),r.emphasis&&(dt(r.emphasis,"label"),dt(r.emphasis,"upperLabel"),dt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Cy(t),ei(t));var e=r.markLine;e&&(Cy(e),ei(e));var i=r.markArea;i&&ei(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!rt(a))for(var o=0;o<a.length;o++)ei(a[o]);w(r.categories,function(u){Ku(u)})}if(n&&!rt(n))for(var o=0;o<n.length;o++)ei(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ei(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)F(l[o])?(ei(l[o][0]),ei(l[o][1])):ei(l[o]);r.type==="gauge"?(dt(r,"axisLabel"),dt(r,"title"),dt(r,"detail")):r.type==="treemap"?(Gt(r.breadcrumb,"itemStyle"),w(r.levels,function(u){Ku(u)})):r.type==="tree"&&Ku(r.leaves)}}function _n(r){return F(r)?r:r?[r]:[]}function AC(r){return(F(r)?r[0]:r)||{}}function Ay(r,t){yi(_n(r.series),function(i){qu(i)&&h2(i)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),yi(e,function(i){yi(_n(r[i]),function(n){n&&(dt(n,"axisLabel"),dt(n.axisPointer,"label"))})}),yi(_n(r.parallel),function(i){var n=i&&i.parallelAxisDefault;dt(n,"axisLabel"),dt(n&&n.axisPointer,"label")}),yi(_n(r.calendar),function(i){Gt(i,"itemStyle"),dt(i,"dayLabel"),dt(i,"monthLabel"),dt(i,"yearLabel")}),yi(_n(r.radar),function(i){dt(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),yi(_n(r.geo),function(i){qu(i)&&(ei(i),yi(_n(i.regions),function(n){ei(n)}))}),yi(_n(r.timeline),function(i){ei(i),Gt(i,"label"),Gt(i,"itemStyle"),Gt(i,"controlStyle",!0);var n=i.data;F(n)&&w(n,function(a){W(a)&&(Gt(a,"label"),Gt(a,"itemStyle"))})}),yi(_n(r.toolbox),function(i){Gt(i,"iconStyle"),yi(i.feature,function(n){Gt(n,"iconStyle")})}),dt(AC(r.axisPointer),"label"),dt(AC(r.tooltip).axisPointer,"label")}function p2(r,t){for(var e=t.split(","),i=r,n=0;n<e.length&&(i=i&&i[e[n]],i!=null);n++);return i}function d2(r,t,e,i){for(var n=t.split(","),a=r,o,s=0;s<n.length-1;s++)o=n[s],a[o]==null&&(a[o]={}),a=a[o];(i||a[n[s]]==null)&&(a[n[s]]=e)}function DC(r){r&&w(v2,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var v2=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],m2=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Dy=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ju(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Dy.length;e++){var i=Dy[e][1],n=Dy[e][0];t[i]!=null&&(t[n]=t[i])}}function EC(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function MC(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function g2(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function OC(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&OC(r[e].children,t)}function hp(r,t){Ay(r,t),r.series=Qe(r.series),w(r.series,function(e){if(W(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),EC(e.label);var n=e.data;if(n&&!rt(n))for(var a=0;a<n.length;a++)EC(n[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=p2(e,"pointer.color");o!=null&&d2(e,"itemStyle.color",o)}else if(i==="bar"){ju(e),ju(e.backgroundStyle),ju(e.emphasis);var n=e.data;if(n&&!rt(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(ju(n[a]),ju(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),MC(e),OC(e.data,MC)}else i==="graph"||i==="sankey"?g2(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&he(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),DC(e)}}),r.dataRange&&(r.visualMap=r.dataRange),w(m2,function(e){var i=r[e];i&&(F(i)||(i=[i]),w(i,function(n){DC(n)}))})}var IC=_s(y2);function y2(r){var t=Y();r.eachSeries(function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.push(o)}}),t.each(function(e){if(e.length!==0){var i=e[0].seriesModel,n=i.get("stackOrder")||"seriesAsc";n==="seriesDesc"&&e.reverse(),w(e,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?e[o-1].seriesModel:null)}),_2(e)}})}function _2(r){w(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return n;var p,d;s?d=o.getRawIndex(f):p=o.get(t.stackedByDimension,f);for(var v=NaN,m=e-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,p)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=ln(h,y),v=y;break}}}return i[0]=h,i[1]=v,i})})}var pp=(function(){function r(t){this.data=t.data||(t.sourceFormat===Er?{}:[]),this.sourceFormat=t.sourceFormat||Sg,this.seriesLayoutBy=t.seriesLayoutBy||Or,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];n.type==null&&up(this,i)===er.Must&&(n.type="ordinal")}}return r})();function Zs(r){return r instanceof pp}function $u(r,t,e){e=e||Ey(r);var i=t.seriesLayoutBy,n=x2(r,e,i,t.sourceHeader,t.dimensions),a=new pp({data:r,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:ne(t)});return a}function Xs(r){return new pp({data:r,sourceFormat:rt(r)?Mr:At})}function NC(r){return new pp({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ne(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function Ey(r){var t=Sg;if(rt(r))t=Mr;else if(F(r)){r.length===0&&(t=yt);for(var e=0,i=r.length;e<i;e++){var n=r[e];if(n!=null){if(F(n)||rt(n)){t=yt;break}else if(W(n)){t=$t;break}}}}else if(W(r)){for(var a in r)if(We(r,a)&&ct(r[a])){t=Er;break}}return t}function x2(r,t,e,i,n){var a,o;if(!r)return{dimensionsDefine:LC(n),startIndex:o,dimensionsDetectedCount:a};if(t===yt){var s=r;i==="auto"||i==null?PC(function(u){u!=null&&u!=="-"&&(H(u)?o==null&&(o=1):o=0)},e,s,10):o=ge(i)?i:i?1:0,!n&&o===1&&(n=[],PC(function(u,c){n[c]=u!=null?u+"":""},e,s,1/0)),a=n?n.length:e===Vi?s.length:s[0]?s[0].length:null}else if(t===$t)n||(n=b2(r));else if(t===Er)n||(n=[],w(r,function(u,c){n.push(c)}));else if(t===At){var l=cn(r[0]);a=F(l)&&l.length||1}return{startIndex:o,dimensionsDefine:LC(n),dimensionsDetectedCount:a}}function b2(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return De(e)}function LC(r){if(r){var t=Y();return U(r,function(e,i){e=W(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=t.get(n.name);return a?n.name+="-"+a.count++:t.set(n.name,{count:1}),n})}}function PC(r,t,e,i){if(t===Vi)for(var n=0;n<e.length&&n<i;n++)r(e[n]?e[n][0]:null,n);else for(var a=e[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function dp(r){var t=r.sourceFormat;return t===$t||t===Er}var So,wo,To,Co,kC,RC,mp=(function(){function r(t,e){var i=Zs(t)?t:Xs(t);this._source=i;var n=this._data=i.data,a=i.sourceFormat,o=i.seriesLayoutBy;if(a===Mr&&(this._offset=0,this._dimSize=e,this._data=n),0)var s;RC(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;RC=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,p=kC[Py(u,c)];if(B(o,p),u===Mr)o.getItem=e,o.count=n,o.fillStorage=i;else{var d=Oy(u,c);o.getItem=ee(d,null,s,f,h);var v=Iy(u,c);o.count=ee(v,null,s,f,h)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},i=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var p=u[h],d=p[0]==null?1/0:p[0],v=p[1]==null?-1/0:p[1],m=s-o,g=l[h],y=0;y<m;y++){var _=c[y*f+h];g[o+y]=_,_<d&&(d=_),_>v&&(v=_)}p[0]=d,p[1]=v}},n=function(){return this._data?this._data.length/this._dimSize:0};kC=(t={},t[yt+"_"+Or]={pure:!0,appendData:a},t[yt+"_"+Vi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[$t]={pure:!0,appendData:a},t[Er]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[At]={appendData:a},t[Mr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})();var vp=function(r){F(r)||Xm("series.data or dataset.source must be an array.")},MK=(So={},So[yt+"_"+Or]=vp,So[yt+"_"+Vi]=vp,So[$t]=vp,So[Er]=function(r,t){for(var e=0;e<t.length;e++){var i=t[e].name;i==null&&Xm("dimension name must not be null/undefined.")}},So[At]=vp,So),FC=function(r,t,e,i){return r[i]},S2=(wo={},wo[yt+"_"+Or]=function(r,t,e,i){return r[i+t]},wo[yt+"_"+Vi]=function(r,t,e,i,n){i+=t;for(var a=n||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},wo[$t]=FC,wo[Er]=function(r,t,e,i,n){for(var a=n||[],o=0;o<e.length;o++){var s=e[o].name,l=s!=null?r[s]:null;a[o]=l?l[i]:null}return a},wo[At]=FC,wo);function Oy(r,t){var e=S2[Py(r,t)];return e}var BC=function(r,t,e){return r.length},w2=(To={},To[yt+"_"+Or]=function(r,t,e){return Math.max(0,r.length-t)},To[yt+"_"+Vi]=function(r,t,e){var i=r[0];return i?Math.max(0,i.length-t):0},To[$t]=BC,To[Er]=function(r,t,e){var i=e[0].name,n=i!=null?r[i]:null;return n?n.length:0},To[At]=BC,To);function Iy(r,t){var e=w2[Py(r,t)];return e}var My=function(r,t,e){return r[t]},T2=(Co={},Co[yt]=My,Co[$t]=function(r,t,e){return r[e]},Co[Er]=My,Co[At]=function(r,t,e){var i=cn(r);return i instanceof Array?i[t]:i},Co[Mr]=My,Co);function Ly(r){var t=T2[r];return t}function Py(r,t){return r===yt?r+"_"+t:r}function xn(r,t,e){if(r){var i=r.getRawDataItem(t);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return Ly(a)(i,o,s)}else{var l=i;return a===At&&(l=cn(i)),l}}}}var C2=/\{@(.+?)\}/g,Ju=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",p=i.userOutput&&i.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:n,color:u,borderColor:c,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,i,n,a,o){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);if(o&&(l.value=o.interpolatedValue),n!=null&&F(l.value)&&(l.value=l.value[n]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if($(a))return l.status=e,l.dimensionIndex=n,a(l);if(H(a)){var c=Vs(a,l);return c.replace(C2,function(f,h){var p=h.length,d=h;d.charAt(0)==="["&&d.charAt(p-1)==="]"&&(d=+d.slice(1,p-1));var v=xn(s,t,d);if(o&&F(o.interpolatedValue)){var m=s.getDimensionIndex(d);m>=0&&(v=o.interpolatedValue[m])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(t,e){return xn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r})();function Ny(r){var t,e;return W(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function aa(r){return new A2(r)}var A2=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(f||p<d)){var v=this._progress;if(F(v))for(var m=0;m<v.length;m++)this._doProgress(v[m],p,d,l,u);else this._doProgress(v,p,d,l,u)}this._dueIndex=d;var g=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,i,n,a){zC.reset(e,i,n,a),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:zC.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,i;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(i=e.forceFirstProgress,e=e.progress),F(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r})();var zC=(function(){var r,t,e,i,n,a={reset:function(l,u,c,f){t=l,r=u,e=c,i=f,n=Math.ceil(i/e),a.next=e>1&&i>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<i?l:t;return t++,u}})();function ti(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!ge(r)&&r!=null&&r!=="-"&&(r=+qt(r)),r==null||r===""?NaN:Number(r))}var VK=Y({number:function(r){return parseFloat(r)},time:function(r){return+qt(r)},trim:function(r){return H(r)?Dt(r):r}});var D2={lt:function(r,t){return r<t},lte:function(r,t){return r<=t},gt:function(r,t){return r>t},gte:function(r,t){return r>=t}},UK=(function(){function r(t,e){if(!ge(e)){var i="";Et(i)}this._opFn=D2[t],this._rvalFloat=Wr(e)}return r.prototype.evaluate=function(t){return ge(t)?this._opFn(t,this._rvalFloat):this._opFn(Wr(t),this._rvalFloat)},r})(),VC=(function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=ge(t)?t:Wr(t),n=ge(e)?e:Wr(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=H(t),l=H(e);s&&(i=l?t:0),l&&(n=s?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r})();var HK=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Wr(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(e=Wr(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function gp(r){var t="",e=-1/0,i=-1/0,n=1/0,a=1/0;return r&&(r.g!=null&&(t+="G"+r.g,e=r.g),r.ge!=null&&(t+="GE"+r.ge,i=r.ge),r.l!=null&&(t+="L"+r.l,n=r.l),r.le!=null&&(t+="LE"+r.le,a=r.le)),{key:t,g:e,ge:i,l:n,le:a}}function yp(r,t){return t>r.g&&t>=r.ge&&t<r.l&&t<=r.le}var E2=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ti(t,e)},r})();function M2(r,t){var e=new E2,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Or&&Et(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(v,m){var g=v.name,y={index:m,name:g,displayName:v.displayName};if(s.push(y),g!=null){var _="";We(l,g)&&Et(_),l[g]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=Oy(n,Or);t.__isBuiltIn&&(e.getRawDataItem=function(v){return f(i,a,s,v)},e.getRawData=ee(O2,null,r)),e.cloneRawData=ee(I2,null,r);var h=Iy(n,Or);e.count=ee(h,null,i,a,s);var p=Ly(n);e.retrieveValue=function(v,m){var g=f(i,a,s,v);return d(g,m)};var d=e.retrieveValueFromItem=function(v,m){if(v!=null){var g=s[m];if(g)return p(v,m,g.name)}};return e.getDimensionInfo=ee(L2,null,s,l),e.cloneAllDimensionInfo=ee(P2,null,s),e}function O2(r){var t=r.sourceFormat;if(!ky(t)){var e="";Et(e)}return r.data}function I2(r){var t=r.sourceFormat,e=r.data;if(!ky(t)){var i="";Et(i)}if(t===yt){for(var n=[],a=0,o=e.length;a<o;a++)n.push(e[a].slice());return n}else if(t===$t){for(var n=[],a=0,o=e.length;a<o;a++)n.push(B({},e[a]));return n}}function L2(r,t,e){if(e!=null){if(ge(e)||!isNaN(e)&&!We(t,e))return r[e];if(We(t,e))return t[e]}}function P2(r){return ne(r)}var UC=Y();function HC(r){r=ne(r);var t=r.type,e="";t||Et(e);var i=t.split(":");i.length!==2&&Et(e);var n=!1;i[0]==="echarts"&&(t=i[1],n=!0),r.__isBuiltIn=n,UC.set(t,r)}function GC(r,t,e){var i=Qe(r),n=i.length,a="";n||Et(a);for(var o=0,s=n;o<s;o++){var l=i[o];t=N2(l,t,e,n===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function N2(r,t,e,i){var n="";t.length||Et(n),W(r)||Et(n);var a=r.type,o=UC.get(a);o||Et(n);var s=U(t,function(c){return M2(c,o)}),l=Qe(o.transform({upstream:s[0],upstreamList:s,config:ne(r.config)}));if(0&&r.print)var u;return U(l,function(c,f){var h="";W(c)||Et(h),c.data||Et(h);var p=Ey(c.data);ky(p)||Et(h);var d,v=t[0];if(v&&f===0&&!c.dimensions){var m=v.startIndex;m&&(c.data=v.data.slice(0,m).concat(c.data)),d={seriesLayoutBy:Or,sourceHeader:m,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Or,sourceHeader:0,dimensions:c.dimensions};return $u(c.data,d,null)})}function ky(r){return r===yt||r===$t}var k2=typeof Uint32Array===Jn?Array:Uint32Array,R2=typeof Uint16Array===Jn?Array:Uint16Array,Fy=typeof Int32Array===Jn?Array:Int32Array,YC=typeof Float64Array===Jn?Array:Float64Array,ZC={float:YC,int:Fy,ordinal:Array,number:Array,time:YC},Ry;function Ks(r){return r>65535?k2:R2}function F2(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function WC(r,t,e,i,n){var a=ZC[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(i)}var B2=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Y()}return r.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),a=this.defaultDimValueGetter=Ry[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[];var o=dp(n);this._dimensions=U(e,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(t);if(a!=null){if(n[a].type===e)return a}else a=n.length;return n[a]={type:e},i.set(t,a),this._chunks[a]=new ZC[e||"float"](this._rawCount),this._rawExtent[a]=Rt(),a},r.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],a=this._rawExtent,o=n.ordinalOffset||0,s=i.length;o===0&&(a[t]=Rt());for(var l=a[t],u=o;u<s;u++){var c=i[u]=e.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],i=e.ordinalMeta;return i},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var c=n[u];WC(i,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var p=h-s,d=0;d<a;d++){var c=n[d],v=Ry.arrayRows.call(this,t[p]||f,c.property,p,d);i[d][h]=v;var m=o[d];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Rt()),WC(a,c,f.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,a,l);else for(var h=[],p=t;p<e;p++){h=n.getItem(p,h);for(var d=0;d<s;d++){var v=a[d],m=this._dimValueGetter(h,u[d],p,d);v[p]=m;var g=l[d];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var i=[],n=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=t;for(var a=0,o=n.length;a<o;a++)i.push(this.get(n[a],e));return i},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],i=0;if(e)for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},r.prototype.getMedian=function(t){var e=[];this.each([t],function(n){isNaN(n)||e.push(n)}),Ct(e);var i=this.count();return i===0?0:i%2===1?e[(i-1)/2]:(e[i/2]+e[i/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&i<this._count&&i===t)return t;for(var n=0,a=this._count-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a<n;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else{var i=Ks(this._rawCount);t=new i(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=Ks(i._rawCount),o=new a(n),s=[],l=t.length,u=0,c=t[0],f=i._chunks,h=0;h<n;h++){var p=void 0,d=i.getRawIndex(h);if(l===0)p=e(h);else if(l===1){var v=f[c][d];p=e(v,h)}else{for(var m=0;m<l;m++)s[m]=f[t[m]][d];s[m]=h,p=e.apply(null,s)}p&&(o[u++]=d)}return u<n&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=De(t),a=n.length;if(!a)return this;var o=e.count(),s=Ks(e._rawCount),l=new s(o),u=0,c=n[0],f=t[c][0],h=t[c][1],p=e._chunks,d=!1;if(!e._indices){var v=0;if(a===1){for(var m=p[n[0]],g=0;g<i;g++){var y=m[g];(y>=f&&y<=h||isNaN(y))&&(l[u++]=v),v++}d=!0}else if(a===2){for(var m=p[n[0]],_=p[n[1]],x=t[n[1]][0],b=t[n[1]][1],g=0;g<i;g++){var y=m[g],S=_[g];(y>=f&&y<=h||isNaN(y))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=v),v++}d=!0}}if(!d)if(a===1)for(var g=0;g<o;g++){var T=e.getRawIndex(g),y=p[n[0]][T];(y>=f&&y<=h||isNaN(y))&&(l[u++]=T)}else for(var g=0;g<o;g++){for(var A=!0,T=e.getRawIndex(g),E=0;E<a;E++){var M=n[E],y=p[M][T];(y<t[M][0]||y>t[M][1])&&(A=!1)}A&&(l[u++]=e.getRawIndex(g))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,i){for(var n=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<e.length;c++)u[e[c]]=Rt();for(var f=0;f<s;f++){for(var h=t.getRawIndex(f),p=0;p<o;p++)l[p]=n[e[p]][h];l[o]=f;var d=i&&i.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var c=0;c<d.length;c++){var v=e[c],m=d[c],g=u[v],y=n[v];y&&(y[h]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,h,p=new(Ks(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));p[s++]=u;for(var d=1;d<o-1;d+=l){for(var v=Math.min(d+l,o-1),m=Math.min(d+l*2,o),g=(m+v)/2,y=0,_=v;_<m;_++){var x=this.getRawIndex(_),b=a[x];isNaN(b)||(y+=b)}y/=m-v;var S=d,T=Math.min(d+l,o),A=d-1,E=a[u];c=-1,h=S;for(var M=-1,O=0,_=S;_<T;_++){var x=this.getRawIndex(_),b=a[x];if(isNaN(b)){O++,M<0&&(M=x);continue}f=Math.abs((A-g)*(b-E)-(A-_)*(y-E)),f>c&&(c=f,h=x)}O>0&&O<T-S&&(p[s++]=Math.min(M,h),h=Math.max(M,h)),p[s++]=h,u=h}return p[s++]=this.getRawIndex(o-1),i._count=s,i._indices=p,i.getRawIndex=this._getRawIdx,i},r.prototype.minmaxDownSample=function(t,e){for(var i=this.clone([t],!0),n=i._chunks,a=Math.floor(1/e),o=n[t],s=this.count(),l=new(Ks(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,h=o[this.getRawIndex(f)],p=c,d=o[this.getRawIndex(p)],v=a;c+a>s&&(v=s-c);for(var m=0;m<v;m++){var g=this.getRawIndex(c+m),y=o[g];y<h&&(h=y,f=c+m),y>d&&(d=y,p=c+m)}var _=this.getRawIndex(f),x=this.getRawIndex(p);f<p?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},r.prototype.downSample=function(t,e,i,n){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],c=this.count(),f=a._rawExtent[t]=Rt(),h=new(Ks(this._rawCount))(Math.ceil(c/l)),p=0,d=0;d<c;d+=l){l>c-d&&(l=c-d,s.length=l);for(var v=0;v<l;v++){var m=this.getRawIndex(d+v);s[v]=u[m]}var g=i(s),y=this.getRawIndex(Math.min(d+n(s,g)||0,c-1));u[y]=g,g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g),h[p++]=y}return a._count=p,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:e(a);break;case 1:e(n[t[0]][s],a);break;case 2:e(n[t[0]][s],n[t[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t,e){var i=this._chunks[t],n=Rt();if(!i)return n;var a=this.count(),o=!this._indices&&!e;if(o)return this._rawExtent[t].slice();var s=this._extent,l=s[t]||(s[t]={}),u=gp(e),c=u.key,f=l[c];if(f)return f.slice();for(var h=n[0],p=n[1],d=0;d<a;d++){var v=this.getRawIndex(d),m=i[v];(!e||yp(u,m))&&(m<h&&(h=m),m>p&&(p=m))}return l[c]=[h,p]},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][e]);return i},r.prototype.clone=function(t,e){var i=new r,n=this._chunks,a=t&&zt(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<n.length;o++)i._chunks[o]=a[o]?F2(n[o]):n[o];else i._chunks=n;return this._copyCommonProps(i),e||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ne(this._extent),t._rawExtent=ne(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,i,n,a){return ti(e[a],this._dimensions[a])}Ry={arrayRows:t,objectRows:function(e,i,n,a){return ti(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return ti(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}})(),r})(),Qu=B2;var KC=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(_p(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rt(s)?Mr:At,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},p=Z(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=Z(f.sourceHeader,h.sourceHeader),v=Z(f.dimensions,h.dimensions),m=p!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||v;n=m?[$u(s,{seriesLayoutBy:p,sourceHeader:d,dimensions:v},l)]:[]}else{var g=t;if(i){var y=this._applyTransform(e);n=y.sourceList,a=y.upstreamSignList}else{var _=g.get("source",!0);n=[$u(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&XC(a)}var o,s=[],l=[];return w(t,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&XC(f),s.push(c),l.push(u._getVersionSign())}),i?o=GC(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[NC(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,i){var n=0,a=this._storeList,o=a[n];o||(o=a[n]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];_p(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,i):(s=new Qu,s.initData(new mp(e,t.length),t)),o[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(_p(t)){var e=Ty(t);return e?[e.getSourceManager()]:[]}else return U(vC(t),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,i,n;if(_p(t))e=t.get("seriesLayoutBy",!0),i=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:i,dimensions:n}},r})();function _p(r){return r.mainType==="series"}function XC(r){throw new Error(r)}var z2="line-height:1";function qC(r){var t=r.lineHeight;return t==null?z2:"line-height:"+wt(t+"")+"px"}function jC(r,t){var e=r.color||K.color.tertiary,i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||K.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+wt(i+"")+"px;color:"+wt(e)+";font-weight:"+wt(n+""),valueStyle:"font-size:"+wt(o+"")+"px;color:"+wt(a)+";font-weight:"+wt(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var V2=[0,10,20,30],U2=["",`
|
|
11
11
|
`,`
|
|
12
12
|
|
|
13
13
|
`,`
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
`];function Zi(r,t){return t.type=r,t}function By(r){return r.type==="section"}function jC(r){return By(r)?H2:G2}function JC(r){if(By(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return w(r.blocks,function(n){var a=JC(n);a>=t&&(t=a+ +(i&&(!a||By(n)&&!n.noHeader)))}),t}return 0}function H2(r,t,e,i){var n=t.noHeader,a=Y2(JC(t)),o=[],s=t.blocks||[];ft(!s||F(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(We(u,l)){var c=new VC(u[l],null);s.sort(function(v,m){return c.evaluate(v.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(v,m){var g=t.valueFormatter,y=jC(v)(g?B(B({},r),{valueFormatter:g}):r,v,m>0?a.html:0,i);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(a.richText):zy(i,o.join(""),n?e:a.html);if(n)return f;var h=Qh(t.header,"ordinal",r.useUTC),p=$C(i,r.renderMode).nameStyle,d=qC(i);return r.renderMode==="richText"?QC(r,h,p)+a.richText+f:zy(i,'<div style="'+p+";"+d+';">'+wt(h)+"</div>"+f,e)}function G2(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(x){return x=F(x)?x:[x],U(x,function(b,S){return Qh(b,F(p)?p[S]:p,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||K.color.secondary,n),h=a?"":Qh(l,"ordinal",u),p=t.valueType,d=o?[]:c(t.value,t.rawDataIndex),v=!s||!a,m=!s&&a,g=$C(i,n),y=g.nameStyle,_=g.valueStyle;return n==="richText"?(s?"":f)+(a?"":QC(r,h,y))+(o?"":X2(r,d,v,m,_)):zy(i,(s?"":f)+(a?"":W2(h,!s,y))+(o?"":Z2(d,v,m,_)),e)}}function Vy(r,t,e,i,n,a){if(r){var o=jC(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function Y2(r){return{html:V2[r],richText:U2[r]}}function zy(r,t,e){var i='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",a=qC(r);return'<div style="'+n+";"+a+';">'+t+i+"</div>"}function W2(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+wt(r)+"</span>"}function Z2(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=F(r)?r:[r],'<span style="'+a+";"+i+'">'+U(r,function(o){return wt(o)}).join(" ")+"</span>"}function QC(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function X2(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(F(t)?t.join(" "):t,a)}function e1(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return gi(i)}function xp(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var bp=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=_u()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=ep({color:e,type:t,renderMode:i,markerId:n});return H(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};F(e)?w(e,function(a){return B(i,a)}):B(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r})();function t1(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=F(s),u=e1(t,e),c,f,h,p;if(o>1||l&&!o){var d=K2(s,t,e,a,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,p=d.inlineValues[0]}else if(o){var v=n.getDimensionInfo(a[0]);p=c=xn(n,e,a[0]),f=v.type}else p=c=l?s[0]:s;var m=vs(t),g=m&&t.name||"",y=n.getName(e),_=i?g:y;return Zi("section",{header:g,noHeader:i||!m,sortParam:p,blocks:[Zi("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Dt(_),value:c,valueType:f,rawDataIndex:n.getRawIndex(e)})].concat(h||[])})}function K2(r,t,e,i,n){var a=t.getData(),o=zt(r,function(f,h,p){var d=a.getDimensionInfo(p);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?w(i,function(f){c(xn(a,e,f),f)}):w(r,c);function c(f,h){var p=a.getDimensionInfo(h);!p||p.otherDims.tooltip===!1||(o?u.push(Zi("nameValue",{markerType:"subItem",markerColor:n,name:p.displayName,value:f,valueType:p.type})):(s.push(f),l.push(p.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var oa=re();function Sp(r,t){return r.getName(t)||r.getId(t)}var q2="__universalTransitionEnabled",wp=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=aa({count:j2,reset:J2}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=oa(this).sourceManager=new KC(this);a.prepareSource();var o=this.getInitialData(e,n);i1(o,this),this.dataTask.context.data=o,oa(this).dataBeforeProcessed=o,r1(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=ia(this),a=n?Qr(e):{},o=this.subType;Le.hasClass(o)&&(o+="Series"),me(e,i.getTheme().get(this.subType)),me(e,this.getDefaultOption()),Su(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Nr(e,a,n)},t.prototype.mergeOption=function(e,i){e=me(this.option,e,!0),this.fillDataTextStyle(e.data);var n=ia(this);n&&Nr(this.option,e,n);var a=oa(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);i1(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,oa(this).dataBeforeProcessed=o,r1(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!rt(e))for(var i=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Su(e[n],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){var i=this.getRawData();i.appendData(e.data)},t.prototype.getData=function(e){var i=Uy(this);if(i){var n=i.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return oa(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var i=Uy(this);if(i){var n=i.context;n.outputData=e,i!==this.dataTask&&(n.data=e)}oa(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Y(e)},t.prototype.getSourceManager=function(){return oa(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return oa(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,i,n,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(e);if(!s||!l)return[];var u=l.dataToCoord(n);a==null&&(a=1/0);for(var c=[],f=1/0,h=-1,p=0,d=o.getDimensionIndex(i),v=o.getStore(),m=0,g=v.count();m<g;m++){var y=v.get(d,m),_=l.dataToCoord(y),x=u-_,b=Math.abs(x);b<=a&&((b<f||b===f&&x>=0&&h<0)&&(f=b,h=x,p=0),x===h&&(c[p++]=m))}return c.length=p,c},t.prototype.formatTooltip=function(e,i,n){return t1({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fe.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=Zu.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},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,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Sp(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,i){for(var n=[],a=0;a<e.length;a++)n[0]=e[a],this.isSelected(e[a],i)?this.unselect(n,i):this.select(n,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=De(e),n=[],a=0;a<i.length;a++){var o=e[i[a]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[Sp(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[q2])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){W(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=i[c],h=Sp(e,f);u[h]=!0,this._selectedDataIndicesMap[h]=e.getRawIndex(f)}}else if(s==="single"||s===!0){var p=i[l-1],h=Sp(e,p);o.selectedMap=(n={},n[h]=!0,n),this._selectedDataIndicesMap=(a={},a[h]=e.getRawIndex(p),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(n){var a=e.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return Le.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})(Le);mt(wp,Ju);mt(wp,Zu);ih(wp,Le);function r1(r){var t=r.name;vs(r)||(r.name=$2(r)||t)}function $2(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return w(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function j2(r){return r.model.getRawData().count()}function J2(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),Q2}function Q2(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function i1(r,t){w(Zv(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,Ae(eF,t))})}function eF(r,t){var e=Uy(r);return e&&e.setOutputEnd((t||this).count()),t}function Uy(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var tr=wp;var Hy=(function(){function r(){this.group=new Ee,this.uid=ta("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();xs(Hy);Xn(Hy);var nt=Hy;function Ao(){var r=re();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var o1=re(),tF=Ao(),Gy=(function(){function r(){this.group=new Ee,this.uid=ta("viewChart"),this.renderTask=aa({plan:rF,reset:iF}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&a1(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&a1(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){gn(this.group,t)},r.markUpdateMethod=function(t,e){o1(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function n1(r,t,e){r&&ku(r)&&(t==="emphasis"?dn:vn)(r,e)}function a1(r,t,e){var i=Zr(r,t),n=t&&t.highlightKey!=null?Qw(t.highlightKey):null;i!=null?w(Qe(i),function(a){n1(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){n1(a,e,n)})}xs(Gy,["dispose"]);Xn(Gy);function rF(r){return tF(r.model)}function iF(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&o1(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),nF[l]}var nF={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ft=Gy;var Tp="\0__throttleOriginMethod",s1="\0__throttleRate",l1="\0__throttleType";function Do(r,t,e){var i,n=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];i=new Date().getTime(),l=this,u=p;var v=c||t,m=c||e;c=null,s=i-(m?n:a)-v,clearTimeout(o),m?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),n=i};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(p){c=p},h}function sa(r,t,e,i){var n=r[t];if(n){var a=n[Tp]||n,o=n[l1],s=n[s1];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=Do(a,e,i==="debounce"),n[Tp]=a,n[l1]=i,n[s1]=e}return n}}function Eo(r,t){var e=r[t];e&&e[Tp]&&(e.clear&&e.clear(),r[t]=e[Tp])}var u1=re(),c1={itemStyle:Pi(ay,!0),lineStyle:Pi(ny,!0)},aF={lineStyle:"stroke",itemStyle:"fill"};function f1(r,t){var e=r.visualStyleMapper||c1[t];return e||(console.warn("Unknown style type '"+t+"'."),c1.itemStyle)}function h1(r,t){var e=r.visualDrawType||aF[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var p1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=f1(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=h1(r,i),u=o[l],c=j(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||j(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||j(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(p,d){var v=r.getDataParams(d),m=B({},o);m[l]=c(v),p.setItemVisual(d,"style",m)}}}},ec=new Re,d1={createOnAllSeries:!0,reset:function(r,t){if(!r.ignoreStyleOnData){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=f1(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){ec.option=l[i];var u=n(ec),c=o.ensureUniqueItemVisual(s,"style");B(c,u),ec.option.decal&&(o.setItemVisual(s,"decal",ec.option.decal),ec.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},v1={performRawSeries:!0,overallReset:function(r){var t=Y();r.eachSeries(function(e){if(!e.isColorBySeries()){var i=e.type+"-"+e.getColorBy();u1(e).scope=t.get(i)||t.set(i,{})}}),r.eachSeries(function(e){if(!e.isColorBySeries()){var i=e.getRawData(),n={},a=e.getData(),o=u1(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=h1(e,s);a.each(function(u){var c=a.getRawIndex(u);n[c]=u}),i.each(function(u){var c=n[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),p=i.getName(u)||u+"",d=i.count();h[l]=e.getColorFromPalette(p,o,d)}})}})}};var Cp=Math.PI;function Wy(r,t){t=t||{},he(t,{text:"loading",textColor:K.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:K.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Ee,i=new Oe({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new He({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 Oe({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new ao({shape:{startAngle:-Cp/2,endAngle:-Cp/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Cp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Cp*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var oF=(function(){function r(t,e,i,n){this._stageTaskMap=Y(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.__preparePipelineContext?t.__preparePipelineContext(e,i):rh(t,e,i);t.pipelineContext=i.context=n},r.prototype.restorePipelines=function(t,e){var i=this,n=i._pipelineMap=Y();e.eachSeries(function(a){var o=t.painter.type==="canvas"&&a.getProgressive(),s=a.uid;n.set(s,{id:s,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:o&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),i._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;w(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";ft(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;w(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var p,d=h.agentStubMap;d.each(function(m){s(n,m)&&(m.dirty(),p=!0)}),p&&h.dirty(),o.updatePayload(h,i);var v=o.getPerformArgs(h,n.block);d.each(function(m){m.perform(v)}),h.perform(v)&&(a=!0)}else f&&f.each(function(m,g){s(n,m)&&m.dirty();var y=o.getPerformArgs(m,n.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(m.context.model),o.updatePayload(m,i),m.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Y(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,n).each(c);function c(f){var h=f.uid,p=s.set(h,o&&o.get(h)||aa({plan:fF,reset:hF,count:dF}));p.context={model:f,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,p)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||aa({reset:sF});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Y(),u=t.seriesType,c=t.getTargetSeries,f=t.dirtyOnOverallProgress,h=!1,p="";ft(!t.createOnAllSeries,p),u?i.eachRawSeriesByType(u,d):c?c(i,n).each(d):w(i.getSeries(),d);function d(v){var m=v.uid,g=l.set(m,s&&s.get(m)||(h=!0,aa({reset:lF,onDirty:cF})));g.context={model:v,dirtyOnOverallProgress:f},g.agent=o,g.__block=f,a._pipe(v,g)}h&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return j(t)&&(t={overallReset:t,seriesType:vF(t)}),t.uid=ta("stageHandler"),e&&(t.visualType=e),t},r})();function sF(r){r.overallReset(r.ecModel,r.api,r.payload)}function lF(r){return r.dirtyOnOverallProgress&&uF}function uF(){this.agent.dirty(),this.getDownstream().dirty()}function cF(){this.agent&&this.agent.dirty()}function fF(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function hF(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Qe(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?U(t,function(e,i){return m1(i)}):pF}var pF=m1(0);function m1(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(t,i)}}function dF(r){return r.data.count()}function vF(r){Ap=null;try{r(tc,g1)}catch{}return Ap}var tc={},g1={},Ap;y1(tc,fp);y1(g1,hh);tc.eachSeriesByType=tc.eachRawSeriesByType=function(r){Ap=r};tc.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Ap=r.subType)};function y1(r,t){for(var e in t.prototype)r[e]=Ze}var Zy=oF;var J=K.darkColor,_1=J.background,rc=function(){return{axisLine:{lineStyle:{color:J.axisLine}},splitLine:{lineStyle:{color:J.axisSplitLine}},splitArea:{areaStyle:{color:[J.backgroundTint,J.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:J.axisMinorSplitLine}},axisLabel:{color:J.axisLabel},axisName:{}}},x1={label:{color:J.secondary},itemStyle:{borderColor:J.borderTint},dividerLineStyle:{color:J.border}},b1={darkMode:!0,color:J.theme,backgroundColor:_1,axisPointer:{lineStyle:{color:J.border},crossStyle:{color:J.borderShade},label:{color:J.tertiary}},legend:{textStyle:{color:J.secondary},pageTextStyle:{color:J.tertiary}},textStyle:{color:J.secondary},title:{textStyle:{color:J.primary},subtextStyle:{color:J.quaternary}},toolbox:{iconStyle:{borderColor:J.accent50},feature:{dataView:{backgroundColor:_1,textColor:J.primary,textareaColor:J.background,textareaBorderColor:J.border,buttonColor:J.accent50,buttonTextColor:J.neutral00}}},tooltip:{backgroundColor:J.neutral20,defaultBorderColor:J.border,textStyle:{color:J.tertiary}},dataZoom:{borderColor:J.accent10,textStyle:{color:J.tertiary},brushStyle:{color:J.backgroundTint},handleStyle:{color:J.neutral00,borderColor:J.accent20},moveHandleStyle:{color:J.accent40},emphasis:{handleStyle:{borderColor:J.accent50}},dataBackground:{lineStyle:{color:J.accent30},areaStyle:{color:J.accent20}},selectedDataBackground:{lineStyle:{color:J.accent50},areaStyle:{color:J.accent30}}},visualMap:{textStyle:{color:J.secondary},handleStyle:{borderColor:J.neutral30}},timeline:{lineStyle:{color:J.accent10},label:{color:J.tertiary},controlStyle:{color:J.accent30,borderColor:J.accent30}},calendar:{itemStyle:{color:J.neutral00,borderColor:J.neutral20},dayLabel:{color:J.tertiary},monthLabel:{color:J.secondary},yearLabel:{color:J.secondary}},matrix:{x:x1,y:x1,backgroundColor:{borderColor:J.axisLine},body:{itemStyle:{borderColor:J.borderTint}}},timeAxis:rc(),logAxis:rc(),valueAxis:rc(),categoryAxis:rc(),line:{symbol:"circle"},graph:{color:J.theme},gauge:{title:{color:J.secondary},axisLine:{lineStyle:{color:[[1,J.neutral05]]}},axisLabel:{color:J.axisLabel},detail:{color:J.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:J.background}},radar:(function(){var r=rc();return r.axisName={color:J.axisLabel},r.axisLine.lineStyle.color=J.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:J.neutral20,textStyle:{color:J.secondary}},emphasis:{itemStyle:{color:J.neutral30}}}},sunburst:{itemStyle:{borderColor:J.background}},map:{itemStyle:{borderColor:J.border,areaColor:J.neutral10},label:{color:J.tertiary},emphasis:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}},select:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}}},geo:{itemStyle:{borderColor:J.border,areaColor:J.neutral10},emphasis:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}},select:{label:{color:J.primary},itemStyle:{color:J.highlight}}}};b1.categoryAxis.splitLine.show=!1;var S1=b1;var w1=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},i={},n={};if(H(t)){var a=lr(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};w(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],p=u.lastIndexOf(h);if(p>0&&p===u.length-h.length){var d=u.slice(0,p);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function c(f,h,p,d){return f[p]==null||h[d||p]===f[p]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})();var Xy=["symbol","symbolSize","symbolRotate","symbolOffset"],T1=Xy.concat(["symbolKeepAspect"]),C1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o<Xy.length;o++){var s=Xy[o],l=r.get(s);j(l)?(a=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),t.isSeriesFiltered(r))return;var u=De(n);function c(f,h){for(var p=r.getRawValue(h),d=r.getDataParams(h),v=0;v<u.length;v++){var m=u[v];f.setItemVisual(h,m,n[m](p,d))}}return{dataEach:a?c:null}}},A1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function i(n,a){for(var o=n.getItemModel(a),s=0;s<T1.length;s++){var l=T1[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?i:null}}};function D1(r,t,e){switch(e){case"color":var i=r.getItemVisual(t,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e);default:}}function qs(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t);default:}}function $s(r,t,e,i,n){var a=r+t;e.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=Zr(f,n.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:F(h)?f.getName(h[0]):f.getName(h),selected:H(l)?l:B({},l)})}})}function E1(r,t,e){r.on("selectchanged",function(i){var n=e.getModel();i.isFromClick?($s("map","selectchanged",t,n,i),$s("pie","selectchanged",t,n,i)):i.fromAction==="select"?($s("map","selected",t,n,i),$s("pie","selected",t,n,i)):i.fromAction==="unselect"&&($s("map","unselected",t,n,i),$s("pie","unselected",t,n,i))})}function Mo(r,t,e){for(var i;r&&!(t(r)&&(i=r,e));)r=r.__hostTarget||r.parent;return i}var mF=new St,kr=mF;var M1={};function O1(r,t){M1[r]=t}function Ky(r){return M1[r]}var gF={};function Dp(r,t){gF[r]=t}var Ep=re();function I1(r){Ep(r).prepare={}}function L1(r){Ep(r).fullUpdate={}}function Mp(r){return Ep(r).prepare}function Oo(r){return Ep(r).fullUpdate}var yF=Math.round(Math.random()*9),_F=typeof Object.defineProperty=="function",xF=(function(){function r(){this._id="__ec_inner_"+yF++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var i=this._guard(t);return _F?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),P1=xF;var bF=ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i+a),r.lineTo(e-n,i+a),r.closePath()}}),SF=ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i),r.lineTo(e,i+a),r.lineTo(e-n,i),r.closePath()}}),wF=ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,i=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),p=o*.6,d=o*.7;r.moveTo(e-c,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+c-f*p,l+s+h*p,e,i-d,e,i),r.bezierCurveTo(e,i-d,e-c+f*p,l+s+h*p,e-c,l+s),r.closePath()}}),TF=ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,i=t.width,n=t.x,a=t.y,o=i/3*2;r.moveTo(n,a),r.lineTo(n+o,a+e),r.lineTo(n,a+e/4*3),r.lineTo(n-o,a+e),r.lineTo(n,a),r.closePath()}}),CF={line:Qt,rect:Oe,roundRect:Oe,square:Oe,circle:to,diamond:SF,pin:wF,arrow:TF,triangle:bF},AF={line:function(r,t,e,i,n){n.x1=r,n.y1=t+i/2,n.x2=r+e,n.y2=t+i/2},rect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i},roundRect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i,n.r=Math.min(e,i)/4},square:function(r,t,e,i,n){var a=Math.min(e,i);n.x=r,n.y=t,n.width=a,n.height=a},circle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.r=Math.min(e,i)/2},diamond:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i},pin:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},arrow:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},triangle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i}},ic={};w(CF,function(r,t){ic[t]=new r});var DF=ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var i=Ua(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+e.height*.4),i},buildPath:function(r,t,e){var i=t.symbolType;if(i!=="none"){var n=ic[i];n||(i="rect",n=ic[i]),AF[i](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function EF(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||K.color.neutral00,e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function It(r,t,e,i,n,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Hu(r.slice(8),new ue(t,e,i,n),o?"center":"cover"):r.indexOf("path://")===0?l=Os(r.slice(7),{},new ue(t,e,i,n),o?"center":"cover"):l=new DF({shape:{symbolType:r,x:t,y:e,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=EF,a&&l.setColor(a),l}function nc(r){return F(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Io(r,t){if(r!=null)return F(r)||(r=[r,r]),[Ve(r[0],t[0])||0,Ve(Z(r[1],r[0]),t[1])||0]}function Lo(r){return isFinite(r)}function OF(r,t,e){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*e.width+e.x,n=n*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),i=Lo(i)?i:0,n=Lo(n)?n:1,a=Lo(a)?a:0,o=Lo(o)?o:0;var s=r.createLinearGradient(i,a,n,o);return s}function IF(r,t,e){var i=e.width,n=e.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*i+e.x,s=s*n+e.y,l=l*a),o=Lo(o)?o:.5,s=Lo(s)?s:.5,l=l>=0&&Lo(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ac(r,t,e){for(var i=t.type==="radial"?IF(r,t,e):OF(r,t,e),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function N1(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function Op(r){return parseInt(r,10)}function oc(r,t,e){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||Op(s[i])||Op(r.style[i]))-(Op(s[a])||0)-(Op(s[o])||0)||0}function LF(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:ge(r)?[r]:F(r)?r:null}function qy(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&LF(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=U(e,function(a){return a/n}),i/=n)}return[e,i]}var PF=new Dr(!0);function Ip(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function k1(r){return typeof r=="string"&&r!=="none"}function Lp(r){var t=r.fill;return t!=null&&t!=="none"}function R1(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function F1(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Pp(r,t,e){var i=tg(t.image,t.__image,e);if(bs(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Xv),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function NF(r,t,e,i,n){var a,o=Ip(e),s=Lp(e),l=e.strokePercent,u=l<1,c=!t.path;(!t.silent||u)&&c&&t.createPathProxy();var f=t.path||PF,h=t.__dirty;if(!i){var p=e.fill,d=e.stroke,v=s&&!!p.colorStops,m=o&&!!d.colorStops,g=s&&!!p.image,y=o&&!!d.image,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0;(v||m)&&(T=t.getBoundingRect()),v&&(_=h?ac(r,p,T):t.__canvasFillGradient,t.__canvasFillGradient=_),m&&(x=h?ac(r,d,T):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),g&&(b=h||!t.__canvasFillPattern?Pp(r,p,t):t.__canvasFillPattern,t.__canvasFillPattern=b),y&&(S=h||!t.__canvasStrokePattern?Pp(r,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),v?r.fillStyle=_:g&&(b?r.fillStyle=b:s=!1),m?r.strokeStyle=x:y&&(S?r.strokeStyle=S:o=!1)}var A=t.getGlobalScale();f.setScale(A[0],A[1],t.segmentIgnoreThreshold);var E,M;r.setLineDash&&e.lineDash&&(a=qy(t),E=a[0],M=a[1]);var O=!0;(c||h&Bn)&&(f.setDPR(r.dpr),u?f.setContext(null):(f.setContext(r),O=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),O&&f.rebuildPath(r,u?l:1),E&&(r.setLineDash(E),r.lineDashOffset=M),i?(n.batchFill=s,n.batchStroke=o):e.strokeFirst?(o&&F1(r,e),s&&R1(r,e)):(s&&R1(r,e),o&&F1(r,e)),E&&r.setLineDash([])}function kF(r,t,e){var i=t.__image=tg(e.image,t.__image,t,t.onload);if(!(!i||!bs(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,c=e.sy||0;r.drawImage(i,u,c,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,c=e.sy,f=o-u,h=s-c;r.drawImage(i,u,c,f,h,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function RF(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Br,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=qy(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Ip(e)&&r.strokeText(n,e.x,e.y),Lp(e)&&r.fillText(n,e.x,e.y)):(Lp(e)&&r.fillText(n,e.x,e.y),Ip(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var B1=["shadowBlur","shadowOffsetX","shadowOffsetY"],z1=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function W1(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){rr(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Ni.opacity:o}(i||t.blend!==e.blend)&&(a||(rr(r,n),a=!0),r.globalCompositeOperation=t.blend||Ni.blend);for(var s=0;s<B1.length;s++){var l=B1[s];(i||t[l]!==e[l])&&(a||(rr(r,n),a=!0),r[l]=r.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(a||(rr(r,n),a=!0),r.shadowColor=t.shadowColor||Ni.shadowColor),a}function V1(r,t,e,i,n){var a=t.style,o=i?null:e&&e.style||{};if(a===o)return!1;var s=W1(r,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(rr(r,n),s=!0),k1(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(rr(r,n),s=!0),k1(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(rr(r,n),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(rr(r,n),s=!0),r.lineWidth=u)}for(var c=0;c<z1.length;c++){var f=z1[c],h=f[0];(i||a[h]!==o[h])&&(s||(rr(r,n),s=!0),r[h]=a[h]||f[1])}return s}function FF(r,t,e,i,n){return W1(r,t.style,e&&e.style,i,n)}function Z1(r,t){var e=t.transform,i=r.dpr||1;e?r.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):r.setTransform(i,0,0,i,0,0)}function BF(r,t,e){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),Z1(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=i}function zF(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var U1=1,H1=2,G1=3,Y1=4;function VF(r){var t=Lp(r),e=Ip(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function rr(r,t){t.batchFill&&(t.batchFill=!1,r.fill()),t.batchStroke&&(t.batchStroke=!1,r.stroke())}function js(r,t){var e={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};la(r,t,e),Po(r,e)}function la(r,t,e){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~pt,t.__isRendered=!1;return}var n=t.__clipPaths,a=e.prevElClipPaths,o=t.style,s=!1,l=!1;if((!a||N1(n,a))&&(a&&(rr(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),n&&n.length&&(rr(r,e),r.save(),BF(n,r,e),s=!0,e.prevElClipPaths=n)),e.allClipped){t.__dirty&=~pt,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(e.beforeBrushParam),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var c=t instanceof ve&&t.autoBatch&&VF(o);s||zF(i,u.transform)?(rr(r,e),Z1(r,t)):c||rr(r,e),t instanceof ve?(e.lastDrawType!==U1&&(l=!0,e.lastDrawType=U1),V1(r,t,u,l,e),(!c||!e.batchFill&&!e.batchStroke)&&r.beginPath(),NF(r,t,o,c,e)):t instanceof Eu?(e.lastDrawType!==G1&&(l=!0,e.lastDrawType=G1),V1(r,t,u,l,e),RF(r,t,o)):t instanceof ur?(e.lastDrawType!==H1&&(l=!0,e.lastDrawType=H1),FF(r,t,u,l,e),kF(r,t,o)):t.getTemporalDisplayables&&(e.lastDrawType!==Y1&&(l=!0,e.lastDrawType=Y1),UF(r,t,e)),t.innerAfterBrush(),t.afterBrush&&(c&&rr(r,e),t.afterBrush()),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Po(r,t){rr(r,t),t.prevElClipPaths&&r.restore()}function UF(r,t,e){var i=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(e.beforeBrushParam),l.innerBeforeBrush(),la(r,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Po(r,a);for(var u=0,c=n.length;u<c;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(e.beforeBrushParam),l.innerBeforeBrush(),la(r,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Po(r,a),t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var $y=new P1,X1=new Oi(100),K1=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function sc(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),n=i.painter.type==="svg";r.dirty&&$y.delete(r);var a=$y.get(r);if(a)return a;var o=he(r,{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});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=n?1:1/e,$y.set(r,s),r.dirty=!1,s;function l(u){for(var c=[e],f=!0,h=0;h<K1.length;++h){var p=o[K1[h]];if(p!=null&&!F(p)&&!H(p)&&!ge(p)&&typeof p!="boolean"){f=!1;break}c.push(p)}var d;if(f){d=c.join(",")+(n?"-svg":"");var v=X1.get(d);v&&(n?u.svgElement=v:u.image=v)}var m=$1(o.dashArrayX),g=HF(o.dashArrayY),y=q1(o.symbol),_=GF(m),x=j1(g),b=!n&&je.createCanvas(),S=n&&{tag:"g",attrs:{},key:"dcl",children:[]},T=E(),A;b&&(b.width=T.width*e,b.height=T.height*e,A=b.getContext("2d")),M(),f&&X1.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=T.width,u.svgHeight=T.height;function E(){for(var O=1,L=0,I=_.length;L<I;++L)O=Zm(O,_[L]);for(var k=1,L=0,I=y.length;L<I;++L)k=Zm(k,y[L].length);O*=k;var z=x*_.length*y.length;if(0)var V;return{width:Math.max(1,Math.min(O,o.maxTileWidth)),height:Math.max(1,Math.min(z,o.maxTileHeight))}}function M(){A&&(A.clearRect(0,0,b.width,b.height),o.backgroundColor&&(A.fillStyle=o.backgroundColor,A.fillRect(0,0,b.width,b.height)));for(var O=0,L=0;L<g.length;++L)O+=g[L];if(O<=0)return;for(var I=-x,k=0,z=0,V=0;I<T.height;){if(k%2===0){for(var q=z/2%y.length,G=0,$=0,oe=0;G<T.width*2;){for(var ie=0,L=0;L<m[V].length;++L)ie+=m[V][L];if(ie<=0)break;if($%2===0){var pe=(1-o.symbolSize)*.5,de=G+m[V][$]*pe,te=I+g[k]*pe,Te=m[V][$]*o.symbolSize,Pe=g[k]*o.symbolSize,vt=oe/2%y[q].length;bt(de,te,Te,Pe,y[q][vt])}G+=m[V][$],++oe,++$,$===m[V].length&&($=0)}++V,V===m.length&&(V=0)}I+=g[k],++z,++k,k===g.length&&(k=0)}function bt(ze,ut,Ce,Ie,$i){var Nt=n?1:e,Hl=It($i,ze*Nt,ut*Nt,Ce*Nt,Ie*Nt,o.color,o.symbolKeepAspect);if(n){var hf=i.painter.renderOneToVNode(Hl);hf&&S.children.push(hf)}else js(A,Hl)}}}}function q1(r){if(!r||r.length===0)return[["rect"]];if(H(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!H(r[e])){t=!1;break}if(t)return q1([r]);for(var i=[],e=0;e<r.length;++e)H(r[e])?i.push([r[e]]):i.push(r[e]);return i}function $1(r){if(!r||r.length===0)return[[0,0]];if(ge(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,i=0;i<r.length;++i)if(!ge(r[i])){e=!1;break}if(e)return $1([r]);for(var n=[],i=0;i<r.length;++i)if(ge(r[i])){var t=Math.ceil(r[i]);n.push([t,t])}else{var t=U(r[i],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function HF(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(ge(r)){var t=Math.ceil(r);return[t,t]}var e=U(r,function(i){return Math.ceil(i)});return r.length%2?e.concat(e):e}function GF(r){return U(r,function(t){return j1(t)})}function j1(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}var J1=_s(YF);function YF(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=sc(s,t)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=sc(n,t)}}})}var WF="6.1.0",ZF={zrender:"6.1.0"},XF=1,KF=800,qF=900,$F=920,jF=1e3,JF=2e3,Q1=5e3,lA=1e3,QF=1100,l0=2e3,uA=3e3,eB=4e3,Hp=4500,tB=4600,rB=5e3,iB=6e3,cA=7e3,u0={PROCESSOR:{SERIES_FILTER:KF,AXIS_STATISTICS:$F,FILTER:jF,STATISTIC:Q1,STATISTICS:Q1},VISUAL:{LAYOUT:lA,PROGRESSIVE_LAYOUT:QF,GLOBAL:l0,CHART:uA,POST_CHART_LAYOUT:tB,COMPONENT:eB,BRUSH:rB,CHART_ITEM:Hp,ARIA:iB,DECAL:cA}},_t="__flagInMainProcess",Np="__mainProcessVersion",Lt="__pendingUpdate",jy="__needsUpdateStatus",eA=/^[a-zA-Z0-9_]+$/,Jy="__connectUpdateStatus",tA=0,nB=1,aB=2;function fA(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return pA(this,r,t)}}function hA(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return pA(this,r,t)}}function pA(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),St.prototype[t].apply(r,e)}var dA=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(St),vA=dA.prototype;vA.on=hA("on");vA.off=hA("off");var No,Qy,kp,bn,Rp,e0,t0,Js,Qs,rA,iA,r0,nA,Fp,aA,mA,ri,oA,el,Bp=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,new w1)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},a.__v_skip=!0,a._dom=e;var o="canvas",s="auto",l=!1;if(a[Np]=1,0)var u;n.ssr&&Gm(function(p){var d=_e(p),v=d.dataIndex;if(v!=null){var m=Y();return m.set("series_index",d.seriesIndex),m.set("data_index",v),d.ssrType&&m.set("ssr_type",d.ssrType),m}});var c=a._zr=$f(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Z(n.useDirtyRect,l),useCoarsePointer:Z(n.useCoarsePointer,s),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=Do(ee(c.flush,c),17),a._updateTheme(i),a._locale=qT(n.locale||Vh),a._coordSysMgr=new Hs;var f=a._api=aA(a);function h(p,d){return p.__prio-d.__prio}return Pa(Vp,h),Pa(a0,h),a._scheduler=new Zy(a,f,a0,Vp),a._messageCenter=new dA,a._initEvents(),a.resize=ee(a.resize,a),c.animation.on("frame",a._onframe,a),rA(c,a),iA(c,a),Ta(a),a}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,i=this._model,n=this._api;if(oA(this),this[Lt]){var a=this[Lt].silent;this[_t]=!0,el(this);try{No(this),bn.update.call(this,null,this[Lt].updateParams)}catch(l){throw this[_t]=!1,this[Lt]=null,l}this._zr.flush(),this[_t]=!1,this[Lt]=null,Js.call(this,a),Qs.call(this,a)}else if(e.unfinished){var o=XF;do{e.unfinished=!1;var s=je.getTime();e.performSeriesTasks(i),e.performDataProcessorTasks(i),e0(this,i),e.performVisualTasks(i),Fp(this,this._model,n,"remain",{}),o-=je.getTime()-s}while(o>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,i,n){if(!this[_t]){if(this._disposed){this.id;return}var a,o,s;if(W(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[_t]=!0,el(this),!this._model||i){var l=new TC(this._api),u=this._theme,c=this._model=new fp;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},o0);var f={seriesTransition:s,optionChanged:!0};if(n)this[Lt]={silent:a,updateParams:f},this[_t]=!1,this.getZr().wakeUp();else{try{No(this),bn.update.call(this,null,f)}catch(h){throw this[Lt]=null,this[_t]=!1,h}this._ssr||this._zr.flush(),this[Lt]=null,this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype.setTheme=function(e,i){if(!this[_t]){if(this._disposed){this.id;return}var n=this._model;if(n){var a=i&&i.silent,o=null;this[Lt]&&(a==null&&(a=this[Lt].silent),o=this[Lt].updateParams,this[Lt]=null),this[_t]=!0,el(this);try{this._updateTheme(e),n.setTheme(this._theme),No(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[_t]=!1,s}this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype._updateTheme=function(e){H(e)&&(e=gA[e]),e&&(e=ne(e),e&&hp(e,!0),this._theme=e)},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||fe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,i=e.storage.getDisplayList();return w(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;w(i,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return w(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(Up[n]){var l=s,u=s,c=-s,f=-s,h=[],p=e&&e.pixelRatio||this.getDevicePixelRatio();w(ko,function(_,x){if(_.group===n){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ne(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:b,left:S.left,top:S.top})}}),l*=p,u*=p,c*=p,f*=p;var d=c-l,v=f-u,m=je.createCanvas(),g=$f(m,{renderer:i?"svg":"canvas"});if(g.resize({width:d,height:v}),i){var y="";return w(h,function(_){var x=_.left-l,b=_.top-u;y+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return e.connectedBackgroundColor&&g.add(new Oe({shape:{x:0,y:0,width:d,height:v},style:{fill:e.connectedBackgroundColor}})),w(h,function(_){var x=new ur({style:{x:_.left*p-l,y:_.top*p-u,image:_.dom}});g.add(x)}),g.refreshImmediately(),m.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i,n){return Rp(this,"convertToPixel",e,i,n)},t.prototype.convertToLayout=function(e,i,n){return Rp(this,"convertToLayout",e,i,n)},t.prototype.convertFromPixel=function(e,i,n){return Rp(this,"convertFromPixel",e,i,n)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=th(n,e);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=th(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?D1(s,l,i):qs(s,i)},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=this;w(oB,function(n){var a=function(o){var s=e.getModel(),l=o.target,u,c=n==="globalout";if(c?u={}:l&&Mo(l,function(v){var m=_e(v);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=B({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var p=f&&h!=null&&s.getComponent(f,h),d=p&&e[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:p,view:d},e.trigger(n,u)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)});var i=this._messageCenter;w(n0,function(n,a){i.on(a,function(o){e.trigger(a,o)})}),E1(i,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&qm(this.getDom(),f0,"");var i=this,n=i._api,a=i._model;w(i._componentsViews,function(o){o.dispose(a,n)}),w(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete ko[i.id]},t.prototype.resize=function(e){if(!this[_t]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[Lt]&&(a==null&&(a=this[Lt].silent),n=!0,this[Lt]=null),this[_t]=!0,el(this);try{n&&No(this),bn.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[_t]=!1,o}this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(W(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!s0[e]){var n=s0[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=B({},e);return i.type=i0[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(W(i)||(i={silent:!!i}),!!zp[e.type]&&this._model){if(this[_t]){this._pendingActions.push(e);return}var n=i.silent;t0.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&fe.browser.weChat&&this._throttledZrFlush(),Js.call(this,n),Qs.call(this,n)}},t.prototype.updateLabelLayout=function(){kr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){No=function(f){I1(f._model);var h=f._scheduler;h.restorePipelines(f._zr,f._model),h.prepareStageTasks(),Qy(f,!0),Qy(f,!1),h.plan()},Qy=function(f,h){for(var p=f._model,d=f._scheduler,v=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,_=0;_<v.length;_++)v[_].__alive=!1;h?p.eachComponent(function(S,T){S!=="series"&&x(T)}):p.eachSeries(x);function x(S){var T=S.__requireNewView;S.__requireNewView=!1;var A="_ec_"+S.id+"_"+S.type,E=!T&&m[A];if(!E){var M=lr(S.type),O=h?nt.getClass(M.main,M.sub):Ft.getClass(M.sub);E=new O,E.init(p,y),m[A]=E,v.push(E),g.add(E.group)}S.__viewId=E.__id=A,E.__alive=!0,E.__model=S,E.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!h&&d.prepareView(E,S,p,y)}for(var _=0;_<v.length;){var b=v[_];b.__alive?_++:(!h&&b.renderTask.dispose(),g.remove(b.group),b.dispose(p,y),v.splice(_,1),m[b.__id]===b&&delete m[b.__id],b.__id=b.group.__ecComponentInfo=null)}},kp=function(f,h,p,d,v){var m=f._model;if(m.setUpdatePayload(p),!d){w([].concat(f._componentsViews).concat(f._chartsViews),x);return}var g=FS(p,d,v),y=p.excludeSeriesId,_;y!=null&&(_=Y(),w(Qe(y),function(b){var S=Ar(b,null);S!=null&&_.set(S,!0)})),m&&m.eachComponent(g,function(b){var S=_&&_.get(b.id)!=null;if(!S)if(Ng(p))if(b instanceof tr)p.type===Qn&&!p.notBlur&&!b.get(["emphasis","disabled"])&&Xw(b,p,f._api);else{var T=yh(b.mainType,b.componentIndex,p.name,f._api),A=T.focusSelf,E=T.dispatchers;p.type===Qn&&A&&!p.notBlur&&ph(b.mainType,b.componentIndex,f._api),E&&w(E,function(M){p.type===Qn?dn(M):vn(M)})}else _h(p)&&b instanceof tr&&($w(b,p,f._api),Pg(b),ri(f))},f),m&&m.eachComponent(g,function(b){var S=_&&_.get(b.id)!=null;S||x(f[d==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},f);function x(b){b&&b.__alive&&b[h]&&b[h](b.__model,m,f._api,p)}},bn={prepareAndUpdate:function(f){No(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,h){var p=this._model,d=this._api,v=this._zr,m=this._coordSysMgr,g=this._scheduler;if(p){L1(p),p.setUpdatePayload(f),g.restoreData(p,f),g.performSeriesTasks(p),m.create(p,d),kr.trigger("coordsys:aftercreate",p,d),g.performDataProcessorTasks(p,f),e0(this,p),m.update(p,d),i(p),g.performVisualTasks(p,f);var y=p.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var _=p.get("darkMode");_!=null&&_!=="auto"&&v.setDarkMode(_),r0(this,p,d,f,h),kr.trigger("afterupdate",p,d)}},updateTransform:function(f){var h=this,p=h._model,d=h._api;if(p){p.setUpdatePayload(f);var v=[];p.eachComponent(function(g,y){if(g!==ch){var _=h.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,p,d,f);x&&x.update&&v.push(_)}else v.push(_)}});var m=Y();p.eachSeries(function(g){var y=h._chartsMap[g.__viewId],_=g.pipelineContext;if(y.updateTransform&&!_.progressiveRender){var x=y.updateTransform(g,p,d,f);x&&x.update&&m.set(g.uid,1)}else m.set(g.uid,1)}),h._scheduler.performVisualTasks(p,f,{setDirty:!0,dirtyMap:m}),Fp(h,p,d,f,{},m),kr.trigger("afterupdate",p,d)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),Ft.markUpdateMethod(f,"updateView"),i(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),r0(this,h,this._api,f,{}),kr.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,p=this._model;p&&(p.setUpdatePayload(f),p.eachSeries(function(d){d.getData().clearAllVisual()}),Ft.markUpdateMethod(f,"updateVisual"),i(p),this._scheduler.performVisualTasks(p,f,{visualType:"visual",setDirty:!0}),p.eachComponent(function(d,v){if(d!=="series"){var m=h.getViewOfComponentModel(v);m&&m.__alive&&m.updateVisual(v,p,h._api,f)}}),p.eachSeries(function(d){var v=h._chartsMap[d.__viewId];v.updateVisual(d,p,h._api,f)}),kr.trigger("afterupdate",p,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function e(f,h,p,d,v){if(f._disposed){f.id;return}for(var m=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,_=th(m,p),x=0;x<g.length;x++){var b=g[x];if(b[h]&&(y=b[h](m,_,d,v))!=null)return y}}Rp=e,e0=function(f,h){var p=f._chartsMap,d=f._scheduler;h.eachSeries(function(v){d.updateStreamModes(v,p[v.__viewId])})},t0=function(f,h){var p=this,d=this.getModel(),v=f.type,m=f.escapeConnect,g=zp[v],y=(g.update||"update").split(":"),_=y.pop(),x=y[0]!=null&&lr(y[0]);this[_t]=!0,el(this);var b=[f],S=!1;f.batch&&(S=!0,b=U(f.batch,function(V){return V=he(B({},V),f),V.batch=null,V}));var T=[],A,E=[],M=g.nonRefinedEventType,O=_h(f),L=Ng(f);if(L&&Lg(this._api),w(b,function(V){var q=g.action(V,d,p._api);if(g.refineEvent?E.push(q):A=q,A=A||B({},V),A.type=M,T.push(A),L){var G=wu(f),$=G.queryOptionMap,oe=G.mainTypeSpecified,ie=oe?$.keys()[0]:"series";kp(p,_,V,ie),ri(p)}else O?(kp(p,_,V,"series"),ri(p)):x&&kp(p,_,V,x.main,x.sub)}),_!=="none"&&!L&&!O&&!x)try{this[Lt]?(No(this),bn.update.call(this,f),this[Lt]=null):bn[_].call(this,f)}catch(V){throw this[_t]=!1,V}if(S?A={type:M,escapeConnect:m,batch:T}:A=T[0],this[_t]=!1,!h){var I=void 0;if(g.refineEvent){var k=g.refineEvent(E,f,d,this._api).eventContent;ft(W(k)),I=he({type:g.refinedEventType},k),I.fromAction=f.type,I.fromActionPayload=f,I.escapeConnect=!0}var z=this._messageCenter;z.trigger(A.type,A),I&&z.trigger(I.type,I)}},Js=function(f){for(var h=this._pendingActions;h.length;){var p=h.shift();t0.call(this,p,f)}},Qs=function(f){!f&&this.trigger("updated")},rA=function(f,h){f.on("rendered",function(p){h.trigger("rendered",p),f.animation.isFinished()&&!h[Lt]&&!h._scheduler.unfinished&&!h._pendingActions.length?h.trigger("finished"):f.refresh()})},iA=function(f,h){f.on("mouseover",function(p){var d=p.target,v=Mo(d,ku);v&&(Kw(v,p,h._api),ri(h))}).on("mouseout",function(p){var d=p.target,v=Mo(d,ku);v&&(qw(v,p,h._api),ri(h))}).on("click",function(p){var d=p.target,v=Mo(d,function(y){return _e(y).dataIndex!=null},!0);if(v){var m=v.selected?"unselect":"select",g=_e(v);h._api.dispatchAction({type:m,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function i(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],p=[],d=!1;if(f.eachComponent(function(y,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(y==="series"?p:h).push({zlevel:x,z:b,idx:_.componentIndex,type:y,key:S})}),d){var v=h.concat(p),m,g;Pa(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),w(v,function(y){var _=f.getComponent(y.type,y.idx),x=y.zlevel,b=y.key;m!=null&&(x=Math.max(m,x)),b?(x===m&&b!==g&&x++,g=b):g&&(x===m&&x++,g=""),m=x,_.setZLevel(x)})}}r0=function(f,h,p,d,v){n(h),nA(f,h,p,d,v),w(f._chartsViews,function(m){m.__alive=!1}),Fp(f,h,p,d,v),w(f._chartsViews,function(m){m.__alive||m.remove(h,p)})},nA=function(f,h,p,d,v,m){w(m||f._componentsViews,function(g){var y=g.__model;u(y,g),g.render(y,h,p,d),l(y,g),c(y,g)})},Fp=function(f,h,p,d,v,m){var g=f._scheduler;v=B(v||{},{updatedSeries:h.getSeries()}),kr.trigger("series:beforeupdate",h,p,v);var y=!1;h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;g.updatePayload(b,d),u(_,x),m&&m.get(_.uid)&&b.dirty(),b.perform(g.getPerformArgs(b))&&(y=!0),x.group.silent=!!_.get("silent"),s(_,x),Pg(_)}),g.unfinished=y||g.unfinished,kr.trigger("series:layoutlabels",h,p,v),kr.trigger("series:transition",h,p,v),h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];l(_,x),c(_,x)}),o(f,h),kr.trigger("series:afterupdate",h,p,v)},ri=function(f){f[jy]=!0,f.getZr().wakeUp()},el=function(f){f[Np]=(f[Np]+1)%1e6},oA=function(f){f[jy]&&(f.getZr().storage.traverse(function(h){lo(h)||a(h)}),f[jy]=!1)};function a(f){for(var h=[],p=f.currentStates,d=0;d<p.length;d++){var v=p[d];v==="emphasis"||v==="blur"||v==="select"||h.push(v)}f.selected&&f.states.select&&h.push("select"),f.hoverState===Ou&&f.states.emphasis?h.push("emphasis"):f.hoverState===Mu&&f.states.blur&&h.push("blur"),f.useStates(h)}function o(f,h){var p=f._zr;if(p.painter.type==="canvas"){var d=p.storage,v=0;d.traverse(function(g){g.isGroup||v++});var m=v>Z(h.get("hoverLayerThreshold"),lp.hoverLayerThreshold)&&!fe.node&&!fe.worker;(f._usingTHL||m)&&(h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(_){var x=_.states.emphasis;x&&x.hoverLayer!==co&&(x.hoverLayer=m?Xg:Zg)})}}),f._usingTHL=m)}}function s(f,h){var p=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=p)})}function l(f,h){if(!f.preventAutoZ){var p=Yi(f);h.eachRendered(function(d){return Yu(d,p.z,p.zlevel),!0})}}function u(f,h){h.eachRendered(function(p){if(!lo(p)){var d=p.getTextContent(),v=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function c(f,h){var p=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),v=p.get("duration"),m=v>0?{duration:v,delay:p.get("delay"),easing:p.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(lo(g))return;if(g instanceof ve&&eT(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var _=g.getTextContent(),x=g.getTextGuideLine();_&&(_.stateTransition=m),x&&(x.stateTransition=m)}g.__dirty&&a(g)}})}aA=function(f){return new((function(h){N(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(d){for(;d;){var v=d.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);d=d.parent}},p.prototype.enterEmphasis=function(d,v){dn(d,v),ri(f)},p.prototype.leaveEmphasis=function(d,v){vn(d,v),ri(f)},p.prototype.enterBlur=function(d){gh(d),ri(f)},p.prototype.leaveBlur=function(d){Nu(d),ri(f)},p.prototype.enterSelect=function(d){Og(d),ri(f)},p.prototype.leaveSelect=function(d){Ig(d),ri(f)},p.prototype.getModel=function(){return f.getModel()},p.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},p.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},p.prototype.getECUpdateCycleVersion=function(){return f[Np]},p.prototype.usingTHL=function(){return f._usingTHL},p})(hh))(f)},mA=function(f){function h(p,d){for(var v=0;v<p.length;v++){var m=p[v];m[Jy]=d}}w(i0,function(p,d){f._messageCenter.on(d,function(v){if(Up[f.group]&&f[Jy]!==tA){if(v&&v.escapeConnect)return;var m=f.makeActionFromEvent(v),g=[];w(ko,function(y){y!==f&&y.group===f.group&&g.push(y)}),h(g,tA),w(g,function(y){y[Jy]!==nB&&y.dispatchAction(m)}),h(g,aB)}})})}})(),t})(St),c0=Bp.prototype;c0.on=fA("on");c0.off=fA("off");c0.one=function(r,t,e){var i=this;function n(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),i.off(r,n)}this.on.call(this,r,n,e)};var oB=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var zp={},i0={},n0={},a0=[],o0=[],Vp=[],gA={},s0={},ko={},Up={},sB=+new Date-0,lB=+new Date-0,f0="_echarts_instance_";function uB(r,t,e){var i=!(e&&e.ssr);if(i){var n=h0(r);if(n)return n}var a=new Bp(r,t,e);return a.id="ec_"+sB++,ko[a.id]=a,i&&qm(r,f0,a.id),mA(a),kr.trigger("afterinit",a),a}function cB(r){if(F(r)){var t=r;r=null,w(t,function(e){e.group!=null&&(r=e.group)}),r=r||"g_"+lB++,w(t,function(e){e.group=r})}return Up[r]=!0,r}function yA(r){Up[r]=!1}var fB=yA;function hB(r){H(r)?r=ko[r]:r instanceof Bp||(r=h0(r)),r instanceof Bp&&!r.isDisposed()&&r.dispose()}function h0(r){return ko[BS(r,f0)]}function pB(r){return ko[r]}function lc(r,t){gA[r]=t}function Gp(r){ce(o0,r)<0&&o0.push(r)}function Yp(r,t){g0(a0,r,t,JF)}function p0(r){uc("afterinit",r)}function d0(r){uc("afterupdate",r)}function uc(r,t){kr.on(r,t)}function Xi(r,t,e){var i,n,a,o,s;j(t)&&(e=t,t=""),W(r)?(i=r.type,n=r.event,o=r.update,s=r.publishNonRefinedEvent,e||(e=r.action),a=r.refineEvent):(i=r,n=t);function l(c){return c.toLowerCase()}n=l(n||i);var u=a?l(i):n;zp[i]||(ft(eA.test(i)&&eA.test(n)),a&&ft(n!==i),zp[i]={actionType:i,refinedEventType:n,nonRefinedEventType:u,update:o,action:e,refineEvent:a},n0[n]=1,a&&s&&(n0[u]=1),i0[u]=i)}function v0(r,t){Hs.register(r,t)}function dB(r){var t=Hs.get(r);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function vB(r,t){Dp(r,t)}function m0(r,t){g0(Vp,r,t,lA,"layout",!0)}function Sn(r,t){g0(Vp,r,t,uA,"visual",!0)}var sA=[];function g0(r,t,e,i,n,a){if((j(t)||W(t))&&(e=t,t=i),!(ce(sA,e)>=0)){sA.push(e);var o=Zy.wrapStageHandler(e,n);o.__prio=t,o.__raw=e,r.push(o)}}function Wp(r,t){s0[r]=t}function mB(r){gf({createCanvas:r})}function y0(r,t,e){var i=Ky("registerMap");i&&i(r,t,e)}function gB(r){var t=Ky("getMap");return t&&t(r)}var _0=HC;Sn(l0,p1);Sn(Hp,d1);Sn(Hp,v1);Sn(l0,C1);Sn(Hp,A1);Sn(cA,J1);Gp(hp);Yp(qF,IC);Wp("default",Wy);Xi({type:Qn,event:Qn,update:Qn},Ze);Xi({type:Iu,event:Iu,update:Iu},Ze);Xi({type:Lu,event:vh,update:Lu,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});Xi({type:dh,event:vh,update:dh,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});Xi({type:Pu,event:vh,update:Pu,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});function x0(r,t,e,i){return{eventContent:{selected:jw(e),isFromClick:t.isFromClick||!1}}}lc("default",{});lc("dark",S1);var yB={};function cc(r){return r==null?0:r.length||1}function _A(r){return r}var xB=(function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||_A,this._newKeyGetter=n||_A,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=i[s],u=cc(l);if(u>1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],c=n[l],f=cc(u),h=cc(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),n[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(f>1)for(var p=0;p<f;p++)this._remove&&this._remove(u[p]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},r.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],a=e[n],o=cc(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[n]=null}},r.prototype._initIndexMap=function(t,e,i,n){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(a||(i[o]=s),!!e){var l=e[s],u=cc(l);u===0?(e[s]=o,a&&i.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),xA=xB;var bB=(function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function bA(r,t){var e={},i=e.encode={},n=Y(),a=[],o=[],s={};w(r.dimensions,function(h){var p=r.getDimensionInfo(h),d=p.coordDim;if(d){var v=p.coordDimIndex;b0(i,d)[v]=h,p.isExtraCoord||(n.set(d,1),SB(p.type)&&(a[0]=h),b0(s,d)[v]=r.getDimensionIndex(p.name)),p.defaultTooltip&&o.push(h)}fh.each(function(m,g){var y=b0(i,g),_=p.otherDims[g];_!=null&&_!==!1&&(y[_]=p.name)})});var l=[],u={};n.each(function(h,p){var d=i[p];u[p]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=U(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),e.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(a=c.slice());var f=i.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e.userOutput=new bB(s,t),e}function b0(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function SA(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function SB(r){return!(r==="ordinal"||r==="time")}var wB=(function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r})(),tl=wB;var TB=re(),CB={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S0=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=w0(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return Z(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=dp(this.source),i=!T0(t),n="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=e?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=e?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),e&&l!=null&&(!f||!f.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=CB[u]||"f",c&&(n+=c.uid),n+="$"}var p=this.source,d=[p.seriesLayoutBy,p.startIndex,n].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(n=a.name),i++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Zp(r){return r instanceof S0}function fc(r){for(var t=Y(),e=0;e<(r||[]).length;e++){var i=r[e],n=W(i)?i.name:i;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function w0(r){var t=TB(r);return t.dimNameMap||(t.dimNameMap=fc(r.dimensionsDefine))}function T0(r){return r>30}var hc=W,ua=U,AB=typeof Int32Array>"u"?Array:Int32Array,DB="e\0\0",wA=-1,EB=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],MB=["_approximateExtent"],TA,Xp,pc,dc,C0,vc,A0,OB=(function(){function r(t,e){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 i,n=!1;Zp(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<i.length;c++){var f=i[c],h=H(f)?new tl({name:f}):f instanceof tl?f:new tl(f),p=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=p,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};o.push(p),a[p]=h,u[p]!=null&&(l=!0),h.createInvertedIndices&&(s[p]=[]),n&&(h.storeDimIndex=c),d.itemName===0&&(this._nameDimIdx=h.storeDimIndex),d.itemId===0&&(this._idDimIdx=h.storeDimIndex)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=Y();w(o,function(m){v.set(a[m].storeDimIndex,m)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(i!=null)return i;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(ge(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(i){return e.hasOwnProperty(i)?e[i]:void 0}:function(i){return e[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,i=e.encode[t];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,i){var n=this,a;if(t instanceof Qu&&(a=t),!a){var o=this.dimensions,s=Zs(t)||ct(t)?new mp(t,o.length):t;a=new Qu;var l=ua(o,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=bA(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e&&e.length),n=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<a;s++){var l=s-n;this._nameList[s]=e[l],o&&A0(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Mr&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===At;if(l&&!n.pure)for(var u=[],c=t;c<e;c++){var f=n.getItem(c,u);if(!this.hasItemOption&&LS(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=Ar(h,null));var p=f.id;o[c]==null&&p!=null&&(o[c]=Ar(p,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<e;c++)A0(this,c);TA(this)}},r.prototype.getApproximateExtent=function(t,e){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t),e)},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){hc(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=pc(this,this._nameDimIdx,e)),i==null&&(i=""),i},r.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},r.prototype.getId=function(t){return Xp(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t),null)},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var i=this,n=this._store;return F(t)?n.getValues(ua(t,function(a){return i._getStoreDimIndex(a)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i&&i[e];return n==null||isNaN(n)?wA:n},r.prototype.each=function(t,e,i){"use strict";j(t)&&(i=e,e=t,t=[]);var n=i||this,a=ua(dc(t),this._getStoreDimIndex,this);this._store.each(a,n?ee(e,n):e)},r.prototype.filterSelf=function(t,e,i){"use strict";j(t)&&(i=e,e=t,t=[]);var n=i||this,a=ua(dc(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?ee(e,n):e),this},r.prototype.selectRange=function(t){"use strict";var e=this,i={},n=De(t),a=[];return w(n,function(o){var s=e._getStoreDimIndex(o);i[s]=t[o],a.push(s)}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(t,e,i){"use strict";j(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},i),n},r.prototype.map=function(t,e,i,n){"use strict";var a=i||n||this,o=ua(dc(t),this._getStoreDimIndex,this),s=vc(this);return s._store=this._store.map(o,a?ee(e,a):e),s},r.prototype.modify=function(t,e,i,n){var a=this,o=i||n||this,s=ua(dc(t),this._getStoreDimIndex,this);this._store.modify(s,o?ee(e,o):e)},r.prototype.downSample=function(t,e,i,n){var a=vc(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),a},r.prototype.minmaxDownSample=function(t,e){var i=vc(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),i},r.prototype.lttbDownSample=function(t,e){var i=vc(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Re(i,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new xA(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Xp(t,i)},function(i){return Xp(e,i)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},hc(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),F(a)?a=a.slice():hc(a)&&(a=B({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,hc(e)?B(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){hc(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Nw(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){w(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:ua(this.dimensions,this._getDimInfo,this),this.hostModel)),C0(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];j(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Xl(arguments)))})},r.internalField=(function(){TA=function(t){var e=t._invertedIndicesMap;w(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new AB(o.categories.length);for(var l=0;l<i.length;l++)i[l]=wA;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},pc=function(t,e,i){return Ar(t._getCategory(e,i),null)},Xp=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=pc(t,t._idDimIdx,e)),i==null&&(i=DB+e),i},dc=function(t){return F(t)||(t=t!=null?[t]:[]),t},vc=function(t){var e=new r(t._schema?t._schema:ua(t.dimensions,t._getDimInfo,t),t.hostModel);return C0(e,t),e},C0=function(t,e){w(EB.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,w(MB,function(i){t[i]=ne(e[i])}),t._calculationInfo=B({},e._calculationInfo)},A0=function(t,e){var i=t._nameList,n=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=i[e],l=n[e];if(s==null&&a!=null&&(i[e]=s=pc(t,a,e)),l==null&&o!=null&&(n[e]=l=pc(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),n[e]=l}}})(),r})(),_i=OB;var F0={};Sr(F0,{createDimensions:()=>CA,createList:()=>yz,createScale:()=>xz,createSymbol:()=>It,createTextStyle:()=>Sz,dataStack:()=>_z,enableHoverEmphasis:()=>ea,getECData:()=>_e,getLayoutRect:()=>Jr,mixinAxisModelCommonMethods:()=>bz});function CA(r,t){return Kp(r,t).dimensions}function Kp(r,t){Zs(r)||(r=Xs(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=Y(),a=[],o=IB(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&T0(o),l=i===r.dimensionsDefine,u=l?w0(r):fc(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=Y(c),h=new Fy(o),p=0;p<h.length;p++)h[p]=-1;function d(E){var M=h[E];if(M<0){var O=i[E],L=W(O)?O:{name:O},I=new tl,k=L.name;k!=null&&u.get(k)!=null&&(I.name=I.displayName=k),L.type!=null&&(I.type=L.type),L.displayName!=null&&(I.displayName=L.displayName);var z=a.length;return h[E]=z,I.storeDimIndex=E,a.push(I),I}return a[M]}if(!s)for(var p=0;p<o;p++)d(p);f.each(function(E,M){var O=Qe(E).slice();if(O.length===1&&!H(O[0])&&O[0]<0){f.set(M,!1);return}var L=f.set(M,[]);w(O,function(I,k){var z=H(I)?u.get(I):I;z!=null&&z<o&&(L[k]=z,m(d(z),M,k))})});var v=0;w(e,function(E){var M,O,L,I;if(H(E))M=E,I={};else{I=E,M=I.name;var k=I.ordinalMeta;I.ordinalMeta=null,I=B({},I),I.ordinalMeta=k,O=I.dimsDef,L=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var z=f.get(M);if(z!==!1){if(z=Qe(z),!z.length)for(var V=0;V<(O&&O.length||1);V++){for(;v<o&&d(v).coordDim!=null;)v++;v<o&&z.push(v++)}w(z,function(q,G){var $=d(q);if(l&&I.type!=null&&($.type=I.type),m(he($,I),M,G),$.name==null&&O){var oe=O[G];!W(oe)&&(oe={name:oe}),$.name=$.displayName=oe.name,$.defaultTooltip=oe.defaultTooltip}L&&he($.otherDims,L)})}});function m(E,M,O){fh.get(M)!=null?E.otherDims[M]=O:(E.coordDim=M,E.coordDimIndex=O,n.set(M,!0))}var g=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=g?y||1:0;var x=g||"value";function b(E){E.name==null&&(E.name=E.coordDim)}if(s)w(a,function(E){b(E)}),a.sort(function(E,M){return E.storeDimIndex-M.storeDimIndex});else for(var S=0;S<o;S++){var T=d(S),A=T.coordDim;A==null&&(T.coordDim=LB(x,n,_),T.coordDimIndex=0,(!g||y<=0)&&(T.isExtraCoord=!0),y--),b(T),T.type==null&&(up(r,S)===er.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return ys(a,function(E){return E.name},function(E,M){M>0&&(E.name=E.name+(M-1))}),new S0({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function IB(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return w(t,function(a){var o;W(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function LB(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var PB=(function(){function r(t){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=t}return r})();function AA(r){var t=r.get("coordinateSystem"),e=new PB(t),i=NB[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var NB={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",at).models[0],a=r.getReferringComponents("yAxis",at).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),rl(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),rl(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",at).models[0];t.coordSysDims=["single"],e.set("single",n),rl(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",at).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),rl(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),rl(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();w(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];e.set(c,u),rl(u)&&(i.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,i){var n=r.getReferringComponents("matrix",at).models[0];t.coordSysDims=["x","y"];var a=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",a),e.set("y",o),i.set("x",a),i.set("y",o)}};function rl(r){return r.get("type")==="category"}function qp(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;kB(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,h,p=!0;function d(x){return x.type!=="ordinal"&&x.type!=="time"}if(w(a,function(x,b){H(x)&&(a[b]=x={name:x}),d(x)||(p=!1)}),w(a,function(x,b){l&&!x.isExtraCoord&&(!i&&!u&&x.ordinalMeta&&(u=x),!c&&d(x)&&(!p||x.coordDim!=="x"&&x.coordDim!=="angle")&&(!n||n===x.coordDim)&&(c=x))}),c&&!i&&!u&&(i=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,m=c.type,g=0;w(a,function(x){x.coordDim===v&&g++});var y={name:f,coordDim:v,coordDimIndex:g,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:h,coordDim:h,coordDimIndex:g+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(h,m),_.storeDimIndex=s.ensureCalculationDimension(f,m)),o.appendCalculationDimension(y),o.appendCalculationDimension(_)):(a.push(y),a.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:h,stackResultDimension:f}}function kB(r){return!Zp(r.schema)}function Rr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function il(r,t){return Rr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function RB(r,t){var e=r.get("coordinateSystem"),i=Hs.get(e),n;return t&&t.coordSysDims&&(n=U(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=SA(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function FB(r,t,e){var i,n;return e&&w(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function BB(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;r?(a=!0,n=Xs(r)):(n=i.getSource(),a=n.sourceFormat===At);var o=AA(t),s=RB(t,o),l=e.useEncodeDefaulter,u=j(l)?l:l?Ae(dC,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Kp(n,c),h=FB(f.dimensions,e.createInvertedIndices,o),p=a?null:i.getSharedDataStore(f),d=qp(t,{schema:f,store:p}),v=new _i(f,t);v.setCalculationInfo(d);var m=h!=null&&zB(n)?function(g,y,_,x){return x===h?_:this.defaultDimValueGetter(g,y,_,x)}:null;return v.hasItemOption=!1,v.initData(a?n:p,null,m),v}function zB(r){if(r.sourceFormat===At){var t=VB(r.data||[]);return!F(cn(t))}}function VB(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var ca=BB;var DA=(function(){function r(){}return r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Xn(DA);var ir=DA;var UB=0,HB=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++UB,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&U(i,GB);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!H(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Y(this.categories))},r})();function GB(r){return W(r)&&r.value!=null?r.value:r+""}var mc=HB;var pr=0,nl=1,YB={needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1},MA=De(YB),al=2,OA=3;function ol(r,t,e){var i;r=r||{};var n=it();if(n){var a=n.createBreakScaleMapper(t,e);a.hasBreaks()&&(w(MA,function(o){a[o]&&(r[o]=ee(a[o],a))}),i=a)}return i==null&&WB(r,e),{brk:i,mapper:r}}function $p(r,t){w(MA,function(e){r[e]=t[e]})}function jp(r,t){r.freeze=Ze}function wn(r){return r.getExtentUnsafe(pr,al)}function Ro(r,t){return r.getExtentUnsafe(nl,t)||r.getExtentUnsafe(pr,t)}function IA(r){var t=Ro(r,OA);return t[1]-t[0]}function sl(r){var t=r.getExtentUnsafe(pr,OA);return t[1]-t[0]}function WB(r,t){var e=r||{},i=[];return e._extents=i,i[pr]=t?t.slice():Rt(),B(e,ZB),e}var ZB={needTransform:function(){return!1},normalize:function(r){var t=this._extents[nl]||this._extents[pr];return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])},scale:function(r){var t=this._extents[nl]||this._extents[pr];return r*(t[1]-t[0])+t[0]},transformIn:function(r){return r},transformOut:function(r){return r},contain:function(r){var t=Ro(this,null);return r>=t[0]&&r<=t[1]},getExtent:function(){return this._extents[pr].slice()},getExtentUnsafe:function(r){return this._extents[r]},setExtent:function(r,t){EA(this._extents,pr,r,t)},setExtent2:function(r,t,e){var i=this._extents;i[r]||(i[r]=i[pr].slice()),EA(i,r,t,e)},freeze:function(){}};function EA(r,t,e,i){fn(e,i)&&(r[t][0]=e,r[t][1]=i)}function Jp(r){return ll(r)||qi(r)}function ll(r){return r.type==="interval"}function Ki(r){return r.type==="time"}function qi(r){return r.type==="log"}function lt(r){return r.type==="ordinal"}function LA(r){var t=ps(r),e=Wn(10,t),i=or(r/e);return i?i===2?i=3:i===3?i=5:i*=2:i=1,we(i*e,-t)}function xi(r){return Kt(r)+2}function gc(r,t){return Yn(r)/Yn(t)}function Qp(r,t,e){var i=e&&e.lookup;if(i){for(var n=0;n<i.from.length;n++)if(r===i.from[n])return i.to[n]}return Wn(t,r)}function ed(r,t,e){var i=r.slice();if(i[0]===i[1]){var n=e&&e.ctnShp;if(i[0]!==0){var a=Ge(i[0]);t[1]||(i[1]+=a/2),i[0]-=a/2}else n&&(i[0]=-1),i[1]=1}return(!di(i[0])||!di(i[1]))&&(i[0]=0,i[1]=1),i[1]<i[0]&&i.reverse(),i}function PA(r,t){return[r[0]!==t[0],r[1]!==t[1]]}function yc(r,t){return r=r||t,or(Se(r,1))}function td(r,t,e){var i=wn(r),n=i[0],a=r.count(),o=Math.max((t||0)+1,1);n!==0&&o>1&&a/o>2&&(n=Math.round(Math.ceil(n/o)*o)),n!==i[0]&&l(i[0],!0,!0);for(var s=n;s<=i[1];s+=o)l(s,!1,s===i[0]||s===i[1]);s-o!==i[1]&&l(i[1],!0,!0);function l(u,c,f){e({value:u,offInterval:c},f)}}var NA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="ordinal",i.parse=t.parse,$p(i,t.decoratedMethods);var n=e.ordinalMeta;n||(n=new mc({})),F(n)&&(n=new mc({categories:U(n,function(o){return W(o)?o.value:o})})),i._ordinalMeta=n;var a=ol(null,null,e.extent||[0,n.categories.length-1]);return i._mapper=a.mapper,jp(i,a.mapper),i}return t.parse=function(e){return e==null?e=NaN:H(e)?(e=this._ordinalMeta.getOrdinal(e),e==null&&(e=NaN)):e=or(e),e},t.prototype.getTicks=function(){var e=[];return td(this,0,function(i){e.push(i)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Xe(s,i.length);o<l;++o){var u=n[o]=i[o];a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;n[o]=c,a[c]=o}},t.prototype._getTickNumber=function(e){var i=this._ticksByOrdinalNumber;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getRawOrdinalNumber=function(e){var i=this._ordinalNumbersByTick;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var i=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},t.prototype.count=function(){var e=wn(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type="ordinal",t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(or(this._mapper.scale(e)))},transformIn:function(e,i){return this._mapper.transformIn(this._getTickNumber(e),i)},transformOut:function(e,i){return this.getRawOrdinalNumber(this._mapper.transformOut(e,i))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,i){return this._mapper.getExtentUnsafe(e,i)},setExtent:function(e,i){return this._mapper.setExtent(e,i)},setExtent2:function(e,i,n){return this._mapper.setExtent2(e,i,n)}},t})(ir);ir.registerClass(NA);var kA=NA;function ul(r,t,e,i){for(var n=r.getTicks({expandToNicedExtent:!0}),a=[],o=r.getExtent(),s=1;s<n.length;s++){var l=n[s],u=n[s-1];if(!(u.break||l.break)){for(var c=0,f=[],h=l.value-u.value,p=h/t,d=xi(p);c<t-1;){var v=we(u.value+(c+1)*p,d);v>o[0]&&v<o[1]&&f.push(v),c++}var m=it();m&&m.pruneTicksByBreak("auto",f,e,function(g){return g},i,o),a.push(f)}}return a}var RA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="interval",i.parse=t.parse,e=e||{};var n=Hh(i,e),a=ol(i,n,null);return i.brk=a.brk,i._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},i}return t.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.getConfig=function(){return ne(this._cfg)},t.prototype.setConfig=function(e){var i=wn(this);this._cfg=e=ne(e),e.niceExtent==null&&(e.niceExtent=i.slice()),e.intervalPrecision==null&&(e.intervalPrecision=xi(e.interval))},t.prototype.getTicks=function(e){e=e||{};var i=this._cfg,n=i.interval,a=wn(this),o=i.niceExtent,s=i.intervalPrecision,l=it(),u=this.brk,c=l&&u,f=[];if(!n)return f;if(e.breakTicks==="only_break"&&c)return l.addBreaksToTicks(f,u.breaks,a),f;var h=3e3;a[0]<o[0]&&f.push({value:e.expandToNicedExtent?we(o[0]-n,s):a[0]});for(var p=function(_,x){return or((x-_)/n)},d=i.intervalCount,v=o[0],m=0;;m++){if(d==null){if(v>o[1]||!isFinite(v)||!isFinite(o[1]))break}else{if(m>d)break;v=Xe(v,o[1]),m===d&&(v=o[1])}if(f.push({value:v}),v=we(v+n,s),u){var g=u.calcNiceTickMultiple(v,p);g>=0&&(v=we(v+g*n,s))}if(f.length>0&&v===f[f.length-1].value)break;if(f.length>h)return[]}var y=f.length?f[f.length-1].value:o[1];return a[1]>y&&f.push({value:e.expandToNicedExtent?we(y+n,s):a[1]}),c&&l.pruneTicksByBreak(e.pruneByBreak,f,u.breaks,function(_){return _.value},i.interval,a),c&&e.breakTicks!=="none"&&l.addBreaksToTicks(f,u.breaks,a),f},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this),this._cfg.interval)},t.prototype.getLabel=function(e,i){if(e==null)return"";var n=i&&i.precision;n==null?n=Kt(e.value)||0:n==="auto"&&(n=this._cfg.intervalPrecision);var a=we(e.value,n,!0);return Wu(a)},t.type="interval",t})(ir);ir.registerClass(RA);var Fo=RA;var XB=function(r,t,e,i){for(;e<i;){var n=e+i>>>1;r[n][1]<t?e=n+1:i=n}return e},BA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="time",i.parse=t.parse,i._locale=e.locale,i._useUTC=e.useUTC,i._interval=0;var n=Hh(i,e),a=ol(i,n,null);return i.brk=a.brk,i}return t.prototype.getLabel=function(e){return yn(e.value,cy[tC(Fs(this._minLevelUnit))]||cy.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,i,n){return rC(e,i,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e=e||{};var i=this._interval,n=wn(this),a=it(),o=this.brk,s=a&&o,l=[];if(!i)return l;var u=this._useUTC;if(s&&e.breakTicks==="only_break")return it().addBreaksToTicks(l,o.breaks,n),l;l=ez(this._minLevelUnit,this._approxInterval,u,n,sl(this),o);var c=hr.length-1,f=0;return w(l,function(h){h.time&&(c=Math.min(c,ce(hr,h.time.upperTimeUnit)),f=Math.max(f,h.time.level))}),s&&it().pruneTicksByBreak(e.pruneByBreak,l,o.breaks,function(h){return h.value},this._approxInterval,n),s&&e.breakTicks!=="none"&&it().addBreaksToTicks(l,o.breaks,n,function(h){for(var p=Math.max(ce(hr,_o(h.vmin,u)),ce(hr,_o(h.vmax,u))),d=0,v=0;v<hr.length;v++)if(!zA(hr[v],h.vmin,h.vmax,u)){d=v;break}var m=Math.min(d,c),g=Math.max(m,p);return{level:f,lowerTimeUnit:hr[g],upperTimeUnit:hr[m]}}),l},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return ge(e)?Math.round(e):+qt(e)},t.type="time",t})(ir),rd=[["second",Wh],["minute",Zh],["hour",Rs],["quarter-day",Rs*6],["half-day",Rs*12],["day",Pr*1.2],["half-week",Pr*3.5],["week",Pr*7],["month",Pr*31],["quarter",Pr*95],["half-year",uy/2],["year",uy]];function zA(r,t,e,i){return Bs(new Date(t),r,i).getTime()===Bs(new Date(e),r,i).getTime()}function KB(r,t){return r/=Pr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function qB(r){var t=30*Pr;return r/=t,r>6?6:r>3?3:r>2?2:1}function $B(r){return r/=Rs,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function FA(r,t){return r/=t?Zh:Wh,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function jB(r){return Se(un(r,!0),1)}function JB(r,t,e){var i=Math.max(0,ce(hr,t)-1);return Bs(new Date(r),hr[i],e).getTime()}function QB(r,t){var e=new Date(0);e[r](1);var i=e.getTime();e[r](1+t);var n=e.getTime()-i;return function(a,o){return Math.max(0,Math.round((o-a)/n))}}function ez(r,t,e,i,n,a){var o=3e3,s=JT,l=0;function u(V,q,G,$,oe,ie,pe){for(var de=QB(oe,V),te=q,Te=new Date(te);te<G&&te<=i[1]&&(pe.push({value:te}),!(l++>o));)if(Te[oe](Te[$]()+V),te=Te.getTime(),a){var Pe=a.calcNiceTickMultiple(te,de);Pe>0&&(Te[oe](Te[$]()+Pe*V),te=Te.getTime())}pe.push({value:te,notAdd:te>i[1]})}function c(V,q,G){var $=[],oe=!q.length;if(!zA(Fs(V),i[0],i[1],e)){oe&&(q=[{value:JB(i[0],V,e)},{value:i[1]}]);for(var ie=0;ie<q.length-1;ie++){var pe=q[ie].value,de=q[ie+1].value;if(pe!==de){var te=void 0,Te=void 0,Pe=void 0,vt=!1;switch(V){case"year":te=Math.max(1,Math.round(t/Pr/365)),Te=fy(e),Pe=iC(e);break;case"half-year":case"quarter":case"month":te=qB(t),Te=Xh(e),Pe=hy(e);break;case"week":case"half-week":case"day":te=KB(t,31),Te=Kh(e),Pe=py(e),vt=!0;break;case"half-day":case"quarter-day":case"hour":te=$B(t),Te=qh(e),Pe=dy(e);break;case"minute":te=FA(t,!0),Te=$h(e),Pe=vy(e);break;case"second":te=FA(t,!1),Te=jh(e),Pe=my(e);break;case"millisecond":te=jB(t),Te=Jh(e),Pe=gy(e);break}de>=i[0]&&pe<=i[1]&&u(te,pe,de,Te,Pe,vt,$),V==="year"&&G.length>1&&ie===0&&G.unshift({value:G[0].value-te})}}for(var ie=0;ie<$.length;ie++)G.push($[ie])}}for(var f=[],h=[],p=0,d=0,v=0;v<s.length;++v){var m=Fs(s[v]);if(eC(s[v])){c(s[v],f[f.length-1]||[],h);var g=s[v+1]?Fs(s[v+1]):null;if(m!==g){if(h.length){d=p,h.sort(function(V,q){return V.value-q.value});for(var y=[],_=0;_<h.length;++_){var x=h[_].value;(_===0||h[_-1].value!==x)&&(y.push(h[_]),x>=i[0]&&x<=i[1]&&p++)}var b=n/t;if(p>b*1.5&&d>b/1.5||(f.push(y),p>b||r===s[v]))break}h=[]}}}for(var S=Be(U(f,function(V){return Be(V,function(q){return q.value>=i[0]&&q.value<=i[1]&&!q.notAdd})}),function(V){return V.length>0}),T=S.length-1,A=[],v=0;v<S.length;++v)for(var E=S[v],M=0;M<E.length;++M){var O=_o(E[M].value,e);A.push({value:E[M].value,time:{level:T-v,upperTimeUnit:O,lowerTimeUnit:O}})}ys(A,HS,null),A.sort(function(V,q){return V.value-q.value});var L=A[0],I=A[A.length-1],k=_o(i[0],e),z=_o(i[1],e);return(!L||L.value>i[0])&&A.unshift({value:i[0],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),(!I||I.value<i[1])&&A.push({value:i[1],time:{level:0,upperTimeUnit:z,lowerTimeUnit:z},notNice:!0}),A}var VA=function(r,t){var e=r.getExtent();if(e[0]===e[1]&&(e[0]-=Pr,e[1]+=Pr),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-Pr}r.setExtent(e[0],e[1]);var n=yc(t.splitNumber,10),a=sl(r)/n,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var l=rd.length,u=Math.min(XB(rd,a,0,l),l-1),c=rd[u][1],f=rd[Math.max(u-1,0)][0];r.setTimeInterval({approxInterval:a,interval:c,minLevelUnit:f})};ir.registerClass(BA);var UA=BA;var id=0,nd=1,tz=2,WA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="log",i.parse=Fo.parse,i.base=e.logBase||10;var n=[],a=[],o=i._lookup={from:n,to:a};n[id]=n[nd]=a[id]=a[nd]=NaN,$p(i,t.mapperMethods);var s=it(),l=e.breakOption,u={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(l,i,{noNegative:!0},tz,u),i.powStub=new Fo({breakParsed:u.original}),i.intervalStub=new Fo({breakParsed:u.transformed}),jp(i,i.intervalStub),i}return t.prototype.getTicks=function(e){var i=this.base,n=this.powStub,a=it(),o=this.intervalStub,s=o.getExtent(),l=n.getExtent(),u={lookup:{from:s,to:l}};return U(o.getTicks(e||{}),function(c){var f=c.value,h=Qp(f,i,u),p;if(a){var d=a.getTicksBreakOutwardTransform(this,c,go(n),this._lookup);d&&(p=d.vBreak,h=d.tickVal)}return{value:h,break:p}},this)},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,i){return this.intervalStub.getLabel(e,i)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(gc(e,this.base))},scale:function(e){return Qp(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,i){return e=gc(e,this.base),i&&i.depth===al?e:this.intervalStub.transformIn(e,i)},transformOut:function(e,i){var n=i?i.depth:null;return HA.depth=n,GA.lookup=this._lookup,Qp(n===al?e:this.intervalStub.transformOut(e,HA),this.base,GA)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,i){this.setExtent2(pr,e,i)},setExtent2:function(e,i,n){if(!(!fn(i,n)||i<=0||n<=0)){var a=YA,o=YA;if(e===pr){var s=this._lookup;a=s.to,o=s.from}this.powStub.setExtent2(e,a[id]=i,a[nd]=n);var l=this.base;this.intervalStub.setExtent2(e,o[id]=gc(i,l),o[nd]=gc(n,l))}},getFilter:function(){return{g:0}},sanitize:function(e,i){return fn(i[0],i[1])&>(e)&&e<=0&&(e=i[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,i){return i===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,i)}},t})(ir);ir.registerClass(WA);var HA={},GA={},YA=[],ZA=WA;var ad={value:1,category:1,time:1,log:1};var XA=re();function sd(r){var t=r.get("type");return(t==null||!We(ad,t)&&!ir.getClass(t))&&(t="value"),t}function ld(r,t,e){var i=it(),n;switch(i&&(n=D0(r,t,e)),t){case"category":return new kA({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:Rt()});case"time":return new UA({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC"),breakOption:n});case"log":return new ZA({logBase:r.get("logBase"),breakOption:n});case"value":return new Fo({breakOption:n});default:return new(ir.getClass(t)||Fo)({})}}function KA(r,t,e){var i=e?Ro(r,null):r.getExtentUnsafe(pr,null),n=i[0],a=i[1];return fn(n,a)?n===t||a===t?iz:n<t&&a>t?rz:od:od}var rz=1,iz=2,od=3;function qA(r){XA(r).noOnMyZero=!0}function $A(r){return XA(r).noOnMyZero}function _c(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=QT(t);return function(n,a){return r.scale.getFormattedLabel(n,a,e)}}else{if(H(t))return function(n){var a=r.scale.getLabel(n),o=t.replace("{value}",a??"");return o};if(j(t)){if(r.type==="category")return function(n,a){return t(cl(r,n),n.value-r.scale.getExtent()[0],null)};var i=it();return function(n,a){var o=null;return i&&(o=i.makeAxisLabelFormatterParamBreak(o,n.break)),t(cl(r,n),a,o)}}else return function(n){return r.scale.getLabel(n)}}}function cl(r,t){var e=r.scale;return lt(e)?e.getLabel(t):t.value}function ud(r){var t=r.get("interval");return t??"auto"}function jA(r){return r.type==="category"&&ud(r.getLabelModel())===0}function JA(r,t){var e={};return w(r.mapDimensionsAll(t),function(i){e[il(r,i)]=!0}),De(e)}function fa(r){return r==="middle"||r==="center"}function Bo(r){return r.getShallow("show")}function D0(r,t,e){var i=r.get("breaks",!0);if(i!=null){if(!it())return;if(!e||!nz(t)){if(0)var n;return}return i}}function nz(r){return r!=="category"}function cd(r,t,e,i,n,a){var o=qi(r),s=o?r.intervalStub:r;if(s.setExtent(i[0],i[1]),o){var l=r.powStub,u={depth:al},c=r.transformOut(i[0],u),f=r.transformOut(i[1],u),h=PA(e,i);t[0]&&!h[0]&&(c=n[0]),t[1]&&!h[1]&&(f=n[1]),l.setExtent(c,f)}s.setConfig(a)}function Tn(r,t){return lt(r)?r.getRawOrdinalNumber(t.value):t.value}function fd(r,t){return lt(r)&&!!t.get("boundaryGap")}var hd=(function(){function r(){}return r.prototype.needIncludeZero=function(){return!this.option.scale},r.prototype.getCoordSysModel=function(){},r})();var az=gs(),pd="|&",fl=re(),dd=-2,QA=-1,oz=re();function eD(r,t){var e=r.model,i=fl(Oo(e.ecModel)).keyed,n=i&&i.get(t);return n&&n.get(e.uid)}function tD(r,t){return nD(eD(r,t))}function rD(r,t){var e=[];return iD(r.model.ecModel,function(i){for(var n=0;n<t.length;n++)t[n]&&i.serByIdx[t[n].seriesIndex]&&e.push(nD(i))}),e}function iD(r,t){var e=fl(Oo(r)).keyed;e&&e.each(function(i,n){i.each(function(a,o){t(a,n,o)})})}function nD(r){return{liPosMinGap:r?r.liPosMinGap:void 0}}function aD(r,t){var e=r.model.ecModel,i=fl(Oo(e)).axSer;i&&vd(e,i.get(r.model.uid),t)}function I0(r,t,e){var i=eD(r,t);i&&vd(r.model.ecModel,i.sers,e)}function vd(r,t,e){if(t)for(var i=0;i<t.length;i++){var n=t[i];r.isSeriesFiltered(n)||e(n)}}function oD(r,t,e){var i=fl(Oo(r)).keyed,n=i&&i.get(t);n&&n.each(function(a){e(a.axis)})}function L0(r,t){var e=r.model,i=fl(Oo(e.ecModel)).keys;i&&w(i.get(e.uid),function(n){if(0)var a;t(n)})}function sz(r){var t=oz(Mp(r)),e=t.keyed||(t.keyed=Y());iD(r,function(i,n,a){var o=e.get(n)||e.set(n,Y()),s=o.get(a)||o.set(a,{});i.metrics.liPosMinGap&&lD.liPosMinGap(r,i,s)})}function sD(r,t){lD[r]=t}var lD={};function P0(r,t,e){if(r){var i=t.ecModel,n=fl(Oo(i)),a=r.model.uid;if(0)var o,s;var l=n.axSer||(n.axSer=Y()),u=l.get(a)||l.set(a,[]);if(0)var c;u.push(t);var f=t.subType,h=t.getBaseAxis()===r,p=O0.get(M0(f,h,e))||O0.get(M0(f,h,null));if(p){var d=n.keyed||(n.keyed=Y()),v=n.keys||(n.keys=Y()),m=p.key,g=d.get(m)||d.set(m,Y()),y=g.get(a);y||(y=g.set(a,{axis:r,sers:[],serByIdx:[]}),y.metrics=p.getMetrics(r),(v.get(a)||v.set(a,[])).push(m)),y.sers.push(t),y.serByIdx[t.seriesIndex]=t}}}function M0(r,t,e){return r+pd+Z(t,!0)+pd+(e||"")}function uD(r,t){var e=M0(t.seriesType,t.baseAxis,t.coordSysType);O0.set(e,t),az(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:sz})})}var O0=Y();var lz=re(),hD=1,pD=2,uz=3,dD=(function(){function r(t,e,i,n,a){var o=lt(t),s=o?e.getCategories().length:null,l;if(o){var u=e.getCategories(!0);l=u&&!u.length}var c=i.slice();(ll(t)||qi(t)||Ki(t))&&(jm(c,xc(t,e.get("dataMin",!0))),Jm(c,xc(t,e.get("dataMax",!0)))),US(c)||(c[0]=c[1]=NaN);var f=[],h=[!1,!1],p=e.get("min",!0);p==="dataMin"?(f[0]=c[0],h[0]=!0):(f[0]=xc(t,j(p)?p({min:c[0],max:c[1]}):p),h[0]=f[0]!=null);var d=e.get("max",!0);d==="dataMax"?(f[1]=c[1],h[1]=!0):(f[1]=xc(t,j(d)?d({min:c[0],max:c[1]}):d),h[1]=f[1]!=null);var v=cz(t,e),m=o?null:c[1]-c[0]||Math.abs(c[0]);f[0]==null&&(f[0]=o?l?c[0]:s?0:NaN:c[0]-v[0]*m),f[1]==null&&(f[1]=o?l?c[1]:s?s-1:NaN:c[1]+v[1]*m),!di(f[0])&&(f[0]=NaN),!di(f[1])&&(f[1]=NaN);var g=l||en(f[0])||en(f[1])||o&&!s,y=ll(t),_=y&&e.needIncludeZero&&e.needIncludeZero();_&&(f[0]>0&&f[1]>0&&!h[0]&&(f[0]=0),f[0]<0&&f[1]<0&&!h[1]&&(f[1]=0));var x=!1;f[0]>f[1]&&(f.reverse(),x=!0);var b=xc(t,e.get("startValue",!0)),S=b!=null;!gt(b)&&n&&(b=t.getDefaultStartValue?t.getDefaultStartValue():0),gt(b)&&(S||!y||_)&&(b<f[0]&&!h[0]?(f[0]=b,h[0]=!0):b>f[1]&&!h[1]&&(f[1]=b,h[1]=!0));var T=this._i={scale:t,dataMM:c,noZoomEffMM:f,zoomMM:[],fixMM:h,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:_,tggAxInv:x,ctnShp:a};cD(T,f)}return r.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},r.prototype.makeFinal=function(){var t=this._i,e=t.zoomMM,i=t.noZoomEffMM,n=t.zoomFixMM,a=t.fixMM,o={fixMM:a,zoomFixMM:n,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:i.slice()},s=o.effMM;return e[0]!=null&&(s[0]=e[0],a[0]=n[0]=!0),e[1]!=null&&(s[1]=e[1],a[1]=n[1]=!0),cD(t,s),o},r.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},r.prototype.setZoomMM=function(t,e){this._i.zoomMM[t]=e},r})();function cD(r,t){var e=r.scale,i=r.dataMM;e.sanitize&&(t[0]=e.sanitize(t[0],i),t[1]=e.sanitize(t[1],i),ms(t))}function xc(r,t){return t==null?null:en(t)?NaN:r.parse(t)}function cz(r,t){var e;if(lt(r))e=[0,0];else{var i=t.get("boundaryGap");typeof i=="boolean"&&(i=null),e=F(i)?i:[i,i]}return[fD(e[0]),fD(e[1])]}function fD(r){return fi(typeof r=="boolean"?0:r,1)||0}function vD(r){var t=lz(r.scale);return t.extent||(t.extent=Rt()),t}function mD(r,t){vD(r).dimIdxInCoord=t.get(r.dim)}function md(r,t){var e=r.scale,i=r.model,n=r.dim;e.rawExtentInfo||fz(e,r,n,i,t)}function fz(r,t,e,i,n){var a=vD(t),o=a.extent,s=!1;aD(t,function(c){if(c.boxCoordinateSystem){var f=ip(c).coord,h=a.dimIdxInCoord;if(h>=0){if(F(f)){var p=f[h];p!=null&&!F(p)&&Tu(o,r.parse(p))}}}else if(c.coordinateSystem){var d=c.getData();if(d){var v=r.getFilter?r.getFilter():null;w(JA(d,e),function(m){VS(o,d.getApproximateExtent(m,v))})}c.__requireStartValue&&c.__requireStartValue(t)&&(s=!0)}});var l=pz(r,t,i),u=new dD(r,i,o,s,l);gD(r,u,n),a.extent=null}function hz(r,t){var e=r.scale;gD(e,new dD(e,r.model,t,!1,!1),uz)}function gD(r,t,e){r.rawExtentInfo=t,t.from=e}function yD(r,t){N0.set(r,t)}var N0=Y();function gd(r,t,e,i,n){r.rawExtentInfo||hz({scale:r,model:t},n||Rt());var a=r.rawExtentInfo.makeFinal(),o=a.effMM;return r.setExtent(o[0],o[1]),r.setBlank(a.isBlank),i&&a.tggAxInv&&e&&!e.get("legacyMinMaxDontInverseAxis")&&(i.inverse=!i.inverse),a}function pz(r,t,e){var i=fd(r,e),n=e.get("containShape",!0);if(n==null&&!i&&(n=!0),!n)return!1;var a=!1;return L0(t,function(o){a=!!N0.get(o)||a}),a}function _D(r,t,e,i){if(e.ctnShp){var n;if(L0(r,function(s){var l=N0.get(s);if(l){var u=l(r,i);u&&(n=n||[0,0],jm(n,u[0]),Jm(n,u[1]),qA(r))}}),!!n){var a=t.getExtent();if(lt(t))r.onBand||t.setExtent2(nl,Xe(a[0],a[0]+n[0]),Se(a[1],a[1]+n[1]));else{var o=a.slice();e.zoomFixMM[0]||(o[0]=Xe(o[0],t.transformOut(t.transformIn(o[0],null)+n[0],null))),e.zoomFixMM[1]||(o[1]=Se(o[1],t.transformOut(t.transformIn(o[1],null)+n[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(nl,o[0],o[1])}}}}function xD(r,t){var e=qi(r),i=e?r.intervalStub:r,n=t.fixMinMax||[],a=e?r.getExtent():null,o=i.getExtent(),s=ed(o,n,t.rawExtentResult);i.setExtent(s[0],s[1]),s=i.getExtent();var l=e?vz(i,t):dz(i,t),u=l.intervalPrecision,c=l.interval,f=t.userInterval;f!=null&&(l.interval=f,l.intervalPrecision=xi(f)),n[0]||(s[0]=we(sr(s[0]/c)*c,u)),n[1]||(s[1]=we(Li(s[1]/c)*c,u)),f!=null&&(l.niceExtent=s.slice()),cd(r,n,o,s,a,l)}function dz(r,t){var e=yc(t.splitNumber,5),i=sl(r),n=t.minInterval,a=t.maxInterval,o=un(i/e,!0);n!=null&&o<n&&(o=n),a!=null&&o>a&&(o=a);var s=xi(o),l=r.getExtent(),u=[we(Li(l[0]/o)*o,s),we(sr(l[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:u}}function vz(r,t){var e=yc(t.splitNumber,10),i=r.getExtent(),n=sl(r),a=Se(hs(n),1),o=e/n*a;o<=.5&&(a*=10);var s=xi(a),l=[we(Li(i[0]/a)*a,s),we(sr(i[1]/a)*a,s)];return{intervalPrecision:s,interval:a,niceExtent:l}}function k0(r){var t=r.scale,e=r.model,i=e.axis,n=e.ecModel;R0(t,e,i,n,null)}function R0(r,t,e,i,n){var a=gd(r,t,i,e,n),o=ll(r)||Ki(r);mz(r,{splitNumber:t.get("splitNumber"),fixMinMax:a.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:a}),e&&i&&_D(e,r,a,i)}function mz(r,t){gz[r.type](r,t)}var gz={interval:xD,log:xD,time:VA,ordinal:Ze};function yz(r){return ca(null,r)}var _z={isDimensionStacked:Rr,enableDataStack:qp,getStackedDimension:il};function xz(r,t){var e=t;t instanceof Re||(e=new Re(t));var i=sd(e),n=ld(e,i,!1);return r[1]<r[0]&&(r=r.slice().reverse()),R0(n,e,null,null,r),n}function bz(r){mt(r,hd)}function Sz(r,t){return t=t||{},Lr(r,null,null,t.state!=="normal")}var bD=[],wz={registerPreprocessor:Gp,registerProcessor:Yp,registerPostInit:p0,registerPostUpdate:d0,registerUpdateLifecycle:uc,registerAction:Xi,registerCoordinateSystem:v0,registerLayout:m0,registerVisual:Sn,registerTransform:_0,registerLoading:Wp,registerMap:y0,registerImpl:O1,PRIORITY:u0,ComponentModel:Le,ComponentView:nt,SeriesModel:tr,ChartView:Ft,registerComponentModel:function(r){Le.registerClass(r)},registerComponentView:function(r){nt.registerClass(r)},registerSeriesModel:function(r){tr.registerClass(r)},registerChartView:function(r){Ft.registerClass(r)},registerCustomSeries:function(r,t){Dp(r,t)},registerSubTypeDefaulter:function(r,t){Le.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){Hm(r,t)}};function Pt(r){if(F(r)){w(r,function(t){Pt(t)});return}ce(bD,r)>=0||(bD.push(r),j(r)&&(r={install:r}),r.install(wz))}var Tz=1e-8;function SD(r,t){return Math.abs(r-t)<Tz}function B0(r,t,e){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var o=r[a];i+=qr(n[0],n[1],o[0],o[1],t,e),n=o}var s=r[0];return(!SD(n[0],s[0])||!SD(n[1],s[1]))&&(i+=qr(n[0],n[1],s[0],s[1],t,e)),i!==0}var Az=[];function z0(r,t){for(var e=0;e<r.length;e++)ht(r[e],r[e],t)}function wD(r,t,e,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Vr(t,t,a),Ur(e,e,a))}}function Dz(r){for(var t=0,e=0,i=0,n=r.length,a=r[n-1][0],o=r[n-1][1],s=0;s<n;s++){var l=r[s][0],u=r[s][1],c=a*u-l*o;t+=c,e+=(a+l)*c,i+=(o+u)*c,a=l,o=u}return t?[e/t/3,i/t/3,t]:[r[0][0]||0,r[0][1]||0]}var TD=(function(){function r(t){this.name=t}return r.prototype.setCenter=function(t){this._center=t},r.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},r})();var V0=(function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r})();var U0=(function(){function r(t){this.type="linestring",this.points=t}return r})();var CD=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,e)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return t.prototype.calcCenter=function(){for(var e=this.geometries,i,n=0,a=0;a<e.length;a++){var o=e[a],s=o.exterior,l=s&&s.length;l>n&&(i=o,n=l)}if(i)return Dz(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?wD(s.exterior,n,a,e):w(s.points,function(l){wD(l,n,a,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new ue(n[0],n[1],a[0]-n[0],a[1]-n[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(e[0],e[1]))return!1;e:for(var a=0,o=n.length;a<o;a++){var s=n[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(B0(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(B0(u[c],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=o.width/o.height;n?a||(a=n/s):n=s*a;for(var l=new ue(e,i,n,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(z0(h.exterior,u),w(h.interiors,function(p){z0(p,u)})):w(h.points,function(p){z0(p,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var i=new t(e,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},t})(TD);var t9=(function(r){N(t,r);function t(e,i){var n=r.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,i=e.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=Hr(Az),o=e;o&&!o.isGeoSVGGraphicRoot;)li(a,o.getLocalTransform(),a),o=o.parent;return Tr(a,a),ht(n,n,a),n},t})(TD);function Ez(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var i=t.features;return w(i,function(n){var a=n.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=AD(s,o,e);break;case"Polygon":H0(s,o,e);break;case"MultiLineString":H0(s,o,e);break;case"MultiPolygon":w(s,function(l,u){return H0(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function H0(r,t,e){for(var i=0;i<r.length;i++)r[i]=AD(r[i],t[i],e)}function AD(r,t,e){for(var i=[],n=t[0],a=t[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/e,l/e])}return i}function yd(r,t){return r=Ez(r),U(Be(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,n=e.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new V0(o[0],o.slice(1)));break;case"MultiPolygon":w(n.coordinates,function(l){l[0]&&a.push(new V0(l[0],l.slice(1)))});break;case"LineString":a.push(new U0([n.coordinates]));break;case"MultiLineString":a.push(new U0(n.coordinates))}var s=new CD(i[t||"name"],a,i.cp);return s.properties=i,s})}var G0={};Sr(G0,{MAX_SAFE_INTEGER:()=>mu,asc:()=>Ct,getPercentWithPrecision:()=>CS,getPixelPrecision:()=>TS,getPrecision:()=>Kt,getPrecisionSafe:()=>Ym,isNumeric:()=>yu,isRadianAroundZero:()=>Ga,linearMap:()=>$e,nice:()=>un,numericToNumber:()=>Wr,parseDate:()=>qt,parsePercent:()=>Ve,quantile:()=>AS,quantity:()=>hs,quantityExponent:()=>ps,reformIntervals:()=>DS,remRadian:()=>gu,round:()=>wS});var Y0={};Sr(Y0,{format:()=>yn,parse:()=>qt,roundTime:()=>Bs});var W0={};Sr(W0,{Arc:()=>ao,BezierCurve:()=>no,BoundingRect:()=>ue,Circle:()=>to,CompoundPath:()=>Th,Ellipse:()=>Fu,Group:()=>Ee,Image:()=>ur,IncrementalDisplayable:()=>Ih,Line:()=>Qt,LinearGradient:()=>As,Polygon:()=>Gi,Polyline:()=>io,RadialGradient:()=>Ah,Rect:()=>Oe,Ring:()=>Vu,Sector:()=>Hi,Text:()=>He,clipPointsByRect:()=>ey,clipRectByRect:()=>ty,createIcon:()=>po,extendPath:()=>qg,extendShape:()=>Kg,getShapeClass:()=>$g,getTransform:()=>Gu,initProps:()=>Ot,makeImage:()=>Hu,makePath:()=>Os,mergePath:()=>jg,registerShape:()=>Ir,resizePath:()=>Nh,updateProps:()=>Ke});var Z0={};Sr(Z0,{addCommas:()=>Wu,capitalFirst:()=>oC,encodeHTML:()=>wt,formatTime:()=>aC,formatTpl:()=>Vs,getTextRect:()=>yy,getTooltipMarker:()=>ep,normalizeCssArray:()=>Wi,toCamelCase:()=>zs,truncateText:()=>ng});var X0={};Sr(X0,{bind:()=>ee,clone:()=>ne,curry:()=>Ae,defaults:()=>he,each:()=>w,extend:()=>B,filter:()=>Be,indexOf:()=>ce,inherits:()=>Zl,isArray:()=>F,isFunction:()=>j,isObject:()=>W,isString:()=>H,map:()=>U,merge:()=>me,reduce:()=>zt});var Mz=re(),bc=re(),dr={estimate:1,determine:2};function hl(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function DD(r,t){var e=r.getLabelModel().get("customValues");if(e){var i=r.scale;return{labels:U(MD(e,i),function(n,a){return{formattedLabel:_c(r)(n,a),rawLabel:i.getLabel(n),tick:n}})}}return r.type==="category"?Oz(r,t):Lz(r)}function ED(r,t,e){var i=r.scale,n=r.getTickModel().get("customValues");return n?{ticks:MD(n,i)}:r.type==="category"?Iz(r,t):{ticks:i.getTicks(e)}}function MD(r,t){var e=t.getExtent(),i=[];return w(r,function(n){n=t.parse(n),n>=e[0]&&n<=e[1]&&i.push(n)}),ys(i,GS,null),Ct(i),U(i,function(n){return{value:n}})}function Oz(r,t){var e=r.getLabelModel(),i=OD(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:i}function OD(r,t,e){var i=Nz(r),n=ud(t),a=e.kind===dr.estimate;if(!a){var o=LD(i,n);if(o)return o}var s,l;j(n)?s=_d(r,n,!1):(l=n==="auto"?kz(r,e):n,s=_d(r,l,!1));var u={labels:s,labelCategoryInterval:l};return a?e.out.noPxChangeTryDetermine.push(function(){return K0(i,n,u),!0}):K0(i,n,u),u}function Iz(r,t){var e=Pz(r),i=ud(t),n=LD(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),j(i))a=_d(r,i,!0);else if(i==="auto"){var s=OD(r,r.getLabelModel(),hl(dr.determine));o=s.labelCategoryInterval,a=U(s.labels,function(l){return l.tick})}else o=i,a=_d(r,o,!0);return K0(e,i,{ticks:a,tickCategoryInterval:o})}function Lz(r){var t=r.scale.getTicks(),e=_c(r);return{labels:U(t,function(i,n){return{formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tick:i}})}}var Pz=ID("axisTick"),Nz=ID("axisLabel");function ID(r){return function(e){return bc(e)[r]||(bc(e)[r]={list:[]})}}function LD(r,t){for(var e=0;e<r.list.length;e++)if(r.list[e].key===t)return r.list[e].value}function K0(r,t,e){return r.list.push({key:t,value:e}),e}function kz(r,t){if(t.kind===dr.estimate){var e=r.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return bc(r).autoInterval=e,!0}),e}var i=bc(r).autoInterval;return i??(bc(r).autoInterval=r.calculateCategoryInterval(t))}function PD(r,t){var e=t.kind,i=Fz(r),n=_c(r),a=(i.axisRotate-i.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=r.dataToCoord(f+1)-r.dataToCoord(f),p=Math.abs(h*Math.cos(a)),d=Math.abs(h*Math.sin(a)),v=0,m=0;f<=s[1];f+=u){var g=0,y=0,_=Wf(n({value:f}),i.font,"center","top");g=_.width*1.3,y=_.height*1.3,v=Math.max(v,g,7),m=Math.max(m,y,7)}var x=v/p,b=m/d;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(e===dr.estimate)return t.out.noPxChangeTryDetermine.push(ee(Rz,null,r,S,l)),S;var T=ND(r,S,l);return T??S}function Rz(r,t,e){return ND(r,t,e)==null}function ND(r,t,e){var i=Mz(r.model),n=r.getExtent(),a=i.lastAutoInterval,o=i.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-e)<=1&&a>t&&i.axisExtent0===n[0]&&i.axisExtent1===n[1])return a;i.lastTickCount=e,i.lastAutoInterval=t,i.axisExtent0=n[0],i.axisExtent1=n[1]}function Fz(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function _d(r,t,e){var i=_c(r),n=r.scale,a=[],o=j(t);return td(n,o?0:t,function(s,l){var u=n.getLabel(s);if(o){var c=!!t(s.value,u);if(s.offInterval=!c,!c&&!l)return}a.push(e?s:{formattedLabel:i(s),rawLabel:u,tick:s})}),a}var Bz=.8;function bi(r,t){t=t||{};var e={w:NaN,w2:NaN},i=r.scale,n=t.fromStat,a=t.min,o=IA(i);gt(o)||(o=NaN);var s=r.getExtent(),l=Ge(s[1]-s[0]);return lt(i)?zz(e,r,o,l):n?Vz(e,r,o,l,n):a==null,a!=null&&(e.w=gt(e.w)?Se(a,e.w):a),e}function zz(r,t,e,i){var n=t.onBand,a=e+(n?1:0);a===0&&(a=1),r.w=i/a,!n&&e&&i&&(r.w2=r.w*e/i)}function Vz(r,t,e,i,n){var a=!1,o=-1/0;w(n.key?[tD(t,n.key)]:rD(t,n.sers||[]),function(s){var l=s.liPosMinGap;l!=null&&(l>0?(l>o&&(o=l),a=!1):l===dd&&(a=!0))}),gt(e)&&e>0&>(o)?(r.w=i/e*o,r.w2=o):a&&(r.w=i*Bz,r.w2=r.w*e/i)}var kD=[0,1],Uz=(function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this.scale;return t=i.normalize(i.parse(t)),$e(t,kD,RD(this),e)},r.prototype.coordToData=function(t,e){var i=$e(t,RD(this),kD,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=ED(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=U(i.ticks,function(s){return{coord:this.dataToCoord(Tn(this.scale,s)),tick:s}},this),a=e.get("alignWithLabel"),o=Hz(this,n,a);return U(n,function(s){return{coord:s.coord,tickValue:s.tick.value,onBand:o}})},r.prototype.getMinorTicksCoords=function(){if(lt(this.scale))return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=U(i,function(a){return U(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||hl(dr.determine),DD(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){return bi(this,{min:1}).w},r.prototype.calculateCategoryInterval=function(t){return t=t||hl(dr.determine),PD(this,t)},r})();function RD(r){var t=r.getExtent();if(r.onBand){var e=t[1]-t[0],i=e/r.scale.count()/2;t[0]+=i,t[1]-=i}return t}function Hz(r,t,e){var i=t.length;if(!r.onBand||e||!i)return!1;var n=bi(r).w;if(!n)return!1;w(t,function(s){s.coord-=n/2});var a=r.scale.getExtent(),o=t[i-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+n,tick:{value:a[1]+1}}),!0}var xd=Uz;function Gz(r){var t=Le.extend(r);return Le.registerClass(t),t}function Yz(r){var t=nt.extend(r);return nt.registerClass(t),t}function Wz(r){var t=tr.extend(r);return tr.registerClass(t),t}function Zz(r){var t=Ft.extend(r);return Ft.registerClass(t),t}var FD=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Xz=1,bd=2,zD=Xz|bd;function Sc(r,t,e){e=e||zD,t?r.dirty|=e:r.dirty&=~e}function VD(r,t){return t=t||zD,r.dirty==null||!!(r.dirty&t)}function Si(r){if(r)return VD(r)&&Kz(r,r.label,r),r}function Kz(r,t,e){var i=t.getComputedTransform();r.transform=Rh(r.transform,i);var n=r.localRect=Ps(r.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=e&&e.marginForce,l=e&&e.minMarginForce,u=e&&e.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=vo.textMargin);for(var f=0;f<4;f++)q0[f]=c===vo.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===vo.textMargin&&Is(n,q0,!1,!1);var h=r.rect=Ps(r.rect,n);return i&&h.applyTransform(i),c===vo.minMargin&&Is(h,q0,!1,!1),r.axisAligned=kh(i),(r.label=r.label||{}).ignore=t.ignore,Sc(r,!1),Sc(r,!0,bd),r}var q0=[0,0,0,0];function UD(r,t,e){return r.transform=Rh(r.transform,e),r.localRect=Ps(r.localRect,t),r.rect=Ps(r.rect,t),e&&r.rect.applyTransform(e),r.axisAligned=kh(e),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function HD(r,t){if(r){r.label.x+=t.x,r.label.y+=t.y,r.label.markRedraw();var e=r.transform;e&&(e[4]+=t.x,e[5]+=t.y);var i=r.rect;i&&(i.x+=t.x,i.y+=t.y);var n=r.obb;n&&n.fromBoundingRect(r.localRect,e)}}function $0(r,t){for(var e=0;e<FD.length;e++){var i=FD[e];r[i]==null&&(r[i]=t[i])}return Si(r)}function BD(r){var t=r.obb;return(!t||VD(r,bd))&&(r.obb=t=t||new Oh,t.fromBoundingRect(r.localRect,r.transform),Sc(r,!1,bd)),t}function GD(r){var t=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function e(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var i=0;i<r.length;i++){var n=Si(r[i]);if(!n.label.ignore){for(var a=n.label,o=n.labelLine,s=!1,l=0;l<t.length;l++)if(Sd(n,t[l],null,{touchThreshold:.05})){s=!0;break}s?(e(a),o&&e(o)):t.push(n)}}}function Sd(r,t,e,i){return!r||!t||r.label&&r.label.ignore||t.label&&t.label.ignore||!r.rect.intersect(t.rect,e,i)?!1:r.axisAligned&&t.axisAligned?!0:BD(r).intersect(BD(t),e,i)}var qz=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){if(0)var i;return ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new Ee,n=It("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(n),n.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=It(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=K.color.neutral00,u.style.lineWidth=2),i},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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(tr),YD=qz;function pl(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=xn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o<e.length;o++)a.push(xn(r,t,e[o]));return a.join(" ")}}function wd(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!F(t))return t+"";for(var i=[],n=0;n<e.length;n++){var a=r.getDimensionIndex(e[n]);a>=0&&i.push(t[a])}return i.join(" ")}var $z=(function(r){N(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o,s){this.removeAll();var l=It(e,-1,-1,2,2,null,s);l.attr({z2:Z(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=jz,this._symbolType=e,this.add(l)},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(){dn(this.childAt(0))},t.prototype.downplay=function(){vn(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=t.getSymbolZ2(e,i),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,u,h)}else{var p=this.childAt(0);p.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?p.attr(d):Ke(p,d,s,i),Lh(p)}if(this._updateCommon(e,i,l,n,a),c){var p=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Ot(p,d,s,i)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,c,f,h,p,d,v,m,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,p=a.blurScope,v=a.labelStatesModels,m=a.hoverScale,g=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var y=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),p=_.get("blurScope"),d=_.get("disabled"),v=fr(y),m=_.getShallow("scale"),g=y.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Io(e.getItemVisual(i,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var S=e.getItemVisual(i,"style"),T=S.fill;if(s instanceof ur){var A=s.style;s.useStyle(B({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},S))}else s.__isEmptyBrush?s.useStyle(B({},S)):s.useStyle(S),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=e.getItemVisual(i,"liftZ"),M=this._z2;E!=null?M==null&&(this._z2=s.z2,s.z2+=E):M!=null&&(s.z2=M,this._z2=null);var O=o&&o.useNameLabel;jr(s,v,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:T,defaultOpacity:S.opacity});function L(z){return O?e.getName(z):pl(e,z)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var k=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;I.scaleX=this._sizeX*k,I.scaleY=this._sizeY*k,this.setSymbolScale(1),vi(this,h,p,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=_e(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Es(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Es(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return nc(e.getItemVisual(i,"symbolSize"))},t.getSymbolZ2=function(e,i){return e.getItemVisual(i,"z2")},t})(Ee);function jz(r,t){this.parent.drift(r,t)}var wc=$z;function Td(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i&&i.isIgnore&&i.isIgnore(e))&&!(i&&i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function WD(r){return r!=null&&!W(r)&&(r={isIgnore:r}),r||{}}function ZD(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:fr(t),cursorStyle:t.get("cursor")}}function XD(r,t,e,i,n,a,o){var s=new r(t,e,i,n);return s.setPosition(a),t.setItemGraphicEl(e,s),o.add(s),s}var Jz=(function(){function r(t){this.group=new Ee,this._SymbolCtor=t||wc}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=WD(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=this._seriesScope=ZD(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};a||i.removeAll(),t.diff(a).add(function(f){var h=c(f);Td(t,h,f,e)&&XD(o,t,f,l,u,h,i)}).update(function(f,h){var p=a.getItemGraphicEl(h),d=c(f);if(!Td(t,d,f,e)){i.remove(p);return}var v=t.getItemVisual(f,"symbol")||"circle",m=p&&p.getSymbolType&&p.getSymbolType();if(!p||m&&m!==v)i.remove(p),p=new o(t,f,l,u),p.setPosition(d);else{p.updateData(t,f,l,u);var g={x:d[0],y:d[1]};s?p.attr(g):Ke(p,g,n)}i.add(p),t.setItemGraphicEl(f,p)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){i.remove(h)},n)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(t){var e=this._data;if(e)for(var i=this,n=e.getStore(),a=0,o=n.count();a<o;a++){var s=e.getItemGraphicEl(a),l=i._getSymbolPoint(a);Td(e,l,a,t)?(s=s||XD(i._SymbolCtor,e,a,i._seriesScope,{disableAnimation:!0},l,i.group),s.stopAnimation(),s.setPosition(l),s.markRedraw()):s&&(i.group.remove(s),e.setItemGraphicEl(a,null))}},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ZD(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i,n){this._progressiveEls=[],n=WD(n);function a(u){u.isGroup||(u.incremental=i,u.ensureState("emphasis").hoverLayer=co)}for(var o=t.start;o<t.end;o++){var s=e.getItemLayout(o);if(Td(e,s,o,n)){var l=new this._SymbolCtor(e,o,this._seriesScope);l.traverse(a),l.setPosition(s),this.group.add(l),e.setItemGraphicEl(o,l),this._progressiveEls.push(l)}}},r.prototype.eachRendered=function(t){gn(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},i.hostModel)}):e.removeAll()},r})(),KD=Jz;function Cd(r,t,e){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=Qz(n,e),o=i.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=U(r.dimensions,function(d){return t.mapDimension(d)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return Rr(t,f[0])&&(h=!0,f[0]=p),Rr(t,f[1])&&(h=!0,f[1]=p),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Qz(r,t){var e=0,i=r.scale.getExtent();return t==="start"?e=i[0]:t==="end"?e=i[1]:ge(t)&&!isNaN(t)?e=t:i[0]>0?e=i[0]:i[1]<0&&(e=i[1]),e}function Ad(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function vr(r,t){return!isFinite(r)||!isFinite(t)}var eV=typeof Float32Array!==Jn?Float32Array:void 0,qD=typeof Float64Array!==Jn?Float64Array:void 0;function Fr(r){return Dd({ctor:eV},r).arr}function Dd(r,t){var e=r.arr,i=r.ctor;if(t>mu&&(t=mu),!e||r.typed&&e.length<t){var n=void 0;if(i)try{n=new i(t),r.typed=!0,e&&n.set(e)}catch{}if(!n&&(n=[],r.typed=!1,e))for(var a=0,o=e.length;a<o;a++)n[a]=e[a];r.arr=n}return r}function tV(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function J0(r,t,e,i,n,a,o,s){for(var l=tV(r,t),u=[],c=[],f=[],h=[],p=[],d=[],v=[],m=Cd(n,t,o),g=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,T=void 0;switch(x.cmd){case"=":S=x.idx*2,T=x.idx1*2;var A=g[S],E=g[S+1],M=y[T],O=y[T+1];(isNaN(A)||isNaN(E))&&(A=M,E=O),u.push(A,E),c.push(M,O),f.push(e[S],e[S+1]),h.push(i[T],i[T+1]),v.push(t.getRawIndex(x.idx1));break;case"+":var L=x.idx,I=m.dataDimsForPoint,k=n.dataToPoint([t.get(I[0],L),t.get(I[1],L)]);T=L*2,u.push(k[0],k[1]),c.push(y[T],y[T+1]);var z=Ad(m,n,t,L);f.push(z[0],z[1]),h.push(i[T],i[T+1]),v.push(t.getRawIndex(L));break;case"-":b=!1}b&&(p.push(x),d.push(d.length))}d.sort(function(Te,Pe){return v[Te]-v[Pe]});for(var V=u.length,q=Fr(V),G=Fr(V),$=Fr(V),oe=Fr(V),ie=[],_=0;_<d.length;_++){var pe=d[_],de=_*2,te=pe*2;q[de]=u[te],q[de+1]=u[te+1],G[de]=c[te],G[de+1]=c[te+1],$[de]=f[te],$[de+1]=f[te+1],oe[de]=h[te],oe[de+1]=h[te+1],ie[_]=p[pe]}return{current:q,next:G,stackedOnCurrent:$,stackedOnNext:oe,status:ie}}var ha=Math.min,pa=Math.max;function Q0(r,t,e,i,n,a,o,s,l){for(var u,c,f,h,p,d,v=e,m=0;m<i;m++){var g=t[v*2],y=t[v*2+1];if(v>=n||v<0)break;if(vr(g,y)){if(l){v+=a;continue}break}if(v===e)r[a>0?"moveTo":"lineTo"](g,y),f=g,h=y;else{var _=g-u,x=y-c;if(_*_+x*x<.5){v+=a;continue}if(o>0){for(var b=v+a,S=t[b*2],T=t[b*2+1];S===g&&T===y&&m<i;)m++,b+=a,v+=a,S=t[b*2],T=t[b*2+1],g=t[v*2],y=t[v*2+1],_=g-u,x=y-c;var A=m+1;if(l)for(;vr(S,T)&&A<i;)A++,b+=a,S=t[b*2],T=t[b*2+1];var E=.5,M=0,O=0,L=void 0,I=void 0;if(A>=i||vr(S,T))p=g,d=y;else{M=S-u,O=T-c;var k=g-u,z=S-g,V=y-c,q=T-y,G=void 0,$=void 0;if(s==="x"){G=Math.abs(k),$=Math.abs(z);var oe=M>0?1:-1;p=g-oe*G*o,d=y,L=g+oe*$*o,I=y}else if(s==="y"){G=Math.abs(V),$=Math.abs(q);var ie=O>0?1:-1;p=g,d=y-ie*G*o,L=g,I=y+ie*$*o}else G=Math.sqrt(k*k+V*V),$=Math.sqrt(z*z+q*q),E=$/($+G),p=g-M*o*(1-E),d=y-O*o*(1-E),L=g+M*o*E,I=y+O*o*E,L=ha(L,pa(S,g)),I=ha(I,pa(T,y)),L=pa(L,ha(S,g)),I=pa(I,ha(T,y)),M=L-g,O=I-y,p=g-M*G/$,d=y-O*G/$,p=ha(p,pa(u,g)),d=ha(d,pa(c,y)),p=pa(p,ha(u,g)),d=pa(d,ha(c,y)),M=g-p,O=y-d,L=g+M*$/G,I=y+O*$/G}r.bezierCurveTo(f,h,p,d,g,y),f=L,h=I}else r.lineTo(g,y)}u=g,c=y,v+=a}return m}var $D=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),jD=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new $D},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&vr(n[o*2-2],n[o*2-1]);o--);for(;a<o&&vr(n[a*2],n[a*2+1]);a++);}for(;a<o;)a+=Q0(e,n,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},t.prototype.getPointOn=function(e,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,o=Dr.CMD,s,l,u=i==="x",c=[],f=0;f<a.length;){var h=a[f++],p=void 0,d=void 0,v=void 0,m=void 0,g=void 0,y=void 0,_=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(p=a[f++],d=a[f++],_=u?(e-s)/(p-s):(e-l)/(d-l),_<=1&&_>=0){var x=u?(d-l)*_+l:(p-s)*_+s;return u?[e,x]:[x,e]}s=p,l=d;break;case o.C:p=a[f++],d=a[f++],v=a[f++],m=a[f++],g=a[f++],y=a[f++];var b=u?ka(s,p,v,g,e,c):ka(l,d,m,y,e,c);if(b>0)for(var S=0;S<b;S++){var T=c[S];if(T<=1&&T>=0){var x=u?Je(l,d,m,y,T):Je(s,p,v,g,T);return u?[e,x]:[x,e]}}s=g,l=y;break}}},t})(ve);var rV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})($D),JD=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new rV},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&vr(n[s*2-2],n[s*2-1]);s--);for(;o<s&&vr(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=Q0(e,n,o,s,s,1,i.smooth,l,i.connectNulls);Q0(e,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,e.closePath()}},t})(ve);function e_(r,t,e,i,n){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=e.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new Oe({shape:{x:o,y:s,width:l,height:u}});if(t){var h=r.getBaseAxis(),p=h.isHorizontal(),d=h.inverse;p?(d&&(f.shape.x+=l),f.shape.width=0):(d||(f.shape.y+=u),f.shape.height=0);var v=j(n)?function(m){n(m,f)}:null;Ot(f,{shape:{width:l,height:u,x:o,y:s}},e,null,i,v)}return f}function t_(r,t,e){var i=r.getArea(),n=we(i.r0,1),a=we(i.r,1),o=new Hi({shape:{cx:we(r.cx,1),cy:we(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=n,Ot(o,{shape:{endAngle:i.endAngle,r:a}},e)}return o}function QD(r,t,e,i,n){if(r){if(r.type==="polar")return t_(r,t,e);if(r.type==="cartesian2d")return e_(r,t,e,i,n)}else return null;return null}function Cn(r,t){return r.type===t}function eE(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function tE(r){for(var t=Rt(),e=Rt(),i=0;i<r.length;){var n=r[i++],a=r[i++];vr(n,a)||(Tu(t,n),Tu(e,a))}return[t,e]}function rE(r,t){var e=tE(r),i=e[0],n=e[1],a=tE(t),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(n[0]-s[0]),Math.abs(i[1]-o[1]),Math.abs(n[1]-s[1]))}function iE(r){return ge(r)?r:r?.5:0}function iV(r,t,e){if(e.valueDim==null)return[];for(var i=t.count(),n=Fr(i*2),a=0;a<i;a++){var o=Ad(e,r,t,a);n[a*2]=o[0],n[a*2+1]=o[1]}return n}function da(r,t,e,i,n){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(n){for(l=0;l<r.length;l+=2){var p=t||r;vr(p[l],p[l+1])||h.push(r[l],r[l+1])}r=h}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),i){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var d=(c[o]+f[o])/2,v=[];u[o]=v[o]=d,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function nV(r,t){var e=[],i=r.length,n,a;function o(c,f,h){var p=c.coord,d=(h-p)/(f.coord-p),v=kf(d,[c.color,f.color]);return{coord:h,color:v}}for(var s=0;s<i;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function aV(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=U(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=nV(u,n==="x"?e.getWidth():e.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,v=h[0].coord-d,m=h[p-1].coord+d,g=m-v;if(g<.001)return"transparent";w(h,function(_){_.offset=(_.coord-v)/g}),h.push({offset:p?h[p-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:f[0]||"transparent"});var y=new As(0,0,0,0,h,!0);return y[n]=v,y[n+"2"]=m,y}}}function oV(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&sV(a,t))){var o=t.mapDimension(a.dim),s={};return w(a.getViewLabels(),function(l){l.tick.offInterval||(s[Tn(a.scale,l.tick)]=1)}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function sV(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;o<n;o+=a)if(wc.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function lV(r){for(var t=r.length/2;t>0&&vr(r[t*2-2],r[t*2-1]);t--);return t-1}function nE(r,t){return[r[t*2],r[t*2+1]]}function uV(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=r[u*2+n],!vr(o,r[u*2+1-n])){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function aE(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Jt.length;t++)if(r.get([Jt[t],"endLabel","show"]))return!0;return!1}function r_(r,t,e,i){if(Cn(t,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=aE(i)?function(p,d){r._endLabelOnDuring(p,d,o,s,a,n,t)}:null,u=t.getBaseAxis().isHorizontal(),c=e_(t,e,i,function(){var p=r._endLabel;p&&e&&s.originalX!=null&&p.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return t_(t,e,i)}function cV(r,t){var e=t.getBaseAxis(),i=e.isHorizontal(),n=e.inverse,a=i?n?"right":"left":"center",o=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var fV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Ee,i=new KD;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e,this._changePolyState=ee(this._changePolyState,this)},t.prototype.render=function(e,i,n){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",h=this._coordSys,p=this._symbolDraw,d=this._polyline,v=this._polygon,m=this._lineGroup,g=!i.ssr&&e.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=Cd(a,s,_),b=y&&iV(a,s,x),S=e.get("showSymbol"),T=e.get("connectNulls"),A=S&&!f&&oV(e,s,a),E=this._data;E&&E.eachItemGraphicEl(function(ze,ut){ze.__temp&&(o.remove(ze),E.setItemGraphicEl(ut,null))}),S||p.remove(),o.add(m);var M=f?!1:e.get("step"),O;a&&a.getArea&&e.get("clip",!0)&&(O=a.getArea(),O.width!=null?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O;var L=aV(s,a,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&h.type===a.type&&M===this._step))S&&p.updateData(s,{isIgnore:A,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ze){return[c[ze*2],c[ze*2+1]]}}),g&&this._initSymbolLabelAnimation(s,a,O),M&&(b&&(b=da(b,c,a,M,T)),c=da(c,null,a,M,T)),d=this._newPolyline(c),y?v=this._newPolygon(c,b):v&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,gi(L)),m.setClipPath(r_(this,a,!0,e));else{y&&!v?v=this._newPolygon(c,b):v&&!y&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,gi(L));var I=m.getClipPath();if(I){var k=r_(this,a,!1,e);Ot(I,{shape:k.shape},e)}else m.setClipPath(r_(this,a,!0,e));S&&p.updateData(s,{isIgnore:A,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ze){return[c[ze*2],c[ze*2+1]]}}),(!eE(this._stackedOnPoints,b)||!eE(this._points,c))&&(g?this._doUpdateAnimation(s,b,a,n,M,_,T):(M&&(b&&(b=da(b,c,a,M,T)),c=da(c,null,a,M,T)),d.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:b})))}var z=e.getModel("emphasis"),V=z.get("focus"),q=z.get("blurScope"),G=z.get("disabled");if(d.useStyle(he(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),eo(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var $=d.getState("emphasis").style;$.lineWidth=+d.style.lineWidth+1}_e(d).seriesIndex=e.seriesIndex,vi(d,V,q,G);var oe=iE(e.get("smooth")),ie=e.get("smoothMonotone");if(d.setShape({smooth:oe,smoothMonotone:ie,connectNulls:T}),v){var pe=s.getCalculationInfo("stackedOnSeries"),de=0;v.useStyle(he(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),pe&&(de=iE(pe.get("smooth"))),v.setShape({smooth:oe,stackedOnSmooth:de,smoothMonotone:ie,connectNulls:T}),eo(v,e,"areaStyle"),_e(v).seriesIndex=e.seriesIndex,vi(v,V,q,G)}var te=this._changePolyState;s.eachItemGraphicEl(function(ze){ze&&(ze.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=_;var Te=e.get("triggerEvent"),Pe=e.get("triggerLineEvent"),vt=Pe===!0||Te===!0||Te==="line",bt=Pe===!0||Te===!0||Te==="area";this.packEventData(e,d,vt),v&&this.packEventData(e,v,bt)},t.prototype.packEventData=function(e,i,n){_e(i).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:i===this._polygon?"area":"line"}:null},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Zr(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(vr(c,f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=e.get("zlevel")||0,p=e.get("z")||0;u=new wc(o,s),u.x=c,u.y=f,u.setZ(h,p);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=p,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ft.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Zr(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ft.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Mg(this._polyline,e),i&&Mg(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new jD({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new JD({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");j(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=j(f)?f(null):f;e.eachItemGraphicEl(function(p,d){var v=p;if(v){var m=[p.x,p.y],g=void 0,y=void 0,_=void 0;if(n)if(o){var x=n,b=i.pointToCoord(m);a?(g=x.startAngle,y=x.endAngle,_=-b[1]/180*Math.PI):(g=x.r0,y=x.r,_=b[0])}else{var S=n;a?(g=S.x,y=S.x+S.width,_=p.x):(g=S.y+S.height,y=S.y,_=p.y)}var T=y===g?0:(_-g)/(y-g);l&&(T=1-T);var A=j(f)?f(d):c*T+h,E=v.getSymbolPath(),M=E.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:A}),E.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(aE(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new He({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=lV(l);c>=0&&(jr(s,fr(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(f,h,p){return p!=null?wd(o,p):pl(o,f)},enableTextSetter:!0},cV(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=n.getLayout("points"),h=n.hostModel,p=h.get("connectNulls"),d=s.get("precision"),v=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,_=i.shape,x=y?g?_.x:_.y+_.height:g?_.x+_.width:_.y,b=(g?v:0)*(y?-1:1),S=(g?0:-v)*(y?-1:1),T=g?"x":"y",A=uV(f,x,T),E=A.range,M=E[1]-E[0],O=void 0;if(M>=1){if(M>1&&!p){var L=nE(f,E[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(O=h.getRawValue(E[0]))}else{var L=c.getPointOn(x,T);L&&u.attr({x:L[0]+b,y:L[1]+S});var I=h.getRawValue(E[0]),k=h.getRawValue(E[1]);o&&(O=$m(n,d,I,k,A.t))}a.lastFrameIndex=E[0]}else{var z=e===1||a.lastFrameIndex>0?E[0]:0,L=nE(f,z);o&&(O=h.getRawValue(z)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var V=Ns(u);typeof V.setLabelText=="function"&&V.setLabelText(O)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,h=J0(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin,s),p=h.current,d=h.stackedOnCurrent,v=h.next,m=h.stackedOnNext;if(o&&(d=da(h.stackedOnCurrent,h.current,n,o,l),p=da(h.current,null,n,o,l),m=da(h.stackedOnNext,h.next,n,o,l),v=da(h.next,null,n,o,l)),rE(p,v)>3e3||c&&rE(d,m)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=p;var g={shape:{points:v}};h.current!==p&&(g.shape.__points=h.next),u.stopAnimation(),Ke(u,g,f),c&&(c.setShape({points:p,stackedOnPoints:d}),c.stopAnimation(),Ke(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var T=u.shape.__points,A=0;A<y.length;A++){var E=y[A].el,M=y[A].ptIdx*2;E.x=T[M],E.y=T[M+1],E.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(Ft),oE=fV;function i_(r,t){return{seriesType:r,plan:Ao(),reset:function(e){var i=e.getData(),n=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(n){var s=U(n.dimensions,function(p){return i.mapDimension(p)}).slice(0,2),l=s.length,u=i.getCalculationInfo("stackResultDimension");Rr(i,s[0])&&(s[0]=u),Rr(i,s[1])&&(s[1]=u);var c=i.getStore(),f=i.getDimensionIndex(s[0]),h=i.getDimensionIndex(s[1]);return l&&{progress:function(p,d){for(var v=p.end-p.start,m=o&&Fr(v*l),g=[],y=[],_=p.start,x=0;_<p.end;_++){var b=void 0;if(l===1){var S=c.get(f,_);b=n.dataToPoint(S,null,y)}else g[0]=c.get(f,_),g[1]=c.get(h,_),b=n.dataToPoint(g,null,y);o?(m[x++]=b[0],m[x++]=b[1]):d.setItemLayout(_,b.slice())}o&&(d.setLayout("points",m),d.setLayout("pointsRange",{start:p.start,end:p.end}))}}}}}}var hV={average:function(r){for(var t=0,e=0,i=0;i<r.length;i++)isNaN(r[i])||(t+=r[i],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},pV=function(r){return Math.round(r.length/2)};function Tc(r){return{seriesType:r,reset:function(t,e,i){var n=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),p=Math.round(s/h);if(isFinite(p)&&p>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/p)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/p));var d=void 0;H(a)?d=hV[a]:j(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/p,d,pV))}}}}}function n_(r){r.registerChartView(oE),r.registerSeriesModel(YD),r.registerLayout(i_("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tc("line"))}var dV=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(xd),sE=dV;var vV=null;function zo(){return vV}var lE="expandAxisBreak";var va=Math.PI,mV=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],gV=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ma=re(),fE=re(),o_=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,i=t.componentIndex,n=this.recordMap,a=n[e]||(n[e]=[]);return a[i]||(a[i]={ready:{}})},r})();function yV(r,t,e,i){var n=e.axis,a=t.ensureRecord(e),o=[],s,l=u_(r.axisName)&&fa(r.nameLocation);w(i,function(d){var v=Si(d);if(!(!v||v.label.ignore)){o.push(v);var m=a.transGroup;l&&(m.transform?Tr(Cc,m.transform):Hr(Cc),v.transform&&li(Cc,Cc,v.transform),ue.copy(Ed,v.localRect),Ed.applyTransform(Cc),s?s.union(Ed):ue.copy(s=new ue(0,0,0,0),Ed))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(d,v){return Math.abs(d.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=n.getExtent(),h=Math.min(f[0],f[1]),p=Math.max(f[0],f[1])-h;s.union(new ue(h,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Cc=kt(),Ed=new ue(0,0,0,0),s_=function(r,t,e,i,n,a){if(fa(r.nameLocation)){var o=a.stOccupiedRect;o&&hE(UD({},o,a.transGroup.transform),i,n)}else l_(a.labelInfoList,a.dirVec,i,n)};function hE(r,t,e){var i=new ke;Sd(r,t,i,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&HD(t,i)}function l_(r,t,e,i){for(var n=ke.dot(i,t)>=0,a=0,o=r.length;a<o;a++){var s=r[n?a:o-1-a];s.label.ignore||hE(s,e,i)}}var Vo=(function(){function r(t,e,i,n){this.group=new Ee,this._axisModel=t,this._api=e,this._local={},this._shared=n||new o_(s_),this._resetCfgDetermined(i)}return r.prototype.updateCfg=function(t){if(0)var e;var i=this._cfg.raw;i.position=t.position,i.labelOffset=t.labelOffset,this._resetCfgDetermined(i)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(t){var e=this._axisModel,i=e.getDefaultOption?e.getDefaultOption():{},n=Z(t.axisName,e.get("name")),a=e.get("nameMoveOverlap");(a==null||a==="auto")&&(a=Z(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:Z(t.nameDirection,1),tickDirection:Z(t.tickDirection,1),labelDirection:Z(t.labelDirection,1),labelOffset:Z(t.labelOffset,0),silent:Z(t.silent,!0),axisName:n,nameLocation:zr(e.get("nameLocation"),i.nameLocation,"end"),shouldNameMoveOverlap:u_(n)&&a,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=o;var s=new Ee({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(e);l.transGroup=this._transformGroup,l.dirVec=new ke(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(t,e){var i=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),w(_V,function(n){t[n]&&xV[n](i._cfg,i._local,i._shared,i._axisModel,i.group,i._transformGroup,i._api,e||{})}),this},r.innerTextLayout=function(t,e,i){var n=gu(e-t),a,o;return Ga(n)?(o=i>0?"top":"bottom",a="center"):Ga(n-va)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n<va?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),_V=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],xV={axisLine:function(r,t,e,i,n,a,o){if(0)var s;var l=i.get(["axisLine","show"]);if(l==="auto"&&(l=!0,r.raw.axisLineAutoShow!=null&&(l=!!r.raw.axisLineAutoShow)),!!l){var u=i.axis.getExtent(),c=a.transform,f=[u[0],0],h=[u[1],0],p=f[0]>h[0];c&&(ht(f,f,c),ht(h,h,c));var d=B({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(i.get(["axisLine","breakLine"])&&yo(i.axis.scale))zo().buildAxisBreakLine(i,n,a,v);else{var m=new Qt(B({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},v));fo(m.shape,m.style.lineWidth),m.anid="line",n.add(m)}var g=i.get(["axisLine","symbol"]);if(g!=null){var y=i.get(["axisLine","symbolSize"]);H(g)&&(g=[g,g]),(H(y)||ge(y))&&(y=[y,y]);var _=Io(i.get(["axisLine","symbolOffset"])||0,y),x=y[0],b=y[1];w([{rotate:r.rotation+Math.PI/2,offset:_[0],r:0},{rotate:r.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(S,T){if(g[T]!=="none"&&g[T]!=null){var A=It(g[T],-x/2,-b/2,x,b,d.stroke,!0),E=S.r+S.offset,M=p?h:f;A.attr({rotation:S.rotate,x:M[0]+E*Math.cos(r.rotation),y:M[1]-E*Math.sin(r.rotation),silent:!0,z2:11}),n.add(A)}})}}},axisTickLabelEstimate:function(r,t,e,i,n,a,o,s){if(0)var l;var u=cE(t,n,s);u&&uE(r,t,e,i,n,a,o,dr.estimate)},axisTickLabelDetermine:function(r,t,e,i,n,a,o,s){if(0)var l;var u=cE(t,n,s);u&&uE(r,t,e,i,n,a,o,dr.determine);var c=TV(r,n,a,i);wV(r,t.labelLayoutList,c),CV(r,n,a,i,r.tickDirection)},axisName:function(r,t,e,i,n,a,o,s){var l=e.ensureRecord(i);if(0)var u;t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=r.axisName;if(u_(c)){var f=r.nameLocation,h=r.nameDirection,p=i.getModel("nameTextStyle"),d=i.get("nameGap")||0,v=i.axis.getExtent(),m=i.axis.inverse?-1:1,g=new ke(0,0),y=new ke(0,0);f==="start"?(g.x=v[0]-m*d,y.x=-m):f==="end"?(g.x=v[1]+m*d,y.x=m):(g.x=(v[0]+v[1])/2,g.y=r.labelOffset+h*d,y.y=h);var _=kt();y.transform(Da(_,_,r.rotation));var x=i.get("nameRotate");x!=null&&(x=x*va/180);var b,S;fa(f)?b=Vo.innerTextLayout(r.rotation,x??r.rotation,h):(b=bV(r.rotation,f,x||0,v),S=r.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var T=p.getFont(),A=i.get("nameTruncate",!0)||{},E=A.ellipsis,M=nr(r.raw.nameTruncateMaxWidth,A.maxWidth,S),O=s.nameMarginLevel||0,L=new He({x:g.x,y:g.y,rotation:b.rotation,silent:Vo.isLabelSilent(i),style:Lr(p,{text:c,font:T,overflow:"truncate",width:M,ellipsis:E,fill:p.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:p.get("align")||b.textAlign,verticalAlign:p.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Ls({el:L,componentModel:i,itemName:c}),L.__fullText=c,L.anid="name",i.get("triggerEvent")){var I=Vo.makeAxisEventDataBase(i);I.targetType="axisName",I.name=c,_e(L).eventData=I}a.add(L),L.updateTransform(),t.nameEl=L;var k=l.nameLayout=Si({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:fa(f)?mV[O]:gV[O]});if(l.nameLocation=f,n.add(L),L.decomposeTransform(),r.shouldNameMoveOverlap&&k){var z=e.ensureRecord(i);e.resolveAxisNameOverlap(r,e,i,k,y,z)}}}};function uE(r,t,e,i,n,a,o,s){dE(t)||AV(r,t,n,s,i,o);var l=t.labelLayoutList;DV(r,i,l,a),OV(i,r.rotation,l);var u=r.optionHideOverlap;SV(i,l,u),u&&GD(Be(l,function(c){return c&&!c.label.ignore})),yV(r,e,i,l)}function bV(r,t,e,i){var n=gu(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Ga(n-va/2)?(o=l?"bottom":"top",a="center"):Ga(n-va*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",n<va*1.5&&n>va/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function SV(r,t,e){var i=r.axis,n=r.get(["axisLabel","customValues"]);if(jA(i))return;function a(u,c,f){var h=Si(t[c]),p=Si(t[f]),d=i.scale;if(!(!h||!p)){if(u==null){if(!e&&n)return;var v=ma(h.label).labelInfo.tick;if(Ki(d)&&v.notNice||lt(d)&&v.offInterval){dl(h.label);return}}if(u===!1||h.suggestIgnore){dl(h.label);return}if(p.suggestIgnore){dl(p.label);return}var m=.1;if(!e){var g=[0,0,0,0];h=$0({marginForce:g},h),p=$0({marginForce:g},p)}Sd(h,p,null,{touchThreshold:m})&&dl(u?p.label:h.label)}}var o=r.get(["axisLabel","showMinLabel"]),s=r.get(["axisLabel","showMaxLabel"]),l=t.length;a(o,0,1),a(s,l-1,l-2)}function wV(r,t,e){r.showMinorTicks||w(t,function(i){if(i&&i.label.ignore)for(var n=0;n<e.length;n++){var a=e[n],o=fE(a),s=ma(i.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.labelInfo.tick.value){dl(a);return}}})}function dl(r){r&&(r.ignore=!0)}function pE(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(ht(o,o,t),ht(s,s,t));var c=new Qt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});fo(c.shape,c.style.lineWidth),c.anid=n+"_"+r[l].tickValue,a.push(c);var f=fE(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return a}function TV(r,t,e,i){var n=i.axis,a=i.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||n.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=r.tickDirection*a.get("length"),u=n.getTicksCoords(),c=pE(u,e.transform,l,he(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function CV(r,t,e,i,n){var a=i.axis,o=i.getModel("minorTick");if(!(!r.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=n*o.get("length"),c=he(l.getLineStyle(),he(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var h=pE(s[f],e.transform,u,c,"minorticks_"+f),p=0;p<h.length;p++)t.add(h[p])}}function cE(r,t,e){if(dE(r)){var i=r.axisLabelsCreationContext,n=i.out.noPxChangeTryDetermine;if(e.noPxChange){for(var a=!0,o=0;o<n.length;o++)a=a&&n[o]();if(a)return!1}n.length&&(t.remove(r.labelGroup),a_(r,null,null,null))}return!0}function AV(r,t,e,i,n,a){var o=n.axis,s=nr(r.raw.axisLabelShow,n.get(["axisLabel","show"])),l=new Ee;e.add(l);var u=hl(i);if(!s||o.scale.isBlank()){a_(t,[],l,u);return}var c=n.getModel("axisLabel"),f=o.getViewLabels(u),h=(nr(r.raw.labelRotate,c.get("rotate"))||0)*va/180,p=Vo.innerTextLayout(r.rotation,h,r.labelDirection),d=n.getCategories&&n.getCategories(!0),v=[],m=n.get("triggerEvent"),g=1/0,y=-1/0;w(f,function(x,b){var S,T=x.tick,A=x.formattedLabel,E=x.rawLabel,M=c,O=Tn(o.scale,T);if(d&&d[O]){var L=d[O];W(L)&&L.textStyle&&(M=new Re(L.textStyle,c,n.ecModel))}var I=M.getTextColor()||n.get(["axisLine","lineStyle","color"]),k=M.getShallow("align",!0)||p.textAlign,z=Z(M.getShallow("alignMinLabel",!0),k),V=Z(M.getShallow("alignMaxLabel",!0),k),q=M.getShallow("verticalAlign",!0)||M.getShallow("baseline",!0)||p.textVerticalAlign,G=Z(M.getShallow("verticalAlignMinLabel",!0),q),$=Z(M.getShallow("verticalAlignMaxLabel",!0),q),oe=10+(((S=T.time)===null||S===void 0?void 0:S.level)||0);g=Math.min(g,oe),y=Math.max(y,oe);var ie=new He({x:0,y:0,rotation:0,silent:Vo.isLabelSilent(n),z2:oe,style:Lr(M,{text:A,align:b===0?z:b===f.length-1?V:k,verticalAlign:b===0?G:b===f.length-1?$:q,fill:j(I)?I(o.type==="category"?E:o.type==="value"?O+"":O,b):I})});ie.anid="label_"+O;var pe=ma(ie);if(pe.labelInfo=x,pe.layoutRotation=p.rotation,Ls({el:ie,componentModel:n,itemName:A,formatterParamsExtra:{isTruncated:function(){return ie.isTruncated},value:E,tickIndex:b}}),m){var de=Vo.makeAxisEventDataBase(n);de.targetType="axisLabel",de.value=E,de.tickIndex=b;var te=x.tick.break;if(te){var Te=te.parsedBreak;de.break={start:Te.vmin,end:Te.vmax}}o.type==="category"&&(de.dataIndex=O),_e(ie).eventData=de,te&&MV(n,a,ie,te)}v.push(ie),l.add(ie)});var _=U(v,function(x){return{label:x,priority:ma(x).labelInfo.tick.break?x.z2+(y-g+1):x.z2,defaultAttr:{ignore:x.ignore}}});a_(t,_,l,u)}function dE(r){return!!r.labelLayoutList}function a_(r,t,e,i){r.labelLayoutList=t,r.labelGroup=e,r.axisLabelsCreationContext=i}function DV(r,t,e,i){var n=t.get(["axisLabel","margin"]);w(e,function(a,o){var s=Si(a);if(s){var l=s.label,u=ma(l);s.suggestIgnore=l.ignore,l.ignore=!1,ls(An,EV);var c=t.axis;An.x=c.dataToCoord(Tn(c.scale,u.labelInfo.tick)),An.y=r.labelOffset+r.labelDirection*n,An.rotation=u.layoutRotation,i.add(An),An.updateTransform(),i.remove(An),An.decomposeTransform(),ls(l,An),l.markRedraw(),Sc(s,!0),Si(s)}})}var An=new Oe,EV=new Oe;function u_(r){return!!r}function MV(r,t,e,i){e.on("click",function(n){var a={type:lE,breaks:[{start:i.parsedBreak.breakOption.start,end:i.parsedBreak.breakOption.end}]};a[r.axis.dim+"AxisIndex"]=r.componentIndex,t.dispatchAction(a)})}function OV(r,t,e){var i=it();if(i){var n=i.retrieveAxisBreakPairs(e,function(o){return o&&ma(o.label).labelInfo.tick.break},!0),a=r.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&w(n,function(o){zo().adjustBreakLabelPair(r.axis.inverse,t,[Si(e[o[0]]),Si(e[o[1]])])})}}var Md=Vo;function Ac(r,t,e){e=e||{};var i=t.axis,n={},a=i.getAxesOnZeroOf()[0],o=i.position,s=a?"onZero":o,l=i.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,h=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));h[c.onZero]=Math.max(Math.min(p,h[1]),h[0])}n.position=[l==="y"?h[c[s]]:u[0],l==="x"?h[c[s]]:u[3]],n.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=d[o],n.labelOffset=a?h[c[o]]-h[c.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),nr(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var v=t.get(["axisLabel","rotate"]);return n.labelRotate=s==="top"?-v:v,n.z2=1,n}function vE(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function mE(r){var t={xAxisModel:null,yAxisModel:null};return w(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,at).models[0];t[i]=a}),t}function gE(r,t,e,i,n,a){for(var o=Ac(r,e),s=!1,l=!1,u=0;u<t.length;u++)Jp(t[u].getOtherAxis(e.axis).scale)&&(s=l=!0,e.axis.type==="category"&&e.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Md(e,i,o,n)}function yE(r,t,e){var i=Ac(t,e);if(0)var n;r.updateCfg(i)}function _E(){sD("liPosMinGap",LV)}function LV(r,t,e){var i=Y(),n=e.serUids,a=e.liPosMinGap,o,s=t.axis,l=s.scale,u=l.needTransform(),c=l.getFilter?l.getFilter():null,f=gp(c);function h(_){vd(r,t.sers,function(x){var b=x.getRawData(),S=b.getDimensionIndex(b.mapDimension(s.dim));S>=0&&_(S,x,b.getStore())})}var p=0;if(h(function(_,x,b){i.set(x.uid,1),(!n||!n.hasKey(x.uid))&&(o=!0),p+=b.count()}),(!n||n.keys().length!==i.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Dd(Uo,p);var d=0;h(function(_,x,b){for(var S=0,T=b.count();S<T;++S){var A=b.get(_,S);isFinite(A)&&(!c||yp(f,A))&&(u&&(A=l.transformIn(A,null)),Uo.arr[d++]=A)}});var v=Uo.typed?Uo.arr.subarray(0,d):(Uo.arr.length=d,Uo.arr);Uo.typed?v.sort():Ct(v);for(var m=1/0,g=1;g<d;++g){var y=v[g]-v[g-1];y>0&&y<m&&(m=y)}e.liPosMinGap=t.liPosMinGap=gt(m)?m:d>0?dd:QA,e.serUids=i}var Uo=Dd({ctor:qD},50);function xE(r){return function(t,e){var i=bi(t,{fromStat:{key:r}});if(gt(i.w2))return[-i.w2/2,i.w2/2]}}function Dc(r,t){return r+pd+t}function bE(r){return _E(),{liPosMinGap:!lt(r.scale)}}var Dn="bar";function SE(r,t,e,i){uD(r,{key:t,seriesType:e,coordSysType:i,getMetrics:bE})}function wE(r){var t=r.scale.rawExtentInfo.makeRenderInfo().startValue;return t}var c_={left:0,right:0,top:0,bottom:0},Ec=["25%","25%"],ii="cartesian2d",PV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,i){var n=Qr(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Nr(e.outerBounds,n)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Nr(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:c_,outerBoundsContain:"all",outerBoundsClampWidth:Ec[0],outerBoundsClampHeight:Ec[1],backgroundColor:K.color.transparent,borderWidth:1,borderColor:K.color.neutral30},t})(Le),TE=PV;var NV=gs(),kV="__ec_stack_";function CE(r){return r.get("stack")||kV+r.seriesIndex}function RV(r,t){var e=FV(r,t);return e.columnMap=BV(e),e}function FV(r,t){var e=Dc(t,ii),i=[],n=bi(r,{fromStat:{key:e},min:1});return I0(r,e,function(a){i.push({barWidth:Ve(a.get("barWidth"),n.w),barMaxWidth:Ve(a.get("barMaxWidth"),n.w),barMinWidth:Ve(a.get("barMinWidth")||(EE(a)?.5:1),n.w),barGap:a.get("barGap"),barCategoryGap:a.get("barCategoryGap"),defaultBarGap:a.get("defaultBarGap"),stackId:CE(a)})}),{bandWidthResult:n,seriesInfo:i}}function BV(r){var t=r.bandWidthResult.w,e=t,i=0,n,a,o=[],s={};w(r.seriesInfo,function(v,m){m||(a=v.defaultBarGap||0);var g=v.stackId;We(s,g)||i++;var y=s[g];y||(y=s[g]={width:0,maxWidth:0},o.push(g));var _=v.barWidth;_&&!y.width&&(y.width=_,_=Xe(e,_),e-=_);var x=v.barMaxWidth;x&&(y.maxWidth=x);var b=v.barMinWidth;b&&(y.minWidth=b);var S=v.barGap;S!=null&&(a=S);var T=v.barCategoryGap;T!=null&&(n=T)}),n==null&&(n=Se(35-o.length*4,15)+"%");var l=Ve(n,t),u=Ve(a,1),c=(e-l)/(i+(i-1)*u);c=Se(c,0),w(o,function(v){var m=s[v],g=m.maxWidth,y=m.minWidth;if(m.width){var _=m.width;g&&(_=Xe(_,g)),y&&(_=Se(_,y)),m.width=_,e-=_+u*_,i--}else{var _=c;g&&g<_&&(_=Xe(g,e)),y&&y>_&&(_=y),_!==c&&(m.width=_,e-=_+u*_,i--)}}),c=(e-l)/(i+(i-1)*u),c=Se(c,0);var f=0,h;w(o,function(v){var m=s[v];m.width||(m.width=c),h=m,f+=m.width*(1+u)}),h&&(f-=h.width*u);var p={},d=-f/2;return w(o,function(v){var m=s[v];p[v]=p[v]||{bandWidth:t,offset:d,width:m.width},d+=m.width*(1+u)}),p}function AE(r){return{seriesType:r,overallReset:function(t){var e=Dc(r,ii);oD(t,e,function(i){var n=RV(i,r);I0(i,e,function(a){var o=n.columnMap[CE(a)];a.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function DE(r){return{seriesType:r,plan:Ao(),reset:function(t){if(vE(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),c=e.getCalculationInfo("stackResultDimension"),f=Rr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),p=a.toGlobalCoord(a.dataToCoord(wE(a))),d=EE(t),v=t.get("barMinHeight")||0,m=c&&e.getDimensionIndex(c),g=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=d&&Fr(b*3),T=d&&l&&Fr(b*3),A=d&&Fr(b),E=i.master.getRect(),M=h?E.width:E.height,O,L=x.getStore(),I=0;(O=_.next())!=null;){var k=L.get(f?m:o,O),z=L.get(s,O),V=p,q=void 0;f&&(q=+k-L.get(o,O));var G=void 0,$=void 0,oe=void 0,ie=void 0;if(h){var pe=i.dataToPoint([k,z]);f&&(V=i.dataToPoint([q,z])[0]),G=V,$=pe[1]+y,oe=pe[0]-V,ie=g,Ge(oe)<v&&(oe=(oe<0?-1:1)*v)}else{var pe=i.dataToPoint([z,k]);f&&(V=i.dataToPoint([z,q])[1]),G=pe[0]+y,$=V,oe=g,ie=pe[1]-V,Ge(ie)<v&&(ie=(ie<=0?-1:1)*v)}d?(S[I]=G,S[I+1]=$,S[I+2]=h?oe:ie,T&&(T[I]=h?E.x:G,T[I+1]=h?$:E.y,T[I+2]=M),A[O]=O):x.setItemLayout(O,{x:G,y:$,width:oe,height:ie}),I+=3}d&&x.setLayout({largePoints:S,largeDataIndices:A,largeBackgroundPoints:T,valueAxisHorizontal:h})}}}}}}function EE(r){return r.pipelineContext&&r.pipelineContext.large}function zV(r){return xE(Dc(r,ii))}function ME(r){NV(r,function(){function t(e){var i=Dc(e,ii);SE(r,i,e,ii),yD(i,zV(e))}t("bar"),t("pictorialBar")})}var OE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)w(a.getAxes(),function(h,p){if(h.type==="category"&&i!=null){var d=h.getTicksCoords(),v=h.getTickModel().get("alignWithLabel"),m=o[p],g=i[p]==="x1"||i[p]==="y1";if(g&&!v&&(m+=1),d.length<2)return;if(d.length===2){s[p]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var y=void 0,_=void 0,x=1,b=0;b<d.length;b++){var S=d[b].coord,T=b===d.length-1?d[b-1].tickValue+x:d[b].tickValue;if(T===m){_=S;break}else if(T<m)y=S;else if(y!=null&&T>m){_=(S+y)/2;break}b===1&&(x=T-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[p]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},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",defaultBarGap:"10%"},t})(tr);tr.registerClass(OE);var f_=OE;var VV=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return ca(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(e,i){var n=rh(this,e,i);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series."+Dn,t.dependencies=["grid","polar"],t.defaultOption=ra(f_.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:K.color.primary,borderWidth:2}},realtimeSort:!1}),t})(f_),IE=VV;var UV=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),HV=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new UV},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,c=i.startAngle,f=i.endAngle,h=i.clockwise,p=Math.PI*2,d=h?f-c<p:c-f<p;d||(c=f-(h?p:-p));var v=Math.cos(c),m=Math.sin(c),g=Math.cos(f),y=Math.sin(f);d?(e.moveTo(v*o+n,m*o+a),e.arc(v*u+n,m*u+a,l,-Math.PI+c,c,!h)):e.moveTo(v*s+n,m*s+a),e.arc(n,a,s,c,f,!h),e.arc(g*u+n,y*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&e.arc(n,a,o,f,c,h)},t})(ve),h_=HV;function LE(r,t){t=t||{};var e=t.isRoundCap;return function(i,n,a){var o=n.position;if(!o||o instanceof Array)return Ua(i,n,a);var s=r(o),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,p=u.r0,d=(h+p)/2,v=u.startAngle,m=u.endAngle,g=(v+m)/2,y=e?Math.abs(h-p)/2:0,_=Math.cos,x=Math.sin,b=c+h*_(v),S=f+h*x(v),T="left",A="top";switch(s){case"startArc":b=c+(p-l)*_(g),S=f+(p-l)*x(g),T="center",A="top";break;case"insideStartArc":b=c+(p+l)*_(g),S=f+(p+l)*x(g),T="center",A="bottom";break;case"startAngle":b=c+d*_(v)+Od(v,l+y,!1),S=f+d*x(v)+Id(v,l+y,!1),T="right",A="middle";break;case"insideStartAngle":b=c+d*_(v)+Od(v,-l+y,!1),S=f+d*x(v)+Id(v,-l+y,!1),T="left",A="middle";break;case"middle":b=c+d*_(g),S=f+d*x(g),T="center",A="middle";break;case"endArc":b=c+(h+l)*_(g),S=f+(h+l)*x(g),T="center",A="bottom";break;case"insideEndArc":b=c+(h-l)*_(g),S=f+(h-l)*x(g),T="center",A="top";break;case"endAngle":b=c+d*_(m)+Od(m,l+y,!0),S=f+d*x(m)+Id(m,l+y,!0),T="left",A="middle";break;case"insideEndAngle":b=c+d*_(m)+Od(m,-l+y,!0),S=f+d*x(m)+Id(m,-l+y,!0),T="right",A="middle";break;default:return Ua(i,n,a)}return i=i||{},i.x=b,i.y=S,i.align=T,i.verticalAlign=A,i}}function PE(r,t,e,i){if(ge(i)){r.setTextConfig({rotation:i});return}else if(F(t)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Od(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Id(r,t,e){return t*Math.cos(r)*(e?1:-1)}function NE(r,t,e){var i=r.get("borderRadius");if(i==null)return e?{cornerRadius:0}:null;F(i)||(i=[i,i,i,i]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(i,function(a){return fi(a,n)})}}var p_=Math.max,d_=Math.min,GV=(function(r){N(t,r);function t(){var e=r.call(this)||this;return e.type=Dn,e._isFirstFrame=!0,e}return t.prototype.render=function(e,i,n,a){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,i,n):this._renderNormal(e,i,n,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,i){this._progressiveEls=[],this._incrementalRenderLarge(e,i)},t.prototype.eachRendered=function(e){gn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e,i,n,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=e.isAnimationEnabled()?e:null,p=YV(e,u);p&&this._enableRealtimeSort(p,s,n);var d=e.get("clip",!0)||p,v=u.getArea();o.removeClipPath();var m=e.get("roundCap",!0),g=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,T=a&&a.type==="changeAxisOrder";function A(O){var L=Ld[u.type](s,O);if(!L)return null;var I=jV(u,f,L);return I.useStyle(y.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),x[O]=I,I}s.diff(l).add(function(O){var L=s.getItemModel(O),I=Ld[u.type](s,O,L);if(I&&(g&&A(O),!(!s.hasValue(O)||!zE[u.type](I)))){var k=!1;d&&(k=kE[u.type](v,I));var z=RE[u.type](e,s,O,I,f,h,c.model,!1,m);p&&(z.forceLabelAnimation=!0),VE(z,s,O,L,I,e,f,u.type==="polar"),S?z.attr({shape:I}):p?FE(p,h,z,I,O,f,!1,!1):Ot(z,{shape:I},e,O),s.setItemGraphicEl(O,z),o.add(z),z.ignore=k}}).update(function(O,L){var I=s.getItemModel(O),k=Ld[u.type](s,O,I);if(k){if(g){var z=void 0;b.length===0?z=A(L):(z=b[L],z.useStyle(y.getItemStyle()),u.type==="cartesian2d"?z.setShape("r",_):z.setShape("cornerRadius",_),x[O]=z);var V=Ld[u.type](s,O),q=WE(f,V,u);Ke(z,{shape:q},h,O)}var G=l.getItemGraphicEl(L);if(!s.hasValue(O)||!zE[u.type](k)){o.remove(G);return}var $=!1;d&&($=kE[u.type](v,k),$&&o.remove(G));var oe=G&&(G.type==="sector"&&m||G.type==="sausage"&&!m);if(oe&&(G&&Ms(G,e,L),G=null),G?Lh(G):G=RE[u.type](e,s,O,k,f,h,c.model,!0,m),p&&(G.forceLabelAnimation=!0),T){var ie=G.getTextContent();if(ie){var pe=Ns(ie);pe.prevValue!=null&&(pe.prevValue=pe.value)}}else VE(G,s,O,I,k,e,f,u.type==="polar");S?G.attr({shape:k}):p?FE(p,h,G,k,O,f,!0,T):Ke(G,{shape:k},e,O,null),s.setItemGraphicEl(O,G),G.ignore=$,o.add(G)}}).remove(function(O){var L=l.getItemGraphicEl(O);L&&Ms(L,e,O)}).execute();var E=this._backgroundGroup||(this._backgroundGroup=new Ee);E.removeAll();for(var M=0;M<x.length;++M)E.add(x[M]);o.add(E),this._backgroundEls=x,this._data=s},t.prototype._renderLarge=function(e,i,n){this._clear(),HE(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,i){this._removeBackground(),HE(i,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var i=e.get("clip",!0)&&QD(e.coordinateSystem,!1,e),n=this.group;i?n.setClipPath(i):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,i,n){var a=this;if(i.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,e,n),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,i,n){var a=[];return e.each(e.mapDimension(i.dim),function(o,s){var l=n(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:U(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,i,n){for(var a=n.scale,o=e.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:i(e.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){Ms(a,e,_e(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=Dn,t})(Ft),kE={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=p_(t.x,r.x),s=d_(t.x+t.width,n),l=p_(t.y,r.y),u=d_(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>n?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=d_(t.r,r.r),a=p_(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},RE={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new Oe({shape:B({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var c=u.shape,f=n?"height":"width";c[f]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?h_:Hi,c=new u({shape:i,z2:1});c.name="item";var f=YE(n);if(c.calculateTextPosition=LE(f,{isRoundCap:u===h_}),a){var h=c.shape,p=n?"r":"endAngle",d={};h[p]=n?i.r0:i.startAngle,d[p]=i[p],(s?Ke:Ot)(c,{shape:d},a)}return c}};function YV(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function FE(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Ke:Ot)(e,{shape:l},t,n,null);var c=t?r.baseAxis.model:null;(o?Ke:Ot)(e,{shape:u},c,n)}function BE(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var WV=["x","y","width","height"],ZV=["cx","cy","r","startAngle","endAngle"],zE={cartesian2d:function(r){return!BE(r,WV)},polar:function(r){return!BE(r,ZV)}},Ld={cartesian2d:function(r,t,e){var i=r.getItemLayout(t);if(!i)return null;var n=e?KV(e,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function XV(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function YE(r){return(function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}})(r)}function VE(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=NE(i.getModel("itemStyle"),c,!0);B(c,f),r.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=i.getShallow("cursor");h&&r.attr("cursor",h);var p=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?JV(n,a.coordinateSystem):QV(n,a.coordinateSystem),d=fr(i);jr(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:pl(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var v=r.getTextContent();if(s&&v){var m=i.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,PE(r,m==="outside"?p:m,YE(o),i.get(["label","rotate"]))}UT(v,d,a.getRawValue(e),function(y){return wd(t,y)});var g=i.getModel(["emphasis"]);vi(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),eo(r,i),XV(n)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function KV(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var qV=(function(){function r(){}return r})(),UE=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new qV},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[a]=u,l[o]=n[c+2],s[a]=n[c+a],s[o]=n[c+o],e.rect(s[0],s[1],l[0],l[1])},t})(ve);function HE(r,t,e,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints"),c=i?YS(r):0;if(u){var f=new UE({shape:{points:u},incremental:c,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new UE({shape:{points:n.getLayout("largePoints")},incremental:c,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(n.getVisual("style")),h.style.stroke=null,_e(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",GE),h.on("mousemove",GE)),e&&e.push(h)}var GE=Do(function(r){var t=this,e=$V(t,r.offsetX,r.offsetY);_e(t).dataIndex=e>=0?e:null},30,!1);function $V(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c<f;c++){var h=c*3;if(l[i]=u,l[n]=a[h+2],s[i]=a[h+i],s[n]=a[h+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function WE(r,t,e){if(Cn(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function jV(r,t,e){var i=r.type==="polar"?Hi:Oe;return new i({shape:WE(t,e,r),silent:!0,z2:0})}function JV(r,t){if(r.height===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"bottom":"top"}return r.height>0?"bottom":"top"}function QV(r,t){if(r.width===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"left":"right"}return r.width>=0?"right":"left"}var ZE=GV;function v_(r){r.registerChartView(ZE),r.registerSeriesModel(IE),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,AE(Dn)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,DE(Dn)),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tc(Dn)),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})}),ME(r)}var Pd=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",at).models[0]},t.type="cartesian2dAxis",t})(Le);mt(Pd,hd);var XE={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:"auto",onZeroAxisIndex:null,lineStyle:{color:K.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:K.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:K.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[K.color.backgroundTint,K.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:K.color.neutral00,borderColor:K.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},eU=me({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},XE),m_=me({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:K.color.axisMinorSplitLine,width:1}}},XE),tU=me({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},m_),rU=he({logBase:10},m_),KE={category:eU,value:m_,time:tU,log:rU};function Nd(r,t,e,i){w(ad,function(n,a){var o=me(me({},KE[a],!0),i,!0),s=(function(l){N(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=ia(this),p=h?Qr(c):{},d=f.getTheme();me(c,d.get(a+"Axis")),me(c,this.getDefaultOption()),c.type=qE(c),h&&Nr(c,p,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=mc.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=zo();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",qE)}function qE(r){return r.type||(r.data?"category":"value")}var iU=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return U(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Be(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),$E=iU;var Mc=["x","y"];function jE(r){return(r.type==="interval"||r.type==="time")&&!yo(r)}var nU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=ii,e.dimensions=Mc,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!jE(e)||!jE(i))){var n=Ro(e,null),a=Ro(i,null),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-n[0]*c,p=o[1]-a[0]*f,d=this._transform=[c,0,0,f,h,p];this._invTransform=Tr([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.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,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new ue(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ht(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i,n){if(n=n||[],this._invTransform)return ht(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new ue(a,o,s,l)},t})($E),JE=nU;function QE(r,t){var e=r.scale,i=r.model,n=gd(e,i,i.ecModel,r,null),a=qi(e),o=qi(t)?t.intervalStub:t,s=a?e.intervalStub:e,l=e.base,u=o.getTicks(),c=o.getTicks({expandToNicedExtent:!0}),f=u.length-1,h,p,d;if(f===1)h=p=0,d=1;else if(f===2){var v=Ge(u[0].value-u[1].value),m=Ge(u[1].value-u[2].value);h=p=0,v===m?d=2:(d=1,v<m?h=v/m:p=m/v)}else{var g=o.getConfig().interval;h=(1-(u[0].value-c[0].value)/g)%1,p=(1-(c[f].value-u[f].value)/g)%1,d=f-(h?1:0)-(p?1:0)}var y=n.zoomFixMM,_=y[0]||y[1],x=[n.fixMM[0]||_,n.fixMM[1]||_],b=e.getExtent(),S=s.getExtent(),T=ed(S,x),A,E,M,O,L,I;function k(pe){for(var de=50,te=0;te<de&&!pe();te++)M=a?M*Se(l,2):LA(M),O=xi(M)}function z(){A=we(I-M*h,O)}function V(){E=we(L+M*p,O)}function q(){I=h?we(A+M*h,O):A}function G(){L=p?we(E-M*p,O):E}if(x[0]&&x[1]){A=T[0],E=T[1],M=(E-A)/(d+h+p);var $=r.getExtent(),oe=Ge($[1]-$[0]);O=eh([E,A],oe,.5/d),q(),G(),gt(O)&&(M=we(M,O))}else{var ie=T[1]-T[0];M=a?Se(hs(ie),1):un(ie/d,Wm),O=xi(M),x[0]?(A=T[0],k(function(){if(q(),L=we(I+M*d,O),V(),E>=T[1])return!0})):x[1]?(E=T[1],k(function(){if(G(),I=we(L-M*d,O),z(),A<=T[0])return!0})):k(function(){I=we(Li(T[0]/M)*M,O),L=we(sr(T[1]/M)*M,O);var pe=or((L-I)/M);if(pe<=d){var de=d-pe,te=void 0,Te=n.incl0||a;if(Te&&T[0]===0)te=[0,de];else if(Te&&T[1]===0)te=[de,0];else{var Pe=sr(de/2);te=de%2===0?[Pe,Pe]:A+E<T[0]+T[1]?[Pe,Pe+1]:[Pe+1,Pe]}if(I=we(I-M*te[0],O),L=we(L+M*te[1],O),z(),V(),A<=T[0]&&E>=T[1])return!0}})}cd(e,x,S,[A,E],b,{interval:M,intervalCount:d,intervalPrecision:O,niceExtent:[I,L]})}var eM=[[3,1],[0,2]],aU=(function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Mc,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;w(this._axesList,function(o){md(o,hD);var s=o.scale;lt(s)&&s.setSortInfo(o.model.get("categorySortInfo"))});function n(o){for(var s=De(o),l=[],u=s.length-1;u>=0;u--){var c=o[+s[u]];c.__alignTo?l.push(c):k0(c)}w(l,function(f){sU(f,f.__alignTo)?k0(f):QE(f,f.__alignTo.scale)})}n(i.x),n(i.y);var a={};w(i.x,function(o){tM(i,"y",o,a)}),w(i.y,function(o){tM(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=Gs(t,e),a=this._rect=Jr(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(g_(o,a),!i){var u=uU(a,s,o,l,e),c=void 0;if(l)aM?(aM(this._axesList,a),g_(o,a)):c=oM(a.clone(),"axisLabel",null,a,o,u,n);else{var f=cU(t,a,n),h=f.outerBoundsRect,p=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;h&&(c=oM(h,p,d,a,o,u,n))}sM(a,o,dr.determine,null,c,n),w(this._coordsList,function(v){v.calcAffineTransform()})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}W(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,i=t.xAxisModel||e&&e.getReferringComponents("xAxis",at).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",at).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,ce(o,s)<0&&(s=null);else if(i&&n)s=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,i){var n=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,w(s.x,function(c,f){w(s.y,function(h,p){var d="x"+f+"y"+p,v=new JE(d);v.master=n,v.model=t,n._coordsMap[d]=v,n._coordsList.push(v),v.addAxis(c),v.addAxis(h)})}),iM(s.x),iM(s.y);function u(c){return function(f,h){if(oU(f,t)){var p=f.get("position");c==="x"?p!=="top"&&p!=="bottom"&&(p=o.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=o.left?"right":"left"),o[p]=!0;var d=sd(f),v=new sE(c,ld(f,d,!0),[0,0],d,p);v.onBand=fd(v.scale,f),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=h,a._axesList.push(v),s[c][h]=v,l[c]++}}}},r.prototype.getTooltipAxes=function(t){var e=[],i=[];return w(this.getCartesians(),function(n){var a=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);ce(e,a)<0&&e.push(a),ce(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}},r.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new r(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o),w(o._axesList,function(s){mD(s,r.dimIdxMap)})}),t.eachSeries(function(n){var a,o;lC({targetModel:n,coordSysType:ii,coordSysProvider:s});function s(){var l=mE(n),u=l.xAxisModel,c=l.yAxisModel;a=u.axis,o=c.axis;var f=u.getCoordSysModel(),h=f.coordinateSystem;return h.getCartesian(u.componentIndex,c.componentIndex)}a&&o&&(P0(a,n,ii),P0(o,n,ii))},this),i},r.dimensions=Mc,r.dimIdxMap=fc(Mc),r})();function oU(r,t){return r.getCoordSysModel()===t}function tM(r,t,e,i){e.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)rM(s,n[l])&&(a=n[l]);else for(var u in n)if(We(n,u)&&rM(s,n[u])&&!i[c(n[u])]){a=n[u];break}a&&(i[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function rM(r,t){if(!t)return!1;var e=t.scale,i=KA(e,0,!1),n=t&&t.type!=="category"&&t.type!=="time"&&i!==od;return n&&r==="auto"&&$A(t)&&(n=!1),n}function iM(r){for(var t=De(r),e,i=[],n=t.length-1;n>=0;n--){var a=r[+t[n]];Jp(a.scale)&&D0(a.model,a.type,!0)==null&&(a.model.get("alignTicks")&&a.model.get("interval")==null?i.push(a):e=a)}e||(e=i.pop()),e&&w(i,function(o){o.__alignTo=e})}function sU(r,t){return yo(r.scale)||yo(t.scale)||t.scale.getTicks().length<2}function lU(r,t){var e=r.getExtent(),i=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return i-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return i-n+t}}function g_(r,t){w(r.x,function(e){return nM(e,t.x,t.width)}),w(r.y,function(e){return nM(e,t.y,t.height)})}function nM(r,t,e){var i=[0,e],n=r.inverse?1:0;r.setExtent(i[n],i[1-n]),lU(r,t)}var aM;function oM(r,t,e,i,n,a,o){sM(i,n,dr.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(i,0,NaN),c(i,1,NaN);var l=Yv(s,function(h){return h>0})==null;return Is(i,s,!0,!0,e),g_(n,i),l;function u(h){w(n[mn[h]],function(p){if(Bo(p.model)){var d=a.ensureRecord(p.model),v=d.labelInfoList;if(v)for(var m=0;m<v.length;m++){var g=v[m],y=p.scale.normalize(Tn(p.scale,ma(g.label).labelInfo.tick));y=h===1?1-y:y,c(g.rect,h,y),c(g.rect,1-h,NaN)}var _=d.nameLayout;if(_){var y=fa(d.nameLocation)?.5:NaN;c(_.rect,h,y),c(_.rect,1-h,NaN)}}})}function c(h,p,d){var v=r[mn[p]]-h[mn[p]],m=h[uo[p]]+h[mn[p]]-(r[uo[p]]+r[mn[p]]);v=f(v,1-d),m=f(m,d);var g=eM[p][0],y=eM[p][1];s[g]=Se(s[g],v),s[y]=Se(s[y],m)}function f(h,p){return h>0&&!en(p)&&p>1e-4&&(h/=p),h}}function uU(r,t,e,i,n){var a=new o_(fU);return w(e,function(o){return w(o,function(s){if(Bo(s.model)){var l=!i;s.axisBuilder=gE(r,t,s.model,n,a,l)}})}),a}function sM(r,t,e,i,n,a){var o=e===dr.determine;w(t,function(u){return w(u,function(c){Bo(c.model)&&(yE(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[mn[1-u]]=r[uo[u]]<=a.refContainer[uo[u]]*.5?0:1-u===1?2:1}w(t,function(u,c){return w(u,function(f){Bo(f.model)&&((i==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function cU(r,t,e){var i,n=r.get("outerBoundsMode",!0);n==="same"?i=t.clone():(n==null||n==="auto")&&(i=Jr(r.get("outerBounds",!0)||c_,e.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||ce(["all","axisLabel"],a)<0?o="all":o=a;var s=[Qf(Z(r.get("outerBoundsClampWidth",!0),Ec[0]),t.width),Qf(Z(r.get("outerBoundsClampHeight",!0),Ec[1]),t.height)];return{outerBoundsRect:i,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var fU=function(r,t,e,i,n,a){var o=e.axis.dim==="x"?"y":"x";s_(r,t,e,i,n,a),fa(r.nameLocation)||w(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&l_(s.labelInfoList,s.dirVec,i,n)})},lM=aU;function uM(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return hU(e,r,t),e.seriesInvolved&&dU(e,r),e}function hU(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];w(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=vl(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",i);if(w(s.getAxes(),Ae(v,!1,null)),s.getTooltipAxes&&i&&f.get("show")){var h=f.get("trigger")==="axis",p=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||p)&&w(d.baseAxes,Ae(v,p?"cross":!0,h)),p&&w(d.otherAxes,Ae(v,"cross",!1))}function v(m,g,y){var _=y.model.getModel("axisPointer",n),x=_.get("show");if(!(!x||x==="auto"&&!m&&!__(_))){g==null&&(g=_.get("triggerTooltip")),_=m?pU(y,f,n,t,m,g):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),T=vl(y.model),A=g||b||y.type==="category",E=r.axesInfo[T]={key:T,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:g,triggerEmphasis:S,involveSeries:A,snap:b,useHandle:__(_),seriesModels:[],linkGroup:null};u[T]=E,r.seriesInvolved=r.seriesInvolved||A;var M=vU(a,y);if(M!=null){var O=o[M]||(o[M]={axesInfo:{}});O.axesInfo[T]=E,O.mapper=a[M].mapper,E.linkGroup=O}}}})}function pU(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};w(s,function(h){l[h]=ne(o.get(h))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&he(u,f.textStyle)}}return r.model.getModel("axisPointer",new Re(l,e,i))}function dU(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||!i.model||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||w(r.coordSysAxesInfo[vl(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function vU(r,t){for(var e=t.model,i=t.dim,n=0;n<r.length;n++){var a=r[n]||{};if(y_(a[i+"AxisId"],e.id)||y_(a[i+"AxisIndex"],e.componentIndex)||y_(a[i+"AxisName"],e.name))return n}}function y_(r,t){return r==="all"||F(r)&&ce(r,t)>=0||r===t}function cM(r){var t=kd(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=__(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent();(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function kd(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[vl(r)]}function fM(r){var t=kd(r);return t&&t.axisPointerModel}function __(r){return!!r.get(["handle","show"])}function vl(r){return r.type+"||"+r.id}var hM={},mU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.axisPointerClass&&cM(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,i,n,a){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,i){var n=this._axisPointer;n&&n.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,n){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=fM(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,i,n):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){hM[e]=i},t.getAxisPointerClass=function(e){return e&&hM[e]},t.type="axis",t})(nt),Rd=mU;var b_=re();function pM(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=b_(r).splitAreaColors,h=Y(),p=0;if(f)for(var d=0;d<u.length;d++){var v=f.get(u[d].tickValue);if(v!=null){p=(v+(c-1)*d)%c;break}}var m=n.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=F(s)?s:[s];for(var d=1;d<u.length;d++){var y=n.toGlobalCoord(u[d].coord),_=void 0,x=void 0,b=void 0,S=void 0;n.isHorizontal()?(_=m,x=l.y,b=y-_,S=l.height,m=_+b):(_=l.x,x=m,b=l.width,S=y-x,m=x+S);var T=u[d-1].tickValue;T!=null&&h.set(T,p),t.add(new Oe({anid:T!=null?"area_"+T:null,shape:{x:_,y:x,width:b,height:S},style:he({fill:s[p]},g),autoBatch:!0,silent:!0})),p=(p+1)%c}b_(r).splitAreaColors=h}}}function dM(r){b_(r).splitAreaColors=null}var gU=["splitArea","splitLine","minorSplitLine","breakArea"],vM=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,i,n,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ee,this.group.add(this._axisGroup),!!Bo(e)){this._axisGroup.add(e.axis.axisBuilder.group),w(gU,function(l){e.get([l,"show"])&&yU[l](this,this._axisGroup,e,e.getCoordSysModel(),n)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Qg(o,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)}},t.prototype.remove=function(){dM(this)},t.type="cartesianAxis",t})(Rd),yU={splitLine:function(r,t,e,i,n){var a=e.axis;if(!a.scale.isBlank()){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=F(l)?l:[l];for(var f=i.coordinateSystem.getRect(),h=a.isHorizontal(),p=0,d=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],m=[],g=s.getLineStyle(),y=0;y<d.length;y++){var _=a.toGlobalCoord(d[y].coord);if(!(y===0&&!u||y===d.length-1&&!c)){var x=d[y].tickValue;h?(v[0]=_,v[1]=f.y,m[0]=_,m[1]=f.y+f.height):(v[0]=f.x,v[1]=_,m[0]=f.x+f.width,m[1]=_);var b=p++%l.length,S=new Qt({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:m[0],y2:m[1]},style:he({stroke:l[b]},g),silent:!0});fo(S.shape,g.lineWidth),t.add(S)}}}},minorSplitLine:function(r,t,e,i,n){var a=e.axis,o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=i.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],h=[],p=s.getLineStyle(),d=0;d<c.length;d++)for(var v=0;v<c[d].length;v++){var m=a.toGlobalCoord(c[d][v].coord);u?(f[0]=m,f[1]=l.y,h[0]=m,h[1]=l.y+l.height):(f[0]=l.x,f[1]=m,h[0]=l.x+l.width,h[1]=m);var g=new Qt({anid:"minor_line_"+c[d][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:p,silent:!0});fo(g.shape,p.lineWidth),t.add(g)}},splitArea:function(r,t,e,i,n){pM(r,t,e,i)},breakArea:function(r,t,e,i,n){var a=zo(),o=e.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,r,e,i.coordinateSystem.getRect(),n)}},S_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(vM);var mM=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=S_.type,e}return t.type="yAxis",t})(vM);var _U=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new Oe({shape:e.coordinateSystem.getRect(),style:he({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(nt),gM={offset:0};function yM(r){r.registerComponentView(_U),r.registerComponentModel(TE),r.registerCoordinateSystem("cartesian2d",lM),Nd(r,"x",Pd,gM),Nd(r,"y",Pd,gM),r.registerComponentView(S_),r.registerComponentView(mM),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var xU=re();function w_(r,t){return!!xU(r)[t]}Xi({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ze);var SU={axisPointer:1,tooltip:1,brush:1};function _M(r,t,e){var i=t.getComponentByElement(r.topTarget);if(!i||i===e||SU.hasOwnProperty(i.mainType))return!1;var n=i.coordinateSystem;if(!n||n.model===e)return!1;var a=Yi(i),o=Yi(e);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var wU=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i._zr=e;var n=ee(i._mousedownHandler,i),a=ee(i._mousemoveHandler,i),o=ee(i._mouseupHandler,i),s=ee(i._mousewheelHandler,i),l=ee(i._pinchHandler,i);return i.enable=function(u,c){var f=c.zInfo,h=Yi(f.component),p=h.z,d=h.zlevel,v={component:f.component,z:p,zlevel:d,z2:Z(f.z2,-1/0)},m=B({},c.triggerInfo);this._opt=he(B({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:v,triggerInfo:m,cursorGrab:"grab",cursorGrabbing:"grabbing"}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this.disable(),this._enabled=!0,(u===!0||u==="move"||u==="pan")&&(Ic(e,"mousedown",n,v),Ic(e,"mousemove",a,v),Ic(e,"mouseup",o,v)),(u===!0||u==="scale"||u==="zoom")&&(Ic(e,"mousewheel",s,v),Ic(e,"pinch",l,v)))},i.disable=function(){this._enabled&&(this._enabled=!1,Lc(e,"mousedown",n),Lc(e,"mousemove",a),Lc(e,"mouseup",o),Lc(e,"mousewheel",s),Lc(e,"pinch",l))},i}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,i,n){var a=this._opt,o=a.zInfoParsed;if(_M(e,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(e,i,n)),u&&s.isInClip&&!s.isInClip(e,i,n)&&(u=!1),u},t.prototype._decideCursorStyle=function(e,i,n,a){var o=e.target;if(!o&&this._checkPointer(e,i,n))return this._opt.cursorGrab;if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(im(e)||Oc(e))){for(var i=e.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=e.offsetX,a=e.offsetY;this._checkPointer(e,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var i=this._zr;if(!(e.gestureEvent==="pinch"||w_(i,"globalPan")||Oc(e))){var n=e.offsetX,a=e.offsetY;if(!this._dragging||!Fd("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,n,a,!1);o&&i.setCursorStyle(o);return}i.setCursorStyle(this._opt.cursorGrabbing);var s=this._x,l=this._y,u=n-s,c=a-l;this._x=n,this._y=a,this._opt.preventDefaultMouseMove&&Ei(e.event),e.__ecRoamConsumed=!0,xM(this,"pan","moveOnMouseMove",e,{dx:u,dy:c,oldX:s,oldY:l,newX:n,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!Oc(e)){var i=this._zr;if(!im(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&i.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!Oc(e)){var i=Fd("zoomOnMouseWheel",e,this._opt),n=Fd("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!i&&!n)){if(i){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(w_(this._zr,"globalPan")||Oc(e))){var i=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,i,n,a,o){e._checkPointer(a,o.originX,o.originY)&&(Ei(a.event),a.__ecRoamConsumed=!0,xM(e,i,n,a,o))},t})(St);function Oc(r){return r.__ecRoamConsumed}var TU=re();function Bd(r){var t=TU(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Ic(r,t,e,i){for(var n=Bd(r),a=n.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-i.zlevel||l.z-i.z||l.z2-i.z2)<=0)break}o.splice(s,0,{listener:e,zInfoParsed:i}),CU(r,t)}function Lc(r,t,e){for(var i=Bd(r),n=i.roam[t]||[],a=0;a<n.length;a++)if(n[a].listener===e){n.splice(a,1),n.length||AU(r,t);return}}function CU(r,t){var e=Bd(r);e.uniform[t]||r.on(t,e.uniform[t]=function(i){var n=e.roam[t];if(n)for(var a=0;a<n.length;a++)n[a].listener(i)})}function AU(r,t){var e=Bd(r),i=e.uniform;i[t]&&(r.off(t,i[t]),i[t]=null)}function xM(r,t,e,i,n){n.isAvailableBehavior=ee(Fd,null,e,i),r.trigger(t,n)}function Fd(r,t,e){var i=e[r];return!r||i&&(!H(i)||t.event[i+"Key"])}var bM=wU;var SM=Qt.prototype,T_=no.prototype,wM=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),eie=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(wM);function C_(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var DU=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-line",i}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new wM},t.prototype.buildPath=function(e,i){C_(i)?SM.buildPath.call(this,e,i):T_.buildPath.call(this,e,i)},t.prototype.pointAt=function(e){return C_(this.shape)?SM.pointAt.call(this,e):T_.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var i=this.shape,n=C_(i)?[i.x2-i.x1,i.y2-i.y1]:T_.tangentAt.call(this,e);return Ca(n,n)},t})(ve),TM=DU;var A_=["fromSymbol","toSymbol"];function CM(r){return"_"+r+"Type"}function AM(r,t,e){var i=t.getItemVisual(e,r);if(!i||i==="none")return i;var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=nc(n),u=Io(o||0,l);return i+l+u+(a||"")+(s||"")}function DM(r,t,e){var i=t.getItemVisual(e,r);if(!(!i||i==="none")){var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=nc(n),u=Io(o||0,l),c=It(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function EU(r){var t=new TM({name:"line",subPixelOptimize:!0});return D_(t.shape,r),t}function D_(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var MU=(function(r){N(t,r);function t(e,i,n){var a=r.call(this)||this;return a._createLine(e,i,n),a}return t.prototype._createLine=function(e,i,n){var a=e.hostModel,o=e.getItemLayout(i),s=e.getItemVisual(i,"z2"),l=EU(o);l.shape.percent=0,Ot(l,{z2:Z(s,0),shape:{percent:1}},a,i),this.add(l),w(A_,function(u){var c=DM(u,e,i);this.add(c),this[CM(u)]=AM(u,e,i)},this),this._updateCommonStl(e,i,n)},t.prototype.updateData=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(i),l={shape:{}};D_(l.shape,s),Ke(o,l,a,i),w(A_,function(u){var c=AM(u,e,i),f=CM(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=DM(u,e,i);this.add(h)}this[f]=c},this),this._updateCommonStl(e,i,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,f=n&&n.emphasisDisabled,h=n&&n.focus,p=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(i),v=d.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=v.get("disabled"),h=v.get("focus"),p=v.get("blurScope"),c=fr(d)}var m=e.getItemVisual(i,"style"),g=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,w(A_,function(S){var T=this.childOfName(S);if(T){T.setColor(g),T.style.opacity=m.opacity;for(var A=0;A<Jt.length;A++){var E=Jt[A],M=o.getState(E);if(M){var O=M.style||{},L=T.ensureState(E),I=L.style||(L.style={});O.stroke!=null&&(I[T.__isEmptyBrush?"stroke":"fill"]=O.stroke),O.opacity!=null&&(I.opacity=O.opacity)}}T.markRedraw()}},this);var y=a.getRawValue(i);jr(this,c,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(S,T){return a.getFormattedLabel(S,T,e.dataType)}},inheritColor:g||K.color.neutral99,defaultOpacity:m.opacity,defaultText:(y==null?e.getName(i):isFinite(y)?we(y,10):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");F(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),vi(this,h,p,f)},t.prototype.highlight=function(){dn(this)},t.prototype.downplay=function(){vn(this)},t.prototype.updateLayout=function(e,i){this.childOfName("line").stopAnimation(),this.setLinePoints(e.getItemLayout(i))},t.prototype.setLinePoints=function(e){var i=this.childOfName("line");D_(i.shape,e),i.dirty()},t.prototype.beforeUpdate=function(){var e=this,i=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),a=e.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=$l([],f,c);Ca(h,h);function p(M,O){var L=M.__specifiedRotation;if(L==null){var I=l.tangentAt(O);M.attr("rotation",(O===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else M.attr("rotation",L)}if(i&&(i.setPosition(c),p(i,0),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&(n.setPosition(f),p(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var d=void 0,v=void 0,m=a.__labelDistance,g=m[0]*o,y=m[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var T=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var A=-Math.atan2(x[1],x[0]);f[0]<c[0]&&(A=Math.PI+A),a.rotation=A}var E=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":E=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":E=y,v="top";break;default:E=0,v="middle"}switch(a.__position){case"end":a.x=h[0]*g+f[0],a.y=h[1]*y+f[1],d=h[0]>.8?"left":h[0]<-.8?"right":"center",v=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*g+c[0],a.y=-h[1]*y+c[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",v=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*T+c[0],a.y=c[1]+E,d=x[0]<0?"right":"left",a.originX=-g*T,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+E,d="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*T+f[0],a.y=f[1]+E,d=x[0]>=0?"right":"left",a.originX=g*T,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||d})}},t})(Ee),EM=MU;var OU=(function(){function r(t){this.group=new Ee,this._LineCtor=t||EM}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=MM(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=MM(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[];function n(l){!l.isGroup&&!IU(l)&&(l.incremental=i,l.ensureState("emphasis").hoverLayer=co)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(E_(o)){var s=new this._LineCtor(e,a,this._seriesScope);s.traverse(n),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){gn(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,i){var n=t.getItemLayout(e);if(E_(n)){var a=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,i,n,a){var o=t.getItemGraphicEl(i);if(!E_(e.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(e,n,a):o=new this._LineCtor(e,n,a),e.setItemGraphicEl(n,o),this.group.add(o)},r})();function IU(r){return r.animators&&r.animators.length>0}function MM(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:fr(t)}}function OM(r){return isNaN(r[0])||isNaN(r[1])}function E_(r){return r&&!OM(r[0])&&!OM(r[1])}var IM=OU;function En(r,t,e,i,n,a){r=r||0;var o=ln(e[1],-e[0]);if(n!=null&&(n=ml(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(ln(t[1],-t[0]));s=ml(s,[0,o]),n=a=ml(s,[n,a]),i=0}t[0]=ml(t[0],e),t[1]=ml(t[1],e);var l=M_(t,i);t[i]+=r;var u=n||0,c=e.slice();l.sign<0?c[0]=ln(c[0],u):c[1]=ln(c[1],-u),t[i]=ml(t[i],c);var f;return f=M_(t,i),n!=null&&(f.sign!==l.sign||f.span<n)&&(t[1-i]=ln(t[i],l.sign*n)),f=M_(t,i),a!=null&&f.span>a&&(t[1-i]=ln(t[i],f.sign*a)),t}function M_(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ml(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Ho=re(),LM=ne,O_=ee,LU=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Ee,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var h=Ae(PM,e,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}kM(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&bi(n).w>s)return!0;if(o){var l=kd(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=Ho(t).pointerEl=new ot[a.type](LM(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=Ho(t).labelEl=new He(LM(e.label));t.add(a),NM(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=Ho(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=Ho(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),NM(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=po(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ei(u.event)},onmousedown:O_(this._onHandleDragMove,this,0,0),drift:O_(this._onHandleDragMove,this),ondragend:O_(this._onHandleDragEnd,this)}),i.add(n)),kM(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");F(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,sa(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){PM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,I_(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(I_(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(I_(n)),Ho(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Eo(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r})();function PM(r,t,e,i){RM(Ho(e).lastProp,i)||(Ho(e).lastProp=i,t?Ke(e,i,r):(e.stopAnimation(),e.attr(i)))}function RM(r,t){if(W(r)&&W(t)){var e=!0;return w(t,function(i,n){e=e&&RM(r[n],i)}),!!e}else return r===t}function NM(r,t){r[t.get(["label","show"])?"show":"hide"]()}function I_(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function kM(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}var FM=LU;function BM(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function PU(r,t,e,i,n){var a=e.get("value"),o=L_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Wi(s.get("padding")||0),u=s.getFont(),c=Wf(o,u),f=n.position,h=c.width+l[1]+l[3],p=c.height+l[0]+l[2],d=n.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var v=n.verticalAlign;v==="bottom"&&(f[1]-=p),v==="middle"&&(f[1]-=p/2),NU(f,h,p,i);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Lr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function NU(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function L_(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:cl(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};w(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),H(o)?a=o.replace("{value}",a):j(o)&&(a=o(s))}return a}function P_(r,t,e){var i=kt();return Da(i,i,e.rotation),Qo(i,i,e.position),ho([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function zM(r,t,e,i,n,a){var o=Md.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),PU(t,i,n,a,{position:P_(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function VM(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function UM(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function HM(r,t,e){return bi(r,{fromStat:{sers:U(t,function(i){return e.getSeriesByIndex(i.seriesIndex)})},min:1}).w}function GM(r,t,e){return[Se(Xe(t[0],t[1]),r-e/2),Xe(r+e/2,Se(t[0],t[1]))]}var kU=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),c=s.getGlobalExtent(),f=WM(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var p=BM(a),d=RU[u](s,h,c,f,a.get("seriesDataIndices"),a.ecModel);d.style=p,e.graphicKey=d.type,e.pointer=d}var v=Ac(l.getRect(),n);zM(i,e,v,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Ac(i.axis.grid.getRect(),i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=P_(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=WM(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=i[c],f[c]=Xe(l[1],f[c]),f[c]=Se(l[0],f[c]);var h=(u[1]+u[0])/2,p=[h,h];p[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:p,tooltipOption:d[c]}},t})(FM);function WM(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var RU={line:function(r,t,e,i){var n=VM([t,i[0]],[t,i[1]],ZM(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e,i,n,a){var o=HM(r,n,a),s=i[1]-i[0],l=GM(t,e,o),u=l[0],c=l[1];return{type:"Rect",shape:UM([u,i[0]],[c-u,s],ZM(r))}}};function ZM(r){return r.dim==="x"?0:1}var XM=kU;var FU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return 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:K.color.border,width:1,type:"dashed"},shadowStyle:{color:K.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:K.color.neutral00,padding:[5,7,5,7],backgroundColor:K.color.accent60,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:K.color.accent40,throttle:40}},t})(Le),KM=FU;var Mn=re(),BU=w;function zd(r,t,e){if(!fe.node){var i=t.getZr();Mn(i).records||(Mn(i).records={}),zU(i,t);var n=Mn(i).records[r]||(Mn(i).records[r]={});n.handler=e}}function zU(r,t){if(Mn(r).initialized)return;Mn(r).initialized=!0,e("click",Ae(N_,"click")),e("mousemove",Ae(N_,"mousemove")),e("mousewheel",Ae(N_,"mousewheel")),e("globalout",UU);function e(i,n){r.on(i,function(a){var o=HU(t);BU(Mn(r).records,function(s){s&&n(s,a,o.dispatchAction)}),VU(o.pendings,t)})}}function VU(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function UU(r,t,e){r.handler("leave",null,e)}function N_(r,t,e,i){t.handler(r,e,i)}function HU(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function Pc(r,t){if(!fe.node){var e=t.getZr(),i=(Mn(e).records||{})[r];i&&(Mn(e).records[r]=null)}}var GU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click|mousewheel";zd("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){Pc("axisPointer",i)},t.prototype.dispose=function(e,i){Pc("axisPointer",i)},t.type="axisPointer",t})(nt),$M=GU;function Nc(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Zr(a,r);if(o==null||o<0||F(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,p=f==="x"||f==="radius"?1:0,d=a.mapDimension(h),v=[];v[p]=a.get(d,o),v[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(v)||[]}else e=l.dataToPoint(a.getValues(U(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),e=[m.x+m.width/2,m.y+m.height/2]}return{point:e,el:s}}var jM=re();function k_(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||ee(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Vd(n)&&(n=Nc({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Vd(n),u=a.axesInfo,c=s.axesInfo,f=i==="leave"||Vd(n),h={},p={},d={list:[],map:{}},v={showPointer:Ae(WU,p),showTooltip:Ae(ZU,d)};w(s.coordSysMap,function(g,y){var _=l||g.containPoint(n);w(s.coordSysAxesInfo[y],function(x,b){var S=x.axis,T=$U(u,x);if(!f&&_&&(!u||T)){var A=T&&T.value;A==null&&!l&&(A=S.pointToData(n)),A!=null&&JM(x,A,v,!1,h)}})});var m={};return w(c,function(g,y){var _=g.linkGroup;_&&!p[y]&&w(_.axesInfo,function(x,b){var S=p[b];if(x!==g&&S){var T=S.value;_.mapper&&(T=g.axis.scale.parse(_.mapper(T,QM(x),QM(g)))),m[g.key]=T}})}),w(m,function(g,y){JM(c[y],g,v,!0,h)}),XU(p,c,h),KU(d,n,r,o),qU(c,o,e),h}}function JM(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=YU(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function YU(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return w(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),f,h;if(l.getAxisTooltipData){var p=l.getAxisTooltipData(c,r,e);h=p.dataIndices,f=p.nestestValue}else{if(h=l.indicesOfNearest(i,c[0],r,e.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(gt(f)){var d=r-f,v=Math.abs(d);v<=o&&((v<o||d>=0&&s<0)&&(o=v,s=d,n=f,a.length=0),w(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:n}}function WU(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function ZU(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=vl(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function XU(r,t,e){var i=e.axesInfo=[];w(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function KU(r,t,e,i){if(Vd(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function qU(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=jM(i)[n]||{},o=jM(i)[n]={};w(r,function(c,f){var h=c.axisPointerModel.option;h.status==="show"&&c.triggerEmphasis&&w(h.seriesDataIndices,function(p){o[p.seriesIndex+"|"+p.dataIndex]=p})});var s=[],l=[];function u(c){return{seriesIndex:c.seriesIndex,dataIndex:c.dataIndex}}w(a,function(c,f){!o[f]&&l.push(u(c))}),w(o,function(c,f){!a[f]&&s.push(u(c))}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function $U(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function QM(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function Vd(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ud(r){Rd.registerAxisPointerClass("CartesianAxisPointer",XM),r.registerComponentModel(KM),r.registerComponentView($M),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=uM(t,e)}}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},k_)}function R_(r){Pt(yM),Pt(Ud)}var F_=["x","y","radius","angle","single"],jU=re(),JU=["cartesian2d","polar","singleAxis"];function eO(r){var t=r.get("coordinateSystem");return ce(JU,t)>=0}function ni(r){return r+"Axis"}function tO(r,t){var e=Y(),i=[],n=Y();r.eachComponent({mainType:"dataZoom",query:t},function(c){n.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!n.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){n.set(c.uid,!0),i.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,p){var d=e.get(h);d&&d[p]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(e.get(f)||e.set(f,[]))[h]=!0})}return i}function Hd(r){var t=r.ecModel,e={infoList:[],infoMap:Y()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(ni(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}function rO(r){var t=jU(Mp(r));return t.axisProxyMap||(t.axisProxyMap=Y())}function gl(r){if(r)return rO(r.ecModel).get(r.uid)}function iO(r,t){rO(r.ecModel).set(r.uid,t)}function Gd(r,t){var e=t.getAxisModel().axis.__alignTo;return e&&r.getAxisProxy(e.dim,e.model.componentIndex)?gl(e.model):null}var B_=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),QU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=nO(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=nO(e);me(this.option,e,!0),me(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=Y(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return w(F_,function(n){var a=this.getReferringComponents(ni(n),RS);if(a.specified){i=!0;var o=new B_;w(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new B_;if(h.add(f.componentIndex),e.set(c,h),a=!1,c==="x"||c==="y"){var p=f.getReferringComponents("grid",at).models[0];p&&w(u,function(d){f.componentIndex!==d.componentIndex&&p===d.getReferringComponents("grid",at).models[0]&&h.add(d.componentIndex)})}}}a&&w(F_,function(u){if(a){var c=n.findComponents({mainType:ni(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new B_;f.add(c[0].componentIndex),e.set(u,f),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(ni(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){w(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){return gl(this.getAxisModel(e,i))},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(ni(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;w(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,i).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return gl(e);for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var o=n[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},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})(Le);function nO(r){var t={};return w(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var yl=QU;var eH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.dataZoomModel=e,this.ecModel=i,this.api=n},t.type="dataZoom",t})(nt),Yd=eH;var tH=(function(){function r(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getWindow=function(){return ne(this._window)},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(eO(e)){var i=ni(this._dimName),n=e.getReferringComponents(i,at).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ne(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._extent,i=this.getAxisModel().axis,n=i.scale,a=this._dataZoomModel,o=a.getRangePropMode(),s=[0,100],l=[],u=[],c,f=[!1,!1];w(["start","end"],function(_,x){var b=t[_],S=t[_+"Value"];o[x]==="percent"?(b==null&&(b=s[x]),S=$e(b,s,e),f[x]=!0):(c=!0,S==null?S=e[x]:(S=n.parse(S),n.sanitize&&(S=n.sanitize(S,e))),b=$e(S,e,s)),u[x]=S==null||isNaN(S)?e[x]:S,l[x]=b==null||isNaN(b)?s[x]:b}),Ct(u),Ct(l);var h=this._minMaxSpan;c?p(u,l,e,s,!1):p(l,u,s,e,!0);function p(_,x,b,S,T){var A=T?"Span":"ValueSpan";En(0,_,b,"all",h["min"+A],h["max"+A]);for(var E=0;E<2;E++)x[E]=$e(_[E],b,S,!0),T&&(x[E]=x[E],f[E]=!0);ms(x)}var d=lt(n)||Ki(n),v=i.getExtent(),m=Ge(v[1]-v[0]),g=d?0:eh(u,m,.5);w([[0,Li],[1,sr]],function(_){var x=_[0],b=_[1];!f[x]||!isFinite(g)||(u[x]=we(u[x],g),u[x]=Xe(e[1],Se(e[0],u[x])),l[x]===s[x]&&(u[x]=e[x],d&&(u[x]=b(u[x]))))}),ms(u);var y=[$e(u[0],e,s,!0),$e(u[1],e,s,!0)];return ms(y),{value:u,percent:l,percentInverted:y,valuePrecision:g}},r.prototype.reset=function(t,e){if(this.hostedBy(t)){var i=this.getAxisModel().axis;md(i,pD);var n=i.scale.rawExtentInfo;this._extent=n.makeNoZoom(),this._updateMinMaxSpan();var a=t.settledOption;e&&(a=he({start:e[0],end:e[1]},a));var o=this._window=this.calculateDataWindow(a),s=o.percent,l=o.value;s[0]!==0&&n.setZoomMM(0,l[0]),s[1]!==100&&n.setZoomMM(1,l[1])}},r.prototype.filterData=function(t,e){if(!this.hostedBy(t))return;var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._window.value;if(a==="none")return;w(n,function(l){var u=l.getData(),c=u.mapDimensionsAll(i);if(c.length){if(a==="weakFilter"){var f=u.getStore(),h=U(c,function(p){return u.getDimensionIndex(p)},u);u.filterSelf(function(p){for(var d,v,m,g=0;g<c.length;g++){var y=f.get(h[g],p),_=!isNaN(y),x=y<o[0],b=y>o[1];if(_&&!x&&!b)return!0;_&&(m=!0),x&&(d=!0),b&&(v=!0)}return m&&d&&v})}else w(c,function(p){if(a==="empty")l.setData(u=u.map(p,function(v){return s(v)?v:NaN}));else{var d={};d[p]=o,u.selectRange(d)}});w(c,function(p){u.setApproximateExtent(o,p)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._extent;w(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=$e(i[0]+o,i,[0,100],!0):a!=null&&(o=$e(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r})(),aO=tH;var rH={dirtyOnOverallProgress:!0,getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(ni(o),s);n(o,s,l,a)})})}var e=[];t(function(n,a,o,s){if(!gl(o)){var l=new aO(n,a,s,r);e.push(l),iO(o,l)}});var i=Y();return w(e,function(n){w(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){var i=[];e.eachTargetAxis(function(n,a){var o=e.getAxisProxy(n,a),s=Gd(e,o);s?i.push([o,s]):o.reset(e,null)}),w(i,function(n){n[0].reset(e,n[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getWindow(),a=n.percent,o=n.value;e.setCalculatedRange({start:a[0],end:a[1],startValue:o[0],endValue:o[1]})}})}},oO=rH;function z_(r){r.registerAction("dataZoom",function(t,e){var i=tO(e,t);w(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var iH=gs();function kc(r){iH(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,oO),z_(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function sO(r,t){var e=Wi(t.get("padding")),i=t.getItemStyle(["color","opacity"]);i.fill=t.get("backgroundColor");var n=new Oe({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1});return n}var nH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:K.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:K.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:K.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:K.color.tertiary,fontSize:14}},t})(Le),lO=nH;function Wd(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function uO(r){if(fe.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e<i;e++)if(r[e]in t)return r[e]}}var V_=uO(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cO=uO(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function U_(r,t){if(!r)return t;t=zs(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function fO(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?t?e[t]:e:null}var aH=U_(cO,"transition"),H_=U_(V_,"transform"),oH="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(fe.transform3dSupported?"will-change:transform;":"");function sH(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function lH(r,t,e){if(!H(e)||e==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");t=gi(t);var a=sH(e),o=Math.max(Math.round(n)*1.5,6),s="",l=H_+":",u;ce(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+n,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),p=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-f)/2)*100)/100;s+=";"+a+":-"+p+"px";var d=t+" solid "+n+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'<div style="'+v.join("")+'"></div>'}function uH(r,t,e){var i="cubic-bezier(0.23,1,0.32,1)",n="",a="";return e&&(n=" "+r/2+"s "+i,a="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+i,a+=(a.length?",":"")+(fe.transformSupported?""+H_+n:",left"+n+",top"+n)),aH+":"+a}function hO(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!fe.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=fe.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+H_+":"+o+";":[["top",0],["left",0],[V_,o]]}function cH(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=Z(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),w(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function fH(r,t,e,i){var n=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=xp(r,"html"),p=u+"px "+c+"px "+s+"px "+l;return n.push("box-shadow:"+p),t&&a>0&&n.push(uH(a,e,i)),o&&n.push("background-color:"+o),w(["width","color","radius"],function(d){var v="border-"+d,m=zs(v),g=r.get(m);g!=null&&n.push(v+":"+g+(d==="color"?"":"px"))}),n.push(cH(f)),h!=null&&n.push("padding:"+Wi(h).join("px ")+"px"),n.join(";")+";"}function pO(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&vb(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var hH=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,fe.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(H(a)?document.querySelector(a):ba(a)?a:j(a)&&a(t.getDom()));pO(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();ar(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=fO(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=oH+fH(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+hO(a[0],a[1],!0)+("border-color:"+gi(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(H(a)&&i.get("trigger")==="item"&&!Wd(i)&&(s=lH(i,n,a)),H(t))o.innerHTML=t+s;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var l=0;l<t.length;l++)ba(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var i=this._styleCoord;if(pO(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var n=this.el.style,a=hO(i[0],i[1]);w(a,function(o){n[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",fe.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;mb(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var i=e.parentNode;i&&i.removeChild(e)}this.el=this._container=null},r})(),dO=hH;var pH=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),mO(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,i,n,a){var o=this;W(t)&&Et(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new He({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:xp(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),w(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),w(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=vO(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},r.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;mO(n,this._zr,t,e),t=n[0],e=n[1];var a=i.style,o=ga(a.borderWidth||0),s=vO(a);i.x=t+o+s.left,i.y=e+o+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function ga(r){return Math.max(0,r)}function vO(r){var t=ga(r.shadowBlur||0),e=ga(r.shadowOffsetX||0),i=ga(r.shadowOffsetY||0);return{left:ga(t-e),right:ga(t+e),top:ga(t-i),bottom:ga(t+i)}}function mO(r,t,e,i){r[0]=e,r[1]=i,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var gO=pH;var dH=new Oe({shape:{x:-1,y:-1,width:2,height:2}}),vH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){if(!(fe.node||!i.getDom())){var n=e.getComponent("tooltip"),a=this._renderMode=zS(n.get("renderMode"));this._tooltipContent=a==="richText"?new gO(i):new dO(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,i,n){if(!(fe.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?sa(this,"_updatePosition",50,"fixRate"):Eo(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,i=e.get("triggerOn");zd("itemTooltip",this._api,ee(function(n,a,o){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(e.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||fe.node||!n.getDom())){var o=yO(a,n);this._ticket="";var s=a.dataByCoordSys,l=_H(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=dH;c.x=a.x,c.y=a.y,c.update(),_e(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var f=Nc(a,i),h=f.point[0],p=f.point[1];h!=null&&p!=null&&this._tryShow({offsetX:h,offsetY:p,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,a.from!==this.uid&&this._hide(yO(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var c=u.getData(),f=Rc([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=_e(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var l,u;Mo(n,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(_e(c).dataIndex!=null?l=c:_e(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=ee(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Rc([i.tooltipOption],a),l=this._renderMode,u=[],c=Zi("section",{blocks:[],noHeader:!0}),f=[],h=new bp;w(e,function(y){w(y.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value,S=x.axis,T=S.scale.parse(b);if(!(!x||b==null)){var A=L_(b,S,n,_.seriesDataIndices,_.valueLabelOpt),E=Zi("section",{header:A,noHeader:!Dt(A),sortBlocks:!0,blocks:[]});c.blocks.push(E),w(_.seriesDataIndices,function(M){var O=n.getSeriesByIndex(M.seriesIndex),L=M.dataIndexInside,I=O.getDataParams(L);if(!(I.dataIndex<0)){I.axisDim=_.axisDim,I.axisIndex=_.axisIndex,I.axisType=_.axisType,I.axisId=_.axisId,I.axisValue=cl(x.axis,{value:T}),I.axisValueLabel=A,I.marker=h.makeTooltipMarker("item",gi(I.color),l);var k=Ny(O.formatTooltip(L,!0,null)),z=k.frag;if(z){var V=Rc([O],a).get("valueFormatter");E.blocks.push(V?B({valueFormatter:V},z):z)}k.text&&f.push(k.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var p=i.position,d=s.get("order"),v=Vy(c,h,l,d,n.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var m=l==="richText"?`
|
|
16
|
+
`];function Zi(r,t){return t.type=r,t}function By(r){return r.type==="section"}function $C(r){return By(r)?H2:G2}function JC(r){if(By(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return w(r.blocks,function(n){var a=JC(n);a>=t&&(t=a+ +(i&&(!a||By(n)&&!n.noHeader)))}),t}return 0}function H2(r,t,e,i){var n=t.noHeader,a=Y2(JC(t)),o=[],s=t.blocks||[];ft(!s||F(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(We(u,l)){var c=new VC(u[l],null);s.sort(function(v,m){return c.evaluate(v.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(v,m){var g=t.valueFormatter,y=$C(v)(g?B(B({},r),{valueFormatter:g}):r,v,m>0?a.html:0,i);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(a.richText):zy(i,o.join(""),n?e:a.html);if(n)return f;var h=Qh(t.header,"ordinal",r.useUTC),p=jC(i,r.renderMode).nameStyle,d=qC(i);return r.renderMode==="richText"?QC(r,h,p)+a.richText+f:zy(i,'<div style="'+p+";"+d+';">'+wt(h)+"</div>"+f,e)}function G2(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(x){return x=F(x)?x:[x],U(x,function(b,S){return Qh(b,F(p)?p[S]:p,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||K.color.secondary,n),h=a?"":Qh(l,"ordinal",u),p=t.valueType,d=o?[]:c(t.value,t.rawDataIndex),v=!s||!a,m=!s&&a,g=jC(i,n),y=g.nameStyle,_=g.valueStyle;return n==="richText"?(s?"":f)+(a?"":QC(r,h,y))+(o?"":X2(r,d,v,m,_)):zy(i,(s?"":f)+(a?"":W2(h,!s,y))+(o?"":Z2(d,v,m,_)),e)}}function Vy(r,t,e,i,n,a){if(r){var o=$C(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function Y2(r){return{html:V2[r],richText:U2[r]}}function zy(r,t,e){var i='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",a=qC(r);return'<div style="'+n+";"+a+';">'+t+i+"</div>"}function W2(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+wt(r)+"</span>"}function Z2(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=F(r)?r:[r],'<span style="'+a+";"+i+'">'+U(r,function(o){return wt(o)}).join(" ")+"</span>"}function QC(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function X2(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(F(t)?t.join(" "):t,a)}function e1(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return gi(i)}function xp(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var bp=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=_u()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=ep({color:e,type:t,renderMode:i,markerId:n});return H(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};F(e)?w(e,function(a){return B(i,a)}):B(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r})();function t1(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=F(s),u=e1(t,e),c,f,h,p;if(o>1||l&&!o){var d=K2(s,t,e,a,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,p=d.inlineValues[0]}else if(o){var v=n.getDimensionInfo(a[0]);p=c=xn(n,e,a[0]),f=v.type}else p=c=l?s[0]:s;var m=vs(t),g=m&&t.name||"",y=n.getName(e),_=i?g:y;return Zi("section",{header:g,noHeader:i||!m,sortParam:p,blocks:[Zi("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Dt(_),value:c,valueType:f,rawDataIndex:n.getRawIndex(e)})].concat(h||[])})}function K2(r,t,e,i,n){var a=t.getData(),o=zt(r,function(f,h,p){var d=a.getDimensionInfo(p);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?w(i,function(f){c(xn(a,e,f),f)}):w(r,c);function c(f,h){var p=a.getDimensionInfo(h);!p||p.otherDims.tooltip===!1||(o?u.push(Zi("nameValue",{markerType:"subItem",markerColor:n,name:p.displayName,value:f,valueType:p.type})):(s.push(f),l.push(p.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var oa=re();function Sp(r,t){return r.getName(t)||r.getId(t)}var q2="__universalTransitionEnabled",wp=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=aa({count:$2,reset:J2}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=oa(this).sourceManager=new KC(this);a.prepareSource();var o=this.getInitialData(e,n);i1(o,this),this.dataTask.context.data=o,oa(this).dataBeforeProcessed=o,r1(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=ia(this),a=n?Qr(e):{},o=this.subType;Le.hasClass(o)&&(o+="Series"),me(e,i.getTheme().get(this.subType)),me(e,this.getDefaultOption()),Su(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Nr(e,a,n)},t.prototype.mergeOption=function(e,i){e=me(this.option,e,!0),this.fillDataTextStyle(e.data);var n=ia(this);n&&Nr(this.option,e,n);var a=oa(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);i1(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,oa(this).dataBeforeProcessed=o,r1(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!rt(e))for(var i=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Su(e[n],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){var i=this.getRawData();i.appendData(e.data)},t.prototype.getData=function(e){var i=Uy(this);if(i){var n=i.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return oa(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var i=Uy(this);if(i){var n=i.context;n.outputData=e,i!==this.dataTask&&(n.data=e)}oa(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Y(e)},t.prototype.getSourceManager=function(){return oa(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return oa(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,i,n,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(e);if(!s||!l)return[];var u=l.dataToCoord(n);a==null&&(a=1/0);for(var c=[],f=1/0,h=-1,p=0,d=o.getDimensionIndex(i),v=o.getStore(),m=0,g=v.count();m<g;m++){var y=v.get(d,m),_=l.dataToCoord(y),x=u-_,b=Math.abs(x);b<=a&&((b<f||b===f&&x>=0&&h<0)&&(f=b,h=x,p=0),x===h&&(c[p++]=m))}return c.length=p,c},t.prototype.formatTooltip=function(e,i,n){return t1({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fe.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=Zu.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},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,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Sp(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,i){for(var n=[],a=0;a<e.length;a++)n[0]=e[a],this.isSelected(e[a],i)?this.unselect(n,i):this.select(n,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=De(e),n=[],a=0;a<i.length;a++){var o=e[i[a]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[Sp(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[q2])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){W(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=i[c],h=Sp(e,f);u[h]=!0,this._selectedDataIndicesMap[h]=e.getRawIndex(f)}}else if(s==="single"||s===!0){var p=i[l-1],h=Sp(e,p);o.selectedMap=(n={},n[h]=!0,n),this._selectedDataIndicesMap=(a={},a[h]=e.getRawIndex(p),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(n){var a=e.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return Le.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})(Le);mt(wp,Ju);mt(wp,Zu);ih(wp,Le);function r1(r){var t=r.name;vs(r)||(r.name=j2(r)||t)}function j2(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return w(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function $2(r){return r.model.getRawData().count()}function J2(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),Q2}function Q2(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function i1(r,t){w(Zv(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,Ae(eF,t))})}function eF(r,t){var e=Uy(r);return e&&e.setOutputEnd((t||this).count()),t}function Uy(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var tr=wp;var Hy=(function(){function r(){this.group=new Ee,this.uid=ta("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();xs(Hy);Xn(Hy);var nt=Hy;function Ao(){var r=re();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var o1=re(),tF=Ao(),Gy=(function(){function r(){this.group=new Ee,this.uid=ta("viewChart"),this.renderTask=aa({plan:rF,reset:iF}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&a1(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&a1(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){gn(this.group,t)},r.markUpdateMethod=function(t,e){o1(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function n1(r,t,e){r&&ku(r)&&(t==="emphasis"?dn:vn)(r,e)}function a1(r,t,e){var i=Zr(r,t),n=t&&t.highlightKey!=null?Qw(t.highlightKey):null;i!=null?w(Qe(i),function(a){n1(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){n1(a,e,n)})}xs(Gy,["dispose"]);Xn(Gy);function rF(r){return tF(r.model)}function iF(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&o1(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),nF[l]}var nF={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ft=Gy;var Tp="\0__throttleOriginMethod",s1="\0__throttleRate",l1="\0__throttleType";function Do(r,t,e){var i,n=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];i=new Date().getTime(),l=this,u=p;var v=c||t,m=c||e;c=null,s=i-(m?n:a)-v,clearTimeout(o),m?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),n=i};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(p){c=p},h}function sa(r,t,e,i){var n=r[t];if(n){var a=n[Tp]||n,o=n[l1],s=n[s1];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=Do(a,e,i==="debounce"),n[Tp]=a,n[l1]=i,n[s1]=e}return n}}function Eo(r,t){var e=r[t];e&&e[Tp]&&(e.clear&&e.clear(),r[t]=e[Tp])}var u1=re(),c1={itemStyle:Pi(ay,!0),lineStyle:Pi(ny,!0)},aF={lineStyle:"stroke",itemStyle:"fill"};function f1(r,t){var e=r.visualStyleMapper||c1[t];return e||(console.warn("Unknown style type '"+t+"'."),c1.itemStyle)}function h1(r,t){var e=r.visualDrawType||aF[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var p1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=f1(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=h1(r,i),u=o[l],c=$(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(p,d){var v=r.getDataParams(d),m=B({},o);m[l]=c(v),p.setItemVisual(d,"style",m)}}}},ec=new Re,d1={createOnAllSeries:!0,reset:function(r,t){if(!r.ignoreStyleOnData){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=f1(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){ec.option=l[i];var u=n(ec),c=o.ensureUniqueItemVisual(s,"style");B(c,u),ec.option.decal&&(o.setItemVisual(s,"decal",ec.option.decal),ec.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},v1={performRawSeries:!0,overallReset:function(r){var t=Y();r.eachSeries(function(e){if(!e.isColorBySeries()){var i=e.type+"-"+e.getColorBy();u1(e).scope=t.get(i)||t.set(i,{})}}),r.eachSeries(function(e){if(!e.isColorBySeries()){var i=e.getRawData(),n={},a=e.getData(),o=u1(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=h1(e,s);a.each(function(u){var c=a.getRawIndex(u);n[c]=u}),i.each(function(u){var c=n[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),p=i.getName(u)||u+"",d=i.count();h[l]=e.getColorFromPalette(p,o,d)}})}})}};var Cp=Math.PI;function Wy(r,t){t=t||{},he(t,{text:"loading",textColor:K.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:K.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Ee,i=new Oe({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new He({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 Oe({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new ao({shape:{startAngle:-Cp/2,endAngle:-Cp/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Cp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Cp*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var oF=(function(){function r(t,e,i,n){this._stageTaskMap=Y(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.__preparePipelineContext?t.__preparePipelineContext(e,i):rh(t,e,i);t.pipelineContext=i.context=n},r.prototype.restorePipelines=function(t,e){var i=this,n=i._pipelineMap=Y();e.eachSeries(function(a){var o=t.painter.type==="canvas"&&a.getProgressive(),s=a.uid;n.set(s,{id:s,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:o&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),i._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;w(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";ft(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;w(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var p,d=h.agentStubMap;d.each(function(m){s(n,m)&&(m.dirty(),p=!0)}),p&&h.dirty(),o.updatePayload(h,i);var v=o.getPerformArgs(h,n.block);d.each(function(m){m.perform(v)}),h.perform(v)&&(a=!0)}else f&&f.each(function(m,g){s(n,m)&&m.dirty();var y=o.getPerformArgs(m,n.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(m.context.model),o.updatePayload(m,i),m.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Y(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,n).each(c);function c(f){var h=f.uid,p=s.set(h,o&&o.get(h)||aa({plan:fF,reset:hF,count:dF}));p.context={model:f,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,p)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||aa({reset:sF});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Y(),u=t.seriesType,c=t.getTargetSeries,f=t.dirtyOnOverallProgress,h=!1,p="";ft(!t.createOnAllSeries,p),u?i.eachRawSeriesByType(u,d):c?c(i,n).each(d):w(i.getSeries(),d);function d(v){var m=v.uid,g=l.set(m,s&&s.get(m)||(h=!0,aa({reset:lF,onDirty:cF})));g.context={model:v,dirtyOnOverallProgress:f},g.agent=o,g.__block=f,a._pipe(v,g)}h&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return $(t)&&(t={overallReset:t,seriesType:vF(t)}),t.uid=ta("stageHandler"),e&&(t.visualType=e),t},r})();function sF(r){r.overallReset(r.ecModel,r.api,r.payload)}function lF(r){return r.dirtyOnOverallProgress&&uF}function uF(){this.agent.dirty(),this.getDownstream().dirty()}function cF(){this.agent&&this.agent.dirty()}function fF(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function hF(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Qe(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?U(t,function(e,i){return m1(i)}):pF}var pF=m1(0);function m1(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(t,i)}}function dF(r){return r.data.count()}function vF(r){Ap=null;try{r(tc,g1)}catch{}return Ap}var tc={},g1={},Ap;y1(tc,fp);y1(g1,hh);tc.eachSeriesByType=tc.eachRawSeriesByType=function(r){Ap=r};tc.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Ap=r.subType)};function y1(r,t){for(var e in t.prototype)r[e]=Ze}var Zy=oF;var J=K.darkColor,_1=J.background,rc=function(){return{axisLine:{lineStyle:{color:J.axisLine}},splitLine:{lineStyle:{color:J.axisSplitLine}},splitArea:{areaStyle:{color:[J.backgroundTint,J.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:J.axisMinorSplitLine}},axisLabel:{color:J.axisLabel},axisName:{}}},x1={label:{color:J.secondary},itemStyle:{borderColor:J.borderTint},dividerLineStyle:{color:J.border}},b1={darkMode:!0,color:J.theme,backgroundColor:_1,axisPointer:{lineStyle:{color:J.border},crossStyle:{color:J.borderShade},label:{color:J.tertiary}},legend:{textStyle:{color:J.secondary},pageTextStyle:{color:J.tertiary}},textStyle:{color:J.secondary},title:{textStyle:{color:J.primary},subtextStyle:{color:J.quaternary}},toolbox:{iconStyle:{borderColor:J.accent50},feature:{dataView:{backgroundColor:_1,textColor:J.primary,textareaColor:J.background,textareaBorderColor:J.border,buttonColor:J.accent50,buttonTextColor:J.neutral00}}},tooltip:{backgroundColor:J.neutral20,defaultBorderColor:J.border,textStyle:{color:J.tertiary}},dataZoom:{borderColor:J.accent10,textStyle:{color:J.tertiary},brushStyle:{color:J.backgroundTint},handleStyle:{color:J.neutral00,borderColor:J.accent20},moveHandleStyle:{color:J.accent40},emphasis:{handleStyle:{borderColor:J.accent50}},dataBackground:{lineStyle:{color:J.accent30},areaStyle:{color:J.accent20}},selectedDataBackground:{lineStyle:{color:J.accent50},areaStyle:{color:J.accent30}}},visualMap:{textStyle:{color:J.secondary},handleStyle:{borderColor:J.neutral30}},timeline:{lineStyle:{color:J.accent10},label:{color:J.tertiary},controlStyle:{color:J.accent30,borderColor:J.accent30}},calendar:{itemStyle:{color:J.neutral00,borderColor:J.neutral20},dayLabel:{color:J.tertiary},monthLabel:{color:J.secondary},yearLabel:{color:J.secondary}},matrix:{x:x1,y:x1,backgroundColor:{borderColor:J.axisLine},body:{itemStyle:{borderColor:J.borderTint}}},timeAxis:rc(),logAxis:rc(),valueAxis:rc(),categoryAxis:rc(),line:{symbol:"circle"},graph:{color:J.theme},gauge:{title:{color:J.secondary},axisLine:{lineStyle:{color:[[1,J.neutral05]]}},axisLabel:{color:J.axisLabel},detail:{color:J.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:J.background}},radar:(function(){var r=rc();return r.axisName={color:J.axisLabel},r.axisLine.lineStyle.color=J.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:J.neutral20,textStyle:{color:J.secondary}},emphasis:{itemStyle:{color:J.neutral30}}}},sunburst:{itemStyle:{borderColor:J.background}},map:{itemStyle:{borderColor:J.border,areaColor:J.neutral10},label:{color:J.tertiary},emphasis:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}},select:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}}},geo:{itemStyle:{borderColor:J.border,areaColor:J.neutral10},emphasis:{label:{color:J.primary},itemStyle:{areaColor:J.highlight}},select:{label:{color:J.primary},itemStyle:{color:J.highlight}}}};b1.categoryAxis.splitLine.show=!1;var S1=b1;var w1=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},i={},n={};if(H(t)){var a=lr(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};w(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],p=u.lastIndexOf(h);if(p>0&&p===u.length-h.length){var d=u.slice(0,p);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function c(f,h,p,d){return f[p]==null||h[d||p]===f[p]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})();var Xy=["symbol","symbolSize","symbolRotate","symbolOffset"],T1=Xy.concat(["symbolKeepAspect"]),C1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o<Xy.length;o++){var s=Xy[o],l=r.get(s);$(l)?(a=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),t.isSeriesFiltered(r))return;var u=De(n);function c(f,h){for(var p=r.getRawValue(h),d=r.getDataParams(h),v=0;v<u.length;v++){var m=u[v];f.setItemVisual(h,m,n[m](p,d))}}return{dataEach:a?c:null}}},A1={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function i(n,a){for(var o=n.getItemModel(a),s=0;s<T1.length;s++){var l=T1[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?i:null}}};function D1(r,t,e){switch(e){case"color":var i=r.getItemVisual(t,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e);default:}}function qs(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t);default:}}function js(r,t,e,i,n){var a=r+t;e.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=Zr(f,n.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:F(h)?f.getName(h[0]):f.getName(h),selected:H(l)?l:B({},l)})}})}function E1(r,t,e){r.on("selectchanged",function(i){var n=e.getModel();i.isFromClick?(js("map","selectchanged",t,n,i),js("pie","selectchanged",t,n,i)):i.fromAction==="select"?(js("map","selected",t,n,i),js("pie","selected",t,n,i)):i.fromAction==="unselect"&&(js("map","unselected",t,n,i),js("pie","unselected",t,n,i))})}function Mo(r,t,e){for(var i;r&&!(t(r)&&(i=r,e));)r=r.__hostTarget||r.parent;return i}var mF=new St,kr=mF;var M1={};function O1(r,t){M1[r]=t}function Ky(r){return M1[r]}var gF={};function Dp(r,t){gF[r]=t}var Ep=re();function I1(r){Ep(r).prepare={}}function L1(r){Ep(r).fullUpdate={}}function Mp(r){return Ep(r).prepare}function Oo(r){return Ep(r).fullUpdate}var yF=Math.round(Math.random()*9),_F=typeof Object.defineProperty=="function",xF=(function(){function r(){this._id="__ec_inner_"+yF++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var i=this._guard(t);return _F?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),P1=xF;var bF=ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i+a),r.lineTo(e-n,i+a),r.closePath()}}),SF=ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i),r.lineTo(e,i+a),r.lineTo(e-n,i),r.closePath()}}),wF=ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,i=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),p=o*.6,d=o*.7;r.moveTo(e-c,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+c-f*p,l+s+h*p,e,i-d,e,i),r.bezierCurveTo(e,i-d,e-c+f*p,l+s+h*p,e-c,l+s),r.closePath()}}),TF=ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,i=t.width,n=t.x,a=t.y,o=i/3*2;r.moveTo(n,a),r.lineTo(n+o,a+e),r.lineTo(n,a+e/4*3),r.lineTo(n-o,a+e),r.lineTo(n,a),r.closePath()}}),CF={line:Qt,rect:Oe,roundRect:Oe,square:Oe,circle:to,diamond:SF,pin:wF,arrow:TF,triangle:bF},AF={line:function(r,t,e,i,n){n.x1=r,n.y1=t+i/2,n.x2=r+e,n.y2=t+i/2},rect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i},roundRect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i,n.r=Math.min(e,i)/4},square:function(r,t,e,i,n){var a=Math.min(e,i);n.x=r,n.y=t,n.width=a,n.height=a},circle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.r=Math.min(e,i)/2},diamond:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i},pin:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},arrow:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},triangle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i}},ic={};w(CF,function(r,t){ic[t]=new r});var DF=ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var i=Ua(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+e.height*.4),i},buildPath:function(r,t,e){var i=t.symbolType;if(i!=="none"){var n=ic[i];n||(i="rect",n=ic[i]),AF[i](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function EF(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||K.color.neutral00,e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function It(r,t,e,i,n,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Hu(r.slice(8),new ue(t,e,i,n),o?"center":"cover"):r.indexOf("path://")===0?l=Os(r.slice(7),{},new ue(t,e,i,n),o?"center":"cover"):l=new DF({shape:{symbolType:r,x:t,y:e,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=EF,a&&l.setColor(a),l}function nc(r){return F(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Io(r,t){if(r!=null)return F(r)||(r=[r,r]),[Ve(r[0],t[0])||0,Ve(Z(r[1],r[0]),t[1])||0]}function Lo(r){return isFinite(r)}function OF(r,t,e){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*e.width+e.x,n=n*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),i=Lo(i)?i:0,n=Lo(n)?n:1,a=Lo(a)?a:0,o=Lo(o)?o:0;var s=r.createLinearGradient(i,a,n,o);return s}function IF(r,t,e){var i=e.width,n=e.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*i+e.x,s=s*n+e.y,l=l*a),o=Lo(o)?o:.5,s=Lo(s)?s:.5,l=l>=0&&Lo(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ac(r,t,e){for(var i=t.type==="radial"?IF(r,t,e):OF(r,t,e),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function N1(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function Op(r){return parseInt(r,10)}function oc(r,t,e){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||Op(s[i])||Op(r.style[i]))-(Op(s[a])||0)-(Op(s[o])||0)||0}function LF(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:ge(r)?[r]:F(r)?r:null}function qy(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&LF(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=U(e,function(a){return a/n}),i/=n)}return[e,i]}var PF=new Dr(!0);function Ip(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function k1(r){return typeof r=="string"&&r!=="none"}function Lp(r){var t=r.fill;return t!=null&&t!=="none"}function R1(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function F1(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Pp(r,t,e){var i=tg(t.image,t.__image,e);if(bs(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Xv),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function NF(r,t,e,i,n){var a,o=Ip(e),s=Lp(e),l=e.strokePercent,u=l<1,c=!t.path;(!t.silent||u)&&c&&t.createPathProxy();var f=t.path||PF,h=t.__dirty;if(!i){var p=e.fill,d=e.stroke,v=s&&!!p.colorStops,m=o&&!!d.colorStops,g=s&&!!p.image,y=o&&!!d.image,_=void 0,x=void 0,b=void 0,S=void 0,T=void 0;(v||m)&&(T=t.getBoundingRect()),v&&(_=h?ac(r,p,T):t.__canvasFillGradient,t.__canvasFillGradient=_),m&&(x=h?ac(r,d,T):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),g&&(b=h||!t.__canvasFillPattern?Pp(r,p,t):t.__canvasFillPattern,t.__canvasFillPattern=b),y&&(S=h||!t.__canvasStrokePattern?Pp(r,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),v?r.fillStyle=_:g&&(b?r.fillStyle=b:s=!1),m?r.strokeStyle=x:y&&(S?r.strokeStyle=S:o=!1)}var A=t.getGlobalScale();f.setScale(A[0],A[1],t.segmentIgnoreThreshold);var E,M;r.setLineDash&&e.lineDash&&(a=qy(t),E=a[0],M=a[1]);var O=!0;(c||h&Bn)&&(f.setDPR(r.dpr),u?f.setContext(null):(f.setContext(r),O=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),O&&f.rebuildPath(r,u?l:1),E&&(r.setLineDash(E),r.lineDashOffset=M),i?(n.batchFill=s,n.batchStroke=o):e.strokeFirst?(o&&F1(r,e),s&&R1(r,e)):(s&&R1(r,e),o&&F1(r,e)),E&&r.setLineDash([])}function kF(r,t,e){var i=t.__image=tg(e.image,t.__image,t,t.onload);if(!(!i||!bs(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,c=e.sy||0;r.drawImage(i,u,c,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,c=e.sy,f=o-u,h=s-c;r.drawImage(i,u,c,f,h,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function RF(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Br,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=qy(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Ip(e)&&r.strokeText(n,e.x,e.y),Lp(e)&&r.fillText(n,e.x,e.y)):(Lp(e)&&r.fillText(n,e.x,e.y),Ip(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var B1=["shadowBlur","shadowOffsetX","shadowOffsetY"],z1=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function W1(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){rr(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Ni.opacity:o}(i||t.blend!==e.blend)&&(a||(rr(r,n),a=!0),r.globalCompositeOperation=t.blend||Ni.blend);for(var s=0;s<B1.length;s++){var l=B1[s];(i||t[l]!==e[l])&&(a||(rr(r,n),a=!0),r[l]=r.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(a||(rr(r,n),a=!0),r.shadowColor=t.shadowColor||Ni.shadowColor),a}function V1(r,t,e,i,n){var a=t.style,o=i?null:e&&e.style||{};if(a===o)return!1;var s=W1(r,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(rr(r,n),s=!0),k1(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(rr(r,n),s=!0),k1(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(rr(r,n),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(rr(r,n),s=!0),r.lineWidth=u)}for(var c=0;c<z1.length;c++){var f=z1[c],h=f[0];(i||a[h]!==o[h])&&(s||(rr(r,n),s=!0),r[h]=a[h]||f[1])}return s}function FF(r,t,e,i,n){return W1(r,t.style,e&&e.style,i,n)}function Z1(r,t){var e=t.transform,i=r.dpr||1;e?r.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):r.setTransform(i,0,0,i,0,0)}function BF(r,t,e){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),Z1(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=i}function zF(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var U1=1,H1=2,G1=3,Y1=4;function VF(r){var t=Lp(r),e=Ip(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function rr(r,t){t.batchFill&&(t.batchFill=!1,r.fill()),t.batchStroke&&(t.batchStroke=!1,r.stroke())}function $s(r,t){var e={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};la(r,t,e),Po(r,e)}function la(r,t,e){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~pt,t.__isRendered=!1;return}var n=t.__clipPaths,a=e.prevElClipPaths,o=t.style,s=!1,l=!1;if((!a||N1(n,a))&&(a&&(rr(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),n&&n.length&&(rr(r,e),r.save(),BF(n,r,e),s=!0,e.prevElClipPaths=n)),e.allClipped){t.__dirty&=~pt,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(e.beforeBrushParam),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var c=t instanceof ve&&t.autoBatch&&VF(o);s||zF(i,u.transform)?(rr(r,e),Z1(r,t)):c||rr(r,e),t instanceof ve?(e.lastDrawType!==U1&&(l=!0,e.lastDrawType=U1),V1(r,t,u,l,e),(!c||!e.batchFill&&!e.batchStroke)&&r.beginPath(),NF(r,t,o,c,e)):t instanceof Eu?(e.lastDrawType!==G1&&(l=!0,e.lastDrawType=G1),V1(r,t,u,l,e),RF(r,t,o)):t instanceof ur?(e.lastDrawType!==H1&&(l=!0,e.lastDrawType=H1),FF(r,t,u,l,e),kF(r,t,o)):t.getTemporalDisplayables&&(e.lastDrawType!==Y1&&(l=!0,e.lastDrawType=Y1),UF(r,t,e)),t.innerAfterBrush(),t.afterBrush&&(c&&rr(r,e),t.afterBrush()),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Po(r,t){rr(r,t),t.prevElClipPaths&&r.restore()}function UF(r,t,e){var i=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(e.beforeBrushParam),l.innerBeforeBrush(),la(r,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Po(r,a);for(var u=0,c=n.length;u<c;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(e.beforeBrushParam),l.innerBeforeBrush(),la(r,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Po(r,a),t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var jy=new P1,X1=new Oi(100),K1=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function sc(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),n=i.painter.type==="svg";r.dirty&&jy.delete(r);var a=jy.get(r);if(a)return a;var o=he(r,{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});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=n?1:1/e,jy.set(r,s),r.dirty=!1,s;function l(u){for(var c=[e],f=!0,h=0;h<K1.length;++h){var p=o[K1[h]];if(p!=null&&!F(p)&&!H(p)&&!ge(p)&&typeof p!="boolean"){f=!1;break}c.push(p)}var d;if(f){d=c.join(",")+(n?"-svg":"");var v=X1.get(d);v&&(n?u.svgElement=v:u.image=v)}var m=j1(o.dashArrayX),g=HF(o.dashArrayY),y=q1(o.symbol),_=GF(m),x=$1(g),b=!n&&$e.createCanvas(),S=n&&{tag:"g",attrs:{},key:"dcl",children:[]},T=E(),A;b&&(b.width=T.width*e,b.height=T.height*e,A=b.getContext("2d")),M(),f&&X1.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=T.width,u.svgHeight=T.height;function E(){for(var O=1,L=0,I=_.length;L<I;++L)O=Zm(O,_[L]);for(var k=1,L=0,I=y.length;L<I;++L)k=Zm(k,y[L].length);O*=k;var z=x*_.length*y.length;if(0)var V;return{width:Math.max(1,Math.min(O,o.maxTileWidth)),height:Math.max(1,Math.min(z,o.maxTileHeight))}}function M(){A&&(A.clearRect(0,0,b.width,b.height),o.backgroundColor&&(A.fillStyle=o.backgroundColor,A.fillRect(0,0,b.width,b.height)));for(var O=0,L=0;L<g.length;++L)O+=g[L];if(O<=0)return;for(var I=-x,k=0,z=0,V=0;I<T.height;){if(k%2===0){for(var q=z/2%y.length,G=0,j=0,oe=0;G<T.width*2;){for(var ie=0,L=0;L<m[V].length;++L)ie+=m[V][L];if(ie<=0)break;if(j%2===0){var pe=(1-o.symbolSize)*.5,de=G+m[V][j]*pe,te=I+g[k]*pe,Te=m[V][j]*o.symbolSize,Pe=g[k]*o.symbolSize,vt=oe/2%y[q].length;bt(de,te,Te,Pe,y[q][vt])}G+=m[V][j],++oe,++j,j===m[V].length&&(j=0)}++V,V===m.length&&(V=0)}I+=g[k],++z,++k,k===g.length&&(k=0)}function bt(ze,ut,Ce,Ie,ji){var Nt=n?1:e,Hl=It(ji,ze*Nt,ut*Nt,Ce*Nt,Ie*Nt,o.color,o.symbolKeepAspect);if(n){var hf=i.painter.renderOneToVNode(Hl);hf&&S.children.push(hf)}else $s(A,Hl)}}}}function q1(r){if(!r||r.length===0)return[["rect"]];if(H(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!H(r[e])){t=!1;break}if(t)return q1([r]);for(var i=[],e=0;e<r.length;++e)H(r[e])?i.push([r[e]]):i.push(r[e]);return i}function j1(r){if(!r||r.length===0)return[[0,0]];if(ge(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,i=0;i<r.length;++i)if(!ge(r[i])){e=!1;break}if(e)return j1([r]);for(var n=[],i=0;i<r.length;++i)if(ge(r[i])){var t=Math.ceil(r[i]);n.push([t,t])}else{var t=U(r[i],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function HF(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(ge(r)){var t=Math.ceil(r);return[t,t]}var e=U(r,function(i){return Math.ceil(i)});return r.length%2?e.concat(e):e}function GF(r){return U(r,function(t){return $1(t)})}function $1(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}var J1=_s(YF);function YF(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=sc(s,t)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=sc(n,t)}}})}var WF="6.1.0",ZF={zrender:"6.1.0"},XF=1,KF=800,qF=900,jF=920,$F=1e3,JF=2e3,Q1=5e3,lA=1e3,QF=1100,l0=2e3,uA=3e3,eB=4e3,Hp=4500,tB=4600,rB=5e3,iB=6e3,cA=7e3,u0={PROCESSOR:{SERIES_FILTER:KF,AXIS_STATISTICS:jF,FILTER:$F,STATISTIC:Q1,STATISTICS:Q1},VISUAL:{LAYOUT:lA,PROGRESSIVE_LAYOUT:QF,GLOBAL:l0,CHART:uA,POST_CHART_LAYOUT:tB,COMPONENT:eB,BRUSH:rB,CHART_ITEM:Hp,ARIA:iB,DECAL:cA}},_t="__flagInMainProcess",Np="__mainProcessVersion",Lt="__pendingUpdate",$y="__needsUpdateStatus",eA=/^[a-zA-Z0-9_]+$/,Jy="__connectUpdateStatus",tA=0,nB=1,aB=2;function fA(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return pA(this,r,t)}}function hA(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return pA(this,r,t)}}function pA(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),St.prototype[t].apply(r,e)}var dA=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(St),vA=dA.prototype;vA.on=hA("on");vA.off=hA("off");var No,Qy,kp,bn,Rp,e0,t0,Js,Qs,rA,iA,r0,nA,Fp,aA,mA,ri,oA,el,Bp=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,new w1)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},a.__v_skip=!0,a._dom=e;var o="canvas",s="auto",l=!1;if(a[Np]=1,0)var u;n.ssr&&Gm(function(p){var d=_e(p),v=d.dataIndex;if(v!=null){var m=Y();return m.set("series_index",d.seriesIndex),m.set("data_index",v),d.ssrType&&m.set("ssr_type",d.ssrType),m}});var c=a._zr=jf(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Z(n.useDirtyRect,l),useCoarsePointer:Z(n.useCoarsePointer,s),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=Do(ee(c.flush,c),17),a._updateTheme(i),a._locale=qT(n.locale||Vh),a._coordSysMgr=new Hs;var f=a._api=aA(a);function h(p,d){return p.__prio-d.__prio}return Pa(Vp,h),Pa(a0,h),a._scheduler=new Zy(a,f,a0,Vp),a._messageCenter=new dA,a._initEvents(),a.resize=ee(a.resize,a),c.animation.on("frame",a._onframe,a),rA(c,a),iA(c,a),Ta(a),a}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,i=this._model,n=this._api;if(oA(this),this[Lt]){var a=this[Lt].silent;this[_t]=!0,el(this);try{No(this),bn.update.call(this,null,this[Lt].updateParams)}catch(l){throw this[_t]=!1,this[Lt]=null,l}this._zr.flush(),this[_t]=!1,this[Lt]=null,Js.call(this,a),Qs.call(this,a)}else if(e.unfinished){var o=XF;do{e.unfinished=!1;var s=$e.getTime();e.performSeriesTasks(i),e.performDataProcessorTasks(i),e0(this,i),e.performVisualTasks(i),Fp(this,this._model,n,"remain",{}),o-=$e.getTime()-s}while(o>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,i,n){if(!this[_t]){if(this._disposed){this.id;return}var a,o,s;if(W(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[_t]=!0,el(this),!this._model||i){var l=new TC(this._api),u=this._theme,c=this._model=new fp;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},o0);var f={seriesTransition:s,optionChanged:!0};if(n)this[Lt]={silent:a,updateParams:f},this[_t]=!1,this.getZr().wakeUp();else{try{No(this),bn.update.call(this,null,f)}catch(h){throw this[Lt]=null,this[_t]=!1,h}this._ssr||this._zr.flush(),this[Lt]=null,this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype.setTheme=function(e,i){if(!this[_t]){if(this._disposed){this.id;return}var n=this._model;if(n){var a=i&&i.silent,o=null;this[Lt]&&(a==null&&(a=this[Lt].silent),o=this[Lt].updateParams,this[Lt]=null),this[_t]=!0,el(this);try{this._updateTheme(e),n.setTheme(this._theme),No(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[_t]=!1,s}this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype._updateTheme=function(e){H(e)&&(e=gA[e]),e&&(e=ne(e),e&&hp(e,!0),this._theme=e)},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||fe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,i=e.storage.getDisplayList();return w(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;w(i,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return w(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(Up[n]){var l=s,u=s,c=-s,f=-s,h=[],p=e&&e.pixelRatio||this.getDevicePixelRatio();w(ko,function(_,x){if(_.group===n){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ne(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:b,left:S.left,top:S.top})}}),l*=p,u*=p,c*=p,f*=p;var d=c-l,v=f-u,m=$e.createCanvas(),g=jf(m,{renderer:i?"svg":"canvas"});if(g.resize({width:d,height:v}),i){var y="";return w(h,function(_){var x=_.left-l,b=_.top-u;y+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return e.connectedBackgroundColor&&g.add(new Oe({shape:{x:0,y:0,width:d,height:v},style:{fill:e.connectedBackgroundColor}})),w(h,function(_){var x=new ur({style:{x:_.left*p-l,y:_.top*p-u,image:_.dom}});g.add(x)}),g.refreshImmediately(),m.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i,n){return Rp(this,"convertToPixel",e,i,n)},t.prototype.convertToLayout=function(e,i,n){return Rp(this,"convertToLayout",e,i,n)},t.prototype.convertFromPixel=function(e,i,n){return Rp(this,"convertFromPixel",e,i,n)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=th(n,e);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=th(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?D1(s,l,i):qs(s,i)},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=this;w(oB,function(n){var a=function(o){var s=e.getModel(),l=o.target,u,c=n==="globalout";if(c?u={}:l&&Mo(l,function(v){var m=_e(v);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=B({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var p=f&&h!=null&&s.getComponent(f,h),d=p&&e[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:p,view:d},e.trigger(n,u)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)});var i=this._messageCenter;w(n0,function(n,a){i.on(a,function(o){e.trigger(a,o)})}),E1(i,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&qm(this.getDom(),f0,"");var i=this,n=i._api,a=i._model;w(i._componentsViews,function(o){o.dispose(a,n)}),w(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete ko[i.id]},t.prototype.resize=function(e){if(!this[_t]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[Lt]&&(a==null&&(a=this[Lt].silent),n=!0,this[Lt]=null),this[_t]=!0,el(this);try{n&&No(this),bn.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[_t]=!1,o}this[_t]=!1,Js.call(this,a),Qs.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(W(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!s0[e]){var n=s0[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=B({},e);return i.type=i0[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(W(i)||(i={silent:!!i}),!!zp[e.type]&&this._model){if(this[_t]){this._pendingActions.push(e);return}var n=i.silent;t0.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&fe.browser.weChat&&this._throttledZrFlush(),Js.call(this,n),Qs.call(this,n)}},t.prototype.updateLabelLayout=function(){kr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){No=function(f){I1(f._model);var h=f._scheduler;h.restorePipelines(f._zr,f._model),h.prepareStageTasks(),Qy(f,!0),Qy(f,!1),h.plan()},Qy=function(f,h){for(var p=f._model,d=f._scheduler,v=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,_=0;_<v.length;_++)v[_].__alive=!1;h?p.eachComponent(function(S,T){S!=="series"&&x(T)}):p.eachSeries(x);function x(S){var T=S.__requireNewView;S.__requireNewView=!1;var A="_ec_"+S.id+"_"+S.type,E=!T&&m[A];if(!E){var M=lr(S.type),O=h?nt.getClass(M.main,M.sub):Ft.getClass(M.sub);E=new O,E.init(p,y),m[A]=E,v.push(E),g.add(E.group)}S.__viewId=E.__id=A,E.__alive=!0,E.__model=S,E.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!h&&d.prepareView(E,S,p,y)}for(var _=0;_<v.length;){var b=v[_];b.__alive?_++:(!h&&b.renderTask.dispose(),g.remove(b.group),b.dispose(p,y),v.splice(_,1),m[b.__id]===b&&delete m[b.__id],b.__id=b.group.__ecComponentInfo=null)}},kp=function(f,h,p,d,v){var m=f._model;if(m.setUpdatePayload(p),!d){w([].concat(f._componentsViews).concat(f._chartsViews),x);return}var g=FS(p,d,v),y=p.excludeSeriesId,_;y!=null&&(_=Y(),w(Qe(y),function(b){var S=Ar(b,null);S!=null&&_.set(S,!0)})),m&&m.eachComponent(g,function(b){var S=_&&_.get(b.id)!=null;if(!S)if(Ng(p))if(b instanceof tr)p.type===Qn&&!p.notBlur&&!b.get(["emphasis","disabled"])&&Xw(b,p,f._api);else{var T=yh(b.mainType,b.componentIndex,p.name,f._api),A=T.focusSelf,E=T.dispatchers;p.type===Qn&&A&&!p.notBlur&&ph(b.mainType,b.componentIndex,f._api),E&&w(E,function(M){p.type===Qn?dn(M):vn(M)})}else _h(p)&&b instanceof tr&&(jw(b,p,f._api),Pg(b),ri(f))},f),m&&m.eachComponent(g,function(b){var S=_&&_.get(b.id)!=null;S||x(f[d==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},f);function x(b){b&&b.__alive&&b[h]&&b[h](b.__model,m,f._api,p)}},bn={prepareAndUpdate:function(f){No(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,h){var p=this._model,d=this._api,v=this._zr,m=this._coordSysMgr,g=this._scheduler;if(p){L1(p),p.setUpdatePayload(f),g.restoreData(p,f),g.performSeriesTasks(p),m.create(p,d),kr.trigger("coordsys:aftercreate",p,d),g.performDataProcessorTasks(p,f),e0(this,p),m.update(p,d),i(p),g.performVisualTasks(p,f);var y=p.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var _=p.get("darkMode");_!=null&&_!=="auto"&&v.setDarkMode(_),r0(this,p,d,f,h),kr.trigger("afterupdate",p,d)}},updateTransform:function(f){var h=this,p=h._model,d=h._api;if(p){p.setUpdatePayload(f);var v=[];p.eachComponent(function(g,y){if(g!==ch){var _=h.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,p,d,f);x&&x.update&&v.push(_)}else v.push(_)}});var m=Y();p.eachSeries(function(g){var y=h._chartsMap[g.__viewId],_=g.pipelineContext;if(y.updateTransform&&!_.progressiveRender){var x=y.updateTransform(g,p,d,f);x&&x.update&&m.set(g.uid,1)}else m.set(g.uid,1)}),h._scheduler.performVisualTasks(p,f,{setDirty:!0,dirtyMap:m}),Fp(h,p,d,f,{},m),kr.trigger("afterupdate",p,d)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),Ft.markUpdateMethod(f,"updateView"),i(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),r0(this,h,this._api,f,{}),kr.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,p=this._model;p&&(p.setUpdatePayload(f),p.eachSeries(function(d){d.getData().clearAllVisual()}),Ft.markUpdateMethod(f,"updateVisual"),i(p),this._scheduler.performVisualTasks(p,f,{visualType:"visual",setDirty:!0}),p.eachComponent(function(d,v){if(d!=="series"){var m=h.getViewOfComponentModel(v);m&&m.__alive&&m.updateVisual(v,p,h._api,f)}}),p.eachSeries(function(d){var v=h._chartsMap[d.__viewId];v.updateVisual(d,p,h._api,f)}),kr.trigger("afterupdate",p,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function e(f,h,p,d,v){if(f._disposed){f.id;return}for(var m=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,_=th(m,p),x=0;x<g.length;x++){var b=g[x];if(b[h]&&(y=b[h](m,_,d,v))!=null)return y}}Rp=e,e0=function(f,h){var p=f._chartsMap,d=f._scheduler;h.eachSeries(function(v){d.updateStreamModes(v,p[v.__viewId])})},t0=function(f,h){var p=this,d=this.getModel(),v=f.type,m=f.escapeConnect,g=zp[v],y=(g.update||"update").split(":"),_=y.pop(),x=y[0]!=null&&lr(y[0]);this[_t]=!0,el(this);var b=[f],S=!1;f.batch&&(S=!0,b=U(f.batch,function(V){return V=he(B({},V),f),V.batch=null,V}));var T=[],A,E=[],M=g.nonRefinedEventType,O=_h(f),L=Ng(f);if(L&&Lg(this._api),w(b,function(V){var q=g.action(V,d,p._api);if(g.refineEvent?E.push(q):A=q,A=A||B({},V),A.type=M,T.push(A),L){var G=wu(f),j=G.queryOptionMap,oe=G.mainTypeSpecified,ie=oe?j.keys()[0]:"series";kp(p,_,V,ie),ri(p)}else O?(kp(p,_,V,"series"),ri(p)):x&&kp(p,_,V,x.main,x.sub)}),_!=="none"&&!L&&!O&&!x)try{this[Lt]?(No(this),bn.update.call(this,f),this[Lt]=null):bn[_].call(this,f)}catch(V){throw this[_t]=!1,V}if(S?A={type:M,escapeConnect:m,batch:T}:A=T[0],this[_t]=!1,!h){var I=void 0;if(g.refineEvent){var k=g.refineEvent(E,f,d,this._api).eventContent;ft(W(k)),I=he({type:g.refinedEventType},k),I.fromAction=f.type,I.fromActionPayload=f,I.escapeConnect=!0}var z=this._messageCenter;z.trigger(A.type,A),I&&z.trigger(I.type,I)}},Js=function(f){for(var h=this._pendingActions;h.length;){var p=h.shift();t0.call(this,p,f)}},Qs=function(f){!f&&this.trigger("updated")},rA=function(f,h){f.on("rendered",function(p){h.trigger("rendered",p),f.animation.isFinished()&&!h[Lt]&&!h._scheduler.unfinished&&!h._pendingActions.length?h.trigger("finished"):f.refresh()})},iA=function(f,h){f.on("mouseover",function(p){var d=p.target,v=Mo(d,ku);v&&(Kw(v,p,h._api),ri(h))}).on("mouseout",function(p){var d=p.target,v=Mo(d,ku);v&&(qw(v,p,h._api),ri(h))}).on("click",function(p){var d=p.target,v=Mo(d,function(y){return _e(y).dataIndex!=null},!0);if(v){var m=v.selected?"unselect":"select",g=_e(v);h._api.dispatchAction({type:m,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function i(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],p=[],d=!1;if(f.eachComponent(function(y,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(y==="series"?p:h).push({zlevel:x,z:b,idx:_.componentIndex,type:y,key:S})}),d){var v=h.concat(p),m,g;Pa(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),w(v,function(y){var _=f.getComponent(y.type,y.idx),x=y.zlevel,b=y.key;m!=null&&(x=Math.max(m,x)),b?(x===m&&b!==g&&x++,g=b):g&&(x===m&&x++,g=""),m=x,_.setZLevel(x)})}}r0=function(f,h,p,d,v){n(h),nA(f,h,p,d,v),w(f._chartsViews,function(m){m.__alive=!1}),Fp(f,h,p,d,v),w(f._chartsViews,function(m){m.__alive||m.remove(h,p)})},nA=function(f,h,p,d,v,m){w(m||f._componentsViews,function(g){var y=g.__model;u(y,g),g.render(y,h,p,d),l(y,g),c(y,g)})},Fp=function(f,h,p,d,v,m){var g=f._scheduler;v=B(v||{},{updatedSeries:h.getSeries()}),kr.trigger("series:beforeupdate",h,p,v);var y=!1;h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;g.updatePayload(b,d),u(_,x),m&&m.get(_.uid)&&b.dirty(),b.perform(g.getPerformArgs(b))&&(y=!0),x.group.silent=!!_.get("silent"),s(_,x),Pg(_)}),g.unfinished=y||g.unfinished,kr.trigger("series:layoutlabels",h,p,v),kr.trigger("series:transition",h,p,v),h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];l(_,x),c(_,x)}),o(f,h),kr.trigger("series:afterupdate",h,p,v)},ri=function(f){f[$y]=!0,f.getZr().wakeUp()},el=function(f){f[Np]=(f[Np]+1)%1e6},oA=function(f){f[$y]&&(f.getZr().storage.traverse(function(h){lo(h)||a(h)}),f[$y]=!1)};function a(f){for(var h=[],p=f.currentStates,d=0;d<p.length;d++){var v=p[d];v==="emphasis"||v==="blur"||v==="select"||h.push(v)}f.selected&&f.states.select&&h.push("select"),f.hoverState===Ou&&f.states.emphasis?h.push("emphasis"):f.hoverState===Mu&&f.states.blur&&h.push("blur"),f.useStates(h)}function o(f,h){var p=f._zr;if(p.painter.type==="canvas"){var d=p.storage,v=0;d.traverse(function(g){g.isGroup||v++});var m=v>Z(h.get("hoverLayerThreshold"),lp.hoverLayerThreshold)&&!fe.node&&!fe.worker;(f._usingTHL||m)&&(h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(_){var x=_.states.emphasis;x&&x.hoverLayer!==co&&(x.hoverLayer=m?Xg:Zg)})}}),f._usingTHL=m)}}function s(f,h){var p=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=p)})}function l(f,h){if(!f.preventAutoZ){var p=Yi(f);h.eachRendered(function(d){return Yu(d,p.z,p.zlevel),!0})}}function u(f,h){h.eachRendered(function(p){if(!lo(p)){var d=p.getTextContent(),v=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function c(f,h){var p=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),v=p.get("duration"),m=v>0?{duration:v,delay:p.get("delay"),easing:p.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(lo(g))return;if(g instanceof ve&&eT(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var _=g.getTextContent(),x=g.getTextGuideLine();_&&(_.stateTransition=m),x&&(x.stateTransition=m)}g.__dirty&&a(g)}})}aA=function(f){return new((function(h){N(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(d){for(;d;){var v=d.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);d=d.parent}},p.prototype.enterEmphasis=function(d,v){dn(d,v),ri(f)},p.prototype.leaveEmphasis=function(d,v){vn(d,v),ri(f)},p.prototype.enterBlur=function(d){gh(d),ri(f)},p.prototype.leaveBlur=function(d){Nu(d),ri(f)},p.prototype.enterSelect=function(d){Og(d),ri(f)},p.prototype.leaveSelect=function(d){Ig(d),ri(f)},p.prototype.getModel=function(){return f.getModel()},p.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},p.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},p.prototype.getECUpdateCycleVersion=function(){return f[Np]},p.prototype.usingTHL=function(){return f._usingTHL},p})(hh))(f)},mA=function(f){function h(p,d){for(var v=0;v<p.length;v++){var m=p[v];m[Jy]=d}}w(i0,function(p,d){f._messageCenter.on(d,function(v){if(Up[f.group]&&f[Jy]!==tA){if(v&&v.escapeConnect)return;var m=f.makeActionFromEvent(v),g=[];w(ko,function(y){y!==f&&y.group===f.group&&g.push(y)}),h(g,tA),w(g,function(y){y[Jy]!==nB&&y.dispatchAction(m)}),h(g,aB)}})})}})(),t})(St),c0=Bp.prototype;c0.on=fA("on");c0.off=fA("off");c0.one=function(r,t,e){var i=this;function n(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),i.off(r,n)}this.on.call(this,r,n,e)};var oB=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var zp={},i0={},n0={},a0=[],o0=[],Vp=[],gA={},s0={},ko={},Up={},sB=+new Date-0,lB=+new Date-0,f0="_echarts_instance_";function uB(r,t,e){var i=!(e&&e.ssr);if(i){var n=h0(r);if(n)return n}var a=new Bp(r,t,e);return a.id="ec_"+sB++,ko[a.id]=a,i&&qm(r,f0,a.id),mA(a),kr.trigger("afterinit",a),a}function cB(r){if(F(r)){var t=r;r=null,w(t,function(e){e.group!=null&&(r=e.group)}),r=r||"g_"+lB++,w(t,function(e){e.group=r})}return Up[r]=!0,r}function yA(r){Up[r]=!1}var fB=yA;function hB(r){H(r)?r=ko[r]:r instanceof Bp||(r=h0(r)),r instanceof Bp&&!r.isDisposed()&&r.dispose()}function h0(r){return ko[BS(r,f0)]}function pB(r){return ko[r]}function lc(r,t){gA[r]=t}function Gp(r){ce(o0,r)<0&&o0.push(r)}function Yp(r,t){g0(a0,r,t,JF)}function p0(r){uc("afterinit",r)}function d0(r){uc("afterupdate",r)}function uc(r,t){kr.on(r,t)}function Xi(r,t,e){var i,n,a,o,s;$(t)&&(e=t,t=""),W(r)?(i=r.type,n=r.event,o=r.update,s=r.publishNonRefinedEvent,e||(e=r.action),a=r.refineEvent):(i=r,n=t);function l(c){return c.toLowerCase()}n=l(n||i);var u=a?l(i):n;zp[i]||(ft(eA.test(i)&&eA.test(n)),a&&ft(n!==i),zp[i]={actionType:i,refinedEventType:n,nonRefinedEventType:u,update:o,action:e,refineEvent:a},n0[n]=1,a&&s&&(n0[u]=1),i0[u]=i)}function v0(r,t){Hs.register(r,t)}function dB(r){var t=Hs.get(r);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function vB(r,t){Dp(r,t)}function m0(r,t){g0(Vp,r,t,lA,"layout",!0)}function Sn(r,t){g0(Vp,r,t,uA,"visual",!0)}var sA=[];function g0(r,t,e,i,n,a){if(($(t)||W(t))&&(e=t,t=i),!(ce(sA,e)>=0)){sA.push(e);var o=Zy.wrapStageHandler(e,n);o.__prio=t,o.__raw=e,r.push(o)}}function Wp(r,t){s0[r]=t}function mB(r){gf({createCanvas:r})}function y0(r,t,e){var i=Ky("registerMap");i&&i(r,t,e)}function gB(r){var t=Ky("getMap");return t&&t(r)}var _0=HC;Sn(l0,p1);Sn(Hp,d1);Sn(Hp,v1);Sn(l0,C1);Sn(Hp,A1);Sn(cA,J1);Gp(hp);Yp(qF,IC);Wp("default",Wy);Xi({type:Qn,event:Qn,update:Qn},Ze);Xi({type:Iu,event:Iu,update:Iu},Ze);Xi({type:Lu,event:vh,update:Lu,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});Xi({type:dh,event:vh,update:dh,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});Xi({type:Pu,event:vh,update:Pu,action:Ze,refineEvent:x0,publishNonRefinedEvent:!0});function x0(r,t,e,i){return{eventContent:{selected:$w(e),isFromClick:t.isFromClick||!1}}}lc("default",{});lc("dark",S1);var yB={};function cc(r){return r==null?0:r.length||1}function _A(r){return r}var xB=(function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||_A,this._newKeyGetter=n||_A,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=i[s],u=cc(l);if(u>1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],c=n[l],f=cc(u),h=cc(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),n[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(f>1)for(var p=0;p<f;p++)this._remove&&this._remove(u[p]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},r.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],a=e[n],o=cc(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[n]=null}},r.prototype._initIndexMap=function(t,e,i,n){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(a||(i[o]=s),!!e){var l=e[s],u=cc(l);u===0?(e[s]=o,a&&i.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),xA=xB;var bB=(function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function bA(r,t){var e={},i=e.encode={},n=Y(),a=[],o=[],s={};w(r.dimensions,function(h){var p=r.getDimensionInfo(h),d=p.coordDim;if(d){var v=p.coordDimIndex;b0(i,d)[v]=h,p.isExtraCoord||(n.set(d,1),SB(p.type)&&(a[0]=h),b0(s,d)[v]=r.getDimensionIndex(p.name)),p.defaultTooltip&&o.push(h)}fh.each(function(m,g){var y=b0(i,g),_=p.otherDims[g];_!=null&&_!==!1&&(y[_]=p.name)})});var l=[],u={};n.each(function(h,p){var d=i[p];u[p]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=U(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),e.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(a=c.slice());var f=i.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e.userOutput=new bB(s,t),e}function b0(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function SA(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function SB(r){return!(r==="ordinal"||r==="time")}var wB=(function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r})(),tl=wB;var TB=re(),CB={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S0=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=w0(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return Z(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=dp(this.source),i=!T0(t),n="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=e?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=e?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),e&&l!=null&&(!f||!f.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=CB[u]||"f",c&&(n+=c.uid),n+="$"}var p=this.source,d=[p.seriesLayoutBy,p.startIndex,n].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(n=a.name),i++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Zp(r){return r instanceof S0}function fc(r){for(var t=Y(),e=0;e<(r||[]).length;e++){var i=r[e],n=W(i)?i.name:i;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function w0(r){var t=TB(r);return t.dimNameMap||(t.dimNameMap=fc(r.dimensionsDefine))}function T0(r){return r>30}var hc=W,ua=U,AB=typeof Int32Array>"u"?Array:Int32Array,DB="e\0\0",wA=-1,EB=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],MB=["_approximateExtent"],TA,Xp,pc,dc,C0,vc,A0,OB=(function(){function r(t,e){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 i,n=!1;Zp(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<i.length;c++){var f=i[c],h=H(f)?new tl({name:f}):f instanceof tl?f:new tl(f),p=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=p,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};o.push(p),a[p]=h,u[p]!=null&&(l=!0),h.createInvertedIndices&&(s[p]=[]),n&&(h.storeDimIndex=c),d.itemName===0&&(this._nameDimIdx=h.storeDimIndex),d.itemId===0&&(this._idDimIdx=h.storeDimIndex)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=Y();w(o,function(m){v.set(a[m].storeDimIndex,m)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(i!=null)return i;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(ge(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(i){return e.hasOwnProperty(i)?e[i]:void 0}:function(i){return e[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,i=e.encode[t];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,i){var n=this,a;if(t instanceof Qu&&(a=t),!a){var o=this.dimensions,s=Zs(t)||ct(t)?new mp(t,o.length):t;a=new Qu;var l=ua(o,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=bA(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e&&e.length),n=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<a;s++){var l=s-n;this._nameList[s]=e[l],o&&A0(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Mr&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===At;if(l&&!n.pure)for(var u=[],c=t;c<e;c++){var f=n.getItem(c,u);if(!this.hasItemOption&&LS(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=Ar(h,null));var p=f.id;o[c]==null&&p!=null&&(o[c]=Ar(p,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<e;c++)A0(this,c);TA(this)}},r.prototype.getApproximateExtent=function(t,e){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t),e)},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){hc(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=pc(this,this._nameDimIdx,e)),i==null&&(i=""),i},r.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},r.prototype.getId=function(t){return Xp(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t),null)},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var i=this,n=this._store;return F(t)?n.getValues(ua(t,function(a){return i._getStoreDimIndex(a)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i&&i[e];return n==null||isNaN(n)?wA:n},r.prototype.each=function(t,e,i){"use strict";$(t)&&(i=e,e=t,t=[]);var n=i||this,a=ua(dc(t),this._getStoreDimIndex,this);this._store.each(a,n?ee(e,n):e)},r.prototype.filterSelf=function(t,e,i){"use strict";$(t)&&(i=e,e=t,t=[]);var n=i||this,a=ua(dc(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?ee(e,n):e),this},r.prototype.selectRange=function(t){"use strict";var e=this,i={},n=De(t),a=[];return w(n,function(o){var s=e._getStoreDimIndex(o);i[s]=t[o],a.push(s)}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(t,e,i){"use strict";$(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},i),n},r.prototype.map=function(t,e,i,n){"use strict";var a=i||n||this,o=ua(dc(t),this._getStoreDimIndex,this),s=vc(this);return s._store=this._store.map(o,a?ee(e,a):e),s},r.prototype.modify=function(t,e,i,n){var a=this,o=i||n||this,s=ua(dc(t),this._getStoreDimIndex,this);this._store.modify(s,o?ee(e,o):e)},r.prototype.downSample=function(t,e,i,n){var a=vc(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),a},r.prototype.minmaxDownSample=function(t,e){var i=vc(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),i},r.prototype.lttbDownSample=function(t,e){var i=vc(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Re(i,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new xA(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Xp(t,i)},function(i){return Xp(e,i)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},hc(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),F(a)?a=a.slice():hc(a)&&(a=B({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,hc(e)?B(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){hc(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Nw(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){w(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:ua(this.dimensions,this._getDimInfo,this),this.hostModel)),C0(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];$(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Xl(arguments)))})},r.internalField=(function(){TA=function(t){var e=t._invertedIndicesMap;w(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new AB(o.categories.length);for(var l=0;l<i.length;l++)i[l]=wA;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},pc=function(t,e,i){return Ar(t._getCategory(e,i),null)},Xp=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=pc(t,t._idDimIdx,e)),i==null&&(i=DB+e),i},dc=function(t){return F(t)||(t=t!=null?[t]:[]),t},vc=function(t){var e=new r(t._schema?t._schema:ua(t.dimensions,t._getDimInfo,t),t.hostModel);return C0(e,t),e},C0=function(t,e){w(EB.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,w(MB,function(i){t[i]=ne(e[i])}),t._calculationInfo=B({},e._calculationInfo)},A0=function(t,e){var i=t._nameList,n=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=i[e],l=n[e];if(s==null&&a!=null&&(i[e]=s=pc(t,a,e)),l==null&&o!=null&&(n[e]=l=pc(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),n[e]=l}}})(),r})(),_i=OB;var F0={};Sr(F0,{createDimensions:()=>CA,createList:()=>yz,createScale:()=>xz,createSymbol:()=>It,createTextStyle:()=>Sz,dataStack:()=>_z,enableHoverEmphasis:()=>ea,getECData:()=>_e,getLayoutRect:()=>Jr,mixinAxisModelCommonMethods:()=>bz});function CA(r,t){return Kp(r,t).dimensions}function Kp(r,t){Zs(r)||(r=Xs(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=Y(),a=[],o=IB(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&T0(o),l=i===r.dimensionsDefine,u=l?w0(r):fc(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=Y(c),h=new Fy(o),p=0;p<h.length;p++)h[p]=-1;function d(E){var M=h[E];if(M<0){var O=i[E],L=W(O)?O:{name:O},I=new tl,k=L.name;k!=null&&u.get(k)!=null&&(I.name=I.displayName=k),L.type!=null&&(I.type=L.type),L.displayName!=null&&(I.displayName=L.displayName);var z=a.length;return h[E]=z,I.storeDimIndex=E,a.push(I),I}return a[M]}if(!s)for(var p=0;p<o;p++)d(p);f.each(function(E,M){var O=Qe(E).slice();if(O.length===1&&!H(O[0])&&O[0]<0){f.set(M,!1);return}var L=f.set(M,[]);w(O,function(I,k){var z=H(I)?u.get(I):I;z!=null&&z<o&&(L[k]=z,m(d(z),M,k))})});var v=0;w(e,function(E){var M,O,L,I;if(H(E))M=E,I={};else{I=E,M=I.name;var k=I.ordinalMeta;I.ordinalMeta=null,I=B({},I),I.ordinalMeta=k,O=I.dimsDef,L=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var z=f.get(M);if(z!==!1){if(z=Qe(z),!z.length)for(var V=0;V<(O&&O.length||1);V++){for(;v<o&&d(v).coordDim!=null;)v++;v<o&&z.push(v++)}w(z,function(q,G){var j=d(q);if(l&&I.type!=null&&(j.type=I.type),m(he(j,I),M,G),j.name==null&&O){var oe=O[G];!W(oe)&&(oe={name:oe}),j.name=j.displayName=oe.name,j.defaultTooltip=oe.defaultTooltip}L&&he(j.otherDims,L)})}});function m(E,M,O){fh.get(M)!=null?E.otherDims[M]=O:(E.coordDim=M,E.coordDimIndex=O,n.set(M,!0))}var g=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=g?y||1:0;var x=g||"value";function b(E){E.name==null&&(E.name=E.coordDim)}if(s)w(a,function(E){b(E)}),a.sort(function(E,M){return E.storeDimIndex-M.storeDimIndex});else for(var S=0;S<o;S++){var T=d(S),A=T.coordDim;A==null&&(T.coordDim=LB(x,n,_),T.coordDimIndex=0,(!g||y<=0)&&(T.isExtraCoord=!0),y--),b(T),T.type==null&&(up(r,S)===er.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return ys(a,function(E){return E.name},function(E,M){M>0&&(E.name=E.name+(M-1))}),new S0({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function IB(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return w(t,function(a){var o;W(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function LB(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var PB=(function(){function r(t){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=t}return r})();function AA(r){var t=r.get("coordinateSystem"),e=new PB(t),i=NB[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var NB={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",at).models[0],a=r.getReferringComponents("yAxis",at).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),rl(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),rl(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",at).models[0];t.coordSysDims=["single"],e.set("single",n),rl(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",at).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),rl(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),rl(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();w(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];e.set(c,u),rl(u)&&(i.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,i){var n=r.getReferringComponents("matrix",at).models[0];t.coordSysDims=["x","y"];var a=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",a),e.set("y",o),i.set("x",a),i.set("y",o)}};function rl(r){return r.get("type")==="category"}function qp(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;kB(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,h,p=!0;function d(x){return x.type!=="ordinal"&&x.type!=="time"}if(w(a,function(x,b){H(x)&&(a[b]=x={name:x}),d(x)||(p=!1)}),w(a,function(x,b){l&&!x.isExtraCoord&&(!i&&!u&&x.ordinalMeta&&(u=x),!c&&d(x)&&(!p||x.coordDim!=="x"&&x.coordDim!=="angle")&&(!n||n===x.coordDim)&&(c=x))}),c&&!i&&!u&&(i=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,m=c.type,g=0;w(a,function(x){x.coordDim===v&&g++});var y={name:f,coordDim:v,coordDimIndex:g,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:h,coordDim:h,coordDimIndex:g+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(h,m),_.storeDimIndex=s.ensureCalculationDimension(f,m)),o.appendCalculationDimension(y),o.appendCalculationDimension(_)):(a.push(y),a.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:h,stackResultDimension:f}}function kB(r){return!Zp(r.schema)}function Rr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function il(r,t){return Rr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function RB(r,t){var e=r.get("coordinateSystem"),i=Hs.get(e),n;return t&&t.coordSysDims&&(n=U(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=SA(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function FB(r,t,e){var i,n;return e&&w(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function BB(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;r?(a=!0,n=Xs(r)):(n=i.getSource(),a=n.sourceFormat===At);var o=AA(t),s=RB(t,o),l=e.useEncodeDefaulter,u=$(l)?l:l?Ae(dC,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Kp(n,c),h=FB(f.dimensions,e.createInvertedIndices,o),p=a?null:i.getSharedDataStore(f),d=qp(t,{schema:f,store:p}),v=new _i(f,t);v.setCalculationInfo(d);var m=h!=null&&zB(n)?function(g,y,_,x){return x===h?_:this.defaultDimValueGetter(g,y,_,x)}:null;return v.hasItemOption=!1,v.initData(a?n:p,null,m),v}function zB(r){if(r.sourceFormat===At){var t=VB(r.data||[]);return!F(cn(t))}}function VB(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var ca=BB;var DA=(function(){function r(){}return r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Xn(DA);var ir=DA;var UB=0,HB=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++UB,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&U(i,GB);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!H(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Y(this.categories))},r})();function GB(r){return W(r)&&r.value!=null?r.value:r+""}var mc=HB;var pr=0,nl=1,YB={needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1},MA=De(YB),al=2,OA=3;function ol(r,t,e){var i;r=r||{};var n=it();if(n){var a=n.createBreakScaleMapper(t,e);a.hasBreaks()&&(w(MA,function(o){a[o]&&(r[o]=ee(a[o],a))}),i=a)}return i==null&&WB(r,e),{brk:i,mapper:r}}function jp(r,t){w(MA,function(e){r[e]=t[e]})}function $p(r,t){r.freeze=Ze}function wn(r){return r.getExtentUnsafe(pr,al)}function Ro(r,t){return r.getExtentUnsafe(nl,t)||r.getExtentUnsafe(pr,t)}function IA(r){var t=Ro(r,OA);return t[1]-t[0]}function sl(r){var t=r.getExtentUnsafe(pr,OA);return t[1]-t[0]}function WB(r,t){var e=r||{},i=[];return e._extents=i,i[pr]=t?t.slice():Rt(),B(e,ZB),e}var ZB={needTransform:function(){return!1},normalize:function(r){var t=this._extents[nl]||this._extents[pr];return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])},scale:function(r){var t=this._extents[nl]||this._extents[pr];return r*(t[1]-t[0])+t[0]},transformIn:function(r){return r},transformOut:function(r){return r},contain:function(r){var t=Ro(this,null);return r>=t[0]&&r<=t[1]},getExtent:function(){return this._extents[pr].slice()},getExtentUnsafe:function(r){return this._extents[r]},setExtent:function(r,t){EA(this._extents,pr,r,t)},setExtent2:function(r,t,e){var i=this._extents;i[r]||(i[r]=i[pr].slice()),EA(i,r,t,e)},freeze:function(){}};function EA(r,t,e,i){fn(e,i)&&(r[t][0]=e,r[t][1]=i)}function Jp(r){return ll(r)||qi(r)}function ll(r){return r.type==="interval"}function Ki(r){return r.type==="time"}function qi(r){return r.type==="log"}function lt(r){return r.type==="ordinal"}function LA(r){var t=ps(r),e=Wn(10,t),i=or(r/e);return i?i===2?i=3:i===3?i=5:i*=2:i=1,we(i*e,-t)}function xi(r){return Kt(r)+2}function gc(r,t){return Yn(r)/Yn(t)}function Qp(r,t,e){var i=e&&e.lookup;if(i){for(var n=0;n<i.from.length;n++)if(r===i.from[n])return i.to[n]}return Wn(t,r)}function ed(r,t,e){var i=r.slice();if(i[0]===i[1]){var n=e&&e.ctnShp;if(i[0]!==0){var a=Ge(i[0]);t[1]||(i[1]+=a/2),i[0]-=a/2}else n&&(i[0]=-1),i[1]=1}return(!di(i[0])||!di(i[1]))&&(i[0]=0,i[1]=1),i[1]<i[0]&&i.reverse(),i}function PA(r,t){return[r[0]!==t[0],r[1]!==t[1]]}function yc(r,t){return r=r||t,or(Se(r,1))}function td(r,t,e){var i=wn(r),n=i[0],a=r.count(),o=Math.max((t||0)+1,1);n!==0&&o>1&&a/o>2&&(n=Math.round(Math.ceil(n/o)*o)),n!==i[0]&&l(i[0],!0,!0);for(var s=n;s<=i[1];s+=o)l(s,!1,s===i[0]||s===i[1]);s-o!==i[1]&&l(i[1],!0,!0);function l(u,c,f){e({value:u,offInterval:c},f)}}var NA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="ordinal",i.parse=t.parse,jp(i,t.decoratedMethods);var n=e.ordinalMeta;n||(n=new mc({})),F(n)&&(n=new mc({categories:U(n,function(o){return W(o)?o.value:o})})),i._ordinalMeta=n;var a=ol(null,null,e.extent||[0,n.categories.length-1]);return i._mapper=a.mapper,$p(i,a.mapper),i}return t.parse=function(e){return e==null?e=NaN:H(e)?(e=this._ordinalMeta.getOrdinal(e),e==null&&(e=NaN)):e=or(e),e},t.prototype.getTicks=function(){var e=[];return td(this,0,function(i){e.push(i)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Xe(s,i.length);o<l;++o){var u=n[o]=i[o];a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;n[o]=c,a[c]=o}},t.prototype._getTickNumber=function(e){var i=this._ticksByOrdinalNumber;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getRawOrdinalNumber=function(e){var i=this._ordinalNumbersByTick;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var i=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},t.prototype.count=function(){var e=wn(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type="ordinal",t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(or(this._mapper.scale(e)))},transformIn:function(e,i){return this._mapper.transformIn(this._getTickNumber(e),i)},transformOut:function(e,i){return this.getRawOrdinalNumber(this._mapper.transformOut(e,i))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,i){return this._mapper.getExtentUnsafe(e,i)},setExtent:function(e,i){return this._mapper.setExtent(e,i)},setExtent2:function(e,i,n){return this._mapper.setExtent2(e,i,n)}},t})(ir);ir.registerClass(NA);var kA=NA;function ul(r,t,e,i){for(var n=r.getTicks({expandToNicedExtent:!0}),a=[],o=r.getExtent(),s=1;s<n.length;s++){var l=n[s],u=n[s-1];if(!(u.break||l.break)){for(var c=0,f=[],h=l.value-u.value,p=h/t,d=xi(p);c<t-1;){var v=we(u.value+(c+1)*p,d);v>o[0]&&v<o[1]&&f.push(v),c++}var m=it();m&&m.pruneTicksByBreak("auto",f,e,function(g){return g},i,o),a.push(f)}}return a}var RA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="interval",i.parse=t.parse,e=e||{};var n=Hh(i,e),a=ol(i,n,null);return i.brk=a.brk,i._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},i}return t.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.getConfig=function(){return ne(this._cfg)},t.prototype.setConfig=function(e){var i=wn(this);this._cfg=e=ne(e),e.niceExtent==null&&(e.niceExtent=i.slice()),e.intervalPrecision==null&&(e.intervalPrecision=xi(e.interval))},t.prototype.getTicks=function(e){e=e||{};var i=this._cfg,n=i.interval,a=wn(this),o=i.niceExtent,s=i.intervalPrecision,l=it(),u=this.brk,c=l&&u,f=[];if(!n)return f;if(e.breakTicks==="only_break"&&c)return l.addBreaksToTicks(f,u.breaks,a),f;var h=3e3;a[0]<o[0]&&f.push({value:e.expandToNicedExtent?we(o[0]-n,s):a[0]});for(var p=function(_,x){return or((x-_)/n)},d=i.intervalCount,v=o[0],m=0;;m++){if(d==null){if(v>o[1]||!isFinite(v)||!isFinite(o[1]))break}else{if(m>d)break;v=Xe(v,o[1]),m===d&&(v=o[1])}if(f.push({value:v}),v=we(v+n,s),u){var g=u.calcNiceTickMultiple(v,p);g>=0&&(v=we(v+g*n,s))}if(f.length>0&&v===f[f.length-1].value)break;if(f.length>h)return[]}var y=f.length?f[f.length-1].value:o[1];return a[1]>y&&f.push({value:e.expandToNicedExtent?we(y+n,s):a[1]}),c&&l.pruneTicksByBreak(e.pruneByBreak,f,u.breaks,function(_){return _.value},i.interval,a),c&&e.breakTicks!=="none"&&l.addBreaksToTicks(f,u.breaks,a),f},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this),this._cfg.interval)},t.prototype.getLabel=function(e,i){if(e==null)return"";var n=i&&i.precision;n==null?n=Kt(e.value)||0:n==="auto"&&(n=this._cfg.intervalPrecision);var a=we(e.value,n,!0);return Wu(a)},t.type="interval",t})(ir);ir.registerClass(RA);var Fo=RA;var XB=function(r,t,e,i){for(;e<i;){var n=e+i>>>1;r[n][1]<t?e=n+1:i=n}return e},BA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="time",i.parse=t.parse,i._locale=e.locale,i._useUTC=e.useUTC,i._interval=0;var n=Hh(i,e),a=ol(i,n,null);return i.brk=a.brk,i}return t.prototype.getLabel=function(e){return yn(e.value,cy[tC(Fs(this._minLevelUnit))]||cy.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,i,n){return rC(e,i,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e=e||{};var i=this._interval,n=wn(this),a=it(),o=this.brk,s=a&&o,l=[];if(!i)return l;var u=this._useUTC;if(s&&e.breakTicks==="only_break")return it().addBreaksToTicks(l,o.breaks,n),l;l=ez(this._minLevelUnit,this._approxInterval,u,n,sl(this),o);var c=hr.length-1,f=0;return w(l,function(h){h.time&&(c=Math.min(c,ce(hr,h.time.upperTimeUnit)),f=Math.max(f,h.time.level))}),s&&it().pruneTicksByBreak(e.pruneByBreak,l,o.breaks,function(h){return h.value},this._approxInterval,n),s&&e.breakTicks!=="none"&&it().addBreaksToTicks(l,o.breaks,n,function(h){for(var p=Math.max(ce(hr,_o(h.vmin,u)),ce(hr,_o(h.vmax,u))),d=0,v=0;v<hr.length;v++)if(!zA(hr[v],h.vmin,h.vmax,u)){d=v;break}var m=Math.min(d,c),g=Math.max(m,p);return{level:f,lowerTimeUnit:hr[g],upperTimeUnit:hr[m]}}),l},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return ge(e)?Math.round(e):+qt(e)},t.type="time",t})(ir),rd=[["second",Wh],["minute",Zh],["hour",Rs],["quarter-day",Rs*6],["half-day",Rs*12],["day",Pr*1.2],["half-week",Pr*3.5],["week",Pr*7],["month",Pr*31],["quarter",Pr*95],["half-year",uy/2],["year",uy]];function zA(r,t,e,i){return Bs(new Date(t),r,i).getTime()===Bs(new Date(e),r,i).getTime()}function KB(r,t){return r/=Pr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function qB(r){var t=30*Pr;return r/=t,r>6?6:r>3?3:r>2?2:1}function jB(r){return r/=Rs,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function FA(r,t){return r/=t?Zh:Wh,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function $B(r){return Se(un(r,!0),1)}function JB(r,t,e){var i=Math.max(0,ce(hr,t)-1);return Bs(new Date(r),hr[i],e).getTime()}function QB(r,t){var e=new Date(0);e[r](1);var i=e.getTime();e[r](1+t);var n=e.getTime()-i;return function(a,o){return Math.max(0,Math.round((o-a)/n))}}function ez(r,t,e,i,n,a){var o=3e3,s=JT,l=0;function u(V,q,G,j,oe,ie,pe){for(var de=QB(oe,V),te=q,Te=new Date(te);te<G&&te<=i[1]&&(pe.push({value:te}),!(l++>o));)if(Te[oe](Te[j]()+V),te=Te.getTime(),a){var Pe=a.calcNiceTickMultiple(te,de);Pe>0&&(Te[oe](Te[j]()+Pe*V),te=Te.getTime())}pe.push({value:te,notAdd:te>i[1]})}function c(V,q,G){var j=[],oe=!q.length;if(!zA(Fs(V),i[0],i[1],e)){oe&&(q=[{value:JB(i[0],V,e)},{value:i[1]}]);for(var ie=0;ie<q.length-1;ie++){var pe=q[ie].value,de=q[ie+1].value;if(pe!==de){var te=void 0,Te=void 0,Pe=void 0,vt=!1;switch(V){case"year":te=Math.max(1,Math.round(t/Pr/365)),Te=fy(e),Pe=iC(e);break;case"half-year":case"quarter":case"month":te=qB(t),Te=Xh(e),Pe=hy(e);break;case"week":case"half-week":case"day":te=KB(t,31),Te=Kh(e),Pe=py(e),vt=!0;break;case"half-day":case"quarter-day":case"hour":te=jB(t),Te=qh(e),Pe=dy(e);break;case"minute":te=FA(t,!0),Te=jh(e),Pe=vy(e);break;case"second":te=FA(t,!1),Te=$h(e),Pe=my(e);break;case"millisecond":te=$B(t),Te=Jh(e),Pe=gy(e);break}de>=i[0]&&pe<=i[1]&&u(te,pe,de,Te,Pe,vt,j),V==="year"&&G.length>1&&ie===0&&G.unshift({value:G[0].value-te})}}for(var ie=0;ie<j.length;ie++)G.push(j[ie])}}for(var f=[],h=[],p=0,d=0,v=0;v<s.length;++v){var m=Fs(s[v]);if(eC(s[v])){c(s[v],f[f.length-1]||[],h);var g=s[v+1]?Fs(s[v+1]):null;if(m!==g){if(h.length){d=p,h.sort(function(V,q){return V.value-q.value});for(var y=[],_=0;_<h.length;++_){var x=h[_].value;(_===0||h[_-1].value!==x)&&(y.push(h[_]),x>=i[0]&&x<=i[1]&&p++)}var b=n/t;if(p>b*1.5&&d>b/1.5||(f.push(y),p>b||r===s[v]))break}h=[]}}}for(var S=Be(U(f,function(V){return Be(V,function(q){return q.value>=i[0]&&q.value<=i[1]&&!q.notAdd})}),function(V){return V.length>0}),T=S.length-1,A=[],v=0;v<S.length;++v)for(var E=S[v],M=0;M<E.length;++M){var O=_o(E[M].value,e);A.push({value:E[M].value,time:{level:T-v,upperTimeUnit:O,lowerTimeUnit:O}})}ys(A,HS,null),A.sort(function(V,q){return V.value-q.value});var L=A[0],I=A[A.length-1],k=_o(i[0],e),z=_o(i[1],e);return(!L||L.value>i[0])&&A.unshift({value:i[0],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),(!I||I.value<i[1])&&A.push({value:i[1],time:{level:0,upperTimeUnit:z,lowerTimeUnit:z},notNice:!0}),A}var VA=function(r,t){var e=r.getExtent();if(e[0]===e[1]&&(e[0]-=Pr,e[1]+=Pr),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-Pr}r.setExtent(e[0],e[1]);var n=yc(t.splitNumber,10),a=sl(r)/n,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var l=rd.length,u=Math.min(XB(rd,a,0,l),l-1),c=rd[u][1],f=rd[Math.max(u-1,0)][0];r.setTimeInterval({approxInterval:a,interval:c,minLevelUnit:f})};ir.registerClass(BA);var UA=BA;var id=0,nd=1,tz=2,WA=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i.type="log",i.parse=Fo.parse,i.base=e.logBase||10;var n=[],a=[],o=i._lookup={from:n,to:a};n[id]=n[nd]=a[id]=a[nd]=NaN,jp(i,t.mapperMethods);var s=it(),l=e.breakOption,u={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(l,i,{noNegative:!0},tz,u),i.powStub=new Fo({breakParsed:u.original}),i.intervalStub=new Fo({breakParsed:u.transformed}),$p(i,i.intervalStub),i}return t.prototype.getTicks=function(e){var i=this.base,n=this.powStub,a=it(),o=this.intervalStub,s=o.getExtent(),l=n.getExtent(),u={lookup:{from:s,to:l}};return U(o.getTicks(e||{}),function(c){var f=c.value,h=Qp(f,i,u),p;if(a){var d=a.getTicksBreakOutwardTransform(this,c,go(n),this._lookup);d&&(p=d.vBreak,h=d.tickVal)}return{value:h,break:p}},this)},t.prototype.getMinorTicks=function(e){return ul(this,e,go(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,i){return this.intervalStub.getLabel(e,i)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(gc(e,this.base))},scale:function(e){return Qp(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,i){return e=gc(e,this.base),i&&i.depth===al?e:this.intervalStub.transformIn(e,i)},transformOut:function(e,i){var n=i?i.depth:null;return HA.depth=n,GA.lookup=this._lookup,Qp(n===al?e:this.intervalStub.transformOut(e,HA),this.base,GA)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,i){this.setExtent2(pr,e,i)},setExtent2:function(e,i,n){if(!(!fn(i,n)||i<=0||n<=0)){var a=YA,o=YA;if(e===pr){var s=this._lookup;a=s.to,o=s.from}this.powStub.setExtent2(e,a[id]=i,a[nd]=n);var l=this.base;this.intervalStub.setExtent2(e,o[id]=gc(i,l),o[nd]=gc(n,l))}},getFilter:function(){return{g:0}},sanitize:function(e,i){return fn(i[0],i[1])&>(e)&&e<=0&&(e=i[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,i){return i===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,i)}},t})(ir);ir.registerClass(WA);var HA={},GA={},YA=[],ZA=WA;var ad={value:1,category:1,time:1,log:1};var XA=re();function sd(r){var t=r.get("type");return(t==null||!We(ad,t)&&!ir.getClass(t))&&(t="value"),t}function ld(r,t,e){var i=it(),n;switch(i&&(n=D0(r,t,e)),t){case"category":return new kA({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:Rt()});case"time":return new UA({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC"),breakOption:n});case"log":return new ZA({logBase:r.get("logBase"),breakOption:n});case"value":return new Fo({breakOption:n});default:return new(ir.getClass(t)||Fo)({})}}function KA(r,t,e){var i=e?Ro(r,null):r.getExtentUnsafe(pr,null),n=i[0],a=i[1];return fn(n,a)?n===t||a===t?iz:n<t&&a>t?rz:od:od}var rz=1,iz=2,od=3;function qA(r){XA(r).noOnMyZero=!0}function jA(r){return XA(r).noOnMyZero}function _c(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=QT(t);return function(n,a){return r.scale.getFormattedLabel(n,a,e)}}else{if(H(t))return function(n){var a=r.scale.getLabel(n),o=t.replace("{value}",a??"");return o};if($(t)){if(r.type==="category")return function(n,a){return t(cl(r,n),n.value-r.scale.getExtent()[0],null)};var i=it();return function(n,a){var o=null;return i&&(o=i.makeAxisLabelFormatterParamBreak(o,n.break)),t(cl(r,n),a,o)}}else return function(n){return r.scale.getLabel(n)}}}function cl(r,t){var e=r.scale;return lt(e)?e.getLabel(t):t.value}function ud(r){var t=r.get("interval");return t??"auto"}function $A(r){return r.type==="category"&&ud(r.getLabelModel())===0}function JA(r,t){var e={};return w(r.mapDimensionsAll(t),function(i){e[il(r,i)]=!0}),De(e)}function fa(r){return r==="middle"||r==="center"}function Bo(r){return r.getShallow("show")}function D0(r,t,e){var i=r.get("breaks",!0);if(i!=null){if(!it())return;if(!e||!nz(t)){if(0)var n;return}return i}}function nz(r){return r!=="category"}function cd(r,t,e,i,n,a){var o=qi(r),s=o?r.intervalStub:r;if(s.setExtent(i[0],i[1]),o){var l=r.powStub,u={depth:al},c=r.transformOut(i[0],u),f=r.transformOut(i[1],u),h=PA(e,i);t[0]&&!h[0]&&(c=n[0]),t[1]&&!h[1]&&(f=n[1]),l.setExtent(c,f)}s.setConfig(a)}function Tn(r,t){return lt(r)?r.getRawOrdinalNumber(t.value):t.value}function fd(r,t){return lt(r)&&!!t.get("boundaryGap")}var hd=(function(){function r(){}return r.prototype.needIncludeZero=function(){return!this.option.scale},r.prototype.getCoordSysModel=function(){},r})();var az=gs(),pd="|&",fl=re(),dd=-2,QA=-1,oz=re();function eD(r,t){var e=r.model,i=fl(Oo(e.ecModel)).keyed,n=i&&i.get(t);return n&&n.get(e.uid)}function tD(r,t){return nD(eD(r,t))}function rD(r,t){var e=[];return iD(r.model.ecModel,function(i){for(var n=0;n<t.length;n++)t[n]&&i.serByIdx[t[n].seriesIndex]&&e.push(nD(i))}),e}function iD(r,t){var e=fl(Oo(r)).keyed;e&&e.each(function(i,n){i.each(function(a,o){t(a,n,o)})})}function nD(r){return{liPosMinGap:r?r.liPosMinGap:void 0}}function aD(r,t){var e=r.model.ecModel,i=fl(Oo(e)).axSer;i&&vd(e,i.get(r.model.uid),t)}function I0(r,t,e){var i=eD(r,t);i&&vd(r.model.ecModel,i.sers,e)}function vd(r,t,e){if(t)for(var i=0;i<t.length;i++){var n=t[i];r.isSeriesFiltered(n)||e(n)}}function oD(r,t,e){var i=fl(Oo(r)).keyed,n=i&&i.get(t);n&&n.each(function(a){e(a.axis)})}function L0(r,t){var e=r.model,i=fl(Oo(e.ecModel)).keys;i&&w(i.get(e.uid),function(n){if(0)var a;t(n)})}function sz(r){var t=oz(Mp(r)),e=t.keyed||(t.keyed=Y());iD(r,function(i,n,a){var o=e.get(n)||e.set(n,Y()),s=o.get(a)||o.set(a,{});i.metrics.liPosMinGap&&lD.liPosMinGap(r,i,s)})}function sD(r,t){lD[r]=t}var lD={};function P0(r,t,e){if(r){var i=t.ecModel,n=fl(Oo(i)),a=r.model.uid;if(0)var o,s;var l=n.axSer||(n.axSer=Y()),u=l.get(a)||l.set(a,[]);if(0)var c;u.push(t);var f=t.subType,h=t.getBaseAxis()===r,p=O0.get(M0(f,h,e))||O0.get(M0(f,h,null));if(p){var d=n.keyed||(n.keyed=Y()),v=n.keys||(n.keys=Y()),m=p.key,g=d.get(m)||d.set(m,Y()),y=g.get(a);y||(y=g.set(a,{axis:r,sers:[],serByIdx:[]}),y.metrics=p.getMetrics(r),(v.get(a)||v.set(a,[])).push(m)),y.sers.push(t),y.serByIdx[t.seriesIndex]=t}}}function M0(r,t,e){return r+pd+Z(t,!0)+pd+(e||"")}function uD(r,t){var e=M0(t.seriesType,t.baseAxis,t.coordSysType);O0.set(e,t),az(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:sz})})}var O0=Y();var lz=re(),hD=1,pD=2,uz=3,dD=(function(){function r(t,e,i,n,a){var o=lt(t),s=o?e.getCategories().length:null,l;if(o){var u=e.getCategories(!0);l=u&&!u.length}var c=i.slice();(ll(t)||qi(t)||Ki(t))&&($m(c,xc(t,e.get("dataMin",!0))),Jm(c,xc(t,e.get("dataMax",!0)))),US(c)||(c[0]=c[1]=NaN);var f=[],h=[!1,!1],p=e.get("min",!0);p==="dataMin"?(f[0]=c[0],h[0]=!0):(f[0]=xc(t,$(p)?p({min:c[0],max:c[1]}):p),h[0]=f[0]!=null);var d=e.get("max",!0);d==="dataMax"?(f[1]=c[1],h[1]=!0):(f[1]=xc(t,$(d)?d({min:c[0],max:c[1]}):d),h[1]=f[1]!=null);var v=cz(t,e),m=o?null:c[1]-c[0]||Math.abs(c[0]);f[0]==null&&(f[0]=o?l?c[0]:s?0:NaN:c[0]-v[0]*m),f[1]==null&&(f[1]=o?l?c[1]:s?s-1:NaN:c[1]+v[1]*m),!di(f[0])&&(f[0]=NaN),!di(f[1])&&(f[1]=NaN);var g=l||en(f[0])||en(f[1])||o&&!s,y=ll(t),_=y&&e.needIncludeZero&&e.needIncludeZero();_&&(f[0]>0&&f[1]>0&&!h[0]&&(f[0]=0),f[0]<0&&f[1]<0&&!h[1]&&(f[1]=0));var x=!1;f[0]>f[1]&&(f.reverse(),x=!0);var b=xc(t,e.get("startValue",!0)),S=b!=null;!gt(b)&&n&&(b=t.getDefaultStartValue?t.getDefaultStartValue():0),gt(b)&&(S||!y||_)&&(b<f[0]&&!h[0]?(f[0]=b,h[0]=!0):b>f[1]&&!h[1]&&(f[1]=b,h[1]=!0));var T=this._i={scale:t,dataMM:c,noZoomEffMM:f,zoomMM:[],fixMM:h,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:_,tggAxInv:x,ctnShp:a};cD(T,f)}return r.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},r.prototype.makeFinal=function(){var t=this._i,e=t.zoomMM,i=t.noZoomEffMM,n=t.zoomFixMM,a=t.fixMM,o={fixMM:a,zoomFixMM:n,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:i.slice()},s=o.effMM;return e[0]!=null&&(s[0]=e[0],a[0]=n[0]=!0),e[1]!=null&&(s[1]=e[1],a[1]=n[1]=!0),cD(t,s),o},r.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},r.prototype.setZoomMM=function(t,e){this._i.zoomMM[t]=e},r})();function cD(r,t){var e=r.scale,i=r.dataMM;e.sanitize&&(t[0]=e.sanitize(t[0],i),t[1]=e.sanitize(t[1],i),ms(t))}function xc(r,t){return t==null?null:en(t)?NaN:r.parse(t)}function cz(r,t){var e;if(lt(r))e=[0,0];else{var i=t.get("boundaryGap");typeof i=="boolean"&&(i=null),e=F(i)?i:[i,i]}return[fD(e[0]),fD(e[1])]}function fD(r){return fi(typeof r=="boolean"?0:r,1)||0}function vD(r){var t=lz(r.scale);return t.extent||(t.extent=Rt()),t}function mD(r,t){vD(r).dimIdxInCoord=t.get(r.dim)}function md(r,t){var e=r.scale,i=r.model,n=r.dim;e.rawExtentInfo||fz(e,r,n,i,t)}function fz(r,t,e,i,n){var a=vD(t),o=a.extent,s=!1;aD(t,function(c){if(c.boxCoordinateSystem){var f=ip(c).coord,h=a.dimIdxInCoord;if(h>=0){if(F(f)){var p=f[h];p!=null&&!F(p)&&Tu(o,r.parse(p))}}}else if(c.coordinateSystem){var d=c.getData();if(d){var v=r.getFilter?r.getFilter():null;w(JA(d,e),function(m){VS(o,d.getApproximateExtent(m,v))})}c.__requireStartValue&&c.__requireStartValue(t)&&(s=!0)}});var l=pz(r,t,i),u=new dD(r,i,o,s,l);gD(r,u,n),a.extent=null}function hz(r,t){var e=r.scale;gD(e,new dD(e,r.model,t,!1,!1),uz)}function gD(r,t,e){r.rawExtentInfo=t,t.from=e}function yD(r,t){N0.set(r,t)}var N0=Y();function gd(r,t,e,i,n){r.rawExtentInfo||hz({scale:r,model:t},n||Rt());var a=r.rawExtentInfo.makeFinal(),o=a.effMM;return r.setExtent(o[0],o[1]),r.setBlank(a.isBlank),i&&a.tggAxInv&&e&&!e.get("legacyMinMaxDontInverseAxis")&&(i.inverse=!i.inverse),a}function pz(r,t,e){var i=fd(r,e),n=e.get("containShape",!0);if(n==null&&!i&&(n=!0),!n)return!1;var a=!1;return L0(t,function(o){a=!!N0.get(o)||a}),a}function _D(r,t,e,i){if(e.ctnShp){var n;if(L0(r,function(s){var l=N0.get(s);if(l){var u=l(r,i);u&&(n=n||[0,0],$m(n,u[0]),Jm(n,u[1]),qA(r))}}),!!n){var a=t.getExtent();if(lt(t))r.onBand||t.setExtent2(nl,Xe(a[0],a[0]+n[0]),Se(a[1],a[1]+n[1]));else{var o=a.slice();e.zoomFixMM[0]||(o[0]=Xe(o[0],t.transformOut(t.transformIn(o[0],null)+n[0],null))),e.zoomFixMM[1]||(o[1]=Se(o[1],t.transformOut(t.transformIn(o[1],null)+n[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(nl,o[0],o[1])}}}}function xD(r,t){var e=qi(r),i=e?r.intervalStub:r,n=t.fixMinMax||[],a=e?r.getExtent():null,o=i.getExtent(),s=ed(o,n,t.rawExtentResult);i.setExtent(s[0],s[1]),s=i.getExtent();var l=e?vz(i,t):dz(i,t),u=l.intervalPrecision,c=l.interval,f=t.userInterval;f!=null&&(l.interval=f,l.intervalPrecision=xi(f)),n[0]||(s[0]=we(sr(s[0]/c)*c,u)),n[1]||(s[1]=we(Li(s[1]/c)*c,u)),f!=null&&(l.niceExtent=s.slice()),cd(r,n,o,s,a,l)}function dz(r,t){var e=yc(t.splitNumber,5),i=sl(r),n=t.minInterval,a=t.maxInterval,o=un(i/e,!0);n!=null&&o<n&&(o=n),a!=null&&o>a&&(o=a);var s=xi(o),l=r.getExtent(),u=[we(Li(l[0]/o)*o,s),we(sr(l[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:u}}function vz(r,t){var e=yc(t.splitNumber,10),i=r.getExtent(),n=sl(r),a=Se(hs(n),1),o=e/n*a;o<=.5&&(a*=10);var s=xi(a),l=[we(Li(i[0]/a)*a,s),we(sr(i[1]/a)*a,s)];return{intervalPrecision:s,interval:a,niceExtent:l}}function k0(r){var t=r.scale,e=r.model,i=e.axis,n=e.ecModel;R0(t,e,i,n,null)}function R0(r,t,e,i,n){var a=gd(r,t,i,e,n),o=ll(r)||Ki(r);mz(r,{splitNumber:t.get("splitNumber"),fixMinMax:a.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:a}),e&&i&&_D(e,r,a,i)}function mz(r,t){gz[r.type](r,t)}var gz={interval:xD,log:xD,time:VA,ordinal:Ze};function yz(r){return ca(null,r)}var _z={isDimensionStacked:Rr,enableDataStack:qp,getStackedDimension:il};function xz(r,t){var e=t;t instanceof Re||(e=new Re(t));var i=sd(e),n=ld(e,i,!1);return r[1]<r[0]&&(r=r.slice().reverse()),R0(n,e,null,null,r),n}function bz(r){mt(r,hd)}function Sz(r,t){return t=t||{},Lr(r,null,null,t.state!=="normal")}var bD=[],wz={registerPreprocessor:Gp,registerProcessor:Yp,registerPostInit:p0,registerPostUpdate:d0,registerUpdateLifecycle:uc,registerAction:Xi,registerCoordinateSystem:v0,registerLayout:m0,registerVisual:Sn,registerTransform:_0,registerLoading:Wp,registerMap:y0,registerImpl:O1,PRIORITY:u0,ComponentModel:Le,ComponentView:nt,SeriesModel:tr,ChartView:Ft,registerComponentModel:function(r){Le.registerClass(r)},registerComponentView:function(r){nt.registerClass(r)},registerSeriesModel:function(r){tr.registerClass(r)},registerChartView:function(r){Ft.registerClass(r)},registerCustomSeries:function(r,t){Dp(r,t)},registerSubTypeDefaulter:function(r,t){Le.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){Hm(r,t)}};function Pt(r){if(F(r)){w(r,function(t){Pt(t)});return}ce(bD,r)>=0||(bD.push(r),$(r)&&(r={install:r}),r.install(wz))}var Tz=1e-8;function SD(r,t){return Math.abs(r-t)<Tz}function B0(r,t,e){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var o=r[a];i+=qr(n[0],n[1],o[0],o[1],t,e),n=o}var s=r[0];return(!SD(n[0],s[0])||!SD(n[1],s[1]))&&(i+=qr(n[0],n[1],s[0],s[1],t,e)),i!==0}var Az=[];function z0(r,t){for(var e=0;e<r.length;e++)ht(r[e],r[e],t)}function wD(r,t,e,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Vr(t,t,a),Ur(e,e,a))}}function Dz(r){for(var t=0,e=0,i=0,n=r.length,a=r[n-1][0],o=r[n-1][1],s=0;s<n;s++){var l=r[s][0],u=r[s][1],c=a*u-l*o;t+=c,e+=(a+l)*c,i+=(o+u)*c,a=l,o=u}return t?[e/t/3,i/t/3,t]:[r[0][0]||0,r[0][1]||0]}var TD=(function(){function r(t){this.name=t}return r.prototype.setCenter=function(t){this._center=t},r.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},r})();var V0=(function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r})();var U0=(function(){function r(t){this.type="linestring",this.points=t}return r})();var CD=(function(r){N(t,r);function t(e,i,n){var a=r.call(this,e)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return t.prototype.calcCenter=function(){for(var e=this.geometries,i,n=0,a=0;a<e.length;a++){var o=e[a],s=o.exterior,l=s&&s.length;l>n&&(i=o,n=l)}if(i)return Dz(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?wD(s.exterior,n,a,e):w(s.points,function(l){wD(l,n,a,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new ue(n[0],n[1],a[0]-n[0],a[1]-n[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(e[0],e[1]))return!1;e:for(var a=0,o=n.length;a<o;a++){var s=n[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(B0(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(B0(u[c],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=o.width/o.height;n?a||(a=n/s):n=s*a;for(var l=new ue(e,i,n,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(z0(h.exterior,u),w(h.interiors,function(p){z0(p,u)})):w(h.points,function(p){z0(p,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var i=new t(e,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},t})(TD);var t9=(function(r){N(t,r);function t(e,i){var n=r.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,i=e.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=Hr(Az),o=e;o&&!o.isGeoSVGGraphicRoot;)li(a,o.getLocalTransform(),a),o=o.parent;return Tr(a,a),ht(n,n,a),n},t})(TD);function Ez(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var i=t.features;return w(i,function(n){var a=n.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=AD(s,o,e);break;case"Polygon":H0(s,o,e);break;case"MultiLineString":H0(s,o,e);break;case"MultiPolygon":w(s,function(l,u){return H0(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function H0(r,t,e){for(var i=0;i<r.length;i++)r[i]=AD(r[i],t[i],e)}function AD(r,t,e){for(var i=[],n=t[0],a=t[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/e,l/e])}return i}function yd(r,t){return r=Ez(r),U(Be(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,n=e.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new V0(o[0],o.slice(1)));break;case"MultiPolygon":w(n.coordinates,function(l){l[0]&&a.push(new V0(l[0],l.slice(1)))});break;case"LineString":a.push(new U0([n.coordinates]));break;case"MultiLineString":a.push(new U0(n.coordinates))}var s=new CD(i[t||"name"],a,i.cp);return s.properties=i,s})}var G0={};Sr(G0,{MAX_SAFE_INTEGER:()=>mu,asc:()=>Ct,getPercentWithPrecision:()=>CS,getPixelPrecision:()=>TS,getPrecision:()=>Kt,getPrecisionSafe:()=>Ym,isNumeric:()=>yu,isRadianAroundZero:()=>Ga,linearMap:()=>je,nice:()=>un,numericToNumber:()=>Wr,parseDate:()=>qt,parsePercent:()=>Ve,quantile:()=>AS,quantity:()=>hs,quantityExponent:()=>ps,reformIntervals:()=>DS,remRadian:()=>gu,round:()=>wS});var Y0={};Sr(Y0,{format:()=>yn,parse:()=>qt,roundTime:()=>Bs});var W0={};Sr(W0,{Arc:()=>ao,BezierCurve:()=>no,BoundingRect:()=>ue,Circle:()=>to,CompoundPath:()=>Th,Ellipse:()=>Fu,Group:()=>Ee,Image:()=>ur,IncrementalDisplayable:()=>Ih,Line:()=>Qt,LinearGradient:()=>As,Polygon:()=>Gi,Polyline:()=>io,RadialGradient:()=>Ah,Rect:()=>Oe,Ring:()=>Vu,Sector:()=>Hi,Text:()=>He,clipPointsByRect:()=>ey,clipRectByRect:()=>ty,createIcon:()=>po,extendPath:()=>qg,extendShape:()=>Kg,getShapeClass:()=>jg,getTransform:()=>Gu,initProps:()=>Ot,makeImage:()=>Hu,makePath:()=>Os,mergePath:()=>$g,registerShape:()=>Ir,resizePath:()=>Nh,updateProps:()=>Ke});var Z0={};Sr(Z0,{addCommas:()=>Wu,capitalFirst:()=>oC,encodeHTML:()=>wt,formatTime:()=>aC,formatTpl:()=>Vs,getTextRect:()=>yy,getTooltipMarker:()=>ep,normalizeCssArray:()=>Wi,toCamelCase:()=>zs,truncateText:()=>ng});var X0={};Sr(X0,{bind:()=>ee,clone:()=>ne,curry:()=>Ae,defaults:()=>he,each:()=>w,extend:()=>B,filter:()=>Be,indexOf:()=>ce,inherits:()=>Zl,isArray:()=>F,isFunction:()=>$,isObject:()=>W,isString:()=>H,map:()=>U,merge:()=>me,reduce:()=>zt});var Mz=re(),bc=re(),dr={estimate:1,determine:2};function hl(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function DD(r,t){var e=r.getLabelModel().get("customValues");if(e){var i=r.scale;return{labels:U(MD(e,i),function(n,a){return{formattedLabel:_c(r)(n,a),rawLabel:i.getLabel(n),tick:n}})}}return r.type==="category"?Oz(r,t):Lz(r)}function ED(r,t,e){var i=r.scale,n=r.getTickModel().get("customValues");return n?{ticks:MD(n,i)}:r.type==="category"?Iz(r,t):{ticks:i.getTicks(e)}}function MD(r,t){var e=t.getExtent(),i=[];return w(r,function(n){n=t.parse(n),n>=e[0]&&n<=e[1]&&i.push(n)}),ys(i,GS,null),Ct(i),U(i,function(n){return{value:n}})}function Oz(r,t){var e=r.getLabelModel(),i=OD(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:i}function OD(r,t,e){var i=Nz(r),n=ud(t),a=e.kind===dr.estimate;if(!a){var o=LD(i,n);if(o)return o}var s,l;$(n)?s=_d(r,n,!1):(l=n==="auto"?kz(r,e):n,s=_d(r,l,!1));var u={labels:s,labelCategoryInterval:l};return a?e.out.noPxChangeTryDetermine.push(function(){return K0(i,n,u),!0}):K0(i,n,u),u}function Iz(r,t){var e=Pz(r),i=ud(t),n=LD(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),$(i))a=_d(r,i,!0);else if(i==="auto"){var s=OD(r,r.getLabelModel(),hl(dr.determine));o=s.labelCategoryInterval,a=U(s.labels,function(l){return l.tick})}else o=i,a=_d(r,o,!0);return K0(e,i,{ticks:a,tickCategoryInterval:o})}function Lz(r){var t=r.scale.getTicks(),e=_c(r);return{labels:U(t,function(i,n){return{formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tick:i}})}}var Pz=ID("axisTick"),Nz=ID("axisLabel");function ID(r){return function(e){return bc(e)[r]||(bc(e)[r]={list:[]})}}function LD(r,t){for(var e=0;e<r.list.length;e++)if(r.list[e].key===t)return r.list[e].value}function K0(r,t,e){return r.list.push({key:t,value:e}),e}function kz(r,t){if(t.kind===dr.estimate){var e=r.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return bc(r).autoInterval=e,!0}),e}var i=bc(r).autoInterval;return i??(bc(r).autoInterval=r.calculateCategoryInterval(t))}function PD(r,t){var e=t.kind,i=Fz(r),n=_c(r),a=(i.axisRotate-i.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=r.dataToCoord(f+1)-r.dataToCoord(f),p=Math.abs(h*Math.cos(a)),d=Math.abs(h*Math.sin(a)),v=0,m=0;f<=s[1];f+=u){var g=0,y=0,_=Wf(n({value:f}),i.font,"center","top");g=_.width*1.3,y=_.height*1.3,v=Math.max(v,g,7),m=Math.max(m,y,7)}var x=v/p,b=m/d;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(e===dr.estimate)return t.out.noPxChangeTryDetermine.push(ee(Rz,null,r,S,l)),S;var T=ND(r,S,l);return T??S}function Rz(r,t,e){return ND(r,t,e)==null}function ND(r,t,e){var i=Mz(r.model),n=r.getExtent(),a=i.lastAutoInterval,o=i.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-e)<=1&&a>t&&i.axisExtent0===n[0]&&i.axisExtent1===n[1])return a;i.lastTickCount=e,i.lastAutoInterval=t,i.axisExtent0=n[0],i.axisExtent1=n[1]}function Fz(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function _d(r,t,e){var i=_c(r),n=r.scale,a=[],o=$(t);return td(n,o?0:t,function(s,l){var u=n.getLabel(s);if(o){var c=!!t(s.value,u);if(s.offInterval=!c,!c&&!l)return}a.push(e?s:{formattedLabel:i(s),rawLabel:u,tick:s})}),a}var Bz=.8;function bi(r,t){t=t||{};var e={w:NaN,w2:NaN},i=r.scale,n=t.fromStat,a=t.min,o=IA(i);gt(o)||(o=NaN);var s=r.getExtent(),l=Ge(s[1]-s[0]);return lt(i)?zz(e,r,o,l):n?Vz(e,r,o,l,n):a==null,a!=null&&(e.w=gt(e.w)?Se(a,e.w):a),e}function zz(r,t,e,i){var n=t.onBand,a=e+(n?1:0);a===0&&(a=1),r.w=i/a,!n&&e&&i&&(r.w2=r.w*e/i)}function Vz(r,t,e,i,n){var a=!1,o=-1/0;w(n.key?[tD(t,n.key)]:rD(t,n.sers||[]),function(s){var l=s.liPosMinGap;l!=null&&(l>0?(l>o&&(o=l),a=!1):l===dd&&(a=!0))}),gt(e)&&e>0&>(o)?(r.w=i/e*o,r.w2=o):a&&(r.w=i*Bz,r.w2=r.w*e/i)}var kD=[0,1],Uz=(function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this.scale;return t=i.normalize(i.parse(t)),je(t,kD,RD(this),e)},r.prototype.coordToData=function(t,e){var i=je(t,RD(this),kD,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=ED(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=U(i.ticks,function(s){return{coord:this.dataToCoord(Tn(this.scale,s)),tick:s}},this),a=e.get("alignWithLabel"),o=Hz(this,n,a);return U(n,function(s){return{coord:s.coord,tickValue:s.tick.value,onBand:o}})},r.prototype.getMinorTicksCoords=function(){if(lt(this.scale))return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=U(i,function(a){return U(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||hl(dr.determine),DD(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){return bi(this,{min:1}).w},r.prototype.calculateCategoryInterval=function(t){return t=t||hl(dr.determine),PD(this,t)},r})();function RD(r){var t=r.getExtent();if(r.onBand){var e=t[1]-t[0],i=e/r.scale.count()/2;t[0]+=i,t[1]-=i}return t}function Hz(r,t,e){var i=t.length;if(!r.onBand||e||!i)return!1;var n=bi(r).w;if(!n)return!1;w(t,function(s){s.coord-=n/2});var a=r.scale.getExtent(),o=t[i-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+n,tick:{value:a[1]+1}}),!0}var xd=Uz;function Gz(r){var t=Le.extend(r);return Le.registerClass(t),t}function Yz(r){var t=nt.extend(r);return nt.registerClass(t),t}function Wz(r){var t=tr.extend(r);return tr.registerClass(t),t}function Zz(r){var t=Ft.extend(r);return Ft.registerClass(t),t}var FD=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Xz=1,bd=2,zD=Xz|bd;function Sc(r,t,e){e=e||zD,t?r.dirty|=e:r.dirty&=~e}function VD(r,t){return t=t||zD,r.dirty==null||!!(r.dirty&t)}function Si(r){if(r)return VD(r)&&Kz(r,r.label,r),r}function Kz(r,t,e){var i=t.getComputedTransform();r.transform=Rh(r.transform,i);var n=r.localRect=Ps(r.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=e&&e.marginForce,l=e&&e.minMarginForce,u=e&&e.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=vo.textMargin);for(var f=0;f<4;f++)q0[f]=c===vo.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===vo.textMargin&&Is(n,q0,!1,!1);var h=r.rect=Ps(r.rect,n);return i&&h.applyTransform(i),c===vo.minMargin&&Is(h,q0,!1,!1),r.axisAligned=kh(i),(r.label=r.label||{}).ignore=t.ignore,Sc(r,!1),Sc(r,!0,bd),r}var q0=[0,0,0,0];function UD(r,t,e){return r.transform=Rh(r.transform,e),r.localRect=Ps(r.localRect,t),r.rect=Ps(r.rect,t),e&&r.rect.applyTransform(e),r.axisAligned=kh(e),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function HD(r,t){if(r){r.label.x+=t.x,r.label.y+=t.y,r.label.markRedraw();var e=r.transform;e&&(e[4]+=t.x,e[5]+=t.y);var i=r.rect;i&&(i.x+=t.x,i.y+=t.y);var n=r.obb;n&&n.fromBoundingRect(r.localRect,e)}}function j0(r,t){for(var e=0;e<FD.length;e++){var i=FD[e];r[i]==null&&(r[i]=t[i])}return Si(r)}function BD(r){var t=r.obb;return(!t||VD(r,bd))&&(r.obb=t=t||new Oh,t.fromBoundingRect(r.localRect,r.transform),Sc(r,!1,bd)),t}function GD(r){var t=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function e(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var i=0;i<r.length;i++){var n=Si(r[i]);if(!n.label.ignore){for(var a=n.label,o=n.labelLine,s=!1,l=0;l<t.length;l++)if(Sd(n,t[l],null,{touchThreshold:.05})){s=!0;break}s?(e(a),o&&e(o)):t.push(n)}}}function Sd(r,t,e,i){return!r||!t||r.label&&r.label.ignore||t.label&&t.label.ignore||!r.rect.intersect(t.rect,e,i)?!1:r.axisAligned&&t.axisAligned?!0:BD(r).intersect(BD(t),e,i)}var qz=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){if(0)var i;return ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new Ee,n=It("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(n),n.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=It(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=K.color.neutral00,u.style.lineWidth=2),i},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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(tr),YD=qz;function pl(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=xn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o<e.length;o++)a.push(xn(r,t,e[o]));return a.join(" ")}}function wd(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!F(t))return t+"";for(var i=[],n=0;n<e.length;n++){var a=r.getDimensionIndex(e[n]);a>=0&&i.push(t[a])}return i.join(" ")}var jz=(function(r){N(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o,s){this.removeAll();var l=It(e,-1,-1,2,2,null,s);l.attr({z2:Z(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=$z,this._symbolType=e,this.add(l)},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(){dn(this.childAt(0))},t.prototype.downplay=function(){vn(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=t.getSymbolZ2(e,i),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,u,h)}else{var p=this.childAt(0);p.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?p.attr(d):Ke(p,d,s,i),Lh(p)}if(this._updateCommon(e,i,l,n,a),c){var p=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Ot(p,d,s,i)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,c,f,h,p,d,v,m,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,p=a.blurScope,v=a.labelStatesModels,m=a.hoverScale,g=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var y=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),p=_.get("blurScope"),d=_.get("disabled"),v=fr(y),m=_.getShallow("scale"),g=y.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Io(e.getItemVisual(i,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var S=e.getItemVisual(i,"style"),T=S.fill;if(s instanceof ur){var A=s.style;s.useStyle(B({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},S))}else s.__isEmptyBrush?s.useStyle(B({},S)):s.useStyle(S),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=e.getItemVisual(i,"liftZ"),M=this._z2;E!=null?M==null&&(this._z2=s.z2,s.z2+=E):M!=null&&(s.z2=M,this._z2=null);var O=o&&o.useNameLabel;$r(s,v,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:T,defaultOpacity:S.opacity});function L(z){return O?e.getName(z):pl(e,z)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var k=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;I.scaleX=this._sizeX*k,I.scaleY=this._sizeY*k,this.setSymbolScale(1),vi(this,h,p,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=_e(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Es(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Es(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return nc(e.getItemVisual(i,"symbolSize"))},t.getSymbolZ2=function(e,i){return e.getItemVisual(i,"z2")},t})(Ee);function $z(r,t){this.parent.drift(r,t)}var wc=jz;function Td(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i&&i.isIgnore&&i.isIgnore(e))&&!(i&&i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function WD(r){return r!=null&&!W(r)&&(r={isIgnore:r}),r||{}}function ZD(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:fr(t),cursorStyle:t.get("cursor")}}function XD(r,t,e,i,n,a,o){var s=new r(t,e,i,n);return s.setPosition(a),t.setItemGraphicEl(e,s),o.add(s),s}var Jz=(function(){function r(t){this.group=new Ee,this._SymbolCtor=t||wc}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=WD(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=this._seriesScope=ZD(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};a||i.removeAll(),t.diff(a).add(function(f){var h=c(f);Td(t,h,f,e)&&XD(o,t,f,l,u,h,i)}).update(function(f,h){var p=a.getItemGraphicEl(h),d=c(f);if(!Td(t,d,f,e)){i.remove(p);return}var v=t.getItemVisual(f,"symbol")||"circle",m=p&&p.getSymbolType&&p.getSymbolType();if(!p||m&&m!==v)i.remove(p),p=new o(t,f,l,u),p.setPosition(d);else{p.updateData(t,f,l,u);var g={x:d[0],y:d[1]};s?p.attr(g):Ke(p,g,n)}i.add(p),t.setItemGraphicEl(f,p)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){i.remove(h)},n)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(t){var e=this._data;if(e)for(var i=this,n=e.getStore(),a=0,o=n.count();a<o;a++){var s=e.getItemGraphicEl(a),l=i._getSymbolPoint(a);Td(e,l,a,t)?(s=s||XD(i._SymbolCtor,e,a,i._seriesScope,{disableAnimation:!0},l,i.group),s.stopAnimation(),s.setPosition(l),s.markRedraw()):s&&(i.group.remove(s),e.setItemGraphicEl(a,null))}},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ZD(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i,n){this._progressiveEls=[],n=WD(n);function a(u){u.isGroup||(u.incremental=i,u.ensureState("emphasis").hoverLayer=co)}for(var o=t.start;o<t.end;o++){var s=e.getItemLayout(o);if(Td(e,s,o,n)){var l=new this._SymbolCtor(e,o,this._seriesScope);l.traverse(a),l.setPosition(s),this.group.add(l),e.setItemGraphicEl(o,l),this._progressiveEls.push(l)}}},r.prototype.eachRendered=function(t){gn(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},i.hostModel)}):e.removeAll()},r})(),KD=Jz;function Cd(r,t,e){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=Qz(n,e),o=i.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=U(r.dimensions,function(d){return t.mapDimension(d)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return Rr(t,f[0])&&(h=!0,f[0]=p),Rr(t,f[1])&&(h=!0,f[1]=p),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Qz(r,t){var e=0,i=r.scale.getExtent();return t==="start"?e=i[0]:t==="end"?e=i[1]:ge(t)&&!isNaN(t)?e=t:i[0]>0?e=i[0]:i[1]<0&&(e=i[1]),e}function Ad(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function vr(r,t){return!isFinite(r)||!isFinite(t)}var eV=typeof Float32Array!==Jn?Float32Array:void 0,qD=typeof Float64Array!==Jn?Float64Array:void 0;function Fr(r){return Dd({ctor:eV},r).arr}function Dd(r,t){var e=r.arr,i=r.ctor;if(t>mu&&(t=mu),!e||r.typed&&e.length<t){var n=void 0;if(i)try{n=new i(t),r.typed=!0,e&&n.set(e)}catch{}if(!n&&(n=[],r.typed=!1,e))for(var a=0,o=e.length;a<o;a++)n[a]=e[a];r.arr=n}return r}function tV(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function J0(r,t,e,i,n,a,o,s){for(var l=tV(r,t),u=[],c=[],f=[],h=[],p=[],d=[],v=[],m=Cd(n,t,o),g=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,T=void 0;switch(x.cmd){case"=":S=x.idx*2,T=x.idx1*2;var A=g[S],E=g[S+1],M=y[T],O=y[T+1];(isNaN(A)||isNaN(E))&&(A=M,E=O),u.push(A,E),c.push(M,O),f.push(e[S],e[S+1]),h.push(i[T],i[T+1]),v.push(t.getRawIndex(x.idx1));break;case"+":var L=x.idx,I=m.dataDimsForPoint,k=n.dataToPoint([t.get(I[0],L),t.get(I[1],L)]);T=L*2,u.push(k[0],k[1]),c.push(y[T],y[T+1]);var z=Ad(m,n,t,L);f.push(z[0],z[1]),h.push(i[T],i[T+1]),v.push(t.getRawIndex(L));break;case"-":b=!1}b&&(p.push(x),d.push(d.length))}d.sort(function(Te,Pe){return v[Te]-v[Pe]});for(var V=u.length,q=Fr(V),G=Fr(V),j=Fr(V),oe=Fr(V),ie=[],_=0;_<d.length;_++){var pe=d[_],de=_*2,te=pe*2;q[de]=u[te],q[de+1]=u[te+1],G[de]=c[te],G[de+1]=c[te+1],j[de]=f[te],j[de+1]=f[te+1],oe[de]=h[te],oe[de+1]=h[te+1],ie[_]=p[pe]}return{current:q,next:G,stackedOnCurrent:j,stackedOnNext:oe,status:ie}}var ha=Math.min,pa=Math.max;function Q0(r,t,e,i,n,a,o,s,l){for(var u,c,f,h,p,d,v=e,m=0;m<i;m++){var g=t[v*2],y=t[v*2+1];if(v>=n||v<0)break;if(vr(g,y)){if(l){v+=a;continue}break}if(v===e)r[a>0?"moveTo":"lineTo"](g,y),f=g,h=y;else{var _=g-u,x=y-c;if(_*_+x*x<.5){v+=a;continue}if(o>0){for(var b=v+a,S=t[b*2],T=t[b*2+1];S===g&&T===y&&m<i;)m++,b+=a,v+=a,S=t[b*2],T=t[b*2+1],g=t[v*2],y=t[v*2+1],_=g-u,x=y-c;var A=m+1;if(l)for(;vr(S,T)&&A<i;)A++,b+=a,S=t[b*2],T=t[b*2+1];var E=.5,M=0,O=0,L=void 0,I=void 0;if(A>=i||vr(S,T))p=g,d=y;else{M=S-u,O=T-c;var k=g-u,z=S-g,V=y-c,q=T-y,G=void 0,j=void 0;if(s==="x"){G=Math.abs(k),j=Math.abs(z);var oe=M>0?1:-1;p=g-oe*G*o,d=y,L=g+oe*j*o,I=y}else if(s==="y"){G=Math.abs(V),j=Math.abs(q);var ie=O>0?1:-1;p=g,d=y-ie*G*o,L=g,I=y+ie*j*o}else G=Math.sqrt(k*k+V*V),j=Math.sqrt(z*z+q*q),E=j/(j+G),p=g-M*o*(1-E),d=y-O*o*(1-E),L=g+M*o*E,I=y+O*o*E,L=ha(L,pa(S,g)),I=ha(I,pa(T,y)),L=pa(L,ha(S,g)),I=pa(I,ha(T,y)),M=L-g,O=I-y,p=g-M*G/j,d=y-O*G/j,p=ha(p,pa(u,g)),d=ha(d,pa(c,y)),p=pa(p,ha(u,g)),d=pa(d,ha(c,y)),M=g-p,O=y-d,L=g+M*j/G,I=y+O*j/G}r.bezierCurveTo(f,h,p,d,g,y),f=L,h=I}else r.lineTo(g,y)}u=g,c=y,v+=a}return m}var jD=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),$D=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new jD},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&vr(n[o*2-2],n[o*2-1]);o--);for(;a<o&&vr(n[a*2],n[a*2+1]);a++);}for(;a<o;)a+=Q0(e,n,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},t.prototype.getPointOn=function(e,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,o=Dr.CMD,s,l,u=i==="x",c=[],f=0;f<a.length;){var h=a[f++],p=void 0,d=void 0,v=void 0,m=void 0,g=void 0,y=void 0,_=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(p=a[f++],d=a[f++],_=u?(e-s)/(p-s):(e-l)/(d-l),_<=1&&_>=0){var x=u?(d-l)*_+l:(p-s)*_+s;return u?[e,x]:[x,e]}s=p,l=d;break;case o.C:p=a[f++],d=a[f++],v=a[f++],m=a[f++],g=a[f++],y=a[f++];var b=u?ka(s,p,v,g,e,c):ka(l,d,m,y,e,c);if(b>0)for(var S=0;S<b;S++){var T=c[S];if(T<=1&&T>=0){var x=u?Je(l,d,m,y,T):Je(s,p,v,g,T);return u?[e,x]:[x,e]}}s=g,l=y;break}}},t})(ve);var rV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(jD),JD=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new rV},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&vr(n[s*2-2],n[s*2-1]);s--);for(;o<s&&vr(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=Q0(e,n,o,s,s,1,i.smooth,l,i.connectNulls);Q0(e,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,e.closePath()}},t})(ve);function e_(r,t,e,i,n){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=e.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new Oe({shape:{x:o,y:s,width:l,height:u}});if(t){var h=r.getBaseAxis(),p=h.isHorizontal(),d=h.inverse;p?(d&&(f.shape.x+=l),f.shape.width=0):(d||(f.shape.y+=u),f.shape.height=0);var v=$(n)?function(m){n(m,f)}:null;Ot(f,{shape:{width:l,height:u,x:o,y:s}},e,null,i,v)}return f}function t_(r,t,e){var i=r.getArea(),n=we(i.r0,1),a=we(i.r,1),o=new Hi({shape:{cx:we(r.cx,1),cy:we(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=n,Ot(o,{shape:{endAngle:i.endAngle,r:a}},e)}return o}function QD(r,t,e,i,n){if(r){if(r.type==="polar")return t_(r,t,e);if(r.type==="cartesian2d")return e_(r,t,e,i,n)}else return null;return null}function Cn(r,t){return r.type===t}function eE(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function tE(r){for(var t=Rt(),e=Rt(),i=0;i<r.length;){var n=r[i++],a=r[i++];vr(n,a)||(Tu(t,n),Tu(e,a))}return[t,e]}function rE(r,t){var e=tE(r),i=e[0],n=e[1],a=tE(t),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(n[0]-s[0]),Math.abs(i[1]-o[1]),Math.abs(n[1]-s[1]))}function iE(r){return ge(r)?r:r?.5:0}function iV(r,t,e){if(e.valueDim==null)return[];for(var i=t.count(),n=Fr(i*2),a=0;a<i;a++){var o=Ad(e,r,t,a);n[a*2]=o[0],n[a*2+1]=o[1]}return n}function da(r,t,e,i,n){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(n){for(l=0;l<r.length;l+=2){var p=t||r;vr(p[l],p[l+1])||h.push(r[l],r[l+1])}r=h}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),i){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var d=(c[o]+f[o])/2,v=[];u[o]=v[o]=d,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function nV(r,t){var e=[],i=r.length,n,a;function o(c,f,h){var p=c.coord,d=(h-p)/(f.coord-p),v=kf(d,[c.color,f.color]);return{coord:h,color:v}}for(var s=0;s<i;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function aV(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=U(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=nV(u,n==="x"?e.getWidth():e.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,v=h[0].coord-d,m=h[p-1].coord+d,g=m-v;if(g<.001)return"transparent";w(h,function(_){_.offset=(_.coord-v)/g}),h.push({offset:p?h[p-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:f[0]||"transparent"});var y=new As(0,0,0,0,h,!0);return y[n]=v,y[n+"2"]=m,y}}}function oV(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&sV(a,t))){var o=t.mapDimension(a.dim),s={};return w(a.getViewLabels(),function(l){l.tick.offInterval||(s[Tn(a.scale,l.tick)]=1)}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function sV(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;o<n;o+=a)if(wc.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function lV(r){for(var t=r.length/2;t>0&&vr(r[t*2-2],r[t*2-1]);t--);return t-1}function nE(r,t){return[r[t*2],r[t*2+1]]}function uV(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=r[u*2+n],!vr(o,r[u*2+1-n])){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function aE(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Jt.length;t++)if(r.get([Jt[t],"endLabel","show"]))return!0;return!1}function r_(r,t,e,i){if(Cn(t,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=aE(i)?function(p,d){r._endLabelOnDuring(p,d,o,s,a,n,t)}:null,u=t.getBaseAxis().isHorizontal(),c=e_(t,e,i,function(){var p=r._endLabel;p&&e&&s.originalX!=null&&p.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return t_(t,e,i)}function cV(r,t){var e=t.getBaseAxis(),i=e.isHorizontal(),n=e.inverse,a=i?n?"right":"left":"center",o=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var fV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Ee,i=new KD;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e,this._changePolyState=ee(this._changePolyState,this)},t.prototype.render=function(e,i,n){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",h=this._coordSys,p=this._symbolDraw,d=this._polyline,v=this._polygon,m=this._lineGroup,g=!i.ssr&&e.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=Cd(a,s,_),b=y&&iV(a,s,x),S=e.get("showSymbol"),T=e.get("connectNulls"),A=S&&!f&&oV(e,s,a),E=this._data;E&&E.eachItemGraphicEl(function(ze,ut){ze.__temp&&(o.remove(ze),E.setItemGraphicEl(ut,null))}),S||p.remove(),o.add(m);var M=f?!1:e.get("step"),O;a&&a.getArea&&e.get("clip",!0)&&(O=a.getArea(),O.width!=null?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O;var L=aV(s,a,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&h.type===a.type&&M===this._step))S&&p.updateData(s,{isIgnore:A,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ze){return[c[ze*2],c[ze*2+1]]}}),g&&this._initSymbolLabelAnimation(s,a,O),M&&(b&&(b=da(b,c,a,M,T)),c=da(c,null,a,M,T)),d=this._newPolyline(c),y?v=this._newPolygon(c,b):v&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,gi(L)),m.setClipPath(r_(this,a,!0,e));else{y&&!v?v=this._newPolygon(c,b):v&&!y&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,gi(L));var I=m.getClipPath();if(I){var k=r_(this,a,!1,e);Ot(I,{shape:k.shape},e)}else m.setClipPath(r_(this,a,!0,e));S&&p.updateData(s,{isIgnore:A,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ze){return[c[ze*2],c[ze*2+1]]}}),(!eE(this._stackedOnPoints,b)||!eE(this._points,c))&&(g?this._doUpdateAnimation(s,b,a,n,M,_,T):(M&&(b&&(b=da(b,c,a,M,T)),c=da(c,null,a,M,T)),d.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:b})))}var z=e.getModel("emphasis"),V=z.get("focus"),q=z.get("blurScope"),G=z.get("disabled");if(d.useStyle(he(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),eo(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var j=d.getState("emphasis").style;j.lineWidth=+d.style.lineWidth+1}_e(d).seriesIndex=e.seriesIndex,vi(d,V,q,G);var oe=iE(e.get("smooth")),ie=e.get("smoothMonotone");if(d.setShape({smooth:oe,smoothMonotone:ie,connectNulls:T}),v){var pe=s.getCalculationInfo("stackedOnSeries"),de=0;v.useStyle(he(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),pe&&(de=iE(pe.get("smooth"))),v.setShape({smooth:oe,stackedOnSmooth:de,smoothMonotone:ie,connectNulls:T}),eo(v,e,"areaStyle"),_e(v).seriesIndex=e.seriesIndex,vi(v,V,q,G)}var te=this._changePolyState;s.eachItemGraphicEl(function(ze){ze&&(ze.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=_;var Te=e.get("triggerEvent"),Pe=e.get("triggerLineEvent"),vt=Pe===!0||Te===!0||Te==="line",bt=Pe===!0||Te===!0||Te==="area";this.packEventData(e,d,vt),v&&this.packEventData(e,v,bt)},t.prototype.packEventData=function(e,i,n){_e(i).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:i===this._polygon?"area":"line"}:null},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Zr(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(vr(c,f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=e.get("zlevel")||0,p=e.get("z")||0;u=new wc(o,s),u.x=c,u.y=f,u.setZ(h,p);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=p,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ft.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Zr(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ft.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Mg(this._polyline,e),i&&Mg(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new $D({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new JD({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");$(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=$(f)?f(null):f;e.eachItemGraphicEl(function(p,d){var v=p;if(v){var m=[p.x,p.y],g=void 0,y=void 0,_=void 0;if(n)if(o){var x=n,b=i.pointToCoord(m);a?(g=x.startAngle,y=x.endAngle,_=-b[1]/180*Math.PI):(g=x.r0,y=x.r,_=b[0])}else{var S=n;a?(g=S.x,y=S.x+S.width,_=p.x):(g=S.y+S.height,y=S.y,_=p.y)}var T=y===g?0:(_-g)/(y-g);l&&(T=1-T);var A=$(f)?f(d):c*T+h,E=v.getSymbolPath(),M=E.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:A}),E.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(aE(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new He({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=lV(l);c>=0&&($r(s,fr(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(f,h,p){return p!=null?wd(o,p):pl(o,f)},enableTextSetter:!0},cV(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=n.getLayout("points"),h=n.hostModel,p=h.get("connectNulls"),d=s.get("precision"),v=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,_=i.shape,x=y?g?_.x:_.y+_.height:g?_.x+_.width:_.y,b=(g?v:0)*(y?-1:1),S=(g?0:-v)*(y?-1:1),T=g?"x":"y",A=uV(f,x,T),E=A.range,M=E[1]-E[0],O=void 0;if(M>=1){if(M>1&&!p){var L=nE(f,E[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(O=h.getRawValue(E[0]))}else{var L=c.getPointOn(x,T);L&&u.attr({x:L[0]+b,y:L[1]+S});var I=h.getRawValue(E[0]),k=h.getRawValue(E[1]);o&&(O=jm(n,d,I,k,A.t))}a.lastFrameIndex=E[0]}else{var z=e===1||a.lastFrameIndex>0?E[0]:0,L=nE(f,z);o&&(O=h.getRawValue(z)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var V=Ns(u);typeof V.setLabelText=="function"&&V.setLabelText(O)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,h=J0(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin,s),p=h.current,d=h.stackedOnCurrent,v=h.next,m=h.stackedOnNext;if(o&&(d=da(h.stackedOnCurrent,h.current,n,o,l),p=da(h.current,null,n,o,l),m=da(h.stackedOnNext,h.next,n,o,l),v=da(h.next,null,n,o,l)),rE(p,v)>3e3||c&&rE(d,m)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=p;var g={shape:{points:v}};h.current!==p&&(g.shape.__points=h.next),u.stopAnimation(),Ke(u,g,f),c&&(c.setShape({points:p,stackedOnPoints:d}),c.stopAnimation(),Ke(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var T=u.shape.__points,A=0;A<y.length;A++){var E=y[A].el,M=y[A].ptIdx*2;E.x=T[M],E.y=T[M+1],E.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(Ft),oE=fV;function i_(r,t){return{seriesType:r,plan:Ao(),reset:function(e){var i=e.getData(),n=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(n){var s=U(n.dimensions,function(p){return i.mapDimension(p)}).slice(0,2),l=s.length,u=i.getCalculationInfo("stackResultDimension");Rr(i,s[0])&&(s[0]=u),Rr(i,s[1])&&(s[1]=u);var c=i.getStore(),f=i.getDimensionIndex(s[0]),h=i.getDimensionIndex(s[1]);return l&&{progress:function(p,d){for(var v=p.end-p.start,m=o&&Fr(v*l),g=[],y=[],_=p.start,x=0;_<p.end;_++){var b=void 0;if(l===1){var S=c.get(f,_);b=n.dataToPoint(S,null,y)}else g[0]=c.get(f,_),g[1]=c.get(h,_),b=n.dataToPoint(g,null,y);o?(m[x++]=b[0],m[x++]=b[1]):d.setItemLayout(_,b.slice())}o&&(d.setLayout("points",m),d.setLayout("pointsRange",{start:p.start,end:p.end}))}}}}}}var hV={average:function(r){for(var t=0,e=0,i=0;i<r.length;i++)isNaN(r[i])||(t+=r[i],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},pV=function(r){return Math.round(r.length/2)};function Tc(r){return{seriesType:r,reset:function(t,e,i){var n=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),p=Math.round(s/h);if(isFinite(p)&&p>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/p)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/p));var d=void 0;H(a)?d=hV[a]:$(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/p,d,pV))}}}}}function n_(r){r.registerChartView(oE),r.registerSeriesModel(YD),r.registerLayout(i_("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tc("line"))}var dV=(function(r){N(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(xd),sE=dV;var vV=null;function zo(){return vV}var lE="expandAxisBreak";var va=Math.PI,mV=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],gV=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ma=re(),fE=re(),o_=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,i=t.componentIndex,n=this.recordMap,a=n[e]||(n[e]=[]);return a[i]||(a[i]={ready:{}})},r})();function yV(r,t,e,i){var n=e.axis,a=t.ensureRecord(e),o=[],s,l=u_(r.axisName)&&fa(r.nameLocation);w(i,function(d){var v=Si(d);if(!(!v||v.label.ignore)){o.push(v);var m=a.transGroup;l&&(m.transform?Tr(Cc,m.transform):Hr(Cc),v.transform&&li(Cc,Cc,v.transform),ue.copy(Ed,v.localRect),Ed.applyTransform(Cc),s?s.union(Ed):ue.copy(s=new ue(0,0,0,0),Ed))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(d,v){return Math.abs(d.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=n.getExtent(),h=Math.min(f[0],f[1]),p=Math.max(f[0],f[1])-h;s.union(new ue(h,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Cc=kt(),Ed=new ue(0,0,0,0),s_=function(r,t,e,i,n,a){if(fa(r.nameLocation)){var o=a.stOccupiedRect;o&&hE(UD({},o,a.transGroup.transform),i,n)}else l_(a.labelInfoList,a.dirVec,i,n)};function hE(r,t,e){var i=new ke;Sd(r,t,i,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&HD(t,i)}function l_(r,t,e,i){for(var n=ke.dot(i,t)>=0,a=0,o=r.length;a<o;a++){var s=r[n?a:o-1-a];s.label.ignore||hE(s,e,i)}}var Vo=(function(){function r(t,e,i,n){this.group=new Ee,this._axisModel=t,this._api=e,this._local={},this._shared=n||new o_(s_),this._resetCfgDetermined(i)}return r.prototype.updateCfg=function(t){if(0)var e;var i=this._cfg.raw;i.position=t.position,i.labelOffset=t.labelOffset,this._resetCfgDetermined(i)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(t){var e=this._axisModel,i=e.getDefaultOption?e.getDefaultOption():{},n=Z(t.axisName,e.get("name")),a=e.get("nameMoveOverlap");(a==null||a==="auto")&&(a=Z(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:Z(t.nameDirection,1),tickDirection:Z(t.tickDirection,1),labelDirection:Z(t.labelDirection,1),labelOffset:Z(t.labelOffset,0),silent:Z(t.silent,!0),axisName:n,nameLocation:zr(e.get("nameLocation"),i.nameLocation,"end"),shouldNameMoveOverlap:u_(n)&&a,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=o;var s=new Ee({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(e);l.transGroup=this._transformGroup,l.dirVec=new ke(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(t,e){var i=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),w(_V,function(n){t[n]&&xV[n](i._cfg,i._local,i._shared,i._axisModel,i.group,i._transformGroup,i._api,e||{})}),this},r.innerTextLayout=function(t,e,i){var n=gu(e-t),a,o;return Ga(n)?(o=i>0?"top":"bottom",a="center"):Ga(n-va)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n<va?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),_V=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],xV={axisLine:function(r,t,e,i,n,a,o){if(0)var s;var l=i.get(["axisLine","show"]);if(l==="auto"&&(l=!0,r.raw.axisLineAutoShow!=null&&(l=!!r.raw.axisLineAutoShow)),!!l){var u=i.axis.getExtent(),c=a.transform,f=[u[0],0],h=[u[1],0],p=f[0]>h[0];c&&(ht(f,f,c),ht(h,h,c));var d=B({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(i.get(["axisLine","breakLine"])&&yo(i.axis.scale))zo().buildAxisBreakLine(i,n,a,v);else{var m=new Qt(B({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},v));fo(m.shape,m.style.lineWidth),m.anid="line",n.add(m)}var g=i.get(["axisLine","symbol"]);if(g!=null){var y=i.get(["axisLine","symbolSize"]);H(g)&&(g=[g,g]),(H(y)||ge(y))&&(y=[y,y]);var _=Io(i.get(["axisLine","symbolOffset"])||0,y),x=y[0],b=y[1];w([{rotate:r.rotation+Math.PI/2,offset:_[0],r:0},{rotate:r.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(S,T){if(g[T]!=="none"&&g[T]!=null){var A=It(g[T],-x/2,-b/2,x,b,d.stroke,!0),E=S.r+S.offset,M=p?h:f;A.attr({rotation:S.rotate,x:M[0]+E*Math.cos(r.rotation),y:M[1]-E*Math.sin(r.rotation),silent:!0,z2:11}),n.add(A)}})}}},axisTickLabelEstimate:function(r,t,e,i,n,a,o,s){if(0)var l;var u=cE(t,n,s);u&&uE(r,t,e,i,n,a,o,dr.estimate)},axisTickLabelDetermine:function(r,t,e,i,n,a,o,s){if(0)var l;var u=cE(t,n,s);u&&uE(r,t,e,i,n,a,o,dr.determine);var c=TV(r,n,a,i);wV(r,t.labelLayoutList,c),CV(r,n,a,i,r.tickDirection)},axisName:function(r,t,e,i,n,a,o,s){var l=e.ensureRecord(i);if(0)var u;t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=r.axisName;if(u_(c)){var f=r.nameLocation,h=r.nameDirection,p=i.getModel("nameTextStyle"),d=i.get("nameGap")||0,v=i.axis.getExtent(),m=i.axis.inverse?-1:1,g=new ke(0,0),y=new ke(0,0);f==="start"?(g.x=v[0]-m*d,y.x=-m):f==="end"?(g.x=v[1]+m*d,y.x=m):(g.x=(v[0]+v[1])/2,g.y=r.labelOffset+h*d,y.y=h);var _=kt();y.transform(Da(_,_,r.rotation));var x=i.get("nameRotate");x!=null&&(x=x*va/180);var b,S;fa(f)?b=Vo.innerTextLayout(r.rotation,x??r.rotation,h):(b=bV(r.rotation,f,x||0,v),S=r.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var T=p.getFont(),A=i.get("nameTruncate",!0)||{},E=A.ellipsis,M=nr(r.raw.nameTruncateMaxWidth,A.maxWidth,S),O=s.nameMarginLevel||0,L=new He({x:g.x,y:g.y,rotation:b.rotation,silent:Vo.isLabelSilent(i),style:Lr(p,{text:c,font:T,overflow:"truncate",width:M,ellipsis:E,fill:p.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:p.get("align")||b.textAlign,verticalAlign:p.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Ls({el:L,componentModel:i,itemName:c}),L.__fullText=c,L.anid="name",i.get("triggerEvent")){var I=Vo.makeAxisEventDataBase(i);I.targetType="axisName",I.name=c,_e(L).eventData=I}a.add(L),L.updateTransform(),t.nameEl=L;var k=l.nameLayout=Si({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:fa(f)?mV[O]:gV[O]});if(l.nameLocation=f,n.add(L),L.decomposeTransform(),r.shouldNameMoveOverlap&&k){var z=e.ensureRecord(i);e.resolveAxisNameOverlap(r,e,i,k,y,z)}}}};function uE(r,t,e,i,n,a,o,s){dE(t)||AV(r,t,n,s,i,o);var l=t.labelLayoutList;DV(r,i,l,a),OV(i,r.rotation,l);var u=r.optionHideOverlap;SV(i,l,u),u&&GD(Be(l,function(c){return c&&!c.label.ignore})),yV(r,e,i,l)}function bV(r,t,e,i){var n=gu(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Ga(n-va/2)?(o=l?"bottom":"top",a="center"):Ga(n-va*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",n<va*1.5&&n>va/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function SV(r,t,e){var i=r.axis,n=r.get(["axisLabel","customValues"]);if($A(i))return;function a(u,c,f){var h=Si(t[c]),p=Si(t[f]),d=i.scale;if(!(!h||!p)){if(u==null){if(!e&&n)return;var v=ma(h.label).labelInfo.tick;if(Ki(d)&&v.notNice||lt(d)&&v.offInterval){dl(h.label);return}}if(u===!1||h.suggestIgnore){dl(h.label);return}if(p.suggestIgnore){dl(p.label);return}var m=.1;if(!e){var g=[0,0,0,0];h=j0({marginForce:g},h),p=j0({marginForce:g},p)}Sd(h,p,null,{touchThreshold:m})&&dl(u?p.label:h.label)}}var o=r.get(["axisLabel","showMinLabel"]),s=r.get(["axisLabel","showMaxLabel"]),l=t.length;a(o,0,1),a(s,l-1,l-2)}function wV(r,t,e){r.showMinorTicks||w(t,function(i){if(i&&i.label.ignore)for(var n=0;n<e.length;n++){var a=e[n],o=fE(a),s=ma(i.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.labelInfo.tick.value){dl(a);return}}})}function dl(r){r&&(r.ignore=!0)}function pE(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(ht(o,o,t),ht(s,s,t));var c=new Qt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});fo(c.shape,c.style.lineWidth),c.anid=n+"_"+r[l].tickValue,a.push(c);var f=fE(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return a}function TV(r,t,e,i){var n=i.axis,a=i.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||n.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=r.tickDirection*a.get("length"),u=n.getTicksCoords(),c=pE(u,e.transform,l,he(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function CV(r,t,e,i,n){var a=i.axis,o=i.getModel("minorTick");if(!(!r.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=n*o.get("length"),c=he(l.getLineStyle(),he(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var h=pE(s[f],e.transform,u,c,"minorticks_"+f),p=0;p<h.length;p++)t.add(h[p])}}function cE(r,t,e){if(dE(r)){var i=r.axisLabelsCreationContext,n=i.out.noPxChangeTryDetermine;if(e.noPxChange){for(var a=!0,o=0;o<n.length;o++)a=a&&n[o]();if(a)return!1}n.length&&(t.remove(r.labelGroup),a_(r,null,null,null))}return!0}function AV(r,t,e,i,n,a){var o=n.axis,s=nr(r.raw.axisLabelShow,n.get(["axisLabel","show"])),l=new Ee;e.add(l);var u=hl(i);if(!s||o.scale.isBlank()){a_(t,[],l,u);return}var c=n.getModel("axisLabel"),f=o.getViewLabels(u),h=(nr(r.raw.labelRotate,c.get("rotate"))||0)*va/180,p=Vo.innerTextLayout(r.rotation,h,r.labelDirection),d=n.getCategories&&n.getCategories(!0),v=[],m=n.get("triggerEvent"),g=1/0,y=-1/0;w(f,function(x,b){var S,T=x.tick,A=x.formattedLabel,E=x.rawLabel,M=c,O=Tn(o.scale,T);if(d&&d[O]){var L=d[O];W(L)&&L.textStyle&&(M=new Re(L.textStyle,c,n.ecModel))}var I=M.getTextColor()||n.get(["axisLine","lineStyle","color"]),k=M.getShallow("align",!0)||p.textAlign,z=Z(M.getShallow("alignMinLabel",!0),k),V=Z(M.getShallow("alignMaxLabel",!0),k),q=M.getShallow("verticalAlign",!0)||M.getShallow("baseline",!0)||p.textVerticalAlign,G=Z(M.getShallow("verticalAlignMinLabel",!0),q),j=Z(M.getShallow("verticalAlignMaxLabel",!0),q),oe=10+(((S=T.time)===null||S===void 0?void 0:S.level)||0);g=Math.min(g,oe),y=Math.max(y,oe);var ie=new He({x:0,y:0,rotation:0,silent:Vo.isLabelSilent(n),z2:oe,style:Lr(M,{text:A,align:b===0?z:b===f.length-1?V:k,verticalAlign:b===0?G:b===f.length-1?j:q,fill:$(I)?I(o.type==="category"?E:o.type==="value"?O+"":O,b):I})});ie.anid="label_"+O;var pe=ma(ie);if(pe.labelInfo=x,pe.layoutRotation=p.rotation,Ls({el:ie,componentModel:n,itemName:A,formatterParamsExtra:{isTruncated:function(){return ie.isTruncated},value:E,tickIndex:b}}),m){var de=Vo.makeAxisEventDataBase(n);de.targetType="axisLabel",de.value=E,de.tickIndex=b;var te=x.tick.break;if(te){var Te=te.parsedBreak;de.break={start:Te.vmin,end:Te.vmax}}o.type==="category"&&(de.dataIndex=O),_e(ie).eventData=de,te&&MV(n,a,ie,te)}v.push(ie),l.add(ie)});var _=U(v,function(x){return{label:x,priority:ma(x).labelInfo.tick.break?x.z2+(y-g+1):x.z2,defaultAttr:{ignore:x.ignore}}});a_(t,_,l,u)}function dE(r){return!!r.labelLayoutList}function a_(r,t,e,i){r.labelLayoutList=t,r.labelGroup=e,r.axisLabelsCreationContext=i}function DV(r,t,e,i){var n=t.get(["axisLabel","margin"]);w(e,function(a,o){var s=Si(a);if(s){var l=s.label,u=ma(l);s.suggestIgnore=l.ignore,l.ignore=!1,ls(An,EV);var c=t.axis;An.x=c.dataToCoord(Tn(c.scale,u.labelInfo.tick)),An.y=r.labelOffset+r.labelDirection*n,An.rotation=u.layoutRotation,i.add(An),An.updateTransform(),i.remove(An),An.decomposeTransform(),ls(l,An),l.markRedraw(),Sc(s,!0),Si(s)}})}var An=new Oe,EV=new Oe;function u_(r){return!!r}function MV(r,t,e,i){e.on("click",function(n){var a={type:lE,breaks:[{start:i.parsedBreak.breakOption.start,end:i.parsedBreak.breakOption.end}]};a[r.axis.dim+"AxisIndex"]=r.componentIndex,t.dispatchAction(a)})}function OV(r,t,e){var i=it();if(i){var n=i.retrieveAxisBreakPairs(e,function(o){return o&&ma(o.label).labelInfo.tick.break},!0),a=r.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&w(n,function(o){zo().adjustBreakLabelPair(r.axis.inverse,t,[Si(e[o[0]]),Si(e[o[1]])])})}}var Md=Vo;function Ac(r,t,e){e=e||{};var i=t.axis,n={},a=i.getAxesOnZeroOf()[0],o=i.position,s=a?"onZero":o,l=i.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,h=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));h[c.onZero]=Math.max(Math.min(p,h[1]),h[0])}n.position=[l==="y"?h[c[s]]:u[0],l==="x"?h[c[s]]:u[3]],n.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=d[o],n.labelOffset=a?h[c[o]]-h[c.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),nr(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var v=t.get(["axisLabel","rotate"]);return n.labelRotate=s==="top"?-v:v,n.z2=1,n}function vE(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function mE(r){var t={xAxisModel:null,yAxisModel:null};return w(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,at).models[0];t[i]=a}),t}function gE(r,t,e,i,n,a){for(var o=Ac(r,e),s=!1,l=!1,u=0;u<t.length;u++)Jp(t[u].getOtherAxis(e.axis).scale)&&(s=l=!0,e.axis.type==="category"&&e.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Md(e,i,o,n)}function yE(r,t,e){var i=Ac(t,e);if(0)var n;r.updateCfg(i)}function _E(){sD("liPosMinGap",LV)}function LV(r,t,e){var i=Y(),n=e.serUids,a=e.liPosMinGap,o,s=t.axis,l=s.scale,u=l.needTransform(),c=l.getFilter?l.getFilter():null,f=gp(c);function h(_){vd(r,t.sers,function(x){var b=x.getRawData(),S=b.getDimensionIndex(b.mapDimension(s.dim));S>=0&&_(S,x,b.getStore())})}var p=0;if(h(function(_,x,b){i.set(x.uid,1),(!n||!n.hasKey(x.uid))&&(o=!0),p+=b.count()}),(!n||n.keys().length!==i.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Dd(Uo,p);var d=0;h(function(_,x,b){for(var S=0,T=b.count();S<T;++S){var A=b.get(_,S);isFinite(A)&&(!c||yp(f,A))&&(u&&(A=l.transformIn(A,null)),Uo.arr[d++]=A)}});var v=Uo.typed?Uo.arr.subarray(0,d):(Uo.arr.length=d,Uo.arr);Uo.typed?v.sort():Ct(v);for(var m=1/0,g=1;g<d;++g){var y=v[g]-v[g-1];y>0&&y<m&&(m=y)}e.liPosMinGap=t.liPosMinGap=gt(m)?m:d>0?dd:QA,e.serUids=i}var Uo=Dd({ctor:qD},50);function xE(r){return function(t,e){var i=bi(t,{fromStat:{key:r}});if(gt(i.w2))return[-i.w2/2,i.w2/2]}}function Dc(r,t){return r+pd+t}function bE(r){return _E(),{liPosMinGap:!lt(r.scale)}}var Dn="bar";function SE(r,t,e,i){uD(r,{key:t,seriesType:e,coordSysType:i,getMetrics:bE})}function wE(r){var t=r.scale.rawExtentInfo.makeRenderInfo().startValue;return t}var c_={left:0,right:0,top:0,bottom:0},Ec=["25%","25%"],ii="cartesian2d",PV=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,i){var n=Qr(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Nr(e.outerBounds,n)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Nr(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:c_,outerBoundsContain:"all",outerBoundsClampWidth:Ec[0],outerBoundsClampHeight:Ec[1],backgroundColor:K.color.transparent,borderWidth:1,borderColor:K.color.neutral30},t})(Le),TE=PV;var NV=gs(),kV="__ec_stack_";function CE(r){return r.get("stack")||kV+r.seriesIndex}function RV(r,t){var e=FV(r,t);return e.columnMap=BV(e),e}function FV(r,t){var e=Dc(t,ii),i=[],n=bi(r,{fromStat:{key:e},min:1});return I0(r,e,function(a){i.push({barWidth:Ve(a.get("barWidth"),n.w),barMaxWidth:Ve(a.get("barMaxWidth"),n.w),barMinWidth:Ve(a.get("barMinWidth")||(EE(a)?.5:1),n.w),barGap:a.get("barGap"),barCategoryGap:a.get("barCategoryGap"),defaultBarGap:a.get("defaultBarGap"),stackId:CE(a)})}),{bandWidthResult:n,seriesInfo:i}}function BV(r){var t=r.bandWidthResult.w,e=t,i=0,n,a,o=[],s={};w(r.seriesInfo,function(v,m){m||(a=v.defaultBarGap||0);var g=v.stackId;We(s,g)||i++;var y=s[g];y||(y=s[g]={width:0,maxWidth:0},o.push(g));var _=v.barWidth;_&&!y.width&&(y.width=_,_=Xe(e,_),e-=_);var x=v.barMaxWidth;x&&(y.maxWidth=x);var b=v.barMinWidth;b&&(y.minWidth=b);var S=v.barGap;S!=null&&(a=S);var T=v.barCategoryGap;T!=null&&(n=T)}),n==null&&(n=Se(35-o.length*4,15)+"%");var l=Ve(n,t),u=Ve(a,1),c=(e-l)/(i+(i-1)*u);c=Se(c,0),w(o,function(v){var m=s[v],g=m.maxWidth,y=m.minWidth;if(m.width){var _=m.width;g&&(_=Xe(_,g)),y&&(_=Se(_,y)),m.width=_,e-=_+u*_,i--}else{var _=c;g&&g<_&&(_=Xe(g,e)),y&&y>_&&(_=y),_!==c&&(m.width=_,e-=_+u*_,i--)}}),c=(e-l)/(i+(i-1)*u),c=Se(c,0);var f=0,h;w(o,function(v){var m=s[v];m.width||(m.width=c),h=m,f+=m.width*(1+u)}),h&&(f-=h.width*u);var p={},d=-f/2;return w(o,function(v){var m=s[v];p[v]=p[v]||{bandWidth:t,offset:d,width:m.width},d+=m.width*(1+u)}),p}function AE(r){return{seriesType:r,overallReset:function(t){var e=Dc(r,ii);oD(t,e,function(i){var n=RV(i,r);I0(i,e,function(a){var o=n.columnMap[CE(a)];a.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function DE(r){return{seriesType:r,plan:Ao(),reset:function(t){if(vE(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),c=e.getCalculationInfo("stackResultDimension"),f=Rr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),p=a.toGlobalCoord(a.dataToCoord(wE(a))),d=EE(t),v=t.get("barMinHeight")||0,m=c&&e.getDimensionIndex(c),g=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=d&&Fr(b*3),T=d&&l&&Fr(b*3),A=d&&Fr(b),E=i.master.getRect(),M=h?E.width:E.height,O,L=x.getStore(),I=0;(O=_.next())!=null;){var k=L.get(f?m:o,O),z=L.get(s,O),V=p,q=void 0;f&&(q=+k-L.get(o,O));var G=void 0,j=void 0,oe=void 0,ie=void 0;if(h){var pe=i.dataToPoint([k,z]);f&&(V=i.dataToPoint([q,z])[0]),G=V,j=pe[1]+y,oe=pe[0]-V,ie=g,Ge(oe)<v&&(oe=(oe<0?-1:1)*v)}else{var pe=i.dataToPoint([z,k]);f&&(V=i.dataToPoint([z,q])[1]),G=pe[0]+y,j=V,oe=g,ie=pe[1]-V,Ge(ie)<v&&(ie=(ie<=0?-1:1)*v)}d?(S[I]=G,S[I+1]=j,S[I+2]=h?oe:ie,T&&(T[I]=h?E.x:G,T[I+1]=h?j:E.y,T[I+2]=M),A[O]=O):x.setItemLayout(O,{x:G,y:j,width:oe,height:ie}),I+=3}d&&x.setLayout({largePoints:S,largeDataIndices:A,largeBackgroundPoints:T,valueAxisHorizontal:h})}}}}}}function EE(r){return r.pipelineContext&&r.pipelineContext.large}function zV(r){return xE(Dc(r,ii))}function ME(r){NV(r,function(){function t(e){var i=Dc(e,ii);SE(r,i,e,ii),yD(i,zV(e))}t("bar"),t("pictorialBar")})}var OE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)w(a.getAxes(),function(h,p){if(h.type==="category"&&i!=null){var d=h.getTicksCoords(),v=h.getTickModel().get("alignWithLabel"),m=o[p],g=i[p]==="x1"||i[p]==="y1";if(g&&!v&&(m+=1),d.length<2)return;if(d.length===2){s[p]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var y=void 0,_=void 0,x=1,b=0;b<d.length;b++){var S=d[b].coord,T=b===d.length-1?d[b-1].tickValue+x:d[b].tickValue;if(T===m){_=S;break}else if(T<m)y=S;else if(y!=null&&T>m){_=(S+y)/2;break}b===1&&(x=T-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[p]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},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",defaultBarGap:"10%"},t})(tr);tr.registerClass(OE);var f_=OE;var VV=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return ca(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(e,i){var n=rh(this,e,i);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series."+Dn,t.dependencies=["grid","polar"],t.defaultOption=ra(f_.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:K.color.primary,borderWidth:2}},realtimeSort:!1}),t})(f_),IE=VV;var UV=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),HV=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new UV},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,c=i.startAngle,f=i.endAngle,h=i.clockwise,p=Math.PI*2,d=h?f-c<p:c-f<p;d||(c=f-(h?p:-p));var v=Math.cos(c),m=Math.sin(c),g=Math.cos(f),y=Math.sin(f);d?(e.moveTo(v*o+n,m*o+a),e.arc(v*u+n,m*u+a,l,-Math.PI+c,c,!h)):e.moveTo(v*s+n,m*s+a),e.arc(n,a,s,c,f,!h),e.arc(g*u+n,y*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&e.arc(n,a,o,f,c,h)},t})(ve),h_=HV;function LE(r,t){t=t||{};var e=t.isRoundCap;return function(i,n,a){var o=n.position;if(!o||o instanceof Array)return Ua(i,n,a);var s=r(o),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,p=u.r0,d=(h+p)/2,v=u.startAngle,m=u.endAngle,g=(v+m)/2,y=e?Math.abs(h-p)/2:0,_=Math.cos,x=Math.sin,b=c+h*_(v),S=f+h*x(v),T="left",A="top";switch(s){case"startArc":b=c+(p-l)*_(g),S=f+(p-l)*x(g),T="center",A="top";break;case"insideStartArc":b=c+(p+l)*_(g),S=f+(p+l)*x(g),T="center",A="bottom";break;case"startAngle":b=c+d*_(v)+Od(v,l+y,!1),S=f+d*x(v)+Id(v,l+y,!1),T="right",A="middle";break;case"insideStartAngle":b=c+d*_(v)+Od(v,-l+y,!1),S=f+d*x(v)+Id(v,-l+y,!1),T="left",A="middle";break;case"middle":b=c+d*_(g),S=f+d*x(g),T="center",A="middle";break;case"endArc":b=c+(h+l)*_(g),S=f+(h+l)*x(g),T="center",A="bottom";break;case"insideEndArc":b=c+(h-l)*_(g),S=f+(h-l)*x(g),T="center",A="top";break;case"endAngle":b=c+d*_(m)+Od(m,l+y,!0),S=f+d*x(m)+Id(m,l+y,!0),T="left",A="middle";break;case"insideEndAngle":b=c+d*_(m)+Od(m,-l+y,!0),S=f+d*x(m)+Id(m,-l+y,!0),T="right",A="middle";break;default:return Ua(i,n,a)}return i=i||{},i.x=b,i.y=S,i.align=T,i.verticalAlign=A,i}}function PE(r,t,e,i){if(ge(i)){r.setTextConfig({rotation:i});return}else if(F(t)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Od(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Id(r,t,e){return t*Math.cos(r)*(e?1:-1)}function NE(r,t,e){var i=r.get("borderRadius");if(i==null)return e?{cornerRadius:0}:null;F(i)||(i=[i,i,i,i]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(i,function(a){return fi(a,n)})}}var p_=Math.max,d_=Math.min,GV=(function(r){N(t,r);function t(){var e=r.call(this)||this;return e.type=Dn,e._isFirstFrame=!0,e}return t.prototype.render=function(e,i,n,a){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,i,n):this._renderNormal(e,i,n,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,i){this._progressiveEls=[],this._incrementalRenderLarge(e,i)},t.prototype.eachRendered=function(e){gn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e,i,n,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=e.isAnimationEnabled()?e:null,p=YV(e,u);p&&this._enableRealtimeSort(p,s,n);var d=e.get("clip",!0)||p,v=u.getArea();o.removeClipPath();var m=e.get("roundCap",!0),g=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,T=a&&a.type==="changeAxisOrder";function A(O){var L=Ld[u.type](s,O);if(!L)return null;var I=$V(u,f,L);return I.useStyle(y.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),x[O]=I,I}s.diff(l).add(function(O){var L=s.getItemModel(O),I=Ld[u.type](s,O,L);if(I&&(g&&A(O),!(!s.hasValue(O)||!zE[u.type](I)))){var k=!1;d&&(k=kE[u.type](v,I));var z=RE[u.type](e,s,O,I,f,h,c.model,!1,m);p&&(z.forceLabelAnimation=!0),VE(z,s,O,L,I,e,f,u.type==="polar"),S?z.attr({shape:I}):p?FE(p,h,z,I,O,f,!1,!1):Ot(z,{shape:I},e,O),s.setItemGraphicEl(O,z),o.add(z),z.ignore=k}}).update(function(O,L){var I=s.getItemModel(O),k=Ld[u.type](s,O,I);if(k){if(g){var z=void 0;b.length===0?z=A(L):(z=b[L],z.useStyle(y.getItemStyle()),u.type==="cartesian2d"?z.setShape("r",_):z.setShape("cornerRadius",_),x[O]=z);var V=Ld[u.type](s,O),q=WE(f,V,u);Ke(z,{shape:q},h,O)}var G=l.getItemGraphicEl(L);if(!s.hasValue(O)||!zE[u.type](k)){o.remove(G);return}var j=!1;d&&(j=kE[u.type](v,k),j&&o.remove(G));var oe=G&&(G.type==="sector"&&m||G.type==="sausage"&&!m);if(oe&&(G&&Ms(G,e,L),G=null),G?Lh(G):G=RE[u.type](e,s,O,k,f,h,c.model,!0,m),p&&(G.forceLabelAnimation=!0),T){var ie=G.getTextContent();if(ie){var pe=Ns(ie);pe.prevValue!=null&&(pe.prevValue=pe.value)}}else VE(G,s,O,I,k,e,f,u.type==="polar");S?G.attr({shape:k}):p?FE(p,h,G,k,O,f,!0,T):Ke(G,{shape:k},e,O,null),s.setItemGraphicEl(O,G),G.ignore=j,o.add(G)}}).remove(function(O){var L=l.getItemGraphicEl(O);L&&Ms(L,e,O)}).execute();var E=this._backgroundGroup||(this._backgroundGroup=new Ee);E.removeAll();for(var M=0;M<x.length;++M)E.add(x[M]);o.add(E),this._backgroundEls=x,this._data=s},t.prototype._renderLarge=function(e,i,n){this._clear(),HE(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,i){this._removeBackground(),HE(i,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var i=e.get("clip",!0)&&QD(e.coordinateSystem,!1,e),n=this.group;i?n.setClipPath(i):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,i,n){var a=this;if(i.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,e,n),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,i,n){var a=[];return e.each(e.mapDimension(i.dim),function(o,s){var l=n(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:U(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,i,n){for(var a=n.scale,o=e.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:i(e.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){Ms(a,e,_e(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=Dn,t})(Ft),kE={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=p_(t.x,r.x),s=d_(t.x+t.width,n),l=p_(t.y,r.y),u=d_(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>n?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=d_(t.r,r.r),a=p_(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},RE={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new Oe({shape:B({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var c=u.shape,f=n?"height":"width";c[f]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?h_:Hi,c=new u({shape:i,z2:1});c.name="item";var f=YE(n);if(c.calculateTextPosition=LE(f,{isRoundCap:u===h_}),a){var h=c.shape,p=n?"r":"endAngle",d={};h[p]=n?i.r0:i.startAngle,d[p]=i[p],(s?Ke:Ot)(c,{shape:d},a)}return c}};function YV(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function FE(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Ke:Ot)(e,{shape:l},t,n,null);var c=t?r.baseAxis.model:null;(o?Ke:Ot)(e,{shape:u},c,n)}function BE(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var WV=["x","y","width","height"],ZV=["cx","cy","r","startAngle","endAngle"],zE={cartesian2d:function(r){return!BE(r,WV)},polar:function(r){return!BE(r,ZV)}},Ld={cartesian2d:function(r,t,e){var i=r.getItemLayout(t);if(!i)return null;var n=e?KV(e,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function XV(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function YE(r){return(function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}})(r)}function VE(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=NE(i.getModel("itemStyle"),c,!0);B(c,f),r.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=i.getShallow("cursor");h&&r.attr("cursor",h);var p=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?JV(n,a.coordinateSystem):QV(n,a.coordinateSystem),d=fr(i);$r(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:pl(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var v=r.getTextContent();if(s&&v){var m=i.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,PE(r,m==="outside"?p:m,YE(o),i.get(["label","rotate"]))}UT(v,d,a.getRawValue(e),function(y){return wd(t,y)});var g=i.getModel(["emphasis"]);vi(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),eo(r,i),XV(n)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function KV(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var qV=(function(){function r(){}return r})(),UE=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new qV},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[a]=u,l[o]=n[c+2],s[a]=n[c+a],s[o]=n[c+o],e.rect(s[0],s[1],l[0],l[1])},t})(ve);function HE(r,t,e,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints"),c=i?YS(r):0;if(u){var f=new UE({shape:{points:u},incremental:c,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new UE({shape:{points:n.getLayout("largePoints")},incremental:c,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(n.getVisual("style")),h.style.stroke=null,_e(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",GE),h.on("mousemove",GE)),e&&e.push(h)}var GE=Do(function(r){var t=this,e=jV(t,r.offsetX,r.offsetY);_e(t).dataIndex=e>=0?e:null},30,!1);function jV(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c<f;c++){var h=c*3;if(l[i]=u,l[n]=a[h+2],s[i]=a[h+i],s[n]=a[h+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function WE(r,t,e){if(Cn(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function $V(r,t,e){var i=r.type==="polar"?Hi:Oe;return new i({shape:WE(t,e,r),silent:!0,z2:0})}function JV(r,t){if(r.height===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"bottom":"top"}return r.height>0?"bottom":"top"}function QV(r,t){if(r.width===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"left":"right"}return r.width>=0?"right":"left"}var ZE=GV;function v_(r){r.registerChartView(ZE),r.registerSeriesModel(IE),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,AE(Dn)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,DE(Dn)),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tc(Dn)),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})}),ME(r)}var Pd=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",at).models[0]},t.type="cartesian2dAxis",t})(Le);mt(Pd,hd);var XE={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:"auto",onZeroAxisIndex:null,lineStyle:{color:K.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:K.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:K.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[K.color.backgroundTint,K.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:K.color.neutral00,borderColor:K.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},eU=me({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},XE),m_=me({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:K.color.axisMinorSplitLine,width:1}}},XE),tU=me({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},m_),rU=he({logBase:10},m_),KE={category:eU,value:m_,time:tU,log:rU};function Nd(r,t,e,i){w(ad,function(n,a){var o=me(me({},KE[a],!0),i,!0),s=(function(l){N(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=ia(this),p=h?Qr(c):{},d=f.getTheme();me(c,d.get(a+"Axis")),me(c,this.getDefaultOption()),c.type=qE(c),h&&Nr(c,p,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=mc.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=zo();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",qE)}function qE(r){return r.type||(r.data?"category":"value")}var iU=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return U(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Be(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),jE=iU;var Mc=["x","y"];function $E(r){return(r.type==="interval"||r.type==="time")&&!yo(r)}var nU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=ii,e.dimensions=Mc,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!$E(e)||!$E(i))){var n=Ro(e,null),a=Ro(i,null),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-n[0]*c,p=o[1]-a[0]*f,d=this._transform=[c,0,0,f,h,p];this._invTransform=Tr([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.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,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new ue(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ht(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i,n){if(n=n||[],this._invTransform)return ht(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new ue(a,o,s,l)},t})(jE),JE=nU;function QE(r,t){var e=r.scale,i=r.model,n=gd(e,i,i.ecModel,r,null),a=qi(e),o=qi(t)?t.intervalStub:t,s=a?e.intervalStub:e,l=e.base,u=o.getTicks(),c=o.getTicks({expandToNicedExtent:!0}),f=u.length-1,h,p,d;if(f===1)h=p=0,d=1;else if(f===2){var v=Ge(u[0].value-u[1].value),m=Ge(u[1].value-u[2].value);h=p=0,v===m?d=2:(d=1,v<m?h=v/m:p=m/v)}else{var g=o.getConfig().interval;h=(1-(u[0].value-c[0].value)/g)%1,p=(1-(c[f].value-u[f].value)/g)%1,d=f-(h?1:0)-(p?1:0)}var y=n.zoomFixMM,_=y[0]||y[1],x=[n.fixMM[0]||_,n.fixMM[1]||_],b=e.getExtent(),S=s.getExtent(),T=ed(S,x),A,E,M,O,L,I;function k(pe){for(var de=50,te=0;te<de&&!pe();te++)M=a?M*Se(l,2):LA(M),O=xi(M)}function z(){A=we(I-M*h,O)}function V(){E=we(L+M*p,O)}function q(){I=h?we(A+M*h,O):A}function G(){L=p?we(E-M*p,O):E}if(x[0]&&x[1]){A=T[0],E=T[1],M=(E-A)/(d+h+p);var j=r.getExtent(),oe=Ge(j[1]-j[0]);O=eh([E,A],oe,.5/d),q(),G(),gt(O)&&(M=we(M,O))}else{var ie=T[1]-T[0];M=a?Se(hs(ie),1):un(ie/d,Wm),O=xi(M),x[0]?(A=T[0],k(function(){if(q(),L=we(I+M*d,O),V(),E>=T[1])return!0})):x[1]?(E=T[1],k(function(){if(G(),I=we(L-M*d,O),z(),A<=T[0])return!0})):k(function(){I=we(Li(T[0]/M)*M,O),L=we(sr(T[1]/M)*M,O);var pe=or((L-I)/M);if(pe<=d){var de=d-pe,te=void 0,Te=n.incl0||a;if(Te&&T[0]===0)te=[0,de];else if(Te&&T[1]===0)te=[de,0];else{var Pe=sr(de/2);te=de%2===0?[Pe,Pe]:A+E<T[0]+T[1]?[Pe,Pe+1]:[Pe+1,Pe]}if(I=we(I-M*te[0],O),L=we(L+M*te[1],O),z(),V(),A<=T[0]&&E>=T[1])return!0}})}cd(e,x,S,[A,E],b,{interval:M,intervalCount:d,intervalPrecision:O,niceExtent:[I,L]})}var eM=[[3,1],[0,2]],aU=(function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Mc,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;w(this._axesList,function(o){md(o,hD);var s=o.scale;lt(s)&&s.setSortInfo(o.model.get("categorySortInfo"))});function n(o){for(var s=De(o),l=[],u=s.length-1;u>=0;u--){var c=o[+s[u]];c.__alignTo?l.push(c):k0(c)}w(l,function(f){sU(f,f.__alignTo)?k0(f):QE(f,f.__alignTo.scale)})}n(i.x),n(i.y);var a={};w(i.x,function(o){tM(i,"y",o,a)}),w(i.y,function(o){tM(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=Gs(t,e),a=this._rect=Jr(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(g_(o,a),!i){var u=uU(a,s,o,l,e),c=void 0;if(l)aM?(aM(this._axesList,a),g_(o,a)):c=oM(a.clone(),"axisLabel",null,a,o,u,n);else{var f=cU(t,a,n),h=f.outerBoundsRect,p=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;h&&(c=oM(h,p,d,a,o,u,n))}sM(a,o,dr.determine,null,c,n),w(this._coordsList,function(v){v.calcAffineTransform()})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}W(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,i=t.xAxisModel||e&&e.getReferringComponents("xAxis",at).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",at).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,ce(o,s)<0&&(s=null);else if(i&&n)s=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,i){var n=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,w(s.x,function(c,f){w(s.y,function(h,p){var d="x"+f+"y"+p,v=new JE(d);v.master=n,v.model=t,n._coordsMap[d]=v,n._coordsList.push(v),v.addAxis(c),v.addAxis(h)})}),iM(s.x),iM(s.y);function u(c){return function(f,h){if(oU(f,t)){var p=f.get("position");c==="x"?p!=="top"&&p!=="bottom"&&(p=o.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=o.left?"right":"left"),o[p]=!0;var d=sd(f),v=new sE(c,ld(f,d,!0),[0,0],d,p);v.onBand=fd(v.scale,f),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=h,a._axesList.push(v),s[c][h]=v,l[c]++}}}},r.prototype.getTooltipAxes=function(t){var e=[],i=[];return w(this.getCartesians(),function(n){var a=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);ce(e,a)<0&&e.push(a),ce(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}},r.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new r(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o),w(o._axesList,function(s){mD(s,r.dimIdxMap)})}),t.eachSeries(function(n){var a,o;lC({targetModel:n,coordSysType:ii,coordSysProvider:s});function s(){var l=mE(n),u=l.xAxisModel,c=l.yAxisModel;a=u.axis,o=c.axis;var f=u.getCoordSysModel(),h=f.coordinateSystem;return h.getCartesian(u.componentIndex,c.componentIndex)}a&&o&&(P0(a,n,ii),P0(o,n,ii))},this),i},r.dimensions=Mc,r.dimIdxMap=fc(Mc),r})();function oU(r,t){return r.getCoordSysModel()===t}function tM(r,t,e,i){e.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)rM(s,n[l])&&(a=n[l]);else for(var u in n)if(We(n,u)&&rM(s,n[u])&&!i[c(n[u])]){a=n[u];break}a&&(i[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function rM(r,t){if(!t)return!1;var e=t.scale,i=KA(e,0,!1),n=t&&t.type!=="category"&&t.type!=="time"&&i!==od;return n&&r==="auto"&&jA(t)&&(n=!1),n}function iM(r){for(var t=De(r),e,i=[],n=t.length-1;n>=0;n--){var a=r[+t[n]];Jp(a.scale)&&D0(a.model,a.type,!0)==null&&(a.model.get("alignTicks")&&a.model.get("interval")==null?i.push(a):e=a)}e||(e=i.pop()),e&&w(i,function(o){o.__alignTo=e})}function sU(r,t){return yo(r.scale)||yo(t.scale)||t.scale.getTicks().length<2}function lU(r,t){var e=r.getExtent(),i=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return i-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return i-n+t}}function g_(r,t){w(r.x,function(e){return nM(e,t.x,t.width)}),w(r.y,function(e){return nM(e,t.y,t.height)})}function nM(r,t,e){var i=[0,e],n=r.inverse?1:0;r.setExtent(i[n],i[1-n]),lU(r,t)}var aM;function oM(r,t,e,i,n,a,o){sM(i,n,dr.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(i,0,NaN),c(i,1,NaN);var l=Yv(s,function(h){return h>0})==null;return Is(i,s,!0,!0,e),g_(n,i),l;function u(h){w(n[mn[h]],function(p){if(Bo(p.model)){var d=a.ensureRecord(p.model),v=d.labelInfoList;if(v)for(var m=0;m<v.length;m++){var g=v[m],y=p.scale.normalize(Tn(p.scale,ma(g.label).labelInfo.tick));y=h===1?1-y:y,c(g.rect,h,y),c(g.rect,1-h,NaN)}var _=d.nameLayout;if(_){var y=fa(d.nameLocation)?.5:NaN;c(_.rect,h,y),c(_.rect,1-h,NaN)}}})}function c(h,p,d){var v=r[mn[p]]-h[mn[p]],m=h[uo[p]]+h[mn[p]]-(r[uo[p]]+r[mn[p]]);v=f(v,1-d),m=f(m,d);var g=eM[p][0],y=eM[p][1];s[g]=Se(s[g],v),s[y]=Se(s[y],m)}function f(h,p){return h>0&&!en(p)&&p>1e-4&&(h/=p),h}}function uU(r,t,e,i,n){var a=new o_(fU);return w(e,function(o){return w(o,function(s){if(Bo(s.model)){var l=!i;s.axisBuilder=gE(r,t,s.model,n,a,l)}})}),a}function sM(r,t,e,i,n,a){var o=e===dr.determine;w(t,function(u){return w(u,function(c){Bo(c.model)&&(yE(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[mn[1-u]]=r[uo[u]]<=a.refContainer[uo[u]]*.5?0:1-u===1?2:1}w(t,function(u,c){return w(u,function(f){Bo(f.model)&&((i==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function cU(r,t,e){var i,n=r.get("outerBoundsMode",!0);n==="same"?i=t.clone():(n==null||n==="auto")&&(i=Jr(r.get("outerBounds",!0)||c_,e.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||ce(["all","axisLabel"],a)<0?o="all":o=a;var s=[Qf(Z(r.get("outerBoundsClampWidth",!0),Ec[0]),t.width),Qf(Z(r.get("outerBoundsClampHeight",!0),Ec[1]),t.height)];return{outerBoundsRect:i,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var fU=function(r,t,e,i,n,a){var o=e.axis.dim==="x"?"y":"x";s_(r,t,e,i,n,a),fa(r.nameLocation)||w(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&l_(s.labelInfoList,s.dirVec,i,n)})},lM=aU;function uM(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return hU(e,r,t),e.seriesInvolved&&dU(e,r),e}function hU(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];w(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=vl(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",i);if(w(s.getAxes(),Ae(v,!1,null)),s.getTooltipAxes&&i&&f.get("show")){var h=f.get("trigger")==="axis",p=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||p)&&w(d.baseAxes,Ae(v,p?"cross":!0,h)),p&&w(d.otherAxes,Ae(v,"cross",!1))}function v(m,g,y){var _=y.model.getModel("axisPointer",n),x=_.get("show");if(!(!x||x==="auto"&&!m&&!__(_))){g==null&&(g=_.get("triggerTooltip")),_=m?pU(y,f,n,t,m,g):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),T=vl(y.model),A=g||b||y.type==="category",E=r.axesInfo[T]={key:T,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:g,triggerEmphasis:S,involveSeries:A,snap:b,useHandle:__(_),seriesModels:[],linkGroup:null};u[T]=E,r.seriesInvolved=r.seriesInvolved||A;var M=vU(a,y);if(M!=null){var O=o[M]||(o[M]={axesInfo:{}});O.axesInfo[T]=E,O.mapper=a[M].mapper,E.linkGroup=O}}}})}function pU(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};w(s,function(h){l[h]=ne(o.get(h))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&he(u,f.textStyle)}}return r.model.getModel("axisPointer",new Re(l,e,i))}function dU(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||!i.model||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||w(r.coordSysAxesInfo[vl(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function vU(r,t){for(var e=t.model,i=t.dim,n=0;n<r.length;n++){var a=r[n]||{};if(y_(a[i+"AxisId"],e.id)||y_(a[i+"AxisIndex"],e.componentIndex)||y_(a[i+"AxisName"],e.name))return n}}function y_(r,t){return r==="all"||F(r)&&ce(r,t)>=0||r===t}function cM(r){var t=kd(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=__(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent();(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function kd(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[vl(r)]}function fM(r){var t=kd(r);return t&&t.axisPointerModel}function __(r){return!!r.get(["handle","show"])}function vl(r){return r.type+"||"+r.id}var hM={},mU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.axisPointerClass&&cM(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,i,n,a){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,i){var n=this._axisPointer;n&&n.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,n){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=fM(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,i,n):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){hM[e]=i},t.getAxisPointerClass=function(e){return e&&hM[e]},t.type="axis",t})(nt),Rd=mU;var b_=re();function pM(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=b_(r).splitAreaColors,h=Y(),p=0;if(f)for(var d=0;d<u.length;d++){var v=f.get(u[d].tickValue);if(v!=null){p=(v+(c-1)*d)%c;break}}var m=n.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=F(s)?s:[s];for(var d=1;d<u.length;d++){var y=n.toGlobalCoord(u[d].coord),_=void 0,x=void 0,b=void 0,S=void 0;n.isHorizontal()?(_=m,x=l.y,b=y-_,S=l.height,m=_+b):(_=l.x,x=m,b=l.width,S=y-x,m=x+S);var T=u[d-1].tickValue;T!=null&&h.set(T,p),t.add(new Oe({anid:T!=null?"area_"+T:null,shape:{x:_,y:x,width:b,height:S},style:he({fill:s[p]},g),autoBatch:!0,silent:!0})),p=(p+1)%c}b_(r).splitAreaColors=h}}}function dM(r){b_(r).splitAreaColors=null}var gU=["splitArea","splitLine","minorSplitLine","breakArea"],vM=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,i,n,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ee,this.group.add(this._axisGroup),!!Bo(e)){this._axisGroup.add(e.axis.axisBuilder.group),w(gU,function(l){e.get([l,"show"])&&yU[l](this,this._axisGroup,e,e.getCoordSysModel(),n)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Qg(o,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)}},t.prototype.remove=function(){dM(this)},t.type="cartesianAxis",t})(Rd),yU={splitLine:function(r,t,e,i,n){var a=e.axis;if(!a.scale.isBlank()){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=F(l)?l:[l];for(var f=i.coordinateSystem.getRect(),h=a.isHorizontal(),p=0,d=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],m=[],g=s.getLineStyle(),y=0;y<d.length;y++){var _=a.toGlobalCoord(d[y].coord);if(!(y===0&&!u||y===d.length-1&&!c)){var x=d[y].tickValue;h?(v[0]=_,v[1]=f.y,m[0]=_,m[1]=f.y+f.height):(v[0]=f.x,v[1]=_,m[0]=f.x+f.width,m[1]=_);var b=p++%l.length,S=new Qt({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:m[0],y2:m[1]},style:he({stroke:l[b]},g),silent:!0});fo(S.shape,g.lineWidth),t.add(S)}}}},minorSplitLine:function(r,t,e,i,n){var a=e.axis,o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=i.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],h=[],p=s.getLineStyle(),d=0;d<c.length;d++)for(var v=0;v<c[d].length;v++){var m=a.toGlobalCoord(c[d][v].coord);u?(f[0]=m,f[1]=l.y,h[0]=m,h[1]=l.y+l.height):(f[0]=l.x,f[1]=m,h[0]=l.x+l.width,h[1]=m);var g=new Qt({anid:"minor_line_"+c[d][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:p,silent:!0});fo(g.shape,p.lineWidth),t.add(g)}},splitArea:function(r,t,e,i,n){pM(r,t,e,i)},breakArea:function(r,t,e,i,n){var a=zo(),o=e.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,r,e,i.coordinateSystem.getRect(),n)}},S_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(vM);var mM=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=S_.type,e}return t.type="yAxis",t})(vM);var _U=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new Oe({shape:e.coordinateSystem.getRect(),style:he({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(nt),gM={offset:0};function yM(r){r.registerComponentView(_U),r.registerComponentModel(TE),r.registerCoordinateSystem("cartesian2d",lM),Nd(r,"x",Pd,gM),Nd(r,"y",Pd,gM),r.registerComponentView(S_),r.registerComponentView(mM),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var xU=re();function w_(r,t){return!!xU(r)[t]}Xi({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ze);var SU={axisPointer:1,tooltip:1,brush:1};function _M(r,t,e){var i=t.getComponentByElement(r.topTarget);if(!i||i===e||SU.hasOwnProperty(i.mainType))return!1;var n=i.coordinateSystem;if(!n||n.model===e)return!1;var a=Yi(i),o=Yi(e);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var wU=(function(r){N(t,r);function t(e){var i=r.call(this)||this;i._zr=e;var n=ee(i._mousedownHandler,i),a=ee(i._mousemoveHandler,i),o=ee(i._mouseupHandler,i),s=ee(i._mousewheelHandler,i),l=ee(i._pinchHandler,i);return i.enable=function(u,c){var f=c.zInfo,h=Yi(f.component),p=h.z,d=h.zlevel,v={component:f.component,z:p,zlevel:d,z2:Z(f.z2,-1/0)},m=B({},c.triggerInfo);this._opt=he(B({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:v,triggerInfo:m,cursorGrab:"grab",cursorGrabbing:"grabbing"}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this.disable(),this._enabled=!0,(u===!0||u==="move"||u==="pan")&&(Ic(e,"mousedown",n,v),Ic(e,"mousemove",a,v),Ic(e,"mouseup",o,v)),(u===!0||u==="scale"||u==="zoom")&&(Ic(e,"mousewheel",s,v),Ic(e,"pinch",l,v)))},i.disable=function(){this._enabled&&(this._enabled=!1,Lc(e,"mousedown",n),Lc(e,"mousemove",a),Lc(e,"mouseup",o),Lc(e,"mousewheel",s),Lc(e,"pinch",l))},i}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,i,n){var a=this._opt,o=a.zInfoParsed;if(_M(e,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(e,i,n)),u&&s.isInClip&&!s.isInClip(e,i,n)&&(u=!1),u},t.prototype._decideCursorStyle=function(e,i,n,a){var o=e.target;if(!o&&this._checkPointer(e,i,n))return this._opt.cursorGrab;if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(im(e)||Oc(e))){for(var i=e.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=e.offsetX,a=e.offsetY;this._checkPointer(e,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var i=this._zr;if(!(e.gestureEvent==="pinch"||w_(i,"globalPan")||Oc(e))){var n=e.offsetX,a=e.offsetY;if(!this._dragging||!Fd("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,n,a,!1);o&&i.setCursorStyle(o);return}i.setCursorStyle(this._opt.cursorGrabbing);var s=this._x,l=this._y,u=n-s,c=a-l;this._x=n,this._y=a,this._opt.preventDefaultMouseMove&&Ei(e.event),e.__ecRoamConsumed=!0,xM(this,"pan","moveOnMouseMove",e,{dx:u,dy:c,oldX:s,oldY:l,newX:n,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!Oc(e)){var i=this._zr;if(!im(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&i.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!Oc(e)){var i=Fd("zoomOnMouseWheel",e,this._opt),n=Fd("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!i&&!n)){if(i){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(w_(this._zr,"globalPan")||Oc(e))){var i=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,i,n,a,o){e._checkPointer(a,o.originX,o.originY)&&(Ei(a.event),a.__ecRoamConsumed=!0,xM(e,i,n,a,o))},t})(St);function Oc(r){return r.__ecRoamConsumed}var TU=re();function Bd(r){var t=TU(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Ic(r,t,e,i){for(var n=Bd(r),a=n.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-i.zlevel||l.z-i.z||l.z2-i.z2)<=0)break}o.splice(s,0,{listener:e,zInfoParsed:i}),CU(r,t)}function Lc(r,t,e){for(var i=Bd(r),n=i.roam[t]||[],a=0;a<n.length;a++)if(n[a].listener===e){n.splice(a,1),n.length||AU(r,t);return}}function CU(r,t){var e=Bd(r);e.uniform[t]||r.on(t,e.uniform[t]=function(i){var n=e.roam[t];if(n)for(var a=0;a<n.length;a++)n[a].listener(i)})}function AU(r,t){var e=Bd(r),i=e.uniform;i[t]&&(r.off(t,i[t]),i[t]=null)}function xM(r,t,e,i,n){n.isAvailableBehavior=ee(Fd,null,e,i),r.trigger(t,n)}function Fd(r,t,e){var i=e[r];return!r||i&&(!H(i)||t.event[i+"Key"])}var bM=wU;var SM=Qt.prototype,T_=no.prototype,wM=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),eie=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(wM);function C_(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var DU=(function(r){N(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-line",i}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new wM},t.prototype.buildPath=function(e,i){C_(i)?SM.buildPath.call(this,e,i):T_.buildPath.call(this,e,i)},t.prototype.pointAt=function(e){return C_(this.shape)?SM.pointAt.call(this,e):T_.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var i=this.shape,n=C_(i)?[i.x2-i.x1,i.y2-i.y1]:T_.tangentAt.call(this,e);return Ca(n,n)},t})(ve),TM=DU;var A_=["fromSymbol","toSymbol"];function CM(r){return"_"+r+"Type"}function AM(r,t,e){var i=t.getItemVisual(e,r);if(!i||i==="none")return i;var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=nc(n),u=Io(o||0,l);return i+l+u+(a||"")+(s||"")}function DM(r,t,e){var i=t.getItemVisual(e,r);if(!(!i||i==="none")){var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=nc(n),u=Io(o||0,l),c=It(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function EU(r){var t=new TM({name:"line",subPixelOptimize:!0});return D_(t.shape,r),t}function D_(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var MU=(function(r){N(t,r);function t(e,i,n){var a=r.call(this)||this;return a._createLine(e,i,n),a}return t.prototype._createLine=function(e,i,n){var a=e.hostModel,o=e.getItemLayout(i),s=e.getItemVisual(i,"z2"),l=EU(o);l.shape.percent=0,Ot(l,{z2:Z(s,0),shape:{percent:1}},a,i),this.add(l),w(A_,function(u){var c=DM(u,e,i);this.add(c),this[CM(u)]=AM(u,e,i)},this),this._updateCommonStl(e,i,n)},t.prototype.updateData=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(i),l={shape:{}};D_(l.shape,s),Ke(o,l,a,i),w(A_,function(u){var c=AM(u,e,i),f=CM(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=DM(u,e,i);this.add(h)}this[f]=c},this),this._updateCommonStl(e,i,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,f=n&&n.emphasisDisabled,h=n&&n.focus,p=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(i),v=d.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=v.get("disabled"),h=v.get("focus"),p=v.get("blurScope"),c=fr(d)}var m=e.getItemVisual(i,"style"),g=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,w(A_,function(S){var T=this.childOfName(S);if(T){T.setColor(g),T.style.opacity=m.opacity;for(var A=0;A<Jt.length;A++){var E=Jt[A],M=o.getState(E);if(M){var O=M.style||{},L=T.ensureState(E),I=L.style||(L.style={});O.stroke!=null&&(I[T.__isEmptyBrush?"stroke":"fill"]=O.stroke),O.opacity!=null&&(I.opacity=O.opacity)}}T.markRedraw()}},this);var y=a.getRawValue(i);$r(this,c,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(S,T){return a.getFormattedLabel(S,T,e.dataType)}},inheritColor:g||K.color.neutral99,defaultOpacity:m.opacity,defaultText:(y==null?e.getName(i):isFinite(y)?we(y,10):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");F(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),vi(this,h,p,f)},t.prototype.highlight=function(){dn(this)},t.prototype.downplay=function(){vn(this)},t.prototype.updateLayout=function(e,i){this.childOfName("line").stopAnimation(),this.setLinePoints(e.getItemLayout(i))},t.prototype.setLinePoints=function(e){var i=this.childOfName("line");D_(i.shape,e),i.dirty()},t.prototype.beforeUpdate=function(){var e=this,i=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),a=e.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=jl([],f,c);Ca(h,h);function p(M,O){var L=M.__specifiedRotation;if(L==null){var I=l.tangentAt(O);M.attr("rotation",(O===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else M.attr("rotation",L)}if(i&&(i.setPosition(c),p(i,0),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&(n.setPosition(f),p(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var d=void 0,v=void 0,m=a.__labelDistance,g=m[0]*o,y=m[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var T=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var A=-Math.atan2(x[1],x[0]);f[0]<c[0]&&(A=Math.PI+A),a.rotation=A}var E=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":E=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":E=y,v="top";break;default:E=0,v="middle"}switch(a.__position){case"end":a.x=h[0]*g+f[0],a.y=h[1]*y+f[1],d=h[0]>.8?"left":h[0]<-.8?"right":"center",v=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*g+c[0],a.y=-h[1]*y+c[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",v=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*T+c[0],a.y=c[1]+E,d=x[0]<0?"right":"left",a.originX=-g*T,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+E,d="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*T+f[0],a.y=f[1]+E,d=x[0]>=0?"right":"left",a.originX=g*T,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||d})}},t})(Ee),EM=MU;var OU=(function(){function r(t){this.group=new Ee,this._LineCtor=t||EM}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=MM(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=MM(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[];function n(l){!l.isGroup&&!IU(l)&&(l.incremental=i,l.ensureState("emphasis").hoverLayer=co)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(E_(o)){var s=new this._LineCtor(e,a,this._seriesScope);s.traverse(n),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){gn(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,i){var n=t.getItemLayout(e);if(E_(n)){var a=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,i,n,a){var o=t.getItemGraphicEl(i);if(!E_(e.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(e,n,a):o=new this._LineCtor(e,n,a),e.setItemGraphicEl(n,o),this.group.add(o)},r})();function IU(r){return r.animators&&r.animators.length>0}function MM(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:fr(t)}}function OM(r){return isNaN(r[0])||isNaN(r[1])}function E_(r){return r&&!OM(r[0])&&!OM(r[1])}var IM=OU;function En(r,t,e,i,n,a){r=r||0;var o=ln(e[1],-e[0]);if(n!=null&&(n=ml(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(ln(t[1],-t[0]));s=ml(s,[0,o]),n=a=ml(s,[n,a]),i=0}t[0]=ml(t[0],e),t[1]=ml(t[1],e);var l=M_(t,i);t[i]+=r;var u=n||0,c=e.slice();l.sign<0?c[0]=ln(c[0],u):c[1]=ln(c[1],-u),t[i]=ml(t[i],c);var f;return f=M_(t,i),n!=null&&(f.sign!==l.sign||f.span<n)&&(t[1-i]=ln(t[i],l.sign*n)),f=M_(t,i),a!=null&&f.span>a&&(t[1-i]=ln(t[i],f.sign*a)),t}function M_(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ml(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Ho=re(),LM=ne,O_=ee,LU=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Ee,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var h=Ae(PM,e,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}kM(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&bi(n).w>s)return!0;if(o){var l=kd(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=Ho(t).pointerEl=new ot[a.type](LM(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=Ho(t).labelEl=new He(LM(e.label));t.add(a),NM(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=Ho(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=Ho(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),NM(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=po(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ei(u.event)},onmousedown:O_(this._onHandleDragMove,this,0,0),drift:O_(this._onHandleDragMove,this),ondragend:O_(this._onHandleDragEnd,this)}),i.add(n)),kM(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");F(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,sa(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){PM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,I_(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(I_(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(I_(n)),Ho(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Eo(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r})();function PM(r,t,e,i){RM(Ho(e).lastProp,i)||(Ho(e).lastProp=i,t?Ke(e,i,r):(e.stopAnimation(),e.attr(i)))}function RM(r,t){if(W(r)&&W(t)){var e=!0;return w(t,function(i,n){e=e&&RM(r[n],i)}),!!e}else return r===t}function NM(r,t){r[t.get(["label","show"])?"show":"hide"]()}function I_(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function kM(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}var FM=LU;function BM(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function PU(r,t,e,i,n){var a=e.get("value"),o=L_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Wi(s.get("padding")||0),u=s.getFont(),c=Wf(o,u),f=n.position,h=c.width+l[1]+l[3],p=c.height+l[0]+l[2],d=n.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var v=n.verticalAlign;v==="bottom"&&(f[1]-=p),v==="middle"&&(f[1]-=p/2),NU(f,h,p,i);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Lr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function NU(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function L_(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:cl(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};w(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),H(o)?a=o.replace("{value}",a):$(o)&&(a=o(s))}return a}function P_(r,t,e){var i=kt();return Da(i,i,e.rotation),Qo(i,i,e.position),ho([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function zM(r,t,e,i,n,a){var o=Md.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),PU(t,i,n,a,{position:P_(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function VM(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function UM(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function HM(r,t,e){return bi(r,{fromStat:{sers:U(t,function(i){return e.getSeriesByIndex(i.seriesIndex)})},min:1}).w}function GM(r,t,e){return[Se(Xe(t[0],t[1]),r-e/2),Xe(r+e/2,Se(t[0],t[1]))]}var kU=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),c=s.getGlobalExtent(),f=WM(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var p=BM(a),d=RU[u](s,h,c,f,a.get("seriesDataIndices"),a.ecModel);d.style=p,e.graphicKey=d.type,e.pointer=d}var v=Ac(l.getRect(),n);zM(i,e,v,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Ac(i.axis.grid.getRect(),i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=P_(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=WM(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=i[c],f[c]=Xe(l[1],f[c]),f[c]=Se(l[0],f[c]);var h=(u[1]+u[0])/2,p=[h,h];p[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:p,tooltipOption:d[c]}},t})(FM);function WM(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var RU={line:function(r,t,e,i){var n=VM([t,i[0]],[t,i[1]],ZM(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e,i,n,a){var o=HM(r,n,a),s=i[1]-i[0],l=GM(t,e,o),u=l[0],c=l[1];return{type:"Rect",shape:UM([u,i[0]],[c-u,s],ZM(r))}}};function ZM(r){return r.dim==="x"?0:1}var XM=kU;var FU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return 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:K.color.border,width:1,type:"dashed"},shadowStyle:{color:K.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:K.color.neutral00,padding:[5,7,5,7],backgroundColor:K.color.accent60,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:K.color.accent40,throttle:40}},t})(Le),KM=FU;var Mn=re(),BU=w;function zd(r,t,e){if(!fe.node){var i=t.getZr();Mn(i).records||(Mn(i).records={}),zU(i,t);var n=Mn(i).records[r]||(Mn(i).records[r]={});n.handler=e}}function zU(r,t){if(Mn(r).initialized)return;Mn(r).initialized=!0,e("click",Ae(N_,"click")),e("mousemove",Ae(N_,"mousemove")),e("mousewheel",Ae(N_,"mousewheel")),e("globalout",UU);function e(i,n){r.on(i,function(a){var o=HU(t);BU(Mn(r).records,function(s){s&&n(s,a,o.dispatchAction)}),VU(o.pendings,t)})}}function VU(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function UU(r,t,e){r.handler("leave",null,e)}function N_(r,t,e,i){t.handler(r,e,i)}function HU(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function Pc(r,t){if(!fe.node){var e=t.getZr(),i=(Mn(e).records||{})[r];i&&(Mn(e).records[r]=null)}}var GU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click|mousewheel";zd("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){Pc("axisPointer",i)},t.prototype.dispose=function(e,i){Pc("axisPointer",i)},t.type="axisPointer",t})(nt),jM=GU;function Nc(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Zr(a,r);if(o==null||o<0||F(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,p=f==="x"||f==="radius"?1:0,d=a.mapDimension(h),v=[];v[p]=a.get(d,o),v[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(v)||[]}else e=l.dataToPoint(a.getValues(U(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),e=[m.x+m.width/2,m.y+m.height/2]}return{point:e,el:s}}var $M=re();function k_(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||ee(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Vd(n)&&(n=Nc({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Vd(n),u=a.axesInfo,c=s.axesInfo,f=i==="leave"||Vd(n),h={},p={},d={list:[],map:{}},v={showPointer:Ae(WU,p),showTooltip:Ae(ZU,d)};w(s.coordSysMap,function(g,y){var _=l||g.containPoint(n);w(s.coordSysAxesInfo[y],function(x,b){var S=x.axis,T=jU(u,x);if(!f&&_&&(!u||T)){var A=T&&T.value;A==null&&!l&&(A=S.pointToData(n)),A!=null&&JM(x,A,v,!1,h)}})});var m={};return w(c,function(g,y){var _=g.linkGroup;_&&!p[y]&&w(_.axesInfo,function(x,b){var S=p[b];if(x!==g&&S){var T=S.value;_.mapper&&(T=g.axis.scale.parse(_.mapper(T,QM(x),QM(g)))),m[g.key]=T}})}),w(m,function(g,y){JM(c[y],g,v,!0,h)}),XU(p,c,h),KU(d,n,r,o),qU(c,o,e),h}}function JM(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=YU(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function YU(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return w(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),f,h;if(l.getAxisTooltipData){var p=l.getAxisTooltipData(c,r,e);h=p.dataIndices,f=p.nestestValue}else{if(h=l.indicesOfNearest(i,c[0],r,e.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(gt(f)){var d=r-f,v=Math.abs(d);v<=o&&((v<o||d>=0&&s<0)&&(o=v,s=d,n=f,a.length=0),w(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:n}}function WU(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function ZU(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=vl(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function XU(r,t,e){var i=e.axesInfo=[];w(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function KU(r,t,e,i){if(Vd(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function qU(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=$M(i)[n]||{},o=$M(i)[n]={};w(r,function(c,f){var h=c.axisPointerModel.option;h.status==="show"&&c.triggerEmphasis&&w(h.seriesDataIndices,function(p){o[p.seriesIndex+"|"+p.dataIndex]=p})});var s=[],l=[];function u(c){return{seriesIndex:c.seriesIndex,dataIndex:c.dataIndex}}w(a,function(c,f){!o[f]&&l.push(u(c))}),w(o,function(c,f){!a[f]&&s.push(u(c))}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function jU(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function QM(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function Vd(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ud(r){Rd.registerAxisPointerClass("CartesianAxisPointer",XM),r.registerComponentModel(KM),r.registerComponentView(jM),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=uM(t,e)}}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},k_)}function R_(r){Pt(yM),Pt(Ud)}var F_=["x","y","radius","angle","single"],$U=re(),JU=["cartesian2d","polar","singleAxis"];function eO(r){var t=r.get("coordinateSystem");return ce(JU,t)>=0}function ni(r){return r+"Axis"}function tO(r,t){var e=Y(),i=[],n=Y();r.eachComponent({mainType:"dataZoom",query:t},function(c){n.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!n.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){n.set(c.uid,!0),i.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,p){var d=e.get(h);d&&d[p]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(e.get(f)||e.set(f,[]))[h]=!0})}return i}function Hd(r){var t=r.ecModel,e={infoList:[],infoMap:Y()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(ni(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}function rO(r){var t=$U(Mp(r));return t.axisProxyMap||(t.axisProxyMap=Y())}function gl(r){if(r)return rO(r.ecModel).get(r.uid)}function iO(r,t){rO(r.ecModel).set(r.uid,t)}function Gd(r,t){var e=t.getAxisModel().axis.__alignTo;return e&&r.getAxisProxy(e.dim,e.model.componentIndex)?gl(e.model):null}var B_=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),QU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=nO(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=nO(e);me(this.option,e,!0),me(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=Y(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return w(F_,function(n){var a=this.getReferringComponents(ni(n),RS);if(a.specified){i=!0;var o=new B_;w(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new B_;if(h.add(f.componentIndex),e.set(c,h),a=!1,c==="x"||c==="y"){var p=f.getReferringComponents("grid",at).models[0];p&&w(u,function(d){f.componentIndex!==d.componentIndex&&p===d.getReferringComponents("grid",at).models[0]&&h.add(d.componentIndex)})}}}a&&w(F_,function(u){if(a){var c=n.findComponents({mainType:ni(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new B_;f.add(c[0].componentIndex),e.set(u,f),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(ni(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){w(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){return gl(this.getAxisModel(e,i))},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(ni(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;w(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,i).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return gl(e);for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var o=n[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},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})(Le);function nO(r){var t={};return w(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var yl=QU;var eH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.dataZoomModel=e,this.ecModel=i,this.api=n},t.type="dataZoom",t})(nt),Yd=eH;var tH=(function(){function r(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getWindow=function(){return ne(this._window)},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(eO(e)){var i=ni(this._dimName),n=e.getReferringComponents(i,at).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ne(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._extent,i=this.getAxisModel().axis,n=i.scale,a=this._dataZoomModel,o=a.getRangePropMode(),s=[0,100],l=[],u=[],c,f=[!1,!1];w(["start","end"],function(_,x){var b=t[_],S=t[_+"Value"];o[x]==="percent"?(b==null&&(b=s[x]),S=je(b,s,e),f[x]=!0):(c=!0,S==null?S=e[x]:(S=n.parse(S),n.sanitize&&(S=n.sanitize(S,e))),b=je(S,e,s)),u[x]=S==null||isNaN(S)?e[x]:S,l[x]=b==null||isNaN(b)?s[x]:b}),Ct(u),Ct(l);var h=this._minMaxSpan;c?p(u,l,e,s,!1):p(l,u,s,e,!0);function p(_,x,b,S,T){var A=T?"Span":"ValueSpan";En(0,_,b,"all",h["min"+A],h["max"+A]);for(var E=0;E<2;E++)x[E]=je(_[E],b,S,!0),T&&(x[E]=x[E],f[E]=!0);ms(x)}var d=lt(n)||Ki(n),v=i.getExtent(),m=Ge(v[1]-v[0]),g=d?0:eh(u,m,.5);w([[0,Li],[1,sr]],function(_){var x=_[0],b=_[1];!f[x]||!isFinite(g)||(u[x]=we(u[x],g),u[x]=Xe(e[1],Se(e[0],u[x])),l[x]===s[x]&&(u[x]=e[x],d&&(u[x]=b(u[x]))))}),ms(u);var y=[je(u[0],e,s,!0),je(u[1],e,s,!0)];return ms(y),{value:u,percent:l,percentInverted:y,valuePrecision:g}},r.prototype.reset=function(t,e){if(this.hostedBy(t)){var i=this.getAxisModel().axis;md(i,pD);var n=i.scale.rawExtentInfo;this._extent=n.makeNoZoom(),this._updateMinMaxSpan();var a=t.settledOption;e&&(a=he({start:e[0],end:e[1]},a));var o=this._window=this.calculateDataWindow(a),s=o.percent,l=o.value;s[0]!==0&&n.setZoomMM(0,l[0]),s[1]!==100&&n.setZoomMM(1,l[1])}},r.prototype.filterData=function(t,e){if(!this.hostedBy(t))return;var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._window.value;if(a==="none")return;w(n,function(l){var u=l.getData(),c=u.mapDimensionsAll(i);if(c.length){if(a==="weakFilter"){var f=u.getStore(),h=U(c,function(p){return u.getDimensionIndex(p)},u);u.filterSelf(function(p){for(var d,v,m,g=0;g<c.length;g++){var y=f.get(h[g],p),_=!isNaN(y),x=y<o[0],b=y>o[1];if(_&&!x&&!b)return!0;_&&(m=!0),x&&(d=!0),b&&(v=!0)}return m&&d&&v})}else w(c,function(p){if(a==="empty")l.setData(u=u.map(p,function(v){return s(v)?v:NaN}));else{var d={};d[p]=o,u.selectRange(d)}});w(c,function(p){u.setApproximateExtent(o,p)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._extent;w(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=je(i[0]+o,i,[0,100],!0):a!=null&&(o=je(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r})(),aO=tH;var rH={dirtyOnOverallProgress:!0,getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(ni(o),s);n(o,s,l,a)})})}var e=[];t(function(n,a,o,s){if(!gl(o)){var l=new aO(n,a,s,r);e.push(l),iO(o,l)}});var i=Y();return w(e,function(n){w(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){var i=[];e.eachTargetAxis(function(n,a){var o=e.getAxisProxy(n,a),s=Gd(e,o);s?i.push([o,s]):o.reset(e,null)}),w(i,function(n){n[0].reset(e,n[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getWindow(),a=n.percent,o=n.value;e.setCalculatedRange({start:a[0],end:a[1],startValue:o[0],endValue:o[1]})}})}},oO=rH;function z_(r){r.registerAction("dataZoom",function(t,e){var i=tO(e,t);w(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var iH=gs();function kc(r){iH(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,oO),z_(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function sO(r,t){var e=Wi(t.get("padding")),i=t.getItemStyle(["color","opacity"]);i.fill=t.get("backgroundColor");var n=new Oe({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1});return n}var nH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:K.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:K.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:K.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:K.color.tertiary,fontSize:14}},t})(Le),lO=nH;function Wd(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function uO(r){if(fe.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e<i;e++)if(r[e]in t)return r[e]}}var V_=uO(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cO=uO(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function U_(r,t){if(!r)return t;t=zs(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function fO(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?t?e[t]:e:null}var aH=U_(cO,"transition"),H_=U_(V_,"transform"),oH="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(fe.transform3dSupported?"will-change:transform;":"");function sH(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function lH(r,t,e){if(!H(e)||e==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");t=gi(t);var a=sH(e),o=Math.max(Math.round(n)*1.5,6),s="",l=H_+":",u;ce(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+n,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),p=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-f)/2)*100)/100;s+=";"+a+":-"+p+"px";var d=t+" solid "+n+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'<div style="'+v.join("")+'"></div>'}function uH(r,t,e){var i="cubic-bezier(0.23,1,0.32,1)",n="",a="";return e&&(n=" "+r/2+"s "+i,a="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+i,a+=(a.length?",":"")+(fe.transformSupported?""+H_+n:",left"+n+",top"+n)),aH+":"+a}function hO(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!fe.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=fe.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+H_+":"+o+";":[["top",0],["left",0],[V_,o]]}function cH(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=Z(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),w(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function fH(r,t,e,i){var n=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=xp(r,"html"),p=u+"px "+c+"px "+s+"px "+l;return n.push("box-shadow:"+p),t&&a>0&&n.push(uH(a,e,i)),o&&n.push("background-color:"+o),w(["width","color","radius"],function(d){var v="border-"+d,m=zs(v),g=r.get(m);g!=null&&n.push(v+":"+g+(d==="color"?"":"px"))}),n.push(cH(f)),h!=null&&n.push("padding:"+Wi(h).join("px ")+"px"),n.join(";")+";"}function pO(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&vb(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var hH=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,fe.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(H(a)?document.querySelector(a):ba(a)?a:$(a)&&a(t.getDom()));pO(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();ar(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=fO(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=oH+fH(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+hO(a[0],a[1],!0)+("border-color:"+gi(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(H(a)&&i.get("trigger")==="item"&&!Wd(i)&&(s=lH(i,n,a)),H(t))o.innerHTML=t+s;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var l=0;l<t.length;l++)ba(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var i=this._styleCoord;if(pO(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var n=this.el.style,a=hO(i[0],i[1]);w(a,function(o){n[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",fe.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;mb(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var i=e.parentNode;i&&i.removeChild(e)}this.el=this._container=null},r})(),dO=hH;var pH=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),mO(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,i,n,a){var o=this;W(t)&&Et(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new He({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:xp(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),w(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),w(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=vO(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},r.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;mO(n,this._zr,t,e),t=n[0],e=n[1];var a=i.style,o=ga(a.borderWidth||0),s=vO(a);i.x=t+o+s.left,i.y=e+o+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function ga(r){return Math.max(0,r)}function vO(r){var t=ga(r.shadowBlur||0),e=ga(r.shadowOffsetX||0),i=ga(r.shadowOffsetY||0);return{left:ga(t-e),right:ga(t+e),top:ga(t-i),bottom:ga(t+i)}}function mO(r,t,e,i){r[0]=e,r[1]=i,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var gO=pH;var dH=new Oe({shape:{x:-1,y:-1,width:2,height:2}}),vH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){if(!(fe.node||!i.getDom())){var n=e.getComponent("tooltip"),a=this._renderMode=zS(n.get("renderMode"));this._tooltipContent=a==="richText"?new gO(i):new dO(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,i,n){if(!(fe.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?sa(this,"_updatePosition",50,"fixRate"):Eo(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,i=e.get("triggerOn");zd("itemTooltip",this._api,ee(function(n,a,o){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(e.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||fe.node||!n.getDom())){var o=yO(a,n);this._ticket="";var s=a.dataByCoordSys,l=_H(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=dH;c.x=a.x,c.y=a.y,c.update(),_e(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var f=Nc(a,i),h=f.point[0],p=f.point[1];h!=null&&p!=null&&this._tryShow({offsetX:h,offsetY:p,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,a.from!==this.uid&&this._hide(yO(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var c=u.getData(),f=Rc([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=_e(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var l,u;Mo(n,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(_e(c).dataIndex!=null?l=c:_e(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=ee(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Rc([i.tooltipOption],a),l=this._renderMode,u=[],c=Zi("section",{blocks:[],noHeader:!0}),f=[],h=new bp;w(e,function(y){w(y.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value,S=x.axis,T=S.scale.parse(b);if(!(!x||b==null)){var A=L_(b,S,n,_.seriesDataIndices,_.valueLabelOpt),E=Zi("section",{header:A,noHeader:!Dt(A),sortBlocks:!0,blocks:[]});c.blocks.push(E),w(_.seriesDataIndices,function(M){var O=n.getSeriesByIndex(M.seriesIndex),L=M.dataIndexInside,I=O.getDataParams(L);if(!(I.dataIndex<0)){I.axisDim=_.axisDim,I.axisIndex=_.axisIndex,I.axisType=_.axisType,I.axisId=_.axisId,I.axisValue=cl(x.axis,{value:T}),I.axisValueLabel=A,I.marker=h.makeTooltipMarker("item",gi(I.color),l);var k=Ny(O.formatTooltip(L,!0,null)),z=k.frag;if(z){var V=Rc([O],a).get("valueFormatter");E.blocks.push(V?B({valueFormatter:V},z):z)}k.text&&f.push(k.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var p=i.position,d=s.get("order"),v=Vy(c,h,l,d,n.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var m=l==="richText"?`
|
|
17
17
|
|
|
18
|
-
`:"<br/>",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],p,null,h)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=_e(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),p=this._renderMode,d=e.positionDefault,v=Rc([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=v.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new bp;g.marker=y.makeTooltipMarker("item",gi(g.color),p);var _=Ny(u.formatTooltip(c,!1,f)),x=v.get("order"),b=v.get("valueFormatter"),S=_.frag,T=S?Vy(b?B({valueFormatter:b},S):S,y,p,x,a.get("useUTC"),v.get("textStyle")):_.text,A="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,T,g,A,e.offsetX,e.offsetY,e.position,e.target,y)}),n({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=_e(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(H(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ne(l),l.content=wt(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var p=e.positionDefault,d=Rc(f,this._tooltipModel,p?{position:p}:null),v=d.get("content"),m=Math.random()+"",g=new bp;this._showOrMove(d,function(){var y=ne(d.get("formatterParams")||{});this._showTooltipContent(d,v,y,m,e.offsetX,e.offsetY,e.position,i,g)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var p=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),v=d.color;if(h)if(H(h)){var m=e.ecModel.get("useUTC"),g=F(n)?n[0]:n,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;p=h,y&&(p=yn(g.axisValue,p,m)),p=Vs(p,n,!0)}else if(j(h)){var _=ee(function(x,b){x===this._ticket&&(f.setContent(b,c,e,v,l),this._updatePosition(e,l,o,s,f,n,u))},this);this._ticket=a,p=h(n,a,_)}else p=h;f.setContent(p,c,e,v,l),f.show(e,v),this._updatePosition(e,l,o,s,f,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a,o){if(n==="axis"||F(i))return{color:a||o};if(!F(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||e.get("position");var f=o.getSize(),h=e.get("align"),p=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),j(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),F(i))n=Ve(i[0],u),a=Ve(i[1],c);else if(W(i)){var v=i;v.width=f[0],v.height=f[1];var m=Jr(v,{width:u,height:c});n=m.x,a=m.y,h=null,p=null}else if(H(i)&&l){var g=yH(i,d,f,e.get("borderWidth"));n=g[0],a=g[1]}else{var g=mH(n,a,o,u,c,h?null:20,p?null:20);n=g[0],a=g[1]}if(h&&(n-=_O(h)?f[0]/2:h==="right"?f[0]:0),p&&(a-=_O(p)?f[1]/2:p==="bottom"?f[1]:0),Wd(e)){var g=gH(n,a,o,u,c);n=g[0],a=g[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&w(n,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&w(u,function(h,p){var d=f[p]||{},v=h.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&v.length===m.length,o&&w(v,function(g,y){var _=m[y];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),a&&w(h.seriesDataIndices,function(g){var y=g.seriesIndex,_=i[y],x=a[y];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){fe.node||!i.getDom()||(Eo(this,"_updatePosition"),this._tooltipContent.dispose(),Pc("itemTooltip",i),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(nt);function Rc(r,t,e){var i=t.ecModel,n;e?(n=new Re(e,i,i),n=new Re(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Re&&(o=o.get("tooltip",!0)),H(o)&&(o={formatter:o}),o&&(n=new Re(o,n,i)))}return n}function yO(r,t){return r.dispatchAction||ee(t.dispatchAction,t)}function mH(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function gH(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function yH(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+c+o;break;case"left":s=t.x-n-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function _O(r){return r==="center"||r==="middle"}function _H(r,t,e){var i=wu(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Zn(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=_e(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}var xO=vH;function G_(r){Pt(Ud),r.registerComponentModel(lO),r.registerComponentView(xO),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ze),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ze)}function Fc(r,t){if(!r)return!1;for(var e=F(r)?r:[r],i=0;i<e.length;i++)if(e[i]&&e[i][t])return!0;return!1}function Zd(r){Su(r,"label",["show"])}var Xd=re(),bO=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e.preventAutoZ=!0,e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(fe.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,i){this._mergeOption(e,i,!1,!1)},t.prototype._mergeOption=function(e,i,n,a){var o=this.mainType;n||i.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Xd(s)[o];if(!l||!l.data){Xd(s)[o]=null;return}u?u._mergeOption(l,i,!0):(a&&Zd(l),w(l.data,function(c){c instanceof Array?(Zd(c[0]),Zd(c[1])):Zd(c)}),u=this.createMarkerModelFromSeries(l,this,i),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Xd(s)[o]=u},this)},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return Zi("section",{header:this.name,blocks:[Zi("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,i){var n=Ju.prototype.getDataParams.call(this,e,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},t.getMarkerModelFromSeries=function(e,i){return Xd(e)[i]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(Le);mt(bO,Ju.prototype);var ai=bO;function Y_(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function xH(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Kd(r,t,e,i,n,a,o){var s=[],l=Rr(t,n),u=l?t.getCalculationInfo("stackResultDimension"):n,c=Bc(t,u,r),f=t.hostModel,h=f.indicesOfNearest(e,u,c)[0];s[a]=t.get(i,h),s[o]=t.get(u,h);var p=t.get(n,h),d=Kt(t.get(n,h));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,p]}var qd={min:Ae(Kd,"min"),max:Ae(Kd,"max"),average:Ae(Kd,"average"),median:Ae(Kd,"median")};function _l(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!xH(t)&&!F(t.coord)&&F(n)){var a=W_(t,e,i,r);if(t=ne(t),t.type&&qd[t.type]&&a.baseAxis&&a.valueAxis){var o=ce(n,a.baseAxis.dim),s=ce(n,a.valueAxis.dim),l=qd[t.type](e,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!F(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&qd[t.type]){var c=i.getOtherAxis(u);c&&(t.value=Bc(e,e.mapDimension(c.dim),t.type))}}else for(var f=t.coord,h=0;h<2;h++)qd[f[h]]&&(f[h]=Bc(e,e.mapDimension(n[h]),f[h]));return t}}function W_(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(bH(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function bH(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function xl(r,t){return r&&r.containData&&t.coord&&!Y_(t)?r.containData(t.coord):!0}function SO(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!Y_(t)&&!Y_(e)?r.containZone(t.coord,e.coord):!0}function wO(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return ti(o,t[a])}:function(e,i,n,a){return ti(e.value,t[a])}}function Bc(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Z_=re(),SH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=Y()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){Z_(s).keep=!1}),i.eachSeries(function(s){var l=ai.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!Z_(s).keep&&a.group.remove(s.group)}),wH(i,o,this.type)},t.prototype.markKeep=function(e){Z_(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;w(e,function(a){var o=ai.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?gh(l):Nu(l))})}})},t.type="marker",t})(nt);function wH(r,t,e){r.eachSeries(function(i){var n=ai.getMarkerModelFromSeries(i,e),a=t.get(i.id);if(n&&a&&a.group){var o=Yi(n),s=o.z,l=o.zlevel;Yu(a.group,s,l)}})}var $d=SH;var TH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},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})(ai),CO=TH;var jd=re(),CH=function(r,t,e,i){var n=r.getData(),a;if(F(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=nr(i.yAxis,i.xAxis);else{var u=W_(i,n,t,r);s=u.valueAxis;var c=il(n,u.valueDataDim);l=Bc(n,c,o)}var f=s.dim==="x"?0:1,h=1-f,p=ne(i),d={coord:[]};p.type=null,p.coord=[],p.coord[h]=-1/0,d.coord[h]=1/0;var v=e.get("precision");v>=0&&ge(l)&&(l=+l.toFixed(Math.min(v,20))),p.coord[f]=d.coord[f]=l,a=[p,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var m=[_l(r,a[0]),_l(r,a[1]),B({},a[2])];return m[2].type=m[2].type||null,me(m[2],m[0]),me(m[2],m[1]),m};function Jd(r){return!isNaN(r)&&!isFinite(r)}function AO(r,t,e,i){var n=1-r,a=i.dimensions[r];return Jd(t[n])&&Jd(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function AH(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(AO(1,e,i,r)||AO(0,e,i,r)))return!0}return xl(r,t[0])&&xl(r,t[1])}function X_(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Ve(o.get("x"),n.getWidth()),u=Ve(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var c=a.dimensions,f=r.get(c[0],t),h=r.get(c[1],t);s=a.dataToPoint([f,h])}if(Cn(a,"cartesian2d")){var p=a.getAxis("x"),d=a.getAxis("y"),c=a.dimensions;Jd(r.get(c[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[e?0:1]):Jd(r.get(c[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var DH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ai.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=jd(o).from,u=jd(o).to;l.each(function(c){X_(l,c,!0,a,n),X_(u,c,!1,a,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new IM);this.group.add(c.group);var f=EH(o,e,i),h=f.from,p=f.to,d=f.line;jd(i).from=h,jd(i).to=p,i.setData(d);var v=i.get("symbol"),m=i.get("symbolSize"),g=i.get("symbolRotate"),y=i.get("symbolOffset");F(v)||(v=[v,v]),F(m)||(m=[m,m]),F(g)||(g=[g,g]),F(y)||(y=[y,y]),f.from.each(function(x){_(h,x,!0),_(p,x,!1)}),d.each(function(x){var b=d.getItemModel(x),S=b.getModel("lineStyle").getLineStyle();d.setItemLayout(x,[h.getItemLayout(x),p.getItemLayout(x)]);var T=b.get("z2");S.stroke==null&&(S.stroke=h.getItemVisual(x,"style").fill),d.setItemVisual(x,{z2:Z(T,0),fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:p.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(x,"symbolOffset"),toSymbolRotate:p.getItemVisual(x,"symbolRotate"),toSymbolSize:p.getItemVisual(x,"symbolSize"),toSymbol:p.getItemVisual(x,"symbol"),style:S})}),c.updateData(d),f.line.eachItemGraphicEl(function(x){_e(x).dataModel=i,x.traverse(function(b){_e(b).dataModel=i})});function _(x,b,S){var T=x.getItemModel(b);X_(x,b,S,e,a);var A=T.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=qs(l,"color")),x.setItemVisual(b,{symbolKeepAspect:T.get("symbolKeepAspect"),symbolOffset:Z(T.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Z(T.get("symbolRotate",!0),g[S?0:1]),symbolSize:Z(T.get("symbolSize"),m[S?0:1]),symbol:Z(T.get("symbol",!0),v[S?0:1]),style:A})}this.markKeep(c),c.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t})($d);function EH(r,t,e){var i;r?i=U(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new _i(i,e),a=new _i(i,e),o=new _i([],e),s=U(e.get("data"),Ae(CH,t,r,e));r&&(s=Be(s,Ae(AH,r)));var l=wO(!!r,i);return n.initData(U(s,function(u){return u[0]}),null,l),a.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}var DO=DH;function K_(r){r.registerComponentModel(CO),r.registerComponentView(DO),r.registerPreprocessor(function(t){Fc(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var MH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},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})(ai),EO=MH;var Qd=re(),OH=function(r,t,e,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=_l(r,n),s=_l(r,a),l=o.coord,u=s.coord;l[0]=nr(l[0],-1/0),l[1]=nr(l[1],-1/0),u[0]=nr(u[0],1/0),u[1]=nr(u[1],1/0);var c=Hv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function ev(r){return!isNaN(r)&&!isFinite(r)}function MO(r,t,e,i){var n=1-r;return ev(t[n])&&ev(e[n])}function IH(r,t){var e=t.coord[0],i=t.coord[1],n={coord:e,x:t.x0,y:t.y0},a={coord:i,x:t.x1,y:t.y1};return Cn(r,"cartesian2d")?e&&i&&(MO(1,e,i,r)||MO(0,e,i,r))?!0:SO(r,n,a):xl(r,n)||xl(r,a)}function OO(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Ve(o.get(e[0]),n.getWidth()),u=Ve(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var c=r.getValues(["x0","y0"],t),f=r.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(f),d=[];e[0]==="x0"?d[0]=h[0]>p[0]?f[0]:c[0]:d[0]=h[0]>p[0]?c[0]:f[0],e[1]==="y0"?d[1]=h[1]>p[1]?f[1]:c[1]:d[1]=h[1]>p[1]?c[1]:f[1],s=i.getMarkerPosition(d,e,!0)}else{var v=r.get(e[0],t),m=r.get(e[1],t),g=[v,m];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(Cn(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),v=r.get(e[0],t),m=r.get(e[1],t);ev(v)?s[0]=y.toGlobalCoord(y.getExtent()[e[0]==="x0"?0:1]):ev(m)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var IO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],LH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ai.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=U(IO,function(f){return OO(s,l,f,a,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ee});this.group.add(c.group),this.markKeep(c);var f=PH(o,e,i);i.setData(f),f.each(function(h){var p=U(IO,function(M){return OO(f,h,M,e,a)}),d=o.getAxis("x").scale,v=o.getAxis("y").scale,m=d.getExtent(),g=v.getExtent(),y=[d.parse(f.get("x0",h)),d.parse(f.get("x1",h))],_=[v.parse(f.get("y0",h)),v.parse(f.get("y1",h))];Ct(y),Ct(_);var x=!(m[0]>y[1]||m[1]<y[0]||g[0]>_[1]||g[1]<_[0]),b=!x;f.setItemLayout(h,{points:p,allClipped:b});var S=f.getItemModel(h),T=S.getModel("itemStyle").getItemStyle(),A=S.get("z2"),E=qs(l,"color");T.fill||(T.fill=E,H(T.fill)&&(T.fill=Rf(T.fill,.4))),T.stroke||(T.stroke=E),f.setItemVisual(h,"style",T),f.setItemVisual(h,"z2",Z(A,0))}),f.diff(Qd(c).data).add(function(h){var p=f.getItemLayout(h),d=f.getItemVisual(h,"z2");if(!p.allClipped){var v=new Gi({z2:Z(d,0),shape:{points:p.points}});f.setItemGraphicEl(h,v),c.group.add(v)}}).update(function(h,p){var d=Qd(c).data.getItemGraphicEl(p),v=f.getItemLayout(h),m=f.getItemVisual(h,"z2");v.allClipped?d&&c.group.remove(d):(d?Ke(d,{z2:Z(m,0),shape:{points:v.points}},i,h):d=new Gi({shape:{points:v.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var p=Qd(c).data.getItemGraphicEl(h);c.group.remove(p)}).execute(),f.eachItemGraphicEl(function(h,p){var d=f.getItemModel(p),v=f.getItemVisual(p,"style");h.useStyle(f.getItemVisual(p,"style")),jr(h,fr(d),{labelFetcher:i,labelDataIndex:p,defaultText:f.getName(p)||"",inheritColor:H(v.fill)?Rf(v.fill,1):K.color.neutral99}),eo(h,d),vi(h,null,null,d.get(["emphasis","disabled"])),_e(h).dataModel=i}),Qd(c).data=f,c.group.silent=i.get("silent")||e.get("silent")},t.type="markArea",t})($d);function PH(r,t,e){var i,n,a=["x0","y0","x1","y1"];if(r){var o=U(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})});n=U(a,function(u,c){return{name:u,type:o[c%2].type}}),i=new _i(n,e)}else n=[{name:"value",type:"float"}],i=new _i(n,e);var s=U(e.get("data"),Ae(OH,t,r,e));r&&(s=Be(s,Ae(IH,r)));var l=r?function(u,c,f,h){var p=u.coord[Math.floor(h/2)][h%2];return ti(p,n[h])}:function(u,c,f,h){return ti(u.value,n[h])};return i.initData(s,null,l),i.hasItemOption=!0,i}var LO=LH;function q_(r){r.registerComponentModel(EO),r.registerComponentView(LO),r.registerPreprocessor(function(t){Fc(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var NH=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},kH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),F(i)&&w(i,function(a,o){H(a)&&(a={type:a}),i[o]=me(a,NH(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<e.length;n++){var a=e[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var i=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(h)),h.length?i=i.concat(h):c=!0}else c=!0;c&&vs(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,o=Y(),s=U(a,function(l){return(H(l)||ge(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Re(l,this,this.ecModel))},this);this._data=Be(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;w(a,function(o){i[o.get("name")]=!1})}i[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var i=this.option.selected;i.hasOwnProperty(e)||(i[e]=!0),this[i[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,i=this.option.selected;w(e,function(n){i[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,i=this.option.selected;w(e,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},t.prototype.isSelected=function(e){var i=this.option.selected;return!(i.hasOwnProperty(e)&&!i[e])&&ce(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{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",bottom:K.size.m,align:"auto",backgroundColor:K.color.transparent,borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:K.color.disabled,inactiveBorderColor:K.color.disabled,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:K.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:K.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:K.color.tertiary,borderWidth:1,borderColor:K.color.border},emphasis:{selectorLabel:{show:!0,color:K.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(Le),zc=kH;var bl=Ae,$_=w,tv=Ee,RH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new tv),this.group.add(this._selectorGroup=new tv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var c=Gs(e,n).refContainer,f=e.getBoxLayoutParams(),h=e.get("padding"),p=Jr(f,c,h),d=this.layoutInner(e,o,p,a,l,u),v=Jr(he({width:d.width,height:d.height},f),c,h);this.group.x=v.x-d.x,this.group.y=v.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=sO(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),c=Y(),f=i.get("selectedMode"),h=i.get("triggerEvent"),p=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&p.push(d.id)}),$_(i.getData(),function(d,v){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
|
|
19
|
-
`)){var y=new tv;y.newline=!0,u.add(y);return}var _=n.getSeriesByName(g)[0];if(!c.get(g))if(_){var x=_.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),T=x.getVisual("style"),A=this._createItem(_,g,v,d,i,e,b,T,S,f,a);A.on("click",bl(PO,g,null,a,p)).on("mouseover",bl(
|
|
20
|
-
`||n==="")){var a=r.isSelected(n);We(e,n)?e[n]=e[n]&&a:e[n]=a}}),e}function kO(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(Vc,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(Vc,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(Vc,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(Vc,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(Vc,"unSelect"))}var RO=_s(zH);function zH(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0})}function iv(r){r.registerComponentModel(zc),r.registerComponentView(rv),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,RO),r.registerSubTypeDefaulter("legend",function(){return"plain"}),kO(r)}var VH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,n){var a=Qr(e);r.prototype.init.call(this,e,i,n),FO(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),FO(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ra(zc.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:K.color.accent50,pageIconInactiveColor:K.color.accent10,pageIconSize:15,pageTextStyle:{color:K.color.tertiary},animationDurationUpdate:800}),t})(zc);function FO(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,Nr(t,e,{type:"box",ignoreSize:!!n})}var BO=VH;var zO=Ee,Q_=["width","height"],ex=["x","y"],UH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new zO),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zO)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,i,n,a,o,s,l);var c=this._controllerGroup,f=i.get("pageIconSize",!0),h=F(f)?f:[f,f];d("pagePrev",0);var p=i.getModel("pageTextStyle");c.add(new He({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(v,m){var g=v+"DataIndex",y=po(i.get("pageIcons",!0)[i.getOrient().name][m],{onclick:ee(u._pageGo,u,g,i,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,c=Q_[u],f=ex[u],h=Q_[1-u],p=ex[1-u];o&&xo("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),v=l.getBoundingRect(),m=[-v.x,-v.y],g=ne(n);o&&(g[c]=n[c]-v[c]-d);var y=this._layoutContentAndController(e,a,g,u,c,h,p,f);if(o){if(s==="end")m[u]+=y[c]+d;else{var _=v[c]+d;m[u]-=_,y[f]-=_}y[c]+=v[c]+d,m[1-u]+=y[p]+y[h]/2-v[h]/2,y[h]=Math.max(y[h],v[h]),y[p]=Math.min(y[p],v[p]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,i,n,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;xo(e.get("orient"),c,e.get("itemGap"),a?n.width:null,a?null:n.height),xo("horizontal",h,e.get("pageButtonItemGap",!0));var p=c.getBoundingRect(),d=h.getBoundingRect(),v=this._showController=p[o]>n[o],m=[-p.x,-p.y];i||(m[a]=c[u]);var g=[0,0],y=[-d.x,-d.y],_=Z(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(v){var x=e.get("pageButtonPosition",!0);x==="end"?y[a]+=n[o]-d[o]:g[a]+=d[o]+_}y[1-a]+=p[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),h.setPosition(y);var b={x:0,y:0};if(b[o]=v?n[o]:p[o],b[s]=Math.max(p[s],d[s]),b[l]=Math.min(0,d[l]+y[1-a]),f.__rectSize=n[o],v){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-_,0),S[s]=b[s],f.setClipPath(new Oe({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(A){A.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(e);return T.pageIndex!=null&&Ke(c,{x:T.contentPosition[0],y:T.contentPosition[1]},v?e:null),this._updatePageInfoView(e,T),b},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=i[f]!=null,p=n.childOfName(c);p&&(p.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",H(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Q_[o],l=ex[o],u=this._findTargetItemIndex(i),c=n.children(),f=c[u],h=c.length,p=h?1:0,d={contentPosition:[n.x,n.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var v=x(f);d.contentPosition[o]=-v.s;for(var m=u+1,g=v,y=v,_=null;m<=h;++m)_=x(c[m]),(!_&&y.e>g.s+a||_&&!b(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=_;for(var m=u-1,g=v,y=v,_=null;m>=-1;--m)_=x(c[m]),(!_||!b(y,_.s))&&g.i<y.i&&(y=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function x(S){if(S){var T=S.getBoundingRect(),A=T[l]+S[l];return{s:A,e:A+T[s],i:S.__legendDataIndex}}}function b(S,T){return S.e>=T&&S.s<=T+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t})(rv),VO=UH;function tx(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function UO(r){Pt(iv),r.registerComponentModel(BO),r.registerComponentView(VO),tx(r)}function rx(r){Pt(iv),Pt(UO)}var HH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ra(yl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(yl),HO=HH;var ix=re();function GO(r,t,e){ix(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function YO(r,t){for(var e=ix(r).coordSysRecordMap,i=e.keys(),n=0;n<i.length;n++){var a=i[n],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||WO(e,o))}}}function WO(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function GH(r,t){var e={model:t,containsPoint:Ae(WH,t),dispatchAction:Ae(YH,r),dataZoomInfoMap:null,controller:null},i=e.controller=new bM(r.getZr());return w(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function YH(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function WH(r,t,e,i){return r.coordinateSystem.containPoint([e,i])}function ZH(r,t,e){var i,n="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,l;return r.each(function(u){var c=u.model,f=c.get("disabled",!0)?!1:c.get("zoomLock",!0)?"move":!0;a[n+f]>a[n+i]&&(i=f),o=o&&c.get("preventDefaultMouseMove",!0),s=Z(c.get("cursorGrab",!0),s),l=Z(c.get("cursorGrabbing",!0),l)}),{controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:l}}}function ZO(r){r.registerUpdateLifecycle("coordsys:aftercreate",function(t,e){var i=ix(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=Y());n.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=Hd(a);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,GH(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Y());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){WO(n,a);return}var c=ZH(l,a,e);o.enable(c.controlType,c.opt),sa(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var KH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),GO(n,e,{pan:ee(nx.pan,this),zoom:ee(nx.zoom,this),scrollMove:ee(nx.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){YO(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(Yd),nx={zoom:function(r,t,e,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=ax[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(En(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:XO(function(r,t,e,i,n,a){var o=ax[i]([a.oldX,a.oldY],[a.newX,a.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:XO(function(r,t,e,i,n,a){var o=ax[i]([0,0],[a.scrollDelta,a.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function XO(r){return function(t,e,i,n){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,i,n);if(En(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var ax={grid:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,i,n){var a=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},KO=KH;function qO(r){kc(r),r.registerComponentModel(HO),r.registerComponentView(KO),ZO(r)}var qH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ra(yl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:K.color.accent10,borderRadius:0,backgroundColor:K.color.transparent,dataBackground:{lineStyle:{color:K.color.accent30,width:.5},areaStyle:{color:K.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:K.color.accent40,width:.5},areaStyle:{color:K.color.accent20,opacity:.3}},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:K.color.neutral00,borderColor:K.color.accent20},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:K.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:K.color.tertiary},brushSelect:!0,brushStyle:{color:K.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:K.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(yl),$O=qH;var Uc=Oe,$H=1,ox=30,jH=7,Hc="horizontal",jO="vertical",JH=5,QH=["line","bar","candlestick","scatter"],eG={easing:"cubicOut",duration:100,delay:0},tG=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=ee(this._onBrush,this),this._onBrushEnd=ee(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),sa(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Eo(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 i=this._displayables.sliderGroup=new Ee;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?jH:0,o=Gs(e,i).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Hc?{right:o.width-s.x-s.width,top:o.height-ox-l-a,width:s.width,height:ox}:{right:l,top:s.y,width:ox,height:s.height},c=Qr(e.option);w(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=Jr(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===jO&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Hc&&!o?{scaleY:l?1:-1,scaleX:1}:n===Hc&&o?{scaleY:l?1:-1,scaleX:-1}:n===jO&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]),c=isNaN(u.x)?0:u.x,f=isNaN(u.y)?0:u.y;e.x=i.x-c,e.y=i.y-f,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new Uc({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Uc({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:ee(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var f=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),p=(h[1]-h[0])*.3;h=[h[0]-p,h[1]+p];var d=[0,i[1]],v=[0,i[0]],m=[[i[0],0],[0,0]],g=[],y=v[1]/Math.max(1,o.count()-1),_=i[0]/(f[1]-f[0]),x=e.thisAxis.type==="time",b=-y,S=Math.round(o.count()/i[0]),T;o.each([e.thisDim,l],function(L,I,k){if(S>0&&k%S){x||(b+=y);return}b=x?(+L-f[0])*_:b+y;var z=I==null||isNaN(I)||I==="",V=z?0:$e(I,h,d,!0);z&&!T&&k?(m.push([m[m.length-1][0],0]),g.push([g[g.length-1][0],0])):!z&&T&&(m.push([b,0]),g.push([b,0])),z||(m.push([b,V]),g.push([b,V])),T=z}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var A=this.dataZoomModel;function E(L){var I=A.getModel(L?"selectedDataBackground":"dataBackground"),k=new Ee,z=new Gi({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new io({shape:{points:c},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return k.add(z),k.add(V),k}for(var M=0;M<3;M++){var O=E(M===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(i!==!0&&ce(QH,u.get("type"))<0)){var c=a.getComponent(ni(o),s).axis,f=rG(o),h,p=u.coordinateSystem;f!=null&&p.getOtherAxis&&(h=p.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);n={thisAxis:c,series:u,thisDim:d,otherDim:f,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=i.filler=new Uc({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Uc({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:$H,fill:K.color.transparent}})),w([0,1],function(_){var x=l.get("handleIcon");!ic[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=It(x,-1,0,2,2,null,!0);b.attr({cursor:iG(this._orient),draggable:!0,drift:ee(this._onDragMove,this,_),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:ee(this._onOverDataInfoTriggerArea,this,!1),z2:5});var S=b.getBoundingRect(),T=l.get("handleSize");this._handleHeight=Ve(T,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ea(b);var A=l.get("handleColor");A!=null&&(b.style.fill=A),o.add(n[_]=b);var E=l.getModel("textStyle"),M=l.get("handleLabel")||{},O=M.show||!1;e.add(a[_]=new He({silent:!0,invisible:!O,style:Lr(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var p=h;if(f){var d=Ve(l.get("moveHandleSize"),s[1]),v=i.moveHandle=new Oe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),m=d*.8,g=i.moveHandleIcon=It(l.get("moveHandleIcon"),-m/2,-m/2,m,m,K.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));p=i.moveZone=new Oe({invisible:!0,shape:{y:s[1]-y,height:d+y}}),p.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(g),o.add(p)}p.attr({draggable:!0,cursor:"grab",drift:ee(this._onActualMoveZoneDrift,this),ondragstart:ee(this._onActualMoveZoneDragStart,this),ondragend:ee(this._onActualMoveZoneDragEnd,this),onmouseover:ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:ee(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[$e(e[0],[0,100],i,!0),$e(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];En(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?$e(s.minSpan,l,o,!0):null,s.maxSpan!=null?$e(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ct([$e(a[0],o,l,!0),$e(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=Ct(n.slice()),o=this._size;w([0,1],function(p){var d=i.handles[p],v=this._handleHeight;d.attr({scaleX:v/2,scaleY:v/2,x:n[p]+(p?-1:1),y:o[1]/2-v/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Oe,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,s=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy(),u=l.getAxisModel().axis.scale;if(l){var c=this._range,f;if(e){var h={start:c[0],end:c[1]},p=Gd(i,l);if(p){var d=p.calculateDataWindow(h).percentInverted;h={start:d[0],end:d[1]}}f=l.calculateDataWindow(h)}else f=l.getWindow();s=[JO(i,0,f,u),JO(i,1,f,u)]}}var v=Ct(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(g){var y=Gu(n.handles[g].parent,this.group),_=Jg(g===0?"right":"left",y),x=this._handleWidth/2+JH,b=ho([v[g]+(g===0?-x:x),this._size[1]/2],y);a[g].setStyle({x:b[0],y:b[1],verticalAlign:o===Hc?"middle":_,align:o===Hc?_:"center",text:s[g]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var i=this.dataZoomModel.get("handleLabel")||{},n=i.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,i,n){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",e,i,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(e,i,n,a){this._dragging=!0,Ei(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ho([i,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new ke(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();En(0,l,o,0,u.minSpan!=null?$e(u.minSpan,s,o,!0):null,u.maxSpan!=null?$e(u.maxSpan,s,o,!0):null),this._range=Ct([$e(l[0],o,s,!0),$e(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ei(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Uc({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?eG:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=Hd(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(Yd);function JO(r,t,e,i){var n=r.get("labelFormatter"),a=r.get("labelPrecision");(a==null||a==="auto")&&(a=e.valuePrecision);var o=e.value[t],s=o==null||isNaN(o)?"":lt(i)||Ki(i)?i.getLabel({value:Math.round(o)}):isFinite(a)?we(o,a,!0):o+"";return j(n)?n(o,s):H(n)?n.replace("{value}",s):s}function rG(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function iG(r){return r==="vertical"?"ns-resize":"ew-resize"}var QO=tG;function eI(r){r.registerComponentModel($O),r.registerComponentView(QO),kc(r)}function sx(r){Pt(qO),Pt(eI)}function tI(r,t,e){var i=je.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}function nv(r){return!r.__cursors.get(Ug)}function rI(r){var t=r.__cursors.get(Ug);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var nG=(function(r){N(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.zlevel=0,a.zlevel2=Ds,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__prevIdx={startIdx:0,endIdx:0};var o;n=n||Ba,typeof e=="string"?o=tI(e,i,n):W(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(Kl(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.afterBrush=function(){this.__prevIdx=rI(this)},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=tI("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ue(0,0,0,0);function c(x){if(!(!x.isFinite()||x.isZero()))if(o.length===0){var b=new ue(0,0,0,0);b.copy(x),o.push(b)}else{for(var S=!1,T=1/0,A=0,E=0;E<o.length;++E){var M=o[E];if(M.intersect(x)){var O=new ue(0,0,0,0);O.copy(M),O.union(x),o[E]=O,S=!0;break}else if(l){u.copy(x),u.union(M);var L=x.width*x.height,I=M.width*M.height,k=u.width*u.height,z=k-L-I;z<T&&(T=z,A=E)}}if(l&&(o[A].union(x),S=!0),!S){var b=new ue(0,0,0,0);b.copy(x),o.push(b)}l||(l=o.length>=s)}}for(var f=rI(this),h=f.startIdx;h<f.endIdx;++h){var p=e[h];if(p){var d=p.shouldBePainted(n,a,!0,!0),v=p.__isRendered&&(p.__dirty&pt||!d)?p.getPrevPaintRect():null;v&&c(v);var m=d&&(p.__dirty&pt||!p.__isRendered)?p.getPaintRect():null;m&&c(m)}}for(var g=this.__prevIdx,h=g.startIdx;h<g.endIdx;++h){var p=i[h],d=p&&p.shouldBePainted(n,a,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered){var v=p.getPrevPaintRect();v&&c(v)}}var y;do{y=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var _=h+1;_<o.length;)o[h].intersect(o[_])?(y=!0,o[h].union(o[_]),o.splice(_,1)):_++;h++}}while(y);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,i){var n=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=i+"px"),a.width=e*n,a.height=i*n,s&&(s.width=e*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,i,n){var a=this.dom,o=this.ctx,s=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!e,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/f,l/f));var p=this.domBack;function d(v,m,g,y){if(o.clearRect(v,m,g,y),i&&i!=="transparent"){var _=void 0;if(Qi(i)){var x=i.global||i.__width===g&&i.__height===y;_=x&&i.__canvasGradient||ac(o,i,{x:0,y:0,width:g,height:y}),i.__canvasGradient=_,i.__width=g,i.__height=y}else Wv(i)&&(i.scaleX=i.scaleX||f,i.scaleY=i.scaleY||f,_=Pp(o,i,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=_||i,o.fillRect(v,m,g,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(p,v,m,g,y),o.restore())}!n||u?d(0,0,s,l):n.length&&w(n,function(v){d(v.x*f,v.y*f,v.width*f,v.height*f)})},t})(St),lx=nG;var iI=1e5,Go=314159,ux=void 0,aG=1,cx=2;function oG(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function sG(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}function nI(r,t,e,i){var n=new lx(r,t,t.dpr);return n.zlevel=e,n.zlevel2=i,n.__builtin__=!0,aI(n),n}function aI(r){r.__cursorStack=[],r.__cursors=Y()}function lG(r){return r.startIdx=r.drawIdx=r.endIdx=r.endIdxNew=0,r.used=!1,r.first=r.last=NaN,r.notClearIdx=-1,r}function uG(r,t){var e=r.__cursors,i=+t;return e.get(i)||(r.__cursorStack.push(i),e.set(i,lG({key:i})))}function av(r,t){for(var e=r.__cursorStack,i=0;i<e.length;i++)t(r.__cursors.get(e[i]))}function fx(r,t){var e=r.layers;return e[t]||(e[t]=new Array(3))}function Yt(r,t,e){for(var i=r.layerStack,n=0;n<i.length;n++){var a=i[n].zl,o=i[n].zl2,s=r.layers[a][o];(!e||(!(e&Gc)||s.__builtin__)&&(!(e&hx)||!s.__builtin__)&&(!(e&oI)||s!==r.hoverlayer))&&t(s,a,o,n)}}var Gc=1,hx=2,oI=4,ov=Gc|oI,cG=(function(){function r(t,e,i,n){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=B({},i||{}),this.dpr=i.devicePixelRatio||Ba,this._singleCanvas=a,this.root=t;var o=t.style;if(o&&(Kl(t),t.innerHTML=""),this.storage=e,this._prevDisplayList=[],a){var l=t,u=l.width,c=l.height;i.width!=null&&(u=i.width),i.height!=null&&(c=i.height),this.dpr=i.devicePixelRatio||1,l.width=u*this.dpr,l.height=c*this.dpr,this._width=u,this._height=c;var f=nI(l,this,Go,Ds);f.initContext(),this._insertLayer(f,Go,Ds,!0),this._domRoot=t}else{this._width=oc(t,0,i),this._height=oc(t,1,i);var s=this._domRoot=sG(this._width,this._height);t.appendChild(s)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e;t&&!W(t)?e={paintAll:!!t}:e=t||{};var i=Z(e.refresh,!0),n=Z(e.refreshHover,!1);if(n&&(this._hoverLayerDirty=cx),!i)return n&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var a=this.storage.getDisplayList(!0);this._updateLayerStatus(a,e.paintAll),this._redrawId=Math.random();var o=this._prevDisplayList;this._paintList(a,o,this._redrawId);var s=this._backgroundColor;return Yt(this._i,function(l,u,c,f){l.refresh&&l.refresh(f===0?s:null)},hx),this._opts.useDirtyRect&&(this._prevDisplayList=a.slice()),this},r.prototype._paintHoverList=function(t){var e=this._i.hoverlayer,i=this._hoverLayerDirty;if(this._hoverLayerDirty=ux,i!==ux&&(!e&&i===cx&&(e=this._i.hoverlayer=this._ensureLayer(iI)),!!e)){e.clear();for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a,o=0,s=t.length;o<s;o++){var l=t[o];if(l.__inHover){a||(a=e.ctx,a.save());var u=l.__hoverStyle,c=void 0;u&&(c=l.style,l.style=u),la(a,l,n),u&&(l.style=c)}}a&&(Po(a,n),a.restore())}},r.prototype.getHoverLayer=function(){return this._ensureLayer(iI)},r.prototype.paintOne=function(t,e){js(t,e)},r.prototype._paintList=function(t,e,i){if(this._redrawId===i){var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),n)Yt(this._i,function(o){o.afterBrush&&o.afterBrush()},ov),this._paintHoverList(t);else{var a=this;nu(function(){a._paintList(t,e,i)})}}},r.prototype._compositeManually=function(){var t=this._ensureLayer(Go).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),Yt(this._i,function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)},Gc)},r.prototype._doPaintList=function(t,e){var i=this,n=!0;return Yt(this._i,function(a){var o=!1;if(av(a,function(f){(f.drawIdx<f.endIdx||f.notClearIdx>=0)&&(o=!0)}),!(!o&&!a.__dirty)){var s=i._opts.useDirtyRect&&!nv(a)?a.createRepaintRects(t,e,i._width,i._height):null,l=i._i.layerStack[0],u=!0;if(a.__dirty){u=!1,a.__dirty=!1;var c=a.zlevel===l.zl&&a.zlevel2===l.zl2?i._backgroundColor:null;a.clear(!1,c,s)}av(a,function(f){var h=i._paintPerCursor(a,f,t,s,u);n=n&&h})}},ov),fe.wxa&&Yt(this._i,function(a){a&&a.ctx&&a.ctx.draw&&a.ctx.draw()}),n},r.prototype._paintPerCursor=function(t,e,i,n,a){var o=t.ctx;if(n)if(!n.length)e.drawIdx=e.endIdx;else for(var s=this.dpr,l=0;l<n.length;++l){var u=n[l];o.save(),o.beginPath(),o.rect(u.x*s,u.y*s,u.width*s,u.height*s),o.clip(),this._paintPerCursorInRect(t,e,i,u,a),o.restore()}else o.save(),this._paintPerCursorInRect(t,e,i,null,a),o.restore();return e.drawIdx>=e.endIdx},r.prototype._paintPerCursorInRect=function(t,e,i,n,a){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:a}},s=t.ctx,l=nv(t),u=l&&je.getTime(),c=e.drawIdx,f=e.notClearIdx,h=f>=0?Math.min(f,c):c;h<e.endIdx;h++){var p=i[h];if(!(h<c&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=cx),n!=null){var d=p.getPaintRect();d&&d.intersect(n)&&(la(s,p,o),p.setPrevPaintRect(d))}else la(s,p,o);if(l){var v=je.getTime()-u;if(v>15){h++;break}}}}Po(s,o),e.drawIdx=Math.max(h,c)},r.prototype.getLayer=function(t,e){return this._ensureLayer(t,0,e)},r.prototype._ensureLayer=function(t,e,i){e=e||0;var n=this._singleCanvas;n&&!this._needsManuallyCompositing&&(t=Go,e=0);var a=fx(this._i,t)[e];return a||(a=nI("zr_"+t+"."+e,this,t,e),this._layerConfig[t]&&me(a,this._layerConfig[t],!0),(i||n&&t!==Go)&&(a.virtual=!0),this._insertLayer(a,t,e,!1),a.initContext()),a},r.prototype.insertLayer=function(t,e){this._insertLayer(e,t,0,!1)},r.prototype._insertLayer=function(t,e,i,n){var a=this._i,o=a.layers,s=a.layerStack,l=this._domRoot,u=null;if(!(o[e]&&o[e][i])&&oG(t)){for(var c=s.length,f=0;f<c&&(s[f].zl<e||s[f].zl===e&&s[f].zl2<i);)f++;if(f>0&&(u=fx(a,s[f-1].zl)[s[f-1].zl2]),s.splice(f,0,{zl:e,zl2:i}),fx(a,e)[i]=t,!n&&!t.virtual)if(u){var h=u.dom;h.nextSibling?l.insertBefore(t.dom,h.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)})},r.prototype.eachBuiltinLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)},Gc)},r.prototype.eachOtherLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)},hx)},r.prototype.getLayers=function(){var t={};return Yt(this._i,function(e,i,n){t[e.id]=e}),t},r.prototype._updateLayerStatus=function(t,e){var i=this;if(i._singleCanvas)for(var n=1;n<t.length;n++){var a=t[n];if(a.zlevel!==t[n-1].zlevel||a.incremental){i._needsManuallyCompositing=!0;break}}Yt(i._i,function(m){m.__dirty=!1,av(m,function(g){g.used=!1,g.endIdxNew=0,g.notClearIdx=-1})},ov);for(var o,s=null,l=null,u=!1,c=0,f=t.length;c<f;c++){var a=t[c],h=a.zlevel,p=a.incremental,d=void 0;if(o!==h&&(o=h,u=!1),p?(u=!0,d=DT):d=u?AT:Ds,(!s||h!==s.zlevel||d!==s.zlevel2)&&(s=i._ensureLayer(h,d),l=null,!s.__builtin__)){Sa("ZLevel "+h+" has been used by unknown layer "+s.id);continue}if((!l||p!==l.key)&&(l=uG(s,p),!l.used))if(l.used=!0,!e&&l.first===a.id){var v=c-l.startIdx;l.startIdx=c,l.drawIdx+=v,l.endIdx+=v}else s.__dirty=!0,l.first=a.id,l.startIdx=l.drawIdx=c,l.endIdx=c+1;l.endIdxNew=c+1,a.__dirty&pt&&!a.__inHover&&((!p||!a.notClear&&c<l.drawIdx)&&(s.__dirty=!0),p&&a.notClear&&l.notClearIdx<0&&(l.notClearIdx=c))}Yt(i._i,function(m){for(var g=m.__cursorStack,y=m.__cursors,_=g.length-1;_>=0;_--){var x=y.get(g[_]);if(!x.used)m.__dirty=!0,y.removeKey(g[_]),g.splice(_,1);else{var b=x.endIdxNew;(nv(m)?b<x.drawIdx:b!==x.endIdx||!b||t[b-1].id!==x.last)&&(m.__dirty=!0),x.endIdx=x.endIdxNew,x.last=b?t[b-1].id:NaN}}m.__dirty&&(av(m,function(S){S.drawIdx=S.startIdx}),i._hoverLayerDirty===ux&&(i._hoverLayerDirty=aG))},ov)},r.prototype.clear=function(){return Yt(this._i,function(t){t.clear(),aI(t)},Gc),this},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,Yt(this._i,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?me(i[t],e,!0):i[t]=e,Yt(this._i,function(n,a){me(n,i[a],!0)})}},r.prototype.delLayer=function(t){for(var e=this._i.layerStack,i=this._i.layers,n=e.length-1;n>=0;n--){var a=e[n];if(a.zl===t){var o=i[t][a.zl2];if(o.__builtin__)continue;if(e.splice(n,1),i[t][a.zl2]=void 0,!o.virtual){var s=o.dom.parentNode;s&&s.removeChild(o.dom)}}}},r.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;t!=null&&(n.width=t),e!=null&&(n.height=e),t=oc(a,0,n),e=oc(a,1,n),i.style.display="",(this._width!==t||e!==this._height)&&(i.style.width=t+"px",i.style.height=e+"px",Yt(this._i,function(o){o.resize(t,e)}),this.refresh({paintAll:!0})),this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this._ensureLayer(Go).resize(t,e)}return this},r.prototype.clearLayer=function(t){w(this._i.layers[t],function(e){e&&!e.__builtin__&&e.clear()})},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Go][0].dom;var e=new lx("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,a=e.dom.height;Yt(this._i,function(f){f.__builtin__?i.drawImage(f.dom,0,0,n,a):f.renderToCanvas&&(i.save(),f.renderToCanvas(i),i.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];la(i,c,o)}Po(i,o)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})(),sI=cG;function px(r){r.registerPainter("canvas",sI)}var dx=class{constructor(t,e,i){this.eventTarget=t,this.eventName=e,this.eventOptions=i,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){let e=fG(t);for(let i of this.bindings){if(e.immediatePropagationStopped)break;i.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((t,e)=>{let i=t.index,n=e.index;return i<n?-1:i>n?1:0})}};function fG(r){if("immediatePropagationStopped"in r)return r;{let{stopImmediatePropagation:t}=r;return Object.assign(r,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}var vx=class{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(t=>t.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(t=>t.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((t,e)=>t.concat(Array.from(e.values())),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,i={}){this.application.handleError(t,`Error ${e}`,i)}clearEventListenersForBinding(t){let e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){let{eventTarget:e,eventName:i,eventOptions:n}=t,a=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(i,n);a.delete(o),a.size==0&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){let{eventTarget:e,eventName:i,eventOptions:n}=t;return this.fetchEventListener(e,i,n)}fetchEventListener(t,e,i){let n=this.fetchEventListenerMapForEventTarget(t),a=this.cacheKey(e,i),o=n.get(a);return o||(o=this.createEventListener(t,e,i),n.set(a,o)),o}createEventListener(t,e,i){let n=new dx(t,e,i);return this.started&&n.connect(),n}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){let i=[t];return Object.keys(e).sort().forEach(n=>{i.push(`${e[n]?"":"!"}${n}`)}),i.join(":")}},hG={stop({event:r,value:t}){return t&&r.stopPropagation(),!0},prevent({event:r,value:t}){return t&&r.preventDefault(),!0},self({event:r,value:t,element:e}){return t?e===r.target:!0}},pG=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function dG(r){let e=r.trim().match(pG)||[],i=e[2],n=e[3];return n&&!["keydown","keyup","keypress"].includes(i)&&(i+=`.${n}`,n=""),{eventTarget:vG(e[4]),eventName:i,eventOptions:e[7]?mG(e[7]):{},identifier:e[5],methodName:e[6],keyFilter:e[1]||n}}function vG(r){if(r=="window")return window;if(r=="document")return document}function mG(r){return r.split(":").reduce((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)}),{})}function gG(r){if(r==window)return"window";if(r==document)return"document"}function Bx(r){return r.replace(/(?:[_-])([a-z0-9])/g,(t,e)=>e.toUpperCase())}function mx(r){return Bx(r.replace(/--/g,"-").replace(/__/g,"_"))}function Wc(r){return r.charAt(0).toUpperCase()+r.slice(1)}function gI(r){return r.replace(/([A-Z])/g,(t,e)=>`-${e.toLowerCase()}`)}function yG(r){return r.match(/[^\s]+/g)||[]}function lI(r){return r!=null}function gx(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var uI=["meta","ctrl","alt","shift"],yx=class{constructor(t,e,i,n){this.element=t,this.index=e,this.eventTarget=i.eventTarget||t,this.eventName=i.eventName||_G(t)||sv("missing event name"),this.eventOptions=i.eventOptions||{},this.identifier=i.identifier||sv("missing identifier"),this.methodName=i.methodName||sv("missing method name"),this.keyFilter=i.keyFilter||"",this.schema=n}static forToken(t,e){return new this(t.element,t.index,dG(t.content),e)}toString(){let t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(t){if(!this.keyFilter)return!1;let e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;let i=e.filter(n=>!uI.includes(n))[0];return i?(gx(this.keyMappings,i)||sv(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[i].toLowerCase()!==t.key.toLowerCase()):!1}shouldIgnoreMouseEvent(t){if(!this.keyFilter)return!1;let e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}get params(){let t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(let{name:i,value:n}of Array.from(this.element.attributes)){let a=i.match(e),o=a&&a[1];o&&(t[Bx(o)]=xG(n))}return t}get eventTargetName(){return gG(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(t,e){let[i,n,a,o]=uI.map(s=>e.includes(s));return t.metaKey!==i||t.ctrlKey!==n||t.altKey!==a||t.shiftKey!==o}},cI={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:r=>r.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function _G(r){let t=r.tagName.toLowerCase();if(t in cI)return cI[t](r)}function sv(r){throw new Error(r)}function xG(r){try{return JSON.parse(r)}catch{return r}}var _x=class{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){let e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){let t=this.controller[this.methodName];if(typeof t=="function")return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){let{element:e}=this.action,{actionDescriptorFilters:i}=this.context.application,{controller:n}=this.context,a=!0;for(let[o,s]of Object.entries(this.eventOptions))if(o in i){let l=i[o];a=a&&l({name:o,value:s,event:t,element:e,controller:n})}else continue;return a}prepareActionEvent(t){return Object.assign(t,{params:this.action.params})}invokeWithEvent(t){let{target:e,currentTarget:i}=t;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:i,action:this.methodName})}catch(n){let{identifier:a,controller:o,element:s,index:l}=this,u={identifier:a,controller:o,element:s,index:l,event:t};this.context.handleError(n,`invoking action "${this.action}"`,u)}}willBeInvokedByEvent(t){let e=t.target;return t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t)||t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t)?!1:this.element===e?!0:e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}},lv=class{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver(i=>this.processMutations(i))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){let t=new Set(this.matchElementsInTree());for(let e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(let e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(let e of t)this.processMutation(e)}processMutation(t){t.type=="attributes"?this.processAttributeChange(t.target,t.attributeName):t.type=="childList"&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}processRemovedNodes(t){for(let e of Array.from(t)){let i=this.elementFromNode(e);i&&this.processTree(i,this.removeElement)}}processAddedNodes(t){for(let e of Array.from(t)){let i=this.elementFromNode(e);i&&this.elementIsActive(i)&&this.processTree(i,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(let i of this.matchElementsInTree(t))e.call(this,i)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected!=this.element.isConnected?!1:this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}},uv=class{constructor(t,e,i){this.attributeName=e,this.delegate=i,this.elementObserver=new lv(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){let e=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(this.selector));return e.concat(i)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}};function bG(r,t,e){yI(r,t).add(e)}function SG(r,t,e){yI(r,t).delete(e),wG(r,t)}function yI(r,t){let e=r.get(t);return e||(e=new Set,r.set(t,e)),e}function wG(r,t){let e=r.get(t);e!=null&&e.size==0&&r.delete(t)}var On=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,i)=>e.concat(Array.from(i)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,i)=>e+i.size,0)}add(t,e){bG(this.valuesByKey,t,e)}delete(t,e){SG(this.valuesByKey,t,e)}has(t,e){let i=this.valuesByKey.get(t);return i!=null&&i.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some(i=>i.has(t))}getValuesForKey(t){let e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter(([e,i])=>i.has(t)).map(([e,i])=>e)}};var xx=class{constructor(t,e,i,n){this._selector=e,this.details=n,this.elementObserver=new lv(t,this),this.delegate=i,this.matchesByElement=new On}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(t){this._selector=t,this.refresh()}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){let{selector:e}=this;if(e){let i=t.matches(e);return this.delegate.selectorMatchElement?i&&this.delegate.selectorMatchElement(t,this.details):i}else return!1}matchElementsInTree(t){let{selector:e}=this;if(e){let i=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(e)).filter(a=>this.matchElement(a));return i.concat(n)}else return[]}elementMatched(t){let{selector:e}=this;e&&this.selectorMatched(t,e)}elementUnmatched(t){let e=this.matchesByElement.getKeysForValue(t);for(let i of e)this.selectorUnmatched(t,i)}elementAttributeChanged(t,e){let{selector:i}=this;if(i){let n=this.matchElement(t),a=this.matchesByElement.has(i,t);n&&!a?this.selectorMatched(t,i):!n&&a&&this.selectorUnmatched(t,i)}}selectorMatched(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}selectorUnmatched(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}},bx=class{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(i=>this.processMutations(i))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(let t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(let e of t)this.processMutation(e)}processMutation(t){let e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){let i=this.delegate.getStringMapKeyForAttribute(t);if(i!=null){this.stringMap.has(t)||this.stringMapKeyAdded(i,t);let n=this.element.getAttribute(t);if(this.stringMap.get(t)!=n&&this.stringMapValueChanged(n,i,e),n==null){let a=this.stringMap.get(t);this.stringMap.delete(t),a&&this.stringMapKeyRemoved(i,t,a)}else this.stringMap.set(t,n)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,i){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,i)}stringMapKeyRemoved(t,e,i){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,i)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(t=>t.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},cv=class{constructor(t,e,i){this.attributeObserver=new uv(t,e,this),this.delegate=i,this.tokensByElement=new On}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){let[e,i]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(i)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach(e=>this.tokenMatched(e))}tokensUnmatched(t){t.forEach(e=>this.tokenUnmatched(e))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){let e=this.tokensByElement.getValuesForKey(t),i=this.readTokensForElement(t),n=CG(e,i).findIndex(([a,o])=>!AG(a,o));return n==-1?[[],[]]:[e.slice(n),i.slice(n)]}readTokensForElement(t){let e=this.attributeName,i=t.getAttribute(e)||"";return TG(i,t,e)}};function TG(r,t,e){return r.trim().split(/\s+/).filter(i=>i.length).map((i,n)=>({element:t,attributeName:e,content:i,index:n}))}function CG(r,t){let e=Math.max(r.length,t.length);return Array.from({length:e},(i,n)=>[r[n],t[n]])}function AG(r,t){return r&&t&&r.index==t.index&&r.content==t.content}var fv=class{constructor(t,e,i){this.tokenListObserver=new cv(t,e,this),this.delegate=i,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){let{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).set(t,i),this.delegate.elementMatchedValue(e,i))}tokenUnmatched(t){let{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,i))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(e){return{error:e}}}},Sx=class{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new fv(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){let e=new _x(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){let e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach(t=>this.delegate.bindingDisconnected(t,!0)),this.bindingsByAction.clear()}parseValueForToken(t){let e=yx.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}},Tx=class{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new bx(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){let i=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,i.writer(this.receiver[t]),i.writer(i.defaultValue))}stringMapValueChanged(t,e,i){let n=this.valueDescriptorNameMap[e];t!==null&&(i===null&&(i=n.writer(n.defaultValue)),this.invokeChangedCallback(e,t,i))}stringMapKeyRemoved(t,e,i){let n=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,n.writer(this.receiver[t]),i):this.invokeChangedCallback(t,n.writer(n.defaultValue),i)}invokeChangedCallbacksForDefaultValues(){for(let{key:t,name:e,defaultValue:i,writer:n}of this.valueDescriptors)i!=null&&!this.controller.data.has(t)&&this.invokeChangedCallback(e,n(i),void 0)}invokeChangedCallback(t,e,i){let n=`${t}Changed`,a=this.receiver[n];if(typeof a=="function"){let o=this.valueDescriptorNameMap[t];try{let s=o.reader(e),l=i;i&&(l=o.reader(i)),a.call(this.receiver,s,l)}catch(s){throw s instanceof TypeError&&(s.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${s.message}`),s}}}get valueDescriptors(){let{valueDescriptorMap:t}=this;return Object.keys(t).map(e=>t[e])}get valueDescriptorNameMap(){let t={};return Object.keys(this.valueDescriptorMap).forEach(e=>{let i=this.valueDescriptorMap[e];t[i.name]=i}),t}hasValue(t){let e=this.valueDescriptorNameMap[t],i=`has${Wc(e.name)}`;return this.receiver[i]}},Cx=class{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new On}start(){this.tokenListObserver||(this.tokenListObserver=new cv(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var i;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),(i=this.tokenListObserver)===null||i===void 0||i.pause(()=>this.delegate.targetConnected(t,e)))}disconnectTarget(t,e){var i;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),(i=this.tokenListObserver)===null||i===void 0||i.pause(()=>this.delegate.targetDisconnected(t,e)))}disconnectAllTargets(){for(let t of this.targetsByName.keys)for(let e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function Zc(r,t){let e=_I(r);return Array.from(e.reduce((i,n)=>(EG(n,t).forEach(a=>i.add(a)),i),new Set))}function DG(r,t){return _I(r).reduce((i,n)=>(i.push(...MG(n,t)),i),[])}function _I(r){let t=[];for(;r;)t.push(r),r=Object.getPrototypeOf(r);return t.reverse()}function EG(r,t){let e=r[t];return Array.isArray(e)?e:[]}function MG(r,t){let e=r[t];return e?Object.keys(e).map(i=>[i,e[i]]):[]}var Ax=class{constructor(t,e){this.started=!1,this.context=t,this.delegate=e,this.outletsByName=new On,this.outletElementsByName=new On,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(t=>{this.setupSelectorObserverForOutlet(t),this.setupAttributeObserverForOutlet(t)}),this.started=!0,this.dependentContexts.forEach(t=>t.refresh()))}refresh(){this.selectorObserverMap.forEach(t=>t.refresh()),this.attributeObserverMap.forEach(t=>t.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(t=>t.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(t=>t.stop()),this.attributeObserverMap.clear())}selectorMatched(t,e,{outletName:i}){let n=this.getOutlet(t,i);n&&this.connectOutlet(n,t,i)}selectorUnmatched(t,e,{outletName:i}){let n=this.getOutletFromMap(t,i);n&&this.disconnectOutlet(n,t,i)}selectorMatchElement(t,{outletName:e}){let i=this.selector(e),n=this.hasOutlet(t,e),a=t.matches(`[${this.schema.controllerAttribute}~=${e}]`);return i?n&&a&&t.matches(i):!1}elementMatchedAttribute(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementAttributeValueChanged(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementUnmatchedAttribute(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}connectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)||(this.outletsByName.add(i,t),this.outletElementsByName.add(i,e),(n=this.selectorObserverMap.get(i))===null||n===void 0||n.pause(()=>this.delegate.outletConnected(t,e,i)))}disconnectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)&&(this.outletsByName.delete(i,t),this.outletElementsByName.delete(i,e),(n=this.selectorObserverMap.get(i))===null||n===void 0||n.pause(()=>this.delegate.outletDisconnected(t,e,i)))}disconnectAllOutlets(){for(let t of this.outletElementsByName.keys)for(let e of this.outletElementsByName.getValuesForKey(t))for(let i of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(i,e,t)}updateSelectorObserverForOutlet(t){let e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}setupSelectorObserverForOutlet(t){let e=this.selector(t),i=new xx(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,i),i.start()}setupAttributeObserverForOutlet(t){let e=this.attributeNameForOutletName(t),i=new uv(this.scope.element,e,this);this.attributeObserverMap.set(t,i),i.start()}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}attributeNameForOutletName(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}getOutletNameFromOutletAttributeName(t){return this.outletDefinitions.find(e=>this.attributeNameForOutletName(e)===t)}get outletDependencies(){let t=new On;return this.router.modules.forEach(e=>{let i=e.definition.controllerConstructor;Zc(i,"outlets").forEach(a=>t.add(a,e.identifier))}),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let t=this.dependentControllerIdentifiers;return this.router.contexts.filter(e=>t.includes(e.identifier))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find(i=>i.element===t)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},Dx=class{constructor(t,e){this.logDebugActivity=(i,n={})=>{let{identifier:a,controller:o,element:s}=this;n=Object.assign({identifier:a,controller:o,element:s},n),this.application.logDebugActivity(this.identifier,i,n)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new Sx(this,this.dispatcher),this.valueObserver=new Tx(this,this.controller),this.targetObserver=new Cx(this,this),this.outletObserver=new Ax(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(i){this.handleError(i,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,i={}){let{identifier:n,controller:a,element:o}=this;i=Object.assign({identifier:n,controller:a,element:o},i),this.application.handleError(t,`Error ${e}`,i)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,i){this.invokeControllerMethod(`${mx(i)}OutletConnected`,t,e)}outletDisconnected(t,e,i){this.invokeControllerMethod(`${mx(i)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){let i=this.controller;typeof i[t]=="function"&&i[t](...e)}};function OG(r){return IG(r,LG(r))}function IG(r,t){let e=RG(r),i=PG(r.prototype,t);return Object.defineProperties(e.prototype,i),e}function LG(r){return Zc(r,"blessings").reduce((e,i)=>{let n=i(r);for(let a in n){let o=e[a]||{};e[a]=Object.assign(o,n[a])}return e},{})}function PG(r,t){return kG(t).reduce((e,i)=>{let n=NG(r,t,i);return n&&Object.assign(e,{[i]:n}),e},{})}function NG(r,t,e){let i=Object.getOwnPropertyDescriptor(r,e);if(!(i&&"value"in i)){let a=Object.getOwnPropertyDescriptor(t,e).value;return i&&(a.get=i.get||a.get,a.set=i.set||a.set),a}}var kG=typeof Object.getOwnPropertySymbols=="function"?r=>[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)]:Object.getOwnPropertyNames,RG=(()=>{function r(e){function i(){return Reflect.construct(e,arguments,new.target)}return i.prototype=Object.create(e.prototype,{constructor:{value:i}}),Reflect.setPrototypeOf(i,e),i}function t(){let i=r(function(){this.a.call(this)});return i.prototype.a=function(){},new i}try{return t(),r}catch{return i=>class extends i{}}})();function FG(r){return{identifier:r.identifier,controllerConstructor:OG(r.controllerConstructor)}}var Ex=class{constructor(t,e){this.application=t,this.definition=FG(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){let e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){let e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new Dx(this,t),this.contextsByScope.set(t,e)),e}},Mx=class{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){let e=this.data.get(this.getDataKey(t))||"";return yG(e)}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}},Ox=class{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){let e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){let i=this.getAttributeNameForKey(t);return this.element.setAttribute(i,e),this.get(t)}has(t){let e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){let e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}else return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${gI(t)}`}},Ix=class{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,i){let n=this.warnedKeysByObject.get(t);n||(n=new Set,this.warnedKeysByObject.set(t,n)),n.has(e)||(n.add(e),this.logger.warn(i,t))}};function Lx(r,t){return`[${r}~="${t}"]`}var Px=class{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,i)=>e||this.findTarget(i)||this.findLegacyTarget(i),void 0)}findAll(...t){return t.reduce((e,i)=>[...e,...this.findAllTargets(i),...this.findAllLegacyTargets(i)],[])}findTarget(t){let e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){let e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){let e=this.schema.targetAttributeForScope(this.identifier);return Lx(e,t)}findLegacyTarget(t){let e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){let e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map(i=>this.deprecate(i,t))}getLegacySelectorForTargetName(t){let e=`${this.identifier}.${t}`;return Lx(this.schema.targetAttribute,e)}deprecate(t,e){if(t){let{identifier:i}=this,n=this.schema.targetAttribute,a=this.schema.targetAttributeForScope(i);this.guide.warn(t,`target:${e}`,`Please replace ${n}="${i}.${e}" with ${a}="${e}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}},Nx=class{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,i)=>e||this.findOutlet(i),void 0)}findAll(...t){return t.reduce((e,i)=>[...e,...this.findAllOutlets(i)],[])}getSelectorForOutletName(t){let e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){let e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){let e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter(n=>this.matchesElement(n,t,e))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter(n=>this.matchesElement(n,t,e))}matchesElement(t,e,i){let n=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&n.split(" ").includes(i)}},kx=class r{constructor(t,e,i,n){this.targets=new Px(this),this.classes=new Mx(this),this.data=new Ox(this),this.containsElement=a=>a.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=i,this.guide=new Ix(n),this.outlets=new Nx(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return Lx(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new r(this.schema,document.documentElement,this.identifier,this.guide.logger)}},Rx=class{constructor(t,e,i){this.element=t,this.schema=e,this.delegate=i,this.valueListObserver=new fv(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){let{element:e,content:i}=t;return this.parseValueForElementAndIdentifier(e,i)}parseValueForElementAndIdentifier(t,e){let i=this.fetchScopesByIdentifierForElement(t),n=i.get(e);return n||(n=this.delegate.createScopeForElementAndIdentifier(t,e),i.set(e,n)),n}elementMatchedValue(t,e){let i=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,i),i==1&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){let i=this.scopeReferenceCounts.get(e);i&&(this.scopeReferenceCounts.set(e,i-1),i==1&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}},Fx=class{constructor(t){this.application=t,this.scopeObserver=new Rx(this.element,this.schema,this),this.scopesByIdentifier=new On,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((t,e)=>t.concat(e.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);let e=new Ex(this.application,t);this.connectModule(e);let i=t.controllerConstructor.afterLoad;i&&i.call(t.controllerConstructor,t.identifier,this.application)}unloadIdentifier(t){let e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){let i=this.modulesByIdentifier.get(e);if(i)return i.contexts.find(n=>n.element==t)}proposeToConnectScopeForElementAndIdentifier(t,e){let i=this.scopeObserver.parseValueForElementAndIdentifier(t,e);i?this.scopeObserver.elementMatchedValue(i.element,i):console.error(`Couldn't find or create scope for identifier: "${e}" and element:`,t)}handleError(t,e,i){this.application.handleError(t,e,i)}createScopeForElementAndIdentifier(t,e){return new kx(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);let e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);let e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(i=>t.connectContextForScope(i))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(i=>t.disconnectContextForScope(i))}},BG={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:r=>`data-${r}-target`,outletAttributeForScope:(r,t)=>`data-${r}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},fI("abcdefghijklmnopqrstuvwxyz".split("").map(r=>[r,r]))),fI("0123456789".split("").map(r=>[r,r])))};function fI(r){return r.reduce((t,[e,i])=>Object.assign(Object.assign({},t),{[e]:i}),{})}var hv=class{constructor(t=document.documentElement,e=BG){this.logger=console,this.debug=!1,this.logDebugActivity=(i,n,a={})=>{this.debug&&this.logFormattedMessage(i,n,a)},this.element=t,this.schema=e,this.dispatcher=new vx(this),this.router=new Fx(this),this.actionDescriptorFilters=Object.assign({},hG)}static start(t,e){let i=new this(t,e);return i.start(),i}async start(){await zG(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(n=>{n.controllerConstructor.shouldLoad&&this.router.loadDefinition(n)})}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(n=>this.router.unloadIdentifier(n))}get controllers(){return this.router.contexts.map(t=>t.controller)}getControllerForElementAndIdentifier(t,e){let i=this.router.getContextForElementAndIdentifier(t,e);return i?i.controller:null}handleError(t,e,i){var n;this.logger.error(`%s
|
|
18
|
+
`:"<br/>",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],p,null,h)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=_e(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),p=this._renderMode,d=e.positionDefault,v=Rc([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=v.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new bp;g.marker=y.makeTooltipMarker("item",gi(g.color),p);var _=Ny(u.formatTooltip(c,!1,f)),x=v.get("order"),b=v.get("valueFormatter"),S=_.frag,T=S?Vy(b?B({valueFormatter:b},S):S,y,p,x,a.get("useUTC"),v.get("textStyle")):_.text,A="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,T,g,A,e.offsetX,e.offsetY,e.position,e.target,y)}),n({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=_e(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(H(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ne(l),l.content=wt(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var p=e.positionDefault,d=Rc(f,this._tooltipModel,p?{position:p}:null),v=d.get("content"),m=Math.random()+"",g=new bp;this._showOrMove(d,function(){var y=ne(d.get("formatterParams")||{});this._showTooltipContent(d,v,y,m,e.offsetX,e.offsetY,e.position,i,g)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var p=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),v=d.color;if(h)if(H(h)){var m=e.ecModel.get("useUTC"),g=F(n)?n[0]:n,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;p=h,y&&(p=yn(g.axisValue,p,m)),p=Vs(p,n,!0)}else if($(h)){var _=ee(function(x,b){x===this._ticket&&(f.setContent(b,c,e,v,l),this._updatePosition(e,l,o,s,f,n,u))},this);this._ticket=a,p=h(n,a,_)}else p=h;f.setContent(p,c,e,v,l),f.show(e,v),this._updatePosition(e,l,o,s,f,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a,o){if(n==="axis"||F(i))return{color:a||o};if(!F(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||e.get("position");var f=o.getSize(),h=e.get("align"),p=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),$(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),F(i))n=Ve(i[0],u),a=Ve(i[1],c);else if(W(i)){var v=i;v.width=f[0],v.height=f[1];var m=Jr(v,{width:u,height:c});n=m.x,a=m.y,h=null,p=null}else if(H(i)&&l){var g=yH(i,d,f,e.get("borderWidth"));n=g[0],a=g[1]}else{var g=mH(n,a,o,u,c,h?null:20,p?null:20);n=g[0],a=g[1]}if(h&&(n-=_O(h)?f[0]/2:h==="right"?f[0]:0),p&&(a-=_O(p)?f[1]/2:p==="bottom"?f[1]:0),Wd(e)){var g=gH(n,a,o,u,c);n=g[0],a=g[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&w(n,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&w(u,function(h,p){var d=f[p]||{},v=h.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&v.length===m.length,o&&w(v,function(g,y){var _=m[y];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),a&&w(h.seriesDataIndices,function(g){var y=g.seriesIndex,_=i[y],x=a[y];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){fe.node||!i.getDom()||(Eo(this,"_updatePosition"),this._tooltipContent.dispose(),Pc("itemTooltip",i),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(nt);function Rc(r,t,e){var i=t.ecModel,n;e?(n=new Re(e,i,i),n=new Re(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Re&&(o=o.get("tooltip",!0)),H(o)&&(o={formatter:o}),o&&(n=new Re(o,n,i)))}return n}function yO(r,t){return r.dispatchAction||ee(t.dispatchAction,t)}function mH(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function gH(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function yH(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+c+o;break;case"left":s=t.x-n-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function _O(r){return r==="center"||r==="middle"}function _H(r,t,e){var i=wu(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Zn(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=_e(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}var xO=vH;function G_(r){Pt(Ud),r.registerComponentModel(lO),r.registerComponentView(xO),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ze),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ze)}function Fc(r,t){if(!r)return!1;for(var e=F(r)?r:[r],i=0;i<e.length;i++)if(e[i]&&e[i][t])return!0;return!1}function Zd(r){Su(r,"label",["show"])}var Xd=re(),bO=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e.preventAutoZ=!0,e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(fe.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,i){this._mergeOption(e,i,!1,!1)},t.prototype._mergeOption=function(e,i,n,a){var o=this.mainType;n||i.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Xd(s)[o];if(!l||!l.data){Xd(s)[o]=null;return}u?u._mergeOption(l,i,!0):(a&&Zd(l),w(l.data,function(c){c instanceof Array?(Zd(c[0]),Zd(c[1])):Zd(c)}),u=this.createMarkerModelFromSeries(l,this,i),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Xd(s)[o]=u},this)},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return Zi("section",{header:this.name,blocks:[Zi("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,i){var n=Ju.prototype.getDataParams.call(this,e,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},t.getMarkerModelFromSeries=function(e,i){return Xd(e)[i]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(Le);mt(bO,Ju.prototype);var ai=bO;function Y_(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function xH(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Kd(r,t,e,i,n,a,o){var s=[],l=Rr(t,n),u=l?t.getCalculationInfo("stackResultDimension"):n,c=Bc(t,u,r),f=t.hostModel,h=f.indicesOfNearest(e,u,c)[0];s[a]=t.get(i,h),s[o]=t.get(u,h);var p=t.get(n,h),d=Kt(t.get(n,h));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,p]}var qd={min:Ae(Kd,"min"),max:Ae(Kd,"max"),average:Ae(Kd,"average"),median:Ae(Kd,"median")};function _l(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!xH(t)&&!F(t.coord)&&F(n)){var a=W_(t,e,i,r);if(t=ne(t),t.type&&qd[t.type]&&a.baseAxis&&a.valueAxis){var o=ce(n,a.baseAxis.dim),s=ce(n,a.valueAxis.dim),l=qd[t.type](e,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!F(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&qd[t.type]){var c=i.getOtherAxis(u);c&&(t.value=Bc(e,e.mapDimension(c.dim),t.type))}}else for(var f=t.coord,h=0;h<2;h++)qd[f[h]]&&(f[h]=Bc(e,e.mapDimension(n[h]),f[h]));return t}}function W_(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(bH(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function bH(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function xl(r,t){return r&&r.containData&&t.coord&&!Y_(t)?r.containData(t.coord):!0}function SO(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!Y_(t)&&!Y_(e)?r.containZone(t.coord,e.coord):!0}function wO(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return ti(o,t[a])}:function(e,i,n,a){return ti(e.value,t[a])}}function Bc(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Z_=re(),SH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=Y()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){Z_(s).keep=!1}),i.eachSeries(function(s){var l=ai.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!Z_(s).keep&&a.group.remove(s.group)}),wH(i,o,this.type)},t.prototype.markKeep=function(e){Z_(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;w(e,function(a){var o=ai.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?gh(l):Nu(l))})}})},t.type="marker",t})(nt);function wH(r,t,e){r.eachSeries(function(i){var n=ai.getMarkerModelFromSeries(i,e),a=t.get(i.id);if(n&&a&&a.group){var o=Yi(n),s=o.z,l=o.zlevel;Yu(a.group,s,l)}})}var jd=SH;var TH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},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})(ai),CO=TH;var $d=re(),CH=function(r,t,e,i){var n=r.getData(),a;if(F(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=nr(i.yAxis,i.xAxis);else{var u=W_(i,n,t,r);s=u.valueAxis;var c=il(n,u.valueDataDim);l=Bc(n,c,o)}var f=s.dim==="x"?0:1,h=1-f,p=ne(i),d={coord:[]};p.type=null,p.coord=[],p.coord[h]=-1/0,d.coord[h]=1/0;var v=e.get("precision");v>=0&&ge(l)&&(l=+l.toFixed(Math.min(v,20))),p.coord[f]=d.coord[f]=l,a=[p,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var m=[_l(r,a[0]),_l(r,a[1]),B({},a[2])];return m[2].type=m[2].type||null,me(m[2],m[0]),me(m[2],m[1]),m};function Jd(r){return!isNaN(r)&&!isFinite(r)}function AO(r,t,e,i){var n=1-r,a=i.dimensions[r];return Jd(t[n])&&Jd(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function AH(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(AO(1,e,i,r)||AO(0,e,i,r)))return!0}return xl(r,t[0])&&xl(r,t[1])}function X_(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Ve(o.get("x"),n.getWidth()),u=Ve(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var c=a.dimensions,f=r.get(c[0],t),h=r.get(c[1],t);s=a.dataToPoint([f,h])}if(Cn(a,"cartesian2d")){var p=a.getAxis("x"),d=a.getAxis("y"),c=a.dimensions;Jd(r.get(c[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[e?0:1]):Jd(r.get(c[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var DH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ai.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=$d(o).from,u=$d(o).to;l.each(function(c){X_(l,c,!0,a,n),X_(u,c,!1,a,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new IM);this.group.add(c.group);var f=EH(o,e,i),h=f.from,p=f.to,d=f.line;$d(i).from=h,$d(i).to=p,i.setData(d);var v=i.get("symbol"),m=i.get("symbolSize"),g=i.get("symbolRotate"),y=i.get("symbolOffset");F(v)||(v=[v,v]),F(m)||(m=[m,m]),F(g)||(g=[g,g]),F(y)||(y=[y,y]),f.from.each(function(x){_(h,x,!0),_(p,x,!1)}),d.each(function(x){var b=d.getItemModel(x),S=b.getModel("lineStyle").getLineStyle();d.setItemLayout(x,[h.getItemLayout(x),p.getItemLayout(x)]);var T=b.get("z2");S.stroke==null&&(S.stroke=h.getItemVisual(x,"style").fill),d.setItemVisual(x,{z2:Z(T,0),fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:p.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(x,"symbolOffset"),toSymbolRotate:p.getItemVisual(x,"symbolRotate"),toSymbolSize:p.getItemVisual(x,"symbolSize"),toSymbol:p.getItemVisual(x,"symbol"),style:S})}),c.updateData(d),f.line.eachItemGraphicEl(function(x){_e(x).dataModel=i,x.traverse(function(b){_e(b).dataModel=i})});function _(x,b,S){var T=x.getItemModel(b);X_(x,b,S,e,a);var A=T.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=qs(l,"color")),x.setItemVisual(b,{symbolKeepAspect:T.get("symbolKeepAspect"),symbolOffset:Z(T.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Z(T.get("symbolRotate",!0),g[S?0:1]),symbolSize:Z(T.get("symbolSize"),m[S?0:1]),symbol:Z(T.get("symbol",!0),v[S?0:1]),style:A})}this.markKeep(c),c.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t})(jd);function EH(r,t,e){var i;r?i=U(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new _i(i,e),a=new _i(i,e),o=new _i([],e),s=U(e.get("data"),Ae(CH,t,r,e));r&&(s=Be(s,Ae(AH,r)));var l=wO(!!r,i);return n.initData(U(s,function(u){return u[0]}),null,l),a.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}var DO=DH;function K_(r){r.registerComponentModel(CO),r.registerComponentView(DO),r.registerPreprocessor(function(t){Fc(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var MH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},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})(ai),EO=MH;var Qd=re(),OH=function(r,t,e,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=_l(r,n),s=_l(r,a),l=o.coord,u=s.coord;l[0]=nr(l[0],-1/0),l[1]=nr(l[1],-1/0),u[0]=nr(u[0],1/0),u[1]=nr(u[1],1/0);var c=Hv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function ev(r){return!isNaN(r)&&!isFinite(r)}function MO(r,t,e,i){var n=1-r;return ev(t[n])&&ev(e[n])}function IH(r,t){var e=t.coord[0],i=t.coord[1],n={coord:e,x:t.x0,y:t.y0},a={coord:i,x:t.x1,y:t.y1};return Cn(r,"cartesian2d")?e&&i&&(MO(1,e,i,r)||MO(0,e,i,r))?!0:SO(r,n,a):xl(r,n)||xl(r,a)}function OO(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Ve(o.get(e[0]),n.getWidth()),u=Ve(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var c=r.getValues(["x0","y0"],t),f=r.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(f),d=[];e[0]==="x0"?d[0]=h[0]>p[0]?f[0]:c[0]:d[0]=h[0]>p[0]?c[0]:f[0],e[1]==="y0"?d[1]=h[1]>p[1]?f[1]:c[1]:d[1]=h[1]>p[1]?c[1]:f[1],s=i.getMarkerPosition(d,e,!0)}else{var v=r.get(e[0],t),m=r.get(e[1],t),g=[v,m];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(Cn(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),v=r.get(e[0],t),m=r.get(e[1],t);ev(v)?s[0]=y.toGlobalCoord(y.getExtent()[e[0]==="x0"?0:1]):ev(m)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var IO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],LH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ai.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=U(IO,function(f){return OO(s,l,f,a,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ee});this.group.add(c.group),this.markKeep(c);var f=PH(o,e,i);i.setData(f),f.each(function(h){var p=U(IO,function(M){return OO(f,h,M,e,a)}),d=o.getAxis("x").scale,v=o.getAxis("y").scale,m=d.getExtent(),g=v.getExtent(),y=[d.parse(f.get("x0",h)),d.parse(f.get("x1",h))],_=[v.parse(f.get("y0",h)),v.parse(f.get("y1",h))];Ct(y),Ct(_);var x=!(m[0]>y[1]||m[1]<y[0]||g[0]>_[1]||g[1]<_[0]),b=!x;f.setItemLayout(h,{points:p,allClipped:b});var S=f.getItemModel(h),T=S.getModel("itemStyle").getItemStyle(),A=S.get("z2"),E=qs(l,"color");T.fill||(T.fill=E,H(T.fill)&&(T.fill=Rf(T.fill,.4))),T.stroke||(T.stroke=E),f.setItemVisual(h,"style",T),f.setItemVisual(h,"z2",Z(A,0))}),f.diff(Qd(c).data).add(function(h){var p=f.getItemLayout(h),d=f.getItemVisual(h,"z2");if(!p.allClipped){var v=new Gi({z2:Z(d,0),shape:{points:p.points}});f.setItemGraphicEl(h,v),c.group.add(v)}}).update(function(h,p){var d=Qd(c).data.getItemGraphicEl(p),v=f.getItemLayout(h),m=f.getItemVisual(h,"z2");v.allClipped?d&&c.group.remove(d):(d?Ke(d,{z2:Z(m,0),shape:{points:v.points}},i,h):d=new Gi({shape:{points:v.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var p=Qd(c).data.getItemGraphicEl(h);c.group.remove(p)}).execute(),f.eachItemGraphicEl(function(h,p){var d=f.getItemModel(p),v=f.getItemVisual(p,"style");h.useStyle(f.getItemVisual(p,"style")),$r(h,fr(d),{labelFetcher:i,labelDataIndex:p,defaultText:f.getName(p)||"",inheritColor:H(v.fill)?Rf(v.fill,1):K.color.neutral99}),eo(h,d),vi(h,null,null,d.get(["emphasis","disabled"])),_e(h).dataModel=i}),Qd(c).data=f,c.group.silent=i.get("silent")||e.get("silent")},t.type="markArea",t})(jd);function PH(r,t,e){var i,n,a=["x0","y0","x1","y1"];if(r){var o=U(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})});n=U(a,function(u,c){return{name:u,type:o[c%2].type}}),i=new _i(n,e)}else n=[{name:"value",type:"float"}],i=new _i(n,e);var s=U(e.get("data"),Ae(OH,t,r,e));r&&(s=Be(s,Ae(IH,r)));var l=r?function(u,c,f,h){var p=u.coord[Math.floor(h/2)][h%2];return ti(p,n[h])}:function(u,c,f,h){return ti(u.value,n[h])};return i.initData(s,null,l),i.hasItemOption=!0,i}var LO=LH;function q_(r){r.registerComponentModel(EO),r.registerComponentView(LO),r.registerPreprocessor(function(t){Fc(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var NH=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},kH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),F(i)&&w(i,function(a,o){H(a)&&(a={type:a}),i[o]=me(a,NH(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<e.length;n++){var a=e[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var i=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(h)),h.length?i=i.concat(h):c=!0}else c=!0;c&&vs(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,o=Y(),s=U(a,function(l){return(H(l)||ge(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Re(l,this,this.ecModel))},this);this._data=Be(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;w(a,function(o){i[o.get("name")]=!1})}i[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var i=this.option.selected;i.hasOwnProperty(e)||(i[e]=!0),this[i[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,i=this.option.selected;w(e,function(n){i[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,i=this.option.selected;w(e,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},t.prototype.isSelected=function(e){var i=this.option.selected;return!(i.hasOwnProperty(e)&&!i[e])&&ce(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{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",bottom:K.size.m,align:"auto",backgroundColor:K.color.transparent,borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:K.color.disabled,inactiveBorderColor:K.color.disabled,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:K.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:K.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:K.color.tertiary,borderWidth:1,borderColor:K.color.border},emphasis:{selectorLabel:{show:!0,color:K.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(Le),zc=kH;var bl=Ae,j_=w,tv=Ee,RH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new tv),this.group.add(this._selectorGroup=new tv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var c=Gs(e,n).refContainer,f=e.getBoxLayoutParams(),h=e.get("padding"),p=Jr(f,c,h),d=this.layoutInner(e,o,p,a,l,u),v=Jr(he({width:d.width,height:d.height},f),c,h);this.group.x=v.x-d.x,this.group.y=v.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=sO(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),c=Y(),f=i.get("selectedMode"),h=i.get("triggerEvent"),p=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&p.push(d.id)}),j_(i.getData(),function(d,v){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
|
|
19
|
+
`)){var y=new tv;y.newline=!0,u.add(y);return}var _=n.getSeriesByName(g)[0];if(!c.get(g))if(_){var x=_.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),T=x.getVisual("style"),A=this._createItem(_,g,v,d,i,e,b,T,S,f,a);A.on("click",bl(PO,g,null,a,p)).on("mouseover",bl($_,_.name,null,a,p)).on("mouseout",bl(J_,_.name,null,a,p)),n.ssr&&A.eachChild(function(E){var M=_e(E);M.seriesIndex=_.seriesIndex,M.dataIndex=v,M.ssrType="legend"}),h&&A.eachChild(function(E){m.packEventData(E,i,_,v,g)}),c.set(g,!0)}else n.eachRawSeries(function(E){var M=this;if(!c.get(g)&&E.legendVisualProvider){var O=E.legendVisualProvider;if(!O.containName(g))return;var L=O.indexOfName(g),I=O.getItemVisual(L,"style"),k=O.getItemVisual(L,"legendIcon"),z=Vt(I.fill);z&&z[3]===0&&(z[3]=.2,I=B(B({},I),{fill:Ii(z,"rgba")}));var V=this._createItem(E,g,v,d,i,e,{},I,k,f,a);V.on("click",bl(PO,null,g,a,p)).on("mouseover",bl($_,null,g,a,p)).on("mouseout",bl(J_,null,g,a,p)),n.ssr&&V.eachChild(function(q){var G=_e(q);G.seriesIndex=E.seriesIndex,G.dataIndex=v,G.ssrType="legend"}),h&&V.eachChild(function(q){M.packEventData(q,i,E,v,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype.packEventData=function(e,i,n,a,o){var s={componentType:"legend",componentIndex:i.componentIndex,dataIndex:a,value:o,seriesIndex:n.seriesIndex};_e(e).eventData=s},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();j_(e,function(u){var c=u.type,f=new He({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(f);var h=i.getModel("selectorLabel"),p=i.getModel(["emphasis","selectorLabel"]);$r(f,{normal:h,emphasis:p},{defaultText:u.title}),ea(f)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,c,f,h){var p=e.visualDrawType,d=o.get("itemWidth"),v=o.get("itemHeight"),m=o.isSelected(i),g=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var x=FH(c,a,l,u,p,m,h),b=new tv,S=a.getModel("textStyle");if($(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:v,icon:c,iconRotate:g,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var T=_==="inherit"&&e.getData().getVisual("symbol")?g==="inherit"?e.getData().getVisual("symbolRotate"):g:0;b.add(BH({itemWidth:d,itemHeight:v,icon:c,iconRotate:T,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}))}var A=s==="left"?d+5:-5,E=s,M=o.get("formatter"),O=i;H(M)&&M?O=M.replace("{name}",i??""):$(M)&&(O=M(i));var L=m?S.getTextColor():a.get("inactiveColor");b.add(new He({style:Lr(S,{text:O,x:A,y:v/2,fill:L,align:E,verticalAlign:"middle"},{inheritColor:L})}));var I=new Oe({shape:b.getBoundingRect(),style:{fill:"transparent"}}),k=a.getModel("tooltip");return k.get("show")&&Ls({el:I,componentModel:o,itemName:i,itemTooltipOption:k.option}),b.add(I),b.eachChild(function(z){z.silent=!0}),I.silent=!f,this.getContentGroup().add(b),ea(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();xo(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){xo("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),p=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),v=e.getOrient().index,m=v===0?"width":"height",g=v===0?"height":"width",y=v===0?"y":"x";s==="end"?p[v]+=c[m]+d:f[v]+=h[m]+d,p[1-v]+=c[g]/2-h[g]/2,u.x=p[0],u.y=p[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[m]=c[m]+d+h[m],_[g]=Math.max(c[g],h[g]),_[y]=Math.min(0,h[y]+p[1-v]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(nt);function FH(r,t,e,i,n,a,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),j_(m,function(y,_){m[_]==="inherit"&&(m[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?i.decal:sc(f,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),p.stroke==="auto"&&(p.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=d==="auto"?i.lineWidth>0&&v?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}}function BH(r){var t=r.icon||"roundRect",e=It(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=K.color.neutral00,e.style.lineWidth=2),e}function PO(r,t,e,i){J_(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),$_(r,t,e,i)}function $_(r,t,e,i){e.usingTHL()||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:i})}function J_(r,t,e,i){e.usingTHL()||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:i})}var rv=RH;function Vc(r,t,e){var i=r==="allSelect"||r==="inverseSelect",n={},a=[];e.eachComponent({mainType:"legend",query:t},function(s){i?s[r]():s[r](t.name),NO(s,n),a.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){w(n,function(l,u){s[l?"select":"unSelect"](u)}),NO(s,o)}),i?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function NO(r,t){var e=t||{};return w(r.getData(),function(i){var n=i.get("name");if(!(n===`
|
|
20
|
+
`||n==="")){var a=r.isSelected(n);We(e,n)?e[n]=e[n]&&a:e[n]=a}}),e}function kO(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(Vc,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(Vc,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(Vc,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(Vc,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(Vc,"unSelect"))}var RO=_s(zH);function zH(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0})}function iv(r){r.registerComponentModel(zc),r.registerComponentView(rv),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,RO),r.registerSubTypeDefaulter("legend",function(){return"plain"}),kO(r)}var VH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,n){var a=Qr(e);r.prototype.init.call(this,e,i,n),FO(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),FO(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ra(zc.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:K.color.accent50,pageIconInactiveColor:K.color.accent10,pageIconSize:15,pageTextStyle:{color:K.color.tertiary},animationDurationUpdate:800}),t})(zc);function FO(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,Nr(t,e,{type:"box",ignoreSize:!!n})}var BO=VH;var zO=Ee,Q_=["width","height"],ex=["x","y"],UH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new zO),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zO)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,i,n,a,o,s,l);var c=this._controllerGroup,f=i.get("pageIconSize",!0),h=F(f)?f:[f,f];d("pagePrev",0);var p=i.getModel("pageTextStyle");c.add(new He({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(v,m){var g=v+"DataIndex",y=po(i.get("pageIcons",!0)[i.getOrient().name][m],{onclick:ee(u._pageGo,u,g,i,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,c=Q_[u],f=ex[u],h=Q_[1-u],p=ex[1-u];o&&xo("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),v=l.getBoundingRect(),m=[-v.x,-v.y],g=ne(n);o&&(g[c]=n[c]-v[c]-d);var y=this._layoutContentAndController(e,a,g,u,c,h,p,f);if(o){if(s==="end")m[u]+=y[c]+d;else{var _=v[c]+d;m[u]-=_,y[f]-=_}y[c]+=v[c]+d,m[1-u]+=y[p]+y[h]/2-v[h]/2,y[h]=Math.max(y[h],v[h]),y[p]=Math.min(y[p],v[p]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,i,n,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;xo(e.get("orient"),c,e.get("itemGap"),a?n.width:null,a?null:n.height),xo("horizontal",h,e.get("pageButtonItemGap",!0));var p=c.getBoundingRect(),d=h.getBoundingRect(),v=this._showController=p[o]>n[o],m=[-p.x,-p.y];i||(m[a]=c[u]);var g=[0,0],y=[-d.x,-d.y],_=Z(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(v){var x=e.get("pageButtonPosition",!0);x==="end"?y[a]+=n[o]-d[o]:g[a]+=d[o]+_}y[1-a]+=p[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),h.setPosition(y);var b={x:0,y:0};if(b[o]=v?n[o]:p[o],b[s]=Math.max(p[s],d[s]),b[l]=Math.min(0,d[l]+y[1-a]),f.__rectSize=n[o],v){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-_,0),S[s]=b[s],f.setClipPath(new Oe({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(A){A.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(e);return T.pageIndex!=null&&Ke(c,{x:T.contentPosition[0],y:T.contentPosition[1]},v?e:null),this._updatePageInfoView(e,T),b},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=i[f]!=null,p=n.childOfName(c);p&&(p.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",H(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Q_[o],l=ex[o],u=this._findTargetItemIndex(i),c=n.children(),f=c[u],h=c.length,p=h?1:0,d={contentPosition:[n.x,n.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var v=x(f);d.contentPosition[o]=-v.s;for(var m=u+1,g=v,y=v,_=null;m<=h;++m)_=x(c[m]),(!_&&y.e>g.s+a||_&&!b(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=_;for(var m=u-1,g=v,y=v,_=null;m>=-1;--m)_=x(c[m]),(!_||!b(y,_.s))&&g.i<y.i&&(y=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function x(S){if(S){var T=S.getBoundingRect(),A=T[l]+S[l];return{s:A,e:A+T[s],i:S.__legendDataIndex}}}function b(S,T){return S.e>=T&&S.s<=T+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t})(rv),VO=UH;function tx(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function UO(r){Pt(iv),r.registerComponentModel(BO),r.registerComponentView(VO),tx(r)}function rx(r){Pt(iv),Pt(UO)}var HH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ra(yl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(yl),HO=HH;var ix=re();function GO(r,t,e){ix(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function YO(r,t){for(var e=ix(r).coordSysRecordMap,i=e.keys(),n=0;n<i.length;n++){var a=i[n],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||WO(e,o))}}}function WO(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function GH(r,t){var e={model:t,containsPoint:Ae(WH,t),dispatchAction:Ae(YH,r),dataZoomInfoMap:null,controller:null},i=e.controller=new bM(r.getZr());return w(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function YH(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function WH(r,t,e,i){return r.coordinateSystem.containPoint([e,i])}function ZH(r,t,e){var i,n="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,l;return r.each(function(u){var c=u.model,f=c.get("disabled",!0)?!1:c.get("zoomLock",!0)?"move":!0;a[n+f]>a[n+i]&&(i=f),o=o&&c.get("preventDefaultMouseMove",!0),s=Z(c.get("cursorGrab",!0),s),l=Z(c.get("cursorGrabbing",!0),l)}),{controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:l}}}function ZO(r){r.registerUpdateLifecycle("coordsys:aftercreate",function(t,e){var i=ix(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=Y());n.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=Hd(a);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,GH(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Y());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){WO(n,a);return}var c=ZH(l,a,e);o.enable(c.controlType,c.opt),sa(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var KH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),GO(n,e,{pan:ee(nx.pan,this),zoom:ee(nx.zoom,this),scrollMove:ee(nx.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){YO(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(Yd),nx={zoom:function(r,t,e,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=ax[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(En(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:XO(function(r,t,e,i,n,a){var o=ax[i]([a.oldX,a.oldY],[a.newX,a.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:XO(function(r,t,e,i,n,a){var o=ax[i]([0,0],[a.scrollDelta,a.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function XO(r){return function(t,e,i,n){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,i,n);if(En(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var ax={grid:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,i,n){var a=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},KO=KH;function qO(r){kc(r),r.registerComponentModel(HO),r.registerComponentView(KO),ZO(r)}var qH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ra(yl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:K.color.accent10,borderRadius:0,backgroundColor:K.color.transparent,dataBackground:{lineStyle:{color:K.color.accent30,width:.5},areaStyle:{color:K.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:K.color.accent40,width:.5},areaStyle:{color:K.color.accent20,opacity:.3}},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:K.color.neutral00,borderColor:K.color.accent20},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:K.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:K.color.tertiary},brushSelect:!0,brushStyle:{color:K.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:K.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(yl),jO=qH;var Uc=Oe,jH=1,ox=30,$H=7,Hc="horizontal",$O="vertical",JH=5,QH=["line","bar","candlestick","scatter"],eG={easing:"cubicOut",duration:100,delay:0},tG=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=ee(this._onBrush,this),this._onBrushEnd=ee(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),sa(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Eo(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 i=this._displayables.sliderGroup=new Ee;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?$H:0,o=Gs(e,i).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Hc?{right:o.width-s.x-s.width,top:o.height-ox-l-a,width:s.width,height:ox}:{right:l,top:s.y,width:ox,height:s.height},c=Qr(e.option);w(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=Jr(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===$O&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Hc&&!o?{scaleY:l?1:-1,scaleX:1}:n===Hc&&o?{scaleY:l?1:-1,scaleX:-1}:n===$O&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]),c=isNaN(u.x)?0:u.x,f=isNaN(u.y)?0:u.y;e.x=i.x-c,e.y=i.y-f,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new Uc({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Uc({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:ee(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var f=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),p=(h[1]-h[0])*.3;h=[h[0]-p,h[1]+p];var d=[0,i[1]],v=[0,i[0]],m=[[i[0],0],[0,0]],g=[],y=v[1]/Math.max(1,o.count()-1),_=i[0]/(f[1]-f[0]),x=e.thisAxis.type==="time",b=-y,S=Math.round(o.count()/i[0]),T;o.each([e.thisDim,l],function(L,I,k){if(S>0&&k%S){x||(b+=y);return}b=x?(+L-f[0])*_:b+y;var z=I==null||isNaN(I)||I==="",V=z?0:je(I,h,d,!0);z&&!T&&k?(m.push([m[m.length-1][0],0]),g.push([g[g.length-1][0],0])):!z&&T&&(m.push([b,0]),g.push([b,0])),z||(m.push([b,V]),g.push([b,V])),T=z}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var A=this.dataZoomModel;function E(L){var I=A.getModel(L?"selectedDataBackground":"dataBackground"),k=new Ee,z=new Gi({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new io({shape:{points:c},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return k.add(z),k.add(V),k}for(var M=0;M<3;M++){var O=E(M===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(i!==!0&&ce(QH,u.get("type"))<0)){var c=a.getComponent(ni(o),s).axis,f=rG(o),h,p=u.coordinateSystem;f!=null&&p.getOtherAxis&&(h=p.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);n={thisAxis:c,series:u,thisDim:d,otherDim:f,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=i.filler=new Uc({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Uc({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:jH,fill:K.color.transparent}})),w([0,1],function(_){var x=l.get("handleIcon");!ic[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=It(x,-1,0,2,2,null,!0);b.attr({cursor:iG(this._orient),draggable:!0,drift:ee(this._onDragMove,this,_),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:ee(this._onOverDataInfoTriggerArea,this,!1),z2:5});var S=b.getBoundingRect(),T=l.get("handleSize");this._handleHeight=Ve(T,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ea(b);var A=l.get("handleColor");A!=null&&(b.style.fill=A),o.add(n[_]=b);var E=l.getModel("textStyle"),M=l.get("handleLabel")||{},O=M.show||!1;e.add(a[_]=new He({silent:!0,invisible:!O,style:Lr(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var p=h;if(f){var d=Ve(l.get("moveHandleSize"),s[1]),v=i.moveHandle=new Oe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),m=d*.8,g=i.moveHandleIcon=It(l.get("moveHandleIcon"),-m/2,-m/2,m,m,K.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));p=i.moveZone=new Oe({invisible:!0,shape:{y:s[1]-y,height:d+y}}),p.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(g),o.add(p)}p.attr({draggable:!0,cursor:"grab",drift:ee(this._onActualMoveZoneDrift,this),ondragstart:ee(this._onActualMoveZoneDragStart,this),ondragend:ee(this._onActualMoveZoneDragEnd,this),onmouseover:ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:ee(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[je(e[0],[0,100],i,!0),je(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];En(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?je(s.minSpan,l,o,!0):null,s.maxSpan!=null?je(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ct([je(a[0],o,l,!0),je(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=Ct(n.slice()),o=this._size;w([0,1],function(p){var d=i.handles[p],v=this._handleHeight;d.attr({scaleX:v/2,scaleY:v/2,x:n[p]+(p?-1:1),y:o[1]/2-v/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Oe,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,s=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy(),u=l.getAxisModel().axis.scale;if(l){var c=this._range,f;if(e){var h={start:c[0],end:c[1]},p=Gd(i,l);if(p){var d=p.calculateDataWindow(h).percentInverted;h={start:d[0],end:d[1]}}f=l.calculateDataWindow(h)}else f=l.getWindow();s=[JO(i,0,f,u),JO(i,1,f,u)]}}var v=Ct(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(g){var y=Gu(n.handles[g].parent,this.group),_=Jg(g===0?"right":"left",y),x=this._handleWidth/2+JH,b=ho([v[g]+(g===0?-x:x),this._size[1]/2],y);a[g].setStyle({x:b[0],y:b[1],verticalAlign:o===Hc?"middle":_,align:o===Hc?_:"center",text:s[g]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var i=this.dataZoomModel.get("handleLabel")||{},n=i.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,i,n){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",e,i,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(e,i,n,a){this._dragging=!0,Ei(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ho([i,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new ke(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();En(0,l,o,0,u.minSpan!=null?je(u.minSpan,s,o,!0):null,u.maxSpan!=null?je(u.maxSpan,s,o,!0):null),this._range=Ct([je(l[0],o,s,!0),je(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ei(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Uc({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?eG:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=Hd(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(Yd);function JO(r,t,e,i){var n=r.get("labelFormatter"),a=r.get("labelPrecision");(a==null||a==="auto")&&(a=e.valuePrecision);var o=e.value[t],s=o==null||isNaN(o)?"":lt(i)||Ki(i)?i.getLabel({value:Math.round(o)}):isFinite(a)?we(o,a,!0):o+"";return $(n)?n(o,s):H(n)?n.replace("{value}",s):s}function rG(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function iG(r){return r==="vertical"?"ns-resize":"ew-resize"}var QO=tG;function eI(r){r.registerComponentModel(jO),r.registerComponentView(QO),kc(r)}function sx(r){Pt(qO),Pt(eI)}function tI(r,t,e){var i=$e.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}function nv(r){return!r.__cursors.get(Ug)}function rI(r){var t=r.__cursors.get(Ug);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var nG=(function(r){N(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.zlevel=0,a.zlevel2=Ds,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__prevIdx={startIdx:0,endIdx:0};var o;n=n||Ba,typeof e=="string"?o=tI(e,i,n):W(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(Kl(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.afterBrush=function(){this.__prevIdx=rI(this)},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=tI("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ue(0,0,0,0);function c(x){if(!(!x.isFinite()||x.isZero()))if(o.length===0){var b=new ue(0,0,0,0);b.copy(x),o.push(b)}else{for(var S=!1,T=1/0,A=0,E=0;E<o.length;++E){var M=o[E];if(M.intersect(x)){var O=new ue(0,0,0,0);O.copy(M),O.union(x),o[E]=O,S=!0;break}else if(l){u.copy(x),u.union(M);var L=x.width*x.height,I=M.width*M.height,k=u.width*u.height,z=k-L-I;z<T&&(T=z,A=E)}}if(l&&(o[A].union(x),S=!0),!S){var b=new ue(0,0,0,0);b.copy(x),o.push(b)}l||(l=o.length>=s)}}for(var f=rI(this),h=f.startIdx;h<f.endIdx;++h){var p=e[h];if(p){var d=p.shouldBePainted(n,a,!0,!0),v=p.__isRendered&&(p.__dirty&pt||!d)?p.getPrevPaintRect():null;v&&c(v);var m=d&&(p.__dirty&pt||!p.__isRendered)?p.getPaintRect():null;m&&c(m)}}for(var g=this.__prevIdx,h=g.startIdx;h<g.endIdx;++h){var p=i[h],d=p&&p.shouldBePainted(n,a,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered){var v=p.getPrevPaintRect();v&&c(v)}}var y;do{y=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var _=h+1;_<o.length;)o[h].intersect(o[_])?(y=!0,o[h].union(o[_]),o.splice(_,1)):_++;h++}}while(y);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,i){var n=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=i+"px"),a.width=e*n,a.height=i*n,s&&(s.width=e*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,i,n){var a=this.dom,o=this.ctx,s=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!e,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/f,l/f));var p=this.domBack;function d(v,m,g,y){if(o.clearRect(v,m,g,y),i&&i!=="transparent"){var _=void 0;if(Qi(i)){var x=i.global||i.__width===g&&i.__height===y;_=x&&i.__canvasGradient||ac(o,i,{x:0,y:0,width:g,height:y}),i.__canvasGradient=_,i.__width=g,i.__height=y}else Wv(i)&&(i.scaleX=i.scaleX||f,i.scaleY=i.scaleY||f,_=Pp(o,i,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=_||i,o.fillRect(v,m,g,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(p,v,m,g,y),o.restore())}!n||u?d(0,0,s,l):n.length&&w(n,function(v){d(v.x*f,v.y*f,v.width*f,v.height*f)})},t})(St),lx=nG;var iI=1e5,Go=314159,ux=void 0,aG=1,cx=2;function oG(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function sG(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}function nI(r,t,e,i){var n=new lx(r,t,t.dpr);return n.zlevel=e,n.zlevel2=i,n.__builtin__=!0,aI(n),n}function aI(r){r.__cursorStack=[],r.__cursors=Y()}function lG(r){return r.startIdx=r.drawIdx=r.endIdx=r.endIdxNew=0,r.used=!1,r.first=r.last=NaN,r.notClearIdx=-1,r}function uG(r,t){var e=r.__cursors,i=+t;return e.get(i)||(r.__cursorStack.push(i),e.set(i,lG({key:i})))}function av(r,t){for(var e=r.__cursorStack,i=0;i<e.length;i++)t(r.__cursors.get(e[i]))}function fx(r,t){var e=r.layers;return e[t]||(e[t]=new Array(3))}function Yt(r,t,e){for(var i=r.layerStack,n=0;n<i.length;n++){var a=i[n].zl,o=i[n].zl2,s=r.layers[a][o];(!e||(!(e&Gc)||s.__builtin__)&&(!(e&hx)||!s.__builtin__)&&(!(e&oI)||s!==r.hoverlayer))&&t(s,a,o,n)}}var Gc=1,hx=2,oI=4,ov=Gc|oI,cG=(function(){function r(t,e,i,n){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=B({},i||{}),this.dpr=i.devicePixelRatio||Ba,this._singleCanvas=a,this.root=t;var o=t.style;if(o&&(Kl(t),t.innerHTML=""),this.storage=e,this._prevDisplayList=[],a){var l=t,u=l.width,c=l.height;i.width!=null&&(u=i.width),i.height!=null&&(c=i.height),this.dpr=i.devicePixelRatio||1,l.width=u*this.dpr,l.height=c*this.dpr,this._width=u,this._height=c;var f=nI(l,this,Go,Ds);f.initContext(),this._insertLayer(f,Go,Ds,!0),this._domRoot=t}else{this._width=oc(t,0,i),this._height=oc(t,1,i);var s=this._domRoot=sG(this._width,this._height);t.appendChild(s)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e;t&&!W(t)?e={paintAll:!!t}:e=t||{};var i=Z(e.refresh,!0),n=Z(e.refreshHover,!1);if(n&&(this._hoverLayerDirty=cx),!i)return n&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var a=this.storage.getDisplayList(!0);this._updateLayerStatus(a,e.paintAll),this._redrawId=Math.random();var o=this._prevDisplayList;this._paintList(a,o,this._redrawId);var s=this._backgroundColor;return Yt(this._i,function(l,u,c,f){l.refresh&&l.refresh(f===0?s:null)},hx),this._opts.useDirtyRect&&(this._prevDisplayList=a.slice()),this},r.prototype._paintHoverList=function(t){var e=this._i.hoverlayer,i=this._hoverLayerDirty;if(this._hoverLayerDirty=ux,i!==ux&&(!e&&i===cx&&(e=this._i.hoverlayer=this._ensureLayer(iI)),!!e)){e.clear();for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a,o=0,s=t.length;o<s;o++){var l=t[o];if(l.__inHover){a||(a=e.ctx,a.save());var u=l.__hoverStyle,c=void 0;u&&(c=l.style,l.style=u),la(a,l,n),u&&(l.style=c)}}a&&(Po(a,n),a.restore())}},r.prototype.getHoverLayer=function(){return this._ensureLayer(iI)},r.prototype.paintOne=function(t,e){$s(t,e)},r.prototype._paintList=function(t,e,i){if(this._redrawId===i){var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),n)Yt(this._i,function(o){o.afterBrush&&o.afterBrush()},ov),this._paintHoverList(t);else{var a=this;nu(function(){a._paintList(t,e,i)})}}},r.prototype._compositeManually=function(){var t=this._ensureLayer(Go).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),Yt(this._i,function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)},Gc)},r.prototype._doPaintList=function(t,e){var i=this,n=!0;return Yt(this._i,function(a){var o=!1;if(av(a,function(f){(f.drawIdx<f.endIdx||f.notClearIdx>=0)&&(o=!0)}),!(!o&&!a.__dirty)){var s=i._opts.useDirtyRect&&!nv(a)?a.createRepaintRects(t,e,i._width,i._height):null,l=i._i.layerStack[0],u=!0;if(a.__dirty){u=!1,a.__dirty=!1;var c=a.zlevel===l.zl&&a.zlevel2===l.zl2?i._backgroundColor:null;a.clear(!1,c,s)}av(a,function(f){var h=i._paintPerCursor(a,f,t,s,u);n=n&&h})}},ov),fe.wxa&&Yt(this._i,function(a){a&&a.ctx&&a.ctx.draw&&a.ctx.draw()}),n},r.prototype._paintPerCursor=function(t,e,i,n,a){var o=t.ctx;if(n)if(!n.length)e.drawIdx=e.endIdx;else for(var s=this.dpr,l=0;l<n.length;++l){var u=n[l];o.save(),o.beginPath(),o.rect(u.x*s,u.y*s,u.width*s,u.height*s),o.clip(),this._paintPerCursorInRect(t,e,i,u,a),o.restore()}else o.save(),this._paintPerCursorInRect(t,e,i,null,a),o.restore();return e.drawIdx>=e.endIdx},r.prototype._paintPerCursorInRect=function(t,e,i,n,a){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:a}},s=t.ctx,l=nv(t),u=l&&$e.getTime(),c=e.drawIdx,f=e.notClearIdx,h=f>=0?Math.min(f,c):c;h<e.endIdx;h++){var p=i[h];if(!(h<c&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=cx),n!=null){var d=p.getPaintRect();d&&d.intersect(n)&&(la(s,p,o),p.setPrevPaintRect(d))}else la(s,p,o);if(l){var v=$e.getTime()-u;if(v>15){h++;break}}}}Po(s,o),e.drawIdx=Math.max(h,c)},r.prototype.getLayer=function(t,e){return this._ensureLayer(t,0,e)},r.prototype._ensureLayer=function(t,e,i){e=e||0;var n=this._singleCanvas;n&&!this._needsManuallyCompositing&&(t=Go,e=0);var a=fx(this._i,t)[e];return a||(a=nI("zr_"+t+"."+e,this,t,e),this._layerConfig[t]&&me(a,this._layerConfig[t],!0),(i||n&&t!==Go)&&(a.virtual=!0),this._insertLayer(a,t,e,!1),a.initContext()),a},r.prototype.insertLayer=function(t,e){this._insertLayer(e,t,0,!1)},r.prototype._insertLayer=function(t,e,i,n){var a=this._i,o=a.layers,s=a.layerStack,l=this._domRoot,u=null;if(!(o[e]&&o[e][i])&&oG(t)){for(var c=s.length,f=0;f<c&&(s[f].zl<e||s[f].zl===e&&s[f].zl2<i);)f++;if(f>0&&(u=fx(a,s[f-1].zl)[s[f-1].zl2]),s.splice(f,0,{zl:e,zl2:i}),fx(a,e)[i]=t,!n&&!t.virtual)if(u){var h=u.dom;h.nextSibling?l.insertBefore(t.dom,h.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)})},r.prototype.eachBuiltinLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)},Gc)},r.prototype.eachOtherLayer=function(t,e){return Yt(this._i,function(i,n){t.call(e,i,n)},hx)},r.prototype.getLayers=function(){var t={};return Yt(this._i,function(e,i,n){t[e.id]=e}),t},r.prototype._updateLayerStatus=function(t,e){var i=this;if(i._singleCanvas)for(var n=1;n<t.length;n++){var a=t[n];if(a.zlevel!==t[n-1].zlevel||a.incremental){i._needsManuallyCompositing=!0;break}}Yt(i._i,function(m){m.__dirty=!1,av(m,function(g){g.used=!1,g.endIdxNew=0,g.notClearIdx=-1})},ov);for(var o,s=null,l=null,u=!1,c=0,f=t.length;c<f;c++){var a=t[c],h=a.zlevel,p=a.incremental,d=void 0;if(o!==h&&(o=h,u=!1),p?(u=!0,d=DT):d=u?AT:Ds,(!s||h!==s.zlevel||d!==s.zlevel2)&&(s=i._ensureLayer(h,d),l=null,!s.__builtin__)){Sa("ZLevel "+h+" has been used by unknown layer "+s.id);continue}if((!l||p!==l.key)&&(l=uG(s,p),!l.used))if(l.used=!0,!e&&l.first===a.id){var v=c-l.startIdx;l.startIdx=c,l.drawIdx+=v,l.endIdx+=v}else s.__dirty=!0,l.first=a.id,l.startIdx=l.drawIdx=c,l.endIdx=c+1;l.endIdxNew=c+1,a.__dirty&pt&&!a.__inHover&&((!p||!a.notClear&&c<l.drawIdx)&&(s.__dirty=!0),p&&a.notClear&&l.notClearIdx<0&&(l.notClearIdx=c))}Yt(i._i,function(m){for(var g=m.__cursorStack,y=m.__cursors,_=g.length-1;_>=0;_--){var x=y.get(g[_]);if(!x.used)m.__dirty=!0,y.removeKey(g[_]),g.splice(_,1);else{var b=x.endIdxNew;(nv(m)?b<x.drawIdx:b!==x.endIdx||!b||t[b-1].id!==x.last)&&(m.__dirty=!0),x.endIdx=x.endIdxNew,x.last=b?t[b-1].id:NaN}}m.__dirty&&(av(m,function(S){S.drawIdx=S.startIdx}),i._hoverLayerDirty===ux&&(i._hoverLayerDirty=aG))},ov)},r.prototype.clear=function(){return Yt(this._i,function(t){t.clear(),aI(t)},Gc),this},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,Yt(this._i,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?me(i[t],e,!0):i[t]=e,Yt(this._i,function(n,a){me(n,i[a],!0)})}},r.prototype.delLayer=function(t){for(var e=this._i.layerStack,i=this._i.layers,n=e.length-1;n>=0;n--){var a=e[n];if(a.zl===t){var o=i[t][a.zl2];if(o.__builtin__)continue;if(e.splice(n,1),i[t][a.zl2]=void 0,!o.virtual){var s=o.dom.parentNode;s&&s.removeChild(o.dom)}}}},r.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;t!=null&&(n.width=t),e!=null&&(n.height=e),t=oc(a,0,n),e=oc(a,1,n),i.style.display="",(this._width!==t||e!==this._height)&&(i.style.width=t+"px",i.style.height=e+"px",Yt(this._i,function(o){o.resize(t,e)}),this.refresh({paintAll:!0})),this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this._ensureLayer(Go).resize(t,e)}return this},r.prototype.clearLayer=function(t){w(this._i.layers[t],function(e){e&&!e.__builtin__&&e.clear()})},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Go][0].dom;var e=new lx("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,a=e.dom.height;Yt(this._i,function(f){f.__builtin__?i.drawImage(f.dom,0,0,n,a):f.renderToCanvas&&(i.save(),f.renderToCanvas(i),i.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];la(i,c,o)}Po(i,o)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})(),sI=cG;function px(r){r.registerPainter("canvas",sI)}var dx=class{constructor(t,e,i){this.eventTarget=t,this.eventName=e,this.eventOptions=i,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){let e=fG(t);for(let i of this.bindings){if(e.immediatePropagationStopped)break;i.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((t,e)=>{let i=t.index,n=e.index;return i<n?-1:i>n?1:0})}};function fG(r){if("immediatePropagationStopped"in r)return r;{let{stopImmediatePropagation:t}=r;return Object.assign(r,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}var vx=class{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(t=>t.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(t=>t.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((t,e)=>t.concat(Array.from(e.values())),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,i={}){this.application.handleError(t,`Error ${e}`,i)}clearEventListenersForBinding(t){let e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){let{eventTarget:e,eventName:i,eventOptions:n}=t,a=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(i,n);a.delete(o),a.size==0&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){let{eventTarget:e,eventName:i,eventOptions:n}=t;return this.fetchEventListener(e,i,n)}fetchEventListener(t,e,i){let n=this.fetchEventListenerMapForEventTarget(t),a=this.cacheKey(e,i),o=n.get(a);return o||(o=this.createEventListener(t,e,i),n.set(a,o)),o}createEventListener(t,e,i){let n=new dx(t,e,i);return this.started&&n.connect(),n}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){let i=[t];return Object.keys(e).sort().forEach(n=>{i.push(`${e[n]?"":"!"}${n}`)}),i.join(":")}},hG={stop({event:r,value:t}){return t&&r.stopPropagation(),!0},prevent({event:r,value:t}){return t&&r.preventDefault(),!0},self({event:r,value:t,element:e}){return t?e===r.target:!0}},pG=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function dG(r){let e=r.trim().match(pG)||[],i=e[2],n=e[3];return n&&!["keydown","keyup","keypress"].includes(i)&&(i+=`.${n}`,n=""),{eventTarget:vG(e[4]),eventName:i,eventOptions:e[7]?mG(e[7]):{},identifier:e[5],methodName:e[6],keyFilter:e[1]||n}}function vG(r){if(r=="window")return window;if(r=="document")return document}function mG(r){return r.split(":").reduce((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)}),{})}function gG(r){if(r==window)return"window";if(r==document)return"document"}function Bx(r){return r.replace(/(?:[_-])([a-z0-9])/g,(t,e)=>e.toUpperCase())}function mx(r){return Bx(r.replace(/--/g,"-").replace(/__/g,"_"))}function Wc(r){return r.charAt(0).toUpperCase()+r.slice(1)}function gI(r){return r.replace(/([A-Z])/g,(t,e)=>`-${e.toLowerCase()}`)}function yG(r){return r.match(/[^\s]+/g)||[]}function lI(r){return r!=null}function gx(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var uI=["meta","ctrl","alt","shift"],yx=class{constructor(t,e,i,n){this.element=t,this.index=e,this.eventTarget=i.eventTarget||t,this.eventName=i.eventName||_G(t)||sv("missing event name"),this.eventOptions=i.eventOptions||{},this.identifier=i.identifier||sv("missing identifier"),this.methodName=i.methodName||sv("missing method name"),this.keyFilter=i.keyFilter||"",this.schema=n}static forToken(t,e){return new this(t.element,t.index,dG(t.content),e)}toString(){let t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(t){if(!this.keyFilter)return!1;let e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;let i=e.filter(n=>!uI.includes(n))[0];return i?(gx(this.keyMappings,i)||sv(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[i].toLowerCase()!==t.key.toLowerCase()):!1}shouldIgnoreMouseEvent(t){if(!this.keyFilter)return!1;let e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}get params(){let t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(let{name:i,value:n}of Array.from(this.element.attributes)){let a=i.match(e),o=a&&a[1];o&&(t[Bx(o)]=xG(n))}return t}get eventTargetName(){return gG(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(t,e){let[i,n,a,o]=uI.map(s=>e.includes(s));return t.metaKey!==i||t.ctrlKey!==n||t.altKey!==a||t.shiftKey!==o}},cI={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:r=>r.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function _G(r){let t=r.tagName.toLowerCase();if(t in cI)return cI[t](r)}function sv(r){throw new Error(r)}function xG(r){try{return JSON.parse(r)}catch{return r}}var _x=class{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){let e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){let t=this.controller[this.methodName];if(typeof t=="function")return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){let{element:e}=this.action,{actionDescriptorFilters:i}=this.context.application,{controller:n}=this.context,a=!0;for(let[o,s]of Object.entries(this.eventOptions))if(o in i){let l=i[o];a=a&&l({name:o,value:s,event:t,element:e,controller:n})}else continue;return a}prepareActionEvent(t){return Object.assign(t,{params:this.action.params})}invokeWithEvent(t){let{target:e,currentTarget:i}=t;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:i,action:this.methodName})}catch(n){let{identifier:a,controller:o,element:s,index:l}=this,u={identifier:a,controller:o,element:s,index:l,event:t};this.context.handleError(n,`invoking action "${this.action}"`,u)}}willBeInvokedByEvent(t){let e=t.target;return t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t)||t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t)?!1:this.element===e?!0:e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}},lv=class{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver(i=>this.processMutations(i))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){let t=new Set(this.matchElementsInTree());for(let e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(let e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(let e of t)this.processMutation(e)}processMutation(t){t.type=="attributes"?this.processAttributeChange(t.target,t.attributeName):t.type=="childList"&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}processRemovedNodes(t){for(let e of Array.from(t)){let i=this.elementFromNode(e);i&&this.processTree(i,this.removeElement)}}processAddedNodes(t){for(let e of Array.from(t)){let i=this.elementFromNode(e);i&&this.elementIsActive(i)&&this.processTree(i,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(let i of this.matchElementsInTree(t))e.call(this,i)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected!=this.element.isConnected?!1:this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}},uv=class{constructor(t,e,i){this.attributeName=e,this.delegate=i,this.elementObserver=new lv(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){let e=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(this.selector));return e.concat(i)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}};function bG(r,t,e){yI(r,t).add(e)}function SG(r,t,e){yI(r,t).delete(e),wG(r,t)}function yI(r,t){let e=r.get(t);return e||(e=new Set,r.set(t,e)),e}function wG(r,t){let e=r.get(t);e!=null&&e.size==0&&r.delete(t)}var On=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,i)=>e.concat(Array.from(i)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,i)=>e+i.size,0)}add(t,e){bG(this.valuesByKey,t,e)}delete(t,e){SG(this.valuesByKey,t,e)}has(t,e){let i=this.valuesByKey.get(t);return i!=null&&i.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some(i=>i.has(t))}getValuesForKey(t){let e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter(([e,i])=>i.has(t)).map(([e,i])=>e)}};var xx=class{constructor(t,e,i,n){this._selector=e,this.details=n,this.elementObserver=new lv(t,this),this.delegate=i,this.matchesByElement=new On}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(t){this._selector=t,this.refresh()}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){let{selector:e}=this;if(e){let i=t.matches(e);return this.delegate.selectorMatchElement?i&&this.delegate.selectorMatchElement(t,this.details):i}else return!1}matchElementsInTree(t){let{selector:e}=this;if(e){let i=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(e)).filter(a=>this.matchElement(a));return i.concat(n)}else return[]}elementMatched(t){let{selector:e}=this;e&&this.selectorMatched(t,e)}elementUnmatched(t){let e=this.matchesByElement.getKeysForValue(t);for(let i of e)this.selectorUnmatched(t,i)}elementAttributeChanged(t,e){let{selector:i}=this;if(i){let n=this.matchElement(t),a=this.matchesByElement.has(i,t);n&&!a?this.selectorMatched(t,i):!n&&a&&this.selectorUnmatched(t,i)}}selectorMatched(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}selectorUnmatched(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}},bx=class{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(i=>this.processMutations(i))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(let t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(let e of t)this.processMutation(e)}processMutation(t){let e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){let i=this.delegate.getStringMapKeyForAttribute(t);if(i!=null){this.stringMap.has(t)||this.stringMapKeyAdded(i,t);let n=this.element.getAttribute(t);if(this.stringMap.get(t)!=n&&this.stringMapValueChanged(n,i,e),n==null){let a=this.stringMap.get(t);this.stringMap.delete(t),a&&this.stringMapKeyRemoved(i,t,a)}else this.stringMap.set(t,n)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,i){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,i)}stringMapKeyRemoved(t,e,i){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,i)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(t=>t.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},cv=class{constructor(t,e,i){this.attributeObserver=new uv(t,e,this),this.delegate=i,this.tokensByElement=new On}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){let[e,i]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(i)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach(e=>this.tokenMatched(e))}tokensUnmatched(t){t.forEach(e=>this.tokenUnmatched(e))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){let e=this.tokensByElement.getValuesForKey(t),i=this.readTokensForElement(t),n=CG(e,i).findIndex(([a,o])=>!AG(a,o));return n==-1?[[],[]]:[e.slice(n),i.slice(n)]}readTokensForElement(t){let e=this.attributeName,i=t.getAttribute(e)||"";return TG(i,t,e)}};function TG(r,t,e){return r.trim().split(/\s+/).filter(i=>i.length).map((i,n)=>({element:t,attributeName:e,content:i,index:n}))}function CG(r,t){let e=Math.max(r.length,t.length);return Array.from({length:e},(i,n)=>[r[n],t[n]])}function AG(r,t){return r&&t&&r.index==t.index&&r.content==t.content}var fv=class{constructor(t,e,i){this.tokenListObserver=new cv(t,e,this),this.delegate=i,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){let{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).set(t,i),this.delegate.elementMatchedValue(e,i))}tokenUnmatched(t){let{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,i))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(e){return{error:e}}}},Sx=class{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new fv(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){let e=new _x(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){let e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach(t=>this.delegate.bindingDisconnected(t,!0)),this.bindingsByAction.clear()}parseValueForToken(t){let e=yx.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}},Tx=class{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new bx(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){let i=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,i.writer(this.receiver[t]),i.writer(i.defaultValue))}stringMapValueChanged(t,e,i){let n=this.valueDescriptorNameMap[e];t!==null&&(i===null&&(i=n.writer(n.defaultValue)),this.invokeChangedCallback(e,t,i))}stringMapKeyRemoved(t,e,i){let n=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,n.writer(this.receiver[t]),i):this.invokeChangedCallback(t,n.writer(n.defaultValue),i)}invokeChangedCallbacksForDefaultValues(){for(let{key:t,name:e,defaultValue:i,writer:n}of this.valueDescriptors)i!=null&&!this.controller.data.has(t)&&this.invokeChangedCallback(e,n(i),void 0)}invokeChangedCallback(t,e,i){let n=`${t}Changed`,a=this.receiver[n];if(typeof a=="function"){let o=this.valueDescriptorNameMap[t];try{let s=o.reader(e),l=i;i&&(l=o.reader(i)),a.call(this.receiver,s,l)}catch(s){throw s instanceof TypeError&&(s.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${s.message}`),s}}}get valueDescriptors(){let{valueDescriptorMap:t}=this;return Object.keys(t).map(e=>t[e])}get valueDescriptorNameMap(){let t={};return Object.keys(this.valueDescriptorMap).forEach(e=>{let i=this.valueDescriptorMap[e];t[i.name]=i}),t}hasValue(t){let e=this.valueDescriptorNameMap[t],i=`has${Wc(e.name)}`;return this.receiver[i]}},Cx=class{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new On}start(){this.tokenListObserver||(this.tokenListObserver=new cv(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var i;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),(i=this.tokenListObserver)===null||i===void 0||i.pause(()=>this.delegate.targetConnected(t,e)))}disconnectTarget(t,e){var i;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),(i=this.tokenListObserver)===null||i===void 0||i.pause(()=>this.delegate.targetDisconnected(t,e)))}disconnectAllTargets(){for(let t of this.targetsByName.keys)for(let e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function Zc(r,t){let e=_I(r);return Array.from(e.reduce((i,n)=>(EG(n,t).forEach(a=>i.add(a)),i),new Set))}function DG(r,t){return _I(r).reduce((i,n)=>(i.push(...MG(n,t)),i),[])}function _I(r){let t=[];for(;r;)t.push(r),r=Object.getPrototypeOf(r);return t.reverse()}function EG(r,t){let e=r[t];return Array.isArray(e)?e:[]}function MG(r,t){let e=r[t];return e?Object.keys(e).map(i=>[i,e[i]]):[]}var Ax=class{constructor(t,e){this.started=!1,this.context=t,this.delegate=e,this.outletsByName=new On,this.outletElementsByName=new On,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(t=>{this.setupSelectorObserverForOutlet(t),this.setupAttributeObserverForOutlet(t)}),this.started=!0,this.dependentContexts.forEach(t=>t.refresh()))}refresh(){this.selectorObserverMap.forEach(t=>t.refresh()),this.attributeObserverMap.forEach(t=>t.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(t=>t.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(t=>t.stop()),this.attributeObserverMap.clear())}selectorMatched(t,e,{outletName:i}){let n=this.getOutlet(t,i);n&&this.connectOutlet(n,t,i)}selectorUnmatched(t,e,{outletName:i}){let n=this.getOutletFromMap(t,i);n&&this.disconnectOutlet(n,t,i)}selectorMatchElement(t,{outletName:e}){let i=this.selector(e),n=this.hasOutlet(t,e),a=t.matches(`[${this.schema.controllerAttribute}~=${e}]`);return i?n&&a&&t.matches(i):!1}elementMatchedAttribute(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementAttributeValueChanged(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementUnmatchedAttribute(t,e){let i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}connectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)||(this.outletsByName.add(i,t),this.outletElementsByName.add(i,e),(n=this.selectorObserverMap.get(i))===null||n===void 0||n.pause(()=>this.delegate.outletConnected(t,e,i)))}disconnectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)&&(this.outletsByName.delete(i,t),this.outletElementsByName.delete(i,e),(n=this.selectorObserverMap.get(i))===null||n===void 0||n.pause(()=>this.delegate.outletDisconnected(t,e,i)))}disconnectAllOutlets(){for(let t of this.outletElementsByName.keys)for(let e of this.outletElementsByName.getValuesForKey(t))for(let i of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(i,e,t)}updateSelectorObserverForOutlet(t){let e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}setupSelectorObserverForOutlet(t){let e=this.selector(t),i=new xx(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,i),i.start()}setupAttributeObserverForOutlet(t){let e=this.attributeNameForOutletName(t),i=new uv(this.scope.element,e,this);this.attributeObserverMap.set(t,i),i.start()}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}attributeNameForOutletName(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}getOutletNameFromOutletAttributeName(t){return this.outletDefinitions.find(e=>this.attributeNameForOutletName(e)===t)}get outletDependencies(){let t=new On;return this.router.modules.forEach(e=>{let i=e.definition.controllerConstructor;Zc(i,"outlets").forEach(a=>t.add(a,e.identifier))}),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let t=this.dependentControllerIdentifiers;return this.router.contexts.filter(e=>t.includes(e.identifier))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find(i=>i.element===t)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},Dx=class{constructor(t,e){this.logDebugActivity=(i,n={})=>{let{identifier:a,controller:o,element:s}=this;n=Object.assign({identifier:a,controller:o,element:s},n),this.application.logDebugActivity(this.identifier,i,n)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new Sx(this,this.dispatcher),this.valueObserver=new Tx(this,this.controller),this.targetObserver=new Cx(this,this),this.outletObserver=new Ax(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(i){this.handleError(i,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,i={}){let{identifier:n,controller:a,element:o}=this;i=Object.assign({identifier:n,controller:a,element:o},i),this.application.handleError(t,`Error ${e}`,i)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,i){this.invokeControllerMethod(`${mx(i)}OutletConnected`,t,e)}outletDisconnected(t,e,i){this.invokeControllerMethod(`${mx(i)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){let i=this.controller;typeof i[t]=="function"&&i[t](...e)}};function OG(r){return IG(r,LG(r))}function IG(r,t){let e=RG(r),i=PG(r.prototype,t);return Object.defineProperties(e.prototype,i),e}function LG(r){return Zc(r,"blessings").reduce((e,i)=>{let n=i(r);for(let a in n){let o=e[a]||{};e[a]=Object.assign(o,n[a])}return e},{})}function PG(r,t){return kG(t).reduce((e,i)=>{let n=NG(r,t,i);return n&&Object.assign(e,{[i]:n}),e},{})}function NG(r,t,e){let i=Object.getOwnPropertyDescriptor(r,e);if(!(i&&"value"in i)){let a=Object.getOwnPropertyDescriptor(t,e).value;return i&&(a.get=i.get||a.get,a.set=i.set||a.set),a}}var kG=typeof Object.getOwnPropertySymbols=="function"?r=>[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)]:Object.getOwnPropertyNames,RG=(()=>{function r(e){function i(){return Reflect.construct(e,arguments,new.target)}return i.prototype=Object.create(e.prototype,{constructor:{value:i}}),Reflect.setPrototypeOf(i,e),i}function t(){let i=r(function(){this.a.call(this)});return i.prototype.a=function(){},new i}try{return t(),r}catch{return i=>class extends i{}}})();function FG(r){return{identifier:r.identifier,controllerConstructor:OG(r.controllerConstructor)}}var Ex=class{constructor(t,e){this.application=t,this.definition=FG(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){let e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){let e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new Dx(this,t),this.contextsByScope.set(t,e)),e}},Mx=class{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){let e=this.data.get(this.getDataKey(t))||"";return yG(e)}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}},Ox=class{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){let e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){let i=this.getAttributeNameForKey(t);return this.element.setAttribute(i,e),this.get(t)}has(t){let e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){let e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}else return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${gI(t)}`}},Ix=class{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,i){let n=this.warnedKeysByObject.get(t);n||(n=new Set,this.warnedKeysByObject.set(t,n)),n.has(e)||(n.add(e),this.logger.warn(i,t))}};function Lx(r,t){return`[${r}~="${t}"]`}var Px=class{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,i)=>e||this.findTarget(i)||this.findLegacyTarget(i),void 0)}findAll(...t){return t.reduce((e,i)=>[...e,...this.findAllTargets(i),...this.findAllLegacyTargets(i)],[])}findTarget(t){let e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){let e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){let e=this.schema.targetAttributeForScope(this.identifier);return Lx(e,t)}findLegacyTarget(t){let e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){let e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map(i=>this.deprecate(i,t))}getLegacySelectorForTargetName(t){let e=`${this.identifier}.${t}`;return Lx(this.schema.targetAttribute,e)}deprecate(t,e){if(t){let{identifier:i}=this,n=this.schema.targetAttribute,a=this.schema.targetAttributeForScope(i);this.guide.warn(t,`target:${e}`,`Please replace ${n}="${i}.${e}" with ${a}="${e}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}},Nx=class{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,i)=>e||this.findOutlet(i),void 0)}findAll(...t){return t.reduce((e,i)=>[...e,...this.findAllOutlets(i)],[])}getSelectorForOutletName(t){let e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){let e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){let e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter(n=>this.matchesElement(n,t,e))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter(n=>this.matchesElement(n,t,e))}matchesElement(t,e,i){let n=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&n.split(" ").includes(i)}},kx=class r{constructor(t,e,i,n){this.targets=new Px(this),this.classes=new Mx(this),this.data=new Ox(this),this.containsElement=a=>a.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=i,this.guide=new Ix(n),this.outlets=new Nx(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return Lx(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new r(this.schema,document.documentElement,this.identifier,this.guide.logger)}},Rx=class{constructor(t,e,i){this.element=t,this.schema=e,this.delegate=i,this.valueListObserver=new fv(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){let{element:e,content:i}=t;return this.parseValueForElementAndIdentifier(e,i)}parseValueForElementAndIdentifier(t,e){let i=this.fetchScopesByIdentifierForElement(t),n=i.get(e);return n||(n=this.delegate.createScopeForElementAndIdentifier(t,e),i.set(e,n)),n}elementMatchedValue(t,e){let i=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,i),i==1&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){let i=this.scopeReferenceCounts.get(e);i&&(this.scopeReferenceCounts.set(e,i-1),i==1&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}},Fx=class{constructor(t){this.application=t,this.scopeObserver=new Rx(this.element,this.schema,this),this.scopesByIdentifier=new On,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((t,e)=>t.concat(e.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);let e=new Ex(this.application,t);this.connectModule(e);let i=t.controllerConstructor.afterLoad;i&&i.call(t.controllerConstructor,t.identifier,this.application)}unloadIdentifier(t){let e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){let i=this.modulesByIdentifier.get(e);if(i)return i.contexts.find(n=>n.element==t)}proposeToConnectScopeForElementAndIdentifier(t,e){let i=this.scopeObserver.parseValueForElementAndIdentifier(t,e);i?this.scopeObserver.elementMatchedValue(i.element,i):console.error(`Couldn't find or create scope for identifier: "${e}" and element:`,t)}handleError(t,e,i){this.application.handleError(t,e,i)}createScopeForElementAndIdentifier(t,e){return new kx(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);let e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);let e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(i=>t.connectContextForScope(i))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(i=>t.disconnectContextForScope(i))}},BG={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:r=>`data-${r}-target`,outletAttributeForScope:(r,t)=>`data-${r}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},fI("abcdefghijklmnopqrstuvwxyz".split("").map(r=>[r,r]))),fI("0123456789".split("").map(r=>[r,r])))};function fI(r){return r.reduce((t,[e,i])=>Object.assign(Object.assign({},t),{[e]:i}),{})}var hv=class{constructor(t=document.documentElement,e=BG){this.logger=console,this.debug=!1,this.logDebugActivity=(i,n,a={})=>{this.debug&&this.logFormattedMessage(i,n,a)},this.element=t,this.schema=e,this.dispatcher=new vx(this),this.router=new Fx(this),this.actionDescriptorFilters=Object.assign({},hG)}static start(t,e){let i=new this(t,e);return i.start(),i}async start(){await zG(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(n=>{n.controllerConstructor.shouldLoad&&this.router.loadDefinition(n)})}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(n=>this.router.unloadIdentifier(n))}get controllers(){return this.router.contexts.map(t=>t.controller)}getControllerForElementAndIdentifier(t,e){let i=this.router.getContextForElementAndIdentifier(t,e);return i?i.controller:null}handleError(t,e,i){var n;this.logger.error(`%s
|
|
21
21
|
|
|
22
22
|
%o
|
|
23
23
|
|
|
24
|
-
%o`,e,t,i),(n=window.onerror)===null||n===void 0||n.call(window,e,"",0,0,t)}logFormattedMessage(t,e,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}};function zG(){return new Promise(r=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>r()):r()})}function VG(r){return Zc(r,"classes").reduce((e,i)=>Object.assign(e,UG(i)),{})}function UG(r){return{[`${r}Class`]:{get(){let{classes:t}=this;if(t.has(r))return t.get(r);{let e=t.getAttributeName(r);throw new Error(`Missing attribute "${e}"`)}}},[`${r}Classes`]:{get(){return this.classes.getAll(r)}},[`has${Wc(r)}Class`]:{get(){return this.classes.has(r)}}}}function HG(r){return Zc(r,"outlets").reduce((e,i)=>Object.assign(e,GG(i)),{})}function hI(r,t,e){return r.application.getControllerForElementAndIdentifier(t,e)}function pI(r,t,e){let i=hI(r,t,e);if(i||(r.application.router.proposeToConnectScopeForElementAndIdentifier(t,e),i=hI(r,t,e),i))return i}function GG(r){let t=mx(r);return{[`${t}Outlet`]:{get(){let e=this.outlets.find(r),i=this.outlets.getSelectorForOutletName(r);if(e){let n=pI(this,e,r);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${r}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${r}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${t}Outlets`]:{get(){let e=this.outlets.findAll(r);return e.length>0?e.map(i=>{let n=pI(this,i,r);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${r}" instance for host controller "${this.identifier}"`,i)}).filter(i=>i):[]}},[`${t}OutletElement`]:{get(){let e=this.outlets.find(r),i=this.outlets.getSelectorForOutletName(r);if(e)return e;throw new Error(`Missing outlet element "${r}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(r)}},[`has${Wc(t)}Outlet`]:{get(){return this.outlets.has(r)}}}}function YG(r){return Zc(r,"targets").reduce((e,i)=>Object.assign(e,WG(i)),{})}function WG(r){return{[`${r}Target`]:{get(){let t=this.targets.find(r);if(t)return t;throw new Error(`Missing target element "${r}" for "${this.identifier}" controller`)}},[`${r}Targets`]:{get(){return this.targets.findAll(r)}},[`has${Wc(r)}Target`]:{get(){return this.targets.has(r)}}}}function ZG(r){let t=DG(r,"values"),e={valueDescriptorMap:{get(){return t.reduce((i,n)=>{let a=xI(n,this.identifier),o=this.data.getAttributeNameForKey(a.key);return Object.assign(i,{[o]:a})},{})}}};return t.reduce((i,n)=>Object.assign(i,XG(n)),e)}function XG(r,t){let e=xI(r,t),{key:i,name:n,reader:a,writer:o}=e;return{[n]:{get(){let s=this.data.get(i);return s!==null?a(s):e.defaultValue},set(s){s===void 0?this.data.delete(i):this.data.set(i,o(s))}},[`has${Wc(n)}`]:{get(){return this.data.has(i)||e.hasCustomDefaultValue}}}}function xI([r,t],e){return jG({controller:e,token:r,typeDefinition:t})}function pv(r){switch(r){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function Yc(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(r))return"array";if(Object.prototype.toString.call(r)==="[object Object]")return"object"}function KG(r){let{controller:t,token:e,typeObject:i}=r,n=lI(i.type),a=lI(i.default),o=n&&a,s=n&&!a,l=!n&&a,u=pv(i.type),c=Yc(r.typeObject.default);if(s)return u;if(l)return c;if(u!==c){let f=t?`${t}.${e}`:e;throw new Error(`The specified default value for the Stimulus Value "${f}" must match the defined type "${u}". The provided default value of "${i.default}" is of type "${c}".`)}if(o)return u}function qG(r){let{controller:t,token:e,typeDefinition:i}=r,a=KG({controller:t,token:e,typeObject:i}),o=Yc(i),s=pv(i),l=a||o||s;if(l)return l;let u=t?`${t}.${i}`:e;throw new Error(`Unknown value type "${u}" for "${e}" value`)}function $G(r){let t=pv(r);if(t)return dI[t];let e=gx(r,"default"),i=gx(r,"type"),n=r;if(e)return n.default;if(i){let{type:a}=n,o=pv(a);if(o)return dI[o]}return r}function jG(r){let{token:t,typeDefinition:e}=r,i=`${gI(t)}-value`,n=qG(r);return{type:n,key:i,name:Bx(i),get defaultValue(){return $G(e)},get hasCustomDefaultValue(){return Yc(e)!==void 0},reader:JG[n],writer:vI[n]||vI.default}}var dI={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},JG={array(r){let t=JSON.parse(r);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${r}" of type "${Yc(t)}"`);return t},boolean(r){return!(r=="0"||String(r).toLowerCase()=="false")},number(r){return Number(r.replace(/_/g,""))},object(r){let t=JSON.parse(r);if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${r}" of type "${Yc(t)}"`);return t},string(r){return r}},vI={default:QG,array:mI,object:mI};function mI(r){return JSON.stringify(r)}function QG(r){return`${r}`}var xe=class{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:i={},prefix:n=this.identifier,bubbles:a=!0,cancelable:o=!0}={}){let s=n?`${n}:${t}`:t,l=new CustomEvent(s,{detail:i,bubbles:a,cancelable:o});return e.dispatchEvent(l),l}};xe.blessings=[VG,YG,ZG,HG];xe.targets=[];xe.outlets=[];xe.values={};var Xc=class extends xe{show(r){this.menuTarget.style.setProperty("--context-menu-x",`${r.clientX-5}px`),this.menuTarget.style.setProperty("--context-menu-y",`${r.clientY-5}px`),this.menuTarget.classList.add("positioned"),setTimeout(()=>this.menuTarget.showPopover(),150)}};se(Xc,"targets",["menu"]);var dv=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ya={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(r){return typeof console<"u"&&console.warn(r)},getWeek:function(r){var t=new Date(r.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var vv={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(r){var t=r%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},mv=vv;var Wt=function(r,t){return t===void 0&&(t=2),("000"+r).slice(t*-1)},mr=function(r){return r===!0?1:0};function zx(r,t){var e;return function(){var i=this,n=arguments;clearTimeout(e),e=setTimeout(function(){return r.apply(i,n)},t)}}var gv=function(r){return r instanceof Array?r:[r]};function Zt(r,t,e){if(e===!0)return r.classList.add(t);r.classList.remove(t)}function Fe(r,t,e){var i=window.document.createElement(r);return t=t||"",e=e||"",i.className=t,e!==void 0&&(i.textContent=e),i}function Kc(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Vx(r,t){if(t(r))return r;if(r.parentNode)return Vx(r.parentNode,t)}function qc(r,t){var e=Fe("div","numInputWrapper"),i=Fe("input","numInput "+r),n=Fe("span","arrowUp"),a=Fe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),t!==void 0)for(var o in t)i.setAttribute(o,t[o]);return e.appendChild(i),e.appendChild(n),e.appendChild(a),e}function gr(r){try{if(typeof r.composedPath=="function"){var t=r.composedPath();return t[0]}return r.target}catch{return r.target}}var Ux=function(){},$c=function(r,t,e){return e.months[t?"shorthand":"longhand"][r]},bI={D:Ux,F:function(r,t,e){r.setMonth(e.months.longhand.indexOf(t))},G:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},H:function(r,t){r.setHours(parseFloat(t))},J:function(r,t){r.setDate(parseFloat(t))},K:function(r,t,e){r.setHours(r.getHours()%12+12*mr(new RegExp(e.amPM[1],"i").test(t)))},M:function(r,t,e){r.setMonth(e.months.shorthand.indexOf(t))},S:function(r,t){r.setSeconds(parseFloat(t))},U:function(r,t){return new Date(parseFloat(t)*1e3)},W:function(r,t,e){var i=parseInt(t),n=new Date(r.getFullYear(),0,2+(i-1)*7,0,0,0,0);return n.setDate(n.getDate()-n.getDay()+e.firstDayOfWeek),n},Y:function(r,t){r.setFullYear(parseFloat(t))},Z:function(r,t){return new Date(t)},d:function(r,t){r.setDate(parseFloat(t))},h:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},i:function(r,t){r.setMinutes(parseFloat(t))},j:function(r,t){r.setDate(parseFloat(t))},l:Ux,m:function(r,t){r.setMonth(parseFloat(t)-1)},n:function(r,t){r.setMonth(parseFloat(t)-1)},s:function(r,t){r.setSeconds(parseFloat(t))},u:function(r,t){return new Date(parseFloat(t))},w:Ux,y:function(r,t){r.setFullYear(2e3+parseFloat(t))}},In={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Sl={Z:function(r){return r.toISOString()},D:function(r,t,e){return t.weekdays.shorthand[Sl.w(r,t,e)]},F:function(r,t,e){return $c(Sl.n(r,t,e)-1,!1,t)},G:function(r,t,e){return Wt(Sl.h(r,t,e))},H:function(r){return Wt(r.getHours())},J:function(r,t){return t.ordinal!==void 0?r.getDate()+t.ordinal(r.getDate()):r.getDate()},K:function(r,t){return t.amPM[mr(r.getHours()>11)]},M:function(r,t){return $c(r.getMonth(),!0,t)},S:function(r){return Wt(r.getSeconds())},U:function(r){return r.getTime()/1e3},W:function(r,t,e){return e.getWeek(r)},Y:function(r){return Wt(r.getFullYear(),4)},d:function(r){return Wt(r.getDate())},h:function(r){return r.getHours()%12?r.getHours()%12:12},i:function(r){return Wt(r.getMinutes())},j:function(r){return r.getDate()},l:function(r,t){return t.weekdays.longhand[r.getDay()]},m:function(r){return Wt(r.getMonth()+1)},n:function(r){return r.getMonth()+1},s:function(r){return r.getSeconds()},u:function(r){return r.getTime()},w:function(r){return r.getDay()},y:function(r){return String(r.getFullYear()).substring(2)}};var Hx=function(r){var t=r.config,e=t===void 0?ya:t,i=r.l10n,n=i===void 0?vv:i,a=r.isMobile,o=a===void 0?!1:a;return function(s,l,u){var c=u||n;return e.formatDate!==void 0&&!o?e.formatDate(s,l,c):l.split("").map(function(f,h,p){return Sl[f]&&p[h-1]!=="\\"?Sl[f](s,c,e):f!=="\\"?f:""}).join("")}},yv=function(r){var t=r.config,e=t===void 0?ya:t,i=r.l10n,n=i===void 0?vv:i;return function(a,o,s,l){if(!(a!==0&&!a)){var u=l||n,c,f=a;if(a instanceof Date)c=new Date(a.getTime());else if(typeof a!="string"&&a.toFixed!==void 0)c=new Date(a);else if(typeof a=="string"){var h=o||(e||ya).dateFormat,p=String(a).trim();if(p==="today")c=new Date,s=!0;else if(e&&e.parseDate)c=e.parseDate(a,h);else if(/Z$/.test(p)||/GMT$/.test(p))c=new Date(a);else{for(var d=void 0,v=[],m=0,g=0,y="";m<h.length;m++){var _=h[m],x=_==="\\",b=h[m-1]==="\\"||x;if(In[_]&&!b){y+=In[_];var S=new RegExp(y).exec(a);S&&(d=!0)&&v[_!=="Y"?"push":"unshift"]({fn:bI[_],val:S[++g]})}else x||(y+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),v.forEach(function(T){var A=T.fn,E=T.val;return c=A(c,E,u)||c}),c=d?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&c.setHours(0,0,0,0),c}}};function yr(r,t,e){return e===void 0&&(e=!0),e!==!1?new Date(r.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):r.getTime()-t.getTime()}var SI=function(r,t,e){return r>Math.min(t,e)&&r<Math.max(t,e)},_v=function(r,t,e){return r*3600+t*60+e},wI=function(r){var t=Math.floor(r/3600),e=(r-t*3600)/60;return[t,e,r-t*3600-e*60]},TI={DAY:864e5};function xv(r){var t=r.defaultHour,e=r.defaultMinute,i=r.defaultSeconds;if(r.minDate!==void 0){var n=r.minDate.getHours(),a=r.minDate.getMinutes(),o=r.minDate.getSeconds();t<n&&(t=n),t===n&&e<a&&(e=a),t===n&&e===a&&i<o&&(i=r.minDate.getSeconds())}if(r.maxDate!==void 0){var s=r.maxDate.getHours(),l=r.maxDate.getMinutes();t=Math.min(t,s),t===s&&(e=Math.min(l,e)),t===s&&e===l&&(i=r.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!r)throw TypeError("Cannot convert undefined or null to object");for(var i=function(s){s&&Object.keys(s).forEach(function(l){return r[l]=s[l]})},n=0,a=t;n<a.length;n++){var o=a[n];i(o)}return r});var Xt=function(){return Xt=Object.assign||function(r){for(var t,e=1,i=arguments.length;e<i;e++){t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Xt.apply(this,arguments)},CI=function(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var i=Array(r),n=0,t=0;t<e;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i},e5=300;function t5(r,t){var e={config:Xt(Xt({},ya),xt.defaultConfig),l10n:mv};e.parseDate=yv({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=v,e._setHoursFromDate=h,e._positionCalendar=pf,e.changeMonth=ie,e.changeYear=vt,e.clear=pe,e.close=de,e.onMouseOver=Ie,e._createElement=Fe,e.createDay=S,e.destroy=te,e.isEnabled=bt,e.jumpToDate=y,e.updateValue=ji,e.open=Nt,e.redraw=eb,e.set=fL,e.setDate=hL,e.toggle=mL;function i(){e.utils={getDaysInMonth:function(C,D){return C===void 0&&(C=e.currentMonth),D===void 0&&(D=e.currentYear),C===1&&(D%4===0&&D%100!==0||D%400===0)?29:e.l10n.daysInMonth[C]}}}function n(){e.element=e.input=r,e.isOpen=!1,hf(),Qx(),dL(),pL(),i(),e.isMobile||b(),g(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&h(e.config.noCalendar?e.latestSelectedDateObj:void 0),ji(!1)),s();var C=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&C&&pf(),tt("onReady")}function a(){var C;return((C=e.calendarContainer)===null||C===void 0?void 0:C.getRootNode()).activeElement||document.activeElement}function o(C){return C.bind(e)}function s(){var C=e.config;C.weekNumbers===!1&&C.showMonths===1||C.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var D=(e.days.offsetWidth+1)*C.showMonths;e.daysContainer.style.width=D+"px",e.calendarContainer.style.width=D+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(C){if(e.selectedDates.length===0){var D=e.config.minDate===void 0||yr(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),P=xv(e.config);D.setHours(P.hours,P.minutes,P.seconds,D.getMilliseconds()),e.selectedDates=[D],e.latestSelectedDateObj=D}C!==void 0&&C.type!=="blur"&&_L(C);var R=e._input.value;f(),ji(),e._input.value!==R&&e._debouncedChange()}function u(C,D){return C%12+12*mr(D===e.l10n.amPM[1])}function c(C){switch(C%24){case 0:case 12:return 12;default:return C%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var C=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,D=(parseInt(e.minuteElement.value,10)||0)%60,P=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(C=u(C,e.amPM.textContent));var R=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&yr(e.latestSelectedDateObj,e.config.minDate,!0)===0,X=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&yr(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var Q=_v(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),Me=_v(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),le=_v(C,D,P);if(le>Me&&le<Q){var Ne=wI(Q);C=Ne[0],D=Ne[1],P=Ne[2]}}else{if(X){var ae=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;C=Math.min(C,ae.getHours()),C===ae.getHours()&&(D=Math.min(D,ae.getMinutes())),D===ae.getMinutes()&&(P=Math.min(P,ae.getSeconds()))}if(R){var be=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;C=Math.max(C,be.getHours()),C===be.getHours()&&D<be.getMinutes()&&(D=be.getMinutes()),D===be.getMinutes()&&(P=Math.max(P,be.getSeconds()))}}p(C,D,P)}}function h(C){var D=C||e.latestSelectedDateObj;D&&D instanceof Date&&p(D.getHours(),D.getMinutes(),D.getSeconds())}function p(C,D,P){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(C%24,D,P||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Wt(e.config.time_24hr?C:(12+C)%12+12*mr(C%12===0)),e.minuteElement.value=Wt(D),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[mr(C>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Wt(P)))}function d(C){var D=gr(C),P=parseInt(D.value)+(C.delta||0);(P/1e3>1||C.key==="Enter"&&!/[^\d]/.test(P.toString()))&&vt(P)}function v(C,D,P,R){if(D instanceof Array)return D.forEach(function(X){return v(C,X,P,R)});if(C instanceof Array)return C.forEach(function(X){return v(X,D,P,R)});C.addEventListener(D,P,R),e._handlers.push({remove:function(){return C.removeEventListener(D,P,R)}})}function m(){tt("onChange")}function g(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(P){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+P+"]"),function(R){return v(R,"click",e[P])})}),e.isMobile){vL();return}var C=zx($i,50);if(e._debouncedChange=zx(m,e5),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&v(e.daysContainer,"mouseover",function(P){e.config.mode==="range"&&Ie(gr(P))}),v(e._input,"keydown",Ce),e.calendarContainer!==void 0&&v(e.calendarContainer,"keydown",Ce),!e.config.inline&&!e.config.static&&v(window,"resize",C),window.ontouchstart!==void 0?v(window.document,"touchstart",Pe):v(window.document,"mousedown",Pe),v(window.document,"focus",Pe,{capture:!0}),e.config.clickOpens===!0&&(v(e._input,"focus",e.open),v(e._input,"click",e.open)),e.daysContainer!==void 0&&(v(e.monthNav,"click",yL),v(e.monthNav,["keyup","increment"],d),v(e.daysContainer,"click",tb)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var D=function(P){return gr(P).select()};v(e.timeContainer,["increment"],l),v(e.timeContainer,"blur",l,{capture:!0}),v(e.timeContainer,"click",_),v([e.hourElement,e.minuteElement],["focus","click"],D),e.secondElement!==void 0&&v(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&v(e.amPM,"click",function(P){l(P)})}e.config.allowInput&&v(e._input,"blur",ut)}function y(C,D){var P=C!==void 0?e.parseDate(C):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),R=e.currentYear,X=e.currentMonth;try{P!==void 0&&(e.currentYear=P.getFullYear(),e.currentMonth=P.getMonth())}catch(Q){Q.message="Invalid date supplied: "+P,e.config.errorHandler(Q)}D&&e.currentYear!==R&&(tt("onYearChange"),I()),D&&(e.currentYear!==R||e.currentMonth!==X)&&tt("onMonthChange"),e.redraw()}function _(C){var D=gr(C);~D.className.indexOf("arrow")&&x(C,D.classList.contains("arrowUp")?1:-1)}function x(C,D,P){var R=C&&gr(C),X=P||R&&R.parentNode&&R.parentNode.firstChild,Q=Lv("increment");Q.delta=D,X&&X.dispatchEvent(Q)}function b(){var C=window.document.createDocumentFragment();if(e.calendarContainer=Fe("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(C.appendChild(V()),e.innerContainer=Fe("div","flatpickr-innerContainer"),e.config.weekNumbers){var D=oe(),P=D.weekWrapper,R=D.weekNumbers;e.innerContainer.appendChild(P),e.weekNumbers=R,e.weekWrapper=P}e.rContainer=Fe("div","flatpickr-rContainer"),e.rContainer.appendChild(G()),e.daysContainer||(e.daysContainer=Fe("div","flatpickr-days"),e.daysContainer.tabIndex=-1),L(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),C.appendChild(e.innerContainer)}e.config.enableTime&&C.appendChild(q()),Zt(e.calendarContainer,"rangeMode",e.config.mode==="range"),Zt(e.calendarContainer,"animate",e.config.animate===!0),Zt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(C);var X=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!X&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var Q=Fe("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(Q,e.element),Q.appendChild(e.element),e.altInput&&Q.appendChild(e.altInput),Q.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function S(C,D,P,R){var X=bt(D,!0),Q=Fe("span",C,D.getDate().toString());return Q.dateObj=D,Q.$i=R,Q.setAttribute("aria-label",e.formatDate(D,e.config.ariaDateFormat)),C.indexOf("hidden")===-1&&yr(D,e.now)===0&&(e.todayDateElem=Q,Q.classList.add("today"),Q.setAttribute("aria-current","date")),X?(Q.tabIndex=-1,Pv(D)&&(Q.classList.add("selected"),e.selectedDateElem=Q,e.config.mode==="range"&&(Zt(Q,"startRange",e.selectedDates[0]&&yr(D,e.selectedDates[0],!0)===0),Zt(Q,"endRange",e.selectedDates[1]&&yr(D,e.selectedDates[1],!0)===0),C==="nextMonthDay"&&Q.classList.add("inRange")))):Q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&gL(D)&&!Pv(D)&&Q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&C!=="prevMonthDay"&&R%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(D)+"</span>"),tt("onDayCreate",Q),Q}function T(C){C.focus(),e.config.mode==="range"&&Ie(C)}function A(C){for(var D=C>0?0:e.config.showMonths-1,P=C>0?e.config.showMonths:-1,R=D;R!=P;R+=C)for(var X=e.daysContainer.children[R],Q=C>0?0:X.children.length-1,Me=C>0?X.children.length:-1,le=Q;le!=Me;le+=C){var Ne=X.children[le];if(Ne.className.indexOf("hidden")===-1&&bt(Ne.dateObj))return Ne}}function E(C,D){for(var P=C.className.indexOf("Month")===-1?C.dateObj.getMonth():e.currentMonth,R=D>0?e.config.showMonths:-1,X=D>0?1:-1,Q=P-e.currentMonth;Q!=R;Q+=X)for(var Me=e.daysContainer.children[Q],le=P-e.currentMonth===Q?C.$i+D:D<0?Me.children.length-1:0,Ne=Me.children.length,ae=le;ae>=0&&ae<Ne&&ae!=(D>0?Ne:-1);ae+=X){var be=Me.children[ae];if(be.className.indexOf("hidden")===-1&&bt(be.dateObj)&&Math.abs(C.$i-ae)>=Math.abs(D))return T(be)}e.changeMonth(X),M(A(X),0)}function M(C,D){var P=a(),R=ze(P||document.body),X=C!==void 0?C:R?P:e.selectedDateElem!==void 0&&ze(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&ze(e.todayDateElem)?e.todayDateElem:A(D>0?1:-1);X===void 0?e._input.focus():R?E(X,D):T(X)}function O(C,D){for(var P=(new Date(C,D,1).getDay()-e.l10n.firstDayOfWeek+7)%7,R=e.utils.getDaysInMonth((D-1+12)%12,C),X=e.utils.getDaysInMonth(D,C),Q=window.document.createDocumentFragment(),Me=e.config.showMonths>1,le=Me?"prevMonthDay hidden":"prevMonthDay",Ne=Me?"nextMonthDay hidden":"nextMonthDay",ae=R+1-P,be=0;ae<=R;ae++,be++)Q.appendChild(S("flatpickr-day "+le,new Date(C,D-1,ae),ae,be));for(ae=1;ae<=X;ae++,be++)Q.appendChild(S("flatpickr-day",new Date(C,D,ae),ae,be));for(var Ye=X+1;Ye<=42-P&&(e.config.showMonths===1||be%7!==0);Ye++,be++)Q.appendChild(S("flatpickr-day "+Ne,new Date(C,D+1,Ye%X),Ye,be));var Di=Fe("div","dayContainer");return Di.appendChild(Q),Di}function L(){if(e.daysContainer!==void 0){Kc(e.daysContainer),e.weekNumbers&&Kc(e.weekNumbers);for(var C=document.createDocumentFragment(),D=0;D<e.config.showMonths;D++){var P=new Date(e.currentYear,e.currentMonth,1);P.setMonth(e.currentMonth+D),C.appendChild(O(P.getFullYear(),P.getMonth()))}e.daysContainer.appendChild(C),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Ie()}}function I(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var C=function(R){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&R<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&R>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var D=0;D<12;D++)if(C(D)){var P=Fe("option","flatpickr-monthDropdown-month");P.value=new Date(e.currentYear,D).getMonth().toString(),P.textContent=$c(D,e.config.shorthandCurrentMonth,e.l10n),P.tabIndex=-1,e.currentMonth===D&&(P.selected=!0),e.monthsDropdownContainer.appendChild(P)}}}function k(){var C=Fe("div","flatpickr-month"),D=window.document.createDocumentFragment(),P;e.config.showMonths>1||e.config.monthSelectorType==="static"?P=Fe("span","cur-month"):(e.monthsDropdownContainer=Fe("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),v(e.monthsDropdownContainer,"change",function(Me){var le=gr(Me),Ne=parseInt(le.value,10);e.changeMonth(Ne-e.currentMonth),tt("onMonthChange")}),I(),P=e.monthsDropdownContainer);var R=qc("cur-year",{tabindex:"-1"}),X=R.getElementsByTagName("input")[0];X.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&X.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(X.setAttribute("max",e.config.maxDate.getFullYear().toString()),X.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var Q=Fe("div","flatpickr-current-month");return Q.appendChild(P),Q.appendChild(R),D.appendChild(Q),C.appendChild(D),{container:C,yearElement:X,monthElement:P}}function z(){Kc(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var C=e.config.showMonths;C--;){var D=k();e.yearElements.push(D.yearElement),e.monthElements.push(D.monthElement),e.monthNav.appendChild(D.container)}e.monthNav.appendChild(e.nextMonthNav)}function V(){return e.monthNav=Fe("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Fe("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Fe("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,z(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(C){e.__hidePrevMonthArrow!==C&&(Zt(e.prevMonthNav,"flatpickr-disabled",C),e.__hidePrevMonthArrow=C)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(C){e.__hideNextMonthArrow!==C&&(Zt(e.nextMonthNav,"flatpickr-disabled",C),e.__hideNextMonthArrow=C)}}),e.currentYearElement=e.yearElements[0],vf(),e.monthNav}function q(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var C=xv(e.config);e.timeContainer=Fe("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var D=Fe("span","flatpickr-time-separator",":"),P=qc("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=P.getElementsByTagName("input")[0];var R=qc("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=R.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?C.hours:c(C.hours)),e.minuteElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():C.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(P),e.timeContainer.appendChild(D),e.timeContainer.appendChild(R),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var X=qc("flatpickr-second");e.secondElement=X.getElementsByTagName("input")[0],e.secondElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():C.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Fe("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(X)}return e.config.time_24hr||(e.amPM=Fe("span","flatpickr-am-pm",e.l10n.amPM[mr((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function G(){e.weekdayContainer?Kc(e.weekdayContainer):e.weekdayContainer=Fe("div","flatpickr-weekdays");for(var C=e.config.showMonths;C--;){var D=Fe("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(D)}return $(),e.weekdayContainer}function $(){if(e.weekdayContainer){var C=e.l10n.firstDayOfWeek,D=CI(e.l10n.weekdays.shorthand);C>0&&C<D.length&&(D=CI(D.splice(C,D.length),D.splice(0,C)));for(var P=e.config.showMonths;P--;)e.weekdayContainer.children[P].innerHTML=`
|
|
24
|
+
%o`,e,t,i),(n=window.onerror)===null||n===void 0||n.call(window,e,"",0,0,t)}logFormattedMessage(t,e,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}};function zG(){return new Promise(r=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>r()):r()})}function VG(r){return Zc(r,"classes").reduce((e,i)=>Object.assign(e,UG(i)),{})}function UG(r){return{[`${r}Class`]:{get(){let{classes:t}=this;if(t.has(r))return t.get(r);{let e=t.getAttributeName(r);throw new Error(`Missing attribute "${e}"`)}}},[`${r}Classes`]:{get(){return this.classes.getAll(r)}},[`has${Wc(r)}Class`]:{get(){return this.classes.has(r)}}}}function HG(r){return Zc(r,"outlets").reduce((e,i)=>Object.assign(e,GG(i)),{})}function hI(r,t,e){return r.application.getControllerForElementAndIdentifier(t,e)}function pI(r,t,e){let i=hI(r,t,e);if(i||(r.application.router.proposeToConnectScopeForElementAndIdentifier(t,e),i=hI(r,t,e),i))return i}function GG(r){let t=mx(r);return{[`${t}Outlet`]:{get(){let e=this.outlets.find(r),i=this.outlets.getSelectorForOutletName(r);if(e){let n=pI(this,e,r);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${r}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${r}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${t}Outlets`]:{get(){let e=this.outlets.findAll(r);return e.length>0?e.map(i=>{let n=pI(this,i,r);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${r}" instance for host controller "${this.identifier}"`,i)}).filter(i=>i):[]}},[`${t}OutletElement`]:{get(){let e=this.outlets.find(r),i=this.outlets.getSelectorForOutletName(r);if(e)return e;throw new Error(`Missing outlet element "${r}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(r)}},[`has${Wc(t)}Outlet`]:{get(){return this.outlets.has(r)}}}}function YG(r){return Zc(r,"targets").reduce((e,i)=>Object.assign(e,WG(i)),{})}function WG(r){return{[`${r}Target`]:{get(){let t=this.targets.find(r);if(t)return t;throw new Error(`Missing target element "${r}" for "${this.identifier}" controller`)}},[`${r}Targets`]:{get(){return this.targets.findAll(r)}},[`has${Wc(r)}Target`]:{get(){return this.targets.has(r)}}}}function ZG(r){let t=DG(r,"values"),e={valueDescriptorMap:{get(){return t.reduce((i,n)=>{let a=xI(n,this.identifier),o=this.data.getAttributeNameForKey(a.key);return Object.assign(i,{[o]:a})},{})}}};return t.reduce((i,n)=>Object.assign(i,XG(n)),e)}function XG(r,t){let e=xI(r,t),{key:i,name:n,reader:a,writer:o}=e;return{[n]:{get(){let s=this.data.get(i);return s!==null?a(s):e.defaultValue},set(s){s===void 0?this.data.delete(i):this.data.set(i,o(s))}},[`has${Wc(n)}`]:{get(){return this.data.has(i)||e.hasCustomDefaultValue}}}}function xI([r,t],e){return $G({controller:e,token:r,typeDefinition:t})}function pv(r){switch(r){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function Yc(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(r))return"array";if(Object.prototype.toString.call(r)==="[object Object]")return"object"}function KG(r){let{controller:t,token:e,typeObject:i}=r,n=lI(i.type),a=lI(i.default),o=n&&a,s=n&&!a,l=!n&&a,u=pv(i.type),c=Yc(r.typeObject.default);if(s)return u;if(l)return c;if(u!==c){let f=t?`${t}.${e}`:e;throw new Error(`The specified default value for the Stimulus Value "${f}" must match the defined type "${u}". The provided default value of "${i.default}" is of type "${c}".`)}if(o)return u}function qG(r){let{controller:t,token:e,typeDefinition:i}=r,a=KG({controller:t,token:e,typeObject:i}),o=Yc(i),s=pv(i),l=a||o||s;if(l)return l;let u=t?`${t}.${i}`:e;throw new Error(`Unknown value type "${u}" for "${e}" value`)}function jG(r){let t=pv(r);if(t)return dI[t];let e=gx(r,"default"),i=gx(r,"type"),n=r;if(e)return n.default;if(i){let{type:a}=n,o=pv(a);if(o)return dI[o]}return r}function $G(r){let{token:t,typeDefinition:e}=r,i=`${gI(t)}-value`,n=qG(r);return{type:n,key:i,name:Bx(i),get defaultValue(){return jG(e)},get hasCustomDefaultValue(){return Yc(e)!==void 0},reader:JG[n],writer:vI[n]||vI.default}}var dI={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},JG={array(r){let t=JSON.parse(r);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${r}" of type "${Yc(t)}"`);return t},boolean(r){return!(r=="0"||String(r).toLowerCase()=="false")},number(r){return Number(r.replace(/_/g,""))},object(r){let t=JSON.parse(r);if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${r}" of type "${Yc(t)}"`);return t},string(r){return r}},vI={default:QG,array:mI,object:mI};function mI(r){return JSON.stringify(r)}function QG(r){return`${r}`}var xe=class{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:i={},prefix:n=this.identifier,bubbles:a=!0,cancelable:o=!0}={}){let s=n?`${n}:${t}`:t,l=new CustomEvent(s,{detail:i,bubbles:a,cancelable:o});return e.dispatchEvent(l),l}};xe.blessings=[VG,YG,ZG,HG];xe.targets=[];xe.outlets=[];xe.values={};var Xc=class extends xe{show(r){this.menuTarget.style.setProperty("--context-menu-x",`${r.clientX-5}px`),this.menuTarget.style.setProperty("--context-menu-y",`${r.clientY-5}px`),this.menuTarget.classList.add("positioned"),setTimeout(()=>this.menuTarget.showPopover(),150)}};se(Xc,"targets",["menu"]);var dv=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ya={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(r){return typeof console<"u"&&console.warn(r)},getWeek:function(r){var t=new Date(r.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var vv={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(r){var t=r%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},mv=vv;var Wt=function(r,t){return t===void 0&&(t=2),("000"+r).slice(t*-1)},mr=function(r){return r===!0?1:0};function zx(r,t){var e;return function(){var i=this,n=arguments;clearTimeout(e),e=setTimeout(function(){return r.apply(i,n)},t)}}var gv=function(r){return r instanceof Array?r:[r]};function Zt(r,t,e){if(e===!0)return r.classList.add(t);r.classList.remove(t)}function Fe(r,t,e){var i=window.document.createElement(r);return t=t||"",e=e||"",i.className=t,e!==void 0&&(i.textContent=e),i}function Kc(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Vx(r,t){if(t(r))return r;if(r.parentNode)return Vx(r.parentNode,t)}function qc(r,t){var e=Fe("div","numInputWrapper"),i=Fe("input","numInput "+r),n=Fe("span","arrowUp"),a=Fe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),t!==void 0)for(var o in t)i.setAttribute(o,t[o]);return e.appendChild(i),e.appendChild(n),e.appendChild(a),e}function gr(r){try{if(typeof r.composedPath=="function"){var t=r.composedPath();return t[0]}return r.target}catch{return r.target}}var Ux=function(){},jc=function(r,t,e){return e.months[t?"shorthand":"longhand"][r]},bI={D:Ux,F:function(r,t,e){r.setMonth(e.months.longhand.indexOf(t))},G:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},H:function(r,t){r.setHours(parseFloat(t))},J:function(r,t){r.setDate(parseFloat(t))},K:function(r,t,e){r.setHours(r.getHours()%12+12*mr(new RegExp(e.amPM[1],"i").test(t)))},M:function(r,t,e){r.setMonth(e.months.shorthand.indexOf(t))},S:function(r,t){r.setSeconds(parseFloat(t))},U:function(r,t){return new Date(parseFloat(t)*1e3)},W:function(r,t,e){var i=parseInt(t),n=new Date(r.getFullYear(),0,2+(i-1)*7,0,0,0,0);return n.setDate(n.getDate()-n.getDay()+e.firstDayOfWeek),n},Y:function(r,t){r.setFullYear(parseFloat(t))},Z:function(r,t){return new Date(t)},d:function(r,t){r.setDate(parseFloat(t))},h:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},i:function(r,t){r.setMinutes(parseFloat(t))},j:function(r,t){r.setDate(parseFloat(t))},l:Ux,m:function(r,t){r.setMonth(parseFloat(t)-1)},n:function(r,t){r.setMonth(parseFloat(t)-1)},s:function(r,t){r.setSeconds(parseFloat(t))},u:function(r,t){return new Date(parseFloat(t))},w:Ux,y:function(r,t){r.setFullYear(2e3+parseFloat(t))}},In={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Sl={Z:function(r){return r.toISOString()},D:function(r,t,e){return t.weekdays.shorthand[Sl.w(r,t,e)]},F:function(r,t,e){return jc(Sl.n(r,t,e)-1,!1,t)},G:function(r,t,e){return Wt(Sl.h(r,t,e))},H:function(r){return Wt(r.getHours())},J:function(r,t){return t.ordinal!==void 0?r.getDate()+t.ordinal(r.getDate()):r.getDate()},K:function(r,t){return t.amPM[mr(r.getHours()>11)]},M:function(r,t){return jc(r.getMonth(),!0,t)},S:function(r){return Wt(r.getSeconds())},U:function(r){return r.getTime()/1e3},W:function(r,t,e){return e.getWeek(r)},Y:function(r){return Wt(r.getFullYear(),4)},d:function(r){return Wt(r.getDate())},h:function(r){return r.getHours()%12?r.getHours()%12:12},i:function(r){return Wt(r.getMinutes())},j:function(r){return r.getDate()},l:function(r,t){return t.weekdays.longhand[r.getDay()]},m:function(r){return Wt(r.getMonth()+1)},n:function(r){return r.getMonth()+1},s:function(r){return r.getSeconds()},u:function(r){return r.getTime()},w:function(r){return r.getDay()},y:function(r){return String(r.getFullYear()).substring(2)}};var Hx=function(r){var t=r.config,e=t===void 0?ya:t,i=r.l10n,n=i===void 0?vv:i,a=r.isMobile,o=a===void 0?!1:a;return function(s,l,u){var c=u||n;return e.formatDate!==void 0&&!o?e.formatDate(s,l,c):l.split("").map(function(f,h,p){return Sl[f]&&p[h-1]!=="\\"?Sl[f](s,c,e):f!=="\\"?f:""}).join("")}},yv=function(r){var t=r.config,e=t===void 0?ya:t,i=r.l10n,n=i===void 0?vv:i;return function(a,o,s,l){if(!(a!==0&&!a)){var u=l||n,c,f=a;if(a instanceof Date)c=new Date(a.getTime());else if(typeof a!="string"&&a.toFixed!==void 0)c=new Date(a);else if(typeof a=="string"){var h=o||(e||ya).dateFormat,p=String(a).trim();if(p==="today")c=new Date,s=!0;else if(e&&e.parseDate)c=e.parseDate(a,h);else if(/Z$/.test(p)||/GMT$/.test(p))c=new Date(a);else{for(var d=void 0,v=[],m=0,g=0,y="";m<h.length;m++){var _=h[m],x=_==="\\",b=h[m-1]==="\\"||x;if(In[_]&&!b){y+=In[_];var S=new RegExp(y).exec(a);S&&(d=!0)&&v[_!=="Y"?"push":"unshift"]({fn:bI[_],val:S[++g]})}else x||(y+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),v.forEach(function(T){var A=T.fn,E=T.val;return c=A(c,E,u)||c}),c=d?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&c.setHours(0,0,0,0),c}}};function yr(r,t,e){return e===void 0&&(e=!0),e!==!1?new Date(r.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):r.getTime()-t.getTime()}var SI=function(r,t,e){return r>Math.min(t,e)&&r<Math.max(t,e)},_v=function(r,t,e){return r*3600+t*60+e},wI=function(r){var t=Math.floor(r/3600),e=(r-t*3600)/60;return[t,e,r-t*3600-e*60]},TI={DAY:864e5};function xv(r){var t=r.defaultHour,e=r.defaultMinute,i=r.defaultSeconds;if(r.minDate!==void 0){var n=r.minDate.getHours(),a=r.minDate.getMinutes(),o=r.minDate.getSeconds();t<n&&(t=n),t===n&&e<a&&(e=a),t===n&&e===a&&i<o&&(i=r.minDate.getSeconds())}if(r.maxDate!==void 0){var s=r.maxDate.getHours(),l=r.maxDate.getMinutes();t=Math.min(t,s),t===s&&(e=Math.min(l,e)),t===s&&e===l&&(i=r.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!r)throw TypeError("Cannot convert undefined or null to object");for(var i=function(s){s&&Object.keys(s).forEach(function(l){return r[l]=s[l]})},n=0,a=t;n<a.length;n++){var o=a[n];i(o)}return r});var Xt=function(){return Xt=Object.assign||function(r){for(var t,e=1,i=arguments.length;e<i;e++){t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Xt.apply(this,arguments)},CI=function(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var i=Array(r),n=0,t=0;t<e;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i},e5=300;function t5(r,t){var e={config:Xt(Xt({},ya),xt.defaultConfig),l10n:mv};e.parseDate=yv({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=v,e._setHoursFromDate=h,e._positionCalendar=pf,e.changeMonth=ie,e.changeYear=vt,e.clear=pe,e.close=de,e.onMouseOver=Ie,e._createElement=Fe,e.createDay=S,e.destroy=te,e.isEnabled=bt,e.jumpToDate=y,e.updateValue=$i,e.open=Nt,e.redraw=eb,e.set=fL,e.setDate=hL,e.toggle=mL;function i(){e.utils={getDaysInMonth:function(C,D){return C===void 0&&(C=e.currentMonth),D===void 0&&(D=e.currentYear),C===1&&(D%4===0&&D%100!==0||D%400===0)?29:e.l10n.daysInMonth[C]}}}function n(){e.element=e.input=r,e.isOpen=!1,hf(),Qx(),dL(),pL(),i(),e.isMobile||b(),g(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&h(e.config.noCalendar?e.latestSelectedDateObj:void 0),$i(!1)),s();var C=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&C&&pf(),tt("onReady")}function a(){var C;return((C=e.calendarContainer)===null||C===void 0?void 0:C.getRootNode()).activeElement||document.activeElement}function o(C){return C.bind(e)}function s(){var C=e.config;C.weekNumbers===!1&&C.showMonths===1||C.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var D=(e.days.offsetWidth+1)*C.showMonths;e.daysContainer.style.width=D+"px",e.calendarContainer.style.width=D+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(C){if(e.selectedDates.length===0){var D=e.config.minDate===void 0||yr(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),P=xv(e.config);D.setHours(P.hours,P.minutes,P.seconds,D.getMilliseconds()),e.selectedDates=[D],e.latestSelectedDateObj=D}C!==void 0&&C.type!=="blur"&&_L(C);var R=e._input.value;f(),$i(),e._input.value!==R&&e._debouncedChange()}function u(C,D){return C%12+12*mr(D===e.l10n.amPM[1])}function c(C){switch(C%24){case 0:case 12:return 12;default:return C%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var C=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,D=(parseInt(e.minuteElement.value,10)||0)%60,P=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(C=u(C,e.amPM.textContent));var R=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&yr(e.latestSelectedDateObj,e.config.minDate,!0)===0,X=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&yr(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var Q=_v(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),Me=_v(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),le=_v(C,D,P);if(le>Me&&le<Q){var Ne=wI(Q);C=Ne[0],D=Ne[1],P=Ne[2]}}else{if(X){var ae=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;C=Math.min(C,ae.getHours()),C===ae.getHours()&&(D=Math.min(D,ae.getMinutes())),D===ae.getMinutes()&&(P=Math.min(P,ae.getSeconds()))}if(R){var be=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;C=Math.max(C,be.getHours()),C===be.getHours()&&D<be.getMinutes()&&(D=be.getMinutes()),D===be.getMinutes()&&(P=Math.max(P,be.getSeconds()))}}p(C,D,P)}}function h(C){var D=C||e.latestSelectedDateObj;D&&D instanceof Date&&p(D.getHours(),D.getMinutes(),D.getSeconds())}function p(C,D,P){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(C%24,D,P||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Wt(e.config.time_24hr?C:(12+C)%12+12*mr(C%12===0)),e.minuteElement.value=Wt(D),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[mr(C>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Wt(P)))}function d(C){var D=gr(C),P=parseInt(D.value)+(C.delta||0);(P/1e3>1||C.key==="Enter"&&!/[^\d]/.test(P.toString()))&&vt(P)}function v(C,D,P,R){if(D instanceof Array)return D.forEach(function(X){return v(C,X,P,R)});if(C instanceof Array)return C.forEach(function(X){return v(X,D,P,R)});C.addEventListener(D,P,R),e._handlers.push({remove:function(){return C.removeEventListener(D,P,R)}})}function m(){tt("onChange")}function g(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(P){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+P+"]"),function(R){return v(R,"click",e[P])})}),e.isMobile){vL();return}var C=zx(ji,50);if(e._debouncedChange=zx(m,e5),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&v(e.daysContainer,"mouseover",function(P){e.config.mode==="range"&&Ie(gr(P))}),v(e._input,"keydown",Ce),e.calendarContainer!==void 0&&v(e.calendarContainer,"keydown",Ce),!e.config.inline&&!e.config.static&&v(window,"resize",C),window.ontouchstart!==void 0?v(window.document,"touchstart",Pe):v(window.document,"mousedown",Pe),v(window.document,"focus",Pe,{capture:!0}),e.config.clickOpens===!0&&(v(e._input,"focus",e.open),v(e._input,"click",e.open)),e.daysContainer!==void 0&&(v(e.monthNav,"click",yL),v(e.monthNav,["keyup","increment"],d),v(e.daysContainer,"click",tb)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var D=function(P){return gr(P).select()};v(e.timeContainer,["increment"],l),v(e.timeContainer,"blur",l,{capture:!0}),v(e.timeContainer,"click",_),v([e.hourElement,e.minuteElement],["focus","click"],D),e.secondElement!==void 0&&v(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&v(e.amPM,"click",function(P){l(P)})}e.config.allowInput&&v(e._input,"blur",ut)}function y(C,D){var P=C!==void 0?e.parseDate(C):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),R=e.currentYear,X=e.currentMonth;try{P!==void 0&&(e.currentYear=P.getFullYear(),e.currentMonth=P.getMonth())}catch(Q){Q.message="Invalid date supplied: "+P,e.config.errorHandler(Q)}D&&e.currentYear!==R&&(tt("onYearChange"),I()),D&&(e.currentYear!==R||e.currentMonth!==X)&&tt("onMonthChange"),e.redraw()}function _(C){var D=gr(C);~D.className.indexOf("arrow")&&x(C,D.classList.contains("arrowUp")?1:-1)}function x(C,D,P){var R=C&&gr(C),X=P||R&&R.parentNode&&R.parentNode.firstChild,Q=Lv("increment");Q.delta=D,X&&X.dispatchEvent(Q)}function b(){var C=window.document.createDocumentFragment();if(e.calendarContainer=Fe("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(C.appendChild(V()),e.innerContainer=Fe("div","flatpickr-innerContainer"),e.config.weekNumbers){var D=oe(),P=D.weekWrapper,R=D.weekNumbers;e.innerContainer.appendChild(P),e.weekNumbers=R,e.weekWrapper=P}e.rContainer=Fe("div","flatpickr-rContainer"),e.rContainer.appendChild(G()),e.daysContainer||(e.daysContainer=Fe("div","flatpickr-days"),e.daysContainer.tabIndex=-1),L(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),C.appendChild(e.innerContainer)}e.config.enableTime&&C.appendChild(q()),Zt(e.calendarContainer,"rangeMode",e.config.mode==="range"),Zt(e.calendarContainer,"animate",e.config.animate===!0),Zt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(C);var X=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!X&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var Q=Fe("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(Q,e.element),Q.appendChild(e.element),e.altInput&&Q.appendChild(e.altInput),Q.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function S(C,D,P,R){var X=bt(D,!0),Q=Fe("span",C,D.getDate().toString());return Q.dateObj=D,Q.$i=R,Q.setAttribute("aria-label",e.formatDate(D,e.config.ariaDateFormat)),C.indexOf("hidden")===-1&&yr(D,e.now)===0&&(e.todayDateElem=Q,Q.classList.add("today"),Q.setAttribute("aria-current","date")),X?(Q.tabIndex=-1,Pv(D)&&(Q.classList.add("selected"),e.selectedDateElem=Q,e.config.mode==="range"&&(Zt(Q,"startRange",e.selectedDates[0]&&yr(D,e.selectedDates[0],!0)===0),Zt(Q,"endRange",e.selectedDates[1]&&yr(D,e.selectedDates[1],!0)===0),C==="nextMonthDay"&&Q.classList.add("inRange")))):Q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&gL(D)&&!Pv(D)&&Q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&C!=="prevMonthDay"&&R%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(D)+"</span>"),tt("onDayCreate",Q),Q}function T(C){C.focus(),e.config.mode==="range"&&Ie(C)}function A(C){for(var D=C>0?0:e.config.showMonths-1,P=C>0?e.config.showMonths:-1,R=D;R!=P;R+=C)for(var X=e.daysContainer.children[R],Q=C>0?0:X.children.length-1,Me=C>0?X.children.length:-1,le=Q;le!=Me;le+=C){var Ne=X.children[le];if(Ne.className.indexOf("hidden")===-1&&bt(Ne.dateObj))return Ne}}function E(C,D){for(var P=C.className.indexOf("Month")===-1?C.dateObj.getMonth():e.currentMonth,R=D>0?e.config.showMonths:-1,X=D>0?1:-1,Q=P-e.currentMonth;Q!=R;Q+=X)for(var Me=e.daysContainer.children[Q],le=P-e.currentMonth===Q?C.$i+D:D<0?Me.children.length-1:0,Ne=Me.children.length,ae=le;ae>=0&&ae<Ne&&ae!=(D>0?Ne:-1);ae+=X){var be=Me.children[ae];if(be.className.indexOf("hidden")===-1&&bt(be.dateObj)&&Math.abs(C.$i-ae)>=Math.abs(D))return T(be)}e.changeMonth(X),M(A(X),0)}function M(C,D){var P=a(),R=ze(P||document.body),X=C!==void 0?C:R?P:e.selectedDateElem!==void 0&&ze(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&ze(e.todayDateElem)?e.todayDateElem:A(D>0?1:-1);X===void 0?e._input.focus():R?E(X,D):T(X)}function O(C,D){for(var P=(new Date(C,D,1).getDay()-e.l10n.firstDayOfWeek+7)%7,R=e.utils.getDaysInMonth((D-1+12)%12,C),X=e.utils.getDaysInMonth(D,C),Q=window.document.createDocumentFragment(),Me=e.config.showMonths>1,le=Me?"prevMonthDay hidden":"prevMonthDay",Ne=Me?"nextMonthDay hidden":"nextMonthDay",ae=R+1-P,be=0;ae<=R;ae++,be++)Q.appendChild(S("flatpickr-day "+le,new Date(C,D-1,ae),ae,be));for(ae=1;ae<=X;ae++,be++)Q.appendChild(S("flatpickr-day",new Date(C,D,ae),ae,be));for(var Ye=X+1;Ye<=42-P&&(e.config.showMonths===1||be%7!==0);Ye++,be++)Q.appendChild(S("flatpickr-day "+Ne,new Date(C,D+1,Ye%X),Ye,be));var Di=Fe("div","dayContainer");return Di.appendChild(Q),Di}function L(){if(e.daysContainer!==void 0){Kc(e.daysContainer),e.weekNumbers&&Kc(e.weekNumbers);for(var C=document.createDocumentFragment(),D=0;D<e.config.showMonths;D++){var P=new Date(e.currentYear,e.currentMonth,1);P.setMonth(e.currentMonth+D),C.appendChild(O(P.getFullYear(),P.getMonth()))}e.daysContainer.appendChild(C),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Ie()}}function I(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var C=function(R){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&R<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&R>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var D=0;D<12;D++)if(C(D)){var P=Fe("option","flatpickr-monthDropdown-month");P.value=new Date(e.currentYear,D).getMonth().toString(),P.textContent=jc(D,e.config.shorthandCurrentMonth,e.l10n),P.tabIndex=-1,e.currentMonth===D&&(P.selected=!0),e.monthsDropdownContainer.appendChild(P)}}}function k(){var C=Fe("div","flatpickr-month"),D=window.document.createDocumentFragment(),P;e.config.showMonths>1||e.config.monthSelectorType==="static"?P=Fe("span","cur-month"):(e.monthsDropdownContainer=Fe("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),v(e.monthsDropdownContainer,"change",function(Me){var le=gr(Me),Ne=parseInt(le.value,10);e.changeMonth(Ne-e.currentMonth),tt("onMonthChange")}),I(),P=e.monthsDropdownContainer);var R=qc("cur-year",{tabindex:"-1"}),X=R.getElementsByTagName("input")[0];X.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&X.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(X.setAttribute("max",e.config.maxDate.getFullYear().toString()),X.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var Q=Fe("div","flatpickr-current-month");return Q.appendChild(P),Q.appendChild(R),D.appendChild(Q),C.appendChild(D),{container:C,yearElement:X,monthElement:P}}function z(){Kc(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var C=e.config.showMonths;C--;){var D=k();e.yearElements.push(D.yearElement),e.monthElements.push(D.monthElement),e.monthNav.appendChild(D.container)}e.monthNav.appendChild(e.nextMonthNav)}function V(){return e.monthNav=Fe("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Fe("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Fe("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,z(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(C){e.__hidePrevMonthArrow!==C&&(Zt(e.prevMonthNav,"flatpickr-disabled",C),e.__hidePrevMonthArrow=C)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(C){e.__hideNextMonthArrow!==C&&(Zt(e.nextMonthNav,"flatpickr-disabled",C),e.__hideNextMonthArrow=C)}}),e.currentYearElement=e.yearElements[0],vf(),e.monthNav}function q(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var C=xv(e.config);e.timeContainer=Fe("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var D=Fe("span","flatpickr-time-separator",":"),P=qc("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=P.getElementsByTagName("input")[0];var R=qc("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=R.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?C.hours:c(C.hours)),e.minuteElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():C.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(P),e.timeContainer.appendChild(D),e.timeContainer.appendChild(R),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var X=qc("flatpickr-second");e.secondElement=X.getElementsByTagName("input")[0],e.secondElement.value=Wt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():C.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Fe("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(X)}return e.config.time_24hr||(e.amPM=Fe("span","flatpickr-am-pm",e.l10n.amPM[mr((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function G(){e.weekdayContainer?Kc(e.weekdayContainer):e.weekdayContainer=Fe("div","flatpickr-weekdays");for(var C=e.config.showMonths;C--;){var D=Fe("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(D)}return j(),e.weekdayContainer}function j(){if(e.weekdayContainer){var C=e.l10n.firstDayOfWeek,D=CI(e.l10n.weekdays.shorthand);C>0&&C<D.length&&(D=CI(D.splice(C,D.length),D.splice(0,C)));for(var P=e.config.showMonths;P--;)e.weekdayContainer.children[P].innerHTML=`
|
|
25
25
|
<span class='flatpickr-weekday'>
|
|
26
26
|
`+D.join("</span><span class='flatpickr-weekday'>")+`
|
|
27
27
|
</span>
|
|
28
|
-
`}}function oe(){e.calendarContainer.classList.add("hasWeeks");var C=Fe("div","flatpickr-weekwrapper");C.appendChild(Fe("span","flatpickr-weekday",e.l10n.weekAbbreviation));var D=Fe("div","flatpickr-weeks");return C.appendChild(D),{weekWrapper:C,weekNumbers:D}}function ie(C,D){D===void 0&&(D=!0);var P=D?C:C-e.currentMonth;P<0&&e._hidePrevMonthArrow===!0||P>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=P,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,tt("onYearChange"),I()),L(),tt("onMonthChange"),vf())}function pe(C,D){if(C===void 0&&(C=!0),D===void 0&&(D=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,D===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var P=xv(e.config),R=P.hours,X=P.minutes,Q=P.seconds;p(R,X,Q)}e.redraw(),C&&tt("onChange")}function de(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),tt("onClose")}function te(){e.config!==void 0&&tt("onDestroy");for(var C=e._handlers.length;C--;)e._handlers[C].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var D=e.calendarContainer.parentNode;if(D.lastChild&&D.removeChild(D.lastChild),D.parentNode){for(;D.firstChild;)D.parentNode.insertBefore(D.firstChild,D);D.parentNode.removeChild(D)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(P){try{delete e[P]}catch{}})}function Te(C){return e.calendarContainer.contains(C)}function Pe(C){if(e.isOpen&&!e.config.inline){var D=gr(C),P=Te(D),R=D===e.input||D===e.altInput||e.element.contains(D)||C.path&&C.path.indexOf&&(~C.path.indexOf(e.input)||~C.path.indexOf(e.altInput)),X=!R&&!P&&!Te(C.relatedTarget),Q=!e.config.ignoredFocusElements.some(function(Me){return Me.contains(D)});X&&Q&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function vt(C){if(!(!C||e.config.minDate&&C<e.config.minDate.getFullYear()||e.config.maxDate&&C>e.config.maxDate.getFullYear())){var D=C,P=e.currentYear!==D;e.currentYear=D||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),P&&(e.redraw(),tt("onYearChange"),I())}}function bt(C,D){var P;D===void 0&&(D=!0);var R=e.parseDate(C,void 0,D);if(e.config.minDate&&R&&yr(R,e.config.minDate,D!==void 0?D:!e.minDateHasTime)<0||e.config.maxDate&&R&&yr(R,e.config.maxDate,D!==void 0?D:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(R===void 0)return!1;for(var X=!!e.config.enable,Q=(P=e.config.enable)!==null&&P!==void 0?P:e.config.disable,Me=0,le=void 0;Me<Q.length;Me++){if(le=Q[Me],typeof le=="function"&&le(R))return X;if(le instanceof Date&&R!==void 0&&le.getTime()===R.getTime())return X;if(typeof le=="string"){var Ne=e.parseDate(le,void 0,!0);return Ne&&Ne.getTime()===R.getTime()?X:!X}else if(typeof le=="object"&&R!==void 0&&le.from&&le.to&&R.getTime()>=le.from.getTime()&&R.getTime()<=le.to.getTime())return X}return!X}function ze(C){return e.daysContainer!==void 0?C.className.indexOf("hidden")===-1&&C.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(C):!1}function ut(C){var D=C.target===e._input,P=e._input.value.trimEnd()!==Nv();D&&P&&!(C.relatedTarget&&Te(C.relatedTarget))&&e.setDate(e._input.value,!0,C.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Ce(C){var D=gr(C),P=e.config.wrap?r.contains(D):D===e._input,R=e.config.allowInput,X=e.isOpen&&(!R||!P),Q=e.config.inline&&P&&!R;if(C.keyCode===13&&P){if(R)return e.setDate(e._input.value,!0,D===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),D.blur();e.open()}else if(Te(D)||X||Q){var Me=!!e.timeContainer&&e.timeContainer.contains(D);switch(C.keyCode){case 13:Me?(C.preventDefault(),l(),Iv()):tb(C);break;case 27:C.preventDefault(),Iv();break;case 8:case 46:P&&!e.config.allowInput&&(C.preventDefault(),e.clear());break;case 37:case 39:if(!Me&&!P){C.preventDefault();var le=a();if(e.daysContainer!==void 0&&(R===!1||le&&ze(le))){var Ne=C.keyCode===39?1:-1;C.ctrlKey?(C.stopPropagation(),ie(Ne),M(A(1),0)):M(void 0,Ne)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:C.preventDefault();var ae=C.keyCode===40?1:-1;e.daysContainer&&D.$i!==void 0||D===e.input||D===e.altInput?C.ctrlKey?(C.stopPropagation(),vt(e.currentYear-ae),M(A(1),0)):Me||M(void 0,ae*7):D===e.currentYearElement?vt(e.currentYear-ae):e.config.enableTime&&(!Me&&e.hourElement&&e.hourElement.focus(),l(C),e._debouncedChange());break;case 9:if(Me){var be=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(br){return br}),Ye=be.indexOf(D);if(Ye!==-1){var Di=be[Ye+(C.shiftKey?-1:1)];C.preventDefault(),(Di||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(D)&&C.shiftKey&&(C.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&D===e.amPM)switch(C.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],f(),ji();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],f(),ji();break}(P||Te(D))&&tt("onKeyDown",C)}function Ie(C,D){if(D===void 0&&(D="flatpickr-day"),!(e.selectedDates.length!==1||C&&(!C.classList.contains(D)||C.classList.contains("flatpickr-disabled")))){for(var P=C?C.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),R=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),X=Math.min(P,e.selectedDates[0].getTime()),Q=Math.max(P,e.selectedDates[0].getTime()),Me=!1,le=0,Ne=0,ae=X;ae<Q;ae+=TI.DAY)bt(new Date(ae),!0)||(Me=Me||ae>X&&ae<Q,ae<R&&(!le||ae>le)?le=ae:ae>R&&(!Ne||ae<Ne)&&(Ne=ae));var be=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+D));be.forEach(function(Ye){var Di=Ye.dateObj,br=Di.getTime(),Gl=le>0&&br<le||Ne>0&&br>Ne;if(Gl){Ye.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ko){Ye.classList.remove(Ko)});return}else if(Me&&!Gl)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ko){Ye.classList.remove(Ko)}),C!==void 0&&(C.classList.add(P<=e.selectedDates[0].getTime()?"startRange":"endRange"),R<P&&br===R?Ye.classList.add("startRange"):R>P&&br===R&&Ye.classList.add("endRange"),br>=le&&(Ne===0||br<=Ne)&&SI(br,R,P)&&Ye.classList.add("inRange"))})}}function $i(){e.isOpen&&!e.config.static&&!e.config.inline&&pf()}function Nt(C,D){if(D===void 0&&(D=e._positionElement),e.isMobile===!0){if(C){C.preventDefault();var P=gr(C);P&&P.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),tt("onOpen");return}else if(e._input.disabled||e.config.inline)return;var R=e.isOpen;e.isOpen=!0,R||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),tt("onOpen"),pf(D)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(C===void 0||!e.timeContainer.contains(C.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function Hl(C){return function(D){var P=e.config["_"+C+"Date"]=e.parseDate(D,e.config.dateFormat),R=e.config["_"+(C==="min"?"max":"min")+"Date"];P!==void 0&&(e[C==="min"?"minDateHasTime":"maxDateHasTime"]=P.getHours()>0||P.getMinutes()>0||P.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(X){return bt(X)}),!e.selectedDates.length&&C==="min"&&h(P),ji()),e.daysContainer&&(eb(),P!==void 0?e.currentYearElement[C]=P.getFullYear().toString():e.currentYearElement.removeAttribute(C),e.currentYearElement.disabled=!!R&&P!==void 0&&R.getFullYear()===P.getFullYear())}}function hf(){var C=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],D=Xt(Xt({},JSON.parse(JSON.stringify(r.dataset||{}))),t),P={};e.config.parseDate=D.parseDate,e.config.formatDate=D.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(be){e.config._enable=ib(be)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(be){e.config._disable=ib(be)}});var R=D.mode==="time";if(!D.dateFormat&&(D.enableTime||R)){var X=xt.defaultConfig.dateFormat||ya.dateFormat;P.dateFormat=D.noCalendar||R?"H:i"+(D.enableSeconds?":S":""):X+" H:i"+(D.enableSeconds?":S":"")}if(D.altInput&&(D.enableTime||R)&&!D.altFormat){var Q=xt.defaultConfig.altFormat||ya.altFormat;P.altFormat=D.noCalendar||R?"h:i"+(D.enableSeconds?":S K":" K"):Q+(" h:i"+(D.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:Hl("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:Hl("max")});var Me=function(be){return function(Ye){e.config[be==="min"?"_minTime":"_maxTime"]=e.parseDate(Ye,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:Me("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:Me("max")}),D.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,P,D);for(var le=0;le<C.length;le++)e.config[C[le]]=e.config[C[le]]===!0||e.config[C[le]]==="true";dv.filter(function(be){return e.config[be]!==void 0}).forEach(function(be){e.config[be]=gv(e.config[be]||[]).map(o)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var le=0;le<e.config.plugins.length;le++){var Ne=e.config.plugins[le](e)||{};for(var ae in Ne)dv.indexOf(ae)>-1?e.config[ae]=gv(Ne[ae]).map(o).concat(e.config[ae]):typeof D[ae]>"u"&&(e.config[ae]=Ne[ae])}D.altInputClass||(e.config.altInputClass=Jx().className+" "+e.config.altInputClass),tt("onParseConfig")}function Jx(){return e.config.wrap?r.querySelector("[data-input]"):r}function Qx(){typeof e.config.locale!="object"&&typeof xt.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Xt(Xt({},xt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?xt.l10ns[e.config.locale]:void 0),In.D="("+e.l10n.weekdays.shorthand.join("|")+")",In.l="("+e.l10n.weekdays.longhand.join("|")+")",In.M="("+e.l10n.months.shorthand.join("|")+")",In.F="("+e.l10n.months.longhand.join("|")+")",In.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var C=Xt(Xt({},t),JSON.parse(JSON.stringify(r.dataset||{})));C.time_24hr===void 0&&xt.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Hx(e),e.parseDate=yv({config:e.config,l10n:e.l10n})}function pf(C){if(typeof e.config.position=="function")return void e.config.position(e,C);if(e.calendarContainer!==void 0){tt("onPreCalendarPosition");var D=C||e._positionElement,P=Array.prototype.reduce.call(e.calendarContainer.children,(function(DL,EL){return DL+EL.offsetHeight}),0),R=e.calendarContainer.offsetWidth,X=e.config.position.split(" "),Q=X[0],Me=X.length>1?X[1]:null,le=D.getBoundingClientRect(),Ne=window.innerHeight-le.bottom,ae=Q==="above"||Q!=="below"&&Ne<P&&le.top>P,be=window.pageYOffset+le.top+(ae?-P-2:D.offsetHeight+2);if(Zt(e.calendarContainer,"arrowTop",!ae),Zt(e.calendarContainer,"arrowBottom",ae),!e.config.inline){var Ye=window.pageXOffset+le.left,Di=!1,br=!1;Me==="center"?(Ye-=(R-le.width)/2,Di=!0):Me==="right"&&(Ye-=R-le.width,br=!0),Zt(e.calendarContainer,"arrowLeft",!Di&&!br),Zt(e.calendarContainer,"arrowCenter",Di),Zt(e.calendarContainer,"arrowRight",br);var Gl=window.document.body.offsetWidth-(window.pageXOffset+le.right),Ko=Ye+R>window.document.body.offsetWidth,xL=Gl+R>window.document.body.offsetWidth;if(Zt(e.calendarContainer,"rightMost",Ko),!e.config.static)if(e.calendarContainer.style.top=be+"px",!Ko)e.calendarContainer.style.left=Ye+"px",e.calendarContainer.style.right="auto";else if(!xL)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Gl+"px";else{var kv=uL();if(kv===void 0)return;var bL=window.document.body.offsetWidth,SL=Math.max(0,bL/2-R/2),wL=".flatpickr-calendar.centerMost:before",TL=".flatpickr-calendar.centerMost:after",CL=kv.cssRules.length,AL="{left:"+le.left+"px;right:auto;}";Zt(e.calendarContainer,"rightMost",!1),Zt(e.calendarContainer,"centerMost",!0),kv.insertRule(wL+","+TL+AL,CL),e.calendarContainer.style.left=SL+"px",e.calendarContainer.style.right="auto"}}}}function uL(){for(var C=null,D=0;D<document.styleSheets.length;D++){var P=document.styleSheets[D];if(P.cssRules){try{P.cssRules}catch{continue}C=P;break}}return C??cL()}function cL(){var C=document.createElement("style");return document.head.appendChild(C),C.sheet}function eb(){e.config.noCalendar||e.isMobile||(I(),vf(),L())}function Iv(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function tb(C){C.preventDefault(),C.stopPropagation();var D=function(be){return be.classList&&be.classList.contains("flatpickr-day")&&!be.classList.contains("flatpickr-disabled")&&!be.classList.contains("notAllowed")},P=Vx(gr(C),D);if(P!==void 0){var R=P,X=e.latestSelectedDateObj=new Date(R.dateObj.getTime()),Q=(X.getMonth()<e.currentMonth||X.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=R,e.config.mode==="single")e.selectedDates=[X];else if(e.config.mode==="multiple"){var Me=Pv(X);Me?e.selectedDates.splice(parseInt(Me),1):e.selectedDates.push(X)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=X,e.selectedDates.push(X),yr(X,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(be,Ye){return be.getTime()-Ye.getTime()}));if(f(),Q){var le=e.currentYear!==X.getFullYear();e.currentYear=X.getFullYear(),e.currentMonth=X.getMonth(),le&&(tt("onYearChange"),I()),tt("onMonthChange")}if(vf(),L(),ji(),!Q&&e.config.mode!=="range"&&e.config.showMonths===1?T(R):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Ne=e.config.mode==="single"&&!e.config.enableTime,ae=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Ne||ae)&&Iv()}m()}}var df={locale:[Qx,$],showMonths:[z,s,G],minDate:[y],maxDate:[y],positionElement:[nb],clickOpens:[function(){e.config.clickOpens===!0?(v(e._input,"focus",e.open),v(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function fL(C,D){if(C!==null&&typeof C=="object"){Object.assign(e.config,C);for(var P in C)df[P]!==void 0&&df[P].forEach(function(R){return R()})}else e.config[C]=D,df[C]!==void 0?df[C].forEach(function(R){return R()}):dv.indexOf(C)>-1&&(e.config[C]=gv(D));e.redraw(),ji(!0)}function rb(C,D){var P=[];if(C instanceof Array)P=C.map(function(R){return e.parseDate(R,D)});else if(C instanceof Date||typeof C=="number")P=[e.parseDate(C,D)];else if(typeof C=="string")switch(e.config.mode){case"single":case"time":P=[e.parseDate(C,D)];break;case"multiple":P=C.split(e.config.conjunction).map(function(R){return e.parseDate(R,D)});break;case"range":P=C.split(e.l10n.rangeSeparator).map(function(R){return e.parseDate(R,D)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(C)));e.selectedDates=e.config.allowInvalidPreload?P:P.filter(function(R){return R instanceof Date&&bt(R,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(R,X){return R.getTime()-X.getTime()})}function hL(C,D,P){if(D===void 0&&(D=!1),P===void 0&&(P=e.config.dateFormat),C!==0&&!C||C instanceof Array&&C.length===0)return e.clear(D);rb(C,P),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),y(void 0,D),h(),e.selectedDates.length===0&&e.clear(!1),ji(D),D&&tt("onChange")}function ib(C){return C.slice().map(function(D){return typeof D=="string"||typeof D=="number"||D instanceof Date?e.parseDate(D,void 0,!0):D&&typeof D=="object"&&D.from&&D.to?{from:e.parseDate(D.from,void 0),to:e.parseDate(D.to,void 0)}:D}).filter(function(D){return D})}function pL(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var C=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);C&&rb(C,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function dL(){if(e.input=Jx(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=Fe(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),nb()}function nb(){e._positionElement=e.config.positionElement||e._input}function vL(){var C=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=Fe("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=C,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=C==="datetime-local"?"Y-m-d\\TH:i:S":C==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}v(e.mobileInput,"change",function(D){e.setDate(gr(D).value,!1,e.mobileFormatStr),tt("onChange"),tt("onClose")})}function mL(C){if(e.isOpen===!0)return e.close();e.open(C)}function tt(C,D){if(e.config!==void 0){var P=e.config[C];if(P!==void 0&&P.length>0)for(var R=0;P[R]&&R<P.length;R++)P[R](e.selectedDates,e.input.value,e,D);C==="onChange"&&(e.input.dispatchEvent(Lv("change")),e.input.dispatchEvent(Lv("input")))}}function Lv(C){var D=document.createEvent("Event");return D.initEvent(C,!0,!0),D}function Pv(C){for(var D=0;D<e.selectedDates.length;D++){var P=e.selectedDates[D];if(P instanceof Date&&yr(P,C)===0)return""+D}return!1}function gL(C){return e.config.mode!=="range"||e.selectedDates.length<2?!1:yr(C,e.selectedDates[0])>=0&&yr(C,e.selectedDates[1])<=0}function vf(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(C,D){var P=new Date(e.currentYear,e.currentMonth,1);P.setMonth(e.currentMonth+D),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[D].textContent=$c(P.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=P.getMonth().toString(),C.value=P.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Nv(C){var D=C||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(P){return e.formatDate(P,D)}).filter(function(P,R,X){return e.config.mode!=="range"||e.config.enableTime||X.indexOf(P)===R}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function ji(C){C===void 0&&(C=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Nv(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Nv(e.config.altFormat)),C!==!1&&tt("onValueUpdate")}function yL(C){var D=gr(C),P=e.prevMonthNav.contains(D),R=e.nextMonthNav.contains(D);P||R?ie(P?-1:1):e.yearElements.indexOf(D)>=0?D.select():D.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):D.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function _L(C){C.preventDefault();var D=C.type==="keydown",P=gr(C),R=P;e.amPM!==void 0&&P===e.amPM&&(e.amPM.textContent=e.l10n.amPM[mr(e.amPM.textContent===e.l10n.amPM[0])]);var X=parseFloat(R.getAttribute("min")),Q=parseFloat(R.getAttribute("max")),Me=parseFloat(R.getAttribute("step")),le=parseInt(R.value,10),Ne=C.delta||(D?C.which===38?1:-1:0),ae=le+Me*Ne;if(typeof R.value<"u"&&R.value.length===2){var be=R===e.hourElement,Ye=R===e.minuteElement;ae<X?(ae=Q+ae+mr(!be)+(mr(be)&&mr(!e.amPM)),Ye&&x(void 0,-1,e.hourElement)):ae>Q&&(ae=R===e.hourElement?ae-Q-mr(!e.amPM):X,Ye&&x(void 0,1,e.hourElement)),e.amPM&&be&&(Me===1?ae+le===23:Math.abs(ae-le)>Me)&&(e.amPM.textContent=e.l10n.amPM[mr(e.amPM.textContent===e.l10n.amPM[0])]),R.value=Wt(ae)}}return n(),e}function wl(r,t){for(var e=Array.prototype.slice.call(r).filter(function(o){return o instanceof HTMLElement}),i=[],n=0;n<e.length;n++){var a=e[n];try{if(a.getAttribute("data-fp-omit")!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=t5(a,t||{}),i.push(a._flatpickr)}catch(o){console.error(o)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return wl(this,r)},HTMLElement.prototype.flatpickr=function(r){return wl([this],r)});var xt=function(r,t){return typeof r=="string"?wl(window.document.querySelectorAll(r),t):r instanceof Node?wl([r],t):wl(r,t)};xt.defaultConfig={};xt.l10ns={en:Xt({},mv),default:Xt({},mv)};xt.localize=function(r){xt.l10ns.default=Xt(Xt({},xt.l10ns.default),r)};xt.setDefaults=function(r){xt.defaultConfig=Xt(Xt({},xt.defaultConfig),r)};xt.parseDate=yv({});xt.formatDate=Hx({});xt.compareDates=yr;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return wl(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=xt);var bv=xt;var wi,AI,DI,EI,Gx,Tl=class extends xe{constructor(){super(...arguments);Ji(this,wi)}connect(){this.typeValue=="time"?this.flatpickr=bv(this.element,Bt(this,wi,AI)):this.typeValue=="datetime"?this.flatpickr=bv(this.element,Bt(this,wi,DI)):this.flatpickr=bv(this.element,Bt(this,wi,EI))}disconnect(){this.flatpickr.destroy()}};wi=new WeakSet,AI=function(){return{dateFormat:"H:i",enableTime:!0,noCalendar:!0}},DI=function(){return{...Bt(this,wi,Gx),altFormat:this.dateTimeFormatValue,dateFormat:"Y-m-d H:i",enableTime:!0}},EI=function(){return{...Bt(this,wi,Gx),altFormat:this.dateFormatValue,dateFormat:"Y-m-d"}},Gx=function(){return{altInput:!0,disable:this.disableValue,mode:this.modeValue,showMonths:this.showMonthsValue}},se(Tl,"targets",["details"]),se(Tl,"values",{type:String,disable:Array,mode:{type:String,default:"single"},showMonths:{type:Number,default:1},dateFormat:{type:String,default:"F d, Y"},dateTimeFormat:{type:String,default:"M d, Y h:i K"}});var jc=class extends xe{show(){this.menuTarget.show()}showModal(){this.menuTarget.showModal()}close(){this.menuTarget.close()}closeOnClickOutside({target:r}){r.nodeName==="DIALOG"&&this.close()}};se(jc,"targets",["menu"]);var Al,_r,MI,Sv,OI,II,LI,Cl=class extends xe{constructor(){super(...arguments);Ji(this,_r);Ji(this,Al)}initialize(){Yl(this,Al,new IntersectionObserver(xa(this,_r,MI).bind(this)))}connect(){Bt(this,Al).observe(this.element)}disconnect(){Bt(this,Al).disconnect()}prev(){this.indexValue>0&&(this.indexValue--,xa(this,_r,Sv).call(this))}next(){this.indexValue<Bt(this,_r,LI)&&(this.indexValue++,xa(this,_r,Sv).call(this))}};Al=new WeakMap,_r=new WeakSet,MI=function([t]){t.isIntersecting&&(this.indexValue=0,xa(this,_r,Sv).call(this))},Sv=function(){xa(this,_r,OI).call(this),xa(this,_r,II).call(this)},OI=function(){this.itemTargets.forEach((t,e)=>{t.tabIndex=e===this.indexValue?0:-1})},II=function(){this.itemTargets[this.indexValue].focus()},LI=function(){return this.itemTargets.length-1},se(Cl,"targets",["item"]),se(Cl,"values",{index:Number});var Dl=Math.min,Ln=Math.max,Qc=Math.round,ef=Math.floor,Ti=r=>({x:r,y:r}),r5={left:"right",right:"left",bottom:"top",top:"bottom"},i5={start:"end",end:"start"};function Yx(r,t,e){return Ln(r,Dl(t,e))}function tf(r,t){return typeof r=="function"?r(t):r}function _a(r){return r.split("-")[0]}function rf(r){return r.split("-")[1]}function Wx(r){return r==="x"?"y":"x"}function Zx(r){return r==="y"?"height":"width"}var n5=new Set(["top","bottom"]);function Pn(r){return n5.has(_a(r))?"y":"x"}function Xx(r){return Wx(Pn(r))}function kI(r,t,e){e===void 0&&(e=!1);let i=rf(r),n=Xx(r),a=Zx(n),o=n==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Jc(o)),[o,Jc(o)]}function RI(r){let t=Jc(r);return[wv(r),t,wv(t)]}function wv(r){return r.replace(/start|end/g,t=>i5[t])}var PI=["left","right"],NI=["right","left"],a5=["top","bottom"],o5=["bottom","top"];function s5(r,t,e){switch(r){case"top":case"bottom":return e?t?NI:PI:t?PI:NI;case"left":case"right":return t?a5:o5;default:return[]}}function FI(r,t,e,i){let n=rf(r),a=s5(_a(r),e==="start",i);return n&&(a=a.map(o=>o+"-"+n),t&&(a=a.concat(a.map(wv)))),a}function Jc(r){return r.replace(/left|right|bottom|top/g,t=>r5[t])}function l5(r){return{top:0,right:0,bottom:0,left:0,...r}}function BI(r){return typeof r!="number"?l5(r):{top:r,right:r,bottom:r,left:r}}function Yo(r){let{x:t,y:e,width:i,height:n}=r;return{width:i,height:n,top:e,left:t,right:t+i,bottom:e+n,x:t,y:e}}function zI(r,t,e){let{reference:i,floating:n}=r,a=Pn(t),o=Xx(t),s=Zx(o),l=_a(t),u=a==="y",c=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2,h=i[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-n.width,y:f};break;default:p={x:i.x,y:i.y}}switch(rf(t)){case"start":p[o]-=h*(e&&u?-1:1);break;case"end":p[o]+=h*(e&&u?-1:1);break}return p}var VI=async(r,t,e)=>{let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:o}=e,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t)),u=await o.getElementRects({reference:r,floating:t,strategy:n}),{x:c,y:f}=zI(u,i,l),h=i,p={},d=0;for(let v=0;v<s.length;v++){let{name:m,fn:g}=s[v],{x:y,y:_,data:x,reset:b}=await g({x:c,y:f,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:u,platform:o,elements:{reference:r,floating:t}});c=y??c,f=_??f,p={...p,[m]:{...p[m],...x}},b&&d<=50&&(d++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(u=b.rects===!0?await o.getElementRects({reference:r,floating:t,strategy:n}):b.rects),{x:c,y:f}=zI(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:n,middlewareData:p}};async function Kx(r,t){var e;t===void 0&&(t={});let{x:i,y:n,platform:a,rects:o,elements:s,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=tf(t,r),d=BI(p),m=s[h?f==="floating"?"reference":"floating":f],g=Yo(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(m)))==null||e?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},b=Yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:_,strategy:l}):y);return{top:(g.top-b.top+d.top)/x.y,bottom:(b.bottom-g.bottom+d.bottom)/x.y,left:(g.left-b.left+d.left)/x.x,right:(b.right-g.right+d.right)/x.x}}var UI=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(t){var e,i;let{placement:n,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:v=!0,...m}=tf(r,t);if((e=a.arrow)!=null&&e.alignmentOffset)return{};let g=_a(n),y=Pn(s),_=_a(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),b=h||(_||!v?[Jc(s)]:RI(s)),S=d!=="none";!h&&S&&b.push(...FI(s,v,d,x));let T=[s,...b],A=await Kx(t,m),E=[],M=((i=a.flip)==null?void 0:i.overflows)||[];if(c&&E.push(A[g]),f){let k=kI(n,o,x);E.push(A[k[0]],A[k[1]])}if(M=[...M,{placement:n,overflows:E}],!E.every(k=>k<=0)){var O,L;let k=(((O=a.flip)==null?void 0:O.index)||0)+1,z=T[k];if(z&&(!(f==="alignment"?y!==Pn(z):!1)||M.every(G=>G.overflows[0]>0&&Pn(G.placement)===y)))return{data:{index:k,overflows:M},reset:{placement:z}};let V=(L=M.filter(q=>q.overflows[0]<=0).sort((q,G)=>q.overflows[1]-G.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(p){case"bestFit":{var I;let q=(I=M.filter(G=>{if(S){let $=Pn(G.placement);return $===y||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,oe)=>$+oe,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:I[0];q&&(V=q);break}case"initialPlacement":V=s;break}if(n!==V)return{reset:{placement:V}}}return{}}}};var u5=new Set(["left","top"]);async function c5(r,t){let{placement:e,platform:i,elements:n}=r,a=await(i.isRTL==null?void 0:i.isRTL(n.floating)),o=_a(e),s=rf(e),l=Pn(e)==="y",u=u5.has(o)?-1:1,c=a&&l?-1:1,f=tf(t,r),{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof d=="number"&&(p=s==="end"?d*-1:d),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}var HI=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(t){var e,i;let{x:n,y:a,placement:o,middlewareData:s}=t,l=await c5(t,r);return o===((e=s.offset)==null?void 0:e.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:o}}}}},GI=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(t){let{x:e,y:i,placement:n}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:m=>{let{x:g,y}=m;return{x:g,y}}},...l}=tf(r,t),u={x:e,y:i},c=await Kx(t,l),f=Pn(_a(n)),h=Wx(f),p=u[h],d=u[f];if(a){let m=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=p+c[m],_=p-c[g];p=Yx(y,p,_)}if(o){let m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=d+c[m],_=d-c[g];d=Yx(y,d,_)}let v=s.fn({...t,[h]:p,[f]:d});return{...v,data:{x:v.x-e,y:v.y-i,enabled:{[h]:a,[f]:o}}}}}};function Tv(){return typeof window<"u"}function Wo(r){return WI(r)?(r.nodeName||"").toLowerCase():"#document"}function xr(r){var t;return(r==null||(t=r.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(r){var t;return(t=(WI(r)?r.ownerDocument:r.document)||window.document)==null?void 0:t.documentElement}function WI(r){return Tv()?r instanceof Node||r instanceof xr(r).Node:!1}function oi(r){return Tv()?r instanceof Element||r instanceof xr(r).Element:!1}function Ai(r){return Tv()?r instanceof HTMLElement||r instanceof xr(r).HTMLElement:!1}function YI(r){return!Tv()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof xr(r).ShadowRoot}var f5=new Set(["inline","contents"]);function Ml(r){let{overflow:t,overflowX:e,overflowY:i,display:n}=si(r);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&!f5.has(n)}var h5=new Set(["table","td","th"]);function ZI(r){return h5.has(Wo(r))}var p5=[":popover-open",":modal"];function nf(r){return p5.some(t=>{try{return r.matches(t)}catch{return!1}})}var d5=["transform","translate","scale","rotate","perspective"],v5=["transform","translate","scale","rotate","perspective","filter"],m5=["paint","layout","strict","content"];function Cv(r){let t=Av(),e=oi(r)?si(r):r;return d5.some(i=>e[i]?e[i]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||v5.some(i=>(e.willChange||"").includes(i))||m5.some(i=>(e.contain||"").includes(i))}function XI(r){let t=Nn(r);for(;Ai(t)&&!Zo(t);){if(Cv(t))return t;if(nf(t))return null;t=Nn(t)}return null}function Av(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var g5=new Set(["html","body","#document"]);function Zo(r){return g5.has(Wo(r))}function si(r){return xr(r).getComputedStyle(r)}function af(r){return oi(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Nn(r){if(Wo(r)==="html")return r;let t=r.assignedSlot||r.parentNode||YI(r)&&r.host||Ci(r);return YI(t)?t.host:t}function KI(r){let t=Nn(r);return Zo(t)?r.ownerDocument?r.ownerDocument.body:r.body:Ai(t)&&Ml(t)?t:KI(t)}function El(r,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let n=KI(r),a=n===((i=r.ownerDocument)==null?void 0:i.body),o=xr(n);if(a){let s=Dv(o);return t.concat(o,o.visualViewport||[],Ml(n)?n:[],s&&e?El(s):[])}return t.concat(n,El(n,[],e))}function Dv(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function jI(r){let t=si(r),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=Ai(r),a=n?r.offsetWidth:e,o=n?r.offsetHeight:i,s=Qc(e)!==a||Qc(i)!==o;return s&&(e=a,i=o),{width:e,height:i,$:s}}function $x(r){return oi(r)?r:r.contextElement}function Ol(r){let t=$x(r);if(!Ai(t))return Ti(1);let e=t.getBoundingClientRect(),{width:i,height:n,$:a}=jI(t),o=(a?Qc(e.width):e.width)/i,s=(a?Qc(e.height):e.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var y5=Ti(0);function JI(r){let t=xr(r);return!Av()||!t.visualViewport?y5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _5(r,t,e){return t===void 0&&(t=!1),!e||t&&e!==xr(r)?!1:t}function Xo(r,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let n=r.getBoundingClientRect(),a=$x(r),o=Ti(1);t&&(i?oi(i)&&(o=Ol(i)):o=Ol(r));let s=_5(a,e,i)?JI(a):Ti(0),l=(n.left+s.x)/o.x,u=(n.top+s.y)/o.y,c=n.width/o.x,f=n.height/o.y;if(a){let h=xr(a),p=i&&oi(i)?xr(i):i,d=h,v=Dv(d);for(;v&&i&&p!==d;){let m=Ol(v),g=v.getBoundingClientRect(),y=si(v),_=g.left+(v.clientLeft+parseFloat(y.paddingLeft))*m.x,x=g.top+(v.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,f*=m.y,l+=_,u+=x,d=xr(v),v=Dv(d)}}return Yo({width:c,height:f,x:l,y:u})}function jx(r,t){let e=af(r).scrollLeft;return t?t.left+e:Xo(Ci(r)).left+e}function QI(r,t,e){e===void 0&&(e=!1);let i=r.getBoundingClientRect(),n=i.left+t.scrollLeft-(e?0:jx(r,i)),a=i.top+t.scrollTop;return{x:n,y:a}}function x5(r){let{elements:t,rect:e,offsetParent:i,strategy:n}=r,a=n==="fixed",o=Ci(i),s=t?nf(t.floating):!1;if(i===o||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Ti(1),c=Ti(0),f=Ai(i);if((f||!f&&!a)&&((Wo(i)!=="body"||Ml(o))&&(l=af(i)),Ai(i))){let p=Xo(i);u=Ol(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}let h=o&&!f&&!a?QI(o,l,!0):Ti(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function b5(r){return Array.from(r.getClientRects())}function S5(r){let t=Ci(r),e=af(r),i=r.ownerDocument.body,n=Ln(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Ln(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+jx(r),s=-e.scrollTop;return si(i).direction==="rtl"&&(o+=Ln(t.clientWidth,i.clientWidth)-n),{width:n,height:a,x:o,y:s}}function w5(r,t){let e=xr(r),i=Ci(r),n=e.visualViewport,a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(n){a=n.width,o=n.height;let u=Av();(!u||u&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:a,height:o,x:s,y:l}}var T5=new Set(["absolute","fixed"]);function C5(r,t){let e=Xo(r,!0,t==="fixed"),i=e.top+r.clientTop,n=e.left+r.clientLeft,a=Ai(r)?Ol(r):Ti(1),o=r.clientWidth*a.x,s=r.clientHeight*a.y,l=n*a.x,u=i*a.y;return{width:o,height:s,x:l,y:u}}function qI(r,t,e){let i;if(t==="viewport")i=w5(r,e);else if(t==="document")i=S5(Ci(r));else if(oi(t))i=C5(t,e);else{let n=JI(r);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Yo(i)}function eL(r,t){let e=Nn(r);return e===t||!oi(e)||Zo(e)?!1:si(e).position==="fixed"||eL(e,t)}function A5(r,t){let e=t.get(r);if(e)return e;let i=El(r,[],!1).filter(s=>oi(s)&&Wo(s)!=="body"),n=null,a=si(r).position==="fixed",o=a?Nn(r):r;for(;oi(o)&&!Zo(o);){let s=si(o),l=Cv(o);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&T5.has(n.position)||Ml(o)&&!l&&eL(r,o))?i=i.filter(c=>c!==o):n=s,o=Nn(o)}return t.set(r,i),i}function D5(r){let{element:t,boundary:e,rootBoundary:i,strategy:n}=r,o=[...e==="clippingAncestors"?nf(t)?[]:A5(t,this._c):[].concat(e),i],s=o[0],l=o.reduce((u,c)=>{let f=qI(t,c,n);return u.top=Ln(f.top,u.top),u.right=Dl(f.right,u.right),u.bottom=Dl(f.bottom,u.bottom),u.left=Ln(f.left,u.left),u},qI(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function E5(r){let{width:t,height:e}=jI(r);return{width:t,height:e}}function M5(r,t,e){let i=Ai(t),n=Ci(t),a=e==="fixed",o=Xo(r,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Ti(0);function u(){l.x=jx(n)}if(i||!i&&!a)if((Wo(t)!=="body"||Ml(n))&&(s=af(t)),i){let p=Xo(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!i&&n&&u();let c=n&&!i&&!a?QI(n,s):Ti(0),f=o.left+s.scrollLeft-l.x-c.x,h=o.top+s.scrollTop-l.y-c.y;return{x:f,y:h,width:o.width,height:o.height}}function qx(r){return si(r).position==="static"}function $I(r,t){if(!Ai(r)||si(r).position==="fixed")return null;if(t)return t(r);let e=r.offsetParent;return Ci(r)===e&&(e=e.ownerDocument.body),e}function tL(r,t){let e=xr(r);if(nf(r))return e;if(!Ai(r)){let n=Nn(r);for(;n&&!Zo(n);){if(oi(n)&&!qx(n))return n;n=Nn(n)}return e}let i=$I(r,t);for(;i&&ZI(i)&&qx(i);)i=$I(i,t);return i&&Zo(i)&&qx(i)&&!Cv(i)?e:i||XI(r)||e}var O5=async function(r){let t=this.getOffsetParent||tL,e=this.getDimensions,i=await e(r.floating);return{reference:M5(r.reference,await t(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function I5(r){return si(r).direction==="rtl"}var L5={convertOffsetParentRelativeRectToViewportRelativeRect:x5,getDocumentElement:Ci,getClippingRect:D5,getOffsetParent:tL,getElementRects:O5,getClientRects:b5,getDimensions:E5,getScale:Ol,isElement:oi,isRTL:I5};function rL(r,t){return r.x===t.x&&r.y===t.y&&r.width===t.width&&r.height===t.height}function P5(r,t){let e=null,i,n=Ci(r);function a(){var s;clearTimeout(i),(s=e)==null||s.disconnect(),e=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=r.getBoundingClientRect(),{left:c,top:f,width:h,height:p}=u;if(s||t(),!h||!p)return;let d=ef(f),v=ef(n.clientWidth-(c+h)),m=ef(n.clientHeight-(f+p)),g=ef(c),_={rootMargin:-d+"px "+-v+"px "+-m+"px "+-g+"px",threshold:Ln(0,Dl(1,l))||1},x=!0;function b(S){let T=S[0].intersectionRatio;if(T!==l){if(!x)return o();T?o(!1,T):i=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!rL(u,r.getBoundingClientRect())&&o(),x=!1}try{e=new IntersectionObserver(b,{..._,root:n.ownerDocument})}catch{e=new IntersectionObserver(b,_)}e.observe(r)}return o(!0),a}function iL(r,t,e,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=$x(r),c=n||a?[...u?El(u):[],...El(t)]:[];c.forEach(g=>{n&&g.addEventListener("scroll",e,{passive:!0}),a&&g.addEventListener("resize",e)});let f=u&&s?P5(u,e):null,h=-1,p=null;o&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),e()}),u&&!l&&p.observe(u),p.observe(t));let d,v=l?Xo(r):null;l&&m();function m(){let g=Xo(r);v&&!rL(v,g)&&e(),v=g,d=requestAnimationFrame(m)}return e(),()=>{var g;c.forEach(y=>{n&&y.removeEventListener("scroll",e),a&&y.removeEventListener("resize",e)}),f?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(d)}}var nL=HI;var aL=GI,oL=UI;var sL=(r,t,e)=>{let i=new Map,n={platform:L5,...e},a={...n.platform,_c:i};return VI(r,t,{...n,platform:a})};function N5(){let r=document.querySelector('meta[name="csrf-token"]');return r?r.content:null}async function k5(r,t={}){let e={Accept:"text/html","X-Partial-Request":"true","X-Requested-With":"XMLHttpRequest"},i=t.method||"GET";if(i!=="GET"){let s=N5();s&&(e["X-CSRF-Token"]=s)}let n=await fetch(r,{method:i,headers:{...e,...t.headers},...t});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.text();return new DOMParser().parseFromString(a,"text/html")}function R5(r,t){for(;r.firstChild;)r.removeChild(r.firstChild);Array.from(t.childNodes).forEach(e=>{r.appendChild(e.cloneNode(!0))})}async function kn(r,t,e={}){let i=await k5(r,e),n=e.selector||`#${t.id}`,a=i.querySelector(n);if(a)return R5(t,a),!0;for(;t.firstChild;)t.removeChild(t.firstChild);return!1}var Ll,Pl,Ev,lL,Il=class extends xe{constructor(){super(...arguments);Ji(this,Ev);Ji(this,Ll,null);Ji(this,Pl,null)}initialize(){this.orient=this.orient.bind(this)}connect(){this.cleanup=iL(this.buttonTarget,this.menuTarget,this.orient)}disconnect(){clearTimeout(Bt(this,Ll)),clearTimeout(Bt(this,Pl)),this.cleanup()}show(t){t&&t.preventDefault(),this.menuTarget.showPopover({source:this.buttonTarget}),this.orient(),this.loadOperationDetailsIfNeeded()}hide(){this.menuTarget.hidePopover()}toggle(t){t.preventDefault(),this.menuTarget.togglePopover({source:this.buttonTarget}),this.orient(),this.loadOperationDetailsIfNeeded()}debouncedShow(){clearTimeout(Bt(this,Pl)),Yl(this,Ll,setTimeout(()=>this.show(),700))}debouncedHide(){clearTimeout(Bt(this,Ll)),Yl(this,Pl,setTimeout(()=>this.hide(),300))}orient(){sL(this.buttonTarget,this.menuTarget,Bt(this,Ev,lL)).then(({x:t,y:e})=>{this.menuTarget.style.setProperty("--popover-x",`${t}px`),this.menuTarget.style.setProperty("--popover-y",`${e}px`),this.menuTarget.classList.add("positioned")})}loadOperationDetailsIfNeeded(){let t=this.menuTarget.dataset.operationUrl;if(!t)return;let e=this.menuTarget.querySelector("[data-operation-url]");!e||e.dataset.loaded||!this.hasLoadingContent(e)||kn(t,e).then(()=>{e.dataset.loaded="true"}).catch(n=>console.error("Popover details fetch error:",n))}hasLoadingContent(t){return(t.textContent||"").includes("Loading operation details")}};Ll=new WeakMap,Pl=new WeakMap,Ev=new WeakSet,lL=function(){return{placement:this.placementValue,middleware:[nL(4),oL(),aL({padding:4})]}},se(Il,"targets",["button","menu"]),se(Il,"values",{placement:{type:String,default:"top"}});var of=class extends xe{constructor(){super(...arguments);se(this,"deploymentMarkerSeriesId","rails-pulse-deployment-markers")}connect(){this.initializeChart(),this.handleColorSchemeChange=this.onColorSchemeChange.bind(this),this.handleSeriesToggle=this.onSeriesToggle.bind(this),this.handleDeploymentMarkersToggle=this.onDeploymentMarkersToggle.bind(this),document.addEventListener("rails-pulse:color-scheme-changed",this.handleColorSchemeChange),document.addEventListener("rails-pulse:toggle-series",this.handleSeriesToggle),document.addEventListener("rails-pulse:toggle-deployment-markers",this.handleDeploymentMarkersToggle)}disconnect(){document.removeEventListener("rails-pulse:color-scheme-changed",this.handleColorSchemeChange),document.removeEventListener("rails-pulse:toggle-series",this.handleSeriesToggle),document.removeEventListener("rails-pulse:toggle-deployment-markers",this.handleDeploymentMarkersToggle),this.disposeChart()}initializeChart(){this.retryCount=0,this.maxRetries=100,this.attemptInit()}attemptInit(){if(typeof echarts>"u"){if(this.retryCount++,this.retryCount>=this.maxRetries){console.error("[RailsPulse] echarts not loaded after 5 seconds for",this.element.id),this.showError();return}setTimeout(()=>this.attemptInit(),50);return}this.renderChart()}renderChart(){try{this.chart=echarts.init(this.element,this.themeValue||"railspulse");let t=this.buildChartConfig();this.chart.setOption(t),this.applyColorScheme(),document.dispatchEvent(new CustomEvent("stimulus:echarts:rendered",{detail:{containerId:this.element.id,chart:this.chart,controller:this}})),this.resizeObserver=new ResizeObserver(()=>{this.chart&&this.chart.resize()}),this.resizeObserver.observe(this.element),this.chart.on("legendselectchanged",e=>{this.handleLegendToggle(e)}),this.chart.on("click",e=>{e.componentType==="markLine"&&e.name&&navigator.clipboard.writeText(e.name).then(()=>{this.showCopiedToast(e.name)}).catch(()=>{})}),this.element.setAttribute("data-chart-rendered","true")}catch(t){console.error("[RailsPulse] Error initializing chart:",t),this.showError()}}buildChartConfig(){let t={...this.optionsValue};if(this.processFormatters(t),this.setChartData(t),!t.legend){let n=document.querySelectorAll(`[data-rails-pulse--series-toggle-chart-id-value="${this.element.id}"]`),a={};n.forEach(s=>{let l=s.getAttribute("data-rails-pulse--series-toggle-series-name-value");l&&(a[l]=s.dataset.active!=="false")});let o={};t.series&&Array.isArray(t.series)&&t.series.forEach(s=>{s.name&&(o[s.name]=s.name in a?a[s.name]:!0)}),t.legend={show:!1,selected:o}}let e=this.dataValue,i=e.deployment_markers;if(i&&i.length>0&&this._usesTimeAxisData(e)){let a=(this.element.closest('[data-controller~="rails-pulse--index"]')||document).querySelector('[data-controller~="rails-pulse--deployment-markers-toggle"]'),o=!a||a.dataset.active!=="false";t.series=t.series||[],t.series.push(this._buildDeploymentMarkerSeries(i,o))}return t}setChartData(t){let e=this.dataValue;if(e&&typeof e=="object"&&e.series){let i=e.series[0]?.data?.[0],n=Array.isArray(i)||Array.isArray(i?.value);if(t.xAxis=t.xAxis||{},n){t.xAxis.type="time";let o=this._minTimestampGapMs(e.series);o&&(t.xAxis.minInterval=o)}else t.xAxis.type="category",t.xAxis.data=e.labels;t.yAxis=t.yAxis||{},t.yAxis.type="value";let a=t.series&&!Array.isArray(t.series)?t.series:{};t.series=e.series.map(o=>({type:this.typeValue,...a,...o}))}else{let i=Object.keys(e).map(a=>{let o=Number(a);return isNaN(o)?a:o}),n=Object.values(e).map(a=>{if(typeof a=="object"&&a!==null){if(a.value!==void 0){let o=Object.keys(a);return o.length>1||o.length===1&&o[0]!=="value"?a:a.value}return a}return a});if(t.xAxis=t.xAxis||{},t.xAxis.type="category",t.xAxis.data=i,t.yAxis=t.yAxis||{},t.yAxis.type="value",Array.isArray(t.series))t.series[0]=t.series[0]||{},t.series[0].type=this.typeValue,t.series[0].data=n;else if(t.series&&typeof t.series=="object"){let a={...t.series};t.series=[{type:this.typeValue,data:n,...a}]}else t.series=[{type:this.typeValue,data:n}]}}_usesTimeAxisData(t=this.dataValue){let e=t?.series?.find(i=>Array.isArray(i?.data)&&i.data.length>0)?.data?.[0];return Array.isArray(e)||Array.isArray(e?.value)}_minTimestampGapMs(t){let e=new Set;t.forEach(a=>{(a.data||[]).forEach(o=>{let s=Array.isArray(o)?o:Array.isArray(o?.value)?o.value:null;s&&typeof s[0]=="number"&&e.add(s[0])})});let i=Array.from(e).sort((a,o)=>a-o),n=null;for(let a=1;a<i.length;a++){let o=i[a]-i[a-1];o>0&&(n===null||o<n)&&(n=o)}return n}_buildDeploymentMarkerSeries(t,e=!0){return{id:this.deploymentMarkerSeriesId,type:"line",data:[],name:"",showSymbol:!1,symbolSize:0,silent:!1,animation:!1,legendHoverLink:!1,lineStyle:{opacity:0},itemStyle:{opacity:0},tooltip:{show:!1},z:10,markLine:e?this._buildMarkLineConfig(t):{data:[]}}}_buildMarkLineConfig(t){let e=a=>{let o=a?.data?.xAxis,s=a?.data?.revision;if(typeof o!="number")return"";let l=new Date(o).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return s?`{time|${l}}
|
|
29
|
-
{revision|${s}}`:`{time|${l}}`},i={color:"#22c55e",type:"dashed",width:2,opacity:.8},n={color:"#22c55e",formatter:e,rich:{time:{color:"#22c55e",fontWeight:600},revision:{color:"#22c55e",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:11}}};return{symbol:["none","none"],silent:!1,lineStyle:i,label:{...n,show:!1},emphasis:{lineStyle:i,label:{...n,show:!0}},data:t.map(a=>({xAxis:a.timestamp,name:a.revision,revision:a.revision,started_at:a.started_at})),tooltip:{show:!0,formatter:a=>{let o=a?.data?.revision||a.name,s=a?.data?.started_at;if(!s)return o;let l=new Date(s).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return`<strong>Deploy</strong><br/><code style="font-size:11px">${o}</code><br/>${l}<br/><span style="font-size:10px;opacity:0.7">Click to copy SHA</span>`}}}}processFormatters(t){t.tooltip?.formatter&&typeof t.tooltip.formatter=="string"&&(this.isEChartsTemplate(t.tooltip.formatter)||(t.tooltip.formatter=this.parseFormatter(t.tooltip.formatter),this._tooltipFormatter=t.tooltip.formatter)),t.xAxis?.axisLabel?.formatter&&typeof t.xAxis.axisLabel.formatter=="string"&&(this.isEChartsTemplate(t.xAxis.axisLabel.formatter)||(t.xAxis.axisLabel.formatter=this.parseFormatter(t.xAxis.axisLabel.formatter))),t.yAxis?.axisLabel?.formatter&&typeof t.yAxis.axisLabel.formatter=="string"&&(this.isEChartsTemplate(t.yAxis.axisLabel.formatter)||(t.yAxis.axisLabel.formatter=this.parseFormatter(t.yAxis.axisLabel.formatter)))}isEChartsTemplate(t){return/^\{[a-zA-Z0-9_]+\}/.test(t.trim())||t.includes("{value}")||t.includes("{a}")||t.includes("{b}")||t.includes("{c}")}parseFormatter(t){let e=t.replace(/__FUNCTION_START__|__FUNCTION_END__/g,"");return this.getSafeFormatter(e)}getSafeFormatter(t){let e={duration_ms:n=>typeof n=="number"?n.toFixed(2)+" ms":n,percentage:n=>typeof n=="number"?n.toFixed(1)+"%":n,number_delimited:n=>typeof n=="number"?n.toLocaleString():n,timestamp:n=>typeof n=="number"||typeof n=="string"?new Date(n).toLocaleString():n,date:n=>{if(typeof n=="number"||typeof n=="string"){let a=typeof n=="string"?parseInt(n):n,o=new Date(a);return isNaN(o.getTime())?n.toString():o.toLocaleDateString("en-US",{month:"short",day:"numeric"})}return n},time:n=>{if(typeof n=="number"||typeof n=="string"){let a=typeof n=="string"?parseInt(n):n,o=new Date(a),s=o.getHours();if(isNaN(s))return n.toString();let l=o.getMinutes();return s.toString().padStart(2,"0")+":"+l.toString().padStart(2,"0")}return n},bytes:n=>{if(typeof n!="number")return n;let a=["B","KB","MB","GB","TB"],o=n,s=0;for(;o>=1024&&s<a.length-1;)o/=1024,s++;return o.toFixed(2)+" "+a[s]},tooltip_time_ms:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue),s=o.getHours().toString().padStart(2,"0"),l=o.getMinutes().toString().padStart(2,"0"),u=`${s}:${l}`,c=parseInt(a.data);return`${u} <br /> ${a.marker} ${c} ms`},tooltip_date_ms:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],s=new Date(a.axisValue).toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=parseInt(a.data);return`${s} <br /> ${a.marker} ${l} ms`},tooltip_time:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue),s=o.getHours().toString().padStart(2,"0"),l=o.getMinutes().toString().padStart(2,"0");return`${`${s}:${l}`} <br /> ${a.marker} ${a.data}`},tooltip_date:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0];return`${new Date(a.axisValue).toLocaleDateString("en-US",{month:"short",day:"numeric"})} <br /> ${a.marker} ${a.data}`},auto_date_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue||n[0].axisValueLabel,o=a;if(typeof a=="number"||typeof a=="string"&&!isNaN(Number(a))){let l=Number(a),u=new Date(l);isNaN(u.getTime())||(o=u.toLocaleDateString("en-US",{month:"short",day:"numeric",year:u.getFullYear()!==new Date().getFullYear()?"numeric":void 0}))}let s=`${o}<br/>`;return n.forEach(l=>{let u=Array.isArray(l.value)?l.value[1]:l.value,c=typeof u=="number"?Math.round(u).toLocaleString("en-US"):u??0;s+=`${l.marker} ${l.seriesName}: ${c}<br/>`}),s},timestamp_to_date:n=>{let a=typeof n=="string"?parseFloat(n):n;if(typeof a=="number"&&!isNaN(a)&&a>1e12){let o=new Date(a);if(!isNaN(o.getTime()))return o.toLocaleDateString("en-US",{month:"short",day:"numeric"})}return n},tooltip_with_timestamp:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue,o=Number(a),s;if(!isNaN(o)&&o>1e12){let u=new Date(o),c=n[0].axisValueLabel||"";s=/^\d{2}:\d{2}$/.test(c)?u.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):u.toLocaleDateString("en-US",{month:"short",day:"numeric"})}else s=a;let l=`${s}<br/>`;return n.forEach(u=>{let c=Array.isArray(u.value)?u.value[1]:u.value,f=typeof c=="number"?Math.round(c).toLocaleString("en-US"):c??0;l+=`${u.marker} ${u.seriesName}: ${f}<br/>`}),l},sparkline_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=a.axisValue,s=typeof a.value=="number"?Math.round(a.value).toLocaleString("en-US"):a.value??0,l=a.seriesName||"Value",u=typeof o=="string"?parseFloat(o):o;if(typeof u=="number"&&!isNaN(u)&&u>1e12){let c=new Date(u);if(!isNaN(c.getTime())){let f=c.getHours().toString().padStart(2,"0"),h=c.getMinutes().toString().padStart(2,"0");o=`${f}:${h}`}}return`${o}<br/>${a.marker} ${l}: ${s}`},sparkline_percentage_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=a.axisValue,s=typeof a.value=="number"?a.value:a.value??0,l=typeof s=="number"?s.toFixed(2)+"%":s,u=a.seriesName||"Value",c=typeof o=="string"?parseFloat(o):o;if(typeof c=="number"&&!isNaN(c)&&c>1e12){let f=new Date(c);if(!isNaN(f.getTime())){let h=f.getHours().toString().padStart(2,"0"),p=f.getMinutes().toString().padStart(2,"0");o=`${h}:${p}`}}return`${o}<br/>${a.marker} ${u}: ${l}`},tooltip_with_timestamp_rate:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue,o=Number(a),s;if(!isNaN(o)&&o>1e12){let u=new Date(o),c=n[0].axisValueLabel||"";s=/^\d{2}:\d{2}$/.test(c)?u.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):u.toLocaleDateString("en-US",{month:"short",day:"numeric"})}else s=a;let l=`${s}<br/>`;return n.forEach(u=>{let c=Array.isArray(u.value)?u.value[1]:u.value,h=(typeof c=="number"?c:0).toFixed(2)+"%";l+=`${u.marker} ${u.seriesName}: ${h}<br/>`}),l}};if(t.includes("params")&&t.includes("params[0]")&&t.includes("axisValue"))return t.includes("getHours")?t.includes("ms")?e.tooltip_time_ms:e.tooltip_time:t.includes("toLocaleDateString")&&t.includes("ms")?e.tooltip_date_ms:e.tooltip_date;if(t.includes("getHours"))return e.time;if(t.includes("toLocaleDateString"))return e.date;if(t.includes("toLocaleTimeString"))return e.time;if(t.includes("toLocaleString"))return e.number_delimited;if(t.includes("toFixed(2)")&&t.includes("ms"))return e.duration_ms;if(e[t])return e[t];for(let[n,a]of Object.entries(e))if(t.includes(n)||t.includes(n.replace("_","")))return a;return console.warn("[RailsPulse] Unknown formatter pattern, using identity function:",t.substring(0,100)),n=>n}findDeploymentCopyHintElement(){let t=this.element.closest('[data-controller~="rails-pulse--index"]')||document;return Array.from(t.querySelectorAll('[data-rails-pulse--deployment-markers-toggle-target="message"]')).find(i=>i.offsetParent!==null)||null}showCopiedToast(t){let e=document.createElement("div");e.textContent=`Copied ${t}`;let i=this.findDeploymentCopyHintElement();if(i){let n=i.getBoundingClientRect();e.style.cssText=`position:fixed;top:${n.top+n.height/2}px;left:${n.right+8}px;transform:translateY(-50%);background:#22c55e;color:#fff;padding:0.35rem 0.7rem;border-radius:6px;font-size:12px;font-family:monospace;white-space:nowrap;z-index:9999;pointer-events:none;opacity:1;transition:opacity 0.4s ease`}else e.style.cssText="position:fixed;bottom:1rem;right:1rem;background:#22c55e;color:#fff;padding:0.4rem 0.8rem;border-radius:6px;font-size:13px;font-family:monospace;z-index:9999;pointer-events:none;opacity:1;transition:opacity 0.4s ease";document.body.appendChild(e),setTimeout(()=>{e.style.opacity="0"},1500),setTimeout(()=>{e.remove()},2e3)}showError(){this.element.classList.add("chart-error"),this.element.innerHTML='<p class="text-subtle p-4">Chart failed to load</p>'}get chartInstance(){return this.chart}disposeChart(){this.resizeObserver&&this.resizeObserver.disconnect(),this.chart&&(this.chart.dispose(),this.chart=null)}update(t){if(t.detail?.data&&(this.dataValue=t.detail.data),t.detail?.options&&(this.optionsValue=t.detail.options),this.chart){let e=this.buildChartConfig();this.chart.setOption(e,!0)}}onSeriesToggle({detail:{chartId:t,seriesName:e}}){if(t!==this.element.id||!this.chart)return;let n=(this.dataValue?.series||[]).map(o=>o.name).filter(Boolean).filter(o=>o.startsWith(e));(n.length>0?n:[e]).forEach(o=>{this.chart.dispatchAction({type:"legendToggleSelect",name:o})})}onDeploymentMarkersToggle({detail:{visible:t}}){if(!this.chart)return;let e=this.dataValue?.deployment_markers;!e?.length||!this._usesTimeAxisData()||this.chart.setOption({series:[this._buildDeploymentMarkerSeries(e,t)]})}handleLegendToggle(t){if(!this.chart)return;let i=this.chart.getOption().series||[];if(!i.some(u=>u.type==="bar"&&u.stack))return;let a=t.selected||{},o=[];if(i.forEach((u,c)=>{a[u.name]!==!1&&u.type==="bar"&&u.stack&&o.push(c)}),o.length===0)return;let s=o[o.length-1],l=i.map((u,c)=>{if(u.type!=="bar"||!u.stack)return u;let f=o.includes(c),h=c===s;return{...u,itemStyle:{...u.itemStyle||{},borderRadius:f&&h?[5,5,0,0]:[0,0,0,0]}}});this.chart.setOption({series:l})}onColorSchemeChange(){this.applyColorScheme()}applyColorScheme(){if(!this.chart)return;let e=document.documentElement.getAttribute("data-color-scheme")==="dark",i=e?"rgba(255,255,255,0.55)":"#999999",n=e?"rgba(255,255,255,0.07)":"#eeeeee",l={backgroundColor:e?"rgba(24,24,27,0.95)":"rgba(255,255,255,0.95)",textStyle:{color:e?"#e4e4e7":"#18181b"},borderColor:e?"rgba(255,255,255,0.12)":"#cccccc"};this._tooltipFormatter&&(l.formatter=this._tooltipFormatter),this.chart.setOption({xAxis:{axisLabel:{color:i},splitLine:{lineStyle:{color:n}}},yAxis:{axisLabel:{color:i},splitLine:{lineStyle:{color:n}}},tooltip:l})}};se(of,"values",{type:String,data:Object,options:Object,theme:String});var Nl=class extends xe{constructor(){super(...arguments);se(this,"lastFrameRequestAt",0);se(this,"pendingRequestTimeout",null);se(this,"pendingRequestData",null);se(this,"selectedColumnIndex",null);se(this,"zrClickHandler",null);se(this,"highlightBarName","__rp_col_bg__");se(this,"deploymentMarkerSeriesId","rails-pulse-deployment-markers");se(this,"charts",{});se(this,"chartControllers",{});se(this,"chartSetup",{});se(this,"activeChartId",null)}connect(){let e=new URLSearchParams(window.location.search).get("chart_type"),i={response_time:"response_time_percentiles_chart",request_rate:"request_rate_chart",error_rate:"error_rate_chart",query_performance:"query_performance_chart",execution_volume:"execution_volume_chart",database_load:"database_load_chart"};this.activeChartId=i[e]||this.chartIdValue,this.handleChartInitialized=this.onChartInitialized.bind(this),document.addEventListener("stimulus:echarts:rendered",this.handleChartInitialized),this.handleDocumentMouseUp=()=>{!this.chart||!this.visibleData||this.handleZoomChange()},document.addEventListener("mouseup",this.handleDocumentMouseUp)}disconnect(){document.removeEventListener("stimulus:echarts:rendered",this.handleChartInitialized);let t=this.getActiveChartContainer();t&&(t.removeEventListener("mousedown",this.handleChartMouseDown),t.removeEventListener("mouseup",this.handleChartMouseUp)),document.removeEventListener("mouseup",this.handleDocumentMouseUp);try{this.chart&&this.zrClickHandler&&this.chart.getZr().off("click",this.zrClickHandler),this.chart&&this.zrMouseMoveHandler&&this.chart.getZr().off("mousemove",this.zrMouseMoveHandler)}catch{}this.pendingRequestTimeout&&clearTimeout(this.pendingRequestTimeout)}onChartInitialized(t){let{containerId:e,chart:i,controller:n}=t.detail;this.charts[e]=i,this.chartControllers[e]=n,e===this.activeChartId&&(this.chart=i,this.setup())}handleChartSwitched(t){let{toId:e}=t.detail;if(!e||e===this.activeChartId)return;let i=this.captureZoomState();this.teardownActiveChartListeners(),this.originalBarItemStyles=null,this.activeChartId=e,this.chart=this.charts[e],this.chart&&(requestAnimationFrame(()=>{let n=this.chartControllers[e];this.chart&&this.chart.resize(),n?.chart&&n.chart.setOption(n.buildChartConfig(),!0),setTimeout(()=>{this.chart&&this.chart.resize()},0)}),i&&this.applyZoomState(i),this.chartSetup[e]?(this.visibleData=this.getVisibleData(),this.setupChartEventListeners(),this.initializeColumnSelectionFromUrl()):this.setup())}captureZoomState(){if(!this.chart)return null;try{let t=this.chart.getOption(),e=t.dataZoom?.[1]||t.dataZoom?.[0];return e?{startValue:e.startValue,endValue:e.endValue}:null}catch{return null}}applyZoomState(t){if(!(!this.chart||t.startValue===void 0||t.endValue===void 0))try{this.chart.dispatchAction({type:"dataZoom",startValue:t.startValue,endValue:t.endValue}),this.visibleData=this.getVisibleData()}catch{}}teardownActiveChartListeners(){let t=this.getActiveChartContainer();t&&(t.removeEventListener("mousedown",this.handleChartMouseDown),t.removeEventListener("mouseup",this.handleChartMouseUp));try{this.chart&&(this.chart.off("datazoom"),this.zrClickHandler&&this.chart.getZr().off("click",this.zrClickHandler),this.zrMouseMoveHandler&&this.chart.getZr().off("mousemove",this.zrMouseMoveHandler))}catch{}this.zrClickHandler=null,this.zrMouseMoveHandler=null}getActiveChartContainer(){return this.chartTargets.find(t=>t.dataset.chartId===this.activeChartId)||null}setup(){this.chartSetup[this.activeChartId]||!this.getActiveChartContainer()||!this.chart||(this.visibleData=this.getVisibleData(),this.setupHighlightSeries(),this.setupChartEventListeners(),this.chartSetup[this.activeChartId]=!0,document.getElementById(this.activeChartId)?.setAttribute("data-chart-rendered","true"),this.initializeZoomFromUrl(),this.initializeColumnSelectionFromUrl())}setupChartEventListeners(){let t=this.getActiveChartContainer();this.handleChartMouseDown=()=>{this.visibleData=this.getVisibleData()},t.addEventListener("mousedown",this.handleChartMouseDown),this.handleChartMouseUp=()=>{this.handleZoomChange()},t.addEventListener("mouseup",this.handleChartMouseUp),this.chart.on("datazoom",()=>{this.handleZoomChange()}),this.zrClickHandler=e=>{if(this.isClickOnDeploymentMarker(e))return;let i=this.getDataIndexFromPixel(e);i!=null&&this.handleColumnClick({dataIndex:i})},this.chart.getZr().on("click",this.zrClickHandler),this.zrMouseMoveHandler=e=>{let i=this.getDataIndexFromPixel(e);this.chart.getZr().setCursorStyle(i==null?"default":"pointer")},this.chart.getZr().on("mousemove",this.zrMouseMoveHandler)}getPrimaryDataSeries(t=this.chart?.getOption()){return(t?.series||[]).find(e=>e?.name!==this.highlightBarName&&e?.id!==this.deploymentMarkerSeriesId&&Array.isArray(e?.data)&&e.data.length>0)||null}getPrimaryDataSeriesIndex(t=this.chart?.getOption()){return(t?.series||[]).findIndex(e=>e?.name!==this.highlightBarName&&e?.id!==this.deploymentMarkerSeriesId&&Array.isArray(e?.data)&&e.data.length>0)}getXAxisValues(t=this.chart?.getOption()){let e=t?.xAxis?.[0]?.data;if(Array.isArray(e)&&e.length>0)return e;let i=this.getPrimaryDataSeries(t);return i?i.data.map(n=>Array.isArray(n)?n[0]:Array.isArray(n?.value)?n.value[0]:null).filter(n=>n!=null):[]}getAxisType(t=this.chart?.getOption()){return t?.xAxis?.[0]?.type||"category"}getDataIndexFromPixel(t){if(!this.chart)return null;let e=this.chart.getOption(),i=this.getAxisType(e),n=this.getXAxisValues(e),a=this.getPrimaryDataSeriesIndex(e),o=[t.offsetX,t.offsetY];if(n.length===0||!this.chart.containPixel({gridIndex:0},o))return null;let s=this.chart.convertFromPixel({gridIndex:0},o);if(i==="time"){let c=Array.isArray(s)?Number(s[0]):Number(s);if(Number.isNaN(c)&&a>=0){let p=this.chart.convertFromPixel({seriesIndex:a},o);c=Array.isArray(p)?Number(p[0]):Number(p)}if(Number.isNaN(c))return null;let f=0,h=1/0;return n.forEach((p,d)=>{let v=Math.abs(Number(p)-c);v<h&&(h=v,f=d)}),f}let l=Array.isArray(s)?s:this.chart.convertFromPixel({seriesIndex:a>=0?a:0},o);if(!l)return null;let u=Math.round(l[0]);return u<0||u>=n.length?null:u}getTimeBucketRange(t,e){let i=Number(t[e]),n=e>0?Number(t[e-1]):null,a=e<t.length-1?Number(t[e+1]):null,o=n!=null?i-n:a!=null?a-i:36e5,s=n!=null?i-n:o,l=a!=null?a-i:o;return{start:i-s/2,end:i+l/2}}isClickOnDeploymentMarker(t){if(!this.chart)return!1;let n=(this.chart.getOption()?.series||[]).find(s=>s?.id===this.deploymentMarkerSeriesId)?.markLine?.data||[];if(n.length===0)return!1;let a=[t.offsetX,t.offsetY];if(!this.chart.containPixel({gridIndex:0},a))return!1;let o=8;return n.some(s=>{let l=this.chart.convertToPixel({xAxisIndex:0},s.xAxis),u=Array.isArray(l)?l[0]:l;return typeof u=="number"&&!Number.isNaN(u)&&Math.abs(u-t.offsetX)<=o})}getVisibleData(){try{let t=this.chart.getOption();if(!t.dataZoom||t.dataZoom.length===0)return{xAxis:[],series:[]};let e=t.dataZoom[1]||t.dataZoom[0],i=this.getXAxisValues(t),a=this.getPrimaryDataSeries(t)?.data||[];if(i.length===0||a.length===0)return{xAxis:[],series:[]};if(this.getAxisType(t)==="time"){let l=e.startValue??i[0],u=e.endValue??i[i.length-1];return{xAxis:i.filter(c=>c>=l&&c<=u),series:a.filter(c=>{let f=Array.isArray(c)?c[0]:c?.value?.[0];return f>=l&&f<=u})}}let o=e.startValue??0,s=e.endValue??i.length-1;return{xAxis:i.slice(o,s+1),series:a.slice(o,s+1)}}catch{return{xAxis:[],series:[]}}}handleZoomChange(){let t=this.getVisibleData(),e=t.xAxis.join(),i=this.visibleData.xAxis.join();e!==i&&(this.visibleData=t,this.updateUrlWithZoomParams(t),this.sendFrameRequest(t))}updateUrlWithZoomParams(t){let e=new URL(window.location.href),i=new URLSearchParams(e.search),n=t.xAxis[0],a=t.xAxis[t.xAxis.length-1];i.set("zoom_start_time",n),i.set("zoom_end_time",a),e.search=i.toString(),window.history.replaceState({},"",e)}updatePaginationLimit(){if(!this.hasPaginationLimitTarget)return;let t=new URL(window.location.href),e=new URLSearchParams(t.search),i=this.paginationLimitTarget.value;e.set("limit",i),t.search=e.toString(),window.history.replaceState({},"",t)}sendFrameRequest(t){let i=Date.now()-this.lastFrameRequestAt;if(this.pendingRequestData=t,this.pendingRequestTimeout&&clearTimeout(this.pendingRequestTimeout),i>=1e3)this.executeFrameRequest(t);else{let n=1e3-i;this.pendingRequestTimeout=setTimeout(()=>{this.executeFrameRequest(this.pendingRequestData),this.pendingRequestTimeout=null},n)}}executeFrameRequest(t){this.lastFrameRequestAt=Date.now();let e=new URL(window.location.href),i=new URLSearchParams(e.search),n=t.xAxis[0],a=t.xAxis[t.xAxis.length-1];i.set("zoom_start_time",n),i.set("zoom_end_time",a),this.hasPaginationLimitTarget&&i.set("limit",this.paginationLimitTarget.value),e.search=i.toString(),kn(e.toString(),this.indexTableTarget).catch(o=>console.error("[IndexController] Fetch error:",o))}handleColumnClick(t){let e=t.dataIndex;this.selectedColumnIndex===e?(this.resetColumnColors(),this.selectedColumnIndex=null,this.sendColumnDeselectionRequest()):(this.highlightColumn(e),this.selectedColumnIndex=e,this.sendColumnSelectionRequest(e))}setupHighlightSeries(){try{let t=this.chart.getOption();if(t.series?.[0]?.type==="bar")return;if(t.xAxis?.[0]?.type==="time"){this.chart.setOption({series:[...t.series||[],{name:this.highlightBarName,type:"line",data:[],showSymbol:!1,silent:!0,z:0,animation:!1,legendHoverLink:!1,lineStyle:{opacity:0},itemStyle:{opacity:0},tooltip:{show:!1},markArea:{silent:!0,itemStyle:{color:"rgba(128, 128, 128, 0.2)"},data:[]}}]});return}let n=t.xAxis?.[0]?.data?.length||0,a=Array.isArray(t.yAxis)?t.yAxis:[t.yAxis||{}];this.chart.setOption({yAxis:[...a,{show:!1,position:"right",min:0,max:1}],series:[...t.series||[],{name:this.highlightBarName,type:"bar",yAxisIndex:a.length,barWidth:"100%",itemStyle:{color:"rgba(0, 0, 0, 0)",borderWidth:0},data:Array(n).fill(null),silent:!0,z:0,animation:!1,legendHoverLink:!1,tooltip:{show:!1}}]})}catch(t){console.error("Error setting up highlight series:",t)}}highlightColumn(t){try{let e=this.chart.getOption(),i=this.getXAxisValues(e);if(!i.length||t<0||t>=i.length)return;let n=e.series?.[0]?.type==="bar";if(this.getAxisType(e)==="time"&&!n){let o=this.getTimeBucketRange(i,t);this.chart.setOption({series:e.series.map(s=>s.name===this.highlightBarName?{markArea:{silent:!0,itemStyle:{color:"rgba(128, 128, 128, 0.2)"},data:[[{xAxis:o.start},{xAxis:o.end}]]}}:{})});return}let a=e.xAxis?.[0]?.data?.length;if(n){if(!this.originalBarItemStyles){let o=e.series?.[0]?.data||[];this.originalBarItemStyles=o.map(s=>typeof s=="object"?s.itemStyle||{}:{})}this.chart.setOption({series:e.series.slice(0,1).map(o=>({data:(o.data||[]).map((s,l)=>({value:s&&typeof s=="object"&&!Array.isArray(s)?s.value:s,itemStyle:{...this.originalBarItemStyles[l]||{},opacity:l===t?1:.25}}))}))})}else{let o=Array(a).fill(null);o[t]=1,this.chart.setOption({series:e.series.map(s=>s.name===this.highlightBarName?{itemStyle:{color:"rgba(128, 128, 128, 0.2)",borderWidth:0},data:o}:{})})}}catch(e){console.error("Error highlighting column:",e)}}resetColumnColors(){try{let t=this.chart.getOption(),e=t.xAxis?.[0]?.data?.length||0,i=t.series?.[0]?.type==="bar";if(this.getAxisType(t)==="time"&&!i){this.chart.setOption({series:t.series.map(n=>n.name===this.highlightBarName?{markArea:{data:[]}}:{})});return}if(i){let n=this.originalBarItemStyles||[];this.originalBarItemStyles=null,this.chart.setOption({series:t.series.slice(0,1).map(a=>({data:(a.data||[]).map((o,s)=>({value:o&&typeof o=="object"&&!Array.isArray(o)?o.value:o,itemStyle:{...n[s]||{},opacity:1}}))}))})}else this.chart.setOption({series:t.series.map(n=>n.name===this.highlightBarName?{itemStyle:{color:"rgba(0, 0, 0, 0)",borderWidth:0},data:Array(e).fill(null)}:{})})}catch(t){console.error("Error resetting column highlight:",t)}}sendColumnSelectionRequest(t){let e=this.chart.getOption(),n=this.getXAxisValues(e)[t];if(!n){console.error("Could not find timestamp for column index:",t);return}let a=new URL(window.location.href),o=new URLSearchParams(a.search);o.set("selected_column_time",n),this.hasPaginationLimitTarget&&o.set("limit",this.paginationLimitTarget.value),a.search=o.toString(),window.history.replaceState({},"",a),this.executeFrameRequestForColumn(a)}sendColumnDeselectionRequest(){let t=new URL(window.location.href),e=new URLSearchParams(t.search);e.delete("selected_column_time"),this.hasPaginationLimitTarget&&e.set("limit",this.paginationLimitTarget.value),t.search=e.toString(),window.history.replaceState({},"",t),this.executeFrameRequestForColumn(t)}executeFrameRequestForColumn(t){kn(t.toString(),this.indexTableTarget).catch(e=>console.error("[IndexController] Column selection fetch error:",e))}initializeZoomFromUrl(){let t=new URLSearchParams(window.location.search),e=t.get("zoom_start_time"),i=t.get("zoom_end_time");if(!e||!i)return;let n=this.chart.getOption(),a=this.getXAxisValues(n);if(a.length===0)return;let o=parseInt(e),s=parseInt(i);if(this.getAxisType(n)==="time")this.chart.dispatchAction({type:"dataZoom",startValue:o,endValue:s});else{let l=a.reduce((c,f,h)=>Math.abs(parseInt(f)-o)<Math.abs(parseInt(a[c])-o)?h:c,0),u=a.reduce((c,f,h)=>Math.abs(parseInt(f)-s)<Math.abs(parseInt(a[c])-s)?h:c,0);this.chart.dispatchAction({type:"dataZoom",startValue:l,endValue:u})}this.visibleData=this.getVisibleData()}initializeColumnSelectionFromUrl(){let e=new URLSearchParams(window.location.search).get("selected_column_time");if(e){let i=this.chart.getOption(),n=this.getXAxisValues(i);if(n.length===0)return;let a=n.findIndex(o=>o.toString()===e);if(a===-1){let o=parseInt(e);a=n.findIndex(s=>parseInt(s)===o)}a!==-1&&(this.selectedColumnIndex=a,requestAnimationFrame(()=>{this.highlightColumn(a)}))}}};se(Nl,"targets",["chart","paginationLimit","indexTable"]),se(Nl,"values",{chartId:String});var Mv=class extends xe{connect(){this.storageKey="color-scheme",this.html=document.documentElement;let r=localStorage.getItem(this.storageKey);r&&this.html.setAttribute("data-color-scheme",r)}toggle(r){r.preventDefault();let t=this.html.getAttribute("data-color-scheme")==="dark"?"light":"dark";this.html.setAttribute("data-color-scheme",t),localStorage.setItem(this.storageKey,t),document.dispatchEvent(new CustomEvent("rails-pulse:color-scheme-changed",{detail:{scheme:t}}))}};var kl=class extends xe{connect(){this.restorePaginationLimit()}updateLimit(){let r=this.limitTarget.value;sessionStorage.setItem(this.storageKeyValue,r);let t=new URL(window.location);t.searchParams.set("limit",r),t.searchParams.delete("page"),window.location.href=t.toString()}restorePaginationLimit(){if(!this.hasLimitTarget)return;let t=new URLSearchParams(window.location.search).get("limit");if(t)sessionStorage.setItem(this.storageKeyValue,t),this.limitTarget.value!==t&&(this.limitTarget.value=t);else{let e=sessionStorage.getItem(this.storageKeyValue);e&&this.limitTarget.value!==e&&(this.limitTarget.value=e)}}};se(kl,"targets",["limit"]),se(kl,"values",{storageKey:{type:String,default:"rails_pulse_pagination_limit"}});var Rl=class extends xe{connect(){this.renderIcon()}nameValueChanged(){this.renderIcon()}renderIcon(){this.clearIcon(),this.element.classList.add(...this.loadingClasses),this.element.classList.remove(...this.errorClasses,...this.loadedClasses);let r=this.nameValue;if(!r){this.handleError("Icon name is required");return}if(!window.RailsPulseIcons){this.handleError("RailsPulseIcons not loaded");return}let t=window.RailsPulseIcons.get(r);if(!t){this.handleError(`Icon '${r}' not found`);return}try{let e=this.createSVGElement(t);this.element.appendChild(e),this.element.classList.remove(...this.loadingClasses,...this.errorClasses),this.element.classList.add(...this.loadedClasses),this.element.setAttribute("aria-label",`${r} icon`)}catch(e){this.handleError(`Failed to render icon '${r}': ${e.message}`)}}createSVGElement(r){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");if(t.setAttribute("width",this.widthValue||"24"),t.setAttribute("height",this.heightValue||"24"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width",this.strokeWidthValue||"2"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),window.RailsPulseIcons.render){let a=document.createElement("div");if(window.RailsPulseIcons.render(this.nameValue,a,{width:this.widthValue||"24",height:this.heightValue||"24"})&&a.firstChild)return a.firstChild}let n=new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="${this.widthValue||"24"}" height="${this.heightValue||"24"}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${this.strokeWidthValue||"2"}" stroke-linecap="round" stroke-linejoin="round">${r}</svg>`,"image/svg+xml").documentElement;if(n.nodeName==="parsererror")throw new Error("Invalid SVG content");return document.importNode(n,!0)}clearIcon(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}handleError(r){console.warn(`[Rails Pulse Icon Controller] ${r}`),this.clearIcon(),this.element.classList.remove(...this.loadingClasses,...this.loadedClasses),this.element.classList.add(...this.errorClasses),this.createErrorPlaceholder(),this.element.setAttribute("aria-label","Icon not available")}createErrorPlaceholder(){let r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width",this.widthValue||"24"),r.setAttribute("height",this.heightValue||"24"),r.setAttribute("viewBox","0 0 24 24"),r.setAttribute("fill","currentColor"),r.setAttribute("opacity","0.3");let t=document.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("x","2"),t.setAttribute("y","2"),t.setAttribute("rx","2"),r.appendChild(t),this.element.appendChild(r)}};se(Rl,"values",{name:String,width:String,height:String,strokeWidth:String}),se(Rl,"classes",["loading","error","loaded"]);var Ov=class extends xe{toggle(r){let t=r.target.closest("tr");if(!t||t.closest("tbody")!==this.element||t.classList.contains("operation-details-row"))return;let e=r.target.closest("td,th");if(e&&e.parentElement===t&&e.cellIndex===t.cells.length-1)return;r.preventDefault(),r.stopPropagation();let i=t.nextElementSibling;if(!i||i.tagName!=="TR"||!i.classList.contains("operation-details-row"))return;i.classList.contains("hidden")?this.expand(t,i):this.collapse(t,i)}expand(r,t){t.classList.remove("hidden");let e=r.querySelector(".chevron");e&&(e.style.transform="rotate(90deg)"),r.classList.add("expanded");let i=t.querySelector("[data-operation-url]");if(i&&!i.dataset.loaded){let n=i.dataset.operationUrl;n&&this.loadOperationDetails(n,i)}}async loadOperationDetails(r,t){try{await kn(r,t),t.dataset.loaded="true"}catch(e){console.error("Operation details fetch error:",e)}}collapse(r,t){t.classList.add("hidden");let e=r.querySelector(".chevron");e&&(e.style.transform="rotate(0deg)"),r.classList.remove("expanded")}};var Fl=class extends xe{connect(){this.collapse()}toggle(){this.element.classList.contains(this.collapsedClass)?this.expand():this.collapse()}collapse(){this.element.classList.add(this.collapsedClass),this.hasToggleTarget&&(this.toggleTarget.textContent="show more")}expand(){this.element.classList.remove(this.collapsedClass),this.hasToggleTarget&&(this.toggleTarget.textContent="show less")}};se(Fl,"targets",["content","toggle"]),se(Fl,"classes",["collapsed"]);var Bl=class extends xe{disconnect(){this.resetTimeout&&clearTimeout(this.resetTimeout)}async copy(r){let t=r.currentTarget,e=this.hasSourceTarget?this.sourceTarget.textContent:"";try{await this.write(e),this.flash(t,this.copiedLabelValue)}catch{this.flash(t,this.errorLabelValue)}}async write(r){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(r);let t=document.createElement("textarea");t.value=r,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{document.body.removeChild(t)}}flash(r,t){r.textContent=t,this.resetTimeout&&clearTimeout(this.resetTimeout),this.resetTimeout=setTimeout(()=>{r.textContent=this.labelValue},this.resetDelayValue)}};se(Bl,"targets",["source"]),se(Bl,"values",{label:{type:String,default:"copy"},copiedLabel:{type:String,default:"copied!"},errorLabel:{type:String,default:"copy failed"},resetDelay:{type:Number,default:1500}});var sf=class extends xe{updateUrl(r){r.preventDefault();let e=r.currentTarget.getAttribute("href");e&&(window.history.replaceState({},"",e),this.fetchAndUpdateTable(e))}async fetchAndUpdateTable(r){try{await kn(r,this.tableFrameTarget)}catch(t){console.error("Table sort error:",t)}}};se(sf,"targets",["tableFrame"]);var zl=class extends xe{connect(){this.updateIndicator()}open(r){r.preventDefault(),this.wrapperTarget.style.display="flex",document.body.style.overflow="hidden"}close(r){r&&r.preventDefault(),this.wrapperTarget.style.display="none",document.body.style.overflow=""}closeOnClickOutside(r){r.target===this.wrapperTarget&&this.close(r)}submit(r){r.submitter&&r.submitter.name}updateIndicator(){this.hasIndicatorTarget&&(this.activeValue?this.indicatorTarget.classList.add("global-filters-active"):this.indicatorTarget.classList.remove("global-filters-active"))}activeValueChanged(){this.updateIndicator()}};se(zl,"targets",["wrapper","dialog","indicator","form"]),se(zl,"values",{active:{type:Boolean,default:!1}});var lf=class extends xe{connect(){let r=this.selectWrapperTarget.querySelector("select");if(!r)return;r.dataset.mode==="recent_custom"?r.value==="custom"&&(this.showPicker(),this.initializeDatePicker()):r.value==="custom"&&(this.showPicker(),this.initializeDatePicker())}handleChange(r){r.target.dataset.mode==="recent_custom"?r.target.value==="custom"?(this.showPicker(),this.openDatePicker()):(this.pickerWrapperTarget.style.display="none",this.selectWrapperTarget.style.display="block"):r.target.value==="custom"&&(this.showPicker(),this.openDatePicker())}showPicker(){this.selectWrapperTarget.style.display="none",this.pickerWrapperTarget.style.display="flex"}openDatePicker(){setTimeout(()=>{let r=this.pickerWrapperTarget.querySelector('input[name*="custom_date_range"]');if(!r)return;let t=this.application.getControllerForElementAndIdentifier(r,"rails-pulse--datepicker");t&&t.flatpickr&&t.flatpickr.open()},50)}showSelect(){this.pickerWrapperTarget.style.display="none",this.selectWrapperTarget.style.display="block";let r=this.selectWrapperTarget.querySelector("select");r&&(r.dataset.mode==="recent_custom"?r.value="recent":r.value="last_day")}initializeDatePicker(){let r=this.pickerWrapperTarget.querySelector('input[type="text"]');if(!r||!r.value)return;let t=this.application.getControllerForElementAndIdentifier(r,"rails-pulse--datepicker");if(t&&t.flatpickr){let e=r.value;if(e.includes(" to ")){let[i,n]=e.split(" to ").map(a=>a.trim());t.flatpickr.setDate([i,n],!1)}}}};se(lf,"targets",["selectWrapper","pickerWrapper"]);var uf=class extends xe{toggle(){let r=this.element.dataset.active!=="false";this.element.dataset.active=r?"false":"true",document.dispatchEvent(new CustomEvent("rails-pulse:toggle-series",{detail:{chartId:this.chartIdValue,seriesName:this.seriesNameValue}}))}};se(uf,"values",{seriesName:String,chartId:String});var cf=class extends xe{connect(){this.syncUi()}toggle(){let r=this.element.dataset.active!=="false";this.element.dataset.active=r?"false":"true",this.syncUi(),document.dispatchEvent(new CustomEvent("rails-pulse:toggle-deployment-markers",{detail:{visible:!r}}))}syncUi(){let r=this.element.dataset.active!=="false";this.hasButtonTarget&&(this.buttonTarget.dataset.active=r?"true":"false"),this.hasMessageTarget&&(this.messageTarget.style.display=r?"inline":"none")}};se(cf,"targets",["button","message"]);var ff=class extends xe{showTooltip(r){let t=r.currentTarget,e=this.tooltipTarget;e.querySelector("[data-flame-type]").textContent=t.dataset.opType.replace(/_/g," "),e.querySelector("[data-flame-label]").textContent=t.dataset.opLabel,e.querySelector("[data-flame-duration]").textContent=t.dataset.opDuration,e.querySelector("[data-flame-impact]").textContent=t.dataset.opImpact,e.classList.remove("hidden")}moveTooltip(r){let t=this.tooltipTarget;if(t.classList.contains("hidden"))return;let e=Math.min(r.clientX+16,window.innerWidth-320),i=Math.max(r.clientY-80,8);t.style.left=`${e}px`,t.style.top=`${i}px`}hideTooltip(){this.tooltipTarget.classList.add("hidden")}navigate(r){let t=r.currentTarget.dataset.opUrl;t&&(window.location.href=t)}};se(ff,"targets",["tooltip"]);var Vl=class extends xe{connect(){let t=new URLSearchParams(window.location.search).get("chart_type");t&&(this.selectedValue=t),this.showSelected(),this.syncHiddenInput()}switch(r){let t=this.selectedValue,e=r.currentTarget.dataset.chartType,i=this.chartTargets.find(o=>o.dataset.chartType===t),n=this.chartTargets.find(o=>o.dataset.chartType===e);this.selectedValue=e,this.showSelected();let a=new URL(window.location.href);a.searchParams.set("chart_type",e),window.history.replaceState({},"",a),this.syncHiddenInput(),this.dispatch("switched",{detail:{fromId:i?.dataset.chartId,toId:n?.dataset.chartId}})}syncHiddenInput(){this.hasChartTypeInputTarget&&(this.chartTypeInputTarget.value=this.selectedValue)}showSelected(){let r=this.selectedValue;this.chartTargets.forEach(t=>{t.style.display=t.dataset.chartType===r?"block":"none"}),this.buttonTargets.forEach(t=>{t.dataset.active=t.dataset.chartType===r?"true":"false"}),this.toggleGroupTargets.forEach(t=>{t.style.display=t.dataset.chartType===r?"flex":"none"})}};se(Vl,"targets",["chart","button","toggleGroup","chartTypeInput"]),se(Vl,"values",{selected:{type:String,default:"response_time"}});var Ul=class extends xe{selectPreset(r){r.preventDefault();let e=r.currentTarget.dataset.preset;this.submitTimeRange(e,null,null)}showCustom(r){r.preventDefault();let t=this.element.querySelector('[role="menu"]').closest("[popover]");t&&t.hidePopover(),this.hasModalWrapperTarget&&(this.modalWrapperTarget.style.display="flex",document.body.style.overflow="hidden")}cancelCustom(r){r.preventDefault(),this.hasDateInputTarget&&(this.dateInputTarget.value=""),this.closeModal()}closeModal(){this.hasModalWrapperTarget&&(this.modalWrapperTarget.style.display="none",document.body.style.overflow="")}closeOnClickOutside(r){this.hasModalTarget&&r.target===this.modalWrapperTarget&&this.cancelCustom(r)}applyCustom(r){r.preventDefault();let t=this.dateInputTarget.value;if(!t||!t.includes(" to ")){alert("Please select a valid date range");return}let[e,i]=t.split(" to ").map(n=>n.trim());this.closeModal(),this.submitTimeRange(null,e,i)}submitTimeRange(r,t,e){let i=document.createElement("form");i.method="POST",i.action=this.urlValue;let n=document.querySelector('meta[name="csrf-token"]')?.content;if(n){let o=document.createElement("input");o.type="hidden",o.name="authenticity_token",o.value=n,i.appendChild(o)}let a=document.createElement("input");if(a.type="hidden",a.name="_method",a.value="patch",i.appendChild(a),r){let o=document.createElement("input");o.type="hidden",o.name="preset",o.value=r,i.appendChild(o)}else if(t&&e){let o=document.createElement("input");o.type="hidden",o.name="start_time",o.value=t,i.appendChild(o);let s=document.createElement("input");s.type="hidden",s.name="end_time",s.value=e,i.appendChild(s)}document.body.appendChild(i),i.submit()}};se(Ul,"targets",["modalWrapper","modal","dateInput","label","trigger"]),se(Ul,"values",{url:String});Pt([v_,n_,sx,R_,rx,q_,K_,G_,px]);var et=hv.start();et.debug=!1;window.Stimulus=et;window.echarts=j0;et.register("rails-pulse--context-menu",Xc);et.register("rails-pulse--datepicker",Tl);et.register("rails-pulse--dialog",jc);et.register("rails-pulse--menu",Cl);et.register("rails-pulse--popover",Il);et.register("rails-pulse--chart",of);et.register("rails-pulse--index",Nl);et.register("rails-pulse--color-scheme",Mv);et.register("rails-pulse--pagination",kl);et.register("rails-pulse--icon",Rl);et.register("rails-pulse--expandable-rows",Ov);et.register("rails-pulse--collapsible",Fl);et.register("rails-pulse--clipboard",Bl);et.register("rails-pulse--table-sort",sf);et.register("rails-pulse--global-filters",zl);et.register("rails-pulse--custom-range",lf);et.register("rails-pulse--series-toggle",uf);et.register("rails-pulse--deployment-markers-toggle",cf);et.register("rails-pulse--flame-graph",ff);et.register("rails-pulse--chart-switcher",Vl);et.register("rails-pulse--time-range",Ul);lc("railspulse",{color:["#ffc91f","#ffde66","#fbedbf"],backgroundColor:"rgba(255,255,255,0)",textStyle:{},title:{textStyle:{color:"#666666"}},line:{lineStyle:{width:"3"},symbolSize:"8"},bar:{itemStyle:{barBorderWidth:0}}});window.RailsPulse={application:et,version:"1.0.0"};})();
|
|
28
|
+
`}}function oe(){e.calendarContainer.classList.add("hasWeeks");var C=Fe("div","flatpickr-weekwrapper");C.appendChild(Fe("span","flatpickr-weekday",e.l10n.weekAbbreviation));var D=Fe("div","flatpickr-weeks");return C.appendChild(D),{weekWrapper:C,weekNumbers:D}}function ie(C,D){D===void 0&&(D=!0);var P=D?C:C-e.currentMonth;P<0&&e._hidePrevMonthArrow===!0||P>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=P,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,tt("onYearChange"),I()),L(),tt("onMonthChange"),vf())}function pe(C,D){if(C===void 0&&(C=!0),D===void 0&&(D=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,D===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var P=xv(e.config),R=P.hours,X=P.minutes,Q=P.seconds;p(R,X,Q)}e.redraw(),C&&tt("onChange")}function de(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),tt("onClose")}function te(){e.config!==void 0&&tt("onDestroy");for(var C=e._handlers.length;C--;)e._handlers[C].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var D=e.calendarContainer.parentNode;if(D.lastChild&&D.removeChild(D.lastChild),D.parentNode){for(;D.firstChild;)D.parentNode.insertBefore(D.firstChild,D);D.parentNode.removeChild(D)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(P){try{delete e[P]}catch{}})}function Te(C){return e.calendarContainer.contains(C)}function Pe(C){if(e.isOpen&&!e.config.inline){var D=gr(C),P=Te(D),R=D===e.input||D===e.altInput||e.element.contains(D)||C.path&&C.path.indexOf&&(~C.path.indexOf(e.input)||~C.path.indexOf(e.altInput)),X=!R&&!P&&!Te(C.relatedTarget),Q=!e.config.ignoredFocusElements.some(function(Me){return Me.contains(D)});X&&Q&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function vt(C){if(!(!C||e.config.minDate&&C<e.config.minDate.getFullYear()||e.config.maxDate&&C>e.config.maxDate.getFullYear())){var D=C,P=e.currentYear!==D;e.currentYear=D||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),P&&(e.redraw(),tt("onYearChange"),I())}}function bt(C,D){var P;D===void 0&&(D=!0);var R=e.parseDate(C,void 0,D);if(e.config.minDate&&R&&yr(R,e.config.minDate,D!==void 0?D:!e.minDateHasTime)<0||e.config.maxDate&&R&&yr(R,e.config.maxDate,D!==void 0?D:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(R===void 0)return!1;for(var X=!!e.config.enable,Q=(P=e.config.enable)!==null&&P!==void 0?P:e.config.disable,Me=0,le=void 0;Me<Q.length;Me++){if(le=Q[Me],typeof le=="function"&&le(R))return X;if(le instanceof Date&&R!==void 0&&le.getTime()===R.getTime())return X;if(typeof le=="string"){var Ne=e.parseDate(le,void 0,!0);return Ne&&Ne.getTime()===R.getTime()?X:!X}else if(typeof le=="object"&&R!==void 0&&le.from&&le.to&&R.getTime()>=le.from.getTime()&&R.getTime()<=le.to.getTime())return X}return!X}function ze(C){return e.daysContainer!==void 0?C.className.indexOf("hidden")===-1&&C.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(C):!1}function ut(C){var D=C.target===e._input,P=e._input.value.trimEnd()!==Nv();D&&P&&!(C.relatedTarget&&Te(C.relatedTarget))&&e.setDate(e._input.value,!0,C.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Ce(C){var D=gr(C),P=e.config.wrap?r.contains(D):D===e._input,R=e.config.allowInput,X=e.isOpen&&(!R||!P),Q=e.config.inline&&P&&!R;if(C.keyCode===13&&P){if(R)return e.setDate(e._input.value,!0,D===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),D.blur();e.open()}else if(Te(D)||X||Q){var Me=!!e.timeContainer&&e.timeContainer.contains(D);switch(C.keyCode){case 13:Me?(C.preventDefault(),l(),Iv()):tb(C);break;case 27:C.preventDefault(),Iv();break;case 8:case 46:P&&!e.config.allowInput&&(C.preventDefault(),e.clear());break;case 37:case 39:if(!Me&&!P){C.preventDefault();var le=a();if(e.daysContainer!==void 0&&(R===!1||le&&ze(le))){var Ne=C.keyCode===39?1:-1;C.ctrlKey?(C.stopPropagation(),ie(Ne),M(A(1),0)):M(void 0,Ne)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:C.preventDefault();var ae=C.keyCode===40?1:-1;e.daysContainer&&D.$i!==void 0||D===e.input||D===e.altInput?C.ctrlKey?(C.stopPropagation(),vt(e.currentYear-ae),M(A(1),0)):Me||M(void 0,ae*7):D===e.currentYearElement?vt(e.currentYear-ae):e.config.enableTime&&(!Me&&e.hourElement&&e.hourElement.focus(),l(C),e._debouncedChange());break;case 9:if(Me){var be=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(br){return br}),Ye=be.indexOf(D);if(Ye!==-1){var Di=be[Ye+(C.shiftKey?-1:1)];C.preventDefault(),(Di||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(D)&&C.shiftKey&&(C.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&D===e.amPM)switch(C.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],f(),$i();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],f(),$i();break}(P||Te(D))&&tt("onKeyDown",C)}function Ie(C,D){if(D===void 0&&(D="flatpickr-day"),!(e.selectedDates.length!==1||C&&(!C.classList.contains(D)||C.classList.contains("flatpickr-disabled")))){for(var P=C?C.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),R=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),X=Math.min(P,e.selectedDates[0].getTime()),Q=Math.max(P,e.selectedDates[0].getTime()),Me=!1,le=0,Ne=0,ae=X;ae<Q;ae+=TI.DAY)bt(new Date(ae),!0)||(Me=Me||ae>X&&ae<Q,ae<R&&(!le||ae>le)?le=ae:ae>R&&(!Ne||ae<Ne)&&(Ne=ae));var be=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+D));be.forEach(function(Ye){var Di=Ye.dateObj,br=Di.getTime(),Gl=le>0&&br<le||Ne>0&&br>Ne;if(Gl){Ye.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ko){Ye.classList.remove(Ko)});return}else if(Me&&!Gl)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ko){Ye.classList.remove(Ko)}),C!==void 0&&(C.classList.add(P<=e.selectedDates[0].getTime()?"startRange":"endRange"),R<P&&br===R?Ye.classList.add("startRange"):R>P&&br===R&&Ye.classList.add("endRange"),br>=le&&(Ne===0||br<=Ne)&&SI(br,R,P)&&Ye.classList.add("inRange"))})}}function ji(){e.isOpen&&!e.config.static&&!e.config.inline&&pf()}function Nt(C,D){if(D===void 0&&(D=e._positionElement),e.isMobile===!0){if(C){C.preventDefault();var P=gr(C);P&&P.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),tt("onOpen");return}else if(e._input.disabled||e.config.inline)return;var R=e.isOpen;e.isOpen=!0,R||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),tt("onOpen"),pf(D)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(C===void 0||!e.timeContainer.contains(C.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function Hl(C){return function(D){var P=e.config["_"+C+"Date"]=e.parseDate(D,e.config.dateFormat),R=e.config["_"+(C==="min"?"max":"min")+"Date"];P!==void 0&&(e[C==="min"?"minDateHasTime":"maxDateHasTime"]=P.getHours()>0||P.getMinutes()>0||P.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(X){return bt(X)}),!e.selectedDates.length&&C==="min"&&h(P),$i()),e.daysContainer&&(eb(),P!==void 0?e.currentYearElement[C]=P.getFullYear().toString():e.currentYearElement.removeAttribute(C),e.currentYearElement.disabled=!!R&&P!==void 0&&R.getFullYear()===P.getFullYear())}}function hf(){var C=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],D=Xt(Xt({},JSON.parse(JSON.stringify(r.dataset||{}))),t),P={};e.config.parseDate=D.parseDate,e.config.formatDate=D.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(be){e.config._enable=ib(be)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(be){e.config._disable=ib(be)}});var R=D.mode==="time";if(!D.dateFormat&&(D.enableTime||R)){var X=xt.defaultConfig.dateFormat||ya.dateFormat;P.dateFormat=D.noCalendar||R?"H:i"+(D.enableSeconds?":S":""):X+" H:i"+(D.enableSeconds?":S":"")}if(D.altInput&&(D.enableTime||R)&&!D.altFormat){var Q=xt.defaultConfig.altFormat||ya.altFormat;P.altFormat=D.noCalendar||R?"h:i"+(D.enableSeconds?":S K":" K"):Q+(" h:i"+(D.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:Hl("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:Hl("max")});var Me=function(be){return function(Ye){e.config[be==="min"?"_minTime":"_maxTime"]=e.parseDate(Ye,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:Me("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:Me("max")}),D.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,P,D);for(var le=0;le<C.length;le++)e.config[C[le]]=e.config[C[le]]===!0||e.config[C[le]]==="true";dv.filter(function(be){return e.config[be]!==void 0}).forEach(function(be){e.config[be]=gv(e.config[be]||[]).map(o)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var le=0;le<e.config.plugins.length;le++){var Ne=e.config.plugins[le](e)||{};for(var ae in Ne)dv.indexOf(ae)>-1?e.config[ae]=gv(Ne[ae]).map(o).concat(e.config[ae]):typeof D[ae]>"u"&&(e.config[ae]=Ne[ae])}D.altInputClass||(e.config.altInputClass=Jx().className+" "+e.config.altInputClass),tt("onParseConfig")}function Jx(){return e.config.wrap?r.querySelector("[data-input]"):r}function Qx(){typeof e.config.locale!="object"&&typeof xt.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Xt(Xt({},xt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?xt.l10ns[e.config.locale]:void 0),In.D="("+e.l10n.weekdays.shorthand.join("|")+")",In.l="("+e.l10n.weekdays.longhand.join("|")+")",In.M="("+e.l10n.months.shorthand.join("|")+")",In.F="("+e.l10n.months.longhand.join("|")+")",In.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var C=Xt(Xt({},t),JSON.parse(JSON.stringify(r.dataset||{})));C.time_24hr===void 0&&xt.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Hx(e),e.parseDate=yv({config:e.config,l10n:e.l10n})}function pf(C){if(typeof e.config.position=="function")return void e.config.position(e,C);if(e.calendarContainer!==void 0){tt("onPreCalendarPosition");var D=C||e._positionElement,P=Array.prototype.reduce.call(e.calendarContainer.children,(function(DL,EL){return DL+EL.offsetHeight}),0),R=e.calendarContainer.offsetWidth,X=e.config.position.split(" "),Q=X[0],Me=X.length>1?X[1]:null,le=D.getBoundingClientRect(),Ne=window.innerHeight-le.bottom,ae=Q==="above"||Q!=="below"&&Ne<P&&le.top>P,be=window.pageYOffset+le.top+(ae?-P-2:D.offsetHeight+2);if(Zt(e.calendarContainer,"arrowTop",!ae),Zt(e.calendarContainer,"arrowBottom",ae),!e.config.inline){var Ye=window.pageXOffset+le.left,Di=!1,br=!1;Me==="center"?(Ye-=(R-le.width)/2,Di=!0):Me==="right"&&(Ye-=R-le.width,br=!0),Zt(e.calendarContainer,"arrowLeft",!Di&&!br),Zt(e.calendarContainer,"arrowCenter",Di),Zt(e.calendarContainer,"arrowRight",br);var Gl=window.document.body.offsetWidth-(window.pageXOffset+le.right),Ko=Ye+R>window.document.body.offsetWidth,xL=Gl+R>window.document.body.offsetWidth;if(Zt(e.calendarContainer,"rightMost",Ko),!e.config.static)if(e.calendarContainer.style.top=be+"px",!Ko)e.calendarContainer.style.left=Ye+"px",e.calendarContainer.style.right="auto";else if(!xL)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Gl+"px";else{var kv=uL();if(kv===void 0)return;var bL=window.document.body.offsetWidth,SL=Math.max(0,bL/2-R/2),wL=".flatpickr-calendar.centerMost:before",TL=".flatpickr-calendar.centerMost:after",CL=kv.cssRules.length,AL="{left:"+le.left+"px;right:auto;}";Zt(e.calendarContainer,"rightMost",!1),Zt(e.calendarContainer,"centerMost",!0),kv.insertRule(wL+","+TL+AL,CL),e.calendarContainer.style.left=SL+"px",e.calendarContainer.style.right="auto"}}}}function uL(){for(var C=null,D=0;D<document.styleSheets.length;D++){var P=document.styleSheets[D];if(P.cssRules){try{P.cssRules}catch{continue}C=P;break}}return C??cL()}function cL(){var C=document.createElement("style");return document.head.appendChild(C),C.sheet}function eb(){e.config.noCalendar||e.isMobile||(I(),vf(),L())}function Iv(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function tb(C){C.preventDefault(),C.stopPropagation();var D=function(be){return be.classList&&be.classList.contains("flatpickr-day")&&!be.classList.contains("flatpickr-disabled")&&!be.classList.contains("notAllowed")},P=Vx(gr(C),D);if(P!==void 0){var R=P,X=e.latestSelectedDateObj=new Date(R.dateObj.getTime()),Q=(X.getMonth()<e.currentMonth||X.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=R,e.config.mode==="single")e.selectedDates=[X];else if(e.config.mode==="multiple"){var Me=Pv(X);Me?e.selectedDates.splice(parseInt(Me),1):e.selectedDates.push(X)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=X,e.selectedDates.push(X),yr(X,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(be,Ye){return be.getTime()-Ye.getTime()}));if(f(),Q){var le=e.currentYear!==X.getFullYear();e.currentYear=X.getFullYear(),e.currentMonth=X.getMonth(),le&&(tt("onYearChange"),I()),tt("onMonthChange")}if(vf(),L(),$i(),!Q&&e.config.mode!=="range"&&e.config.showMonths===1?T(R):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Ne=e.config.mode==="single"&&!e.config.enableTime,ae=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Ne||ae)&&Iv()}m()}}var df={locale:[Qx,j],showMonths:[z,s,G],minDate:[y],maxDate:[y],positionElement:[nb],clickOpens:[function(){e.config.clickOpens===!0?(v(e._input,"focus",e.open),v(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function fL(C,D){if(C!==null&&typeof C=="object"){Object.assign(e.config,C);for(var P in C)df[P]!==void 0&&df[P].forEach(function(R){return R()})}else e.config[C]=D,df[C]!==void 0?df[C].forEach(function(R){return R()}):dv.indexOf(C)>-1&&(e.config[C]=gv(D));e.redraw(),$i(!0)}function rb(C,D){var P=[];if(C instanceof Array)P=C.map(function(R){return e.parseDate(R,D)});else if(C instanceof Date||typeof C=="number")P=[e.parseDate(C,D)];else if(typeof C=="string")switch(e.config.mode){case"single":case"time":P=[e.parseDate(C,D)];break;case"multiple":P=C.split(e.config.conjunction).map(function(R){return e.parseDate(R,D)});break;case"range":P=C.split(e.l10n.rangeSeparator).map(function(R){return e.parseDate(R,D)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(C)));e.selectedDates=e.config.allowInvalidPreload?P:P.filter(function(R){return R instanceof Date&&bt(R,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(R,X){return R.getTime()-X.getTime()})}function hL(C,D,P){if(D===void 0&&(D=!1),P===void 0&&(P=e.config.dateFormat),C!==0&&!C||C instanceof Array&&C.length===0)return e.clear(D);rb(C,P),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),y(void 0,D),h(),e.selectedDates.length===0&&e.clear(!1),$i(D),D&&tt("onChange")}function ib(C){return C.slice().map(function(D){return typeof D=="string"||typeof D=="number"||D instanceof Date?e.parseDate(D,void 0,!0):D&&typeof D=="object"&&D.from&&D.to?{from:e.parseDate(D.from,void 0),to:e.parseDate(D.to,void 0)}:D}).filter(function(D){return D})}function pL(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var C=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);C&&rb(C,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function dL(){if(e.input=Jx(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=Fe(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),nb()}function nb(){e._positionElement=e.config.positionElement||e._input}function vL(){var C=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=Fe("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=C,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=C==="datetime-local"?"Y-m-d\\TH:i:S":C==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}v(e.mobileInput,"change",function(D){e.setDate(gr(D).value,!1,e.mobileFormatStr),tt("onChange"),tt("onClose")})}function mL(C){if(e.isOpen===!0)return e.close();e.open(C)}function tt(C,D){if(e.config!==void 0){var P=e.config[C];if(P!==void 0&&P.length>0)for(var R=0;P[R]&&R<P.length;R++)P[R](e.selectedDates,e.input.value,e,D);C==="onChange"&&(e.input.dispatchEvent(Lv("change")),e.input.dispatchEvent(Lv("input")))}}function Lv(C){var D=document.createEvent("Event");return D.initEvent(C,!0,!0),D}function Pv(C){for(var D=0;D<e.selectedDates.length;D++){var P=e.selectedDates[D];if(P instanceof Date&&yr(P,C)===0)return""+D}return!1}function gL(C){return e.config.mode!=="range"||e.selectedDates.length<2?!1:yr(C,e.selectedDates[0])>=0&&yr(C,e.selectedDates[1])<=0}function vf(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(C,D){var P=new Date(e.currentYear,e.currentMonth,1);P.setMonth(e.currentMonth+D),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[D].textContent=jc(P.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=P.getMonth().toString(),C.value=P.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Nv(C){var D=C||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(P){return e.formatDate(P,D)}).filter(function(P,R,X){return e.config.mode!=="range"||e.config.enableTime||X.indexOf(P)===R}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function $i(C){C===void 0&&(C=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Nv(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Nv(e.config.altFormat)),C!==!1&&tt("onValueUpdate")}function yL(C){var D=gr(C),P=e.prevMonthNav.contains(D),R=e.nextMonthNav.contains(D);P||R?ie(P?-1:1):e.yearElements.indexOf(D)>=0?D.select():D.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):D.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function _L(C){C.preventDefault();var D=C.type==="keydown",P=gr(C),R=P;e.amPM!==void 0&&P===e.amPM&&(e.amPM.textContent=e.l10n.amPM[mr(e.amPM.textContent===e.l10n.amPM[0])]);var X=parseFloat(R.getAttribute("min")),Q=parseFloat(R.getAttribute("max")),Me=parseFloat(R.getAttribute("step")),le=parseInt(R.value,10),Ne=C.delta||(D?C.which===38?1:-1:0),ae=le+Me*Ne;if(typeof R.value<"u"&&R.value.length===2){var be=R===e.hourElement,Ye=R===e.minuteElement;ae<X?(ae=Q+ae+mr(!be)+(mr(be)&&mr(!e.amPM)),Ye&&x(void 0,-1,e.hourElement)):ae>Q&&(ae=R===e.hourElement?ae-Q-mr(!e.amPM):X,Ye&&x(void 0,1,e.hourElement)),e.amPM&&be&&(Me===1?ae+le===23:Math.abs(ae-le)>Me)&&(e.amPM.textContent=e.l10n.amPM[mr(e.amPM.textContent===e.l10n.amPM[0])]),R.value=Wt(ae)}}return n(),e}function wl(r,t){for(var e=Array.prototype.slice.call(r).filter(function(o){return o instanceof HTMLElement}),i=[],n=0;n<e.length;n++){var a=e[n];try{if(a.getAttribute("data-fp-omit")!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=t5(a,t||{}),i.push(a._flatpickr)}catch(o){console.error(o)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return wl(this,r)},HTMLElement.prototype.flatpickr=function(r){return wl([this],r)});var xt=function(r,t){return typeof r=="string"?wl(window.document.querySelectorAll(r),t):r instanceof Node?wl([r],t):wl(r,t)};xt.defaultConfig={};xt.l10ns={en:Xt({},mv),default:Xt({},mv)};xt.localize=function(r){xt.l10ns.default=Xt(Xt({},xt.l10ns.default),r)};xt.setDefaults=function(r){xt.defaultConfig=Xt(Xt({},xt.defaultConfig),r)};xt.parseDate=yv({});xt.formatDate=Hx({});xt.compareDates=yr;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return wl(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=xt);var bv=xt;var wi,AI,DI,EI,Gx,Tl=class extends xe{constructor(){super(...arguments);Ji(this,wi)}connect(){this.typeValue=="time"?this.flatpickr=bv(this.element,Bt(this,wi,AI)):this.typeValue=="datetime"?this.flatpickr=bv(this.element,Bt(this,wi,DI)):this.flatpickr=bv(this.element,Bt(this,wi,EI))}disconnect(){this.flatpickr.destroy()}};wi=new WeakSet,AI=function(){return{dateFormat:"H:i",enableTime:!0,noCalendar:!0}},DI=function(){return{...Bt(this,wi,Gx),altFormat:this.dateTimeFormatValue,dateFormat:"Y-m-d H:i",enableTime:!0}},EI=function(){return{...Bt(this,wi,Gx),altFormat:this.dateFormatValue,dateFormat:"Y-m-d"}},Gx=function(){return{altInput:!0,disable:this.disableValue,mode:this.modeValue,showMonths:this.showMonthsValue}},se(Tl,"targets",["details"]),se(Tl,"values",{type:String,disable:Array,mode:{type:String,default:"single"},showMonths:{type:Number,default:1},dateFormat:{type:String,default:"F d, Y"},dateTimeFormat:{type:String,default:"M d, Y h:i K"}});var $c=class extends xe{show(){this.menuTarget.show()}showModal(){this.menuTarget.showModal()}close(){this.menuTarget.close()}closeOnClickOutside({target:r}){r.nodeName==="DIALOG"&&this.close()}};se($c,"targets",["menu"]);var Al,_r,MI,Sv,OI,II,LI,Cl=class extends xe{constructor(){super(...arguments);Ji(this,_r);Ji(this,Al)}initialize(){Yl(this,Al,new IntersectionObserver(xa(this,_r,MI).bind(this)))}connect(){Bt(this,Al).observe(this.element)}disconnect(){Bt(this,Al).disconnect()}prev(){this.indexValue>0&&(this.indexValue--,xa(this,_r,Sv).call(this))}next(){this.indexValue<Bt(this,_r,LI)&&(this.indexValue++,xa(this,_r,Sv).call(this))}};Al=new WeakMap,_r=new WeakSet,MI=function([t]){t.isIntersecting&&(this.indexValue=0,xa(this,_r,Sv).call(this))},Sv=function(){xa(this,_r,OI).call(this),xa(this,_r,II).call(this)},OI=function(){this.itemTargets.forEach((t,e)=>{t.tabIndex=e===this.indexValue?0:-1})},II=function(){this.itemTargets[this.indexValue].focus()},LI=function(){return this.itemTargets.length-1},se(Cl,"targets",["item"]),se(Cl,"values",{index:Number});var Dl=Math.min,Ln=Math.max,Qc=Math.round,ef=Math.floor,Ti=r=>({x:r,y:r}),r5={left:"right",right:"left",bottom:"top",top:"bottom"},i5={start:"end",end:"start"};function Yx(r,t,e){return Ln(r,Dl(t,e))}function tf(r,t){return typeof r=="function"?r(t):r}function _a(r){return r.split("-")[0]}function rf(r){return r.split("-")[1]}function Wx(r){return r==="x"?"y":"x"}function Zx(r){return r==="y"?"height":"width"}var n5=new Set(["top","bottom"]);function Pn(r){return n5.has(_a(r))?"y":"x"}function Xx(r){return Wx(Pn(r))}function kI(r,t,e){e===void 0&&(e=!1);let i=rf(r),n=Xx(r),a=Zx(n),o=n==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Jc(o)),[o,Jc(o)]}function RI(r){let t=Jc(r);return[wv(r),t,wv(t)]}function wv(r){return r.replace(/start|end/g,t=>i5[t])}var PI=["left","right"],NI=["right","left"],a5=["top","bottom"],o5=["bottom","top"];function s5(r,t,e){switch(r){case"top":case"bottom":return e?t?NI:PI:t?PI:NI;case"left":case"right":return t?a5:o5;default:return[]}}function FI(r,t,e,i){let n=rf(r),a=s5(_a(r),e==="start",i);return n&&(a=a.map(o=>o+"-"+n),t&&(a=a.concat(a.map(wv)))),a}function Jc(r){return r.replace(/left|right|bottom|top/g,t=>r5[t])}function l5(r){return{top:0,right:0,bottom:0,left:0,...r}}function BI(r){return typeof r!="number"?l5(r):{top:r,right:r,bottom:r,left:r}}function Yo(r){let{x:t,y:e,width:i,height:n}=r;return{width:i,height:n,top:e,left:t,right:t+i,bottom:e+n,x:t,y:e}}function zI(r,t,e){let{reference:i,floating:n}=r,a=Pn(t),o=Xx(t),s=Zx(o),l=_a(t),u=a==="y",c=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2,h=i[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-n.width,y:f};break;default:p={x:i.x,y:i.y}}switch(rf(t)){case"start":p[o]-=h*(e&&u?-1:1);break;case"end":p[o]+=h*(e&&u?-1:1);break}return p}var VI=async(r,t,e)=>{let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:o}=e,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t)),u=await o.getElementRects({reference:r,floating:t,strategy:n}),{x:c,y:f}=zI(u,i,l),h=i,p={},d=0;for(let v=0;v<s.length;v++){let{name:m,fn:g}=s[v],{x:y,y:_,data:x,reset:b}=await g({x:c,y:f,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:u,platform:o,elements:{reference:r,floating:t}});c=y??c,f=_??f,p={...p,[m]:{...p[m],...x}},b&&d<=50&&(d++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(u=b.rects===!0?await o.getElementRects({reference:r,floating:t,strategy:n}):b.rects),{x:c,y:f}=zI(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:n,middlewareData:p}};async function Kx(r,t){var e;t===void 0&&(t={});let{x:i,y:n,platform:a,rects:o,elements:s,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=tf(t,r),d=BI(p),m=s[h?f==="floating"?"reference":"floating":f],g=Yo(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(m)))==null||e?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},b=Yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:_,strategy:l}):y);return{top:(g.top-b.top+d.top)/x.y,bottom:(b.bottom-g.bottom+d.bottom)/x.y,left:(g.left-b.left+d.left)/x.x,right:(b.right-g.right+d.right)/x.x}}var UI=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(t){var e,i;let{placement:n,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:v=!0,...m}=tf(r,t);if((e=a.arrow)!=null&&e.alignmentOffset)return{};let g=_a(n),y=Pn(s),_=_a(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),b=h||(_||!v?[Jc(s)]:RI(s)),S=d!=="none";!h&&S&&b.push(...FI(s,v,d,x));let T=[s,...b],A=await Kx(t,m),E=[],M=((i=a.flip)==null?void 0:i.overflows)||[];if(c&&E.push(A[g]),f){let k=kI(n,o,x);E.push(A[k[0]],A[k[1]])}if(M=[...M,{placement:n,overflows:E}],!E.every(k=>k<=0)){var O,L;let k=(((O=a.flip)==null?void 0:O.index)||0)+1,z=T[k];if(z&&(!(f==="alignment"?y!==Pn(z):!1)||M.every(G=>G.overflows[0]>0&&Pn(G.placement)===y)))return{data:{index:k,overflows:M},reset:{placement:z}};let V=(L=M.filter(q=>q.overflows[0]<=0).sort((q,G)=>q.overflows[1]-G.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(p){case"bestFit":{var I;let q=(I=M.filter(G=>{if(S){let j=Pn(G.placement);return j===y||j==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(j=>j>0).reduce((j,oe)=>j+oe,0)]).sort((G,j)=>G[1]-j[1])[0])==null?void 0:I[0];q&&(V=q);break}case"initialPlacement":V=s;break}if(n!==V)return{reset:{placement:V}}}return{}}}};var u5=new Set(["left","top"]);async function c5(r,t){let{placement:e,platform:i,elements:n}=r,a=await(i.isRTL==null?void 0:i.isRTL(n.floating)),o=_a(e),s=rf(e),l=Pn(e)==="y",u=u5.has(o)?-1:1,c=a&&l?-1:1,f=tf(t,r),{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof d=="number"&&(p=s==="end"?d*-1:d),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}var HI=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(t){var e,i;let{x:n,y:a,placement:o,middlewareData:s}=t,l=await c5(t,r);return o===((e=s.offset)==null?void 0:e.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:o}}}}},GI=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(t){let{x:e,y:i,placement:n}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:m=>{let{x:g,y}=m;return{x:g,y}}},...l}=tf(r,t),u={x:e,y:i},c=await Kx(t,l),f=Pn(_a(n)),h=Wx(f),p=u[h],d=u[f];if(a){let m=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=p+c[m],_=p-c[g];p=Yx(y,p,_)}if(o){let m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=d+c[m],_=d-c[g];d=Yx(y,d,_)}let v=s.fn({...t,[h]:p,[f]:d});return{...v,data:{x:v.x-e,y:v.y-i,enabled:{[h]:a,[f]:o}}}}}};function Tv(){return typeof window<"u"}function Wo(r){return WI(r)?(r.nodeName||"").toLowerCase():"#document"}function xr(r){var t;return(r==null||(t=r.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(r){var t;return(t=(WI(r)?r.ownerDocument:r.document)||window.document)==null?void 0:t.documentElement}function WI(r){return Tv()?r instanceof Node||r instanceof xr(r).Node:!1}function oi(r){return Tv()?r instanceof Element||r instanceof xr(r).Element:!1}function Ai(r){return Tv()?r instanceof HTMLElement||r instanceof xr(r).HTMLElement:!1}function YI(r){return!Tv()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof xr(r).ShadowRoot}var f5=new Set(["inline","contents"]);function Ml(r){let{overflow:t,overflowX:e,overflowY:i,display:n}=si(r);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&!f5.has(n)}var h5=new Set(["table","td","th"]);function ZI(r){return h5.has(Wo(r))}var p5=[":popover-open",":modal"];function nf(r){return p5.some(t=>{try{return r.matches(t)}catch{return!1}})}var d5=["transform","translate","scale","rotate","perspective"],v5=["transform","translate","scale","rotate","perspective","filter"],m5=["paint","layout","strict","content"];function Cv(r){let t=Av(),e=oi(r)?si(r):r;return d5.some(i=>e[i]?e[i]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||v5.some(i=>(e.willChange||"").includes(i))||m5.some(i=>(e.contain||"").includes(i))}function XI(r){let t=Nn(r);for(;Ai(t)&&!Zo(t);){if(Cv(t))return t;if(nf(t))return null;t=Nn(t)}return null}function Av(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var g5=new Set(["html","body","#document"]);function Zo(r){return g5.has(Wo(r))}function si(r){return xr(r).getComputedStyle(r)}function af(r){return oi(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Nn(r){if(Wo(r)==="html")return r;let t=r.assignedSlot||r.parentNode||YI(r)&&r.host||Ci(r);return YI(t)?t.host:t}function KI(r){let t=Nn(r);return Zo(t)?r.ownerDocument?r.ownerDocument.body:r.body:Ai(t)&&Ml(t)?t:KI(t)}function El(r,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let n=KI(r),a=n===((i=r.ownerDocument)==null?void 0:i.body),o=xr(n);if(a){let s=Dv(o);return t.concat(o,o.visualViewport||[],Ml(n)?n:[],s&&e?El(s):[])}return t.concat(n,El(n,[],e))}function Dv(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function $I(r){let t=si(r),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=Ai(r),a=n?r.offsetWidth:e,o=n?r.offsetHeight:i,s=Qc(e)!==a||Qc(i)!==o;return s&&(e=a,i=o),{width:e,height:i,$:s}}function jx(r){return oi(r)?r:r.contextElement}function Ol(r){let t=jx(r);if(!Ai(t))return Ti(1);let e=t.getBoundingClientRect(),{width:i,height:n,$:a}=$I(t),o=(a?Qc(e.width):e.width)/i,s=(a?Qc(e.height):e.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var y5=Ti(0);function JI(r){let t=xr(r);return!Av()||!t.visualViewport?y5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _5(r,t,e){return t===void 0&&(t=!1),!e||t&&e!==xr(r)?!1:t}function Xo(r,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let n=r.getBoundingClientRect(),a=jx(r),o=Ti(1);t&&(i?oi(i)&&(o=Ol(i)):o=Ol(r));let s=_5(a,e,i)?JI(a):Ti(0),l=(n.left+s.x)/o.x,u=(n.top+s.y)/o.y,c=n.width/o.x,f=n.height/o.y;if(a){let h=xr(a),p=i&&oi(i)?xr(i):i,d=h,v=Dv(d);for(;v&&i&&p!==d;){let m=Ol(v),g=v.getBoundingClientRect(),y=si(v),_=g.left+(v.clientLeft+parseFloat(y.paddingLeft))*m.x,x=g.top+(v.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,f*=m.y,l+=_,u+=x,d=xr(v),v=Dv(d)}}return Yo({width:c,height:f,x:l,y:u})}function $x(r,t){let e=af(r).scrollLeft;return t?t.left+e:Xo(Ci(r)).left+e}function QI(r,t,e){e===void 0&&(e=!1);let i=r.getBoundingClientRect(),n=i.left+t.scrollLeft-(e?0:$x(r,i)),a=i.top+t.scrollTop;return{x:n,y:a}}function x5(r){let{elements:t,rect:e,offsetParent:i,strategy:n}=r,a=n==="fixed",o=Ci(i),s=t?nf(t.floating):!1;if(i===o||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Ti(1),c=Ti(0),f=Ai(i);if((f||!f&&!a)&&((Wo(i)!=="body"||Ml(o))&&(l=af(i)),Ai(i))){let p=Xo(i);u=Ol(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}let h=o&&!f&&!a?QI(o,l,!0):Ti(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function b5(r){return Array.from(r.getClientRects())}function S5(r){let t=Ci(r),e=af(r),i=r.ownerDocument.body,n=Ln(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Ln(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+$x(r),s=-e.scrollTop;return si(i).direction==="rtl"&&(o+=Ln(t.clientWidth,i.clientWidth)-n),{width:n,height:a,x:o,y:s}}function w5(r,t){let e=xr(r),i=Ci(r),n=e.visualViewport,a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(n){a=n.width,o=n.height;let u=Av();(!u||u&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:a,height:o,x:s,y:l}}var T5=new Set(["absolute","fixed"]);function C5(r,t){let e=Xo(r,!0,t==="fixed"),i=e.top+r.clientTop,n=e.left+r.clientLeft,a=Ai(r)?Ol(r):Ti(1),o=r.clientWidth*a.x,s=r.clientHeight*a.y,l=n*a.x,u=i*a.y;return{width:o,height:s,x:l,y:u}}function qI(r,t,e){let i;if(t==="viewport")i=w5(r,e);else if(t==="document")i=S5(Ci(r));else if(oi(t))i=C5(t,e);else{let n=JI(r);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Yo(i)}function eL(r,t){let e=Nn(r);return e===t||!oi(e)||Zo(e)?!1:si(e).position==="fixed"||eL(e,t)}function A5(r,t){let e=t.get(r);if(e)return e;let i=El(r,[],!1).filter(s=>oi(s)&&Wo(s)!=="body"),n=null,a=si(r).position==="fixed",o=a?Nn(r):r;for(;oi(o)&&!Zo(o);){let s=si(o),l=Cv(o);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&T5.has(n.position)||Ml(o)&&!l&&eL(r,o))?i=i.filter(c=>c!==o):n=s,o=Nn(o)}return t.set(r,i),i}function D5(r){let{element:t,boundary:e,rootBoundary:i,strategy:n}=r,o=[...e==="clippingAncestors"?nf(t)?[]:A5(t,this._c):[].concat(e),i],s=o[0],l=o.reduce((u,c)=>{let f=qI(t,c,n);return u.top=Ln(f.top,u.top),u.right=Dl(f.right,u.right),u.bottom=Dl(f.bottom,u.bottom),u.left=Ln(f.left,u.left),u},qI(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function E5(r){let{width:t,height:e}=$I(r);return{width:t,height:e}}function M5(r,t,e){let i=Ai(t),n=Ci(t),a=e==="fixed",o=Xo(r,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Ti(0);function u(){l.x=$x(n)}if(i||!i&&!a)if((Wo(t)!=="body"||Ml(n))&&(s=af(t)),i){let p=Xo(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!i&&n&&u();let c=n&&!i&&!a?QI(n,s):Ti(0),f=o.left+s.scrollLeft-l.x-c.x,h=o.top+s.scrollTop-l.y-c.y;return{x:f,y:h,width:o.width,height:o.height}}function qx(r){return si(r).position==="static"}function jI(r,t){if(!Ai(r)||si(r).position==="fixed")return null;if(t)return t(r);let e=r.offsetParent;return Ci(r)===e&&(e=e.ownerDocument.body),e}function tL(r,t){let e=xr(r);if(nf(r))return e;if(!Ai(r)){let n=Nn(r);for(;n&&!Zo(n);){if(oi(n)&&!qx(n))return n;n=Nn(n)}return e}let i=jI(r,t);for(;i&&ZI(i)&&qx(i);)i=jI(i,t);return i&&Zo(i)&&qx(i)&&!Cv(i)?e:i||XI(r)||e}var O5=async function(r){let t=this.getOffsetParent||tL,e=this.getDimensions,i=await e(r.floating);return{reference:M5(r.reference,await t(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function I5(r){return si(r).direction==="rtl"}var L5={convertOffsetParentRelativeRectToViewportRelativeRect:x5,getDocumentElement:Ci,getClippingRect:D5,getOffsetParent:tL,getElementRects:O5,getClientRects:b5,getDimensions:E5,getScale:Ol,isElement:oi,isRTL:I5};function rL(r,t){return r.x===t.x&&r.y===t.y&&r.width===t.width&&r.height===t.height}function P5(r,t){let e=null,i,n=Ci(r);function a(){var s;clearTimeout(i),(s=e)==null||s.disconnect(),e=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=r.getBoundingClientRect(),{left:c,top:f,width:h,height:p}=u;if(s||t(),!h||!p)return;let d=ef(f),v=ef(n.clientWidth-(c+h)),m=ef(n.clientHeight-(f+p)),g=ef(c),_={rootMargin:-d+"px "+-v+"px "+-m+"px "+-g+"px",threshold:Ln(0,Dl(1,l))||1},x=!0;function b(S){let T=S[0].intersectionRatio;if(T!==l){if(!x)return o();T?o(!1,T):i=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!rL(u,r.getBoundingClientRect())&&o(),x=!1}try{e=new IntersectionObserver(b,{..._,root:n.ownerDocument})}catch{e=new IntersectionObserver(b,_)}e.observe(r)}return o(!0),a}function iL(r,t,e,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=jx(r),c=n||a?[...u?El(u):[],...El(t)]:[];c.forEach(g=>{n&&g.addEventListener("scroll",e,{passive:!0}),a&&g.addEventListener("resize",e)});let f=u&&s?P5(u,e):null,h=-1,p=null;o&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),e()}),u&&!l&&p.observe(u),p.observe(t));let d,v=l?Xo(r):null;l&&m();function m(){let g=Xo(r);v&&!rL(v,g)&&e(),v=g,d=requestAnimationFrame(m)}return e(),()=>{var g;c.forEach(y=>{n&&y.removeEventListener("scroll",e),a&&y.removeEventListener("resize",e)}),f?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(d)}}var nL=HI;var aL=GI,oL=UI;var sL=(r,t,e)=>{let i=new Map,n={platform:L5,...e},a={...n.platform,_c:i};return VI(r,t,{...n,platform:a})};function N5(){let r=document.querySelector('meta[name="csrf-token"]');return r?r.content:null}async function k5(r,t={}){let e={Accept:"text/html","X-Partial-Request":"true","X-Requested-With":"XMLHttpRequest"},i=t.method||"GET";if(i!=="GET"){let s=N5();s&&(e["X-CSRF-Token"]=s)}let n=await fetch(r,{method:i,headers:{...e,...t.headers},...t});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.text();return new DOMParser().parseFromString(a,"text/html")}function R5(r,t){for(;r.firstChild;)r.removeChild(r.firstChild);Array.from(t.childNodes).forEach(e=>{r.appendChild(e.cloneNode(!0))})}async function kn(r,t,e={}){let i=await k5(r,e),n=e.selector||`#${t.id}`,a=i.querySelector(n);if(a)return R5(t,a),!0;for(;t.firstChild;)t.removeChild(t.firstChild);return!1}var Ll,Pl,Ev,lL,Il=class extends xe{constructor(){super(...arguments);Ji(this,Ev);Ji(this,Ll,null);Ji(this,Pl,null)}initialize(){this.orient=this.orient.bind(this)}connect(){this.cleanup=iL(this.buttonTarget,this.menuTarget,this.orient)}disconnect(){clearTimeout(Bt(this,Ll)),clearTimeout(Bt(this,Pl)),this.cleanup()}show(t){t&&t.preventDefault(),this.menuTarget.showPopover({source:this.buttonTarget}),this.orient(),this.loadOperationDetailsIfNeeded()}hide(){this.menuTarget.hidePopover()}toggle(t){t.preventDefault(),this.menuTarget.togglePopover({source:this.buttonTarget}),this.orient(),this.loadOperationDetailsIfNeeded()}debouncedShow(){clearTimeout(Bt(this,Pl)),Yl(this,Ll,setTimeout(()=>this.show(),700))}debouncedHide(){clearTimeout(Bt(this,Ll)),Yl(this,Pl,setTimeout(()=>this.hide(),300))}orient(){sL(this.buttonTarget,this.menuTarget,Bt(this,Ev,lL)).then(({x:t,y:e})=>{this.menuTarget.style.setProperty("--popover-x",`${t}px`),this.menuTarget.style.setProperty("--popover-y",`${e}px`),this.menuTarget.classList.add("positioned")})}loadOperationDetailsIfNeeded(){let t=this.menuTarget.dataset.operationUrl;if(!t)return;let e=this.menuTarget.querySelector("[data-operation-url]");!e||e.dataset.loaded||!this.hasLoadingContent(e)||kn(t,e).then(()=>{e.dataset.loaded="true"}).catch(n=>console.error("Popover details fetch error:",n))}hasLoadingContent(t){return(t.textContent||"").includes("Loading operation details")}};Ll=new WeakMap,Pl=new WeakMap,Ev=new WeakSet,lL=function(){return{placement:this.placementValue,middleware:[nL(4),oL(),aL({padding:4})]}},se(Il,"targets",["button","menu"]),se(Il,"values",{placement:{type:String,default:"top"}});var of=class extends xe{constructor(){super(...arguments);se(this,"deploymentMarkerSeriesId","rails-pulse-deployment-markers")}connect(){this.initializeChart(),this.handleColorSchemeChange=this.onColorSchemeChange.bind(this),this.handleSeriesToggle=this.onSeriesToggle.bind(this),this.handleDeploymentMarkersToggle=this.onDeploymentMarkersToggle.bind(this),document.addEventListener("rails-pulse:color-scheme-changed",this.handleColorSchemeChange),document.addEventListener("rails-pulse:toggle-series",this.handleSeriesToggle),document.addEventListener("rails-pulse:toggle-deployment-markers",this.handleDeploymentMarkersToggle)}disconnect(){document.removeEventListener("rails-pulse:color-scheme-changed",this.handleColorSchemeChange),document.removeEventListener("rails-pulse:toggle-series",this.handleSeriesToggle),document.removeEventListener("rails-pulse:toggle-deployment-markers",this.handleDeploymentMarkersToggle),this.disposeChart()}initializeChart(){this.retryCount=0,this.maxRetries=100,this.attemptInit()}attemptInit(){if(typeof echarts>"u"){if(this.retryCount++,this.retryCount>=this.maxRetries){console.error("[RailsPulse] echarts not loaded after 5 seconds for",this.element.id),this.showError();return}setTimeout(()=>this.attemptInit(),50);return}this.renderChart()}renderChart(){try{this.chart=echarts.init(this.element,this.themeValue||"railspulse");let t=this.buildChartConfig();this.chart.setOption(t),this.applyColorScheme(),document.dispatchEvent(new CustomEvent("stimulus:echarts:rendered",{detail:{containerId:this.element.id,chart:this.chart,controller:this}})),this.resizeObserver=new ResizeObserver(()=>{this.chart&&this.chart.resize()}),this.resizeObserver.observe(this.element),this.chart.on("legendselectchanged",e=>{this.handleLegendToggle(e)}),this.chart.on("click",e=>{e.componentType==="markLine"&&e.name&&navigator.clipboard.writeText(e.name).then(()=>{this.showCopiedToast(e.name)}).catch(()=>{})}),this.element.setAttribute("data-chart-rendered","true")}catch(t){console.error("[RailsPulse] Error initializing chart:",t),this.showError()}}buildChartConfig(){let t={...this.optionsValue};if(this.processFormatters(t),this.setChartData(t),!t.legend){let n=document.querySelectorAll(`[data-rails-pulse--series-toggle-chart-id-value="${this.element.id}"]`),a={};n.forEach(s=>{let l=s.getAttribute("data-rails-pulse--series-toggle-series-name-value");l&&(a[l]=s.dataset.active!=="false")});let o={};t.series&&Array.isArray(t.series)&&t.series.forEach(s=>{s.name&&(o[s.name]=s.name in a?a[s.name]:!0)}),t.legend={show:!1,selected:o}}let e=this.dataValue,i=e.deployment_markers;if(i&&i.length>0&&this._usesTimeAxisData(e)){let a=(this.element.closest('[data-controller~="rails-pulse--index"]')||document).querySelector('[data-controller~="rails-pulse--deployment-markers-toggle"]'),o=!a||a.dataset.active!=="false";t.series=t.series||[],t.series.push(this._buildDeploymentMarkerSeries(i,o))}return t}setChartData(t){let e=this.dataValue;if(e&&typeof e=="object"&&e.series){let i=e.series[0]?.data?.[0],n=Array.isArray(i)||Array.isArray(i?.value);if(t.xAxis=t.xAxis||{},n){t.xAxis.type="time";let o=this._minTimestampGapMs(e.series);o&&(t.xAxis.minInterval=o)}else t.xAxis.type="category",t.xAxis.data=e.labels;t.yAxis=t.yAxis||{},t.yAxis.type="value";let a=t.series&&!Array.isArray(t.series)?t.series:{};t.series=e.series.map(o=>({type:this.typeValue,...a,...o}))}else{let i=Object.keys(e).map(a=>{let o=Number(a);return isNaN(o)?a:o}),n=Object.values(e).map(a=>{if(typeof a=="object"&&a!==null){if(a.value!==void 0){let o=Object.keys(a);return o.length>1||o.length===1&&o[0]!=="value"?a:a.value}return a}return a});if(t.xAxis=t.xAxis||{},t.xAxis.type="category",t.xAxis.data=i,t.yAxis=t.yAxis||{},t.yAxis.type="value",Array.isArray(t.series))t.series[0]=t.series[0]||{},t.series[0].type=this.typeValue,t.series[0].data=n;else if(t.series&&typeof t.series=="object"){let a={...t.series};t.series=[{type:this.typeValue,data:n,...a}]}else t.series=[{type:this.typeValue,data:n}]}}_usesTimeAxisData(t=this.dataValue){let e=t?.series?.find(i=>Array.isArray(i?.data)&&i.data.length>0)?.data?.[0];return Array.isArray(e)||Array.isArray(e?.value)}_minTimestampGapMs(t){let e=new Set;t.forEach(a=>{(a.data||[]).forEach(o=>{let s=Array.isArray(o)?o:Array.isArray(o?.value)?o.value:null;s&&typeof s[0]=="number"&&e.add(s[0])})});let i=Array.from(e).sort((a,o)=>a-o),n=null;for(let a=1;a<i.length;a++){let o=i[a]-i[a-1];o>0&&(n===null||o<n)&&(n=o)}return n}_buildDeploymentMarkerSeries(t,e=!0){return{id:this.deploymentMarkerSeriesId,type:"line",data:[],name:"",showSymbol:!1,symbolSize:0,silent:!1,animation:!1,legendHoverLink:!1,lineStyle:{opacity:0},itemStyle:{opacity:0},tooltip:{show:!1},z:10,markLine:e?this._buildMarkLineConfig(t):{data:[]}}}_buildMarkLineConfig(t){let e=a=>{let o=a?.data?.xAxis,s=a?.data?.revision;if(typeof o!="number")return"";let l=new Date(o).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return s?`{time|${l}}
|
|
29
|
+
{revision|${s}}`:`{time|${l}}`},i={color:"#22c55e",type:"dashed",width:2,opacity:.8},n={color:"#22c55e",formatter:e,rich:{time:{color:"#22c55e",fontWeight:600},revision:{color:"#22c55e",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:11}}};return{symbol:["none","none"],silent:!1,lineStyle:i,label:{...n,show:!1},emphasis:{lineStyle:i,label:{...n,show:!0}},data:t.map(a=>({xAxis:a.timestamp,name:a.revision,revision:a.revision,started_at:a.started_at})),tooltip:{show:!0,formatter:a=>{let o=a?.data?.revision||a.name,s=a?.data?.started_at;if(!s)return o;let l=new Date(s).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return`<strong>Deploy</strong><br/><code style="font-size:11px">${o}</code><br/>${l}<br/><span style="font-size:10px;opacity:0.7">Click to copy SHA</span>`}}}}processFormatters(t){t.tooltip?.formatter&&typeof t.tooltip.formatter=="string"&&(this.isEChartsTemplate(t.tooltip.formatter)||(t.tooltip.formatter=this.parseFormatter(t.tooltip.formatter),this._tooltipFormatter=t.tooltip.formatter)),t.xAxis?.axisLabel?.formatter&&typeof t.xAxis.axisLabel.formatter=="string"&&(this.isEChartsTemplate(t.xAxis.axisLabel.formatter)||(t.xAxis.axisLabel.formatter=this.parseFormatter(t.xAxis.axisLabel.formatter))),t.yAxis?.axisLabel?.formatter&&typeof t.yAxis.axisLabel.formatter=="string"&&(this.isEChartsTemplate(t.yAxis.axisLabel.formatter)||(t.yAxis.axisLabel.formatter=this.parseFormatter(t.yAxis.axisLabel.formatter)))}isEChartsTemplate(t){return/^\{[a-zA-Z0-9_]+\}/.test(t.trim())||t.includes("{value}")||t.includes("{a}")||t.includes("{b}")||t.includes("{c}")}parseFormatter(t){let e=t.replace(/__FUNCTION_START__|__FUNCTION_END__/g,"");return this.getSafeFormatter(e)}formatDailyDate(t,e={}){let i=this.timezoneValue||void 0;return t.toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:i,...e})}formatDailyDateTime(t){let e=this.timezoneValue||void 0;return t.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:e})}formatHourMinute(t){let e=this.timezoneValue||void 0;return t.toLocaleString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:e})}isCurrentYear(t){let e={year:"numeric",timeZone:this.timezoneValue||void 0};return t.toLocaleDateString("en-US",e)===new Date().toLocaleDateString("en-US",e)}isHourlyAxis(){return this.optionsValue?.xAxis?.axisLabel?.formatter==="time"}withZoneSuffix(t){let e=this.timezoneLabelValue||"";return e?`${t} (${e})`:t}getSafeFormatter(t){let e={duration_ms:n=>typeof n=="number"?n.toFixed(2)+" ms":n,percentage:n=>typeof n=="number"?n.toFixed(1)+"%":n,number_delimited:n=>typeof n=="number"?n.toLocaleString():n,timestamp:n=>typeof n=="number"||typeof n=="string"?new Date(n).toLocaleString():n,date:n=>{if(typeof n=="number"||typeof n=="string"){let a=typeof n=="string"?parseInt(n):n,o=new Date(a);return isNaN(o.getTime())?n.toString():this.formatDailyDate(o)}return n},time:n=>{if(typeof n=="number"||typeof n=="string"){let a=typeof n=="string"?parseInt(n):n,o=new Date(a);return isNaN(o.getTime())?n.toString():this.formatHourMinute(o)}return n},bytes:n=>{if(typeof n!="number")return n;let a=["B","KB","MB","GB","TB"],o=n,s=0;for(;o>=1024&&s<a.length-1;)o/=1024,s++;return o.toFixed(2)+" "+a[s]},tooltip_time_ms:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue),s=this.withZoneSuffix(this.formatHourMinute(o)),l=parseInt(a.data);return`${s} <br /> ${a.marker} ${l} ms`},tooltip_date_ms:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue),s=this.withZoneSuffix(this.formatDailyDate(o)),l=parseInt(a.data);return`${s} <br /> ${a.marker} ${l} ms`},tooltip_time:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue);return`${this.withZoneSuffix(this.formatHourMinute(o))} <br /> ${a.marker} ${a.data}`},tooltip_date:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=new Date(a.axisValue);return`${this.withZoneSuffix(this.formatDailyDate(o))} <br /> ${a.marker} ${a.data}`},auto_date_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue||n[0].axisValueLabel,o=a;if(typeof a=="number"||typeof a=="string"&&!isNaN(Number(a))){let l=Number(a),u=new Date(l);isNaN(u.getTime())||(o=this.formatDailyDate(u,{year:this.isCurrentYear(u)?void 0:"numeric"}))}o=this.withZoneSuffix(o);let s=`${o}<br/>`;return n.forEach(l=>{let u=Array.isArray(l.value)?l.value[1]:l.value,c=typeof u=="number"?Math.round(u).toLocaleString("en-US"):u??0;s+=`${l.marker} ${l.seriesName}: ${c}<br/>`}),s},timestamp_to_date:n=>{let a=typeof n=="string"?parseFloat(n):n;if(typeof a=="number"&&!isNaN(a)&&a>1e12){let o=new Date(a);if(!isNaN(o.getTime()))return this.formatDailyDate(o)}return n},tooltip_with_timestamp:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue,o=Number(a),s;if(!isNaN(o)&&o>1e12){let u=new Date(o);s=this.isHourlyAxis()?this.formatDailyDateTime(u):this.formatDailyDate(u)}else s=a;s=this.withZoneSuffix(s);let l=`${s}<br/>`;return n.forEach(u=>{let c=Array.isArray(u.value)?u.value[1]:u.value,f=typeof c=="number"?Math.round(c).toLocaleString("en-US"):c??0;l+=`${u.marker} ${u.seriesName}: ${f}<br/>`}),l},sparkline_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=a.axisValue,s=typeof a.value=="number"?Math.round(a.value).toLocaleString("en-US"):a.value??0,l=a.seriesName||"Value",u=typeof o=="string"?parseFloat(o):o;if(typeof u=="number"&&!isNaN(u)&&u>1e12){let c=new Date(u);isNaN(c.getTime())||(o=this.formatHourMinute(c))}return o=this.withZoneSuffix(o),`${o}<br/>${a.marker} ${l}: ${s}`},sparkline_percentage_tooltip:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0],o=a.axisValue,s=typeof a.value=="number"?a.value:a.value??0,l=typeof s=="number"?s.toFixed(2)+"%":s,u=a.seriesName||"Value",c=typeof o=="string"?parseFloat(o):o;if(typeof c=="number"&&!isNaN(c)&&c>1e12){let f=new Date(c);isNaN(f.getTime())||(o=this.formatHourMinute(f))}return o=this.withZoneSuffix(o),`${o}<br/>${a.marker} ${u}: ${l}`},tooltip_with_timestamp_rate:n=>{if(!Array.isArray(n)||n.length===0)return"";let a=n[0].axisValue,o=Number(a),s;if(!isNaN(o)&&o>1e12){let u=new Date(o);s=this.isHourlyAxis()?this.formatDailyDateTime(u):this.formatDailyDate(u)}else s=a;s=this.withZoneSuffix(s);let l=`${s}<br/>`;return n.forEach(u=>{let c=Array.isArray(u.value)?u.value[1]:u.value,h=(typeof c=="number"?c:0).toFixed(2)+"%";l+=`${u.marker} ${u.seriesName}: ${h}<br/>`}),l}};if(t.includes("params")&&t.includes("params[0]")&&t.includes("axisValue"))return t.includes("getHours")?t.includes("ms")?e.tooltip_time_ms:e.tooltip_time:t.includes("toLocaleDateString")&&t.includes("ms")?e.tooltip_date_ms:e.tooltip_date;if(t.includes("getHours"))return e.time;if(t.includes("toLocaleDateString"))return e.date;if(t.includes("toLocaleTimeString"))return e.time;if(t.includes("toLocaleString"))return e.number_delimited;if(t.includes("toFixed(2)")&&t.includes("ms"))return e.duration_ms;if(e[t])return e[t];for(let[n,a]of Object.entries(e))if(t.includes(n)||t.includes(n.replace("_","")))return a;return console.warn("[RailsPulse] Unknown formatter pattern, using identity function:",t.substring(0,100)),n=>n}findDeploymentCopyHintElement(){let t=this.element.closest('[data-controller~="rails-pulse--index"]')||document;return Array.from(t.querySelectorAll('[data-rails-pulse--deployment-markers-toggle-target="message"]')).find(i=>i.offsetParent!==null)||null}showCopiedToast(t){let e=document.createElement("div");e.textContent=`Copied ${t}`;let i=this.findDeploymentCopyHintElement();if(i){let n=i.getBoundingClientRect();e.style.cssText=`position:fixed;top:${n.top+n.height/2}px;left:${n.right+8}px;transform:translateY(-50%);background:#22c55e;color:#fff;padding:0.35rem 0.7rem;border-radius:6px;font-size:12px;font-family:monospace;white-space:nowrap;z-index:9999;pointer-events:none;opacity:1;transition:opacity 0.4s ease`}else e.style.cssText="position:fixed;bottom:1rem;right:1rem;background:#22c55e;color:#fff;padding:0.4rem 0.8rem;border-radius:6px;font-size:13px;font-family:monospace;z-index:9999;pointer-events:none;opacity:1;transition:opacity 0.4s ease";document.body.appendChild(e),setTimeout(()=>{e.style.opacity="0"},1500),setTimeout(()=>{e.remove()},2e3)}showError(){this.element.classList.add("chart-error"),this.element.innerHTML='<p class="text-subtle p-4">Chart failed to load</p>'}get chartInstance(){return this.chart}disposeChart(){this.resizeObserver&&this.resizeObserver.disconnect(),this.chart&&(this.chart.dispose(),this.chart=null)}update(t){if(t.detail?.data&&(this.dataValue=t.detail.data),t.detail?.options&&(this.optionsValue=t.detail.options),this.chart){let e=this.buildChartConfig();this.chart.setOption(e,!0)}}onSeriesToggle({detail:{chartId:t,seriesName:e}}){if(t!==this.element.id||!this.chart)return;let n=(this.dataValue?.series||[]).map(o=>o.name).filter(Boolean).filter(o=>o.startsWith(e));(n.length>0?n:[e]).forEach(o=>{this.chart.dispatchAction({type:"legendToggleSelect",name:o})})}onDeploymentMarkersToggle({detail:{visible:t}}){if(!this.chart)return;let e=this.dataValue?.deployment_markers;!e?.length||!this._usesTimeAxisData()||this.chart.setOption({series:[this._buildDeploymentMarkerSeries(e,t)]})}handleLegendToggle(t){if(!this.chart)return;let i=this.chart.getOption().series||[];if(!i.some(u=>u.type==="bar"&&u.stack))return;let a=t.selected||{},o=[];if(i.forEach((u,c)=>{a[u.name]!==!1&&u.type==="bar"&&u.stack&&o.push(c)}),o.length===0)return;let s=o[o.length-1],l=i.map((u,c)=>{if(u.type!=="bar"||!u.stack)return u;let f=o.includes(c),h=c===s;return{...u,itemStyle:{...u.itemStyle||{},borderRadius:f&&h?[5,5,0,0]:[0,0,0,0]}}});this.chart.setOption({series:l})}onColorSchemeChange(){this.applyColorScheme()}applyColorScheme(){if(!this.chart)return;let e=document.documentElement.getAttribute("data-color-scheme")==="dark",i=e?"rgba(255,255,255,0.55)":"#999999",n=e?"rgba(255,255,255,0.07)":"#eeeeee",l={backgroundColor:e?"rgba(24,24,27,0.95)":"rgba(255,255,255,0.95)",textStyle:{color:e?"#e4e4e7":"#18181b"},borderColor:e?"rgba(255,255,255,0.12)":"#cccccc"};this._tooltipFormatter&&(l.formatter=this._tooltipFormatter),this.chart.setOption({xAxis:{axisLabel:{color:i},splitLine:{lineStyle:{color:n}}},yAxis:{axisLabel:{color:i},splitLine:{lineStyle:{color:n}}},tooltip:l})}};se(of,"values",{type:String,data:Object,options:Object,theme:String,timezone:String,timezoneLabel:String});var Nl=class extends xe{constructor(){super(...arguments);se(this,"lastFrameRequestAt",0);se(this,"pendingRequestTimeout",null);se(this,"pendingRequestData",null);se(this,"selectedColumnIndex",null);se(this,"zrClickHandler",null);se(this,"highlightBarName","__rp_col_bg__");se(this,"deploymentMarkerSeriesId","rails-pulse-deployment-markers");se(this,"charts",{});se(this,"chartControllers",{});se(this,"chartSetup",{});se(this,"activeChartId",null)}connect(){let e=new URLSearchParams(window.location.search).get("chart_type"),i={response_time:"response_time_percentiles_chart",request_rate:"request_rate_chart",error_rate:"error_rate_chart",query_performance:"query_performance_chart",execution_volume:"execution_volume_chart",database_load:"database_load_chart"};this.activeChartId=i[e]||this.chartIdValue,this.handleChartInitialized=this.onChartInitialized.bind(this),document.addEventListener("stimulus:echarts:rendered",this.handleChartInitialized),this.handleDocumentMouseUp=()=>{!this.chart||!this.visibleData||this.handleZoomChange()},document.addEventListener("mouseup",this.handleDocumentMouseUp)}disconnect(){document.removeEventListener("stimulus:echarts:rendered",this.handleChartInitialized);let t=this.getActiveChartContainer();t&&(t.removeEventListener("mousedown",this.handleChartMouseDown),t.removeEventListener("mouseup",this.handleChartMouseUp)),document.removeEventListener("mouseup",this.handleDocumentMouseUp);try{this.chart&&this.zrClickHandler&&this.chart.getZr().off("click",this.zrClickHandler),this.chart&&this.zrMouseMoveHandler&&this.chart.getZr().off("mousemove",this.zrMouseMoveHandler)}catch{}this.pendingRequestTimeout&&clearTimeout(this.pendingRequestTimeout)}onChartInitialized(t){let{containerId:e,chart:i,controller:n}=t.detail;this.charts[e]=i,this.chartControllers[e]=n,e===this.activeChartId&&(this.chart=i,this.setup())}handleChartSwitched(t){let{toId:e}=t.detail;if(!e||e===this.activeChartId)return;let i=this.captureZoomState();this.teardownActiveChartListeners(),this.originalBarItemStyles=null,this.activeChartId=e,this.chart=this.charts[e],this.chart&&(requestAnimationFrame(()=>{let n=this.chartControllers[e];this.chart&&this.chart.resize(),n?.chart&&n.chart.setOption(n.buildChartConfig(),!0),setTimeout(()=>{this.chart&&this.chart.resize()},0)}),i&&this.applyZoomState(i),this.chartSetup[e]?(this.visibleData=this.getVisibleData(),this.setupChartEventListeners(),this.initializeColumnSelectionFromUrl()):this.setup())}captureZoomState(){if(!this.chart)return null;try{let t=this.chart.getOption(),e=t.dataZoom?.[1]||t.dataZoom?.[0];return e?{startValue:e.startValue,endValue:e.endValue}:null}catch{return null}}applyZoomState(t){if(!(!this.chart||t.startValue===void 0||t.endValue===void 0))try{this.chart.dispatchAction({type:"dataZoom",startValue:t.startValue,endValue:t.endValue}),this.visibleData=this.getVisibleData()}catch{}}teardownActiveChartListeners(){let t=this.getActiveChartContainer();t&&(t.removeEventListener("mousedown",this.handleChartMouseDown),t.removeEventListener("mouseup",this.handleChartMouseUp));try{this.chart&&(this.chart.off("datazoom"),this.zrClickHandler&&this.chart.getZr().off("click",this.zrClickHandler),this.zrMouseMoveHandler&&this.chart.getZr().off("mousemove",this.zrMouseMoveHandler))}catch{}this.zrClickHandler=null,this.zrMouseMoveHandler=null}getActiveChartContainer(){return this.chartTargets.find(t=>t.dataset.chartId===this.activeChartId)||null}setup(){this.chartSetup[this.activeChartId]||!this.getActiveChartContainer()||!this.chart||(this.visibleData=this.getVisibleData(),this.setupHighlightSeries(),this.setupChartEventListeners(),this.chartSetup[this.activeChartId]=!0,document.getElementById(this.activeChartId)?.setAttribute("data-chart-rendered","true"),this.initializeZoomFromUrl(),this.initializeColumnSelectionFromUrl())}setupChartEventListeners(){let t=this.getActiveChartContainer();this.handleChartMouseDown=()=>{this.visibleData=this.getVisibleData()},t.addEventListener("mousedown",this.handleChartMouseDown),this.handleChartMouseUp=()=>{this.handleZoomChange()},t.addEventListener("mouseup",this.handleChartMouseUp),this.chart.on("datazoom",()=>{this.handleZoomChange()}),this.zrClickHandler=e=>{if(this.isClickOnDeploymentMarker(e))return;let i=this.getDataIndexFromPixel(e);i!=null&&this.handleColumnClick({dataIndex:i})},this.chart.getZr().on("click",this.zrClickHandler),this.zrMouseMoveHandler=e=>{let i=this.getDataIndexFromPixel(e);this.chart.getZr().setCursorStyle(i==null?"default":"pointer")},this.chart.getZr().on("mousemove",this.zrMouseMoveHandler)}getPrimaryDataSeries(t=this.chart?.getOption()){return(t?.series||[]).find(e=>e?.name!==this.highlightBarName&&e?.id!==this.deploymentMarkerSeriesId&&Array.isArray(e?.data)&&e.data.length>0)||null}getPrimaryDataSeriesIndex(t=this.chart?.getOption()){return(t?.series||[]).findIndex(e=>e?.name!==this.highlightBarName&&e?.id!==this.deploymentMarkerSeriesId&&Array.isArray(e?.data)&&e.data.length>0)}getXAxisValues(t=this.chart?.getOption()){let e=t?.xAxis?.[0]?.data;if(Array.isArray(e)&&e.length>0)return e;let i=this.getPrimaryDataSeries(t);return i?i.data.map(n=>Array.isArray(n)?n[0]:Array.isArray(n?.value)?n.value[0]:null).filter(n=>n!=null):[]}getAxisType(t=this.chart?.getOption()){return t?.xAxis?.[0]?.type||"category"}getDataIndexFromPixel(t){if(!this.chart)return null;let e=this.chart.getOption(),i=this.getAxisType(e),n=this.getXAxisValues(e),a=this.getPrimaryDataSeriesIndex(e),o=[t.offsetX,t.offsetY];if(n.length===0||!this.chart.containPixel({gridIndex:0},o))return null;let s=this.chart.convertFromPixel({gridIndex:0},o);if(i==="time"){let c=Array.isArray(s)?Number(s[0]):Number(s);if(Number.isNaN(c)&&a>=0){let p=this.chart.convertFromPixel({seriesIndex:a},o);c=Array.isArray(p)?Number(p[0]):Number(p)}if(Number.isNaN(c))return null;let f=0,h=1/0;return n.forEach((p,d)=>{let v=Math.abs(Number(p)-c);v<h&&(h=v,f=d)}),f}let l=Array.isArray(s)?s:this.chart.convertFromPixel({seriesIndex:a>=0?a:0},o);if(!l)return null;let u=Math.round(l[0]);return u<0||u>=n.length?null:u}getTimeBucketRange(t,e){let i=Number(t[e]),n=e>0?Number(t[e-1]):null,a=e<t.length-1?Number(t[e+1]):null,o=n!=null?i-n:a!=null?a-i:36e5,s=n!=null?i-n:o,l=a!=null?a-i:o;return{start:i-s/2,end:i+l/2}}isClickOnDeploymentMarker(t){if(!this.chart)return!1;let n=(this.chart.getOption()?.series||[]).find(s=>s?.id===this.deploymentMarkerSeriesId)?.markLine?.data||[];if(n.length===0)return!1;let a=[t.offsetX,t.offsetY];if(!this.chart.containPixel({gridIndex:0},a))return!1;let o=8;return n.some(s=>{let l=this.chart.convertToPixel({xAxisIndex:0},s.xAxis),u=Array.isArray(l)?l[0]:l;return typeof u=="number"&&!Number.isNaN(u)&&Math.abs(u-t.offsetX)<=o})}getVisibleData(){try{let t=this.chart.getOption();if(!t.dataZoom||t.dataZoom.length===0)return{xAxis:[],series:[]};let e=t.dataZoom[1]||t.dataZoom[0],i=this.getXAxisValues(t),a=this.getPrimaryDataSeries(t)?.data||[];if(i.length===0||a.length===0)return{xAxis:[],series:[]};if(this.getAxisType(t)==="time"){let l=e.startValue??i[0],u=e.endValue??i[i.length-1];return{xAxis:i.filter(c=>c>=l&&c<=u),series:a.filter(c=>{let f=Array.isArray(c)?c[0]:c?.value?.[0];return f>=l&&f<=u})}}let o=e.startValue??0,s=e.endValue??i.length-1;return{xAxis:i.slice(o,s+1),series:a.slice(o,s+1)}}catch{return{xAxis:[],series:[]}}}handleZoomChange(){let t=this.getVisibleData(),e=t.xAxis.join(),i=this.visibleData.xAxis.join();e!==i&&(this.visibleData=t,this.updateUrlWithZoomParams(t),this.sendFrameRequest(t))}updateUrlWithZoomParams(t){let e=new URL(window.location.href),i=new URLSearchParams(e.search),n=t.xAxis[0],a=t.xAxis[t.xAxis.length-1];i.set("zoom_start_time",n),i.set("zoom_end_time",a),e.search=i.toString(),window.history.replaceState({},"",e)}updatePaginationLimit(){if(!this.hasPaginationLimitTarget)return;let t=new URL(window.location.href),e=new URLSearchParams(t.search),i=this.paginationLimitTarget.value;e.set("limit",i),t.search=e.toString(),window.history.replaceState({},"",t)}sendFrameRequest(t){let i=Date.now()-this.lastFrameRequestAt;if(this.pendingRequestData=t,this.pendingRequestTimeout&&clearTimeout(this.pendingRequestTimeout),i>=1e3)this.executeFrameRequest(t);else{let n=1e3-i;this.pendingRequestTimeout=setTimeout(()=>{this.executeFrameRequest(this.pendingRequestData),this.pendingRequestTimeout=null},n)}}executeFrameRequest(t){this.lastFrameRequestAt=Date.now();let e=new URL(window.location.href),i=new URLSearchParams(e.search),n=t.xAxis[0],a=t.xAxis[t.xAxis.length-1];i.set("zoom_start_time",n),i.set("zoom_end_time",a),this.hasPaginationLimitTarget&&i.set("limit",this.paginationLimitTarget.value),e.search=i.toString(),kn(e.toString(),this.indexTableTarget).catch(o=>console.error("[IndexController] Fetch error:",o))}handleColumnClick(t){let e=t.dataIndex;this.selectedColumnIndex===e?(this.resetColumnColors(),this.selectedColumnIndex=null,this.sendColumnDeselectionRequest()):(this.highlightColumn(e),this.selectedColumnIndex=e,this.sendColumnSelectionRequest(e))}setupHighlightSeries(){try{let t=this.chart.getOption();if(t.series?.[0]?.type==="bar")return;if(t.xAxis?.[0]?.type==="time"){this.chart.setOption({series:[...t.series||[],{name:this.highlightBarName,type:"line",data:[],showSymbol:!1,silent:!0,z:0,animation:!1,legendHoverLink:!1,lineStyle:{opacity:0},itemStyle:{opacity:0},tooltip:{show:!1},markArea:{silent:!0,itemStyle:{color:"rgba(128, 128, 128, 0.2)"},data:[]}}]});return}let n=t.xAxis?.[0]?.data?.length||0,a=Array.isArray(t.yAxis)?t.yAxis:[t.yAxis||{}];this.chart.setOption({yAxis:[...a,{show:!1,position:"right",min:0,max:1}],series:[...t.series||[],{name:this.highlightBarName,type:"bar",yAxisIndex:a.length,barWidth:"100%",itemStyle:{color:"rgba(0, 0, 0, 0)",borderWidth:0},data:Array(n).fill(null),silent:!0,z:0,animation:!1,legendHoverLink:!1,tooltip:{show:!1}}]})}catch(t){console.error("Error setting up highlight series:",t)}}highlightColumn(t){try{let e=this.chart.getOption(),i=this.getXAxisValues(e);if(!i.length||t<0||t>=i.length)return;let n=e.series?.[0]?.type==="bar";if(this.getAxisType(e)==="time"&&!n){let o=this.getTimeBucketRange(i,t);this.chart.setOption({series:e.series.map(s=>s.name===this.highlightBarName?{markArea:{silent:!0,itemStyle:{color:"rgba(128, 128, 128, 0.2)"},data:[[{xAxis:o.start},{xAxis:o.end}]]}}:{})});return}let a=e.xAxis?.[0]?.data?.length;if(n){if(!this.originalBarItemStyles){let o=e.series?.[0]?.data||[];this.originalBarItemStyles=o.map(s=>typeof s=="object"?s.itemStyle||{}:{})}this.chart.setOption({series:e.series.slice(0,1).map(o=>({data:(o.data||[]).map((s,l)=>({value:s&&typeof s=="object"&&!Array.isArray(s)?s.value:s,itemStyle:{...this.originalBarItemStyles[l]||{},opacity:l===t?1:.25}}))}))})}else{let o=Array(a).fill(null);o[t]=1,this.chart.setOption({series:e.series.map(s=>s.name===this.highlightBarName?{itemStyle:{color:"rgba(128, 128, 128, 0.2)",borderWidth:0},data:o}:{})})}}catch(e){console.error("Error highlighting column:",e)}}resetColumnColors(){try{let t=this.chart.getOption(),e=t.xAxis?.[0]?.data?.length||0,i=t.series?.[0]?.type==="bar";if(this.getAxisType(t)==="time"&&!i){this.chart.setOption({series:t.series.map(n=>n.name===this.highlightBarName?{markArea:{data:[]}}:{})});return}if(i){let n=this.originalBarItemStyles||[];this.originalBarItemStyles=null,this.chart.setOption({series:t.series.slice(0,1).map(a=>({data:(a.data||[]).map((o,s)=>({value:o&&typeof o=="object"&&!Array.isArray(o)?o.value:o,itemStyle:{...n[s]||{},opacity:1}}))}))})}else this.chart.setOption({series:t.series.map(n=>n.name===this.highlightBarName?{itemStyle:{color:"rgba(0, 0, 0, 0)",borderWidth:0},data:Array(e).fill(null)}:{})})}catch(t){console.error("Error resetting column highlight:",t)}}sendColumnSelectionRequest(t){let e=this.chart.getOption(),n=this.getXAxisValues(e)[t];if(!n){console.error("Could not find timestamp for column index:",t);return}let a=new URL(window.location.href),o=new URLSearchParams(a.search);o.set("selected_column_time",n),this.hasPaginationLimitTarget&&o.set("limit",this.paginationLimitTarget.value),a.search=o.toString(),window.history.replaceState({},"",a),this.executeFrameRequestForColumn(a)}sendColumnDeselectionRequest(){let t=new URL(window.location.href),e=new URLSearchParams(t.search);e.delete("selected_column_time"),this.hasPaginationLimitTarget&&e.set("limit",this.paginationLimitTarget.value),t.search=e.toString(),window.history.replaceState({},"",t),this.executeFrameRequestForColumn(t)}executeFrameRequestForColumn(t){kn(t.toString(),this.indexTableTarget).catch(e=>console.error("[IndexController] Column selection fetch error:",e))}initializeZoomFromUrl(){let t=new URLSearchParams(window.location.search),e=t.get("zoom_start_time"),i=t.get("zoom_end_time");if(!e||!i)return;let n=this.chart.getOption(),a=this.getXAxisValues(n);if(a.length===0)return;let o=parseInt(e),s=parseInt(i);if(this.getAxisType(n)==="time")this.chart.dispatchAction({type:"dataZoom",startValue:o,endValue:s});else{let l=a.reduce((c,f,h)=>Math.abs(parseInt(f)-o)<Math.abs(parseInt(a[c])-o)?h:c,0),u=a.reduce((c,f,h)=>Math.abs(parseInt(f)-s)<Math.abs(parseInt(a[c])-s)?h:c,0);this.chart.dispatchAction({type:"dataZoom",startValue:l,endValue:u})}this.visibleData=this.getVisibleData()}initializeColumnSelectionFromUrl(){let e=new URLSearchParams(window.location.search).get("selected_column_time");if(e){let i=this.chart.getOption(),n=this.getXAxisValues(i);if(n.length===0)return;let a=n.findIndex(o=>o.toString()===e);if(a===-1){let o=parseInt(e);a=n.findIndex(s=>parseInt(s)===o)}a!==-1&&(this.selectedColumnIndex=a,requestAnimationFrame(()=>{this.highlightColumn(a)}))}}};se(Nl,"targets",["chart","paginationLimit","indexTable"]),se(Nl,"values",{chartId:String});var Mv=class extends xe{connect(){this.storageKey="color-scheme",this.html=document.documentElement;let r=localStorage.getItem(this.storageKey);r&&this.html.setAttribute("data-color-scheme",r)}toggle(r){r.preventDefault();let t=this.html.getAttribute("data-color-scheme")==="dark"?"light":"dark";this.html.setAttribute("data-color-scheme",t),localStorage.setItem(this.storageKey,t),document.dispatchEvent(new CustomEvent("rails-pulse:color-scheme-changed",{detail:{scheme:t}}))}};var kl=class extends xe{connect(){this.restorePaginationLimit()}updateLimit(){let r=this.limitTarget.value;sessionStorage.setItem(this.storageKeyValue,r);let t=new URL(window.location);t.searchParams.set("limit",r),t.searchParams.delete("page"),window.location.href=t.toString()}restorePaginationLimit(){if(!this.hasLimitTarget)return;let t=new URLSearchParams(window.location.search).get("limit");if(t)sessionStorage.setItem(this.storageKeyValue,t),this.limitTarget.value!==t&&(this.limitTarget.value=t);else{let e=sessionStorage.getItem(this.storageKeyValue);e&&this.limitTarget.value!==e&&(this.limitTarget.value=e)}}};se(kl,"targets",["limit"]),se(kl,"values",{storageKey:{type:String,default:"rails_pulse_pagination_limit"}});var Rl=class extends xe{connect(){this.renderIcon()}nameValueChanged(){this.renderIcon()}renderIcon(){this.clearIcon(),this.element.classList.add(...this.loadingClasses),this.element.classList.remove(...this.errorClasses,...this.loadedClasses);let r=this.nameValue;if(!r){this.handleError("Icon name is required");return}if(!window.RailsPulseIcons){this.handleError("RailsPulseIcons not loaded");return}let t=window.RailsPulseIcons.get(r);if(!t){this.handleError(`Icon '${r}' not found`);return}try{let e=this.createSVGElement(t);this.element.appendChild(e),this.element.classList.remove(...this.loadingClasses,...this.errorClasses),this.element.classList.add(...this.loadedClasses),this.element.setAttribute("aria-label",`${r} icon`)}catch(e){this.handleError(`Failed to render icon '${r}': ${e.message}`)}}createSVGElement(r){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");if(t.setAttribute("width",this.widthValue||"24"),t.setAttribute("height",this.heightValue||"24"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width",this.strokeWidthValue||"2"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),window.RailsPulseIcons.render){let a=document.createElement("div");if(window.RailsPulseIcons.render(this.nameValue,a,{width:this.widthValue||"24",height:this.heightValue||"24"})&&a.firstChild)return a.firstChild}let n=new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="${this.widthValue||"24"}" height="${this.heightValue||"24"}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${this.strokeWidthValue||"2"}" stroke-linecap="round" stroke-linejoin="round">${r}</svg>`,"image/svg+xml").documentElement;if(n.nodeName==="parsererror")throw new Error("Invalid SVG content");return document.importNode(n,!0)}clearIcon(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}handleError(r){console.warn(`[Rails Pulse Icon Controller] ${r}`),this.clearIcon(),this.element.classList.remove(...this.loadingClasses,...this.loadedClasses),this.element.classList.add(...this.errorClasses),this.createErrorPlaceholder(),this.element.setAttribute("aria-label","Icon not available")}createErrorPlaceholder(){let r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width",this.widthValue||"24"),r.setAttribute("height",this.heightValue||"24"),r.setAttribute("viewBox","0 0 24 24"),r.setAttribute("fill","currentColor"),r.setAttribute("opacity","0.3");let t=document.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("x","2"),t.setAttribute("y","2"),t.setAttribute("rx","2"),r.appendChild(t),this.element.appendChild(r)}};se(Rl,"values",{name:String,width:String,height:String,strokeWidth:String}),se(Rl,"classes",["loading","error","loaded"]);var Ov=class extends xe{toggle(r){let t=r.target.closest("tr");if(!t||t.closest("tbody")!==this.element||t.classList.contains("operation-details-row"))return;let e=r.target.closest("td,th");if(e&&e.parentElement===t&&e.cellIndex===t.cells.length-1)return;r.preventDefault(),r.stopPropagation();let i=t.nextElementSibling;if(!i||i.tagName!=="TR"||!i.classList.contains("operation-details-row"))return;i.classList.contains("hidden")?this.expand(t,i):this.collapse(t,i)}expand(r,t){t.classList.remove("hidden");let e=r.querySelector(".chevron");e&&(e.style.transform="rotate(90deg)"),r.classList.add("expanded");let i=t.querySelector("[data-operation-url]");if(i&&!i.dataset.loaded){let n=i.dataset.operationUrl;n&&this.loadOperationDetails(n,i)}}async loadOperationDetails(r,t){try{await kn(r,t),t.dataset.loaded="true"}catch(e){console.error("Operation details fetch error:",e)}}collapse(r,t){t.classList.add("hidden");let e=r.querySelector(".chevron");e&&(e.style.transform="rotate(0deg)"),r.classList.remove("expanded")}};var Fl=class extends xe{connect(){this.collapse()}toggle(){this.element.classList.contains(this.collapsedClass)?this.expand():this.collapse()}collapse(){this.element.classList.add(this.collapsedClass),this.hasToggleTarget&&(this.toggleTarget.textContent="show more")}expand(){this.element.classList.remove(this.collapsedClass),this.hasToggleTarget&&(this.toggleTarget.textContent="show less")}};se(Fl,"targets",["content","toggle"]),se(Fl,"classes",["collapsed"]);var Bl=class extends xe{disconnect(){this.resetTimeout&&clearTimeout(this.resetTimeout)}async copy(r){let t=r.currentTarget,e=this.hasSourceTarget?this.sourceTarget.textContent:"";try{await this.write(e),this.flash(t,this.copiedLabelValue)}catch{this.flash(t,this.errorLabelValue)}}async write(r){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(r);let t=document.createElement("textarea");t.value=r,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{document.body.removeChild(t)}}flash(r,t){r.textContent=t,this.resetTimeout&&clearTimeout(this.resetTimeout),this.resetTimeout=setTimeout(()=>{r.textContent=this.labelValue},this.resetDelayValue)}};se(Bl,"targets",["source"]),se(Bl,"values",{label:{type:String,default:"copy"},copiedLabel:{type:String,default:"copied!"},errorLabel:{type:String,default:"copy failed"},resetDelay:{type:Number,default:1500}});var sf=class extends xe{updateUrl(r){r.preventDefault();let e=r.currentTarget.getAttribute("href");e&&(window.history.replaceState({},"",e),this.fetchAndUpdateTable(e))}async fetchAndUpdateTable(r){try{await kn(r,this.tableFrameTarget)}catch(t){console.error("Table sort error:",t)}}};se(sf,"targets",["tableFrame"]);var zl=class extends xe{connect(){this.updateIndicator()}open(r){r.preventDefault(),this.wrapperTarget.style.display="flex",document.body.style.overflow="hidden"}close(r){r&&r.preventDefault(),this.wrapperTarget.style.display="none",document.body.style.overflow=""}closeOnClickOutside(r){r.target===this.wrapperTarget&&this.close(r)}submit(r){r.submitter&&r.submitter.name}updateIndicator(){this.hasIndicatorTarget&&(this.activeValue?this.indicatorTarget.classList.add("global-filters-active"):this.indicatorTarget.classList.remove("global-filters-active"))}activeValueChanged(){this.updateIndicator()}};se(zl,"targets",["wrapper","dialog","indicator","form"]),se(zl,"values",{active:{type:Boolean,default:!1}});var lf=class extends xe{connect(){let r=this.selectWrapperTarget.querySelector("select");if(!r)return;r.dataset.mode==="recent_custom"?r.value==="custom"&&(this.showPicker(),this.initializeDatePicker()):r.value==="custom"&&(this.showPicker(),this.initializeDatePicker())}handleChange(r){r.target.dataset.mode==="recent_custom"?r.target.value==="custom"?(this.showPicker(),this.openDatePicker()):(this.pickerWrapperTarget.style.display="none",this.selectWrapperTarget.style.display="block"):r.target.value==="custom"&&(this.showPicker(),this.openDatePicker())}showPicker(){this.selectWrapperTarget.style.display="none",this.pickerWrapperTarget.style.display="flex"}openDatePicker(){setTimeout(()=>{let r=this.pickerWrapperTarget.querySelector('input[name*="custom_date_range"]');if(!r)return;let t=this.application.getControllerForElementAndIdentifier(r,"rails-pulse--datepicker");t&&t.flatpickr&&t.flatpickr.open()},50)}showSelect(){this.pickerWrapperTarget.style.display="none",this.selectWrapperTarget.style.display="block";let r=this.selectWrapperTarget.querySelector("select");r&&(r.dataset.mode==="recent_custom"?r.value="recent":r.value="last_day")}initializeDatePicker(){let r=this.pickerWrapperTarget.querySelector('input[type="text"]');if(!r||!r.value)return;let t=this.application.getControllerForElementAndIdentifier(r,"rails-pulse--datepicker");if(t&&t.flatpickr){let e=r.value;if(e.includes(" to ")){let[i,n]=e.split(" to ").map(a=>a.trim());t.flatpickr.setDate([i,n],!1)}}}};se(lf,"targets",["selectWrapper","pickerWrapper"]);var uf=class extends xe{toggle(){let r=this.element.dataset.active!=="false";this.element.dataset.active=r?"false":"true",document.dispatchEvent(new CustomEvent("rails-pulse:toggle-series",{detail:{chartId:this.chartIdValue,seriesName:this.seriesNameValue}}))}};se(uf,"values",{seriesName:String,chartId:String});var cf=class extends xe{connect(){this.syncUi()}toggle(){let r=this.element.dataset.active!=="false";this.element.dataset.active=r?"false":"true",this.syncUi(),document.dispatchEvent(new CustomEvent("rails-pulse:toggle-deployment-markers",{detail:{visible:!r}}))}syncUi(){let r=this.element.dataset.active!=="false";this.hasButtonTarget&&(this.buttonTarget.dataset.active=r?"true":"false"),this.hasMessageTarget&&(this.messageTarget.style.display=r?"inline":"none")}};se(cf,"targets",["button","message"]);var ff=class extends xe{showTooltip(r){let t=r.currentTarget,e=this.tooltipTarget;e.querySelector("[data-flame-type]").textContent=t.dataset.opType.replace(/_/g," "),e.querySelector("[data-flame-label]").textContent=t.dataset.opLabel,e.querySelector("[data-flame-duration]").textContent=t.dataset.opDuration,e.querySelector("[data-flame-impact]").textContent=t.dataset.opImpact,e.classList.remove("hidden")}moveTooltip(r){let t=this.tooltipTarget;if(t.classList.contains("hidden"))return;let e=Math.min(r.clientX+16,window.innerWidth-320),i=Math.max(r.clientY-80,8);t.style.left=`${e}px`,t.style.top=`${i}px`}hideTooltip(){this.tooltipTarget.classList.add("hidden")}navigate(r){let t=r.currentTarget.dataset.opUrl;t&&(window.location.href=t)}};se(ff,"targets",["tooltip"]);var Vl=class extends xe{connect(){let t=new URLSearchParams(window.location.search).get("chart_type");t&&(this.selectedValue=t),this.showSelected(),this.syncHiddenInput()}switch(r){let t=this.selectedValue,e=r.currentTarget.dataset.chartType,i=this.chartTargets.find(o=>o.dataset.chartType===t),n=this.chartTargets.find(o=>o.dataset.chartType===e);this.selectedValue=e,this.showSelected();let a=new URL(window.location.href);a.searchParams.set("chart_type",e),window.history.replaceState({},"",a),this.syncHiddenInput(),this.dispatch("switched",{detail:{fromId:i?.dataset.chartId,toId:n?.dataset.chartId}})}syncHiddenInput(){this.hasChartTypeInputTarget&&(this.chartTypeInputTarget.value=this.selectedValue)}showSelected(){let r=this.selectedValue;this.chartTargets.forEach(t=>{t.style.display=t.dataset.chartType===r?"block":"none"}),this.buttonTargets.forEach(t=>{t.dataset.active=t.dataset.chartType===r?"true":"false"}),this.toggleGroupTargets.forEach(t=>{t.style.display=t.dataset.chartType===r?"flex":"none"})}};se(Vl,"targets",["chart","button","toggleGroup","chartTypeInput"]),se(Vl,"values",{selected:{type:String,default:"response_time"}});var Ul=class extends xe{selectPreset(r){r.preventDefault();let e=r.currentTarget.dataset.preset;this.submitTimeRange(e,null,null)}showCustom(r){r.preventDefault();let t=this.element.querySelector('[role="menu"]').closest("[popover]");t&&t.hidePopover(),this.hasModalWrapperTarget&&(this.modalWrapperTarget.style.display="flex",document.body.style.overflow="hidden")}cancelCustom(r){r.preventDefault(),this.hasDateInputTarget&&(this.dateInputTarget.value=""),this.closeModal()}closeModal(){this.hasModalWrapperTarget&&(this.modalWrapperTarget.style.display="none",document.body.style.overflow="")}closeOnClickOutside(r){this.hasModalTarget&&r.target===this.modalWrapperTarget&&this.cancelCustom(r)}applyCustom(r){r.preventDefault();let t=this.dateInputTarget.value;if(!t||!t.includes(" to ")){alert("Please select a valid date range");return}let[e,i]=t.split(" to ").map(n=>n.trim());this.closeModal(),this.submitTimeRange(null,e,i)}submitTimeRange(r,t,e){let i=document.createElement("form");i.method="POST",i.action=this.urlValue;let n=document.querySelector('meta[name="csrf-token"]')?.content;if(n){let o=document.createElement("input");o.type="hidden",o.name="authenticity_token",o.value=n,i.appendChild(o)}let a=document.createElement("input");if(a.type="hidden",a.name="_method",a.value="patch",i.appendChild(a),r){let o=document.createElement("input");o.type="hidden",o.name="preset",o.value=r,i.appendChild(o)}else if(t&&e){let o=document.createElement("input");o.type="hidden",o.name="start_time",o.value=t,i.appendChild(o);let s=document.createElement("input");s.type="hidden",s.name="end_time",s.value=e,i.appendChild(s)}document.body.appendChild(i),i.submit()}};se(Ul,"targets",["modalWrapper","modal","dateInput","label","trigger"]),se(Ul,"values",{url:String});Pt([v_,n_,sx,R_,rx,q_,K_,G_,px]);var et=hv.start();et.debug=!1;window.Stimulus=et;window.echarts=$0;et.register("rails-pulse--context-menu",Xc);et.register("rails-pulse--datepicker",Tl);et.register("rails-pulse--dialog",$c);et.register("rails-pulse--menu",Cl);et.register("rails-pulse--popover",Il);et.register("rails-pulse--chart",of);et.register("rails-pulse--index",Nl);et.register("rails-pulse--color-scheme",Mv);et.register("rails-pulse--pagination",kl);et.register("rails-pulse--icon",Rl);et.register("rails-pulse--expandable-rows",Ov);et.register("rails-pulse--collapsible",Fl);et.register("rails-pulse--clipboard",Bl);et.register("rails-pulse--table-sort",sf);et.register("rails-pulse--global-filters",zl);et.register("rails-pulse--custom-range",lf);et.register("rails-pulse--series-toggle",uf);et.register("rails-pulse--deployment-markers-toggle",cf);et.register("rails-pulse--flame-graph",ff);et.register("rails-pulse--chart-switcher",Vl);et.register("rails-pulse--time-range",Ul);lc("railspulse",{color:["#ffc91f","#ffde66","#fbedbf"],backgroundColor:"rgba(255,255,255,0)",textStyle:{},title:{textStyle:{color:"#666666"}},line:{lineStyle:{width:"3"},symbolSize:"8"},bar:{itemStyle:{barBorderWidth:0}}});window.RailsPulse={application:et,version:"1.0.0"};})();
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
tslib/tslib.es6.js:
|