@databrainhq/plugin 0.4.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.
- package/README.md +26 -0
- package/dist/components/Button/index.d.ts +13 -0
- package/dist/components/ChartModal/ChartConfig.d.ts +18 -0
- package/dist/components/ChartModal/ChartModalOptions.d.ts +6 -0
- package/dist/components/ChartModal/SelectField.d.ts +2 -0
- package/dist/components/Charts/AreaChart.d.ts +2 -0
- package/dist/components/Charts/BarChart.d.ts +15 -0
- package/dist/components/Charts/BoxPlot.d.ts +2 -0
- package/dist/components/Charts/BubbleChart.d.ts +2 -0
- package/dist/components/Charts/ComboChart.d.ts +2 -0
- package/dist/components/Charts/DoughnutChart.d.ts +2 -0
- package/dist/components/Charts/FunnelChart.d.ts +2 -0
- package/dist/components/Charts/GaugeChart.d.ts +2 -0
- package/dist/components/Charts/Histogram.d.ts +2 -0
- package/dist/components/Charts/LineChart.d.ts +21 -0
- package/dist/components/Charts/PieChart.d.ts +2 -0
- package/dist/components/Charts/RowChart.d.ts +2 -0
- package/dist/components/Charts/SankeyChart.d.ts +2 -0
- package/dist/components/Charts/ScatterChart.d.ts +2 -0
- package/dist/components/Charts/SingleValueChart.d.ts +2 -0
- package/dist/components/Charts/StackedBarChart.d.ts +2 -0
- package/dist/components/Charts/SteppedAreaChart.d.ts +2 -0
- package/dist/components/Charts/TableChart.d.ts +2 -0
- package/dist/components/Charts/WaterfallChart.d.ts +2 -0
- package/dist/components/DataType/index.d.ts +3 -0
- package/dist/components/Error/index.d.ts +5 -0
- package/dist/components/ExternalMetricForm/index.d.ts +14 -0
- package/dist/components/FilterDropDown/index.d.ts +12 -0
- package/dist/components/FilterField/index.d.ts +20 -0
- package/dist/components/FloatingDropDown/index.d.ts +25 -0
- package/dist/components/FullScreenChart/index.d.ts +8 -0
- package/dist/components/InputField/index.d.ts +25 -0
- package/dist/components/MetricCard/index.d.ts +17 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +8 -0
- package/dist/components/MetricChart/index.d.ts +32 -0
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +17 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +19 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +45 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +8 -0
- package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -0
- package/dist/components/MetricCreation/index.d.ts +3 -0
- package/dist/components/MetricFilters/index.d.ts +10 -0
- package/dist/components/MetricList/index.d.ts +41 -0
- package/dist/components/MetricTable/index.d.ts +6 -0
- package/dist/components/Modal/ModalFooter.d.ts +3 -0
- package/dist/components/Modal/index.d.ts +10 -0
- package/dist/components/PopoverMenu/index.d.ts +12 -0
- package/dist/components/SearchTab/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts +45 -0
- package/dist/components/SingleValueCard/index.d.ts +4 -0
- package/dist/components/Tab/index.d.ts +8 -0
- package/dist/components/Table/index.d.ts +7 -0
- package/dist/components/Text/index.d.ts +10 -0
- package/dist/components/TextAreaField/index.d.ts +18 -0
- package/dist/components/TimeGrainField/index.d.ts +12 -0
- package/dist/components/ToggleButton/index.d.ts +12 -0
- package/dist/consts/index.d.ts +37 -0
- package/dist/consts/metricOptions.d.ts +17 -0
- package/dist/containers/Dashboard/index.d.ts +5 -0
- package/dist/containers/index.d.ts +1 -0
- package/dist/helpers/getTimeFilterValue.d.ts +8 -0
- package/dist/helpers/groupBy.d.ts +2 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +46 -0
- package/dist/hooks/useExternalMetric.d.ts +38 -0
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +14 -0
- package/dist/hooks/useOutsideAlerter.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +101669 -0
- package/dist/index.umd.js +322 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +83 -0
- package/dist/types/metricCreate.d.ts +108 -0
- package/dist/typings.d.ts +17 -0
- package/dist/utils/arrayToCsvString.d.ts +7 -0
- package/dist/utils/colors.d.ts +2 -0
- package/dist/utils/fetcher.d.ts +1 -0
- package/dist/utils/generated/graphql.d.ts +1616 -0
- package/dist/utils/getChartAttributes.d.ts +27 -0
- package/dist/utils/getFormattedDataType.d.ts +2 -0
- package/package.json +99 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
(function(Za,k){typeof exports=="object"&&typeof module!="undefined"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(Za=typeof globalThis!="undefined"?globalThis:Za||self,k(Za["@databrainhq/plugin"]={},Za.React,Za.ReactDOM))})(this,function(Za,k,xH){"use strict";function ZT(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var st=ZT(k),Ld=ZT(xH);function By(r,t){return By=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},By(r,t)}function Ul(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,By(r,t)}var Yl=function(){function r(){this.listeners=[]}var t=r.prototype;return t.subscribe=function(n){var i=this,a=n||function(){};return this.listeners.push(a),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(o){return o!==a}),i.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},r}();function te(){return te=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},te.apply(this,arguments)}var Id=typeof window=="undefined";function vr(){}function SH(r,t){return typeof r=="function"?r(t):r}function zy(r){return typeof r=="number"&&r>=0&&r!==1/0}function Od(r){return Array.isArray(r)?r:[r]}function KT(r,t){return Math.max(r+(t||0)-Date.now(),0)}function Ed(r,t,e){return Ac(r)?typeof t=="function"?te({},e,{queryKey:r,queryFn:t}):te({},t,{queryKey:r}):r}function wH(r,t,e){return Ac(r)?typeof t=="function"?te({},e,{mutationKey:r,mutationFn:t}):te({},t,{mutationKey:r}):typeof r=="function"?te({},t,{mutationFn:r}):te({},r)}function Ka(r,t,e){return Ac(r)?[te({},t,{queryKey:r}),e]:[r||{},t]}function CH(r,t){if(r===!0&&t===!0||r==null&&t==null)return"all";if(r===!1&&t===!1)return"none";var e=r!=null?r:!t;return e?"active":"inactive"}function QT(r,t){var e=r.active,n=r.exact,i=r.fetching,a=r.inactive,o=r.predicate,s=r.queryKey,l=r.stale;if(Ac(s)){if(n){if(t.queryHash!==Fy(s,t.options))return!1}else if(!Rd(t.queryKey,s))return!1}var u=CH(e,a);if(u==="none")return!1;if(u!=="all"){var c=t.isActive();if(u==="active"&&!c||u==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof i=="boolean"&&t.isFetching()!==i||o&&!o(t))}function JT(r,t){var e=r.exact,n=r.fetching,i=r.predicate,a=r.mutationKey;if(Ac(a)){if(!t.options.mutationKey)return!1;if(e){if(os(t.options.mutationKey)!==os(a))return!1}else if(!Rd(t.options.mutationKey,a))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||i&&!i(t))}function Fy(r,t){var e=(t==null?void 0:t.queryKeyHashFn)||os;return e(r)}function os(r){var t=Od(r);return TH(t)}function TH(r){return JSON.stringify(r,function(t,e){return Vy(e)?Object.keys(e).sort().reduce(function(n,i){return n[i]=e[i],n},{}):e})}function Rd(r,t){return tM(Od(r),Od(t))}function tM(r,t){return r===t?!0:typeof r!=typeof t?!1:r&&t&&typeof r=="object"&&typeof t=="object"?!Object.keys(t).some(function(e){return!tM(r[e],t[e])}):!1}function kd(r,t){if(r===t)return r;var e=Array.isArray(r)&&Array.isArray(t);if(e||Vy(r)&&Vy(t)){for(var n=e?r.length:Object.keys(r).length,i=e?t:Object.keys(t),a=i.length,o=e?[]:{},s=0,l=0;l<a;l++){var u=e?l:i[l];o[u]=kd(r[u],t[u]),o[u]===r[u]&&s++}return n===a&&s===n?r:o}return t}function MH(r,t){if(r&&!t||t&&!r)return!1;for(var e in r)if(r[e]!==t[e])return!1;return!0}function Vy(r){if(!eM(r))return!1;var t=r.constructor;if(typeof t=="undefined")return!0;var e=t.prototype;return!(!eM(e)||!e.hasOwnProperty("isPrototypeOf"))}function eM(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ac(r){return typeof r=="string"||Array.isArray(r)}function DH(r){return new Promise(function(t){setTimeout(t,r)})}function rM(r){Promise.resolve().then(r).catch(function(t){return setTimeout(function(){throw t})})}function nM(){if(typeof AbortController=="function")return new AbortController}var AH=function(r){Ul(t,r);function t(){var n;return n=r.call(this)||this,n.setup=function(i){var a;if(!Id&&((a=window)==null?void 0:a.addEventListener)){var o=function(){return i()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},n}var e=t.prototype;return e.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},e.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},e.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},e.setFocused=function(i){this.focused=i,i&&this.onFocus()},e.onFocus=function(){this.listeners.forEach(function(i){i()})},e.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(Yl),Pc=new AH,PH=function(r){Ul(t,r);function t(){var n;return n=r.call(this)||this,n.setup=function(i){var a;if(!Id&&((a=window)==null?void 0:a.addEventListener)){var o=function(){return i()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},n}var e=t.prototype;return e.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},e.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},e.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},e.setOnline=function(i){this.online=i,i&&this.onOnline()},e.onOnline=function(){this.listeners.forEach(function(i){i()})},e.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine},t}(Yl),Nd=new PH;function LH(r){return Math.min(1e3*Math.pow(2,r),3e4)}function Bd(r){return typeof(r==null?void 0:r.cancel)=="function"}var iM=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function zd(r){return r instanceof iM}var aM=function(t){var e=this,n=!1,i,a,o,s;this.abort=t.abort,this.cancel=function(h){return i==null?void 0:i(h)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return a==null?void 0:a()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,d){o=h,s=d});var l=function(d){e.isResolved||(e.isResolved=!0,t.onSuccess==null||t.onSuccess(d),a==null||a(),o(d))},u=function(d){e.isResolved||(e.isResolved=!0,t.onError==null||t.onError(d),a==null||a(),s(d))},c=function(){return new Promise(function(d){a=d,e.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){a=void 0,e.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function h(){if(!e.isResolved){var d;try{d=t.fn()}catch(v){d=Promise.reject(v)}i=function(p){if(!e.isResolved&&(u(new iM(p)),e.abort==null||e.abort(),Bd(d)))try{d.cancel()}catch{}},e.isTransportCancelable=Bd(d),Promise.resolve(d).then(l).catch(function(v){var p,g;if(!e.isResolved){var m=(p=t.retry)!=null?p:3,y=(g=t.retryDelay)!=null?g:LH,_=typeof y=="function"?y(e.failureCount,v):y,b=m===!0||typeof m=="number"&&e.failureCount<m||typeof m=="function"&&m(e.failureCount,v);if(n||!b){u(v);return}e.failureCount++,t.onFail==null||t.onFail(e.failureCount,v),DH(_).then(function(){if(!Pc.isFocused()||!Nd.isOnline())return c()}).then(function(){n?u(v):h()})}})}};f()},IH=function(){function r(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=r.prototype;return t.batch=function(n){var i;this.transactions++;try{i=n()}finally{this.transactions--,this.transactions||this.flush()}return i},t.schedule=function(n){var i=this;this.transactions?this.queue.push(n):rM(function(){i.notifyFn(n)})},t.batchCalls=function(n){var i=this;return function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];i.schedule(function(){n.apply(void 0,o)})}},t.flush=function(){var n=this,i=this.queue;this.queue=[],i.length&&rM(function(){n.batchNotifyFn(function(){i.forEach(function(a){n.notifyFn(a)})})})},t.setNotifyFunction=function(n){this.notifyFn=n},t.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},r}(),Oe=new IH,oM=console;function Fd(){return oM}function OH(r){oM=r}var EH=function(){function r(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=r.prototype;return t.setOptions=function(n){var i;this.options=te({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:5*60*1e3)},t.setDefaultOptions=function(n){this.defaultOptions=n},t.scheduleGc=function(){var n=this;this.clearGcTimeout(),zy(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(n,i){var a,o,s=this.state.data,l=SH(n,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=kd(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),l},t.setState=function(n,i){this.dispatch({type:"setState",state:n,setStateOptions:i})},t.cancel=function(n){var i,a=this.promise;return(i=this.retryer)==null||i.cancel(n),a?a.then(vr).catch(vr):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(n){return n.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},t.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!KT(this.state.dataUpdatedAt,n)},t.onFocus=function(){var n,i=this.observers.find(function(a){return a.shouldFetchOnWindowFocus()});i&&i.refetch(),(n=this.retryer)==null||n.continue()},t.onOnline=function(){var n,i=this.observers.find(function(a){return a.shouldFetchOnReconnect()});i&&i.refetch(),(n=this.retryer)==null||n.continue()},t.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},t.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(i){return i!==n}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:n}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(n,i){var a=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i==null?void 0:i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var c=this.observers.find(function(y){return y.options.queryFn});c&&this.setOptions(c.options)}var f=Od(this.queryKey),h=nM(),d={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(d,"signal",{enumerable:!0,get:function(){if(h)return a.abortSignalConsumed=!0,h.signal}});var v=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(d)):Promise.reject("Missing queryFn")},p={fetchOptions:i,options:this.options,queryKey:f,state:this.state,fetchFn:v,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(p)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=p.fetchOptions)==null?void 0:s.meta)){var m;this.dispatch({type:"fetch",meta:(m=p.fetchOptions)==null?void 0:m.meta})}return this.retryer=new aM({fn:p.fetchFn,abort:h==null||(l=h.abort)==null?void 0:l.bind(h),onSuccess:function(_){a.setData(_),a.cache.config.onSuccess==null||a.cache.config.onSuccess(_,a),a.cacheTime===0&&a.optionalRemove()},onError:function(_){zd(_)&&_.silent||a.dispatch({type:"error",error:_}),zd(_)||(a.cache.config.onError==null||a.cache.config.onError(_,a),Fd().error(_)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(n){var i=this;this.state=this.reducer(this.state,n),Oe.batch(function(){i.observers.forEach(function(a){a.onQueryUpdate(n)}),i.cache.notify({query:i,type:"queryUpdated",action:n})})},t.getDefaultState=function(n){var i=typeof n.initialData=="function"?n.initialData():n.initialData,a=typeof n.initialData!="undefined",o=a?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof i!="undefined";return{data:i,dataUpdateCount:0,dataUpdatedAt:s?o!=null?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},t.reducer=function(n,i){var a,o;switch(i.type){case"failed":return te({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return te({},n,{isPaused:!0});case"continue":return te({},n,{isPaused:!1});case"fetch":return te({},n,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return te({},n,{data:i.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(o=i.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=i.error;return zd(s)&&s.revert&&this.revertState?te({},this.revertState):te({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return te({},n,{isInvalidated:!0});case"setState":return te({},n,i.state);default:return n}},r}(),RH=function(r){Ul(t,r);function t(n){var i;return i=r.call(this)||this,i.config=n||{},i.queries=[],i.queriesMap={},i}var e=t.prototype;return e.build=function(i,a,o){var s,l=a.queryKey,u=(s=a.queryHash)!=null?s:Fy(l,a),c=this.get(u);return c||(c=new EH({cache:this,queryKey:l,queryHash:u,options:i.defaultQueryOptions(a),state:o,defaultOptions:i.getQueryDefaults(l),meta:a.meta}),this.add(c)),c},e.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},e.remove=function(i){var a=this.queriesMap[i.queryHash];a&&(i.destroy(),this.queries=this.queries.filter(function(o){return o!==i}),a===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},e.clear=function(){var i=this;Oe.batch(function(){i.queries.forEach(function(a){i.remove(a)})})},e.get=function(i){return this.queriesMap[i]},e.getAll=function(){return this.queries},e.find=function(i,a){var o=Ka(i,a),s=o[0];return typeof s.exact=="undefined"&&(s.exact=!0),this.queries.find(function(l){return QT(s,l)})},e.findAll=function(i,a){var o=Ka(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return QT(s,l)}):this.queries},e.notify=function(i){var a=this;Oe.batch(function(){a.listeners.forEach(function(o){o(i)})})},e.onFocus=function(){var i=this;Oe.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},e.onOnline=function(){var i=this;Oe.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},t}(Yl),kH=function(){function r(e){this.options=te({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||sM(),this.meta=e.meta}var t=r.prototype;return t.setState=function(n){this.dispatch({type:"setState",state:n})},t.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},t.removeObserver=function(n){this.observers=this.observers.filter(function(i){return i!==n})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(vr).catch(vr)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var n=this,i,a=this.state.status==="loading",o=Promise.resolve();return a||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),o.then(function(){return n.executeMutation()}).then(function(s){i=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(i,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(i,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(i,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:i}),i}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),Fd().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},t.executeMutation=function(){var n=this,i;return this.retryer=new aM({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(n){var i=this;this.state=NH(this.state,n),Oe.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(n)}),i.mutationCache.notify(i)})},r}();function sM(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function NH(r,t){switch(t.type){case"failed":return te({},r,{failureCount:r.failureCount+1});case"pause":return te({},r,{isPaused:!0});case"continue":return te({},r,{isPaused:!1});case"loading":return te({},r,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return te({},r,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return te({},r,{data:void 0,error:t.error,failureCount:r.failureCount+1,isPaused:!1,status:"error"});case"setState":return te({},r,t.state);default:return r}}var BH=function(r){Ul(t,r);function t(n){var i;return i=r.call(this)||this,i.config=n||{},i.mutations=[],i.mutationId=0,i}var e=t.prototype;return e.build=function(i,a,o){var s=new kH({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(a),state:o,defaultOptions:a.mutationKey?i.getMutationDefaults(a.mutationKey):void 0,meta:a.meta});return this.add(s),s},e.add=function(i){this.mutations.push(i),this.notify(i)},e.remove=function(i){this.mutations=this.mutations.filter(function(a){return a!==i}),i.cancel(),this.notify(i)},e.clear=function(){var i=this;Oe.batch(function(){i.mutations.forEach(function(a){i.remove(a)})})},e.getAll=function(){return this.mutations},e.find=function(i){return typeof i.exact=="undefined"&&(i.exact=!0),this.mutations.find(function(a){return JT(i,a)})},e.findAll=function(i){return this.mutations.filter(function(a){return JT(i,a)})},e.notify=function(i){var a=this;Oe.batch(function(){a.listeners.forEach(function(o){o(i)})})},e.onFocus=function(){this.resumePausedMutations()},e.onOnline=function(){this.resumePausedMutations()},e.resumePausedMutations=function(){var i=this.mutations.filter(function(a){return a.state.isPaused});return Oe.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(vr)})},Promise.resolve())})},t}(Yl);function zH(){return{onFetch:function(t){t.fetchFn=function(){var e,n,i,a,o,s,l=(e=t.fetchOptions)==null||(n=e.meta)==null?void 0:n.refetchPage,u=(i=t.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,c=u==null?void 0:u.pageParam,f=(u==null?void 0:u.direction)==="forward",h=(u==null?void 0:u.direction)==="backward",d=((o=t.state.data)==null?void 0:o.pages)||[],v=((s=t.state.data)==null?void 0:s.pageParams)||[],p=nM(),g=p==null?void 0:p.signal,m=v,y=!1,_=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},b=function(O,E,R,z){return m=z?[E].concat(m):[].concat(m,[E]),z?[R].concat(O):[].concat(O,[R])},S=function(O,E,R,z){if(y)return Promise.reject("Cancelled");if(typeof R=="undefined"&&!E&&O.length)return Promise.resolve(O);var B={queryKey:t.queryKey,signal:g,pageParam:R,meta:t.meta},Y=_(B),W=Promise.resolve(Y).then(function(V){return b(O,R,V,z)});if(Bd(Y)){var et=W;et.cancel=Y.cancel}return W},x;if(!d.length)x=S([]);else if(f){var w=typeof c!="undefined",C=w?c:lM(t.options,d);x=S(d,w,C)}else if(h){var T=typeof c!="undefined",D=T?c:FH(t.options,d);x=S(d,T,D,!0)}else(function(){m=[];var I=typeof t.options.getNextPageParam=="undefined",O=l&&d[0]?l(d[0],0,d):!0;x=O?S([],I,v[0]):Promise.resolve(b([],v[0],d[0]));for(var E=function(B){x=x.then(function(Y){var W=l&&d[B]?l(d[B],B,d):!0;if(W){var et=I?v[B]:lM(t.options,Y);return S(Y,I,et)}return Promise.resolve(b(Y,v[B],d[B]))})},R=1;R<d.length;R++)E(R)})();var A=x.then(function(I){return{pages:I,pageParams:m}}),P=A;return P.cancel=function(){y=!0,p==null||p.abort(),Bd(x)&&x.cancel()},A}}}}function lM(r,t){return r.getNextPageParam==null?void 0:r.getNextPageParam(t[t.length-1],t)}function FH(r,t){return r.getPreviousPageParam==null?void 0:r.getPreviousPageParam(t[0],t)}var VH=function(){function r(e){e===void 0&&(e={}),this.queryCache=e.queryCache||new RH,this.mutationCache=e.mutationCache||new BH,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=r.prototype;return t.mount=function(){var n=this;this.unsubscribeFocus=Pc.subscribe(function(){Pc.isFocused()&&Nd.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=Nd.subscribe(function(){Pc.isFocused()&&Nd.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},t.unmount=function(){var n,i;(n=this.unsubscribeFocus)==null||n.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},t.isFetching=function(n,i){var a=Ka(n,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},t.isMutating=function(n){return this.mutationCache.findAll(te({},n,{fetching:!0})).length},t.getQueryData=function(n,i){var a;return(a=this.queryCache.find(n,i))==null?void 0:a.state.data},t.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(i){var a=i.queryKey,o=i.state,s=o.data;return[a,s]})},t.setQueryData=function(n,i,a){var o=Ed(n),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},t.setQueriesData=function(n,i,a){var o=this;return Oe.batch(function(){return o.getQueryCache().findAll(n).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,i,a)]})})},t.getQueryState=function(n,i){var a;return(a=this.queryCache.find(n,i))==null?void 0:a.state},t.removeQueries=function(n,i){var a=Ka(n,i),o=a[0],s=this.queryCache;Oe.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},t.resetQueries=function(n,i,a){var o=this,s=Ka(n,i,a),l=s[0],u=s[1],c=this.queryCache,f=te({},l,{active:!0});return Oe.batch(function(){return c.findAll(l).forEach(function(h){h.reset()}),o.refetchQueries(f,u)})},t.cancelQueries=function(n,i,a){var o=this,s=Ka(n,i,a),l=s[0],u=s[1],c=u===void 0?{}:u;typeof c.revert=="undefined"&&(c.revert=!0);var f=Oe.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.cancel(c)})});return Promise.all(f).then(vr).catch(vr)},t.invalidateQueries=function(n,i,a){var o,s,l,u=this,c=Ka(n,i,a),f=c[0],h=c[1],d=te({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Oe.batch(function(){return u.queryCache.findAll(f).forEach(function(v){v.invalidate()}),u.refetchQueries(d,h)})},t.refetchQueries=function(n,i,a){var o=this,s=Ka(n,i,a),l=s[0],u=s[1],c=Oe.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.fetch(void 0,te({},u,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(c).then(vr);return u!=null&&u.throwOnError||(f=f.catch(vr)),f},t.fetchQuery=function(n,i,a){var o=Ed(n,i,a),s=this.defaultQueryOptions(o);typeof s.retry=="undefined"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},t.prefetchQuery=function(n,i,a){return this.fetchQuery(n,i,a).then(vr).catch(vr)},t.fetchInfiniteQuery=function(n,i,a){var o=Ed(n,i,a);return o.behavior=zH(),this.fetchQuery(o)},t.prefetchInfiniteQuery=function(n,i,a){return this.fetchInfiniteQuery(n,i,a).then(vr).catch(vr)},t.cancelMutations=function(){var n=this,i=Oe.batch(function(){return n.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(vr).catch(vr)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(n){this.defaultOptions=n},t.setQueryDefaults=function(n,i){var a=this.queryDefaults.find(function(o){return os(n)===os(o.queryKey)});a?a.defaultOptions=i:this.queryDefaults.push({queryKey:n,defaultOptions:i})},t.getQueryDefaults=function(n){var i;return n?(i=this.queryDefaults.find(function(a){return Rd(n,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},t.setMutationDefaults=function(n,i){var a=this.mutationDefaults.find(function(o){return os(n)===os(o.mutationKey)});a?a.defaultOptions=i:this.mutationDefaults.push({mutationKey:n,defaultOptions:i})},t.getMutationDefaults=function(n){var i;return n?(i=this.mutationDefaults.find(function(a){return Rd(n,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},t.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var i=te({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=Fy(i.queryKey,i)),i},t.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},t.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:te({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},r}(),HH=function(r){Ul(t,r);function t(n,i){var a;return a=r.call(this)||this,a.client=n,a.options=i,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(i),a}var e=t.prototype;return e.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},e.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),uM(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},e.onUnsubscribe=function(){this.listeners.length||this.destroy()},e.shouldFetchOnReconnect=function(){return Hy(this.currentQuery,this.options,this.options.refetchOnReconnect)},e.shouldFetchOnWindowFocus=function(){return Hy(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},e.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},e.setOptions=function(i,a){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&cM(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(a),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var u=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)},e.getOptimisticResult=function(i){var a=this.client.defaultQueryObserverOptions(i),o=this.client.getQueryCache().build(this.client,a);return this.createResult(o,a)},e.getCurrentResult=function(){return this.currentResult},e.trackResult=function(i,a){var o=this,s={},l=function(c){o.trackedProps.includes(c)||o.trackedProps.push(c)};return Object.keys(i).forEach(function(u){Object.defineProperty(s,u,{configurable:!1,enumerable:!0,get:function(){return l(u),i[u]}})}),(a.useErrorBoundary||a.suspense)&&l("error"),s},e.getNextResult=function(i){var a=this;return new Promise(function(o,s){var l=a.subscribe(function(u){u.isFetching||(l(),u.isError&&(i==null?void 0:i.throwOnError)?s(u.error):o(u))})})},e.getCurrentQuery=function(){return this.currentQuery},e.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},e.refetch=function(i){return this.fetch(te({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},e.fetchOptimistic=function(i){var a=this,o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return a.createResult(s,o)})},e.fetch=function(i){var a=this;return this.executeFetch(i).then(function(){return a.updateResult(),a.currentResult})},e.executeFetch=function(i){this.updateQuery();var a=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(vr)),a},e.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Id||this.currentResult.isStale||!zy(this.options.staleTime))){var a=KT(this.currentResult.dataUpdatedAt,this.options.staleTime),o=a+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},o)}},e.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},e.updateRefetchInterval=function(i){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Id||this.options.enabled===!1||!zy(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||Pc.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},e.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},e.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},e.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},e.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},e.createResult=function(i,a){var o=this.currentQuery,s=this.options,l=this.currentResult,u=this.currentResultState,c=this.currentResultOptions,f=i!==o,h=f?i.state:this.currentQueryInitialState,d=f?this.currentResult:this.previousQueryResult,v=i.state,p=v.dataUpdatedAt,g=v.error,m=v.errorUpdatedAt,y=v.isFetching,_=v.status,b=!1,S=!1,x;if(a.optimisticResults){var w=this.hasListeners(),C=!w&&uM(i,a),T=w&&cM(i,o,a,s);(C||T)&&(y=!0,p||(_="loading"))}if(a.keepPreviousData&&!v.dataUpdateCount&&(d==null?void 0:d.isSuccess)&&_!=="error")x=d.data,p=d.dataUpdatedAt,_=d.status,b=!0;else if(a.select&&typeof v.data!="undefined")if(l&&v.data===(u==null?void 0:u.data)&&a.select===this.selectFn)x=this.selectResult;else try{this.selectFn=a.select,x=a.select(v.data),a.structuralSharing!==!1&&(x=kd(l==null?void 0:l.data,x)),this.selectResult=x,this.selectError=null}catch(P){Fd().error(P),this.selectError=P}else x=v.data;if(typeof a.placeholderData!="undefined"&&typeof x=="undefined"&&(_==="loading"||_==="idle")){var D;if((l==null?void 0:l.isPlaceholderData)&&a.placeholderData===(c==null?void 0:c.placeholderData))D=l.data;else if(D=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof D!="undefined")try{D=a.select(D),a.structuralSharing!==!1&&(D=kd(l==null?void 0:l.data,D)),this.selectError=null}catch(P){Fd().error(P),this.selectError=P}typeof D!="undefined"&&(_="success",x=D,S=!0)}this.selectError&&(g=this.selectError,x=this.selectResult,m=Date.now(),_="error");var A={status:_,isLoading:_==="loading",isSuccess:_==="success",isError:_==="error",isIdle:_==="idle",data:x,dataUpdatedAt:p,error:g,errorUpdatedAt:m,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>h.dataUpdateCount||v.errorUpdateCount>h.errorUpdateCount,isFetching:y,isRefetching:y&&_!=="loading",isLoadingError:_==="error"&&v.dataUpdatedAt===0,isPlaceholderData:S,isPreviousData:b,isRefetchError:_==="error"&&v.dataUpdatedAt!==0,isStale:$y(i,a),refetch:this.refetch,remove:this.remove};return A},e.shouldNotifyListeners=function(i,a){if(!a)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var u=s==="tracked"?this.trackedProps:s;return Object.keys(i).some(function(c){var f=c,h=i[f]!==a[f],d=u==null?void 0:u.some(function(p){return p===c}),v=l==null?void 0:l.some(function(p){return p===c});return h&&!v&&(!u||d)})},e.updateResult=function(i){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!MH(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(te({},o,i))}},e.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var a=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))}},e.onQueryUpdate=function(i){var a={};i.type==="success"?a.onSuccess=!0:i.type==="error"&&!zd(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},e.notify=function(i){var a=this;Oe.batch(function(){i.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):i.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)}),i.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},t}(Yl);function $H(r,t){return t.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&t.retryOnMount===!1)}function uM(r,t){return $H(r,t)||r.state.dataUpdatedAt>0&&Hy(r,t,t.refetchOnMount)}function Hy(r,t,e){if(t.enabled!==!1){var n=typeof e=="function"?e(r):e;return n==="always"||n!==!1&&$y(r,t)}return!1}function cM(r,t,e,n){return e.enabled!==!1&&(r!==t||n.enabled===!1)&&(!e.suspense||r.state.status!=="error")&&$y(r,e)}function $y(r,t){return r.isStaleByTime(t.staleTime)}var WH=function(r){Ul(t,r);function t(n,i){var a;return a=r.call(this)||this,a.client=n,a.setOptions(i),a.bindMethods(),a.updateResult(),a}var e=t.prototype;return e.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},e.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},e.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},e.onMutationUpdate=function(i){this.updateResult();var a={listeners:!0};i.type==="success"?a.onSuccess=!0:i.type==="error"&&(a.onError=!0),this.notify(a)},e.getCurrentResult=function(){return this.currentResult},e.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},e.mutate=function(i,a){return this.mutateOptions=a,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,te({},this.options,{variables:typeof i!="undefined"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},e.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:sM(),a=te({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=a},e.notify=function(i){var a=this;Oe.batch(function(){a.mutateOptions&&(i.onSuccess?(a.mutateOptions.onSuccess==null||a.mutateOptions.onSuccess(a.currentResult.data,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(a.currentResult.data,null,a.currentResult.variables,a.currentResult.context)):i.onError&&(a.mutateOptions.onError==null||a.mutateOptions.onError(a.currentResult.error,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(void 0,a.currentResult.error,a.currentResult.variables,a.currentResult.context))),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)})})},t}(Yl),GH=Ld.default.unstable_batchedUpdates;Oe.setBatchNotifyFunction(GH);var UH=console;OH(UH);var fM=st.default.createContext(void 0),hM=st.default.createContext(!1);function dM(r){return r&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=fM),window.ReactQueryClientContext):fM}var vM=function(){var t=st.default.useContext(dM(st.default.useContext(hM)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YH=function(t){var e=t.client,n=t.contextSharing,i=n===void 0?!1:n,a=t.children;st.default.useEffect(function(){return e.mount(),function(){e.unmount()}},[e]);var o=dM(i);return st.default.createElement(hM.Provider,{value:i},st.default.createElement(o.Provider,{value:e},a))};function qH(){var r=!1;return{clearReset:function(){r=!1},reset:function(){r=!0},isReset:function(){return r}}}var jH=st.default.createContext(qH()),XH=function(){return st.default.useContext(jH)};function pM(r,t,e){return typeof t=="function"?t.apply(void 0,e):typeof t=="boolean"?t:!!r}function Vd(r,t,e){var n=st.default.useRef(!1),i=st.default.useState(0),a=i[1],o=wH(r,t,e),s=vM(),l=st.default.useRef();l.current?l.current.setOptions(o):l.current=new WH(s,o);var u=l.current.getCurrentResult();st.default.useEffect(function(){n.current=!0;var f=l.current.subscribe(Oe.batchCalls(function(){n.current&&a(function(h){return h+1})}));return function(){n.current=!1,f()}},[]);var c=st.default.useCallback(function(f,h){l.current.mutate(f,h).catch(vr)},[]);if(u.error&&pM(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return te({},u,{mutate:c,mutateAsync:u.mutate})}function ZH(r,t){var e=st.default.useRef(!1),n=st.default.useState(0),i=n[1],a=vM(),o=XH(),s=a.defaultQueryObserverOptions(r);s.optimisticResults=!0,s.onError&&(s.onError=Oe.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Oe.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Oe.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=st.default.useState(function(){return new t(a,s)}),u=l[0],c=u.getOptimisticResult(s);if(st.default.useEffect(function(){e.current=!0,o.clearReset();var f=u.subscribe(Oe.batchCalls(function(){e.current&&i(function(h){return h+1})}));return u.updateResult(),function(){e.current=!1,f()}},[o,u]),st.default.useEffect(function(){u.setOptions(s,{listeners:!1})},[s,u]),s.suspense&&c.isLoading)throw u.fetchOptimistic(s).then(function(f){var h=f.data;s.onSuccess==null||s.onSuccess(h),s.onSettled==null||s.onSettled(h,null)}).catch(function(f){o.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(c.isError&&!o.isReset()&&!c.isFetching&&pM(s.suspense,s.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return s.notifyOnChangeProps==="tracked"&&(c=u.trackResult(c,s)),c}function Qa(r,t,e){var n=Ed(r,t,e);return ZH(n,HH)}var Hd=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function KH(r){if(r.__esModule)return r;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return r[e]}})}),t}var Wy={exports:{}},Lc={},Ic={exports:{}};(function(r,t){var e=200,n="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",h="[object Error]",d="[object Function]",v="[object GeneratorFunction]",p="[object Map]",g="[object Number]",m="[object Null]",y="[object Object]",_="[object Promise]",b="[object Proxy]",S="[object RegExp]",x="[object Set]",w="[object String]",C="[object Symbol]",T="[object Undefined]",D="[object WeakMap]",A="[object ArrayBuffer]",P="[object DataView]",I="[object Float32Array]",O="[object Float64Array]",E="[object Int8Array]",R="[object Int16Array]",z="[object Int32Array]",B="[object Uint8Array]",Y="[object Uint8ClampedArray]",W="[object Uint16Array]",et="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,H=/^\[object .+?Constructor\]$/,G=/^(?:0|[1-9]\d*)$/,j={};j[I]=j[O]=j[E]=j[R]=j[z]=j[B]=j[Y]=j[W]=j[et]=!0,j[s]=j[l]=j[A]=j[c]=j[P]=j[f]=j[h]=j[d]=j[p]=j[g]=j[y]=j[S]=j[x]=j[w]=j[D]=!1;var tt=typeof Hd=="object"&&Hd&&Hd.Object===Object&&Hd,nt=typeof self=="object"&&self&&self.Object===Object&&self,rt=tt||nt||Function("return this")(),vt=t&&!t.nodeType&&t,ft=vt&&!0&&r&&!r.nodeType&&r,lt=ft&&ft.exports===vt,mt=lt&&tt.process,At=function(){try{return mt&&mt.binding&&mt.binding("util")}catch{}}(),Ct=At&&At.isTypedArray;function F(N,U){for(var it=-1,Mt=N==null?0:N.length,Ie=0,Kt=[];++it<Mt;){var Ue=N[it];U(Ue,it,N)&&(Kt[Ie++]=Ue)}return Kt}function X(N,U){for(var it=-1,Mt=U.length,Ie=N.length;++it<Mt;)N[Ie+it]=U[it];return N}function Z(N,U){for(var it=-1,Mt=N==null?0:N.length;++it<Mt;)if(U(N[it],it,N))return!0;return!1}function ut(N,U){for(var it=-1,Mt=Array(N);++it<N;)Mt[it]=U(it);return Mt}function ht(N){return function(U){return N(U)}}function ot(N,U){return N.has(U)}function gt(N,U){return N==null?void 0:N[U]}function ve(N){var U=-1,it=Array(N.size);return N.forEach(function(Mt,Ie){it[++U]=[Ie,Mt]}),it}function Zt(N,U){return function(it){return N(U(it))}}function ts(N){var U=-1,it=Array(N.size);return N.forEach(function(Mt){it[++U]=Mt}),it}var dn=Array.prototype,Ei=Function.prototype,da=Object.prototype,Ri=rt["__core-js_shared__"],es=Ei.toString,Qe=da.hasOwnProperty,Mc=function(){var N=/[^.]+$/.exec(Ri&&Ri.keys&&Ri.keys.IE_PROTO||"");return N?"Symbol(src)_1."+N:""}(),Vl=da.toString,Dd=RegExp("^"+es.call(Qe).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rs=lt?rt.Buffer:void 0,ee=rt.Symbol,we=rt.Uint8Array,or=da.propertyIsEnumerable,Tn=dn.splice,Mn=ee?ee.toStringTag:void 0,zr=Object.getOwnPropertySymbols,YT=rs?rs.isBuffer:void 0,qT=Zt(Object.keys,Object),Pt=Dc(rt,"DataView"),Le=Dc(rt,"Map"),hr=Dc(rt,"Promise"),oi=Dc(rt,"Set"),Kr=Dc(rt,"WeakMap"),va=Dc(Object,"create"),Ly=Wl(Pt),zbt=Wl(Le),Fbt=Wl(hr),Vbt=Wl(oi),Hbt=Wl(Kr),cH=ee?ee.prototype:void 0,jT=cH?cH.valueOf:void 0;function Hl(N){var U=-1,it=N==null?0:N.length;for(this.clear();++U<it;){var Mt=N[U];this.set(Mt[0],Mt[1])}}function $bt(){this.__data__=va?va(null):{},this.size=0}function Wbt(N){var U=this.has(N)&&delete this.__data__[N];return this.size-=U?1:0,U}function Gbt(N){var U=this.__data__;if(va){var it=U[N];return it===n?void 0:it}return Qe.call(U,N)?U[N]:void 0}function Ubt(N){var U=this.__data__;return va?U[N]!==void 0:Qe.call(U,N)}function Ybt(N,U){var it=this.__data__;return this.size+=this.has(N)?0:1,it[N]=va&&U===void 0?n:U,this}Hl.prototype.clear=$bt,Hl.prototype.delete=Wbt,Hl.prototype.get=Gbt,Hl.prototype.has=Ubt,Hl.prototype.set=Ybt;function ja(N){var U=-1,it=N==null?0:N.length;for(this.clear();++U<it;){var Mt=N[U];this.set(Mt[0],Mt[1])}}function qbt(){this.__data__=[],this.size=0}function jbt(N){var U=this.__data__,it=Oy(U,N);if(it<0)return!1;var Mt=U.length-1;return it==Mt?U.pop():Tn.call(U,it,1),--this.size,!0}function Xbt(N){var U=this.__data__,it=Oy(U,N);return it<0?void 0:U[it][1]}function Zbt(N){return Oy(this.__data__,N)>-1}function Kbt(N,U){var it=this.__data__,Mt=Oy(it,N);return Mt<0?(++this.size,it.push([N,U])):it[Mt][1]=U,this}ja.prototype.clear=qbt,ja.prototype.delete=jbt,ja.prototype.get=Xbt,ja.prototype.has=Zbt,ja.prototype.set=Kbt;function $l(N){var U=-1,it=N==null?0:N.length;for(this.clear();++U<it;){var Mt=N[U];this.set(Mt[0],Mt[1])}}function Qbt(){this.size=0,this.__data__={hash:new Hl,map:new(Le||ja),string:new Hl}}function Jbt(N){var U=Ey(this,N).delete(N);return this.size-=U?1:0,U}function t1t(N){return Ey(this,N).get(N)}function e1t(N){return Ey(this,N).has(N)}function r1t(N,U){var it=Ey(this,N),Mt=it.size;return it.set(N,U),this.size+=it.size==Mt?0:1,this}$l.prototype.clear=Qbt,$l.prototype.delete=Jbt,$l.prototype.get=t1t,$l.prototype.has=e1t,$l.prototype.set=r1t;function Iy(N){var U=-1,it=N==null?0:N.length;for(this.__data__=new $l;++U<it;)this.add(N[U])}function n1t(N){return this.__data__.set(N,n),this}function i1t(N){return this.__data__.has(N)}Iy.prototype.add=Iy.prototype.push=n1t,Iy.prototype.has=i1t;function ns(N){var U=this.__data__=new ja(N);this.size=U.size}function a1t(){this.__data__=new ja,this.size=0}function o1t(N){var U=this.__data__,it=U.delete(N);return this.size=U.size,it}function s1t(N){return this.__data__.get(N)}function l1t(N){return this.__data__.has(N)}function u1t(N,U){var it=this.__data__;if(it instanceof ja){var Mt=it.__data__;if(!Le||Mt.length<e-1)return Mt.push([N,U]),this.size=++it.size,this;it=this.__data__=new $l(Mt)}return it.set(N,U),this.size=it.size,this}ns.prototype.clear=a1t,ns.prototype.delete=o1t,ns.prototype.get=s1t,ns.prototype.has=l1t,ns.prototype.set=u1t;function c1t(N,U){var it=Ry(N),Mt=!it&&T1t(N),Ie=!it&&!Mt&&XT(N),Kt=!it&&!Mt&&!Ie&&_H(N),Ue=it||Mt||Ie||Kt,dr=Ue?ut(N.length,String):[],wr=dr.length;for(var Ve in N)(U||Qe.call(N,Ve))&&!(Ue&&(Ve=="length"||Ie&&(Ve=="offset"||Ve=="parent")||Kt&&(Ve=="buffer"||Ve=="byteLength"||Ve=="byteOffset")||b1t(Ve,wr)))&&dr.push(Ve);return dr}function Oy(N,U){for(var it=N.length;it--;)if(pH(N[it][0],U))return it;return-1}function f1t(N,U,it){var Mt=U(N);return Ry(N)?Mt:X(Mt,it(N))}function Ad(N){return N==null?N===void 0?T:m:Mn&&Mn in Object(N)?y1t(N):C1t(N)}function fH(N){return Pd(N)&&Ad(N)==s}function hH(N,U,it,Mt,Ie){return N===U?!0:N==null||U==null||!Pd(N)&&!Pd(U)?N!==N&&U!==U:h1t(N,U,it,Mt,hH,Ie)}function h1t(N,U,it,Mt,Ie,Kt){var Ue=Ry(N),dr=Ry(U),wr=Ue?l:is(N),Ve=dr?l:is(U);wr=wr==s?y:wr,Ve=Ve==s?y:Ve;var Dn=wr==y,ki=Ve==y,Fr=wr==Ve;if(Fr&&XT(N)){if(!XT(U))return!1;Ue=!0,Dn=!1}if(Fr&&!Dn)return Kt||(Kt=new ns),Ue||_H(N)?dH(N,U,it,Mt,Ie,Kt):g1t(N,U,wr,it,Mt,Ie,Kt);if(!(it&i)){var si=Dn&&Qe.call(N,"__wrapped__"),li=ki&&Qe.call(U,"__wrapped__");if(si||li){var as=si?N.value():N,Xa=li?U.value():U;return Kt||(Kt=new ns),Ie(as,Xa,it,Mt,Kt)}}return Fr?(Kt||(Kt=new ns),m1t(N,U,it,Mt,Ie,Kt)):!1}function d1t(N){if(!yH(N)||S1t(N))return!1;var U=gH(N)?Dd:H;return U.test(Wl(N))}function v1t(N){return Pd(N)&&mH(N.length)&&!!j[Ad(N)]}function p1t(N){if(!w1t(N))return qT(N);var U=[];for(var it in Object(N))Qe.call(N,it)&&it!="constructor"&&U.push(it);return U}function dH(N,U,it,Mt,Ie,Kt){var Ue=it&i,dr=N.length,wr=U.length;if(dr!=wr&&!(Ue&&wr>dr))return!1;var Ve=Kt.get(N);if(Ve&&Kt.get(U))return Ve==U;var Dn=-1,ki=!0,Fr=it&a?new Iy:void 0;for(Kt.set(N,U),Kt.set(U,N);++Dn<dr;){var si=N[Dn],li=U[Dn];if(Mt)var as=Ue?Mt(li,si,Dn,U,N,Kt):Mt(si,li,Dn,N,U,Kt);if(as!==void 0){if(as)continue;ki=!1;break}if(Fr){if(!Z(U,function(Xa,Gl){if(!ot(Fr,Gl)&&(si===Xa||Ie(si,Xa,it,Mt,Kt)))return Fr.push(Gl)})){ki=!1;break}}else if(!(si===li||Ie(si,li,it,Mt,Kt))){ki=!1;break}}return Kt.delete(N),Kt.delete(U),ki}function g1t(N,U,it,Mt,Ie,Kt,Ue){switch(it){case P:if(N.byteLength!=U.byteLength||N.byteOffset!=U.byteOffset)return!1;N=N.buffer,U=U.buffer;case A:return!(N.byteLength!=U.byteLength||!Kt(new we(N),new we(U)));case c:case f:case g:return pH(+N,+U);case h:return N.name==U.name&&N.message==U.message;case S:case w:return N==U+"";case p:var dr=ve;case x:var wr=Mt&i;if(dr||(dr=ts),N.size!=U.size&&!wr)return!1;var Ve=Ue.get(N);if(Ve)return Ve==U;Mt|=a,Ue.set(N,U);var Dn=dH(dr(N),dr(U),Mt,Ie,Kt,Ue);return Ue.delete(N),Dn;case C:if(jT)return jT.call(N)==jT.call(U)}return!1}function m1t(N,U,it,Mt,Ie,Kt){var Ue=it&i,dr=vH(N),wr=dr.length,Ve=vH(U),Dn=Ve.length;if(wr!=Dn&&!Ue)return!1;for(var ki=wr;ki--;){var Fr=dr[ki];if(!(Ue?Fr in U:Qe.call(U,Fr)))return!1}var si=Kt.get(N);if(si&&Kt.get(U))return si==U;var li=!0;Kt.set(N,U),Kt.set(U,N);for(var as=Ue;++ki<wr;){Fr=dr[ki];var Xa=N[Fr],Gl=U[Fr];if(Mt)var bH=Ue?Mt(Gl,Xa,Fr,U,N,Kt):Mt(Xa,Gl,Fr,N,U,Kt);if(!(bH===void 0?Xa===Gl||Ie(Xa,Gl,it,Mt,Kt):bH)){li=!1;break}as||(as=Fr=="constructor")}if(li&&!as){var ky=N.constructor,Ny=U.constructor;ky!=Ny&&"constructor"in N&&"constructor"in U&&!(typeof ky=="function"&&ky instanceof ky&&typeof Ny=="function"&&Ny instanceof Ny)&&(li=!1)}return Kt.delete(N),Kt.delete(U),li}function vH(N){return f1t(N,A1t,_1t)}function Ey(N,U){var it=N.__data__;return x1t(U)?it[typeof U=="string"?"string":"hash"]:it.map}function Dc(N,U){var it=gt(N,U);return d1t(it)?it:void 0}function y1t(N){var U=Qe.call(N,Mn),it=N[Mn];try{N[Mn]=void 0;var Mt=!0}catch{}var Ie=Vl.call(N);return Mt&&(U?N[Mn]=it:delete N[Mn]),Ie}var _1t=zr?function(N){return N==null?[]:(N=Object(N),F(zr(N),function(U){return or.call(N,U)}))}:P1t,is=Ad;(Pt&&is(new Pt(new ArrayBuffer(1)))!=P||Le&&is(new Le)!=p||hr&&is(hr.resolve())!=_||oi&&is(new oi)!=x||Kr&&is(new Kr)!=D)&&(is=function(N){var U=Ad(N),it=U==y?N.constructor:void 0,Mt=it?Wl(it):"";if(Mt)switch(Mt){case Ly:return P;case zbt:return p;case Fbt:return _;case Vbt:return x;case Hbt:return D}return U});function b1t(N,U){return U=U==null?o:U,!!U&&(typeof N=="number"||G.test(N))&&N>-1&&N%1==0&&N<U}function x1t(N){var U=typeof N;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?N!=="__proto__":N===null}function S1t(N){return!!Mc&&Mc in N}function w1t(N){var U=N&&N.constructor,it=typeof U=="function"&&U.prototype||da;return N===it}function C1t(N){return Vl.call(N)}function Wl(N){if(N!=null){try{return es.call(N)}catch{}try{return N+""}catch{}}return""}function pH(N,U){return N===U||N!==N&&U!==U}var T1t=fH(function(){return arguments}())?fH:function(N){return Pd(N)&&Qe.call(N,"callee")&&!or.call(N,"callee")},Ry=Array.isArray;function M1t(N){return N!=null&&mH(N.length)&&!gH(N)}var XT=YT||L1t;function D1t(N,U){return hH(N,U)}function gH(N){if(!yH(N))return!1;var U=Ad(N);return U==d||U==v||U==u||U==b}function mH(N){return typeof N=="number"&&N>-1&&N%1==0&&N<=o}function yH(N){var U=typeof N;return N!=null&&(U=="object"||U=="function")}function Pd(N){return N!=null&&typeof N=="object"}var _H=Ct?ht(Ct):v1t;function A1t(N){return M1t(N)?c1t(N):p1t(N)}function P1t(){return[]}function L1t(){return!1}r.exports=D1t})(Ic,Ic.exports);function gM(r){var t,e,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(t=0;t<r.length;t++)r[t]&&(e=gM(r[t]))&&(n&&(n+=" "),n+=e);else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function mM(){for(var r,t,e=0,n="";e<arguments.length;)(r=arguments[e++])&&(t=gM(r))&&(n&&(n+=" "),n+=t);return n}var QH=Object.freeze(Object.defineProperty({__proto__:null,clsx:mM,default:mM},Symbol.toStringTag,{value:"Module"})),$d=KH(QH),re={},JH=function(t,e,n){return t===e?!0:t.className===e.className&&n(t.style,e.style)&&t.width===e.width&&t.autoSize===e.autoSize&&t.cols===e.cols&&t.draggableCancel===e.draggableCancel&&t.draggableHandle===e.draggableHandle&&n(t.verticalCompact,e.verticalCompact)&&n(t.compactType,e.compactType)&&n(t.layout,e.layout)&&n(t.margin,e.margin)&&n(t.containerPadding,e.containerPadding)&&t.rowHeight===e.rowHeight&&t.maxRows===e.maxRows&&t.isBounded===e.isBounded&&t.isDraggable===e.isDraggable&&t.isResizable===e.isResizable&&t.allowOverlap===e.allowOverlap&&t.preventCollision===e.preventCollision&&t.useCSSTransforms===e.useCSSTransforms&&t.transformScale===e.transformScale&&t.isDroppable===e.isDroppable&&n(t.resizeHandles,e.resizeHandles)&&n(t.resizeHandle,e.resizeHandle)&&t.onLayoutChange===e.onLayoutChange&&t.onDragStart===e.onDragStart&&t.onDrag===e.onDrag&&t.onDragStop===e.onDragStop&&t.onResizeStart===e.onResizeStart&&t.onResize===e.onResize&&t.onResizeStop===e.onResizeStop&&t.onDrop===e.onDrop&&n(t.droppingItem,e.droppingItem)&&n(t.innerRef,e.innerRef)};Object.defineProperty(re,"__esModule",{value:!0}),re.bottom=Uy,re.childrenEqual=n$,re.cloneLayout=xM,re.cloneLayoutItem=ss,re.collides=Wd,re.compact=wM,re.compactItem=CM,re.compactType=h$,re.correctBounds=TM,re.fastPositionEqual=a$,re.fastRGLPropsEqual=void 0,re.getAllCollisions=MM,re.getFirstCollision=ql,re.getLayoutItem=qy,re.getStatics=jy,re.modifyLayout=SM,re.moveElement=Xy,re.moveElementAwayFromCollision=Zy,re.noop=void 0,re.perc=s$,re.setTopLeft=u$,re.setTransform=l$,re.sortLayoutItems=Ky,re.sortLayoutItemsByColRow=AM,re.sortLayoutItemsByRowCol=DM,re.synchronizeLayoutWithChildren=c$,re.validateLayout=f$,re.withLayoutItem=r$;var t$=yM(Ic.exports),Gy=yM(st.default);function yM(r){return r&&r.__esModule?r:{default:r}}function _M(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function bM(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(e),!0).forEach(function(n){e$(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):_M(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function e$(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Uy(r){for(var t=0,e,n=0,i=r.length;n<i;n++)e=r[n].y+r[n].h,e>t&&(t=e);return t}function xM(r){for(var t=Array(r.length),e=0,n=r.length;e<n;e++)t[e]=ss(r[e]);return t}function SM(r,t){for(var e=Array(r.length),n=0,i=r.length;n<i;n++)t.i===r[n].i?e[n]=t:e[n]=r[n];return e}function r$(r,t,e){var n=qy(r,t);return n?(n=e(ss(n)),r=SM(r,n),[r,n]):[r,null]}function ss(r){return{w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minW:r.minW,maxW:r.maxW,minH:r.minH,maxH:r.maxH,moved:Boolean(r.moved),static:Boolean(r.static),isDraggable:r.isDraggable,isResizable:r.isResizable,resizeHandles:r.resizeHandles,isBounded:r.isBounded}}function n$(r,t){return(0,t$.default)(Gy.default.Children.map(r,function(e){return e==null?void 0:e.key}),Gy.default.Children.map(t,function(e){return e==null?void 0:e.key}))}var i$=JH;re.fastRGLPropsEqual=i$;function a$(r,t){return r.left===t.left&&r.top===t.top&&r.width===t.width&&r.height===t.height}function Wd(r,t){return!(r.i===t.i||r.x+r.w<=t.x||r.x>=t.x+t.w||r.y+r.h<=t.y||r.y>=t.y+t.h)}function wM(r,t,e){for(var n=jy(r),i=Ky(r,t),a=Array(r.length),o=0,s=i.length;o<s;o++){var l=ss(i[o]);l.static||(l=CM(n,l,t,e,i),n.push(l)),a[r.indexOf(i[o])]=l,l.moved=!1}return a}var o$={x:"w",y:"h"};function Yy(r,t,e,n){var i=o$[n];t[n]+=1;for(var a=r.map(function(l){return l.i}).indexOf(t.i),o=a+1;o<r.length;o++){var s=r[o];if(!s.static){if(s.y>t.y+t.h)break;Wd(t,s)&&Yy(r,s,e+t[i],n)}}t[n]=e}function CM(r,t,e,n,i){var a=e==="vertical",o=e==="horizontal";if(a)for(t.y=Math.min(Uy(r),t.y);t.y>0&&!ql(r,t);)t.y--;else if(o)for(;t.x>0&&!ql(r,t);)t.x--;for(var s;s=ql(r,t);)o?Yy(i,t,s.x+s.w,"x"):Yy(i,t,s.y+s.h,"y"),o&&t.x+t.w>n&&(t.x=n-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function TM(r,t){for(var e=jy(r),n=0,i=r.length;n<i;n++){var a=r[n];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),!a.static)e.push(a);else for(;ql(e,a);)a.y++}return r}function qy(r,t){for(var e=0,n=r.length;e<n;e++)if(r[e].i===t)return r[e]}function ql(r,t){for(var e=0,n=r.length;e<n;e++)if(Wd(r[e],t))return r[e]}function MM(r,t){return r.filter(function(e){return Wd(e,t)})}function jy(r){return r.filter(function(t){return t.static})}function Xy(r,t,e,n,i,a,o,s,l){if(t.static&&t.isDraggable!==!0||t.y===n&&t.x===e)return r;"Moving element ".concat(t.i," to [").concat(String(e),",").concat(String(n),"] from [").concat(t.x,",").concat(t.y,"]");var u=t.x,c=t.y;typeof e=="number"&&(t.x=e),typeof n=="number"&&(t.y=n),t.moved=!0;var f=Ky(r,o),h=o==="vertical"&&typeof n=="number"?c>=n:o==="horizontal"&&typeof e=="number"?u>=e:!1;h&&(f=f.reverse());var d=MM(f,t),v=d.length>0;if(v&&l)return xM(r);if(v&&a)return"Collision prevented on ".concat(t.i,", reverting."),t.x=u,t.y=c,t.moved=!1,r;for(var p=0,g=d.length;p<g;p++){var m=d[p];"Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(m.i," at [").concat(m.x,",").concat(m.y,"]"),!m.moved&&(m.static?r=Zy(r,m,t,i,o):r=Zy(r,t,m,i,o))}return r}function Zy(r,t,e,n,i,a){var o=i==="horizontal",s=i!=="horizontal",l=t.static;if(n){n=!1;var u={x:o?Math.max(t.x-e.w,0):e.x,y:s?Math.max(t.y-e.h,0):e.y,w:e.w,h:e.h,i:"-1"};if(!ql(r,u))return"Doing reverse collision on ".concat(e.i," up to [").concat(u.x,",").concat(u.y,"]."),Xy(r,e,o?u.x:void 0,s?u.y:void 0,n,l,i)}return Xy(r,e,o?e.x+1:void 0,s?e.y+1:void 0,n,l,i)}function s$(r){return r*100+"%"}function l$(r){var t=r.top,e=r.left,n=r.width,i=r.height,a="translate(".concat(e,"px,").concat(t,"px)");return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:"".concat(n,"px"),height:"".concat(i,"px"),position:"absolute"}}function u$(r){var t=r.top,e=r.left,n=r.width,i=r.height;return{top:"".concat(t,"px"),left:"".concat(e,"px"),width:"".concat(n,"px"),height:"".concat(i,"px"),position:"absolute"}}function Ky(r,t){return t==="horizontal"?AM(r):t==="vertical"?DM(r):r}function DM(r){return r.slice(0).sort(function(t,e){return t.y>e.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1})}function AM(r){return r.slice(0).sort(function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1})}function c$(r,t,e,n,i){r=r||[];var a=[];Gy.default.Children.forEach(t,function(s){if((s==null?void 0:s.key)!=null){var l=qy(r,String(s.key));if(l)a.push(ss(l));else{var u=s.props["data-grid"]||s.props._grid;u?a.push(ss(bM(bM({},u),{},{i:s.key}))):a.push(ss({w:1,h:1,x:0,y:Uy(a),i:String(s.key)}))}}});var o=TM(a,{cols:e});return i?o:wM(o,n,e)}function f$(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout",e=["x","y","w","h"];if(!Array.isArray(r))throw new Error(t+" must be an array!");for(var n=0,i=r.length;n<i;n++)for(var a=r[n],o=0;o<e.length;o++)if(typeof a[e[o]]!="number")throw new Error("ReactGridLayout: "+t+"["+n+"]."+e[o]+" must be a number!")}function h$(r){var t=r||{},e=t.verticalCompact,n=t.compactType;return e===!1?null:n}function I1t(){}var d$=function(){};re.noop=d$;var pa={};Object.defineProperty(pa,"__esModule",{value:!0}),pa.calcGridColWidth=Gd,pa.calcGridItemPosition=v$,pa.calcGridItemWHPx=Qy,pa.calcWH=g$,pa.calcXY=p$,pa.clamp=Oc;function Gd(r){var t=r.margin,e=r.containerPadding,n=r.containerWidth,i=r.cols;return(n-t[0]*(i-1)-e[0]*2)/i}function Qy(r,t,e){return Number.isFinite(r)?Math.round(t*r+Math.max(0,r-1)*e):r}function v$(r,t,e,n,i,a){var o=r.margin,s=r.containerPadding,l=r.rowHeight,u=Gd(r),c={};return a&&a.resizing?(c.width=Math.round(a.resizing.width),c.height=Math.round(a.resizing.height)):(c.width=Qy(n,u,o[0]),c.height=Qy(i,l,o[1])),a&&a.dragging?(c.top=Math.round(a.dragging.top),c.left=Math.round(a.dragging.left)):(c.top=Math.round((l+o[1])*e+s[1]),c.left=Math.round((u+o[0])*t+s[0])),c}function p$(r,t,e,n,i){var a=r.margin,o=r.cols,s=r.rowHeight,l=r.maxRows,u=Gd(r),c=Math.round((e-a[0])/(u+a[0])),f=Math.round((t-a[1])/(s+a[1]));return c=Oc(c,0,o-n),f=Oc(f,0,l-i),{x:c,y:f}}function g$(r,t,e,n,i){var a=r.margin,o=r.maxRows,s=r.cols,l=r.rowHeight,u=Gd(r),c=Math.round((t+a[0])/(u+a[0])),f=Math.round((e+a[1])/(l+a[1]));return c=Oc(c,0,s-n),f=Oc(f,0,o-i),{w:c,h:f}}function Oc(r,t,e){return Math.max(Math.min(r,e),t)}var Ud={},ga={exports:{}},m$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",y$=m$,_$=y$;function PM(){}function LM(){}LM.resetWarningCache=PM;var b$=function(){function r(n,i,a,o,s,l){if(l!==_$){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}r.isRequired=r;function t(){return r}var e={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:t,element:r,elementType:r,instanceOf:t,node:r,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:LM,resetWarningCache:PM};return e.PropTypes=e,e};ga.exports=b$();var Ec={exports:{}},IM={},He={},Ni={};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.dontSetMe=T$,Ni.findInArray=x$,Ni.int=C$,Ni.isFunction=S$,Ni.isNum=w$;function x$(r,t){for(var e=0,n=r.length;e<n;e++)if(t.apply(t,[r[e],e,r]))return r[e]}function S$(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Function]"}function w$(r){return typeof r=="number"&&!isNaN(r)}function C$(r){return parseInt(r,10)}function T$(r,t,e){if(r[t])return new Error("Invalid prop ".concat(t," passed to ").concat(e," - do not set this, set it on the child."))}var ls={};Object.defineProperty(ls,"__esModule",{value:!0}),ls.browserPrefixToKey=EM,ls.browserPrefixToStyle=M$,ls.default=void 0,ls.getPrefix=OM;var Jy=["Moz","Webkit","O","ms"];function OM(){var r,t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";var n=(r=window.document)===null||r===void 0||(t=r.documentElement)===null||t===void 0?void 0:t.style;if(!n||e in n)return"";for(var i=0;i<Jy.length;i++)if(EM(e,Jy[i])in n)return Jy[i];return""}function EM(r,t){return t?"".concat(t).concat(D$(r)):r}function M$(r,t){return t?"-".concat(t.toLowerCase(),"-").concat(r):r}function D$(r){for(var t="",e=!0,n=0;n<r.length;n++)e?(t+=r[n].toUpperCase(),e=!1):r[n]==="-"?e=!0:t+=r[n];return t}var A$=OM();ls.default=A$;function t0(r){return t0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t0(r)}Object.defineProperty(He,"__esModule",{value:!0}),He.addClassName=VM,He.addEvent=I$,He.addUserSelectStyles=$$,He.createCSSTransform=z$,He.createSVGTransform=F$,He.getTouch=V$,He.getTouchIdentifier=H$,He.getTranslation=e0,He.innerHeight=k$,He.innerWidth=N$,He.matchesSelector=FM,He.matchesSelectorAndParentsTo=L$,He.offsetXYFromParent=B$,He.outerHeight=E$,He.outerWidth=R$,He.removeClassName=HM,He.removeEvent=O$,He.removeUserSelectStyles=W$;var vn=Ni,RM=P$(ls);function kM(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(kM=function(i){return i?e:t})(r)}function P$(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||t0(r)!=="object"&&typeof r!="function")return{default:r};var e=kM(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function NM(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function BM(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?NM(Object(e),!0).forEach(function(n){zM(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):NM(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function zM(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var Yd="";function FM(r,t){return Yd||(Yd=(0,vn.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(e){return(0,vn.isFunction)(r[e])})),(0,vn.isFunction)(r[Yd])?r[Yd](t):!1}function L$(r,t,e){var n=r;do{if(FM(n,t))return!0;if(n===e)return!1;n=n.parentNode}while(n);return!1}function I$(r,t,e,n){if(!!r){var i=BM({capture:!0},n);r.addEventListener?r.addEventListener(t,e,i):r.attachEvent?r.attachEvent("on"+t,e):r["on"+t]=e}}function O$(r,t,e,n){if(!!r){var i=BM({capture:!0},n);r.removeEventListener?r.removeEventListener(t,e,i):r.detachEvent?r.detachEvent("on"+t,e):r["on"+t]=null}}function E$(r){var t=r.clientHeight,e=r.ownerDocument.defaultView.getComputedStyle(r);return t+=(0,vn.int)(e.borderTopWidth),t+=(0,vn.int)(e.borderBottomWidth),t}function R$(r){var t=r.clientWidth,e=r.ownerDocument.defaultView.getComputedStyle(r);return t+=(0,vn.int)(e.borderLeftWidth),t+=(0,vn.int)(e.borderRightWidth),t}function k$(r){var t=r.clientHeight,e=r.ownerDocument.defaultView.getComputedStyle(r);return t-=(0,vn.int)(e.paddingTop),t-=(0,vn.int)(e.paddingBottom),t}function N$(r){var t=r.clientWidth,e=r.ownerDocument.defaultView.getComputedStyle(r);return t-=(0,vn.int)(e.paddingLeft),t-=(0,vn.int)(e.paddingRight),t}function B$(r,t,e){var n=t===t.ownerDocument.body,i=n?{left:0,top:0}:t.getBoundingClientRect(),a=(r.clientX+t.scrollLeft-i.left)/e,o=(r.clientY+t.scrollTop-i.top)/e;return{x:a,y:o}}function z$(r,t){var e=e0(r,t,"px");return zM({},(0,RM.browserPrefixToKey)("transform",RM.default),e)}function F$(r,t){var e=e0(r,t,"");return e}function e0(r,t,e){var n=r.x,i=r.y,a="translate(".concat(n).concat(e,",").concat(i).concat(e,")");if(t){var o="".concat(typeof t.x=="string"?t.x:t.x+e),s="".concat(typeof t.y=="string"?t.y:t.y+e);a="translate(".concat(o,", ").concat(s,")")+a}return a}function V$(r,t){return r.targetTouches&&(0,vn.findInArray)(r.targetTouches,function(e){return t===e.identifier})||r.changedTouches&&(0,vn.findInArray)(r.changedTouches,function(e){return t===e.identifier})}function H$(r){if(r.targetTouches&&r.targetTouches[0])return r.targetTouches[0].identifier;if(r.changedTouches&&r.changedTouches[0])return r.changedTouches[0].identifier}function $$(r){if(!!r){var t=r.getElementById("react-draggable-style-el");t||(t=r.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
|
+
`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
|
+
`,r.getElementsByTagName("head")[0].appendChild(t)),r.body&&VM(r.body,"react-draggable-transparent-selection")}}function W$(r){if(!!r)try{if(r.body&&HM(r.body,"react-draggable-transparent-selection"),r.selection)r.selection.empty();else{var t=(r.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function VM(r,t){r.classList?r.classList.add(t):r.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(r.className+=" ".concat(t))}function HM(r,t){r.classList?r.classList.remove(t):r.className=r.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Bi={};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.canDragX=Y$,Bi.canDragY=q$,Bi.createCoreData=X$,Bi.createDraggableData=Z$,Bi.getBoundPosition=G$,Bi.getControlPosition=j$,Bi.snapToGrid=U$;var pn=Ni,jl=He;function G$(r,t,e){if(!r.props.bounds)return[t,e];var n=r.props.bounds;n=typeof n=="string"?n:K$(n);var i=r0(r);if(typeof n=="string"){var a=i.ownerDocument,o=a.defaultView,s;if(n==="parent"?s=i.parentNode:s=a.querySelector(n),!(s instanceof o.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');var l=s,u=o.getComputedStyle(i),c=o.getComputedStyle(l);n={left:-i.offsetLeft+(0,pn.int)(c.paddingLeft)+(0,pn.int)(u.marginLeft),top:-i.offsetTop+(0,pn.int)(c.paddingTop)+(0,pn.int)(u.marginTop),right:(0,jl.innerWidth)(l)-(0,jl.outerWidth)(i)-i.offsetLeft+(0,pn.int)(c.paddingRight)-(0,pn.int)(u.marginRight),bottom:(0,jl.innerHeight)(l)-(0,jl.outerHeight)(i)-i.offsetTop+(0,pn.int)(c.paddingBottom)-(0,pn.int)(u.marginBottom)}}return(0,pn.isNum)(n.right)&&(t=Math.min(t,n.right)),(0,pn.isNum)(n.bottom)&&(e=Math.min(e,n.bottom)),(0,pn.isNum)(n.left)&&(t=Math.max(t,n.left)),(0,pn.isNum)(n.top)&&(e=Math.max(e,n.top)),[t,e]}function U$(r,t,e){var n=Math.round(t/r[0])*r[0],i=Math.round(e/r[1])*r[1];return[n,i]}function Y$(r){return r.props.axis==="both"||r.props.axis==="x"}function q$(r){return r.props.axis==="both"||r.props.axis==="y"}function j$(r,t,e){var n=typeof t=="number"?(0,jl.getTouch)(r,t):null;if(typeof t=="number"&&!n)return null;var i=r0(e),a=e.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,jl.offsetXYFromParent)(n||r,a,e.props.scale)}function X$(r,t,e){var n=r.state,i=!(0,pn.isNum)(n.lastX),a=r0(r);return i?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:e,x:t,y:e}:{node:a,deltaX:t-n.lastX,deltaY:e-n.lastY,lastX:n.lastX,lastY:n.lastY,x:t,y:e}}function Z$(r,t){var e=r.props.scale;return{node:t.node,x:r.state.x+t.deltaX/e,y:r.state.y+t.deltaY/e,deltaX:t.deltaX/e,deltaY:t.deltaY/e,lastX:r.state.x,lastY:r.state.y}}function K$(r){return{left:r.left,top:r.top,right:r.right,bottom:r.bottom}}function r0(r){var t=r.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var qd={},jd={};Object.defineProperty(jd,"__esModule",{value:!0}),jd.default=Q$;function Q$(){}function Xd(r){return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xd(r)}Object.defineProperty(qd,"__esModule",{value:!0}),qd.default=void 0;var n0=tW(st.default),gn=a0(ga.exports),J$=a0(Ld.default),Cr=He,Ja=Bi,i0=Ni,Rc=a0(jd);function a0(r){return r&&r.__esModule?r:{default:r}}function $M(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return($M=function(i){return i?e:t})(r)}function tW(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||Xd(r)!=="object"&&typeof r!="function")return{default:r};var e=$M(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function WM(r,t){return iW(r)||nW(r,t)||rW(r,t)||eW()}function eW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rW(r,t){if(!!r){if(typeof r=="string")return GM(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return GM(r,t)}}function GM(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function nW(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n=[],i=!0,a=!1,o,s;try{for(e=e.call(r);!(i=(o=e.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}return n}}function iW(r){if(Array.isArray(r))return r}function aW(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function UM(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function oW(r,t,e){return t&&UM(r.prototype,t),e&&UM(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function sW(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&o0(r,t)}function o0(r,t){return o0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},o0(r,t)}function lW(r){var t=cW();return function(){var n=Zd(r),i;if(t){var a=Zd(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return uW(this,i)}}function uW(r,t){if(t&&(Xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tr(r)}function Tr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function cW(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zd(r){return Zd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zd(r)}function An(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var ui={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},to=ui.mouse,Kd=function(r){sW(e,r);var t=lW(e);function e(){var n;aW(this,e);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),An(Tr(n),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),An(Tr(n),"mounted",!1),An(Tr(n),"handleDragStart",function(s){if(n.props.onMouseDown(s),!n.props.allowAnyClick&&typeof s.button=="number"&&s.button!==0)return!1;var l=n.findDOMNode();if(!l||!l.ownerDocument||!l.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var u=l.ownerDocument;if(!(n.props.disabled||!(s.target instanceof u.defaultView.Node)||n.props.handle&&!(0,Cr.matchesSelectorAndParentsTo)(s.target,n.props.handle,l)||n.props.cancel&&(0,Cr.matchesSelectorAndParentsTo)(s.target,n.props.cancel,l))){s.type==="touchstart"&&s.preventDefault();var c=(0,Cr.getTouchIdentifier)(s);n.setState({touchIdentifier:c});var f=(0,Ja.getControlPosition)(s,c,Tr(n));if(f!=null){var h=f.x,d=f.y,v=(0,Ja.createCoreData)(Tr(n),h,d);(0,Rc.default)("DraggableCore: handleDragStart: %j",v),(0,Rc.default)("calling",n.props.onStart);var p=n.props.onStart(s,v);p===!1||n.mounted===!1||(n.props.enableUserSelectHack&&(0,Cr.addUserSelectStyles)(u),n.setState({dragging:!0,lastX:h,lastY:d}),(0,Cr.addEvent)(u,to.move,n.handleDrag),(0,Cr.addEvent)(u,to.stop,n.handleDragStop))}}}),An(Tr(n),"handleDrag",function(s){var l=(0,Ja.getControlPosition)(s,n.state.touchIdentifier,Tr(n));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(n.props.grid)){var f=u-n.state.lastX,h=c-n.state.lastY,d=(0,Ja.snapToGrid)(n.props.grid,f,h),v=WM(d,2);if(f=v[0],h=v[1],!f&&!h)return;u=n.state.lastX+f,c=n.state.lastY+h}var p=(0,Ja.createCoreData)(Tr(n),u,c);(0,Rc.default)("DraggableCore: handleDrag: %j",p);var g=n.props.onDrag(s,p);if(g===!1||n.mounted===!1){try{n.handleDragStop(new MouseEvent("mouseup"))}catch{var m=document.createEvent("MouseEvents");m.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(m)}return}n.setState({lastX:u,lastY:c})}}),An(Tr(n),"handleDragStop",function(s){if(!!n.state.dragging){var l=(0,Ja.getControlPosition)(s,n.state.touchIdentifier,Tr(n));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(n.props.grid)){var f=u-n.state.lastX||0,h=c-n.state.lastY||0,d=(0,Ja.snapToGrid)(n.props.grid,f,h),v=WM(d,2);f=v[0],h=v[1],u=n.state.lastX+f,c=n.state.lastY+h}var p=(0,Ja.createCoreData)(Tr(n),u,c),g=n.props.onStop(s,p);if(g===!1||n.mounted===!1)return!1;var m=n.findDOMNode();m&&n.props.enableUserSelectHack&&(0,Cr.removeUserSelectStyles)(m.ownerDocument),(0,Rc.default)("DraggableCore: handleDragStop: %j",p),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),m&&((0,Rc.default)("DraggableCore: Removing handlers"),(0,Cr.removeEvent)(m.ownerDocument,to.move,n.handleDrag),(0,Cr.removeEvent)(m.ownerDocument,to.stop,n.handleDragStop))}}}),An(Tr(n),"onMouseDown",function(s){return to=ui.mouse,n.handleDragStart(s)}),An(Tr(n),"onMouseUp",function(s){return to=ui.mouse,n.handleDragStop(s)}),An(Tr(n),"onTouchStart",function(s){return to=ui.touch,n.handleDragStart(s)}),An(Tr(n),"onTouchEnd",function(s){return to=ui.touch,n.handleDragStop(s)}),n}return oW(e,[{key:"componentDidMount",value:function(){this.mounted=!0;var i=this.findDOMNode();i&&(0,Cr.addEvent)(i,ui.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.findDOMNode();if(i){var a=i.ownerDocument;(0,Cr.removeEvent)(a,ui.mouse.move,this.handleDrag),(0,Cr.removeEvent)(a,ui.touch.move,this.handleDrag),(0,Cr.removeEvent)(a,ui.mouse.stop,this.handleDragStop),(0,Cr.removeEvent)(a,ui.touch.stop,this.handleDragStop),(0,Cr.removeEvent)(i,ui.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Cr.removeUserSelectStyles)(a)}}},{key:"findDOMNode",value:function(){var i,a,o;return(i=this.props)!==null&&i!==void 0&&i.nodeRef?(a=this.props)===null||a===void 0||(o=a.nodeRef)===null||o===void 0?void 0:o.current:J$.default.findDOMNode(this)}},{key:"render",value:function(){return n0.cloneElement(n0.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),e}(n0.Component);qd.default=Kd,An(Kd,"displayName","DraggableCore"),An(Kd,"propTypes",{allowAnyClick:gn.default.bool,disabled:gn.default.bool,enableUserSelectHack:gn.default.bool,offsetParent:function(t,e){if(t[e]&&t[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:gn.default.arrayOf(gn.default.number),handle:gn.default.string,cancel:gn.default.string,nodeRef:gn.default.object,onStart:gn.default.func,onDrag:gn.default.func,onStop:gn.default.func,onMouseDown:gn.default.func,scale:gn.default.number,className:i0.dontSetMe,style:i0.dontSetMe,transform:i0.dontSetMe}),An(Kd,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(r){function t(V){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},t(V)}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),r.default=void 0;var e=v(st.default),n=h(ga.exports),i=h(Ld.default),a=h($d),o=He,s=Bi,l=Ni,u=h(qd),c=h(jd),f=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(V){return V&&V.__esModule?V:{default:V}}function d(V){if(typeof WeakMap!="function")return null;var H=new WeakMap,G=new WeakMap;return(d=function(tt){return tt?G:H})(V)}function v(V,H){if(!H&&V&&V.__esModule)return V;if(V===null||t(V)!=="object"&&typeof V!="function")return{default:V};var G=d(H);if(G&&G.has(V))return G.get(V);var j={},tt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nt in V)if(nt!=="default"&&Object.prototype.hasOwnProperty.call(V,nt)){var rt=tt?Object.getOwnPropertyDescriptor(V,nt):null;rt&&(rt.get||rt.set)?Object.defineProperty(j,nt,rt):j[nt]=V[nt]}return j.default=V,G&&G.set(V,j),j}function p(){return p=Object.assign||function(V){for(var H=1;H<arguments.length;H++){var G=arguments[H];for(var j in G)Object.prototype.hasOwnProperty.call(G,j)&&(V[j]=G[j])}return V},p.apply(this,arguments)}function g(V,H){if(V==null)return{};var G=m(V,H),j,tt;if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(V);for(tt=0;tt<nt.length;tt++)j=nt[tt],!(H.indexOf(j)>=0)&&(!Object.prototype.propertyIsEnumerable.call(V,j)||(G[j]=V[j]))}return G}function m(V,H){if(V==null)return{};var G={},j=Object.keys(V),tt,nt;for(nt=0;nt<j.length;nt++)tt=j[nt],!(H.indexOf(tt)>=0)&&(G[tt]=V[tt]);return G}function y(V,H){var G=Object.keys(V);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(V);H&&(j=j.filter(function(tt){return Object.getOwnPropertyDescriptor(V,tt).enumerable})),G.push.apply(G,j)}return G}function _(V){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?y(Object(G),!0).forEach(function(j){W(V,j,G[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(G)):y(Object(G)).forEach(function(j){Object.defineProperty(V,j,Object.getOwnPropertyDescriptor(G,j))})}return V}function b(V,H){return T(V)||C(V,H)||x(V,H)||S()}function S(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(V,H){if(!!V){if(typeof V=="string")return w(V,H);var G=Object.prototype.toString.call(V).slice(8,-1);if(G==="Object"&&V.constructor&&(G=V.constructor.name),G==="Map"||G==="Set")return Array.from(V);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return w(V,H)}}function w(V,H){(H==null||H>V.length)&&(H=V.length);for(var G=0,j=new Array(H);G<H;G++)j[G]=V[G];return j}function C(V,H){var G=V==null?null:typeof Symbol!="undefined"&&V[Symbol.iterator]||V["@@iterator"];if(G!=null){var j=[],tt=!0,nt=!1,rt,vt;try{for(G=G.call(V);!(tt=(rt=G.next()).done)&&(j.push(rt.value),!(H&&j.length===H));tt=!0);}catch(ft){nt=!0,vt=ft}finally{try{!tt&&G.return!=null&&G.return()}finally{if(nt)throw vt}}return j}}function T(V){if(Array.isArray(V))return V}function D(V,H){if(!(V instanceof H))throw new TypeError("Cannot call a class as a function")}function A(V,H){for(var G=0;G<H.length;G++){var j=H[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(V,j.key,j)}}function P(V,H,G){return H&&A(V.prototype,H),G&&A(V,G),Object.defineProperty(V,"prototype",{writable:!1}),V}function I(V,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");V.prototype=Object.create(H&&H.prototype,{constructor:{value:V,writable:!0,configurable:!0}}),Object.defineProperty(V,"prototype",{writable:!1}),H&&O(V,H)}function O(V,H){return O=Object.setPrototypeOf||function(j,tt){return j.__proto__=tt,j},O(V,H)}function E(V){var H=B();return function(){var j=Y(V),tt;if(H){var nt=Y(this).constructor;tt=Reflect.construct(j,arguments,nt)}else tt=j.apply(this,arguments);return R(this,tt)}}function R(V,H){if(H&&(t(H)==="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z(V)}function z(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function B(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Y(V){return Y=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},Y(V)}function W(V,H,G){return H in V?Object.defineProperty(V,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):V[H]=G,V}var et=function(V){I(G,V);var H=E(G);function G(j){var tt;return D(this,G),tt=H.call(this,j),W(z(tt),"onDragStart",function(nt,rt){(0,c.default)("Draggable: onDragStart: %j",rt);var vt=tt.props.onStart(nt,(0,s.createDraggableData)(z(tt),rt));if(vt===!1)return!1;tt.setState({dragging:!0,dragged:!0})}),W(z(tt),"onDrag",function(nt,rt){if(!tt.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",rt);var vt=(0,s.createDraggableData)(z(tt),rt),ft={x:vt.x,y:vt.y};if(tt.props.bounds){var lt=ft.x,mt=ft.y;ft.x+=tt.state.slackX,ft.y+=tt.state.slackY;var At=(0,s.getBoundPosition)(z(tt),ft.x,ft.y),Ct=b(At,2),F=Ct[0],X=Ct[1];ft.x=F,ft.y=X,ft.slackX=tt.state.slackX+(lt-ft.x),ft.slackY=tt.state.slackY+(mt-ft.y),vt.x=ft.x,vt.y=ft.y,vt.deltaX=ft.x-tt.state.x,vt.deltaY=ft.y-tt.state.y}var Z=tt.props.onDrag(nt,vt);if(Z===!1)return!1;tt.setState(ft)}),W(z(tt),"onDragStop",function(nt,rt){if(!tt.state.dragging)return!1;var vt=tt.props.onStop(nt,(0,s.createDraggableData)(z(tt),rt));if(vt===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",rt);var ft={dragging:!1,slackX:0,slackY:0},lt=Boolean(tt.props.position);if(lt){var mt=tt.props.position,At=mt.x,Ct=mt.y;ft.x=At,ft.y=Ct}tt.setState(ft)}),tt.state={dragging:!1,dragged:!1,x:j.position?j.position.x:j.defaultPosition.x,y:j.position?j.position.y:j.defaultPosition.y,prevPropsPosition:_({},j.position),slackX:0,slackY:0,isElementSVG:!1},j.position&&!(j.onDrag||j.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),tt}return P(G,[{key:"componentDidMount",value:function(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var tt,nt,rt;return(tt=(nt=this.props)===null||nt===void 0||(rt=nt.nodeRef)===null||rt===void 0?void 0:rt.current)!==null&&tt!==void 0?tt:i.default.findDOMNode(this)}},{key:"render",value:function(){var tt,nt=this.props;nt.axis,nt.bounds;var rt=nt.children,vt=nt.defaultPosition,ft=nt.defaultClassName,lt=nt.defaultClassNameDragging,mt=nt.defaultClassNameDragged,At=nt.position,Ct=nt.positionOffset;nt.scale;var F=g(nt,f),X={},Z=null,ut=Boolean(At),ht=!ut||this.state.dragging,ot=At||vt,gt={x:(0,s.canDragX)(this)&&ht?this.state.x:ot.x,y:(0,s.canDragY)(this)&&ht?this.state.y:ot.y};this.state.isElementSVG?Z=(0,o.createSVGTransform)(gt,Ct):X=(0,o.createCSSTransform)(gt,Ct);var ve=(0,a.default)(rt.props.className||"",ft,(tt={},W(tt,lt,this.state.dragging),W(tt,mt,this.state.dragged),tt));return e.createElement(u.default,p({},F,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(rt),{className:ve,style:_(_({},rt.props.style),X),transform:Z}))}}],[{key:"getDerivedStateFromProps",value:function(tt,nt){var rt=tt.position,vt=nt.prevPropsPosition;return rt&&(!vt||rt.x!==vt.x||rt.y!==vt.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:rt,prevPropsPosition:vt}),{x:rt.x,y:rt.y,prevPropsPosition:_({},rt)}):null}}]),G}(e.Component);r.default=et,W(et,"displayName","Draggable"),W(et,"propTypes",_(_({},u.default.propTypes),{},{axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),W(et,"defaultProps",_(_({},u.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(IM);var YM=IM,qM=YM.default,fW=YM.DraggableCore;Ec.exports=qM,Ec.exports.default=qM,Ec.exports.DraggableCore=fW;var Qd={exports:{}},kc={},s0={};s0.__esModule=!0,s0.cloneElement=pW;var hW=dW(st.default);function dW(r){return r&&r.__esModule?r:{default:r}}function jM(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function XM(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?jM(Object(e),!0).forEach(function(n){vW(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):jM(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function vW(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pW(r,t){return t.style&&r.props.style&&(t.style=XM(XM({},r.props.style),t.style)),t.className&&r.props.className&&(t.className=r.props.className+" "+t.className),hW.default.cloneElement(r,t)}var Nc={};Nc.__esModule=!0,Nc.resizableProps=void 0;var ne=gW(ga.exports);function gW(r){return r&&r.__esModule?r:{default:r}}var mW={axis:ne.default.oneOf(["both","x","y","none"]),className:ne.default.string,children:ne.default.element.isRequired,draggableOpts:ne.default.shape({allowAnyClick:ne.default.bool,cancel:ne.default.string,children:ne.default.node,disabled:ne.default.bool,enableUserSelectHack:ne.default.bool,offsetParent:ne.default.node,grid:ne.default.arrayOf(ne.default.number),handle:ne.default.string,nodeRef:ne.default.object,onStart:ne.default.func,onDrag:ne.default.func,onStop:ne.default.func,onMouseDown:ne.default.func,scale:ne.default.number}),height:ne.default.number.isRequired,handle:ne.default.oneOfType([ne.default.node,ne.default.func]),handleSize:ne.default.arrayOf(ne.default.number),lockAspectRatio:ne.default.bool,maxConstraints:ne.default.arrayOf(ne.default.number),minConstraints:ne.default.arrayOf(ne.default.number),onResizeStop:ne.default.func,onResizeStart:ne.default.func,onResize:ne.default.func,resizeHandles:ne.default.arrayOf(ne.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:ne.default.number,width:ne.default.number.isRequired};Nc.resizableProps=mW,kc.__esModule=!0,kc.default=void 0;var Bc=SW(st.default),yW=Ec.exports,_W=s0,bW=Nc,xW=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function ZM(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(ZM=function(i){return i?e:t})(r)}function SW(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var e=ZM(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function l0(){return l0=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},l0.apply(this,arguments)}function wW(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function KM(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function u0(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(e),!0).forEach(function(n){CW(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):KM(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function CW(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function TW(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,c0(r,t)}function c0(r,t){return c0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},c0(r,t)}var f0=function(r){TW(t,r);function t(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r.call.apply(r,[this].concat(a))||this,n.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var e=t.prototype;return e.componentWillUnmount=function(){this.resetData()},e.resetData=function(){this.lastHandleRect=this.slack=null},e.runConstraints=function(i,a){var o=this.props,s=o.minConstraints,l=o.maxConstraints,u=o.lockAspectRatio;if(!s&&!l&&!u)return[i,a];if(u){var c=this.props.width/this.props.height,f=i-this.props.width,h=a-this.props.height;Math.abs(f)>Math.abs(h*c)?a=i/c:i=a*c}var d=i,v=a,p=this.slack||[0,0],g=p[0],m=p[1];return i+=g,a+=m,s&&(i=Math.max(s[0],i),a=Math.max(s[1],a)),l&&(i=Math.min(l[0],i),a=Math.min(l[1],a)),this.slack=[g+(d-i),m+(v-a)],[i,a]},e.resizeHandler=function(i,a){var o=this;return function(s,l){var u=l.node,c=l.deltaX,f=l.deltaY;i==="onResizeStart"&&o.resetData();var h=(o.props.axis==="both"||o.props.axis==="x")&&a!=="n"&&a!=="s",d=(o.props.axis==="both"||o.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!h&&!d)){var v=a[0],p=a[a.length-1],g=u.getBoundingClientRect();if(o.lastHandleRect!=null){if(p==="w"){var m=g.left-o.lastHandleRect.left;c+=m}if(v==="n"){var y=g.top-o.lastHandleRect.top;f+=y}}o.lastHandleRect=g,p==="w"&&(c=-c),v==="n"&&(f=-f);var _=o.props.width+(h?c/o.props.transformScale:0),b=o.props.height+(d?f/o.props.transformScale:0),S=o.runConstraints(_,b);_=S[0],b=S[1];var x=_!==o.props.width||b!==o.props.height,w=typeof o.props[i]=="function"?o.props[i]:null,C=i==="onResize"&&!x;w&&!C&&(s.persist==null||s.persist(),w(s,{node:u,size:{width:_,height:b},handle:a})),i==="onResizeStop"&&o.resetData()}}},e.renderResizeHandle=function(i,a){var o=this.props.handle;if(!o)return Bc.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+i,ref:a});if(typeof o=="function")return o(i,a);var s=typeof o.type=="string",l=u0({ref:a},s?{}:{handleAxis:i});return Bc.cloneElement(o,l)},e.render=function(){var i=this,a=this.props,o=a.children,s=a.className,l=a.draggableOpts;a.width,a.height,a.handle,a.handleSize,a.lockAspectRatio,a.axis,a.minConstraints,a.maxConstraints,a.onResize,a.onResizeStop,a.onResizeStart;var u=a.resizeHandles;a.transformScale;var c=wW(a,xW);return(0,_W.cloneElement)(o,u0(u0({},c),{},{className:(s?s+" ":"")+"react-resizable",children:[].concat(o.props.children,u.map(function(f){var h,d=(h=i.handleRefs[f])!=null?h:i.handleRefs[f]=Bc.createRef();return Bc.createElement(yW.DraggableCore,l0({},l,{nodeRef:d,key:"resizableHandle-"+f,onStop:i.resizeHandler("onResizeStop",f),onStart:i.resizeHandler("onResizeStart",f),onDrag:i.resizeHandler("onResize",f)}),i.renderResizeHandle(f,d))}))}))},t}(Bc.Component);kc.default=f0,f0.propTypes=bW.resizableProps,f0.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Jd={};Jd.__esModule=!0,Jd.default=void 0;var h0=LW(st.default),MW=QM(ga.exports),DW=QM(kc),AW=Nc,PW=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function QM(r){return r&&r.__esModule?r:{default:r}}function JM(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(JM=function(i){return i?e:t})(r)}function LW(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var e=JM(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function d0(){return d0=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},d0.apply(this,arguments)}function tD(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function tv(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(e),!0).forEach(function(n){IW(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):tD(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function IW(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function OW(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function EW(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,v0(r,t)}function v0(r,t){return v0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},v0(r,t)}var eD=function(r){EW(t,r);function t(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r.call.apply(r,[this].concat(a))||this,n.state={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(s,l){var u=l.size;n.props.onResize?(s.persist==null||s.persist(),n.setState(u,function(){return n.props.onResize&&n.props.onResize(s,l)})):n.setState(u)},n}t.getDerivedStateFromProps=function(i,a){return a.propsWidth!==i.width||a.propsHeight!==i.height?{width:i.width,height:i.height,propsWidth:i.width,propsHeight:i.height}:null};var e=t.prototype;return e.render=function(){var i=this.props,a=i.handle,o=i.handleSize;i.onResize;var s=i.onResizeStart,l=i.onResizeStop,u=i.draggableOpts,c=i.minConstraints,f=i.maxConstraints,h=i.lockAspectRatio,d=i.axis;i.width,i.height;var v=i.resizeHandles,p=i.style,g=i.transformScale,m=OW(i,PW);return h0.createElement(DW.default,{axis:d,draggableOpts:u,handle:a,handleSize:o,height:this.state.height,lockAspectRatio:h,maxConstraints:f,minConstraints:c,onResizeStart:s,onResize:this.onResize,onResizeStop:l,resizeHandles:v,transformScale:g,width:this.state.width},h0.createElement("div",d0({},m,{style:tv(tv({},p),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},t}(h0.Component);Jd.default=eD,eD.propTypes=tv(tv({},AW.resizableProps),{},{children:MW.default.element}),Qd.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},Qd.exports.Resizable=kc.default,Qd.exports.ResizableBox=Jd.default;var ma={};Object.defineProperty(ma,"__esModule",{value:!0}),ma.resizeHandleType=ma.resizeHandleAxesType=ma.default=void 0;var Qt=rD(ga.exports),RW=rD(st.default);function rD(r){return r&&r.__esModule?r:{default:r}}var nD=Qt.default.arrayOf(Qt.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));ma.resizeHandleAxesType=nD;var iD=Qt.default.oneOfType([Qt.default.node,Qt.default.func]);ma.resizeHandleType=iD;var kW={className:Qt.default.string,style:Qt.default.object,width:Qt.default.number,autoSize:Qt.default.bool,cols:Qt.default.number,draggableCancel:Qt.default.string,draggableHandle:Qt.default.string,verticalCompact:function(t){t.verticalCompact},compactType:Qt.default.oneOf(["vertical","horizontal"]),layout:function(t){var e=t.layout;e!==void 0&&re.validateLayout(e,"layout")},margin:Qt.default.arrayOf(Qt.default.number),containerPadding:Qt.default.arrayOf(Qt.default.number),rowHeight:Qt.default.number,maxRows:Qt.default.number,isBounded:Qt.default.bool,isDraggable:Qt.default.bool,isResizable:Qt.default.bool,allowOverlap:Qt.default.bool,preventCollision:Qt.default.bool,useCSSTransforms:Qt.default.bool,transformScale:Qt.default.number,isDroppable:Qt.default.bool,resizeHandles:nD,resizeHandle:iD,onLayoutChange:Qt.default.func,onDragStart:Qt.default.func,onDrag:Qt.default.func,onDragStop:Qt.default.func,onResizeStart:Qt.default.func,onResize:Qt.default.func,onResizeStop:Qt.default.func,onDrop:Qt.default.func,droppingItem:Qt.default.shape({i:Qt.default.string.isRequired,w:Qt.default.number.isRequired,h:Qt.default.number.isRequired}),children:function(t,e){var n=t[e],i={};RW.default.Children.forEach(n,function(a){if((a==null?void 0:a.key)!=null){if(i[a.key])throw new Error('Duplicate child key "'+a.key+'" found! This will cause problems in ReactGridLayout.');i[a.key]=!0}})},innerRef:Qt.default.any};ma.default=kW;function p0(r){return p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p0(r)}Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.default=void 0;var Xl=g0(st.default),pe=g0(ga.exports),NW=Ec.exports,BW=Qd.exports,zc=re,pr=pa,aD=ma,zW=g0($d);function g0(r){return r&&r.__esModule?r:{default:r}}function oD(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function m0(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?oD(Object(e),!0).forEach(function(n){ci(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):oD(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function FW(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function sD(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function VW(r,t,e){return t&&sD(r.prototype,t),e&&sD(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function HW(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&y0(r,t)}function y0(r,t){return y0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},y0(r,t)}function $W(r){var t=GW();return function(){var n=ev(r),i;if(t){var a=ev(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return WW(this,i)}}function WW(r,t){if(t&&(p0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pn(r)}function Pn(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function GW(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ev(r){return ev=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ev(r)}function ci(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var _0=function(r){HW(e,r);var t=$W(e);function e(){var n;FW(this,e);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),ci(Pn(n),"state",{resizing:null,dragging:null,className:""}),ci(Pn(n),"elementRef",Xl.default.createRef()),ci(Pn(n),"onDragStart",function(s,l){var u=l.node,c=n.props,f=c.onDragStart,h=c.transformScale;if(!!f){var d={top:0,left:0},v=u.offsetParent;if(!!v){var p=v.getBoundingClientRect(),g=u.getBoundingClientRect(),m=g.left/h,y=p.left/h,_=g.top/h,b=p.top/h;d.left=m-y+v.scrollLeft,d.top=_-b+v.scrollTop,n.setState({dragging:d});var S=(0,pr.calcXY)(n.getPositionParams(),d.top,d.left,n.props.w,n.props.h),x=S.x,w=S.y;return f.call(Pn(n),n.props.i,x,w,{e:s,node:u,newPosition:d})}}}),ci(Pn(n),"onDrag",function(s,l){var u=l.node,c=l.deltaX,f=l.deltaY,h=n.props.onDrag;if(!!h){if(!n.state.dragging)throw new Error("onDrag called before onDragStart.");var d=n.state.dragging.top+f,v=n.state.dragging.left+c,p=n.props,g=p.isBounded,m=p.i,y=p.w,_=p.h,b=p.containerWidth,S=n.getPositionParams();if(g){var x=u.offsetParent;if(x){var w=n.props,C=w.margin,T=w.rowHeight,D=x.clientHeight-(0,pr.calcGridItemWHPx)(_,T,C[1]);d=(0,pr.clamp)(d,0,D);var A=(0,pr.calcGridColWidth)(S),P=b-(0,pr.calcGridItemWHPx)(y,A,C[0]);v=(0,pr.clamp)(v,0,P)}}var I={top:d,left:v};n.setState({dragging:I});var O=(0,pr.calcXY)(S,d,v,y,_),E=O.x,R=O.y;return h.call(Pn(n),m,E,R,{e:s,node:u,newPosition:I})}}),ci(Pn(n),"onDragStop",function(s,l){var u=l.node,c=n.props.onDragStop;if(!!c){if(!n.state.dragging)throw new Error("onDragEnd called before onDragStart.");var f=n.props,h=f.w,d=f.h,v=f.i,p=n.state.dragging,g=p.left,m=p.top,y={top:m,left:g};n.setState({dragging:null});var _=(0,pr.calcXY)(n.getPositionParams(),m,g,h,d),b=_.x,S=_.y;return c.call(Pn(n),v,b,S,{e:s,node:u,newPosition:y})}}),ci(Pn(n),"onResizeStop",function(s,l){n.onResizeHandler(s,l,"onResizeStop")}),ci(Pn(n),"onResizeStart",function(s,l){n.onResizeHandler(s,l,"onResizeStart")}),ci(Pn(n),"onResize",function(s,l){n.onResizeHandler(s,l,"onResize")}),n}return VW(e,[{key:"shouldComponentUpdate",value:function(i,a){if(this.props.children!==i.children||this.props.droppingPosition!==i.droppingPosition)return!0;var o=(0,pr.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),s=(0,pr.calcGridItemPosition)(this.getPositionParams(i),i.x,i.y,i.w,i.h,a);return!(0,zc.fastPositionEqual)(o,s)||this.props.useCSSTransforms!==i.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(i){this.moveDroppingItem(i)}},{key:"moveDroppingItem",value:function(i){var a=this.props.droppingPosition;if(!!a){var o=this.elementRef.current;if(!!o){var s=i.droppingPosition||{left:0,top:0},l=this.state.dragging,u=l&&a.left!==s.left||a.top!==s.top;if(!l)this.onDragStart(a.e,{node:o,deltaX:a.left,deltaY:a.top});else if(u){var c=a.left-l.left,f=a.top-l.top;this.onDrag(a.e,{node:o,deltaX:c,deltaY:f})}}}}},{key:"getPositionParams",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:i.cols,containerPadding:i.containerPadding,containerWidth:i.containerWidth,margin:i.margin,maxRows:i.maxRows,rowHeight:i.rowHeight}}},{key:"createStyle",value:function(i){var a=this.props,o=a.usePercentages,s=a.containerWidth,l=a.useCSSTransforms,u;return l?u=(0,zc.setTransform)(i):(u=(0,zc.setTopLeft)(i),o&&(u.left=(0,zc.perc)(i.left/s),u.width=(0,zc.perc)(i.width/s))),u}},{key:"mixinDraggable",value:function(i,a){return Xl.default.createElement(NW.DraggableCore,{disabled:!a,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},i)}},{key:"mixinResizable",value:function(i,a,o){var s=this.props,l=s.cols,u=s.x,c=s.minW,f=s.minH,h=s.maxW,d=s.maxH,v=s.transformScale,p=s.resizeHandles,g=s.resizeHandle,m=this.getPositionParams(),y=(0,pr.calcGridItemPosition)(m,0,0,l-u,0).width,_=(0,pr.calcGridItemPosition)(m,0,0,c,f),b=(0,pr.calcGridItemPosition)(m,0,0,h,d),S=[_.width,_.height],x=[Math.min(b.width,y),Math.min(b.height,1/0)];return Xl.default.createElement(BW.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:a.width,height:a.height,minConstraints:S,maxConstraints:x,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:v,resizeHandles:p,handle:g},i)}},{key:"onResizeHandler",value:function(i,a,o){var s=a.node,l=a.size,u=this.props[o];if(!!u){var c=this.props,f=c.cols,h=c.x,d=c.y,v=c.i,p=c.maxH,g=c.minH,m=this.props,y=m.minW,_=m.maxW,b=(0,pr.calcWH)(this.getPositionParams(),l.width,l.height,h,d),S=b.w,x=b.h;y=Math.max(y,1),_=Math.min(_,f-h),S=(0,pr.clamp)(S,y,_),x=(0,pr.clamp)(x,g,p),this.setState({resizing:o==="onResizeStop"?null:l}),u.call(this,v,S,x,{e:i,node:s,size:l})}}},{key:"render",value:function(){var i=this.props,a=i.x,o=i.y,s=i.w,l=i.h,u=i.isDraggable,c=i.isResizable,f=i.droppingPosition,h=i.useCSSTransforms,d=(0,pr.calcGridItemPosition)(this.getPositionParams(),a,o,s,l,this.state),v=Xl.default.Children.only(this.props.children),p=Xl.default.cloneElement(v,{ref:this.elementRef,className:(0,zW.default)("react-grid-item",v.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":u,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(f),cssTransforms:h}),style:m0(m0(m0({},this.props.style),v.props.style),this.createStyle(d))});return p=this.mixinResizable(p,d,c),p=this.mixinDraggable(p,u),p}}]),e}(Xl.default.Component);Ud.default=_0,ci(_0,"propTypes",{children:pe.default.element,cols:pe.default.number.isRequired,containerWidth:pe.default.number.isRequired,rowHeight:pe.default.number.isRequired,margin:pe.default.array.isRequired,maxRows:pe.default.number.isRequired,containerPadding:pe.default.array.isRequired,x:pe.default.number.isRequired,y:pe.default.number.isRequired,w:pe.default.number.isRequired,h:pe.default.number.isRequired,minW:function(t,e){var n=t[e];if(typeof n!="number")return new Error("minWidth not Number");if(n>t.w||n>t.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(t,e){var n=t[e];if(typeof n!="number")return new Error("maxWidth not Number");if(n<t.w||n<t.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(t,e){var n=t[e];if(typeof n!="number")return new Error("minHeight not Number");if(n>t.h||n>t.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(t,e){var n=t[e];if(typeof n!="number")return new Error("maxHeight not Number");if(n<t.h||n<t.minH)return new Error("maxHeight smaller than item height/minHeight")},i:pe.default.string.isRequired,resizeHandles:aD.resizeHandleAxesType,resizeHandle:aD.resizeHandleType,onDragStop:pe.default.func,onDragStart:pe.default.func,onDrag:pe.default.func,onResizeStop:pe.default.func,onResizeStart:pe.default.func,onResize:pe.default.func,isDraggable:pe.default.bool.isRequired,isResizable:pe.default.bool.isRequired,isBounded:pe.default.bool.isRequired,static:pe.default.bool,useCSSTransforms:pe.default.bool.isRequired,transformScale:pe.default.number,className:pe.default.string,handle:pe.default.string,cancel:pe.default.string,droppingPosition:pe.default.shape({e:pe.default.object.isRequired,left:pe.default.number.isRequired,top:pe.default.number.isRequired})}),ci(_0,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1});function rv(r){return rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rv(r)}Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.default=void 0;var us=jW(st.default),b0=nv(Ic.exports),UW=nv($d),$t=re,YW=pa,lD=nv(Ud),qW=nv(ma);function nv(r){return r&&r.__esModule?r:{default:r}}function uD(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(uD=function(i){return i?e:t})(r)}function jW(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||rv(r)!=="object"&&typeof r!="function")return{default:r};var e=uD(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function XW(r){return QW(r)||KW(r)||fD(r)||ZW()}function ZW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KW(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function QW(r){if(Array.isArray(r))return x0(r)}function cD(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function cs(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?cD(Object(e),!0).forEach(function(n){gr(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):cD(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function JW(r,t){return rG(r)||eG(r,t)||fD(r,t)||tG()}function tG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fD(r,t){if(!!r){if(typeof r=="string")return x0(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return x0(r,t)}}function x0(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function eG(r,t){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n=[],i=!0,a=!1,o,s;try{for(e=e.call(r);!(i=(o=e.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}return n}}function rG(r){if(Array.isArray(r))return r}function nG(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function hD(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function iG(r,t,e){return t&&hD(r.prototype,t),e&&hD(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function aG(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&S0(r,t)}function S0(r,t){return S0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},S0(r,t)}function oG(r){var t=lG();return function(){var n=iv(r),i;if(t){var a=iv(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return sG(this,i)}}function sG(r,t){if(t&&(rv(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qr(r)}function Qr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function lG(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function iv(r){return iv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},iv(r)}function gr(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var dD="react-grid-layout",vD=!1;try{vD=/firefox/i.test(navigator.userAgent)}catch{}var av=function(r){aG(e,r);var t=oG(e);function e(){var n;nG(this,e);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),gr(Qr(n),"state",{activeDrag:null,layout:(0,$t.synchronizeLayoutWithChildren)(n.props.layout,n.props.children,n.props.cols,(0,$t.compactType)(n.props),n.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),gr(Qr(n),"dragEnterCounter",0),gr(Qr(n),"onDragStart",function(s,l,u,c){var f=c.e,h=c.node,d=n.state.layout,v=(0,$t.getLayoutItem)(d,s);if(!!v)return n.setState({oldDragItem:(0,$t.cloneLayoutItem)(v),oldLayout:d}),n.props.onDragStart(d,v,v,null,f,h)}),gr(Qr(n),"onDrag",function(s,l,u,c){var f=c.e,h=c.node,d=n.state.oldDragItem,v=n.state.layout,p=n.props,g=p.cols,m=p.allowOverlap,y=p.preventCollision,_=(0,$t.getLayoutItem)(v,s);if(!!_){var b={w:_.w,h:_.h,x:_.x,y:_.y,placeholder:!0,i:s},S=!0;v=(0,$t.moveElement)(v,_,l,u,S,y,(0,$t.compactType)(n.props),g,m),n.props.onDrag(v,d,_,b,f,h),n.setState({layout:m?v:(0,$t.compact)(v,(0,$t.compactType)(n.props),g),activeDrag:b})}}),gr(Qr(n),"onDragStop",function(s,l,u,c){var f=c.e,h=c.node;if(!!n.state.activeDrag){var d=n.state.oldDragItem,v=n.state.layout,p=n.props,g=p.cols,m=p.preventCollision,y=p.allowOverlap,_=(0,$t.getLayoutItem)(v,s);if(!!_){var b=!0;v=(0,$t.moveElement)(v,_,l,u,b,m,(0,$t.compactType)(n.props),g,y),n.props.onDragStop(v,d,_,null,f,h);var S=y?v:(0,$t.compact)(v,(0,$t.compactType)(n.props),g),x=n.state.oldLayout;n.setState({activeDrag:null,layout:S,oldDragItem:null,oldLayout:null}),n.onLayoutMaybeChanged(S,x)}}}),gr(Qr(n),"onResizeStart",function(s,l,u,c){var f=c.e,h=c.node,d=n.state.layout,v=(0,$t.getLayoutItem)(d,s);!v||(n.setState({oldResizeItem:(0,$t.cloneLayoutItem)(v),oldLayout:n.state.layout}),n.props.onResizeStart(d,v,v,null,f,h))}),gr(Qr(n),"onResize",function(s,l,u,c){var f=c.e,h=c.node,d=n.state,v=d.layout,p=d.oldResizeItem,g=n.props,m=g.cols,y=g.preventCollision,_=g.allowOverlap,b=(0,$t.withLayoutItem)(v,s,function(T){var D;if(y&&!_){var A=(0,$t.getAllCollisions)(v,cs(cs({},T),{},{w:l,h:u})).filter(function(O){return O.i!==T.i});if(D=A.length>0,D){var P=1/0,I=1/0;A.forEach(function(O){O.x>T.x&&(P=Math.min(P,O.x)),O.y>T.y&&(I=Math.min(I,O.y))}),Number.isFinite(P)&&(T.w=P-T.x),Number.isFinite(I)&&(T.h=I-T.y)}}return D||(T.w=l,T.h=u),T}),S=JW(b,2),x=S[0],w=S[1];if(!!w){var C={w:w.w,h:w.h,x:w.x,y:w.y,static:!0,i:s};n.props.onResize(x,p,w,C,f,h),n.setState({layout:_?x:(0,$t.compact)(x,(0,$t.compactType)(n.props),m),activeDrag:C})}}),gr(Qr(n),"onResizeStop",function(s,l,u,c){var f=c.e,h=c.node,d=n.state,v=d.layout,p=d.oldResizeItem,g=n.props,m=g.cols,y=g.allowOverlap,_=(0,$t.getLayoutItem)(v,s);n.props.onResizeStop(v,p,_,null,f,h);var b=y?v:(0,$t.compact)(v,(0,$t.compactType)(n.props),m),S=n.state.oldLayout;n.setState({activeDrag:null,layout:b,oldResizeItem:null,oldLayout:null}),n.onLayoutMaybeChanged(b,S)}),gr(Qr(n),"onDragOver",function(s){var l;if(s.preventDefault(),s.stopPropagation(),vD&&!((l=s.nativeEvent.target)!==null&&l!==void 0&&l.classList.contains(dD)))return!1;var u=n.props,c=u.droppingItem,f=u.onDropDragOver,h=u.margin,d=u.cols,v=u.rowHeight,p=u.maxRows,g=u.width,m=u.containerPadding,y=u.transformScale,_=f==null?void 0:f(s);if(_===!1)return n.state.droppingDOMNode&&n.removeDroppingPlaceholder(),!1;var b=cs(cs({},c),_),S=n.state.layout,x=s.nativeEvent,w=x.layerX,C=x.layerY,T={left:w/y,top:C/y,e:s};if(n.state.droppingDOMNode){if(n.state.droppingPosition){var P=n.state.droppingPosition,I=P.left,O=P.top,E=I!=w||O!=C;E&&n.setState({droppingPosition:T})}}else{var D={cols:d,margin:h,maxRows:p,rowHeight:v,containerWidth:g,containerPadding:m||h},A=(0,YW.calcXY)(D,C,w,b.w,b.h);n.setState({droppingDOMNode:us.createElement("div",{key:b.i}),droppingPosition:T,layout:[].concat(XW(S),[cs(cs({},b),{},{x:A.x,y:A.y,static:!1,isDraggable:!0})])})}}),gr(Qr(n),"removeDroppingPlaceholder",function(){var s=n.props,l=s.droppingItem,u=s.cols,c=n.state.layout,f=(0,$t.compact)(c.filter(function(h){return h.i!==l.i}),(0,$t.compactType)(n.props),u);n.setState({layout:f,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),gr(Qr(n),"onDragLeave",function(s){s.preventDefault(),s.stopPropagation(),n.dragEnterCounter--,n.dragEnterCounter===0&&n.removeDroppingPlaceholder()}),gr(Qr(n),"onDragEnter",function(s){s.preventDefault(),s.stopPropagation(),n.dragEnterCounter++}),gr(Qr(n),"onDrop",function(s){s.preventDefault(),s.stopPropagation();var l=n.props.droppingItem,u=n.state.layout,c=u.find(function(f){return f.i===l.i});n.dragEnterCounter=0,n.removeDroppingPlaceholder(),n.props.onDrop(u,c,s)}),n}return iG(e,[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(i,a){return this.props.children!==i.children||!(0,$t.fastRGLPropsEqual)(this.props,i,b0.default)||this.state.activeDrag!==a.activeDrag||this.state.mounted!==a.mounted||this.state.droppingPosition!==a.droppingPosition}},{key:"componentDidUpdate",value:function(i,a){if(!this.state.activeDrag){var o=this.state.layout,s=a.layout;this.onLayoutMaybeChanged(o,s)}}},{key:"containerHeight",value:function(){if(!!this.props.autoSize){var i=(0,$t.bottom)(this.state.layout),a=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return i*this.props.rowHeight+(i-1)*this.props.margin[1]+a*2+"px"}}},{key:"onLayoutMaybeChanged",value:function(i,a){a||(a=this.state.layout),(0,b0.default)(a,i)||this.props.onLayoutChange(i)}},{key:"placeholder",value:function(){var i=this.state.activeDrag;if(!i)return null;var a=this.props,o=a.width,s=a.cols,l=a.margin,u=a.containerPadding,c=a.rowHeight,f=a.maxRows,h=a.useCSSTransforms,d=a.transformScale;return us.createElement(lD.default,{w:i.w,h:i.h,x:i.x,y:i.y,i:i.i,className:"react-grid-placeholder",containerWidth:o,cols:s,margin:l,containerPadding:u||l,maxRows:f,rowHeight:c,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:h,transformScale:d},us.createElement("div",null))}},{key:"processGridItem",value:function(i,a){if(!(!i||!i.key)){var o=(0,$t.getLayoutItem)(this.state.layout,String(i.key));if(!o)return null;var s=this.props,l=s.width,u=s.cols,c=s.margin,f=s.containerPadding,h=s.rowHeight,d=s.maxRows,v=s.isDraggable,p=s.isResizable,g=s.isBounded,m=s.useCSSTransforms,y=s.transformScale,_=s.draggableCancel,b=s.draggableHandle,S=s.resizeHandles,x=s.resizeHandle,w=this.state,C=w.mounted,T=w.droppingPosition,D=typeof o.isDraggable=="boolean"?o.isDraggable:!o.static&&v,A=typeof o.isResizable=="boolean"?o.isResizable:!o.static&&p,P=o.resizeHandles||S,I=D&&g&&o.isBounded!==!1;return us.createElement(lD.default,{containerWidth:l,cols:u,margin:c,containerPadding:f||c,maxRows:d,rowHeight:h,cancel:_,handle:b,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:D,isResizable:A,isBounded:I,useCSSTransforms:m&&C,usePercentages:!C,transformScale:y,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:a?T:void 0,resizeHandles:P,resizeHandle:x},i)}}},{key:"render",value:function(){var i=this,a=this.props,o=a.className,s=a.style,l=a.isDroppable,u=a.innerRef,c=(0,UW.default)(dD,o),f=cs({height:this.containerHeight()},s);return us.createElement("div",{ref:u,className:c,style:f,onDrop:l?this.onDrop:$t.noop,onDragLeave:l?this.onDragLeave:$t.noop,onDragEnter:l?this.onDragEnter:$t.noop,onDragOver:l?this.onDragOver:$t.noop},us.Children.map(this.props.children,function(h){return i.processGridItem(h)}),l&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var o;if(a.activeDrag)return null;if(!(0,b0.default)(i.layout,a.propsLayout)||i.compactType!==a.compactType?o=i.layout:(0,$t.childrenEqual)(i.children,a.children)||(o=a.layout),o){var s=(0,$t.synchronizeLayoutWithChildren)(o,i.children,i.cols,(0,$t.compactType)(i),i.allowOverlap);return{layout:s,compactType:i.compactType,children:i.children,propsLayout:i.layout}}return null}}]),e}(us.Component);Lc.default=av,gr(av,"displayName","ReactGridLayout"),gr(av,"propTypes",qW.default),gr(av,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:$t.noop,onDragStart:$t.noop,onDrag:$t.noop,onDragStop:$t.noop,onResizeStart:$t.noop,onResize:$t.noop,onResizeStop:$t.noop,onDrop:$t.noop,onDropDragOver:$t.noop});var ov={},fs={};Object.defineProperty(fs,"__esModule",{value:!0}),fs.findOrGenerateResponsiveLayout=fG,fs.getBreakpointFromWidth=uG,fs.getColsFromBreakpoint=cG,fs.sortBreakpoints=w0;var sv=re;function uG(r,t){for(var e=w0(r),n=e[0],i=1,a=e.length;i<a;i++){var o=e[i];t>r[o]&&(n=o)}return n}function cG(r,t){if(!t[r])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+r+" is missing!");return t[r]}function fG(r,t,e,n,i,a){if(r[e])return(0,sv.cloneLayout)(r[e]);for(var o=r[n],s=w0(t),l=s.slice(s.indexOf(e)),u=0,c=l.length;u<c;u++){var f=l[u];if(r[f]){o=r[f];break}}return o=(0,sv.cloneLayout)(o||[]),(0,sv.compact)((0,sv.correctBounds)(o,{cols:i}),a,i)}function w0(r){var t=Object.keys(r);return t.sort(function(e,n){return r[e]-r[n]})}function lv(r){return lv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lv(r)}Object.defineProperty(ov,"__esModule",{value:!0}),ov.default=void 0;var pD=vG(st.default),Jr=T0(ga.exports),C0=T0(Ic.exports),Zl=re,hs=fs,hG=T0(Lc),dG=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function T0(r){return r&&r.__esModule?r:{default:r}}function gD(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(gD=function(i){return i?e:t})(r)}function vG(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||lv(r)!=="object"&&typeof r!="function")return{default:r};var e=gD(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function M0(){return M0=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},M0.apply(this,arguments)}function pG(r,t){if(r==null)return{};var e=gG(r,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(e[n]=r[n]))}return e}function gG(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function mD(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function D0(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(e),!0).forEach(function(n){Kl(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):mD(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function mG(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function yD(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function yG(r,t,e){return t&&yD(r.prototype,t),e&&yD(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function _G(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&A0(r,t)}function A0(r,t){return A0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},A0(r,t)}function bG(r){var t=SG();return function(){var n=uv(r),i;if(t){var a=uv(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return xG(this,i)}}function xG(r,t){if(t&&(lv(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P0(r)}function P0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function SG(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uv(r){return uv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},uv(r)}function Kl(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var _D=function(t){return Object.prototype.toString.call(t)};function cv(r,t){return r==null?null:Array.isArray(r)?r:r[t]}var L0=function(r){_G(e,r);var t=bG(e);function e(){var n;mG(this,e);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),Kl(P0(n),"state",n.generateInitialState()),Kl(P0(n),"onLayoutChange",function(s){n.props.onLayoutChange(s,D0(D0({},n.props.layouts),{},Kl({},n.state.breakpoint,s)))}),n}return yG(e,[{key:"generateInitialState",value:function(){var i=this.props,a=i.width,o=i.breakpoints,s=i.layouts,l=i.cols,u=(0,hs.getBreakpointFromWidth)(o,a),c=(0,hs.getColsFromBreakpoint)(u,l),f=this.props.verticalCompact===!1?null:this.props.compactType,h=(0,hs.findOrGenerateResponsiveLayout)(s,o,u,u,c,f);return{layout:h,breakpoint:u,cols:c}}},{key:"componentDidUpdate",value:function(i){(this.props.width!=i.width||this.props.breakpoint!==i.breakpoint||!(0,C0.default)(this.props.breakpoints,i.breakpoints)||!(0,C0.default)(this.props.cols,i.cols))&&this.onWidthChange(i)}},{key:"onWidthChange",value:function(i){var a=this.props,o=a.breakpoints,s=a.cols,l=a.layouts,u=a.compactType,c=this.props.breakpoint||(0,hs.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),f=this.state.breakpoint,h=(0,hs.getColsFromBreakpoint)(c,s),d=D0({},l);if(f!==c||i.breakpoints!==o||i.cols!==s){f in d||(d[f]=(0,Zl.cloneLayout)(this.state.layout));var v=(0,hs.findOrGenerateResponsiveLayout)(d,o,c,f,h,u);v=(0,Zl.synchronizeLayoutWithChildren)(v,this.props.children,h,u,this.props.allowOverlap),d[c]=v,this.props.onLayoutChange(v,d),this.props.onBreakpointChange(c,h),this.setState({breakpoint:c,layout:v,cols:h})}var p=cv(this.props.margin,c),g=cv(this.props.containerPadding,c);this.props.onWidthChange(this.props.width,p,h,g)}},{key:"render",value:function(){var i=this.props;i.breakpoint,i.breakpoints,i.cols,i.layouts;var a=i.margin,o=i.containerPadding;i.onBreakpointChange,i.onLayoutChange,i.onWidthChange;var s=pG(i,dG);return pD.createElement(hG.default,M0({},s,{margin:cv(a,this.state.breakpoint),containerPadding:cv(o,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}],[{key:"getDerivedStateFromProps",value:function(i,a){if(!(0,C0.default)(i.layouts,a.layouts)){var o=a.breakpoint,s=a.cols,l=(0,hs.findOrGenerateResponsiveLayout)(i.layouts,i.breakpoints,o,o,s,i.compactType);return{layout:l,layouts:i.layouts}}return null}}]),e}(pD.Component);ov.default=L0,Kl(L0,"propTypes",{breakpoint:Jr.default.string,breakpoints:Jr.default.object,allowOverlap:Jr.default.bool,cols:Jr.default.object,margin:Jr.default.oneOfType([Jr.default.array,Jr.default.object]),containerPadding:Jr.default.oneOfType([Jr.default.array,Jr.default.object]),layouts:function(t,e){if(_D(t[e])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+_D(t[e]));Object.keys(t[e]).forEach(function(n){if(!(n in t.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,Zl.validateLayout)(t.layouts[n],"layouts."+n)})},width:Jr.default.number.isRequired,onBreakpointChange:Jr.default.func,onLayoutChange:Jr.default.func,onWidthChange:Jr.default.func}),Kl(L0,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:Zl.noop,onLayoutChange:Zl.noop,onWidthChange:Zl.noop});var I0={};function fv(r){return fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fv(r)}Object.defineProperty(I0,"__esModule",{value:!0}),I0.default=NG;var hv=MG(st.default),wG=bD(ga.exports),CG=bD($d),TG=["measureBeforeMount"];function bD(r){return r&&r.__esModule?r:{default:r}}function xD(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(xD=function(i){return i?e:t})(r)}function MG(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||fv(r)!=="object"&&typeof r!="function")return{default:r};var e=xD(t);if(e&&e.has(r))return e.get(r);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var o=i?Object.getOwnPropertyDescriptor(r,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=r[a]}return n.default=r,e&&e.set(r,n),n}function O0(){return O0=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},O0.apply(this,arguments)}function DG(r,t){if(r==null)return{};var e=AG(r,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(e[n]=r[n]))}return e}function AG(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function PG(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function SD(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function LG(r,t,e){return t&&SD(r.prototype,t),e&&SD(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function IG(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&E0(r,t)}function E0(r,t){return E0=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},E0(r,t)}function OG(r){var t=RG();return function(){var n=dv(r),i;if(t){var a=dv(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return EG(this,i)}}function EG(r,t){if(t&&(fv(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fc(r)}function Fc(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function RG(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dv(r){return dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},dv(r)}function Ql(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var kG="react-grid-layout";function NG(r){var t;return t=function(e){IG(i,e);var n=OG(i);function i(){var a;PG(this,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return a=n.call.apply(n,[this].concat(s)),Ql(Fc(a),"state",{width:1280}),Ql(Fc(a),"elementRef",hv.createRef()),Ql(Fc(a),"mounted",!1),Ql(Fc(a),"onWindowResize",function(){if(!!a.mounted){var u=a.elementRef.current;u instanceof HTMLElement&&u.offsetWidth&&a.setState({width:u.offsetWidth})}}),a}return LG(i,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var o=this.props,s=o.measureBeforeMount,l=DG(o,TG);return s&&!this.mounted?hv.createElement("div",{className:(0,CG.default)(this.props.className,kG),style:this.props.style,ref:this.elementRef}):hv.createElement(r,O0({innerRef:this.elementRef},l,this.state))}}]),i}(hv.Component),Ql(t,"defaultProps",{measureBeforeMount:!1}),Ql(t,"propTypes",{measureBeforeMount:wG.default.bool}),t}(function(r){r.exports=Lc.default,r.exports.utils=re,r.exports.Responsive=ov.default,r.exports.Responsive.utils=fs,r.exports.WidthProvider=I0.default})(Wy);var O1t="";const Ln=(r,t,e)=>async()=>{const i=await(await fetch({}.VITE_END_POINT,{method:"POST",headers:{"Content-Type":"application/json","X-Hasura-Role":"anonymous",...e},body:JSON.stringify({query:r,variables:t})})).json();if(i.errors){const{message:a}=i.errors[0];throw new Error(a)}return i.data},BG=`
|
|
8
|
+
mutation CreateExternalMetric($chartOptions: jsonb = "", $companyId: uuid = "", $companyIntegrationId: uuid = "", $description: String = "", $inputFields: jsonb = "", $integrationName: String = "", $metricId: String = "", $metricQuery: String = "", $name: String = "", $outputColumns: String = "", $query: String = "", $isLive: Boolean, $clientId: String = "", $isCreatedByClient: Boolean = false, $createdBy: String = "", $timeGrain: String = "", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {
|
|
9
|
+
insert_externalMetrics_one(
|
|
10
|
+
object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}
|
|
11
|
+
) {
|
|
12
|
+
id
|
|
13
|
+
externalDashboardMetrics {
|
|
14
|
+
externalDashboardId
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`,zG=r=>Vd(["CreateExternalMetric"],t=>Ln(BG,t)(),r),FG=`
|
|
19
|
+
mutation FetchColumnData($companyId: String = "", $tableName: String = "", $columnName: String = "") {
|
|
20
|
+
fetchColumnData(
|
|
21
|
+
input: {columnName: $columnName, companyId: $companyId, tableName: $tableName}
|
|
22
|
+
) {
|
|
23
|
+
data {
|
|
24
|
+
label
|
|
25
|
+
value
|
|
26
|
+
}
|
|
27
|
+
error {
|
|
28
|
+
message
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`,VG=r=>Vd(["FetchColumnData"],t=>Ln(FG,t)(),r),HG=`
|
|
33
|
+
mutation GenerateDatasetMetrics($companyId: String = "", $userInputs: json = "") {
|
|
34
|
+
generateDatasetMetrics(input: {companyId: $companyId, userInputs: $userInputs}) {
|
|
35
|
+
error
|
|
36
|
+
query
|
|
37
|
+
result
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`,$G=r=>Vd(["GenerateDatasetMetrics"],t=>Ln(HG,t)(),r),WG=`
|
|
41
|
+
query CompanyIntegration($companyId: uuid = "") {
|
|
42
|
+
companyIntegrations(where: {companyId: {_eq: $companyId}}) {
|
|
43
|
+
companyId
|
|
44
|
+
id
|
|
45
|
+
integrationId
|
|
46
|
+
name
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`,GG=(r,t)=>Qa(r===void 0?["CompanyIntegration"]:["CompanyIntegration",r],Ln(WG,r),t),UG=`
|
|
50
|
+
query CompanySubsetTableList($companyId: uuid = "") {
|
|
51
|
+
companySubsetTables(where: {companyId: {_eq: $companyId}}) {
|
|
52
|
+
tableList
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`,YG=(r,t)=>Qa(r===void 0?["CompanySubsetTableList"]:["CompanySubsetTableList",r],Ln(UG,r),t),qG=`
|
|
56
|
+
query EmbeddedDashboardMetrics($where: externalDashboardMetrics_bool_exp) {
|
|
57
|
+
externalDashboardMetrics(where: $where) {
|
|
58
|
+
externalMetricId
|
|
59
|
+
externalDashboardId
|
|
60
|
+
externalMetric {
|
|
61
|
+
chartOptions
|
|
62
|
+
clientId
|
|
63
|
+
companyId
|
|
64
|
+
companyIntegrationId
|
|
65
|
+
createdAt
|
|
66
|
+
createdBy
|
|
67
|
+
description
|
|
68
|
+
id
|
|
69
|
+
inputFields
|
|
70
|
+
integrationName
|
|
71
|
+
isCreatedByClient
|
|
72
|
+
isLive
|
|
73
|
+
metricId
|
|
74
|
+
metricQuery
|
|
75
|
+
name
|
|
76
|
+
outputColumns
|
|
77
|
+
query
|
|
78
|
+
resizeAttributes
|
|
79
|
+
timeGrain
|
|
80
|
+
updatedAt
|
|
81
|
+
selectedGroupBy
|
|
82
|
+
isEnableGroupBy
|
|
83
|
+
groupBy
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,jG=(r,t)=>Qa(r===void 0?["EmbeddedDashboardMetrics"]:["EmbeddedDashboardMetrics",r],Ln(qG,r),t),XG=`
|
|
88
|
+
query GetExternalDashboardClientTheme($companyId: uuid!, $clientId: String!) {
|
|
89
|
+
externalDashboardThemes(
|
|
90
|
+
where: {companyId: {_eq: $companyId}, externalDashboardThemeClients: {clientId: {_eq: $clientId}}}
|
|
91
|
+
limit: 1
|
|
92
|
+
) {
|
|
93
|
+
colors
|
|
94
|
+
createdAt
|
|
95
|
+
id
|
|
96
|
+
name
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`,ZG=(r,t)=>Qa(["GetExternalDashboardClientTheme",r],Ln(XG,r),t),KG=`
|
|
100
|
+
query GetExternalDashboardId($externalDashboardId: String = "") {
|
|
101
|
+
externalDashboards(where: {externalDashboardId: {_eq: $externalDashboardId}}) {
|
|
102
|
+
id
|
|
103
|
+
filters
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`,QG=(r,t)=>Qa(r===void 0?["GetExternalDashboardId"]:["GetExternalDashboardId",r],Ln(KG,r),t),JG=`
|
|
107
|
+
query ExternalDashboardList($companyId: uuid = "") {
|
|
108
|
+
externalDashboards(where: {companyId: {_eq: $companyId}}) {
|
|
109
|
+
externalDashboardId
|
|
110
|
+
name
|
|
111
|
+
id
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`,t8=(r,t)=>Qa(r===void 0?["ExternalDashboardList"]:["ExternalDashboardList",r],Ln(JG,r),t),e8=`
|
|
115
|
+
query GuestTokenParams($id: uuid = "") {
|
|
116
|
+
guestTokens_by_pk(id: $id) {
|
|
117
|
+
clientId
|
|
118
|
+
companyId
|
|
119
|
+
id
|
|
120
|
+
params
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`,r8=(r,t)=>Qa(r===void 0?["GuestTokenParams"]:["GuestTokenParams",r],Ln(e8,r),t),n8=`
|
|
124
|
+
mutation PreviewTable($companyId: String = "", $tableName: String = "", $limit: Int = 10) {
|
|
125
|
+
previewTable(
|
|
126
|
+
input: {companyId: $companyId, tableName: $tableName, limit: $limit}
|
|
127
|
+
) {
|
|
128
|
+
data {
|
|
129
|
+
data
|
|
130
|
+
isError
|
|
131
|
+
name
|
|
132
|
+
}
|
|
133
|
+
error {
|
|
134
|
+
message
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
`,i8=r=>Vd(["PreviewTable"],t=>Ln(n8,t)(),r),a8=`
|
|
139
|
+
query QueryExternalMetric($id: String = "", $clientId: String = "", $filterValues: json = "", $globalFilters: json = []) {
|
|
140
|
+
externalMetricQuery(
|
|
141
|
+
input: {externalMetricId: $id, clientId: $clientId, filterValues: $filterValues, globalFilters: $globalFilters}
|
|
142
|
+
) {
|
|
143
|
+
data
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`,wD=(r,t)=>Qa(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Ln(a8,r),t);var CD={exports:{}};/*!
|
|
147
|
+
Copyright (c) 2018 Jed Watson.
|
|
148
|
+
Licensed under the MIT License (MIT), see
|
|
149
|
+
http://jedwatson.github.io/classnames
|
|
150
|
+
*/(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(!!a){var o=typeof a;if(o==="string"||o==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var s=e.apply(null,a);s&&n.push(s)}}else if(o==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&n.push(l)}}}return n.join(" ")}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(CD);var ya=CD.exports,o8={primary:"_primary_iy5fw_1",secondary:"_secondary_iy5fw_5",tertiary:"_tertiary_iy5fw_10","font-18":"_font-18_iy5fw_14","font-20":"_font-20_iy5fw_18","font-14":"_font-14_iy5fw_22","font-14a":"_font-14a_iy5fw_26","font-14b":"_font-14b_iy5fw_30","font-14c":"_font-14c_iy5fw_34","font-15":"_font-15_iy5fw_38","font-34":"_font-34_iy5fw_41"},vv={exports:{}},pv={};/**
|
|
151
|
+
* @license React
|
|
152
|
+
* react-jsx-runtime.production.min.js
|
|
153
|
+
*
|
|
154
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the MIT license found in the
|
|
157
|
+
* LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/var s8=st.default,l8=Symbol.for("react.element"),u8=Symbol.for("react.fragment"),c8=Object.prototype.hasOwnProperty,f8=s8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h8={key:!0,ref:!0,__self:!0,__source:!0};function TD(r,t,e){var n,i={},a=null,o=null;e!==void 0&&(a=""+e),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)c8.call(t,n)&&!h8.hasOwnProperty(n)&&(i[n]=t[n]);if(r&&r.defaultProps)for(n in t=r.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:l8,type:r,key:a,ref:o,props:i,_owner:f8.current}}pv.Fragment=u8,pv.jsx=TD,pv.jsxs=TD,vv.exports=pv;const M=vv.exports.jsx,$=vv.exports.jsxs,Vt=vv.exports.Fragment,d8={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",span:"span"},St=({className:r,variant:t,styleClass:e="primary",children:n,onClick:i})=>{const a=d8[t];return M(a,{className:ya(e==="custom"?null:`${o8[e]}`,r),onClick:i,children:n})},v8="something went wrong, please try again",Be={line:"line",stepped:"stepped",bar:"bar",stack:"stack",histogram:"histogram",bubble:"bubble",scatter:"scatter",row:"row",area:"area",combo:"combo",pie:"pie",doughnut:"doughnut",waterfall:"waterfall",funnel:"funnel",gauge:"gauge",sankey:"sankey",singleValue:"single value",boxplot:"boxplot",table:"table"},R0="CHART_TAB",gv="TABLE_TAB",k0="INPUT_TABLE",mv="OUTPUT_TABLE",MD="doughnut",DD="pie",p8="sankey",g8="boxplot",AD={Snowflake:"Snowflake",Redshift:"Redshift",BigQuery:"BigQuery",Postges:"Postgres"};var N0=function(r,t){return N0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},N0(r,t)};function PD(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");N0(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var B0=function(){return B0=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},B0.apply(this,arguments)};/*! *****************************************************************************
|
|
159
|
+
Copyright (c) Microsoft Corporation.
|
|
160
|
+
|
|
161
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
162
|
+
purpose with or without fee is hereby granted.
|
|
163
|
+
|
|
164
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
165
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
166
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
167
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
168
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
169
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
170
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
171
|
+
***************************************************************************** */var z0=function(r,t){return z0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},z0(r,t)};function q(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");z0(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var m8=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),y8=function(){function r(){this.browser=new m8,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!="undefined"}return r}(),ds=new y8;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ds.wxa=!0,ds.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?ds.worker=!0:typeof navigator=="undefined"?(ds.node=!0,ds.svgSupported=!0):_8(navigator.userAgent,ds);function _8(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),i&&(e.ie=!0,e.version=i[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect!="undefined",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document!="undefined";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Yt=ds,F0=12,LD="sans-serif",eo=F0+"px "+LD,b8=20,x8=100,S8="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function w8(r){var t={};if(typeof JSON=="undefined")return t;for(var e=0;e<r.length;e++){var n=String.fromCharCode(e+32),i=(r.charCodeAt(e)-b8)/x8;t[n]=i}return t}var C8=w8(S8),fi={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,n){if(!r){var i=fi.createCanvas();r=i&&i.getContext("2d")}if(r)return t!==n&&(t=r.font=n||eo),r.measureText(e);e=e||"",n=n||eo;var a=/(\d+)px/.exec(n),o=a&&+a[1]||F0,s=0;if(n.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=C8[e[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,t,e){var n=new Image;return n.onload=t,n.onerror=e,n.src=r,n}};function ID(r){for(var t in fi)r[t]&&(fi[t]=r[t])}var OD=In(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),ED=In(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Jl=Object.prototype.toString,yv=Array.prototype,T8=yv.forEach,M8=yv.filter,V0=yv.slice,D8=yv.map,RD=function(){}.constructor,_v=RD?RD.prototype:null,H0="__proto__",A8=2311;function $0(){return A8++}function bv(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console!="undefined"&&console.error.apply(console,r)}function Tt(r){if(r==null||typeof r!="object")return r;var t=r,e=Jl.call(r);if(e==="[object Array]"){if(!ru(r)){t=[];for(var n=0,i=r.length;n<i;n++)t[n]=Tt(r[n])}}else if(ED[e]){if(!ru(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var n=0,i=r.length;n<i;n++)t[n]=r[n]}}}else if(!OD[e]&&!ru(r)&&!tu(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==H0&&(t[o]=Tt(r[o]))}return t}function Ot(r,t,e){if(!xt(t)||!xt(r))return e?Tt(t):r;for(var n in t)if(t.hasOwnProperty(n)&&n!==H0){var i=r[n],a=t[n];xt(a)&&xt(i)&&!Q(a)&&!Q(i)&&!tu(a)&&!tu(i)&&!G0(a)&&!G0(i)&&!ru(a)&&!ru(i)?Ot(i,a,e):(e||!(n in r))&&(r[n]=Tt(t[n]))}return r}function xv(r,t){for(var e=r[0],n=1,i=r.length;n<i;n++)e=Ot(e,r[n],t);return e}function K(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==H0&&(r[e]=t[e]);return r}function bt(r,t,e){for(var n=Ht(t),i=0;i<n.length;i++){var a=n[i];(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}return r}var P8=fi.createCanvas;function Bt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e}return-1}function W0(r,t){var e=r.prototype;function n(){}n.prototype=t.prototype,r.prototype=new n;for(var i in e)e.hasOwnProperty(i)&&(r.prototype[i]=e[i]);r.prototype.constructor=r,r.superClass=t}function ze(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else bt(r,t,e)}function mr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function L(r,t,e){if(!!(r&&t))if(r.forEach&&r.forEach===T8)r.forEach(t,e);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)t.call(e,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function J(r,t,e){if(!r)return[];if(!t)return wv(r);if(r.map&&r.map===D8)return r.map(t,e);for(var n=[],i=0,a=r.length;i<a;i++)n.push(t.call(e,r[i],i,r));return n}function In(r,t,e,n){if(!!(r&&t)){for(var i=0,a=r.length;i<a;i++)e=t.call(n,e,r[i],i,r);return e}}function ae(r,t,e){if(!r)return[];if(!t)return wv(r);if(r.filter&&r.filter===M8)return r.filter(t,e);for(var n=[],i=0,a=r.length;i<a;i++)t.call(e,r[i],i,r)&&n.push(r[i]);return n}function kD(r,t,e){if(!!(r&&t)){for(var n=0,i=r.length;n<i;n++)if(t.call(e,r[n],n,r))return r[n]}}function Ht(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 L8(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return function(){return r.apply(t,e.concat(V0.call(arguments)))}}var dt=_v&&_t(_v.bind)?_v.call.bind(_v.bind):L8;function It(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(V0.call(arguments)))}}function Q(r){return Array.isArray?Array.isArray(r):Jl.call(r)==="[object Array]"}function _t(r){return typeof r=="function"}function ct(r){return typeof r=="string"}function Sv(r){return Jl.call(r)==="[object String]"}function qt(r){return typeof r=="number"}function xt(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function G0(r){return!!OD[Jl.call(r)]}function tn(r){return!!ED[Jl.call(r)]}function tu(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Vc(r){return r.colorStops!=null}function ND(r){return r.image!=null}function BD(r){return Jl.call(r)==="[object RegExp]"}function eu(r){return r!==r}function Je(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,n=r.length;e<n;e++)if(r[e]!=null)return r[e]}function Et(r,t){return r!=null?r:t}function zi(r,t,e){return r!=null?r:t!=null?t:e}function wv(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return V0.apply(r,t)}function Cv(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 Mr(r,t){if(!r)throw new Error(t)}function On(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var zD="__ec_primitive__";function Hc(r){r[zD]=!0}function ru(r){return r[zD]}var I8=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 Ht(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},r}(),FD=typeof Map=="function";function O8(){return FD?new Map:new I8}var VD=function(){function r(t){var e=Q(t);this.data=O8();var n=this;t instanceof r?t.each(i):t&&L(t,i);function i(a,o){e?n.set(a,o):n.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(n,i){t.call(e,n,i)})},r.prototype.keys=function(){var t=this.data.keys();return FD?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r}();function yt(r){return new VD(r)}function $c(r,t){for(var e=new r.constructor(r.length+t.length),n=0;n<r.length;n++)e[n]=r[n];for(var i=r.length,n=0;n<t.length;n++)e[n+i]=t[n];return e}function Wc(r,t){var e;if(Object.create)e=Object.create(r);else{var n=function(){};n.prototype=r,e=new n}return t&&K(e,t),e}function U0(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function pt(r,t){return r.hasOwnProperty(t)}function Fe(){}var Gc=180/Math.PI,E8=Object.freeze(Object.defineProperty({__proto__:null,guid:$0,logError:bv,clone:Tt,merge:Ot,mergeAll:xv,extend:K,defaults:bt,createCanvas:P8,indexOf:Bt,inherits:W0,mixin:ze,isArrayLike:mr,each:L,map:J,reduce:In,filter:ae,find:kD,keys:Ht,bind:dt,curry:It,isArray:Q,isFunction:_t,isString:ct,isStringSafe:Sv,isNumber:qt,isObject:xt,isBuiltInObject:G0,isTypedArray:tn,isDom:tu,isGradientObject:Vc,isImagePatternObject:ND,isRegExp:BD,eqNaN:eu,retrieve:Je,retrieve2:Et,retrieve3:zi,slice:wv,normalizeCssArray:Cv,assert:Mr,trim:On,setAsPrimitive:Hc,isPrimitive:ru,HashMap:VD,createHashMap:yt,concatArray:$c,createObject:Wc,disableUserSelect:U0,hasOwn:pt,noop:Fe,RADIAN_TO_DEGREE:Gc},Symbol.toStringTag,{value:"Module"}));/*! *****************************************************************************
|
|
172
|
+
Copyright (c) Microsoft Corporation.
|
|
173
|
+
|
|
174
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
175
|
+
purpose with or without fee is hereby granted.
|
|
176
|
+
|
|
177
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
178
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
179
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
180
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
181
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
182
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
183
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
184
|
+
***************************************************************************** */var Y0=function(r,t){return Y0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Y0(r,t)};function Ce(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y0(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ro(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function Dr(r,t){return r[0]=t[0],r[1]=t[1],r}function Fi(r){return[r[0],r[1]]}function HD(r,t,e){return r[0]=t,r[1]=e,r}function q0(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function Tv(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r}function no(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Uc(r){return Math.sqrt(j0(r))}var R8=Uc;function j0(r){return r[0]*r[0]+r[1]*r[1]}var k8=j0;function N8(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function B8(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function z8(r,t){return r[0]*t[0]+r[1]*t[1]}function Yc(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function vs(r,t){var e=Uc(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Mv(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var _a=Mv;function $D(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var io=$D;function F8(r,t){return r[0]=-t[0],r[1]=-t[1],r}function qc(r,t,e,n){return r[0]=t[0]+n*(e[0]-t[0]),r[1]=t[1]+n*(e[1]-t[1]),r}function sr(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function ba(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function xa(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var V8=Object.freeze(Object.defineProperty({__proto__:null,create:ro,copy:Dr,clone:Fi,set:HD,add:q0,scaleAndAdd:Tv,sub:no,len:Uc,length:R8,lenSquare:j0,lengthSquare:k8,mul:N8,div:B8,dot:z8,scale:Yc,normalize:vs,distance:Mv,dist:_a,distanceSquare:$D,distSquare:io,negate:F8,lerp:qc,applyTransform:sr,min:ba,max:xa},Symbol.toStringTag,{value:"Module"})),nu=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),H8=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 nu(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(a,o,t),this.handler.dispatchToElement(new nu(e,t),"drag",t.event);var s=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new nu(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new nu(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new nu(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new nu(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}(),$8=H8,W8=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(i=n,n=e,e=null),!n||!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===n)return this;var l={h:n,query:e,ctx:i||this,callAtLast:n.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 n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==e&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},r.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=i.length,l=0;l<s;l++){var u=i[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=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=e[o-1],l=i.length,u=0;u<l;u++){var c=i[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}(),En=W8,G8=Math.log(2);function X0(r,t,e,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/G8);return r[e][l]}for(var u=n|1<<e,c=e+1;n&1<<c;)c++;for(var f=0,h=0,d=0;h<s;h++){var v=1<<h;v&i||(f+=(d%2?-1:1)*r[e][h]*X0(r,t-1,c,u,i|v,a),d++)}return a[o]=f,f}function WD(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]]],n={},i=X0(e,8,0,0,0,n);if(i!==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)*X0(e,7,o===0?1:0,1<<o,1<<s,n)/i*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 GD="___zrEVENTSAVED",Z0=[];function U8(r,t,e,n,i){return K0(Z0,t,n,i,!0)&&K0(r,e,Z0[0],Z0[1])}function K0(r,t,e,n,i){if(t.getBoundingClientRect&&Yt.domSupported&&!UD(t)){var a=t[GD]||(t[GD]={}),o=Y8(t,a),s=q8(o,a,i);if(s)return s(r,e,n),!0}return!1}function Y8(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var n=["left","right"],i=["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",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function q8(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=e?WD(s,o):WD(o,s))}function UD(r){return r.nodeName.toUpperCase()==="CANVAS"}var j8=/([&<>"'])/g,X8={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vr(r){return r==null?"":(r+"").replace(j8,function(t,e){return X8[e]})}var Z8=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Q0=[],K8=Yt.browser.firefox&&+Yt.browser.version.split(".")[0]<39;function J0(r,t,e,n){return e=e||{},n?YD(r,t,e):K8&&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):YD(r,t,e),e}function YD(r,t,e){if(Yt.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(UD(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(K0(Q0,r,n,i)){e.zrX=Q0[0],e.zrY=Q0[1];return}}e.zrX=e.zrY=0}function t_(r){return r||window.event}function Rn(r,t,e){if(t=t_(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&J0(r,o,t,e)}else{J0(r,t,t,e);var a=Q8(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Z8.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Q8(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function e_(r,t,e,n){r.addEventListener(t,e,n)}function J8(r,t,e,n){r.removeEventListener(t,e,n)}var Sa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function qD(r){return r.which===2||r.which===3}var t7=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(!!i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=J0(n,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 r_)if(r_.hasOwnProperty(e)){var n=r_[e](this._track,t);if(n)return n}},r}();function jD(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function e7(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var r_={pinch:function(r,t){var e=r.length;if(!!e){var n=(r[e-1]||{}).points,i=(r[e-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=jD(n)/jD(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=e7(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function mn(){return[1,0,0,1,0,0]}function jc(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Dv(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 Vi(r,t,e){var n=t[0]*e[0]+t[2]*e[1],i=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]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function hi(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 ao(r,t,e){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(e),c=Math.cos(e);return r[0]=n*c+o*u,r[1]=-n*u+o*c,r[2]=i*c+s*u,r[3]=-i*u+c*s,r[4]=c*a+u*l,r[5]=c*l-u*a,r}function Av(r,t,e){var n=e[0],i=e[1];return r[0]=t[0]*n,r[1]=t[1]*i,r[2]=t[2]*n,r[3]=t[3]*i,r[4]=t[4]*n,r[5]=t[5]*i,r}function ps(r,t){var e=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-e*s)*l,r):null}function XD(r){var t=mn();return Dv(t,r),t}var r7=Object.freeze(Object.defineProperty({__proto__:null,create:mn,identity:jc,copy:Dv,mul:Vi,translate:hi,rotate:ao,scale:Av,invert:ps,clone:XD},Symbol.toStringTag,{value:"Module"})),n7=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,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},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,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+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,n){t.x=e,t.y=n},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,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},r.lerp=function(t,e,n,i){var a=1-i;t.x=a*e.x+i*n.x,t.y=a*e.y+i*n.y},r}(),Rt=n7,Pv=Math.min,Lv=Math.max,gs=new Rt,ms=new Rt,ys=new Rt,_s=new Rt,Xc=new Rt,Zc=new Rt,i7=function(){function r(t,e,n,i){n<0&&(t=t+n,n=-n),i<0&&(e=e+i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return r.prototype.union=function(t){var e=Pv(t.x,this.x),n=Pv(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Lv(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Lv(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,a=mn();return hi(a,a,[-e.x,-e.y]),Av(a,a,[n,i]),hi(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,c=t.y,f=t.y+t.height,h=!(a<l||u<i||s<c||f<o);if(e){var d=1/0,v=0,p=Math.abs(a-l),g=Math.abs(u-i),m=Math.abs(s-c),y=Math.abs(f-o),_=Math.min(p,g),b=Math.min(m,y);a<l||u<i?_>v&&(v=_,p<g?Rt.set(Zc,-p,0):Rt.set(Zc,g,0)):_<d&&(d=_,p<g?Rt.set(Xc,p,0):Rt.set(Xc,-g,0)),s<c||f<o?b>v&&(v=b,m<y?Rt.set(Zc,0,-m):Rt.set(Zc,0,y)):_<d&&(d=_,m<y?Rt.set(Xc,0,m):Rt.set(Xc,0,-y))}return e&&Rt.copy(e,h?Xc:Zc),h},r.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(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.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,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}gs.x=ys.x=e.x,gs.y=_s.y=e.y,ms.x=_s.x=e.x+e.width,ms.y=ys.y=e.y+e.height,gs.transform(n),_s.transform(n),ms.transform(n),ys.transform(n),t.x=Pv(gs.x,ms.x,ys.x,_s.x),t.y=Pv(gs.y,ms.y,ys.y,_s.y);var l=Lv(gs.x,ms.x,ys.x,_s.x),u=Lv(gs.y,ms.y,ys.y,_s.y);t.width=l-t.x,t.height=u-t.y},r}(),kt=i7,ZD="silent";function a7(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:o7}}function o7(){Sa(this.event)}var s7=function(r){Ce(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}(En),Kc=function(){function r(t,e){this.x=t,this.y=e}return r}(),l7=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],n_=new kt(0,0,0,0),KD=function(r){Ce(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Kc(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new s7,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new $8(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(l7,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=JD(this,n,i),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 Kc(n,i):this.findHover(n,i),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 n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Kc(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=a7(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){var a=this.storage.getDisplayList(),o=new Kc(e,n);if(QD(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new kt(e-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(n_.copy(h.getBoundingRect()),h.transform&&n_.applyTransform(h.transform),n_.intersect(c)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=d)for(var m=0;m<p;m+=v){var y=e+g*Math.cos(m),_=n+g*Math.sin(m);if(QD(s,o,y,_,i),o.target)return o}}return o},t.prototype.processGesture=function(e,n){this._gestureMgr||(this._gestureMgr=new t7);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;e.gestureEvent=o;var s=new Kc;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(En);L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){KD.prototype[r]=function(t){var e=t.zrX,n=t.zrY,i=JD(this,e,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(e,n),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||_a(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function u7(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?ZD:!0}return!1}function QD(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=u7(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==ZD)){t.target=o;break}}}function JD(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var c7=KD,t2=32,Qc=7;function f7(r){for(var t=0;r>=t2;)t|=r&1,r>>=1;return r+t}function e2(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i<e&&n(r[i],r[i-1])<0;)i++;h7(r,t,i)}else for(;i<e&&n(r[i],r[i-1])>=0;)i++;return i-t}function h7(r,t,e){for(e--;t<e;){var n=r[t];r[t++]=r[e],r[e--]=n}}function r2(r,t,e,n,i){for(n===t&&n++;n<e;n++){for(var a=r[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-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 i_(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])>0){for(s=n-i;l<s&&a(r,t[e+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(r,t[e+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-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 a_(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])<0){for(s=i+1;l<s&&a(r,t[e+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,t[e+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(r,t[e+c])<0?l=c:o=c+1}return l}function d7(r,t){var e=Qc,n,i,a=0;r.length;var o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var v=n[d],p=i[d],g=n[d+1],m=i[d+1];i[d]=p+m,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var y=a_(r[g],r,v,p,0,t);v+=y,p-=y,p!==0&&(m=i_(r[v+p-1],r,g,m,m-1,t),m!==0&&(p<=m?f(v,p,g,m):h(v,p,g,m)))}function f(d,v,p,g){var m=0;for(m=0;m<v;m++)o[m]=r[d+m];var y=0,_=p,b=d;if(r[b++]=r[_++],--g===0){for(m=0;m<v;m++)r[b+m]=o[y+m];return}if(v===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=o[y];return}for(var S=e,x,w,C;;){x=0,w=0,C=!1;do if(t(r[_],o[y])<0){if(r[b++]=r[_++],w++,x=0,--g===0){C=!0;break}}else if(r[b++]=o[y++],x++,w=0,--v===1){C=!0;break}while((x|w)<S);if(C)break;do{if(x=a_(r[_],o,y,v,0,t),x!==0){for(m=0;m<x;m++)r[b+m]=o[y+m];if(b+=x,y+=x,v-=x,v<=1){C=!0;break}}if(r[b++]=r[_++],--g===0){C=!0;break}if(w=i_(o[y],r,_,g,0,t),w!==0){for(m=0;m<w;m++)r[b+m]=r[_+m];if(b+=w,_+=w,g-=w,g===0){C=!0;break}}if(r[b++]=o[y++],--v===1){C=!0;break}S--}while(x>=Qc||w>=Qc);if(C)break;S<0&&(S=0),S+=2}if(e=S,e<1&&(e=1),v===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=o[y]}else{if(v===0)throw new Error;for(m=0;m<v;m++)r[b+m]=o[y+m]}}function h(d,v,p,g){var m=0;for(m=0;m<g;m++)o[m]=r[p+m];var y=d+v-1,_=g-1,b=p+g-1,S=0,x=0;if(r[b--]=r[y--],--v===0){for(S=b-(g-1),m=0;m<g;m++)r[S+m]=o[m];return}if(g===1){for(b-=v,y-=v,x=b+1,S=y+1,m=v-1;m>=0;m--)r[x+m]=r[S+m];r[b]=o[_];return}for(var w=e;;){var C=0,T=0,D=!1;do if(t(o[_],r[y])<0){if(r[b--]=r[y--],C++,T=0,--v===0){D=!0;break}}else if(r[b--]=o[_--],T++,C=0,--g===1){D=!0;break}while((C|T)<w);if(D)break;do{if(C=v-a_(o[_],r,d,v,v-1,t),C!==0){for(b-=C,y-=C,v-=C,x=b+1,S=y+1,m=C-1;m>=0;m--)r[x+m]=r[S+m];if(v===0){D=!0;break}}if(r[b--]=o[_--],--g===1){D=!0;break}if(T=g-i_(r[y],o,0,g,g-1,t),T!==0){for(b-=T,_-=T,g-=T,x=b+1,S=_+1,m=0;m<T;m++)r[x+m]=o[S+m];if(g<=1){D=!0;break}}if(r[b--]=r[y--],--v===0){D=!0;break}w--}while(C>=Qc||T>=Qc);if(D)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(b-=v,y-=v,x=b+1,S=y+1,m=v-1;m>=0;m--)r[x+m]=r[S+m];r[b]=o[_]}else{if(g===0)throw new Error;for(S=b-(g-1),m=0;m<g;m++)r[S+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Iv(r,t,e,n){e||(e=0),n||(n=r.length);var i=n-e;if(!(i<2)){var a=0;if(i<t2){a=e2(r,e,n,t),r2(r,e,n,e+a,t);return}var o=d7(r,t),s=f7(i);do{if(a=e2(r,e,n,t),a<s){var l=i;l>s&&(l=s),r2(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var yn=1,Jc=2,iu=4,n2=!1;function o_(){n2||(n2=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function i2(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var v7=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=i2}return r.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(e),n},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,a=e.length;i<a;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,Iv(n,i2)},r.prototype._updateAndAddDisplayable=function(t,e,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e?e=e.slice():e=[];for(var a=i,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=yn),this._updateAndAddDisplayable(u,e,n)}t.__dirty=0}else{var c=t;e&&e.length?c.__clipPaths=e:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(o_(),c.z=0),isNaN(c.z2)&&(o_(),c.z2=0),isNaN(c.zlevel)&&(o_(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},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,n=t.length;e<n;e++)this.delRoot(t[e]);return}var i=Bt(this._roots,t);i>=0&&this._roots.splice(i,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}(),p7=v7,a2;a2=Yt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var s_=a2,Ov={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,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*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)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.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-Ov.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Ov.bounceIn(r*2)*.5:Ov.bounceOut(r*2-1)*.5+.5}},o2=Ov,Ev=Math.pow,oo=Math.sqrt,Rv=1e-8,s2=1e-4,l2=oo(3),kv=1/3,Hi=ro(),kn=ro(),au=ro();function so(r){return r>-Rv&&r<Rv}function u2(r){return r>Rv||r<-Rv}function tr(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function c2(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function Nv(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(so(c)&&so(f))if(so(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var p=f*f-4*c*h;if(so(p)){var g=f/c,v=-s/o+g,m=-g/2;v>=0&&v<=1&&(a[d++]=v),m>=0&&m<=1&&(a[d++]=m)}else if(p>0){var y=oo(p),_=c*s+1.5*o*(-f+y),b=c*s+1.5*o*(-f-y);_<0?_=-Ev(-_,kv):_=Ev(_,kv),b<0?b=-Ev(-b,kv):b=Ev(b,kv);var v=(-s-(_+b))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var S=(2*c*s-3*o*f)/(2*oo(c*c*c)),x=Math.acos(S)/3,w=oo(c),C=Math.cos(x),v=(-s-2*w*C)/(3*o),m=(-s+w*(C+l2*Math.sin(x)))/(3*o),T=(-s+w*(C-l2*Math.sin(x)))/(3*o);v>=0&&v<=1&&(a[d++]=v),m>=0&&m<=1&&(a[d++]=m),T>=0&&T<=1&&(a[d++]=T)}}return d}function f2(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(so(o)){if(u2(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(so(c))i[0]=-a/(2*o);else if(c>0){var f=oo(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function lo(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,l=(n-e)*i+e,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function h2(r,t,e,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,v,p,g,m;Hi[0]=l,Hi[1]=u;for(var y=0;y<1;y+=.05)kn[0]=tr(r,e,i,o,y),kn[1]=tr(t,n,a,s,y),g=io(Hi,kn),g<d&&(f=y,d=g);d=1/0;for(var _=0;_<32&&!(h<s2);_++)v=f-h,p=f+h,kn[0]=tr(r,e,i,o,v),kn[1]=tr(t,n,a,s,v),g=io(kn,Hi),v>=0&&g<d?(f=v,d=g):(au[0]=tr(r,e,i,o,p),au[1]=tr(t,n,a,s,p),m=io(au,Hi),p<=1&&m<d?(f=p,d=m):h*=.5);return c&&(c[0]=tr(r,e,i,o,f),c[1]=tr(t,n,a,s,f)),oo(d)}function g7(r,t,e,n,i,a,o,s,l){for(var u=r,c=t,f=0,h=1/l,d=1;d<=l;d++){var v=d*h,p=tr(r,e,i,o,v),g=tr(t,n,a,s,v),m=p-u,y=g-c;f+=Math.sqrt(m*m+y*y),u=p,c=g}return f}function lr(r,t,e,n){var i=1-n;return i*(i*r+2*n*t)+n*n*e}function l_(r,t,e,n){return 2*((1-n)*(t-r)+n*(e-t))}function m7(r,t,e,n,i){var a=r-2*t+e,o=2*(t-r),s=r-n,l=0;if(so(a)){if(u2(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(so(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=oo(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function d2(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function tf(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function v2(r,t,e,n,i,a,o,s,l){var u,c=.005,f=1/0;Hi[0]=o,Hi[1]=s;for(var h=0;h<1;h+=.05){kn[0]=lr(r,e,i,h),kn[1]=lr(t,n,a,h);var d=io(Hi,kn);d<f&&(u=h,f=d)}f=1/0;for(var v=0;v<32&&!(c<s2);v++){var p=u-c,g=u+c;kn[0]=lr(r,e,i,p),kn[1]=lr(t,n,a,p);var d=io(kn,Hi);if(p>=0&&d<f)u=p,f=d;else{au[0]=lr(r,e,i,g),au[1]=lr(t,n,a,g);var m=io(au,Hi);g<=1&&m<f?(u=g,f=m):c*=.5}}return l&&(l[0]=lr(r,e,i,u),l[1]=lr(t,n,a,u)),oo(f)}function y7(r,t,e,n,i,a,o){for(var s=r,l=t,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,d=lr(r,e,i,h),v=lr(t,n,a,h),p=d-s,g=v-l;u+=Math.sqrt(p*p+g*g),s=d,l=v}return u}var _7=/cubic-bezier\(([0-9,\.e ]+)\)/;function u_(r){var t=r&&_7.exec(r);if(t){var e=t[1].split(","),n=+On(e[0]),i=+On(e[1]),a=+On(e[2]),o=+On(e[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Nv(0,n,a,1,l,s)&&tr(0,i,o,1,s[0])}}}var b7=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||Fe,this.ondestroy=t.ondestroy||Fe,this.onrestart=t.onrestart||Fe,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 n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;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=i%n;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)?t:o2[t]||u_(t)},r}(),x7=b7,p2=function(){function r(t){this.value=t}return r}(),S7=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new p2(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,n=t.next;e?e.next=n:this.head=n,n?n.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}(),w7=function(){function r(t){this._list=new S7,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new p2(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),ef=w7,g2={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 di(r){return r=Math.round(r),r<0?0:r>255?255:r}function C7(r){return r=Math.round(r),r<0?0:r>360?360:r}function rf(r){return r<0?0:r>1?1:r}function c_(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?di(parseFloat(t)/100*255):di(parseInt(t,10))}function bs(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?rf(parseFloat(t)/100):rf(parseFloat(t))}function f_(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 uo(r,t,e){return r+(t-r)*e}function Nn(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function h_(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var m2=new ef(20),Bv=null;function ou(r,t){Bv&&h_(Bv,t),Bv=m2.put(r,Bv||t.slice())}function Hr(r,t){if(!!r){t=t||[];var e=m2.get(r);if(e)return h_(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in g2)return h_(t,g2[n]),ou(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Nn(t,0,0,0,1);return}return Nn(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),ou(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Nn(t,0,0,0,1);return}return Nn(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ou(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Nn(t,+u[0],+u[1],+u[2],1):Nn(t,0,0,0,1);c=bs(u.pop());case"rgb":if(u.length>=3)return Nn(t,c_(u[0]),c_(u[1]),c_(u[2]),u.length===3?c:bs(u[3])),ou(r,t),t;Nn(t,0,0,0,1);return;case"hsla":if(u.length!==4){Nn(t,0,0,0,1);return}return u[3]=bs(u[3]),d_(u,t),ou(r,t),t;case"hsl":if(u.length!==3){Nn(t,0,0,0,1);return}return d_(u,t),ou(r,t),t;default:return}}Nn(t,0,0,0,1)}}function d_(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=bs(r[1]),i=bs(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Nn(t,di(f_(o,a,e+1/3)*255),di(f_(o,a,e)*255),di(f_(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function T7(r){if(!!r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,i=Math.min(t,e,n),a=Math.max(t,e,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-t)/6+o/2)/o,f=((a-e)/6+o/2)/o,h=((a-n)/6+o/2)/o;t===a?l=h-f:e===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function zv(r,t){var e=Hr(r);if(e){for(var n=0;n<3;n++)t<0?e[n]=e[n]*(1-t)|0:e[n]=(255-e[n])*t+e[n]|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return vi(e,e.length===4?"rgba":"rgb")}}function M7(r){var t=Hr(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function nf(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return e[0]=di(uo(o[0],s[0],l)),e[1]=di(uo(o[1],s[1],l)),e[2]=di(uo(o[2],s[2],l)),e[3]=rf(uo(o[3],s[3],l)),e}}var D7=nf;function v_(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Hr(t[i]),s=Hr(t[a]),l=n-i,u=vi([di(uo(o[0],s[0],l)),di(uo(o[1],s[1],l)),di(uo(o[2],s[2],l)),rf(uo(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var A7=v_;function su(r,t,e,n){var i=Hr(r);if(r)return i=T7(i),t!=null&&(i[0]=C7(t)),e!=null&&(i[1]=bs(e)),n!=null&&(i[2]=bs(n)),vi(d_(i),"rgba")}function af(r,t){var e=Hr(r);if(e&&t!=null)return e[3]=rf(t),vi(e,"rgba")}function vi(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 of(r,t){var e=Hr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function P7(){return vi([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var L7=Object.freeze(Object.defineProperty({__proto__:null,parse:Hr,lift:zv,toHex:M7,fastLerp:nf,fastMapToColor:D7,lerp:v_,mapToColor:A7,modifyHSL:su,modifyAlpha:af,stringify:vi,lum:of,random:P7},Symbol.toStringTag,{value:"Module"})),Fv=Math.round;function sf(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Hr(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t==null?1:t}}var y2=1e-4;function co(r){return r<y2&&r>-y2}function Vv(r){return Fv(r*1e3)/1e3}function p_(r){return Fv(r*1e4)/1e4}function I7(r){return"matrix("+Vv(r[0])+","+Vv(r[1])+","+Vv(r[2])+","+Vv(r[3])+","+p_(r[4])+","+p_(r[5])+")"}var O7={left:"start",right:"end",center:"middle",middle:"middle"};function E7(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function R7(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function k7(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function _2(r){return r&&!!r.image}function N7(r){return r&&!!r.svgElement}function g_(r){return _2(r)||N7(r)}function b2(r){return r.type==="linear"}function x2(r){return r.type==="radial"}function S2(r){return r&&(r.type==="linear"||r.type==="radial")}function Hv(r){return"url(#"+r+")"}function w2(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function C2(r){var t=r.x||0,e=r.y||0,n=(r.rotation||0)*Gc,i=Et(r.scaleX,1),a=Et(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+Fv(o*Gc)+"deg, "+Fv(s*Gc)+"deg)"),l.join(" ")}var B7=function(){return Yt.hasGlobalWindow&&_t(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),m_=Array.prototype.slice;function wa(r,t,e){return(t-r)*e+r}function y_(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=wa(t[a],e[a],n);return r}function z7(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=wa(t[o][s],e[o][s],n)}return r}function $v(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=t[a]+e[a]*n;return r}function T2(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*n}return r}function F7(r,t){for(var e=r.length,n=t.length,i=e>n?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function V7(r,t,e){var n=r,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(e===1?i[l]:m_.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(e===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function lf(r){if(mr(r)){var t=r.length;if(mr(r[0])){for(var e=[],n=0;n<t;n++)e.push(m_.call(r[n]));return e}return m_.call(r)}return r}function Wv(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 H7(r){return mr(r&&r[0])?2:1}var Gv=0,Uv=1,M2=2,uf=3,__=4,b_=5,D2=6;function A2(r){return r===__||r===b_}function Yv(r){return r===Uv||r===M2}var cf=[0,0,0,0],$7=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,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=D2,l=e;if(mr(e)){var u=H7(e);s=u,(u===1&&!qt(e[0])||u===2&&!qt(e[0][0]))&&(o=!0)}else if(qt(e)&&!eu(e))s=Gv;else if(ct(e))if(!isNaN(+e))s=Gv;else{var c=Hr(e);c&&(l=c,s=uf)}else if(Vc(e)){var f=K({},l);f.colorStops=J(e.colorStops,function(d){return{offset:d.offset,color:Hr(d.color)}}),b2(e)?s=__:x2(e)&&(s=b_),l=f}a===0?this.valType=s:(s!==this.valType||s===D2)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=_t(n)?n:o2[n]||u_(n)),i.push(h),h},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Yv(i),u=A2(i),c=0;c<a;c++){var f=n[c],h=f.value,d=o.value;f.percent=f.time/t,s||(l&&c!==a-1?V7(h,d,i):u&&F7(h.colorStops,d.colorStops))}if(!s&&i!==b_&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var v=n[0].value,c=0;c<a;c++)i===Gv?n[c].additiveValue=n[c].value-v:i===uf?n[c].additiveValue=$v([],n[c].value,v,-1):Yv(i)&&(n[c].additiveValue=i===Uv?$v([],n[c].value,v,-1):T2([],n[c].value,v,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===uf,c,f=this._lastFr,h=Math.min,d,v;if(s===1)d=v=o[0];else{if(e<0)c=0;else if(e<this._lastFrP){var p=h(f+1,s-1);for(c=p;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)}v=o[c+1],d=o[c]}if(!!(d&&v)){this._lastFr=c,this._lastFrP=e;var g=v.percent-d.percent,m=g===0?1:h((e-d.percent)/g,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:u?cf:t[l];if((Yv(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?d.rawValue:v.rawValue;else if(Yv(a))a===Uv?y_(y,d[i],v[i],m):z7(y,d[i],v[i],m);else if(A2(a)){var _=d[i],b=v[i],S=a===__;t[l]={type:S?"linear":"radial",x:wa(_.x,b.x,m),y:wa(_.y,b.y,m),colorStops:J(_.colorStops,function(w,C){var T=b.colorStops[C];return{offset:wa(w.offset,T.offset,m),color:Wv(y_([],w.color,T.color,m))}}),global:b.global},S?(t[l].x2=wa(_.x2,b.x2,m),t[l].y2=wa(_.y2,b.y2,m)):t[l].r=wa(_.r,b.r,m)}else if(u)y_(y,d[i],v[i],m),n||(t[l]=Wv(y));else{var x=wa(d[i],v[i],m);n?this._additiveValue=x:t[l]=x}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===Gv?t[n]=t[n]+i:e===uf?(Hr(t[n],cf),$v(cf,cf,i,1),t[n]=Wv(cf)):e===Uv?$v(t[n],t[n],i,1):e===M2&&T2(t[n],t[n],i,1)},r}(),W7=function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){bv("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}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,n){return this.whenWithKeys(t,e,Ht(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new $7(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===uf&&u&&(u=Wv(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,lf(u),i),this._trackKeys.push(s)}l.addKeyframe(t,lf(e[s]),i)}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,n=0;n<e;n++)t[n].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 n=0;n<e.length;n++)e[n].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,n=[],i=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(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(e._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new x7({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){e._started=2;var v=e._additiveAnimators;if(v){for(var p=!1,g=0;g<v.length;g++)if(v[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(e._target,d);var m=e._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](e._target,d)},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 J(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=n[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<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,n){if(!!t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var a=e[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=lf(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||Ht(t);for(var n=0;n<e.length;n++){var i=e[n],a=this._tracks[i];if(!!a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}(),x_=W7;function lu(){return new Date().getTime()}var G7=function(r){Ce(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}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 n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(!!e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=lu()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(s_(n),!e._paused&&e.update())}s_(n)},t.prototype.start=function(){this._running||(this._time=lu(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=lu(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=lu()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new x_(e,n.loop);return this.addAnimator(i),i},t}(En),U7=G7,Y7=300,S_=Yt.domSupported,w_=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},n=J(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}}(),P2={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},L2=!1;function C_(r){var t=r.pointerType;return t==="pen"||t==="touch"}function q7(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 T_(r){r&&(r.zrByTouch=!0)}function j7(r,t){return Rn(r.dom,new X7(r,t),!0)}function I2(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var X7=function(){function r(t,e){this.stopPropagation=Fe,this.stopImmediatePropagation=Fe,this.preventDefault=Fe,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),pi={mousedown:function(r){r=Rn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Rn(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=Rn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Rn(this.dom,r);var t=r.toElement||r.relatedTarget;I2(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){L2=!0,r=Rn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){L2||(r=Rn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Rn(this.dom,r),T_(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),pi.mousemove.call(this,r),pi.mousedown.call(this,r)},touchmove:function(r){r=Rn(this.dom,r),T_(r),this.handler.processGesture(r,"change"),pi.mousemove.call(this,r)},touchend:function(r){r=Rn(this.dom,r),T_(r),this.handler.processGesture(r,"end"),pi.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Y7&&pi.click.call(this,r)},pointerdown:function(r){pi.mousedown.call(this,r)},pointermove:function(r){C_(r)||pi.mousemove.call(this,r)},pointerup:function(r){pi.mouseup.call(this,r)},pointerout:function(r){C_(r)||pi.mouseout.call(this,r)}};L(["click","dblclick","contextmenu"],function(r){pi[r]=function(t){t=Rn(this.dom,t),this.trigger(r,t)}});var M_={pointermove:function(r){C_(r)||M_.mousemove.call(this,r)},pointerup:function(r){M_.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 Z7(r,t){var e=t.domHandlers;Yt.pointerEventsSupported?L(w_.pointer,function(n){qv(t,n,function(i){e[n].call(r,i)})}):(Yt.touchEventsSupported&&L(w_.touch,function(n){qv(t,n,function(i){e[n].call(r,i),q7(t)})}),L(w_.mouse,function(n){qv(t,n,function(i){i=t_(i),t.touching||e[n].call(r,i)})}))}function K7(r,t){Yt.pointerEventsSupported?L(P2.pointer,e):Yt.touchEventsSupported||L(P2.mouse,e);function e(n){function i(a){a=t_(a),I2(r,a.target)||(a=j7(r,a),t.domHandlers[n].call(r,a))}qv(t,n,i,{capture:!0})}}function qv(r,t,e,n){r.mounted[t]=e,r.listenerOpts[t]=n,e_(r.domTarget,t,e,n)}function D_(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&J8(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var O2=function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r}(),Q7=function(r){Ce(t,r);function t(e,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new O2(e,pi),S_&&(i._globalHandlerScope=new O2(document,M_)),Z7(i,i._localHandlerScope),i}return t.prototype.dispose=function(){D_(this._localHandlerScope),S_&&D_(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,S_&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var n=this._globalHandlerScope;e?K7(this,n):D_(n)}},t}(En),J7=Q7,E2=1;Yt.hasGlobalWindow&&(E2=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var jv=E2,A_=.4,P_="#333",L_="#ccc",t9="#eee",R2=jc,k2=5e-5;function xs(r){return r>k2||r<-k2}var Ss=[],uu=[],I_=mn(),O_=Math.abs,e9=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(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 xs(this.rotation)||xs(this.x)||xs(this.y)||xs(this.scaleX-1)||xs(this.scaleY-1)||xs(this.skewX)||xs(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&R2(n);return}n=n||mn(),e?this.getLocalTransform(n):R2(n),t&&(e?Vi(n,t,n):Dv(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Ss);var n=Ss[0]<0?-1:1,i=Ss[1]<0?-1:1,a=((Ss[0]-n)*e+n)/Ss[0]||0,o=((Ss[1]-i)*e+i)/Ss[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||mn(),ps(this.invTransform,t)},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],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Vi(uu,t.invTransform,e),e=uu);var n=this.originX,i=this.originY;(n||i)&&(I_[4]=n,I_[5]=i,Vi(uu,e,I_),uu[4]-=n,uu[5]-=i,e=uu),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 n=[t,e],i=this.invTransform;return i&&sr(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&sr(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&O_(t[0]-1)>1e-10&&O_(t[3]-1)>1e-10?Math.sqrt(O_(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){N2(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=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,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,p=i+l;e[4]=-v*a-h*p*o,e[5]=-p*o-d*v*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=d*a,e[2]=h*o,u&&ao(e,e,u),e[4]+=n+c,e[5]+=i+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}(),$i=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function N2(r,t){for(var e=0;e<$i.length;e++){var n=$i[e];r[n]=t[n]}}var Ca=e9,B2={};function _n(r,t){t=t||eo;var e=B2[t];e||(e=B2[t]=new ef(500));var n=e.get(r);return n==null&&(n=fi.measureText(r,t).width,e.put(r,n)),n}function z2(r,t,e,n){var i=_n(r,t),a=Xv(t),o=hf(0,i,e),s=cu(0,a,n),l=new kt(o,s,i,a);return l}function ff(r,t,e,n){var i=((r||"")+"").split(`
|
|
185
|
+
`),a=i.length;if(a===1)return z2(i[0],t,e,n);for(var o=new kt(0,0,0,0),s=0;s<i.length;s++){var l=z2(i[s],t,e,n);s===0?o.copy(l):o.union(l)}return o}function hf(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function cu(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Xv(r){return _n("\u56FD",r)}function gi(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Zv(r,t,e){var n=t.position||"inside",i=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(n instanceof Array)l+=gi(n[0],e.width),u+=gi(n[1],e.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var E_="__zr_normal__",R_=$i.concat(["ignore"]),r9=In($i,function(r,t){return r[t]=!0,r},{ignore:!1}),fu={},n9=new kt(0,0,0,0),k_=function(){function r(t){this.id=$0(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[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 n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(e),n.position!=null){var c=n9;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(fu,n,c):Zv(fu,n,c),a.x=fu.x,a.y=fu.y,o=fu.align,s=fu.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,d=void 0;f==="center"?(h=c.width*.5,d=c.height*.5):(h=gi(f[0],c.width),d=gi(f[1],c.height)),u=!0,a.originX=-a.x+h+(i?0:c.x),a.originY=-a.y+d+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=yn,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()?L_:P_},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&Hr(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,vi(n,"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||{},K(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(xt(t))for(var n=t,i=Ht(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==E_)){var o=i.targetName,s=o?e[o]:e;i.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,R_)},r.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var a=n[i];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(E_,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===E_,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Bt(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){bv("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(t,e,n,c),h&&h.useState(t,e,n,c),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~yn),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],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&&i.push(c)}var f=i[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&v&&v.duration>0,v);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,h),g&&g.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~yn)}},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=Bt(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=Bt(i,t),o=Bt(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i<t.length;i++){var a=t[i];K(e,a),a.textConfig&&(n=n||{},K(n,a.textConfig))}return n&&(e.textConfig=n),e},r.prototype._applyStateObj=function(t,e,n,i,a,o){var s=!(e&&i);e&&e.textConfig?(this.textConfig=K({},i?this.textConfig:n.textConfig),K(this.textConfig,e.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<R_.length;c++){var f=R_[c],h=a&&r9[f];e&&e[f]!=null?h?(u=!0,l[f]=e[f]):this[f]=e[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],v=d.targetName;d.getLoop()||d.__changeFinalValue(v?(e||n)[v]:e||n)}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 Ca,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),K(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|=yn;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);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 n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,n){var i=t?this[t]:this,a=new x_(i,e,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var a=i.animators,o=Bt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,n){N_(this,t,e,n)},r.prototype.animateFrom=function(t,e,n){N_(this,t,e,n,!0)},r.prototype._transitionState=function(t,e,n,i){for(var a=N_(this,e,n,i),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.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=yn;function e(n,i,a,o){Object.defineProperty(t,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),r}();ze(k_,En),ze(k_,Ca);function N_(r,t,e,n,i){e=e||{};var a=[];F2(r,"",r,t,e,n,a,i);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(v,p){e.during(p)});for(var h=0;h<a.length;h++){var d=a[h];c&&d.done(c),f&&d.aborted(f),e.force&&d.duration(e.duration),d.start(e.easing)}return a}function B_(r,t,e){for(var n=0;n<e;n++)r[n]=t[n]}function i9(r){return mr(r[0])}function a9(r,t,e){if(mr(t[e]))if(mr(r[e])||(r[e]=[]),tn(t[e])){var n=t[e].length;r[e].length!==n&&(r[e]=new t[e].constructor(n),B_(r[e],t[e],n))}else{var i=t[e],a=r[e],o=i.length;if(i9(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?B_(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else B_(a,i,o);a.length=i.length}else r[e]=t[e]}function o9(r,t){return r===t||mr(r)&&mr(t)&&s9(r,t)}function s9(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function F2(r,t,e,n,i,a,o,s){for(var l=Ht(n),u=i.duration,c=i.delay,f=i.additive,h=i.setToFinal,d=!xt(a),v=r.animators,p=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&e[m]!=null&&(d||a[m]))if(xt(y)&&!mr(y)&&!Vc(y)){if(t){s||(e[m]=y,r.updateDuringAnimation(t));continue}F2(r,m,e[m],y,i,a&&a[m],o,s)}else p.push(m);else s||(e[m]=y,r.updateDuringAnimation(t),p.push(m))}var _=p.length;if(!f&&_)for(var b=0;b<v.length;b++){var S=v[b];if(S.targetName===t){var x=S.stopTracks(p);if(x){var w=Bt(v,S);v.splice(w,1)}}}if(i.force||(p=ae(p,function(A){return!o9(n[A],e[A])}),_=p.length),_>0||i.force&&!o.length){var C=void 0,T=void 0,D=void 0;if(s){T={},h&&(C={});for(var b=0;b<_;b++){var m=p[b];T[m]=e[m],h?C[m]=n[m]:e[m]=n[m]}}else if(h){D={};for(var b=0;b<_;b++){var m=p[b];D[m]=lf(e[m]),a9(e,n,m)}}var S=new x_(e,!1,!1,f?ae(v,function(P){return P.targetName===t}):null);S.targetName=t,i.scope&&(S.scope=i.scope),h&&C&&S.whenWithKeys(0,C,p),D&&S.whenWithKeys(0,D,p),S.whenWithKeys(u==null?500:u,s?T:n,p).delay(c||0),r.addAnimator(S,t),o.push(S)}}var V2=k_,H2=function(r){Ce(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}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 n=this._children,i=0;i<n.length;i++)if(n[i].name===e)return n[i]},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,n){if(e&&e!==this&&e.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=Bt(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=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 n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=Bt(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i<e.length;i++){var a=e[i];n&&a.removeSelfFromZr(n),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];e.call(n,o,a)}return this},t.prototype.traverse=function(e,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=e.call(n,a);a.isGroup&&!o&&a.traverse(e,n)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var n=new kt(0,0,0,0),i=e||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(kt.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t}(V2);H2.prototype.type="group";var Dt=H2;/*!
|
|
186
|
+
* ZRender, a high performance 2d drawing library.
|
|
187
|
+
*
|
|
188
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
189
|
+
* All rights reserved.
|
|
190
|
+
*
|
|
191
|
+
* LICENSE
|
|
192
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
193
|
+
*/var Kv={},ws={};function l9(r){delete ws[r]}function u9(r){if(!r)return!1;if(typeof r=="string")return of(r,1)<A_;if(r.colorStops){for(var t=r.colorStops,e=0,n=t.length,i=0;i<n;i++)e+=of(t[i].color,1);return e/=n,e<A_}return!1}var c9=function(){function r(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new p7,o=n.renderer||"canvas";Kv[o]||(o=Ht(Kv)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Kv[o](e,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Yt.node&&!Yt.worker&&!l?new J7(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Yt.touchEventsSupported:!!c,h=44,d;f&&(d=Et(n.pointerSize,h)),this.handler=new c7(a,s,u,s.root,d),this.animation=new U7({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},r.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=u9(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){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},r.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},r.prototype.flush=function(){this._flush(!1)},r.prototype._flush=function(t){var e,n=lu();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=lu();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):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.animation.start(),this._stillFrameAccum=0},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},r.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},r.prototype.clearAnimation=function(){this.animation.clear()},r.prototype.getWidth=function(){return this.painter.getWidth()},r.prototype.getHeight=function(){return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this.handler.off(t,e)},r.prototype.trigger=function(t,e){this.handler.trigger(t,e)},r.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Dt&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},r.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,l9(this.id)},r}();function z_(r,t){var e=new c9($0(),r,t);return ws[e.id]=e,e}function f9(r){r.dispose()}function h9(){for(var r in ws)ws.hasOwnProperty(r)&&ws[r].dispose();ws={}}function d9(r){return ws[r]}function $2(r,t){Kv[r]=t}var v9="5.4.1",p9=Object.freeze(Object.defineProperty({__proto__:null,init:z_,dispose:f9,disposeAll:h9,getInstance:d9,registerPainter:$2,version:v9},Symbol.toStringTag,{value:"Module"})),W2=1e-4,G2=20;function g9(r){return r.replace(/^\s+|\s+$/g,"")}function oe(r,t,e,n){var i=t[0],a=t[1],o=e[0],s=e[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function at(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ct(r)?g9(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Ee(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),G2),r=(+r).toFixed(t),e?r:+r}function bn(r){return r.sort(function(t,e){return t-e}),r}function mi(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return U2(r)}function U2(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function F_(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function m9(r,t,e){if(!r[t])return 0;var n=Y2(r,e);return n[t]||0}function Y2(r,t){var e=In(r,function(d,v){return d+(isNaN(v)?0:v)},0);if(e===0)return[];for(var n=Math.pow(10,t),i=J(r,function(d){return(isNaN(d)?0:d)/e*n*100}),a=n*100,o=J(i,function(d){return Math.floor(d)}),s=In(o,function(d,v){return d+v},0),l=J(i,function(d,v){return d-o[v]});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 J(o,function(d){return d/n})}function y9(r,t){var e=Math.max(mi(r),mi(t)),n=r+t;return e>G2?n:Ee(n,e)}var V_=9007199254740991;function H_(r){var t=Math.PI*2;return(r%t+t)%t}function df(r){return r>-W2&&r<W2}var _9=/^(?:(\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 xn(r){if(r instanceof Date)return r;if(ct(r)){var t=_9.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(Math.round(r))}function q2(r){return Math.pow(10,Qv(r))}function Qv(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function $_(r,t){var e=Qv(r),n=Math.pow(10,e),i=r/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Jv(r,t){var e=(r.length-1)*t+1,n=Math.floor(e),i=+r[n-1],a=e-n;return a?i+a*(r[n]-i):i}function W_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,n=0;n<r.length;){for(var i=r[n].interval,a=r[n].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-e),t=i[o],e=a[o];i[0]===i[1]&&a[0]*a[1]!==1?r.splice(n,1):n++}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 Wi(r){var t=parseFloat(r);return t==r&&(t!==0||!ct(r)||r.indexOf("x")<=0)?t:NaN}function G_(r){return!isNaN(Wi(r))}function j2(){return Math.round(Math.random()*9)}function X2(r,t){return t===0?r:X2(t,r%t)}function Z2(r,t){return r==null?t:t==null?r:r*t/X2(r,t)}var b9="[ECharts] ",K2={},x9=typeof console!="undefined"&&console.warn&&console.log;function S9(r,t,e){if(x9){if(e){if(K2[t])return;K2[t]=!0}console[r](b9+t)}}function N1t(r,t){S9("warn",r,t)}function ie(r){throw new Error(r)}function Q2(r,t,e){return(t-r)*e+r}var J2="series\0",tA="\0_ec_\0";function ce(r){return r instanceof Array?r:r==null?[]:[r]}function Cs(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,i=e.length;n<i;n++){var a=e[n];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var eA=["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 hu(r){return xt(r)&&!Q(r)&&!(r instanceof Date)?r.value:r}function w9(r){return xt(r)&&!(r instanceof Array)}function rA(r,t,e){var n=e==="normalMerge",i=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=yt();L(t,function(l,u){if(!xt(l)){t[u]=null;return}});var s=C9(r,o,e);return(n||i)&&T9(s,r,o,t),n&&M9(s,t),n||i?D9(s,t,i):a&&A9(s,t),P9(s),s}function C9(r,t,e){var n=[];if(e==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:e==="replaceMerge"||pf(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function T9(r,t,e,n){L(n,function(i,a){if(!(!i||i.id==null)){var o=vf(i.id),s=e.get(o);if(s!=null){var l=r[s];Mr(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function M9(r,t){L(t,function(e,n){if(!(!e||e.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||e.id==null)&&!pf(e)&&!pf(a)&&nA("name",a,e)){r[i].newOption=e,t[n]=null;return}}})}function D9(r,t,e){L(t,function(n){if(!!n){for(var i,a=0;(i=r[a])&&(i.newOption||pf(i.existing)||i.existing&&n.id!=null&&!nA("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=e):r.push({newOption:n,brandNew:e,existing:null,keyInfo:null}),a++}})}function A9(r,t){L(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function P9(r){var t=yt();L(r,function(e){var n=e.existing;n&&t.set(n.id,e)}),L(r,function(e){var n=e.newOption;Mr(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),L(r,function(e,n){var i=e.existing,a=e.newOption,o=e.keyInfo;if(!!xt(a)){if(o.name=a.name!=null?vf(a.name):i?i.name:J2+n,i)o.id=vf(i.id);else if(a.id!=null)o.id=vf(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 nA(r,t,e){var n=Xe(t[r],null),i=Xe(e[r],null);return n!=null&&i!=null&&n===i}function vf(r){return Xe(r,"")}function Xe(r,t){return r==null?t:ct(r)?r:qt(r)||Sv(r)?r+"":t}function U_(r){var t=r.name;return!!(t&&t.indexOf(J2))}function pf(r){return r&&r.id!=null&&vf(r.id).indexOf(tA)===0}function L9(r){return tA+r}function I9(r,t,e){L(r,function(n){var i=n.newOption;xt(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=O9(t,i,n.existing,e))})}function O9(r,t,e,n){var i=t.type?t.type:e?e.subType:n.determineSubType(r,t);return i}function E9(r,t){var e={},n={};return i(r||[],e),i(t||[],n,e),[a(e),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=Xe(o[u].seriesId,null);if(f==null)return;for(var h=ce(o[u].dataIndex),d=l&&l[f],v=0,p=h.length;v<p;v++){var g=h[v];d&&d[g]?d[g]=null:(s[f]||(s[f]={}))[g]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Ts(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return Q(t.dataIndex)?J(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return Q(t.name)?J(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function jt(){var r="__ec_inner_"+R9++;return function(t){return t[r]||(t[r]={})}}var R9=j2();function gf(r,t,e){var n=Y_(t,e),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=e?e.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=mf(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 Y_(r,t){var e;if(ct(r)){var n={};n[r+"Index"]=0,e=n}else e=r;var i=yt(),a={},o=!1;return L(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&&Bt(t.includeMainTypes,c)<0)){o=o||!!c;var h=i.get(c)||i.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Ye={useDefault:!0,enableAll:!1,enableNone:!1},k9={useDefault:!1,enableAll:!0,enableNone:!0};function mf(r,t,e,n){n=n||Ye;var i=e.index,a=e.id,o=e.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(t))?[l]:[],s}return i==="none"||i===!1?(Mr(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(Mr(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=r.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function iA(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function N9(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function B9(r){return r==="auto"?Yt.domSupported?"html":"richText":r||"html"}function q_(r,t){var e=yt(),n=[];return L(r,function(i){var a=t(i);(e.get(a)||(n.push(a),e.set(a,[]))).push(i)}),{keys:n,buckets:e}}function aA(r,t,e,n,i){var a=t==null||t==="auto";if(n==null)return n;if(qt(n)){var o=Q2(e||0,n,i);return Ee(o,a?Math.max(mi(e||0),mi(n)):t)}else{if(ct(n))return i<1?e:n;for(var s=[],l=e,u=n,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]=(i<1&&l?l:u)[f];else{var d=l&&l[f]?l[f]:0,v=u[f],o=Q2(d,v,i);s[f]=Ee(o,a?Math.max(mi(d),mi(v)):t)}}return s}}var z9=".",Ms="___EC__COMPONENT__CONTAINER___",oA="___EC__EXTENDED_CLASS___";function Gi(r){var t={main:"",sub:""};if(r){var e=r.split(z9);t.main=e[0]||"",t.sub=e[1]||""}return t}function F9(r){Mr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function V9(r){return!!(r&&r[oA])}function j_(r,t){r.$constructor=r,r.extend=function(e){var n=this,i;return H9(n)?i=function(a){q(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(e.$constructor||n).apply(this,arguments)},W0(i,this)),K(i.prototype,e),i[oA]=!0,i.extend=this.extend,i.superCall=G9,i.superApply=U9,i.superClass=n,i}}function H9(r){return _t(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function sA(r,t){r.extend=t.extend}var $9=Math.round(Math.random()*10);function W9(r){var t=["__\0is_clz",$9++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function G9(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return this.superClass.prototype[t].apply(r,e)}function U9(r,t,e){return this.superClass.prototype[t].apply(r,e)}function tp(r){var t={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){F9(i),n.prototype.type=i;var a=Gi(i);if(!a.sub)t[a.main]=n;else if(a.sub!==Ms){var o=e(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=t[n];if(o&&o[Ms]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var i=Gi(n),a=[],o=t[i.main];return o&&o[Ms]?L(o,function(s,l){l!==Ms&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=Gi(n);return!!t[i.main]},r.getAllClassMainTypes=function(){var n=[];return L(t,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=Gi(n),a=t[i.main];return a&&a[Ms]};function e(n){var i=t[n.main];return(!i||!i[Ms])&&(i=t[n.main]={},i[Ms]=!0),i}}function Ds(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&Bt(i,l)>=0||a&&Bt(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Y9=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],q9=Ds(Y9),j9=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return q9(this,t,e)},r}(),X_=new ef(50);function X9(r){if(typeof r=="string"){var t=X_.get(r);return t&&t.image}else return r}function Z_(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=X_.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!ep(t)&&a.pending.push(o)):(t=fi.loadImage(r,lA,lA),t.__zrImageSrc=r,X_.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function lA(){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],n=e.cb;n&&n(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function ep(r){return r&&r.width&&r.height}var K_=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function uA(r,t,e,n,i){if(!t)return"";var a=(r+"").split(`
|
|
194
|
+
`);i=cA(t,e,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=fA(a[o],i);return a.join(`
|
|
195
|
+
`)}function cA(r,t,e,n){n=n||{};var i=K({},n);i.font=t,e=Et(e,"..."),i.maxIterations=Et(n.maxIterations,2);var a=i.minChar=Et(n.minChar,0);i.cnCharWidth=_n("\u56FD",t);var o=i.ascCharWidth=_n("a",t);i.placeholder=Et(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=_n(e,t);return u>s&&(e="",u=0),s=r-u,i.ellipsis=e,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function fA(r,t){var e=t.containerWidth,n=t.font,i=t.contentWidth;if(!e)return"";var a=_n(r,n);if(a<=e)return r;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?Z9(r,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(r.length*i/a):0;r=r.substr(0,s),a=_n(r,n)}return r===""&&(r=t.placeholder),r}function Z9(r,t,e,n){for(var i=0,a=0,o=r.length;a<o&&i<t;a++){var s=r.charCodeAt(a);i+=0<=s&&s<=127?e:n}return a}function K9(r,t){r!=null&&(r+="");var e=t.overflow,n=t.padding,i=t.font,a=e==="truncate",o=Xv(i),s=Et(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",c=t.width,f;c!=null&&(e==="break"||e==="breakAll")?f=r?dA(r,t.font,c,e==="breakAll",0).lines:[]:f=r?r.split(`
|
|
196
|
+
`):[];var h=f.length*s,d=Et(t.height,h);if(h>d&&u){var v=Math.floor(d/s);f=f.slice(0,v)}if(r&&a&&c!=null)for(var p=cA(c,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<f.length;g++)f[g]=fA(f[g],p);for(var m=d,y=0,g=0;g<f.length;g++)y=Math.max(_n(f[g],i),y);c==null&&(c=y);var _=y;return n&&(m+=n[0]+n[2],_+=n[1]+n[3],c+=n[1]+n[3]),l&&(_=c),{lines:f,height:d,outerWidth:_,outerHeight:m,lineHeight:s,calculatedLineHeight:o,contentWidth:y,contentHeight:h,width:c}}var Q9=function(){function r(){}return r}(),hA=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),J9=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return r}();function t6(r,t){var e=new J9;if(r!=null&&(r+=""),!r)return e;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=K_.lastIndex=0,l;(l=K_.exec(r))!=null;){var u=l.index;u>s&&Q_(e,r.substring(s,u),t,o),Q_(e,l[2],t,o,l[1]),s=K_.lastIndex}s<r.length&&Q_(e,r.substring(s,r.length),t,o);var c=[],f=0,h=0,d=t.padding,v=a==="truncate",p=t.lineOverflow==="truncate";function g(B,Y,W){B.width=Y,B.lineHeight=W,f+=W,h=Math.max(h,Y)}t:for(var m=0;m<e.lines.length;m++){for(var y=e.lines[m],_=0,b=0,S=0;S<y.tokens.length;S++){var x=y.tokens[S],w=x.styleName&&t.rich[x.styleName]||{},C=x.textPadding=w.padding,T=C?C[1]+C[3]:0,D=x.font=w.font||t.font;x.contentHeight=Xv(D);var A=Et(w.height,x.contentHeight);if(x.innerHeight=A,C&&(A+=C[0]+C[2]),x.height=A,x.lineHeight=zi(w.lineHeight,t.lineHeight,A),x.align=w&&w.align||t.align,x.verticalAlign=w&&w.verticalAlign||"middle",p&&i!=null&&f+x.lineHeight>i){S>0?(y.tokens=y.tokens.slice(0,S),g(y,b,_),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m);break t}var P=w.width,I=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")x.percentWidth=P,c.push(x),x.contentWidth=_n(x.text,D);else{if(I){var O=w.backgroundColor,E=O&&O.image;E&&(E=X9(E),ep(E)&&(x.width=Math.max(x.width,E.width*A/E.height)))}var R=v&&n!=null?n-b:null;R!=null&&R<x.width?!I||R<T?(x.text="",x.width=x.contentWidth=0):(x.text=uA(x.text,R-T,D,t.ellipsis,{minChar:t.truncateMinChar}),x.width=x.contentWidth=_n(x.text,D)):x.contentWidth=_n(x.text,D)}x.width+=T,b+=x.width,w&&(_=Math.max(_,x.lineHeight))}g(y,b,_)}e.outerWidth=e.width=Et(n,h),e.outerHeight=e.height=Et(i,f),e.contentHeight=f,e.contentWidth=h,d&&(e.outerWidth+=d[1]+d[3],e.outerHeight+=d[0]+d[2]);for(var m=0;m<c.length;m++){var x=c[m],z=x.percentWidth;x.width=parseInt(z,10)/100*e.width}return e}function Q_(r,t,e,n,i){var a=t==="",o=i&&e.rich[i]||{},s=r.lines,l=o.font||e.font,u=!1,c,f;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var v=gi(o.width,n.width)+d;s.length>0&&v+n.accumWidth>n.width&&(c=t.split(`
|
|
197
|
+
`),u=!0),n.accumWidth=v}else{var p=dA(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+d,f=p.linesWidths,c=p.lines}}else c=t.split(`
|
|
198
|
+
`);for(var g=0;g<c.length;g++){var m=c[g],y=new Q9;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=f?f[g]:_n(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new hA)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=y:(m||!b||a)&&_.push(y)}else s.push(new hA([y]))}}function e6(r){var t=r.charCodeAt(0);return t>=33&&t<=383}var r6=In(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function n6(r){return e6(r)?!!r6[r]:!0}function dA(r,t,e,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;f<r.length;f++){var h=r.charAt(f);if(h===`
|
|
199
|
+
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=_n(h,t),v=n?!1:!n6(h);if(a.length?c+d>e:i+c+d>e){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=d)):v?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}c+=d,v?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var J_="__zr_style_"+Math.round(Math.random()*10),As={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rp={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};As[J_]=!0;var vA=["z","z2","invisible"],i6=["invisible"],a6=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=Ht(e),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&o6(this,e,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){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,n){return this.rectContain(e,n)},t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.rectContain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new kt(0,0,0,0)),n?kt.applyTransform(e,i,n):e.copy(i),(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 kt(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,n){e!=="style"?r.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,n){return typeof e=="string"?this.style[e]=n:K(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Jc,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Jc)},t.prototype.styleUpdated=function(){this.__dirty&=~Jc},t.prototype.createStyle=function(e){return Wc(As,e)},t.prototype.useStyle=function(e){e[J_]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[J_]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,vA)},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=Ht(c),h=0;h<f.length;h++){var d=f[h];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var v=Ht(u),h=0;h<v.length;h++){var d=v[h];this.style[d]=this.style[d]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?i6:vA,h=0;h<p.length;h++){var d=p[h];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(e,n){return K(e,n),e},t.prototype.getAnimationStyleProps=function(){return rp},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=yn|Jc}(),t}(V2),tb=new kt(0,0,0,0),eb=new kt(0,0,0,0);function o6(r,t,e){return tb.copy(r.getBoundingRect()),r.transform&&tb.applyTransform(r.transform),eb.width=t,eb.height=e,!tb.intersect(eb)}var Bn=a6,en=Math.min,rn=Math.max,rb=Math.sin,nb=Math.cos,Ps=Math.PI*2,np=ro(),ip=ro(),ap=ro();function op(r,t,e){if(r.length!==0){for(var n=r[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],i=en(i,n[0]),a=rn(a,n[0]),o=en(o,n[1]),s=rn(s,n[1]);t[0]=i,t[1]=o,e[0]=a,e[1]=s}}function pA(r,t,e,n,i,a){i[0]=en(r,e),i[1]=en(t,n),a[0]=rn(r,e),a[1]=rn(t,n)}var gA=[],mA=[];function s6(r,t,e,n,i,a,o,s,l,u){var c=f2,f=tr,h=c(r,e,i,o,gA);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<h;d++){var v=f(r,e,i,o,gA[d]);l[0]=en(v,l[0]),u[0]=rn(v,u[0])}h=c(t,n,a,s,mA);for(var d=0;d<h;d++){var p=f(t,n,a,s,mA[d]);l[1]=en(p,l[1]),u[1]=rn(p,u[1])}l[0]=en(r,l[0]),u[0]=rn(r,u[0]),l[0]=en(o,l[0]),u[0]=rn(o,u[0]),l[1]=en(t,l[1]),u[1]=rn(t,u[1]),l[1]=en(s,l[1]),u[1]=rn(s,u[1])}function l6(r,t,e,n,i,a,o,s){var l=d2,u=lr,c=rn(en(l(r,e,i),1),0),f=rn(en(l(t,n,a),1),0),h=u(r,e,i,c),d=u(t,n,a,f);o[0]=en(r,i,h),o[1]=en(t,a,d),s[0]=rn(r,i,h),s[1]=rn(t,a,d)}function u6(r,t,e,n,i,a,o,s,l){var u=ba,c=xa,f=Math.abs(i-a);if(f%Ps<1e-4&&f>1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(np[0]=nb(i)*e+r,np[1]=rb(i)*n+t,ip[0]=nb(a)*e+r,ip[1]=rb(a)*n+t,u(s,np,ip),c(l,np,ip),i=i%Ps,i<0&&(i=i+Ps),a=a%Ps,a<0&&(a=a+Ps),i>a&&!o?a+=Ps:i<a&&o&&(i+=Ps),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(ap[0]=nb(d)*e+r,ap[1]=rb(d)*n+t,u(s,ap,s),c(l,ap,l))}var ge={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ls=[],Is=[],Ui=[],fo=[],Yi=[],qi=[],ib=Math.min,ab=Math.max,Os=Math.cos,Es=Math.sin,Ta=Math.abs,ob=Math.PI,ho=ob*2,sb=typeof Float32Array!="undefined",yf=[];function lb(r){var t=Math.round(r/ob*1e8)/1e8;return t%2*ob}function yA(r,t){var e=lb(r[0]);e<0&&(e+=ho);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=ho?i=e+ho:t&&e-i>=ho?i=e-ho:!t&&e>i?i=e+(ho-lb(e-i)):t&&e<i&&(i=e-(ho-lb(i-e))),r[0]=e,r[1]=i}var c6=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,n){n=n||0,n>0&&(this._ux=Ta(n/jv/t)||0,this._uy=Ta(n/jv/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(ge.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 n=Ta(t-this._xi),i=Ta(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(ge.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(ge.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(ge.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),yf[0]=i,yf[1]=a,yA(yf,o),i=yf[0],a=yf[1];var s=a-i;return this.addData(ge.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=Os(a)*n+t,this._yi=Es(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ge.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ge.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,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){var e=t.length;!(this.data&&this.data.length===e)&&sb&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,a=0;a<e;a++)n+=t[a].len();sb&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(t,e,n,i,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,sb&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Ui[0]=Ui[1]=Yi[0]=Yi[1]=Number.MAX_VALUE,fo[0]=fo[1]=qi[0]=qi[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],n=t[o+1],i=e,a=n),s){case ge.M:e=i=t[o++],n=a=t[o++],Yi[0]=i,Yi[1]=a,qi[0]=i,qi[1]=a;break;case ge.L:pA(e,n,t[o],t[o+1],Yi,qi),e=t[o++],n=t[o++];break;case ge.C:s6(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Yi,qi),e=t[o++],n=t[o++];break;case ge.Q:l6(e,n,t[o++],t[o++],t[o],t[o+1],Yi,qi),e=t[o++],n=t[o++];break;case ge.A:var u=t[o++],c=t[o++],f=t[o++],h=t[o++],d=t[o++],v=t[o++]+d;o+=1;var p=!t[o++];l&&(i=Os(d)*f+u,a=Es(d)*h+c),u6(u,c,f,h,d,v,p,Yi,qi),e=Os(v)*f+u,n=Es(v)*h+c;break;case ge.R:i=e=t[o++],a=n=t[o++];var g=t[o++],m=t[o++];pA(i,a,i+g,a+m,Yi,qi);break;case ge.Z:e=i,n=a;break}ba(Ui,Ui,Yi),xa(fo,fo,qi)}return o===0&&(Ui[0]=Ui[1]=fo[0]=fo[1]=0),new kt(Ui[0],Ui[1],fo[0]-Ui[0],fo[1]-Ui[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=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 d=t[h++],v=h===1;v&&(a=t[h],o=t[h+1],s=a,l=o);var p=-1;switch(d){case ge.M:a=s=t[h++],o=l=t[h++];break;case ge.L:{var g=t[h++],m=t[h++],y=g-a,_=m-o;(Ta(y)>n||Ta(_)>i||h===e-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case ge.C:{var b=t[h++],S=t[h++],g=t[h++],m=t[h++],x=t[h++],w=t[h++];p=g7(a,o,b,S,g,m,x,w,10),a=x,o=w;break}case ge.Q:{var b=t[h++],S=t[h++],g=t[h++],m=t[h++];p=y7(a,o,b,S,g,m,10),a=g,o=m;break}case ge.A:var C=t[h++],T=t[h++],D=t[h++],A=t[h++],P=t[h++],I=t[h++],O=I+P;h+=1,t[h++],v&&(s=Os(P)*D+C,l=Es(P)*A+T),p=ab(D,A)*ib(ho,Math.abs(I)),a=Os(O)*D+C,o=Es(O)*A+T;break;case ge.R:{s=a=t[h++],l=o=t[h++];var E=t[h++],R=t[h++];p=E*2+R*2;break}case ge.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=e<1,v,p,g=0,m=0,y,_=0,b,S;if(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,y=e*p,!y))return;t:for(var x=0;x<o;){var w=n[x++],C=x===1;switch(C&&(u=n[x],c=n[x+1],s=u,l=c),w!==ge.L&&_>0&&(t.lineTo(b,S),_=0),w){case ge.M:s=u=n[x++],l=c=n[x++],t.moveTo(u,c);break;case ge.L:{f=n[x++],h=n[x++];var T=Ta(f-u),D=Ta(h-c);if(T>i||D>a){if(d){var A=v[m++];if(g+A>y){var P=(y-g)/A;t.lineTo(u*(1-P)+f*P,c*(1-P)+h*P);break t}g+=A}t.lineTo(f,h),u=f,c=h,_=0}else{var I=T*T+D*D;I>_&&(b=f,S=h,_=I)}break}case ge.C:{var O=n[x++],E=n[x++],R=n[x++],z=n[x++],B=n[x++],Y=n[x++];if(d){var A=v[m++];if(g+A>y){var P=(y-g)/A;lo(u,O,R,B,P,Ls),lo(c,E,z,Y,P,Is),t.bezierCurveTo(Ls[1],Is[1],Ls[2],Is[2],Ls[3],Is[3]);break t}g+=A}t.bezierCurveTo(O,E,R,z,B,Y),u=B,c=Y;break}case ge.Q:{var O=n[x++],E=n[x++],R=n[x++],z=n[x++];if(d){var A=v[m++];if(g+A>y){var P=(y-g)/A;tf(u,O,R,P,Ls),tf(c,E,z,P,Is),t.quadraticCurveTo(Ls[1],Is[1],Ls[2],Is[2]);break t}g+=A}t.quadraticCurveTo(O,E,R,z),u=R,c=z;break}case ge.A:var W=n[x++],et=n[x++],V=n[x++],H=n[x++],G=n[x++],j=n[x++],tt=n[x++],nt=!n[x++],rt=V>H?V:H,vt=Ta(V-H)>.001,ft=G+j,lt=!1;if(d){var A=v[m++];g+A>y&&(ft=G+j*(y-g)/A,lt=!0),g+=A}if(vt&&t.ellipse?t.ellipse(W,et,V,H,tt,G,ft,nt):t.arc(W,et,rt,G,ft,nt),lt)break t;C&&(s=Os(G)*V+W,l=Es(G)*H+et),u=Os(ft)*V+W,c=Es(ft)*H+et;break;case ge.R:s=u=n[x],l=c=n[x+1],f=n[x++],h=n[x++];var mt=n[x++],At=n[x++];if(d){var A=v[m++];if(g+A>y){var Ct=y-g;t.moveTo(f,h),t.lineTo(f+ib(Ct,mt),h),Ct-=mt,Ct>0&&t.lineTo(f+mt,h+ib(Ct,At)),Ct-=At,Ct>0&&t.lineTo(f+ab(mt-Ct,0),h+At),Ct-=mt,Ct>0&&t.lineTo(f,h+ab(At-Ct,0));break t}g+=A}t.rect(f,h,mt,At);break;case ge.Z:if(d){var A=v[m++];if(g+A>y){var P=(y-g)/A;t.lineTo(u*(1-P)+s*P,c*(1-P)+l*P);break t}g+=A}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.CMD=ge,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}(),ji=c6;function vo(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-n)/(r-e),u=(r*n-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 f6(r,t,e,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>t+f&&c>n+f&&c>a+f&&c>s+f||c<t-f&&c<n-f&&c<a-f&&c<s-f||u>r+f&&u>e+f&&u>i+f&&u>o+f||u<r-f&&u<e-f&&u<i-f&&u<o-f)return!1;var h=h2(r,t,e,n,i,a,o,s,u,c,null);return h<=f/2}function _A(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>r+u&&s>e+u&&s>i+u||s<r-u&&s<e-u&&s<i-u)return!1;var c=v2(r,t,e,n,i,a,s,l,null);return c<=u/2}var bA=Math.PI*2;function po(r){return r%=bA,r<0&&(r+=bA),r}var _f=Math.PI*2;function h6(r,t,e,n,i,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(n-i)%_f<1e-4)return!0;if(a){var f=n;n=po(i),i=po(f)}else n=po(n),i=po(i);n>i&&(i+=_f);var h=Math.atan2(l,s);return h<0&&(h+=_f),h>=n&&h<=i||h+_f>=n&&h+_f<=i}function Ma(r,t,e,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(e-r)+r;return l===i?1/0:l>i?s:0}var go=ji.CMD,Rs=Math.PI*2,d6=1e-4;function v6(r,t){return Math.abs(r-t)<d6}var $r=[-1,-1,-1],zn=[-1,-1];function p6(){var r=zn[0];zn[0]=zn[1],zn[1]=r}function g6(r,t,e,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var c=Nv(t,n,a,s,u,$r);if(c===0)return 0;for(var f=0,h=-1,d=void 0,v=void 0,p=0;p<c;p++){var g=$r[p],m=g===0||g===1?.5:1,y=tr(r,e,i,o,g);y<l||(h<0&&(h=f2(t,n,a,s,zn),zn[1]<zn[0]&&h>1&&p6(),d=tr(t,n,a,s,zn[0]),h>1&&(v=tr(t,n,a,s,zn[1]))),h===2?g<zn[0]?f+=d<t?m:-m:g<zn[1]?f+=v<d?m:-m:f+=s<v?m:-m:g<zn[0]?f+=d<t?m:-m:f+=s<d?m:-m)}return f}function m6(r,t,e,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=m7(t,n,a,s,$r);if(l===0)return 0;var u=d2(t,n,a);if(u>=0&&u<=1){for(var c=0,f=lr(t,n,a,u),h=0;h<l;h++){var d=$r[h]===0||$r[h]===1?.5:1,v=lr(r,e,i,$r[h]);v<o||($r[h]<u?c+=f<t?d:-d:c+=a<f?d:-d)}return c}else{var d=$r[0]===0||$r[0]===1?.5:1,v=lr(r,e,i,$r[0]);return v<o?0:a<t?d:-d}}function y6(r,t,e,n,i,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);$r[0]=-l,$r[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Rs-1e-4){n=0,i=Rs;var c=a?1:-1;return o>=$r[0]+r&&o<=$r[1]+r?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Rs,i+=Rs);for(var h=0,d=0;d<2;d++){var v=$r[d];if(v+r>o){var p=Math.atan2(s,v),c=a?1:-1;p<0&&(p=Rs+p),(p>=n&&p<=i||p+Rs>=n&&p+Rs<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(c=-c),h+=c)}}return h}function xA(r,t,e,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,d,v=0;v<o;){var p=a[v++],g=v===1;switch(p===go.M&&v>1&&(e||(s+=Ma(l,u,c,f,n,i))),g&&(l=a[v],u=a[v+1],c=l,f=u),p){case go.M:c=a[v++],f=a[v++],l=c,u=f;break;case go.L:if(e){if(vo(l,u,a[v],a[v+1],t,n,i))return!0}else s+=Ma(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case go.C:if(e){if(f6(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=g6(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case go.Q:if(e){if(_A(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=m6(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case go.A:var m=a[v++],y=a[v++],_=a[v++],b=a[v++],S=a[v++],x=a[v++];v+=1;var w=!!(1-a[v++]);h=Math.cos(S)*_+m,d=Math.sin(S)*b+y,g?(c=h,f=d):s+=Ma(l,u,h,d,n,i);var C=(n-m)*b/_+m;if(e){if(h6(m,y,b,S,S+x,w,t,C,i))return!0}else s+=y6(m,y,b,S,S+x,w,C,i);l=Math.cos(S+x)*_+m,u=Math.sin(S+x)*b+y;break;case go.R:c=l=a[v++],f=u=a[v++];var T=a[v++],D=a[v++];if(h=c+T,d=f+D,e){if(vo(c,f,h,f,t,n,i)||vo(h,f,h,d,t,n,i)||vo(h,d,c,d,t,n,i)||vo(c,d,c,f,t,n,i))return!0}else s+=Ma(h,f,h,d,n,i),s+=Ma(c,d,c,f,n,i);break;case go.Z:if(e){if(vo(l,u,c,f,t,n,i))return!0}else s+=Ma(l,u,c,f,n,i);l=c,u=f;break}}return!e&&!v6(u,f)&&(s+=Ma(l,u,c,f,n,i)||0),s!==0}function _6(r,t,e){return xA(r,0,!1,t,e)}function b6(r,t,e,n){return xA(r,t,!0,e,n)}var sp=bt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},As),x6={style:bt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},rp.style)},ub=$i.concat(["invisible","culling","z","z2","zlevel","parent"]),S6=function(r){Ce(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 n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){e.buildPath(l,e.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<ub.length;++s)i[ub[s]]=this[ub[s]];i.__dirty|=yn}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var n=Ht(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=e[o];o==="style"?this.style?K(this.style,s):this.useStyle(s):o==="shape"?K(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(ct(e)){var n=of(e,0);return n>.5?P_:n>.2?t9:L_}else if(e)return L_}return P_},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(ct(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=of(e,0)<A_;if(a===o)return n}},t.prototype.buildPath=function(e,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~iu},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 ji(!1)},t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return!(n==null||n==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&iu)&&(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||i){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}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,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,n)){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)),b6(s,l/u,e,n)))return!0}if(this.hasFill())return _6(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=iu,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,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:K(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&iu)},t.prototype.createStyle=function(e){return Wc(sp,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=K({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=K({},i.shape),K(u,n.shape)):(u=K({},a?this.shape:i.shape),K(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=K({},this.shape);for(var c={},f=Ht(u),h=0;h<f.length;h++){var d=f[h];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(e,{shape:c},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return x6},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(a){Ce(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 Tt(e.style)},o.prototype.getDefaultShape=function(){return Tt(e.shape)},o}(t);for(var i in e)typeof e[i]=="function"&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=yn|Jc|iu}(),t}(Bn),Ft=S6,w6=bt({strokeFirst:!0,font:eo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},sp),SA=function(r){Ce(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return n!=null&&n!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return Wc(w6,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var n=e.text;n!=null?n+="":n="";var i=ff(n,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(Bn);SA.prototype.type="tspan";var bf=SA,C6=bt({x:0,y:0},As),T6={style:bt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},rp.style)};function M6(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var wA=function(r){Ce(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Wc(C6,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=M6(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[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 T6},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new kt(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Bn);wA.prototype.type="image";var ur=wA;function D6(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,c;i<0&&(e=e+i,i=-i),a<0&&(n=n+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>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/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,n),r.lineTo(e+i-l,n),l!==0&&r.arc(e+i-l,n+l,l,-Math.PI/2,0),r.lineTo(e+i,n+a-u),u!==0&&r.arc(e+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(e+c,n+a),c!==0&&r.arc(e+c,n+a-c,c,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var du=Math.round;function CA(r,t,e){if(!!t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(du(n*2)===du(i*2)&&(r.x1=r.x2=ks(n,s,!0)),du(a*2)===du(o*2)&&(r.y1=r.y2=ks(a,s,!0))),r}}function TA(r,t,e){if(!!t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=ks(n,s,!0),r.y=ks(i,s,!0),r.width=Math.max(ks(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(ks(i+o,s,!1)-r.y,o===0?0:1)),r}}function ks(r,t,e){if(!t)return r;var n=du(r*2);return(n+du(t))%2===0?n/2:(n+(e?1:-1))/2}var A6=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),P6={},MA=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new A6},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=TA(P6,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?D6(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ft);MA.prototype.type="rect";var Gt=MA,DA={fill:"#000"},AA=2,L6={style:bt({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},rp.style)},PA=function(r){Ce(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=DA,n.attr(e),n}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 n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.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,E6(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 n=0;n<this._children.length;n++)this._children[n].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new kt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);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||DA},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,n){if(!n)return e;var i=n.rich,a=e.rich||i&&{};return K(e,n),i&&a?(this._mergeRich(a,i),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,n){for(var i=Ht(n),a=0;a<i.length;a++){var o=i[a];e[o]=e[o]||{},K(e[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return L6},t.prototype._getOrCreateChild=function(e){var n=this._children[this._childCursor];return(!n||!(n instanceof e))&&(n=new e),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var e=this.style,n=e.font||eo,i=e.padding,a=zA(e),o=K9(a,e),s=cb(e),l=!!e.backgroundColor,u=o.outerHeight,c=o.outerWidth,f=o.contentWidth,h=o.lines,d=o.lineHeight,v=this._defaultStyle,p=e.x||0,g=e.y||0,m=e.align||v.align||"left",y=e.verticalAlign||v.verticalAlign||"top",_=p,b=cu(g,o.contentHeight,y);if(s||i){var S=hf(p,c,m),x=cu(g,u,y);s&&this._renderBackground(e,e,S,x,c,u)}b+=d/2,i&&(_=BA(p,m,i),y==="top"?b+=i[0]:y==="bottom"&&(b-=i[2]));for(var w=0,C=!1,T=NA("fill"in e?e.fill:(C=!0,v.fill)),D=kA("stroke"in e?e.stroke:!l&&(!v.autoStroke||C)?(w=AA,v.stroke):null),A=e.textShadowBlur>0,P=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,O=0;O<h.length;O++){var E=this._getOrCreateChild(bf),R=E.createStyle();E.useStyle(R),R.text=h[O],R.x=_,R.y=b,m&&(R.textAlign=m),R.textBaseline="middle",R.opacity=e.opacity,R.strokeFirst=!0,A&&(R.shadowBlur=e.textShadowBlur||0,R.shadowColor=e.textShadowColor||"transparent",R.shadowOffsetX=e.textShadowOffsetX||0,R.shadowOffsetY=e.textShadowOffsetY||0),R.stroke=D,R.fill=T,D&&(R.lineWidth=e.lineWidth||w,R.lineDash=e.lineDash,R.lineDashOffset=e.lineDashOffset||0),R.font=n,OA(R,e),b+=d,P&&E.setBoundingRect(new kt(hf(R.x,e.width,R.textAlign),cu(R.y,I,R.textBaseline),f,I))}},t.prototype._updateRichTexts=function(){var e=this.style,n=zA(e),i=t6(n,e),a=i.width,o=i.outerWidth,s=i.outerHeight,l=e.padding,u=e.x||0,c=e.y||0,f=this._defaultStyle,h=e.align||f.align,d=e.verticalAlign||f.verticalAlign,v=hf(u,o,h),p=cu(c,s,d),g=v,m=p;l&&(g+=l[3],m+=l[0]);var y=g+a;cb(e)&&this._renderBackground(e,e,v,p,o,s);for(var _=!!e.backgroundColor,b=0;b<i.lines.length;b++){for(var S=i.lines[b],x=S.tokens,w=x.length,C=S.lineHeight,T=S.width,D=0,A=g,P=y,I=w-1,O=void 0;D<w&&(O=x[D],!O.align||O.align==="left");)this._placeToken(O,e,C,m,A,"left",_),T-=O.width,A+=O.width,D++;for(;I>=0&&(O=x[I],O.align==="right");)this._placeToken(O,e,C,m,P,"right",_),T-=O.width,P-=O.width,I--;for(A+=(a-(A-g)-(y-P)-T)/2;D<=I;)O=x[D],this._placeToken(O,e,C,m,A+O.width/2,"center",_),A+=O.width,D++;m+=C}},t.prototype._placeToken=function(e,n,i,a,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,f=a+i/2;c==="top"?f=a+e.height/2:c==="bottom"&&(f=a+i-e.height/2);var h=!e.isLineHolder&&cb(u);h&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,f-e.height/2,e.width,e.height);var d=!!u.backgroundColor,v=e.textPadding;v&&(o=BA(o,s,v),f-=e.height/2-v[0]-e.innerHeight/2);var p=this._getOrCreateChild(bf),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=NA("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),S=kA("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!m.autoStroke||y)?(_=AA,m.stroke):null),x=u.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=f,x&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||eo,g.opacity=zi(u.opacity,n.opacity,1),OA(g,u),S&&(g.lineWidth=zi(u.lineWidth,n.lineWidth,_),g.lineDash=Et(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=S),b&&(g.fill=b);var w=e.contentWidth,C=e.contentHeight;p.setBoundingRect(new kt(hf(g.x,w,g.textAlign),cu(g.y,C,g.textBaseline),w,C))},t.prototype._renderBackground=function(e,n,i,a,o,s){var l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,f=l&&l.image,h=l&&!f,d=e.borderRadius,v=this,p,g;if(h||e.lineHeight||u&&c){p=this._getOrCreateChild(Gt),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,p.dirtyShape()}if(h){var y=p.style;y.fill=l||null,y.fillOpacity=Et(e.fillOpacity,1)}else if(f){g=this._getOrCreateChild(ur),g.onload=function(){v.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=p.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Et(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(p||g).style;b.shadowBlur=e.shadowBlur||0,b.shadowColor=e.shadowColor||"transparent",b.shadowOffsetX=e.shadowOffsetX||0,b.shadowOffsetY=e.shadowOffsetY||0,b.opacity=zi(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return EA(e)&&(n=[e.fontStyle,e.fontWeight,IA(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&On(n)||e.textFont||e.font},t}(Bn),I6={left:!0,right:1,center:1},O6={top:1,bottom:1,middle:1},LA=["fontStyle","fontWeight","fontSize","fontFamily"];function IA(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?F0+"px":r+"px"}function OA(r,t){for(var e=0;e<LA.length;e++){var n=LA[e],i=t[n];i!=null&&(r[n]=i)}}function EA(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function E6(r){return RA(r),L(r.rich,RA),r}function RA(r){if(r){r.font=PA.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||I6[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||O6[e]?e:"top";var n=r.padding;n&&(r.padding=Cv(r.padding))}}function kA(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function NA(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function BA(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function zA(r){var t=r.text;return t!=null&&(t+=""),t}function cb(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Ut=PA,Lt=jt(),fb=function(r,t,e,n){if(n){var i=Lt(n);i.dataIndex=e,i.dataType=t,i.seriesIndex=r,n.type==="group"&&n.traverse(function(a){var o=Lt(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t})}},FA=1,VA={},HA=jt(),hb=jt(),db=0,xf=1,lp=2,Wr=["emphasis","blur","select"],Sf=["normal","emphasis","blur","select"],vu=10,R6=9,Ns="highlight",up="downplay",wf="select",cp="unselect",Cf="toggleSelect";function pu(r){return r!=null&&r!=="none"}var $A=new ef(100);function WA(r){if(ct(r)){var t=$A.get(r);return t||(t=zv(r,-.1),$A.put(r,t)),t}else if(Vc(r)){var e=K({},r);return e.colorStops=J(r.colorStops,function(n){return{offset:n.offset,color:zv(n.color,-.1)}}),e}return r}function fp(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function GA(r){fp(r,"emphasis",lp)}function UA(r){r.hoverState===lp&&fp(r,"normal",db)}function vb(r){fp(r,"blur",xf)}function YA(r){r.hoverState===xf&&fp(r,"normal",db)}function k6(r){r.selected=!0}function N6(r){r.selected=!1}function qA(r,t,e){t(r,e)}function Da(r,t,e){qA(r,t,e),r.isGroup&&r.traverse(function(n){qA(n,t,e)})}function hp(r,t){switch(t){case"emphasis":r.hoverState=lp;break;case"normal":r.hoverState=db;break;case"blur":r.hoverState=xf;break;case"select":r.selected=!0}}function B6(r,t,e,n){for(var i=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l==null?n&&n[s]:l}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 z6(r,t,e,n){var i=e&&Bt(e,"select")>=0,a=!1;if(r instanceof Ft){var o=HA(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(pu(s)||pu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=K({},n),u=K({},u),u.fill=s):!pu(u.fill)&&pu(s)?(a=!0,n=K({},n),u=K({},u),u.fill=WA(s)):!pu(u.stroke)&&pu(l)&&(a||(n=K({},n),u=K({},u)),u.stroke=WA(l)),n.style=u}}if(n&&n.z2==null){a||(n=K({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c!=null?c:vu)}return n}function F6(r,t,e){if(e&&e.z2==null){e=K({},e);var n=r.z2SelectLift;e.z2=r.z2+(n!=null?n:R6)}return e}function V6(r,t,e){var n=Bt(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:B6(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=K({},e),o=K({opacity:n?i:a.opacity*.1},o),e.style=o),e}function pb(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return z6(this,r,t,e);if(r==="blur")return V6(this,r,e);if(r==="select")return F6(this,r,e)}return e}function Bs(r){r.stateProxy=pb;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=pb),e&&(e.stateProxy=pb)}function jA(r,t){!JA(r,t)&&!r.__highByOuter&&Da(r,GA)}function XA(r,t){!JA(r,t)&&!r.__highByOuter&&Da(r,UA)}function Aa(r,t){r.__highByOuter|=1<<(t||0),Da(r,GA)}function Pa(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Da(r,UA)}function ZA(r){Da(r,vb)}function gb(r){Da(r,YA)}function KA(r){Da(r,k6)}function QA(r){Da(r,N6)}function JA(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function tP(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=hb(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){YA(u)}),s&&e.push(a)),o.isBlured=!1}),L(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function mb(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&gb(h)}}if(r!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.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 d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(g){vb(g)}),mr(t))a(u.getData(),t);else if(xt(t))for(var v=Ht(t),p=0;p<v.length;p++)a(u.getData(v[p]),t[v[p]]);l.push(u),hb(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function yb(r,t,e){if(!(r==null||t==null)){var n=e.getModel().getComponent(r,t);if(!!n){hb(n).isBlured=!0;var i=e.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){vb(a)})}}}function H6(r,t,e){var n=r.seriesIndex,i=r.getData(t.dataType);if(!!i){var a=Ts(i,t);a=(Q(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=Lt(o);mb(n,u.focus,u.blurScope,e)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&mb(n,c,f,e)}}}function _b(r,t,e,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return i;var a=n.getModel().getComponent(r,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(Lt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function $6(r,t,e){var n=Lt(r),i=_b(n.componentMainType,n.componentIndex,n.componentHighDownName,e),a=i.dispatchers,o=i.focusSelf;a?(o&&yb(n.componentMainType,n.componentIndex,e),L(a,function(s){return jA(s,t)})):(mb(n.seriesIndex,n.focus,n.blurScope,e),n.focus==="self"&&yb(n.componentMainType,n.componentIndex,e),jA(r,t))}function W6(r,t,e){tP(e);var n=Lt(r),i=_b(n.componentMainType,n.componentIndex,n.componentHighDownName,e).dispatchers;i?L(i,function(a){return XA(a,t)}):XA(r,t)}function G6(r,t,e){if(!!xb(t)){var n=t.dataType,i=r.getData(n),a=Ts(i,t);Q(a)||(a=[a]),r[t.type===Cf?"toggleSelect":t.type===wf?"select":"unselect"](a,n)}}function eP(r){var t=r.getAllData();L(t,function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?KA(a):QA(a)})})}function U6(r){var t=[];return r.eachSeries(function(e){var n=e.getAllData();L(n,function(i){i.data;var a=i.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function mo(r,t,e){zs(r,!0),Da(r,Bs),bb(r,t,e)}function Y6(r){zs(r,!1)}function Re(r,t,e,n){n?Y6(r):mo(r,t,e)}function bb(r,t,e){var n=Lt(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var rP=["emphasis","blur","select"],q6={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function yr(r,t,e,n){e=e||"itemStyle";for(var i=0;i<rP.length;i++){var a=rP[i],o=t.getModel([a,e]),s=r.ensureState(a);s.style=n?n(o):o[q6[e]]()}}function zs(r,t){var e=t===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function Tf(r){return!!(r&&r.__highDownDispatcher)}function j6(r,t,e){var n=Lt(r);n.componentMainType=t.mainType,n.componentIndex=t.componentIndex,n.componentHighDownName=e}function X6(r){var t=VA[r];return t==null&&FA<=32&&(t=VA[r]=FA++),t}function xb(r){var t=r.type;return t===wf||t===cp||t===Cf}function nP(r){var t=r.type;return t===Ns||t===up}function Z6(r){var t=HA(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 gu=ji.CMD,K6=[[],[],[]],iP=Math.sqrt,Q6=Math.atan2;function aP(r,t){if(!!t){var e=r.data,n=r.len(),i,a,o,s,l,u,c=gu.M,f=gu.C,h=gu.L,d=gu.R,v=gu.A,p=gu.Q;for(o=0,s=0;o<n;){switch(i=e[o++],s=o,a=0,i){case c:a=1;break;case h:a=1;break;case f:a=3;break;case p:a=2;break;case v:var g=t[4],m=t[5],y=iP(t[0]*t[0]+t[1]*t[1]),_=iP(t[2]*t[2]+t[3]*t[3]),b=Q6(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=g,e[o]*=_,e[o++]+=m,e[o++]*=y,e[o++]*=_,e[o++]+=b,e[o++]+=b,o+=2,s=o;break;case d:u[0]=e[o++],u[1]=e[o++],sr(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],sr(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var S=K6[l];S[0]=e[o++],S[1]=e[o++],sr(S,S,t),e[s++]=S[0],e[s++]=S[1]}}r.increaseVersion()}}var Sb=Math.sqrt,dp=Math.sin,vp=Math.cos,Mf=Math.PI;function oP(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function wb(r,t){return(r[0]*t[0]+r[1]*t[1])/(oP(r)*oP(t))}function sP(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(wb(r,t))}function lP(r,t,e,n,i,a,o,s,l,u,c){var f=l*(Mf/180),h=vp(f)*(r-e)/2+dp(f)*(t-n)/2,d=-1*dp(f)*(r-e)/2+vp(f)*(t-n)/2,v=h*h/(o*o)+d*d/(s*s);v>1&&(o*=Sb(v),s*=Sb(v));var p=(i===a?-1:1)*Sb((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,g=p*o*d/s,m=p*-s*h/o,y=(r+e)/2+vp(f)*g-dp(f)*m,_=(t+n)/2+dp(f)*g+vp(f)*m,b=sP([1,0],[(h-g)/o,(d-m)/s]),S=[(h-g)/o,(d-m)/s],x=[(-1*h-g)/o,(-1*d-m)/s],w=sP(S,x);if(wb(S,x)<=-1&&(w=Mf),wb(S,x)>=1&&(w=0),w<0){var C=Math.round(w/Mf*1e6)/1e6;w=Mf*2+C%2*Mf}c.addData(u,y,_,o,s,b,w,f,a)}var J6=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,tU=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function eU(r){var t=new ji;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=ji.CMD,l=r.match(J6);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,d=c.match(tU)||[],v=d.length,p=0;p<v;p++)d[p]=parseFloat(d[p]);for(var g=0;g<v;){var m=void 0,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0,w=void 0,C=e,T=n,D=void 0,A=void 0;switch(f){case"l":e+=d[g++],n+=d[g++],h=s.L,t.addData(h,e,n);break;case"L":e=d[g++],n=d[g++],h=s.L,t.addData(h,e,n);break;case"m":e+=d[g++],n+=d[g++],h=s.M,t.addData(h,e,n),i=e,a=n,f="l";break;case"M":e=d[g++],n=d[g++],h=s.M,t.addData(h,e,n),i=e,a=n,f="L";break;case"h":e+=d[g++],h=s.L,t.addData(h,e,n);break;case"H":e=d[g++],h=s.L,t.addData(h,e,n);break;case"v":n+=d[g++],h=s.L,t.addData(h,e,n);break;case"V":n=d[g++],h=s.L,t.addData(h,e,n);break;case"C":h=s.C,t.addData(h,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),e=d[g-2],n=d[g-1];break;case"c":h=s.C,t.addData(h,d[g++]+e,d[g++]+n,d[g++]+e,d[g++]+n,d[g++]+e,d[g++]+n),e+=d[g-2],n+=d[g-1];break;case"S":m=e,y=n,D=t.len(),A=t.data,o===s.C&&(m+=e-A[D-4],y+=n-A[D-3]),h=s.C,C=d[g++],T=d[g++],e=d[g++],n=d[g++],t.addData(h,m,y,C,T,e,n);break;case"s":m=e,y=n,D=t.len(),A=t.data,o===s.C&&(m+=e-A[D-4],y+=n-A[D-3]),h=s.C,C=e+d[g++],T=n+d[g++],e+=d[g++],n+=d[g++],t.addData(h,m,y,C,T,e,n);break;case"Q":C=d[g++],T=d[g++],e=d[g++],n=d[g++],h=s.Q,t.addData(h,C,T,e,n);break;case"q":C=d[g++]+e,T=d[g++]+n,e+=d[g++],n+=d[g++],h=s.Q,t.addData(h,C,T,e,n);break;case"T":m=e,y=n,D=t.len(),A=t.data,o===s.Q&&(m+=e-A[D-4],y+=n-A[D-3]),e=d[g++],n=d[g++],h=s.Q,t.addData(h,m,y,e,n);break;case"t":m=e,y=n,D=t.len(),A=t.data,o===s.Q&&(m+=e-A[D-4],y+=n-A[D-3]),e+=d[g++],n+=d[g++],h=s.Q,t.addData(h,m,y,e,n);break;case"A":_=d[g++],b=d[g++],S=d[g++],x=d[g++],w=d[g++],C=e,T=n,e=d[g++],n=d[g++],h=s.A,lP(C,T,e,n,x,w,_,b,S,h,t);break;case"a":_=d[g++],b=d[g++],S=d[g++],x=d[g++],w=d[g++],C=e,T=n,e+=d[g++],n+=d[g++],h=s.A,lP(C,T,e,n,x,w,_,b,S,h,t);break}}(f==="z"||f==="Z")&&(h=s.Z,t.addData(h),e=i,n=a),o=h}return t.toStatic(),t}var uP=function(r){Ce(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(Ft);function cP(r){return r.setData!=null}function fP(r,t){var e=eU(r),n=K({},t);return n.buildPath=function(i){if(cP(i)){i.setData(e.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;e.rebuildPath(a,1)}},n.applyTransform=function(i){aP(e,i),this.dirtyShape()},n}function hP(r,t){return new uP(fP(r,t))}function rU(r,t){var e=fP(r,t),n=function(i){Ce(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a}(uP);return n}function nU(r,t){for(var e=[],n=r.length,i=0;i<n;i++){var a=r[i];e.push(a.getUpdatedPathProxy(!0))}var o=new Ft(t);return o.createPathProxy(),o.buildPath=function(s){if(cP(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function Cb(r,t){t=t||{};var e=new Ft;return r.shape&&e.setShape(r.shape),e.setStyle(r.style),t.bakeTransform?aP(e.path,r.getComputedTransform()):t.toLocal?e.setLocalTransform(r.getComputedTransform()):e.copyTransform(r),e.buildPath=r.buildPath,e.applyTransform=e.applyTransform,e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e}var iU=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),dP=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new iU},t.prototype.buildPath=function(e,n){e.moveTo(n.cx+n.r,n.cy),e.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t}(Ft);dP.prototype.type="circle";var yi=dP,aU=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),vP=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new aU},t.prototype.buildPath=function(e,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;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}(Ft);vP.prototype.type="ellipse";var pp=vP,pP=Math.PI,Tb=pP*2,Fs=Math.sin,mu=Math.cos,oU=Math.acos,Ar=Math.atan2,gP=Math.abs,Df=Math.sqrt,Af=Math.max,Xi=Math.min,_i=1e-4;function sU(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,c=o-i,f=s-a,h=f*l-c*u;if(!(h*h<_i))return h=(c*(t-a)-f*(r-i))/h,[r+h*l,t+h*u]}function gp(r,t,e,n,i,a,o){var s=r-e,l=t-n,u=(o?a:-a)/Df(s*s+l*l),c=u*l,f=-u*s,h=r+c,d=t+f,v=e+c,p=n+f,g=(h+v)/2,m=(d+p)/2,y=v-h,_=p-d,b=y*y+_*_,S=i-a,x=h*p-v*d,w=(_<0?-1:1)*Df(Af(0,S*S*b-x*x)),C=(x*_-y*w)/b,T=(-x*y-_*w)/b,D=(x*_+y*w)/b,A=(-x*y+_*w)/b,P=C-g,I=T-m,O=D-g,E=A-m;return P*P+I*I>O*O+E*E&&(C=D,T=A),{cx:C,cy:T,x0:-c,y0:-f,x1:C*(i/S-1),y1:T*(i/S-1)}}function lU(r){var t;if(Q(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 uU(r,t){var e,n=Af(t.r,0),i=Af(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,d=gP(u-l),v=d>Tb&&d%Tb;if(v>_i&&(d=v),!(n>_i))r.moveTo(c,f);else if(d>Tb-_i)r.moveTo(c+n*mu(l),f+n*Fs(l)),r.arc(c,f,n,l,u,!h),i>_i&&(r.moveTo(c+i*mu(u),f+i*Fs(u)),r.arc(c,f,i,u,l,h));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0,w=void 0,C=void 0,T=void 0,D=void 0,A=void 0,P=void 0,I=void 0,O=void 0,E=n*mu(l),R=n*Fs(l),z=i*mu(u),B=i*Fs(u),Y=d>_i;if(Y){var W=t.cornerRadius;W&&(e=lU(W),p=e[0],g=e[1],m=e[2],y=e[3]);var et=gP(n-i)/2;if(_=Xi(et,m),b=Xi(et,y),S=Xi(et,p),x=Xi(et,g),T=w=Af(_,b),D=C=Af(S,x),(w>_i||C>_i)&&(A=n*mu(u),P=n*Fs(u),I=i*mu(l),O=i*Fs(l),d<pP)){var V=sU(E,R,I,O,A,P,z,B);if(V){var H=E-V[0],G=R-V[1],j=A-V[0],tt=P-V[1],nt=1/Fs(oU((H*j+G*tt)/(Df(H*H+G*G)*Df(j*j+tt*tt)))/2),rt=Df(V[0]*V[0]+V[1]*V[1]);T=Xi(w,(n-rt)/(nt+1)),D=Xi(C,(i-rt)/(nt-1))}}}if(!Y)r.moveTo(c+E,f+R);else if(T>_i){var vt=Xi(m,T),ft=Xi(y,T),lt=gp(I,O,E,R,n,vt,h),mt=gp(A,P,z,B,n,ft,h);r.moveTo(c+lt.cx+lt.x0,f+lt.cy+lt.y0),T<w&&vt===ft?r.arc(c+lt.cx,f+lt.cy,T,Ar(lt.y0,lt.x0),Ar(mt.y0,mt.x0),!h):(vt>0&&r.arc(c+lt.cx,f+lt.cy,vt,Ar(lt.y0,lt.x0),Ar(lt.y1,lt.x1),!h),r.arc(c,f,n,Ar(lt.cy+lt.y1,lt.cx+lt.x1),Ar(mt.cy+mt.y1,mt.cx+mt.x1),!h),ft>0&&r.arc(c+mt.cx,f+mt.cy,ft,Ar(mt.y1,mt.x1),Ar(mt.y0,mt.x0),!h))}else r.moveTo(c+E,f+R),r.arc(c,f,n,l,u,!h);if(!(i>_i)||!Y)r.lineTo(c+z,f+B);else if(D>_i){var vt=Xi(p,D),ft=Xi(g,D),lt=gp(z,B,A,P,i,-ft,h),mt=gp(E,R,I,O,i,-vt,h);r.lineTo(c+lt.cx+lt.x0,f+lt.cy+lt.y0),D<C&&vt===ft?r.arc(c+lt.cx,f+lt.cy,D,Ar(lt.y0,lt.x0),Ar(mt.y0,mt.x0),!h):(ft>0&&r.arc(c+lt.cx,f+lt.cy,ft,Ar(lt.y0,lt.x0),Ar(lt.y1,lt.x1),!h),r.arc(c,f,i,Ar(lt.cy+lt.y1,lt.cx+lt.x1),Ar(mt.cy+mt.y1,mt.cx+mt.x1),h),vt>0&&r.arc(c+mt.cx,f+mt.cy,vt,Ar(mt.y1,mt.x1),Ar(mt.y0,mt.x0),!h))}else r.lineTo(c+z,f+B),r.arc(c,f,i,u,l,h)}r.closePath()}}}var cU=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}(),mP=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new cU},t.prototype.buildPath=function(e,n){uU(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ft);mP.prototype.type="sector";var Gr=mP,fU=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),yP=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new fU},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t}(Ft);yP.prototype.type="ring";var Pf=yP;function hU(r,t,e,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=r.length;h<d;h++)ba(c,c,r[h]),xa(f,f,r[h]);ba(c,c,n[0]),xa(f,f,n[1])}for(var h=0,d=r.length;h<d;h++){var v=r[h];if(e)l=r[h?h-1:d-1],u=r[(h+1)%d];else if(h===0||h===d-1){i.push(Fi(r[h]));continue}else l=r[h-1],u=r[h+1];no(a,u,l),Yc(a,a,t);var p=Mv(v,l),g=Mv(v,u),m=p+g;m!==0&&(p/=m,g/=m),Yc(o,a,-p),Yc(s,a,g);var y=q0([],v,o),_=q0([],v,s);n&&(xa(y,y,c),ba(y,y,f),xa(_,_,c),ba(_,_,f)),i.push(y),i.push(_)}return e&&i.push(i.shift()),i}function _P(r,t,e){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=hU(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)r.lineTo(i[s][0],i[s][1])}e&&r.closePath()}}var dU=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),bP=function(r){Ce(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new dU},t.prototype.buildPath=function(e,n){_P(e,n,!0)},t}(Ft);bP.prototype.type="polygon";var Ur=bP,vU=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),xP=function(r){Ce(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 vU},t.prototype.buildPath=function(e,n){_P(e,n,!1)},t}(Ft);xP.prototype.type="polyline";var Yr=xP,pU={},gU=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),SP=function(r){Ce(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 gU},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=CA(pU,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(e.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var n=this.shape;return[n.x1*(1-e)+n.x2*e,n.y1*(1-e)+n.y2*e]},t}(Ft);SP.prototype.type="line";var er=SP,nn=[],mU=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 wP(r,t,e){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(e?c2:tr)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?c2:tr)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?l_:lr)(r.x1,r.cpx1,r.x2,t),(e?l_:lr)(r.y1,r.cpy1,r.y2,t)]}var CP=function(r){Ce(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 mU},t.prototype.buildPath=function(e,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(e.moveTo(i,a),c==null||f==null?(h<1&&(tf(i,l,o,h,nn),l=nn[1],o=nn[2],tf(a,u,s,h,nn),u=nn[1],s=nn[2]),e.quadraticCurveTo(l,u,o,s)):(h<1&&(lo(i,l,c,o,h,nn),l=nn[1],c=nn[2],o=nn[3],lo(a,u,f,s,h,nn),u=nn[1],f=nn[2],s=nn[3]),e.bezierCurveTo(l,u,c,f,o,s)))},t.prototype.pointAt=function(e){return wP(this.shape,e,!1)},t.prototype.tangentAt=function(e){var n=wP(this.shape,e,!0);return vs(n,n)},t}(Ft);CP.prototype.type="bezier-curve";var Lf=CP,yU=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}(),TP=function(r){Ce(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 yU},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);e.moveTo(c*o+i,f*o+a),e.arc(i,a,o,s,l,!u)},t}(Ft);TP.prototype.type="arc";var mp=TP,_U=function(r){Ce(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,n=this.shapeChanged(),i=0;i<e.length;i++)n=n||e[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(n[0],n[1],e[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(e,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],n=0;n<e.length;n++)e[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ft.prototype.getBoundingRect.call(this)},t}(Ft),yp=_U,bU=function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r}(),MP=bU,xU=function(r){Ce(t,r);function t(e,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=e==null?0:e,l.y=n==null?0:n,l.x2=i==null?1:i,l.y2=a==null?0:a,l.type="linear",l.global=s||!1,l}return t}(MP),yu=xU,SU=function(r){Ce(t,r);function t(e,n,i,a,o){var s=r.call(this,a)||this;return s.x=e==null?.5:e,s.y=n==null?.5:n,s.r=i==null?.5:i,s.type="radial",s.global=o||!1,s}return t}(MP),Mb=SU,Vs=[0,0],Hs=[0,0],_p=new Rt,bp=new Rt,wU=function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Rt;for(var n=0;n<2;n++)this._axes[n]=new Rt;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),e)for(var u=0;u<4;u++)n[u].transform(e);Rt.sub(i[0],n[1],n[0]),Rt.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(t,e){var n=!0,i=!e;return _p.set(1/0,1/0),bp.set(0,0),!this._intersectCheckOneSide(this,t,_p,bp,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,_p,bp,i,-1)&&(n=!1,i)||i||Rt.copy(e,n?_p:bp),n},r.prototype._intersectCheckOneSide=function(t,e,n,i,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,Vs),this._getProjMinMaxOnAxis(l,e._corners,Hs),Vs[1]<Hs[0]||Vs[0]>Hs[1]){if(s=!1,a)return s;var c=Math.abs(Hs[0]-Vs[1]),f=Math.abs(Vs[0]-Hs[1]);Math.min(c,f)>i.len()&&(c<f?Rt.scale(i,u,-c*o):Rt.scale(i,u,f*o))}else if(n){var c=Math.abs(Hs[0]-Vs[1]),f=Math.abs(Vs[0]-Hs[1]);Math.min(c,f)<n.len()&&(c<f?Rt.scale(n,u,c*o):Rt.scale(n,u,-f*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],a=this._origin,o=e[0].dot(i)+a[t],s=o,l=o,u=1;u<e.length;u++){var c=e[u].dot(i)+a[t];s=Math.min(c,s),l=Math.max(c,l)}n[0]=s,n[1]=l},r}(),xp=wU,CU=[],TU=function(r){Ce(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,n){n?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,n){n=n||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var n=this._cursor;n<this._displayables.length;n++)e&&e(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)e&&e(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.parent=this,n.update(),n.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new kt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(CU)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,n))return!0}return!1},t}(Bn),DP=TU,AP=jt();function _u(r,t,e,n,i){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;n?(u=Et(n.duration,200),c=Et(n.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)),_t(f)&&(f=f(e,i)),_t(u)&&(u=u(e));var h={duration:u||0,delay:f,easing:c};return h}else return null}function Db(r,t,e,n,i,a,o){var s=!1,l;_t(i)?(o=a,a=i,i=null):xt(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var c=_u(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,d=c.easing,v={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,v):t.animateTo(e,v)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Xt(r,t,e,n,i,a){Db("update",r,t,e,n,i,a)}function Te(r,t,e,n,i,a){Db("enter",r,t,e,n,i,a)}function bu(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 yo(r,t,e,n,i,a){bu(r)||Db("leave",r,t,e,n,i,a)}function PP(r,t,e,n){r.removeTextContent(),r.removeTextGuideLine(),yo(r,{style:{opacity:0}},t,e,n)}function If(r,t,e){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||PP(i,t,e,n)}):PP(r,t,e,n)}function bi(r){AP(r).oldStyle=r.style}function MU(r){return AP(r).oldStyle}var Sp=Math.max,wp=Math.min,Ab={};function LP(r){return Ft.extend(r)}var DU=rU;function IP(r,t){return DU(r,t)}function Fn(r,t){Ab[r]=t}function Cp(r){if(Ab.hasOwnProperty(r))return Ab[r]}function Of(r,t,e,n){var i=hP(r,t);return e&&(n==="center"&&(e=OP(e,i.getBoundingRect())),Lb(i,e)),i}function Pb(r,t,e){var n=new ur({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(e==="center"){var a={width:i.width,height:i.height};n.setStyle(OP(t,a))}}});return n}function OP(r,t){var e=t.width/t.height,n=r.height*e,i;n<=r.width?i=r.height:(n=r.width,i=n/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Sn=nU;function Lb(r,t){if(!!r.applyTransform){var e=r.getBoundingRect(),n=e.calculateTransform(t);r.applyTransform(n)}}function xu(r,t){return CA(r,r,{lineWidth:t}),r}function AU(r){return TA(r.shape,r.shape,r.style),r}var Tp=ks;function _o(r,t){for(var e=jc([]);r&&r!==t;)Vi(e,r.getLocalTransform(),e),r=r.parent;return e}function xi(r,t,e){return t&&!mr(t)&&(t=Ca.getLocalTransform(t)),e&&(t=ps([],t)),sr([],r,t)}function Mp(r,t,e){var n=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=xi(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function EP(r){return!r.isGroup}function PU(r){return r.shape!=null}function Ef(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){EP(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return PU(o)&&(s.shape=K({},o.shape)),s}var a=n(r);t.traverse(function(o){if(EP(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Xt(o,l,e,Lt(o).dataIndex)}}})}function Ib(r,t){return J(r,function(e){var n=e[0];n=Sp(n,t.x),n=wp(n,t.x+t.width);var i=e[1];return i=Sp(i,t.y),i=wp(i,t.y+t.height),[n,i]})}function RP(r,t){var e=Sp(r.x,t.x),n=wp(r.x+r.width,t.x+t.width),i=Sp(r.y,t.y),a=wp(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function Su(r,t,e){var n=K({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),bt(i,e),new ur(n)):Of(r.replace("path://",""),n,e,"center")}function Rf(r,t,e,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(kP(r,t,e,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function kP(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,c=o-i,f=s-a,h=Ob(c,f,l,u);if(LU(h))return!1;var d=r-i,v=t-a,p=Ob(d,v,l,u)/h;if(p<0||p>1)return!1;var g=Ob(d,v,c,f)/h;return!(g<0||g>1)}function Ob(r,t,e,n){return r*n-e*t}function LU(r){return r<=1e-6&&r>=-1e-6}function wu(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=ct(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&L(Ht(l),function(c){pt(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Lt(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:bt({content:n,formatterParams:s},i)}}function NP(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function bo(r,t){if(r)if(Q(r))for(var e=0;e<r.length;e++)NP(r[e],t);else NP(r,t)}Fn("circle",yi),Fn("ellipse",pp),Fn("sector",Gr),Fn("ring",Pf),Fn("polygon",Ur),Fn("polyline",Yr),Fn("rect",Gt),Fn("line",er),Fn("bezierCurve",Lf),Fn("arc",mp);var kf=Object.freeze(Object.defineProperty({__proto__:null,updateProps:Xt,initProps:Te,removeElement:yo,removeElementWithFadeOut:If,isElementRemoved:bu,extendShape:LP,extendPath:IP,registerShape:Fn,getShapeClass:Cp,makePath:Of,makeImage:Pb,mergePath:Sn,resizePath:Lb,subPixelOptimizeLine:xu,subPixelOptimizeRect:AU,subPixelOptimize:Tp,getTransform:_o,applyTransform:xi,transformDirection:Mp,groupTransition:Ef,clipPointsByRect:Ib,clipRectByRect:RP,createIcon:Su,linePolygonIntersect:Rf,lineLineIntersect:kP,setTooltipConfig:wu,traverseElements:bo,Group:Dt,Image:ur,Text:Ut,Circle:yi,Ellipse:pp,Sector:Gr,Ring:Pf,Polygon:Ur,Polyline:Yr,Rect:Gt,Line:er,BezierCurve:Lf,Arc:mp,IncrementalDisplayable:DP,CompoundPath:yp,LinearGradient:yu,RadialGradient:Mb,BoundingRect:kt,OrientedBoundingRect:xp,Point:Rt,Path:Ft},Symbol.toStringTag,{value:"Module"})),Dp={};function BP(r,t){for(var e=0;e<Wr.length;e++){var n=Wr[e],i=t[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function Eb(r,t,e){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=_t(r.defaultText)?r.defaultText(i,r,e):r.defaultText);for(var l={normal:s},u=0;u<Wr.length;u++){var c=Wr[u],f=t[c];l[c]=Et(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function _r(r,t,e,n){e=e||Dp;for(var i=r instanceof Ut,a=!1,o=0;o<Sf.length;o++){var s=t[Sf[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new Ut,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Eb(e,t),c=t.normal,f=!!c.getShallow("show"),h=me(c,n&&n.normal,e,!1,!i);h.text=u.normal,i||r.setTextConfig(Ap(c,e,!1));for(var o=0;o<Wr.length;o++){var d=Wr[o],s=t[d];if(s){var v=l.ensureState(d),p=!!Et(s.getShallow("show"),f);if(p!==f&&(v.ignore=!p),v.style=me(s,n&&n[d],e,!0,!i),v.style.text=u[d],!i){var g=r.ensureState(d);g.textConfig=Ap(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&&(Cu(l).setLabelText=function(m){var y=Eb(e,t,m);BP(l,y)})}else l&&(l.ignore=!0);r.dirty()}function rr(r,t){t=t||"label";for(var e={normal:r.getModel(t)},n=0;n<Wr.length;n++){var i=Wr[n];e[i]=r.getModel([i,t])}return e}function me(r,t,e,n,i){var a={};return IU(a,r,e,n,i),t&&K(a,t),a}function Ap(r,t,e){t=t||{};var n={},i,a=r.getShallow("rotate"),o=Et(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(e?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",n}function IU(r,t,e,n,i){e=e||Dp;var a=t.ecModel,o=a&&a.option.textStyle,s=OU(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=t.getModel(["rich",u]);HP(l[u]={},c,o,e,n,i,!1,!0)}}l&&(r.rich=l);var f=t.get("overflow");f&&(r.overflow=f);var h=t.get("minMargin");h!=null&&(r.margin=h),HP(r,t,o,e,n,i,!0,!1)}function OU(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Dp).rich;if(e){t=t||{};for(var n=Ht(e),i=0;i<n.length;i++){var a=n[i];t[a]=1}}r=r.parentModel}return t}var zP=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],FP=["align","lineHeight","width","height","tag","verticalAlign"],VP=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function HP(r,t,e,n,i,a,o,s){e=!i&&e||Dp;var l=n&&n.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),f=Et(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),a||(u=u||e.color,c=c||e.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var h=Et(t.getShallow("textBorderWidth"),e.textBorderWidth);h!=null&&(r.lineWidth=h);var d=Et(t.getShallow("textBorderType"),e.textBorderType);d!=null&&(r.lineDash=d);var v=Et(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);v!=null&&(r.lineDashOffset=v),!i&&f==null&&!s&&(f=n&&n.defaultOpacity),f!=null&&(r.opacity=f),!i&&!a&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var p=0;p<zP.length;p++){var g=zP[p],m=Et(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var p=0;p<FP.length;p++){var g=FP[p],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=t.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var p=0;p<VP.length;p++){var g=VP[p],m=t.getShallow(g);m!=null&&(r[g]=m)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function $P(r,t){var e=t&&t.getModel("textStyle");return On([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 Cu=jt();function WP(r,t,e,n){if(!!r){var i=Cu(r);i.prevValue=i.value,i.value=e;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}function GP(r,t,e,n,i){var a=Cu(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Et(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var f=aA(e,a.precision,s,l,c);a.interpolatedValue=c===1?null:f;var h=Eb({labelDataIndex:t,labelFetcher:i,defaultText:o?o(f):f+""},a.statesModels,f);BP(r,h)}r.percent=0,(a.prevValue==null?Te:Xt)(r,{percent:1},n,t,null,u)}var EU=["textStyle","color"],Rb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],kb=new Ut,RU=function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(EU):null)},r.prototype.getFont=function(){return $P({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")},n=0;n<Rb.length;n++)e[Rb[n]]=this.getShallow(Rb[n]);return kb.useStyle(e),kb.update(),kb.getBoundingRect()},r}(),kU=RU,UP=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],NU=Ds(UP),BU=function(){function r(){}return r.prototype.getLineStyle=function(t){return NU(this,t)},r}(),YP=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],zU=Ds(YP),FU=function(){function r(){}return r.prototype.getItemStyle=function(t,e){return zU(this,t,e)},r}(),$s=function(){function r(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return r.prototype.init=function(t,e,n){},r.prototype.mergeOption=function(t,e){Ot(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 n=this.option,i=n==null?n:n[t];if(i==null&&!e){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},r.prototype.getModel=function(t,e){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),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(Tt(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(!Yt.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 n=this.option;if(!t)return n;for(var i=0;i<t.length&&!(!!t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},r}();j_($s),W9($s),ze($s,BU),ze($s,FU),ze($s,j9),ze($s,kU);var fe=$s,VU=Math.round(Math.random()*10);function Tu(r){return[r||"",VU++].join("_")}function HU(r){var t={};r.registerSubTypeDefaulter=function(e,n){var i=Gi(e);t[i.main]=n},r.determineSubType=function(e,n){var i=n.type;if(!i){var a=Gi(e).main;r.hasSubTypes(e)&&t[a]&&(i=t[a](n))}return i}}function $U(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(L(a,function(y){h[y]=!0});f.length;){var d=f.pop(),v=c[d],p=!!h[d];p&&(s.call(l,d,v.originalDeps.slice()),delete h[d]),L(v.successor,p?m:g)}L(h,function(){var y="";throw new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function m(y){h[y]=!0,g(y)}};function e(a){var o={},s=[];return L(a,function(l){var u=n(o,l),c=u.originalDeps=t(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),L(f,function(h){Bt(u.predecessor,h)<0&&u.predecessor.push(h);var d=n(o,h);Bt(d.successor,h)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return L(a,function(l){Bt(o,l)>=0&&s.push(l)}),s}}function xo(r,t){return Ot(Ot({},r,!0),t,!0)}var WU={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},GU={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"}},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:""}}}},Pp="ZH",Nb="EN",Nf=Nb,Lp={},Bb={},qP=Yt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(Pp)>-1?Pp:Nf}():Nf;function zb(r,t){r=r.toUpperCase(),Bb[r]=new fe(t),Lp[r]=t}function UU(r){if(ct(r)){var t=Lp[r.toUpperCase()]||{};return r===Pp||r===Nb?Tt(t):Ot(Tt(t),Tt(Lp[Nf]),!1)}else return Ot(Tt(r),Tt(Lp[Nf]),!1)}function Fb(r){return Bb[r]}function YU(){return Bb[Nf]}zb(Nb,WU),zb(Pp,GU);var Vb=1e3,Hb=Vb*60,Bf=Hb*60,Vn=Bf*24,jP=Vn*365,zf={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ip="{yyyy}-{MM}-{dd}",XP={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ip,hour:Ip+" "+zf.hour,minute:Ip+" "+zf.minute,second:Ip+" "+zf.second,millisecond:zf.none},$b=["year","month","day","hour","minute","second","millisecond"],ZP=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function an(r,t){return r+="","0000".substr(0,t-r.length)+r}function Mu(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 qU(r){return r===Mu(r)}function jU(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ff(r,t,e,n){var i=xn(r),a=i[Wb(e)](),o=i[Du(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[Op(e)](),u=i["get"+(e?"UTC":"")+"Day"](),c=i[Vf(e)](),f=(c-1)%12+1,h=i[Ep(e)](),d=i[Rp(e)](),v=i[kp(e)](),p=n instanceof fe?n:Fb(n||qP)||YU(),g=p.getModel("time"),m=g.get("month"),y=g.get("monthAbbr"),_=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,a%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,an(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,an(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,an(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,an(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,an(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,an(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,an(v,3)).replace(/{S}/g,v+"")}function XU(r,t,e,n,i){var a=null;if(ct(e))a=e;else if(_t(e))a=e(r.value,t,{level:r.level});else{var o=K({},zf);if(r.level>0)for(var s=0;s<$b.length;++s)o[$b[s]]="{primary|"+o[$b[s]]+"}";var l=e?e.inherit===!1?e:bt(e,o):o,u=KP(r.value,i);if(l[u])a=l[u];else if(l.inherit){for(var c=ZP.indexOf(u),s=c-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(Q(a)){var f=r.level==null?0:r.level>=0?r.level:a.length+r.level;f=Math.min(f,a.length-1),a=a[f]}}return Ff(new Date(r.value),a,i,n)}function KP(r,t){var e=xn(r),n=e[Du(t)]()+1,i=e[Op(t)](),a=e[Vf(t)](),o=e[Ep(t)](),s=e[Rp(t)](),l=e[kp(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function QP(r,t,e){var n=qt(r)?xn(r):r;switch(t=t||KP(r,e),t){case"year":return n[Wb(e)]();case"half-year":return n[Du(e)]()>=6?1:0;case"quarter":return Math.floor((n[Du(e)]()+1)/4);case"month":return n[Du(e)]();case"day":return n[Op(e)]();case"half-day":return n[Vf(e)]()/24;case"hour":return n[Vf(e)]();case"minute":return n[Ep(e)]();case"second":return n[Rp(e)]();case"millisecond":return n[kp(e)]()}}function Wb(r){return r?"getUTCFullYear":"getFullYear"}function Du(r){return r?"getUTCMonth":"getMonth"}function Op(r){return r?"getUTCDate":"getDate"}function Vf(r){return r?"getUTCHours":"getHours"}function Ep(r){return r?"getUTCMinutes":"getMinutes"}function Rp(r){return r?"getUTCSeconds":"getSeconds"}function kp(r){return r?"getUTCMilliseconds":"getMilliseconds"}function ZU(r){return r?"setUTCFullYear":"setFullYear"}function JP(r){return r?"setUTCMonth":"setMonth"}function tL(r){return r?"setUTCDate":"setDate"}function eL(r){return r?"setUTCHours":"setHours"}function rL(r){return r?"setUTCMinutes":"setMinutes"}function nL(r){return r?"setUTCSeconds":"setSeconds"}function iL(r){return r?"setUTCMilliseconds":"setMilliseconds"}function KU(r,t,e,n,i,a,o,s){var l=new Ut({style:{text:r,font:t,align:e,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Gb(r){if(!G_(r))return ct(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Ub(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ws=Cv;function Yb(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&On(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?xn(r):r;if(isNaN(+l)){if(s)return"-"}else return Ff(l,n,e)}if(t==="ordinal")return Sv(r)?i(r):qt(r)&&a(r)?r+"":"-";var u=Wi(r);return a(u)?Gb(u):Sv(r)?i(r):typeof r=="boolean"?r+"":"-"}var aL=["a","b","c","d","e","f","g"],qb=function(r,t){return"{"+r+(t==null?"":t)+"}"};function jb(r,t,e){Q(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=aL[a];r=r.replace(qb(o),qb(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];r=r.replace(qb(aL[l],s),e?Vr(u):u)}return r}function QU(r,t,e){return L(t,function(n,i){r=r.replace("{"+i+"}",e?Vr(n):n)}),r}function oL(r,t){var e=ct(r)?{color:r,extraCssText:t}:r||{},n=e.color,i=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Vr(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Vr(n)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function JU(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
200
|
+
yyyy`);var n=xn(t),i=e?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return r=r.replace("MM",an(o,2)).replace("M",o).replace("yyyy",a).replace("yy",an(a%100+"",2)).replace("dd",an(s,2)).replace("d",s).replace("hh",an(l,2)).replace("h",l).replace("mm",an(u,2)).replace("m",u).replace("ss",an(c,2)).replace("s",c).replace("SSS",an(f,3)),r}function tY(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Gs(r,t){return t=t||"transparent",ct(r)?r:xt(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Np(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Bp=L,sL=["left","right","top","bottom","width","height"],Us=[["width","left","right"],["height","top","bottom"]];function Xb(r,t,e,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),d,v;if(r==="horizontal"){var p=c.width+(h?-h.x+c.x:0);d=a+p,d>n||l.newline?(a=0,d=p,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(h?-h.y+c.y:0);v=o+g,v>i||l.newline?(a+=s+e,o=0,v=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+e:o=v+e)})}var Ys=Xb;It(Xb,"vertical"),It(Xb,"horizontal");function eY(r,t,e){var n=t.width,i=t.height,a=at(r.left,n),o=at(r.top,i),s=at(r.right,n),l=at(r.bottom,i);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),e=Ws(e||0),{width:Math.max(s-a-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function qe(r,t,e){e=Ws(e||0);var n=t.width,i=t.height,a=at(r.left,n),o=at(r.top,i),s=at(r.right,n),l=at(r.bottom,i),u=at(r.width,n),c=at(r.height,i),f=e[2]+e[0],h=e[1]+e[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":a=n/2-u/2-e[3];break;case"right":a=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-e[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new kt(a+e[3],o+e[0],u,c);return v.margin=e,v}function zp(r,t,e,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new kt(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=qe(bt({width:u.width,height:u.height},t),e,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===r&&r.markRedraw(),!0}function rY(r,t){return r[Us[t][0]]!=null||r[Us[t][1]]!=null&&r[Us[t][2]]!=null}function Hf(r){var t=r.layoutMode||r.constructor.layoutMode;return xt(t)?t:t?{type:t}:null}function So(r,t,e){var n=e&&e.ignoreSize;!Q(n)&&(n=[n,n]);var i=o(Us[0],0),a=o(Us[1],1);u(Us[0],r,i),u(Us[1],r,a);function o(c,f){var h={},d=0,v={},p=0,g=2;if(Bp(c,function(_){v[_]=r[_]}),Bp(c,function(_){s(t,_)&&(h[_]=v[_]=t[_]),l(h,_)&&d++,l(v,_)&&p++}),n[f])return l(t,c[1])?v[c[2]]=null:l(t,c[2])&&(v[c[1]]=null),v;if(p===g||!d)return v;if(d>=g)return h;for(var m=0;m<c.length;m++){var y=c[m];if(!s(h,y)&&s(r,y)){h[y]=r[y];break}}return h}function s(c,f){return c.hasOwnProperty(f)}function l(c,f){return c[f]!=null&&c[f]!=="auto"}function u(c,f,h){Bp(c,function(d){f[d]=h[d]})}}function Au(r){return lL({},r)}function lL(r,t){return t&&r&&Bp(sL,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var nY=jt(),Pu=function(r){q(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.uid=Tu("ec_cpt_model"),a}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Hf(this),a=i?Au(e):{},o=n.getTheme();Ot(e,o.get(this.mainType)),Ot(e,this.getDefaultOption()),i&&So(e,a,i)},t.prototype.mergeOption=function(e,n){Ot(this.option,e,!0);var i=Hf(this);i&&So(this.option,e,i)},t.prototype.optionUpdated=function(e,n){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!V9(e))return e.defaultOption;var n=nY(this);if(!n.defaultOption){for(var i=[],a=e;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=Ot(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return mf(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(fe);sA(Pu,fe),tp(Pu),HU(Pu),$U(Pu,iY);function iY(r){var t=[];return L(Pu.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=J(t,function(e){return Gi(e).main}),r!=="dataset"&&Bt(t,"dataset")<=0&&t.unshift("dataset"),t}var Wt=Pu,uL="";typeof navigator!="undefined"&&(uL=navigator.platform||"");var Lu="rgba(0, 0, 0, 0.2)",aY={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Lu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Lu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Lu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Lu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Lu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Lu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:uL.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},cL=yt(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Hn="original",Pr="arrayRows",$n="objectRows",Zi="keyedColumns",wo="typedArray",fL="unknown",Ki="column",Iu="row",br={Must:1,Might:2,Not:3},hL=jt();function oY(r){hL(r).datasetMap=yt()}function dL(r,t,e){var n={},i=Kb(t);if(!i||!r)return n;var a=[],o=[],s=t.ecModel,l=hL(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,c,f;r=r.slice(),L(r,function(p,g){var m=xt(p)?p:r[g]={name:p};m.type==="ordinal"&&c==null&&(c=g,f=v(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});L(r,function(p,g){var m=p.name,y=v(p);if(c==null){var _=h.valueWayDim;d(n[m],_,y),d(o,_,y),h.valueWayDim+=y}else if(c===g)d(n[m],0,y),d(a,0,y);else{var _=h.categoryWayDim;d(n[m],_,y),d(o,_,y),h.categoryWayDim+=y}});function d(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function v(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function Zb(r,t,e){var n={},i=Kb(r);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===$n||a===Zi)&&L(o,function(c,f){(xt(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],d=0,v=Math.min(5,e);d<v;d++){var p=pL(t.data,a,t.seriesLayoutBy,o,t.startIndex,d);h.push(p);var g=p===br.Not;if(g&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!g&&h[c.n]===br.Not)&&(c.n=d),m(c)&&h[c.n]!==br.Not)return c;g||(p===br.Might&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v)&&(f.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(f)?f:null}();if(l){n.value=[l.v];var u=s!=null?s:l.n;n.itemName=[u],n.seriesName=[u]}return n}function Kb(r){var t=r.get("data",!0);if(!t)return mf(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Ye).models[0]}function sY(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:mf(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Ye).models}function vL(r,t){return pL(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function pL(r,t,e,n,i,a){var o,s=5;if(tn(r))return br.Not;var l,u;if(n){var c=n[a];xt(c)?(l=c.name,u=c.type):ct(c)&&(l=c)}if(u!=null)return u==="ordinal"?br.Must:br.Not;if(t===Pr){var f=r;if(e===Iu){for(var h=f[a],d=0;d<(h||[]).length&&d<s;d++)if((o=b(h[i+d]))!=null)return o}else for(var d=0;d<f.length&&d<s;d++){var v=f[i+d];if(v&&(o=b(v[a]))!=null)return o}}else if(t===$n){var p=r;if(!l)return br.Not;for(var d=0;d<p.length&&d<s;d++){var g=p[d];if(g&&(o=b(g[l]))!=null)return o}}else if(t===Zi){var m=r;if(!l)return br.Not;var h=m[l];if(!h||tn(h))return br.Not;for(var d=0;d<h.length&&d<s;d++)if((o=b(h[d]))!=null)return o}else if(t===Hn)for(var y=r,d=0;d<y.length&&d<s;d++){var g=y[d],_=hu(g);if(!Q(_))return br.Not;if((o=b(_[a]))!=null)return o}function b(S){var x=ct(S);if(S!=null&&isFinite(S)&&S!=="")return x?br.Might:br.Not;if(x&&S!=="-")return br.Must}return br.Not}var Qb=yt();function lY(r,t){Mr(Qb.get(r)==null&&t),Qb.set(r,t)}function uY(r,t,e){var n=Qb.get(t);if(!n)return e;var i=n(r);return i?e.concat(i):e}var gL=jt(),cY=jt(),Jb=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var i=ce(this.get("color",!0)),a=this.get("colorLayer",!0);return mL(this,gL,i,a,t,e,n)},r.prototype.clearColorPalette=function(){hY(this,gL)},r}();function t1(r,t,e,n){var i=ce(r.get(["aria","decal","decals"]));return mL(r,cY,i,null,t,e,n)}function fY(r,t){for(var e=r.length,n=0;n<e;n++)if(r[n].length>t)return r[n];return r[e-1]}function mL(r,t,e,n,i,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?e:fY(n,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function hY(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Fp,$f,yL,_L="\0_ec_inner",dY=1,bL=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,i,a,o,s){a=a||{},this.option=null,this._theme=new fe(a),this._locale=new fe(o),this._optionManager=s},t.prototype.setOption=function(e,n,i){var a=wL(n);this._optionManager.setOption(e,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,n){return this._resetOption(e,wL(n))},t.prototype._resetOption=function(e,n){var i=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?yL(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&L(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=yt(),u=n&&n.replaceMergeMainTypeMap;oY(this),L(e,function(f,h){f!=null&&(Wt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?Tt(f):Ot(i[h],f,!0))}),u&&u.each(function(f,h){Wt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Wt.topologicalTravel(s,Wt.getAllClassMainTypes(),c,this);function c(f){var h=uY(this,f,ce(e[f])),d=a.get(f),v=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=rA(d,h,v);I9(p,f,Wt),i[f]=null,a.set(f,null),o.set(f,0);var g=[],m=[],y=0,_;L(p,function(b,S){var x=b.existing,w=b.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var C=f==="series",T=Wt.getClass(f,b.keyInfo.subType,!C);if(!T)return;if(f==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===T)x.name=b.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var D=K({componentIndex:S},b.keyInfo);x=new T(w,this,this,D),K(x,D),b.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&Fp(this)}this._seriesIndices||Fp(this)},t.prototype.getOption=function(){var e=Tt(this.option);return L(e,function(n,i){if(Wt.hasClass(i)){for(var a=ce(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!pf(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[_L],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(e){var n=e.mainType;if(!n)return[];var i=e.index,a=e.id,o=e.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],L(ce(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=xL("id",a,s):o!=null?l=xL("name",o,s):l=ae(s,function(u){return!!u}),SL(l,e)},t.prototype.findComponents=function(e){var n=e.query,i=e.mainType,a=s(n),o=a?this.queryComponents(a):ae(this._componentsMap.get(i),function(u){return!!u});return l(SL(o,e));function s(u){var c=i+"Index",f=i+"Id",h=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:i,index:u[c],id:u[f],name:u[h]}:null}function l(u){return e.filter?ae(u,e.filter):u}},t.prototype.eachComponent=function(e,n,i){var a=this._componentsMap;if(_t(e)){var o=n,s=e;a.each(function(f,h){for(var d=0;f&&d<f.length;d++){var v=f[d];v&&s.call(o,h,v,v.componentIndex)}})}else for(var l=ct(e)?a.get(e):xt(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var n=Xe(e,null);return ae(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return ae(this._componentsMap.get("series"),function(n){return!!n&&n.subType===e})},t.prototype.getSeries=function(){return ae(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,n){$f(this),L(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];e.call(n,a,i)},this)},t.prototype.eachRawSeries=function(e,n){L(this._componentsMap.get("series"),function(i){i&&e.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(e,n,i){$f(this),L(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,n,i){return L(this.getSeriesByType(e),n,i)},t.prototype.isSeriesFiltered=function(e){return $f(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,n){$f(this);var i=[];L(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=yt(i)},t.prototype.restoreData=function(e){Fp(this);var n=this._componentsMap,i=[];n.each(function(a,o){Wt.hasClass(o)&&i.push(o)}),Wt.topologicalTravel(i,Wt.getAllClassMainTypes(),function(a){L(n.get(a),function(o){o&&(a!=="series"||!vY(o,e))&&o.restoreData()})})},t.internalField=function(){Fp=function(e){var n=e._seriesIndices=[];L(e._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),e._seriesIndicesMap=yt(n)},$f=function(e){},yL=function(e,n){e.option={},e.option[_L]=dY,e._componentsMap=yt({series:[]}),e._componentsCount=yt();var i=n.aria;xt(i)&&i.enabled==null&&(i.enabled=!0),pY(n,e._theme.option),Ot(n,aY,!1),e._mergeOption(n,null)}}(),t}(fe);function vY(r,t){if(t){var e=t.seriesIndex,n=t.seriesId,i=t.seriesName;return e!=null&&r.componentIndex!==e||n!=null&&r.id!==n||i!=null&&r.name!==i}}function pY(r,t){var e=r.color&&!r.colorLayer;L(t,function(n,i){i==="colorLayer"&&e||Wt.hasClass(i)||(typeof n=="object"?r[i]=r[i]?Ot(r[i],n,!1):Tt(n):r[i]==null&&(r[i]=n))})}function xL(r,t,e){if(Q(t)){var n=yt();return L(t,function(a){if(a!=null){var o=Xe(a,null);o!=null&&n.set(a,!0)}}),ae(e,function(a){return a&&n.get(a[r])})}else{var i=Xe(t,null);return ae(e,function(a){return a&&i!=null&&a[r]===i})}}function SL(r,t){return t.hasOwnProperty("subType")?ae(r,function(e){return e&&e.subType===t.subType}):r}function wL(r){var t=yt();return r&&L(ce(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}ze(bL,Jb);var CL=bL,gY=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],mY=function(){function r(t){L(gY,function(e){this[e]=dt(t[e],t)},this)}return r}(),TL=mY,e1={},yY=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var n=[];L(e1,function(i,a){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(t,e){L(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){e1[t]=e},r.get=function(t){return e1[t]},r}(),Ou=yY,_Y=/^(min|max)?(.+)$/,bY=function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,n){t&&(L(ce(t.series),function(o){o&&o.data&&tn(o.data)&&Hc(o.data)}),L(ce(t.dataset),function(o){o&&o.source&&tn(o.source)&&Hc(o.source)})),t=Tt(t);var i=this._optionBackup,a=xY(t,e,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.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=[],Tt(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=Tt(n[i.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)SY(i[l].query,e,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!CY(o,this._currentMediaIndices)&&(s=J(o,function(c){return Tt(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},r}();function xY(r,t,e){var n=[],i,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&&Q(u)&&L(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),h(a),L(l,function(d){return h(d)}),L(n,function(d){return h(d.option)});function h(d){L(t,function(v){v(d,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function SY(r,t,e){var n={width:t,height:e,aspectratio:t/e},i=!0;return L(r,function(a,o){var s=o.match(_Y);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();wY(n[u],a,l)||(i=!1)}}),i}function wY(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function CY(r,t){return r.join(",")===t.join(",")}var TY=bY,Si=L,Wf=xt,ML=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function r1(r){var t=r&&r.itemStyle;if(!!t)for(var e=0,n=ML.length;e<n;e++){var i=ML[e],a=t.normal,o=t.emphasis;a&&a[i]&&(r[i]=r[i]||{},r[i].normal?Ot(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?Ot(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function Lr(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var n=r[t].normal,i=r[t].emphasis;n&&(e?(r[t].normal=r[t].emphasis=null,bt(r[t],n)):r[t]=n),i&&(r.emphasis=r.emphasis||{},r.emphasis[t]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function Gf(r){Lr(r,"itemStyle"),Lr(r,"lineStyle"),Lr(r,"areaStyle"),Lr(r,"label"),Lr(r,"labelLine"),Lr(r,"upperLabel"),Lr(r,"edgeLabel")}function je(r,t){var e=Wf(r)&&r[t],n=Wf(e)&&e.textStyle;if(n)for(var i=0,a=eA.length;i<a;i++){var o=eA[i];n.hasOwnProperty(o)&&(e[o]=n[o])}}function Wn(r){r&&(Gf(r),je(r,"label"),r.emphasis&&je(r.emphasis,"label"))}function MY(r){if(!!Wf(r)){r1(r),Gf(r),je(r,"label"),je(r,"upperLabel"),je(r,"edgeLabel"),r.emphasis&&(je(r.emphasis,"label"),je(r.emphasis,"upperLabel"),je(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(r1(t),Wn(t));var e=r.markLine;e&&(r1(e),Wn(e));var n=r.markArea;n&&Wn(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!tn(a))for(var o=0;o<a.length;o++)Wn(a[o]);L(r.categories,function(u){Gf(u)})}if(i&&!tn(i))for(var o=0;o<i.length;o++)Wn(i[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Wn(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)Q(l[o])?(Wn(l[o][0]),Wn(l[o][1])):Wn(l[o]);r.type==="gauge"?(je(r,"axisLabel"),je(r,"title"),je(r,"detail")):r.type==="treemap"?(Lr(r.breadcrumb,"itemStyle"),L(r.levels,function(u){Gf(u)})):r.type==="tree"&&Gf(r.leaves)}}function La(r){return Q(r)?r:r?[r]:[]}function DL(r){return(Q(r)?r[0]:r)||{}}function DY(r,t){Si(La(r.series),function(n){Wf(n)&&MY(n)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Si(e,function(n){Si(La(r[n]),function(i){i&&(je(i,"axisLabel"),je(i.axisPointer,"label"))})}),Si(La(r.parallel),function(n){var i=n&&n.parallelAxisDefault;je(i,"axisLabel"),je(i&&i.axisPointer,"label")}),Si(La(r.calendar),function(n){Lr(n,"itemStyle"),je(n,"dayLabel"),je(n,"monthLabel"),je(n,"yearLabel")}),Si(La(r.radar),function(n){je(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),Si(La(r.geo),function(n){Wf(n)&&(Wn(n),Si(La(n.regions),function(i){Wn(i)}))}),Si(La(r.timeline),function(n){Wn(n),Lr(n,"label"),Lr(n,"itemStyle"),Lr(n,"controlStyle",!0);var i=n.data;Q(i)&&L(i,function(a){xt(a)&&(Lr(a,"label"),Lr(a,"itemStyle"))})}),Si(La(r.toolbox),function(n){Lr(n,"iconStyle"),Si(n.feature,function(i){Lr(i,"iconStyle")})}),je(DL(r.axisPointer),"label"),je(DL(r.tooltip).axisPointer,"label")}function AY(r,t){for(var e=t.split(","),n=r,i=0;i<e.length&&(n=n&&n[e[i]],n!=null);i++);return n}function PY(r,t,e,n){for(var i=t.split(","),a=r,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];(n||a[i[s]]==null)&&(a[i[s]]=e)}function AL(r){r&&L(LY,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var LY=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],IY=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],n1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Uf(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<n1.length;e++){var n=n1[e][1],i=n1[e][0];t[n]!=null&&(t[i]=t[n])}}function PL(r){!r||r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function LL(r){!r||r.downplay&&!r.blur&&(r.blur=r.downplay)}function OY(r){!r||r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function IL(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&IL(r[e].children,t)}function OL(r,t){DY(r,t),r.series=ce(r.series),L(r.series,function(e){if(!!xt(e)){var n=e.type;if(n==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(n==="pie"||n==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),PL(e.label);var i=e.data;if(i&&!tn(i))for(var a=0;a<i.length;a++)PL(i[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(n==="gauge"){var o=AY(e,"pointer.color");o!=null&&PY(e,"itemStyle.color",o)}else if(n==="bar"){Uf(e),Uf(e.backgroundStyle),Uf(e.emphasis);var i=e.data;if(i&&!tn(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Uf(i[a]),Uf(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),LL(e),IL(e.data,LL)}else n==="graph"||n==="sankey"?OY(e):n==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&bt(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),AL(e)}}),r.dataRange&&(r.visualMap=r.dataRange),L(IY,function(e){var n=r[e];n&&(Q(n)||(n=[n]),L(n,function(i){AL(i)}))})}function EY(r){var t=yt();r.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),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;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(RY)}function RY(r){L(r,function(t,e){var n=[],i=[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 i;var d,v;s?v=o.getRawIndex(f):d=o.get(t.stackedByDimension,f);for(var p=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,d)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=y9(h,y),p=y;break}}}return n[0]=h,n[1]=p,n})})}var Vp=function(){function r(t){this.data=t.data||(t.sourceFormat===Zi?{}:[]),this.sourceFormat=t.sourceFormat||fL,this.seriesLayoutBy=t.seriesLayoutBy||Ki,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];i.type==null&&vL(this,n)===br.Must&&(i.type="ordinal")}}return r}();function i1(r){return r instanceof Vp}function a1(r,t,e){e=e||EL(r);var n=t.seriesLayoutBy,i=NY(r,e,n,t.sourceHeader,t.dimensions),a=new Vp({data:r,sourceFormat:e,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Tt(t)});return a}function o1(r){return new Vp({data:r,sourceFormat:tn(r)?wo:Hn})}function kY(r){return new Vp({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Tt(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function EL(r){var t=fL;if(tn(r))t=wo;else if(Q(r)){r.length===0&&(t=Pr);for(var e=0,n=r.length;e<n;e++){var i=r[e];if(i!=null){if(Q(i)){t=Pr;break}else if(xt(i)){t=$n;break}}}}else if(xt(r)){for(var a in r)if(pt(r,a)&&mr(r[a])){t=Zi;break}}return t}function NY(r,t,e,n,i){var a,o;if(!r)return{dimensionsDefine:RL(i),startIndex:o,dimensionsDetectedCount:a};if(t===Pr){var s=r;n==="auto"||n==null?kL(function(u){u!=null&&u!=="-"&&(ct(u)?o==null&&(o=1):o=0)},e,s,10):o=qt(n)?n:n?1:0,!i&&o===1&&(i=[],kL(function(u,c){i[c]=u!=null?u+"":""},e,s,1/0)),a=i?i.length:e===Iu?s.length:s[0]?s[0].length:null}else if(t===$n)i||(i=BY(r));else if(t===Zi)i||(i=[],L(r,function(u,c){i.push(c)}));else if(t===Hn){var l=hu(r[0]);a=Q(l)&&l.length||1}return{startIndex:o,dimensionsDefine:RL(i),dimensionsDetectedCount:a}}function BY(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e){var n=[];return L(e,function(i,a){n.push(a)}),n}}function RL(r){if(!!r){var t=yt();return J(r,function(e,n){e=xt(e)?e:{name:e};var i={name:e.name,displayName:e.displayName,type:e.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function kL(r,t,e,n){if(t===Iu)for(var i=0;i<e.length&&i<n;i++)r(e[i]?e[i][0]:null,i);else for(var a=e[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function NL(r){var t=r.sourceFormat;return t===$n||t===Zi}var qs,js,Xs,BL,zL,FL=function(){function r(t,e){var n=i1(t)?t:o1(t);this._source=n;var i=this._data=n.data;n.sourceFormat===wo&&(this._offset=0,this._dimSize=e,this._data=i),zL(this,i,n)}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;zL=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,d=BL[l1(u,c)];if(K(o,d),u===wo)o.getItem=e,o.count=i,o.fillStorage=n;else{var v=HL(u,c);o.getItem=dt(v,null,s,f,h);var p=WL(u,c);o.count=dt(p,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},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var d=u[h],v=d[0]==null?1/0:d[0],p=d[1]==null?-1/0:d[1],g=s-o,m=l[h],y=0;y<g;y++){var _=c[y*f+h];m[o+y]=_,_<v&&(v=_),_>p&&(p=_)}d[0]=v,d[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};BL=(t={},t[Pr+"_"+Ki]={pure:!0,appendData:a},t[Pr+"_"+Iu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[$n]={pure:!0,appendData:a},t[Zi]={pure:!0,appendData:function(o){var s=this._data;L(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Hn]={appendData:a},t[wo]={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}(),VL=function(r,t,e,n){return r[n]},zY=(qs={},qs[Pr+"_"+Ki]=function(r,t,e,n){return r[n+t]},qs[Pr+"_"+Iu]=function(r,t,e,n,i){n+=t;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},qs[$n]=VL,qs[Zi]=function(r,t,e,n,i){for(var a=i||[],o=0;o<e.length;o++){var s=e[o].name,l=r[s];a[o]=l?l[n]:null}return a},qs[Hn]=VL,qs);function HL(r,t){var e=zY[l1(r,t)];return e}var $L=function(r,t,e){return r.length},FY=(js={},js[Pr+"_"+Ki]=function(r,t,e){return Math.max(0,r.length-t)},js[Pr+"_"+Iu]=function(r,t,e){var n=r[0];return n?Math.max(0,n.length-t):0},js[$n]=$L,js[Zi]=function(r,t,e){var n=e[0].name,i=r[n];return i?i.length:0},js[Hn]=$L,js);function WL(r,t){var e=FY[l1(r,t)];return e}var s1=function(r,t,e){return r[t]},VY=(Xs={},Xs[Pr]=s1,Xs[$n]=function(r,t,e){return r[e]},Xs[Zi]=s1,Xs[Hn]=function(r,t,e){var n=hu(r);return n instanceof Array?n[t]:n},Xs[wo]=s1,Xs);function GL(r){var t=VY[r];return t}function l1(r,t){return r===Pr?r+"_"+t:r}function Eu(r,t,e){if(!!r){var n=r.getRawDataItem(t);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=i.getDimensionProperty(o);return GL(a)(n,o,s)}else{var l=n;return a===Hn&&(l=hu(n)),l}}}}var HY=/\{@(.+?)\}/g,u1=function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",d=n.userOutput&&n.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:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,i,a,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&Q(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(_t(a))return l.status=e,l.dimensionIndex=i,a(l);if(ct(a)){var c=jb(a,l);return c.replace(HY,function(f,h){var d=h.length,v=h;v.charAt(0)==="["&&v.charAt(d-1)==="]"&&(v=+v.slice(1,d-1));var p=Eu(s,t,v);if(o&&Q(o.interpolatedValue)){var g=s.getDimensionIndex(v);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Eu(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function UL(r){var t,e;return xt(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Yf(r){return new $Y(r)}var $Y=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,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(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(n)),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 d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d<v)){var p=this._progress;if(Q(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],d,v,l,u);else this._doProgress(p,d,v,l,u)}this._dueIndex=v;var m=this._settedOutputEnd!=null?this._settedOutputEnd:v;this._outputDueEnd=m}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,n,i,a){YL.reset(e,n,i,a),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:YL.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),Q(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},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}(),YL=function(){var r,t,e,n,i,a={reset:function(l,u,c,f){t=l,r=u,e=c,n=f,i=Math.ceil(n/e),a.next=e>1&&n>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%i*e+Math.ceil(t/i),u=t>=r?null:l<n?l:t;return t++,u}}();function Co(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!qt(r)&&r!=null&&r!=="-"&&(r=+xn(r)),r==null||r===""?NaN:+r)}var WY=yt({number:function(r){return parseFloat(r)},time:function(r){return+xn(r)},trim:function(r){return ct(r)?On(r):r}});function qL(r){return WY.get(r)}var jL={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}},GY=function(){function r(t,e){if(!qt(e)){var n="";ie(n)}this._opFn=jL[t],this._rvalFloat=Wi(e)}return r.prototype.evaluate=function(t){return qt(t)?this._opFn(t,this._rvalFloat):this._opFn(Wi(t),this._rvalFloat)},r}(),XL=function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=qt(t)?t:Wi(t),i=qt(e)?e:Wi(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ct(t),l=ct(e);s&&(n=l?t:0),l&&(i=s?e:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r}(),UY=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Wi(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=Wi(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function YY(r,t){return r==="eq"||r==="ne"?new UY(r==="eq",t):pt(jL,r)?new GY(r,t):null}var qY=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 Co(t,e)},r}();function jY(r,t){var e=new qY,n=r.data,i=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ki&&ie(o);var s=[],l={},u=r.dimensionsDefine;if(u)L(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";pt(l,m)&&ie(_),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=HL(i,Ki);t.__isBuiltIn&&(e.getRawDataItem=function(p){return f(n,a,s,p)},e.getRawData=dt(XY,null,r)),e.cloneRawData=dt(ZY,null,r);var h=WL(i,Ki);e.count=dt(h,null,n,a,s);var d=GL(i);e.retrieveValue=function(p,g){var m=f(n,a,s,p);return v(m,g)};var v=e.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return d(p,g,m.name)}};return e.getDimensionInfo=dt(KY,null,s,l),e.cloneAllDimensionInfo=dt(QY,null,s),e}function XY(r){var t=r.sourceFormat;if(!c1(t)){var e="";ie(e)}return r.data}function ZY(r){var t=r.sourceFormat,e=r.data;if(!c1(t)){var n="";ie(n)}if(t===Pr){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].slice());return i}else if(t===$n){for(var i=[],a=0,o=e.length;a<o;a++)i.push(K({},e[a]));return i}}function KY(r,t,e){if(e!=null){if(qt(e)||!isNaN(e)&&!pt(t,e))return r[e];if(pt(t,e))return t[e]}}function QY(r){return Tt(r)}var ZL=yt();function JY(r){r=Tt(r);var t=r.type,e="";t||ie(e);var n=t.split(":");n.length!==2&&ie(e);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),r.__isBuiltIn=i,ZL.set(t,r)}function tq(r,t,e){var n=ce(r),i=n.length,a="";i||ie(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=eq(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function eq(r,t,e,n){var i="";t.length||ie(i),xt(r)||ie(i);var a=r.type,o=ZL.get(a);o||ie(i);var s=J(t,function(u){return jY(u,o)}),l=ce(o.transform({upstream:s[0],upstreamList:s,config:Tt(r.config)}));return J(l,function(u,c){var f="";xt(u)||ie(f),u.data||ie(f);var h=EL(u.data);c1(h)||ie(f);var d,v=t[0];if(v&&c===0&&!u.dimensions){var p=v.startIndex;p&&(u.data=v.data.slice(0,p).concat(u.data)),d={seriesLayoutBy:Ki,sourceHeader:p,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Ki,sourceHeader:0,dimensions:u.dimensions};return a1(u.data,d,null)})}function c1(r){return r===Pr||r===$n}var Hp="undefined",rq=typeof Uint32Array===Hp?Array:Uint32Array,nq=typeof Uint16Array===Hp?Array:Uint16Array,KL=typeof Int32Array===Hp?Array:Int32Array,QL=typeof Float64Array===Hp?Array:Float64Array,JL={float:QL,int:KL,ordinal:Array,number:Array,time:QL},f1;function qf(r){return r>65535?rq:nq}function Ru(){return[1/0,-1/0]}function iq(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function tI(r,t,e,n,i){var a=JL[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(n)}var aq=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=yt()}return r.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=f1[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],NL(i),this._dimensions=J(e,function(o){return{type:o.type,property:o.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 n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===e)return a}else a=i.length;return i[a]={type:e},n.set(t,a),this._chunks[a]=new JL[e||"float"](this._rawCount),this._rawExtent[a]=Ru(),a},r.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=Ru());for(var l=a[t],u=o;u<s;u++){var c=n[u]=e.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=e,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var c=i[u];tI(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var d=h-s,v=0;v<a;v++){var c=i[v],p=f1.arrayRows.call(this,t[d]||f,c.property,d,v);n[v][h]=p;var g=o[v];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=J(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Ru()),tI(a,c,f.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,a,l);else for(var h=[],d=t;d<e;d++){h=i.getItem(d,h);for(var v=0;v<s;v++){var p=a[v],g=this._dimValueGetter(h,u[v],d,v);p[d]=g;var m=l[v];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.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 n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var n=[],i=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],e));return n},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var n=e.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[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,n=e[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(e[o]<t)i=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c<f;c++){var h=this.getRawIndex(c),d=e-a[h],v=Math.abs(d);v<=n&&((v<s||v===s&&d>=0&&l<0)&&(s=v,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=e[a]}else t=new n(e.buffer,0,i)}else{var n=qf(this._rawCount);t=new n(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 n=this.clone(),i=n.count(),a=qf(n._rawCount),o=new a(i),s=[],l=t.length,u=0,c=t[0],f=n._chunks,h=0;h<i;h++){var d=void 0,v=n.getRawIndex(h);if(l===0)d=e(h);else if(l===1){var p=f[c][v];d=e(p,h)}else{for(var g=0;g<l;g++)s[g]=f[t[g]][v];s[g]=h,d=e.apply(null,s)}d&&(o[u++]=v)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=Ht(t),a=i.length;if(!a)return this;var o=e.count(),s=qf(e._rawCount),l=new s(o),u=0,c=i[0],f=t[c][0],h=t[c][1],d=e._chunks,v=!1;if(!e._indices){var p=0;if(a===1){for(var g=d[i[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=h||isNaN(y))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=d[i[0]],_=d[i[1]],b=t[i[1]][0],S=t[i[1]][1],m=0;m<n;m++){var y=g[m],x=_[m];(y>=f&&y<=h||isNaN(y))&&(x>=b&&x<=S||isNaN(x))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var m=0;m<o;m++){var w=e.getRawIndex(m),y=d[i[0]][w];(y>=f&&y<=h||isNaN(y))&&(l[u++]=w)}else for(var m=0;m<o;m++){for(var C=!0,w=e.getRawIndex(m),T=0;T<a;T++){var D=i[T],y=d[D][w];(y<t[D][0]||y>t[D][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,n){for(var i=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<e.length;c++)u[e[c]]=Ru();for(var f=0;f<s;f++){for(var h=t.getRawIndex(f),d=0;d<o;d++)l[d]=i[e[d]][h];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var c=0;c<v.length;c++){var p=e[c],g=v[c],m=u[p],y=i[p];y&&(y[h]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,h,d=new(qf(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;v<o-1;v+=l){for(var p=Math.min(v+l,o-1),g=Math.min(v+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var b=this.getRawIndex(_),S=a[b];isNaN(S)||(y+=S)}y/=g-p;var x=v,w=Math.min(v+l,o),C=v-1,T=a[u];c=-1,h=x;for(var D=-1,A=0,_=x;_<w;_++){var b=this.getRawIndex(_),S=a[b];if(isNaN(S)){A++,D<0&&(D=b);continue}f=Math.abs((C-m)*(S-T)-(C-_)*(y-T)),f>c&&(c=f,h=b)}A>0&&A<w-x&&(d[s++]=Math.min(D,h),h=Math.max(D,h)),d[s++]=h,u=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},r.prototype.downSample=function(t,e,n,i){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]=Ru(),h=new(qf(this._rawCount))(Math.ceil(c/l)),d=0,v=0;v<c;v+=l){l>c-v&&(l=c-v,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(v+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(v+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(!!this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:e(a);break;case 1:e(i[t[0]][s],a);break;case 2:e(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],n=Ru();if(!e)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=e[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][e]);return n},r.prototype.clone=function(t,e){var n=new r,i=this._chunks,a=t&&In(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?iq(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),e||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Tt(this._extent),t._rawExtent=Tt(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}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,n,i,a){return Co(e[a],this._dimensions[a])}f1={arrayRows:t,objectRows:function(e,n,i,a){return Co(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return Co(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}}(),r}(),h1=aq,eI=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(),n=!!e.length,i,a;if($p(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){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=tn(s)?wo:Hn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Et(f.seriesLayoutBy,h.seriesLayoutBy)||null,v=Et(f.sourceHeader,h.sourceHeader),p=Et(f.dimensions,h.dimensions),g=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||p;i=g?[a1(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[a1(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&nI(a)}var o,s=[],l=[];return L(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&nI(f),s.push(c),l.push(u._getVersionSign())}),n?o=tq(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[kY(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 n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[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,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];$p(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,n):(s=new h1,s.initData(new FL(e,t.length),t)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if($p(t)){var e=Kb(t);return e?[e.getSourceManager()]:[]}else return J(sY(t),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,n,i;if($p(t))e=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:n,dimensions:i}},r}();function rI(r){var t=r.option.transform;t&&Hc(r.option.transform)}function $p(r){return r.mainType==="series"}function nI(r){throw new Error(r)}var iI="line-height:1";function aI(r,t){var e=r.color||"#6e7079",n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Vr(n+"")+"px;color:"+Vr(e)+";font-weight:"+Vr(i+""),valueStyle:"font-size:"+Vr(o+"")+"px;color:"+Vr(a)+";font-weight:"+Vr(s+"")}:{nameStyle:{fontSize:n,fill:e,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var oq=[0,10,20,30],sq=["",`
|
|
201
|
+
`,`
|
|
202
|
+
|
|
203
|
+
`,`
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
`];function nr(r,t){return t.type=r,t}function d1(r){return r.type==="section"}function oI(r){return d1(r)?lq:uq}function sI(r){if(d1(r)){var t=0,e=r.blocks.length,n=e>1||e>0&&!r.noHeader;return L(r.blocks,function(i){var a=sI(i);a>=t&&(t=a+ +(n&&(!a||d1(i)&&!i.noHeader)))}),t}return 0}function lq(r,t,e,n){var i=t.noHeader,a=cq(sI(t)),o=[],s=t.blocks||[];Mr(!s||Q(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(pt(u,l)){var c=new XL(u[l],null);s.sort(function(v,p){return c.evaluate(v.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}L(s,function(v,p){var g=t.valueFormatter,m=oI(v)(g?K(K({},r),{valueFormatter:g}):r,v,p>0?a.html:0,n);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(a.richText):v1(o.join(""),i?e:a.html);if(i)return f;var h=Yb(t.header,"ordinal",r.useUTC),d=aI(n,r.renderMode).nameStyle;return r.renderMode==="richText"?uI(r,h,d)+a.richText+f:v1('<div style="'+d+";"+iI+';">'+Vr(h)+"</div>"+f,e)}function uq(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(b){return b=Q(b)?b:[b],J(b,function(S,x){return Yb(S,Q(d)?d[x]:d,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),h=a?"":Yb(l,"ordinal",u),d=t.valueType,v=o?[]:c(t.value),p=!s||!a,g=!s&&a,m=aI(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":f)+(a?"":uI(r,h,y))+(o?"":dq(r,v,p,g,_)):v1((s?"":f)+(a?"":fq(h,!s,y))+(o?"":hq(v,p,g,_)),e)}}function lI(r,t,e,n,i,a){if(!!r){var o=oI(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function cq(r){return{html:oq[r],richText:sq[r]}}function v1(r,t){var e='<div style="clear:both"></div>',n="margin: "+t+"px 0 0";return'<div style="'+n+";"+iI+';">'+r+e+"</div>"}function fq(r,t,e){var n=t?"margin-left:2px":"";return'<span style="'+e+";"+n+'">'+Vr(r)+"</span>"}function hq(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=Q(r)?r:[r],'<span style="'+a+";"+n+'">'+J(r,function(o){return Vr(o)}).join(" ")+"</span>"}function uI(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function dq(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(Q(t)?t.join(" "):t,a)}function cI(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Gs(n)}function fI(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var p1=function(){function r(){this.richTextStyles={},this._nextStyleNameId=j2()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=oL({color:e,type:t,renderMode:n,markerId:i});return ct(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};Q(e)?L(e,function(a){return K(n,a)}):K(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r}();function hI(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=Q(s),u=cI(t,e),c,f,h,d;if(o>1||l&&!o){var v=vq(s,t,e,a,u);c=v.inlineValues,f=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);d=c=Eu(i,e,a[0]),f=p.type}else d=c=l?s[0]:s;var g=U_(t),m=g&&t.name||"",y=i.getName(e),_=n?m:y;return nr("section",{header:m,noHeader:n||!g,sortParam:d,blocks:[nr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!On(_),value:c,valueType:f})].concat(h||[])})}function vq(r,t,e,n,i){var a=t.getData(),o=In(r,function(f,h,d){var v=a.getDimensionInfo(d);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?L(n,function(f){c(Eu(a,e,f),f)}):L(r,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(nr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var To=jt();function Wp(r,t){return r.getName(t)||r.getId(t)}var Gp="__universalTransitionEnabled",Up=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Yf({count:gq,reset:mq}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=To(this).sourceManager=new eI(this);a.prepareSource();var o=this.getInitialData(e,i);vI(o,this),this.dataTask.context.data=o,To(this).dataBeforeProcessed=o,dI(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Hf(this),a=i?Au(e):{},o=this.subType;Wt.hasClass(o)&&(o+="Series"),Ot(e,n.getTheme().get(this.subType)),Ot(e,this.getDefaultOption()),Cs(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&So(e,a,i)},t.prototype.mergeOption=function(e,n){e=Ot(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Hf(this);i&&So(this.option,e,i);var a=To(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);vI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,To(this).dataBeforeProcessed=o,dI(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!tn(e))for(var n=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&Cs(e[i],"label",n)},t.prototype.getInitialData=function(e,n){},t.prototype.appendData=function(e){var n=this.getRawData();n.appendData(e.data)},t.prototype.getData=function(e){var n=g1(this);if(n){var i=n.context.data;return e==null?i:i.getLinkedData(e)}else return To(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var n=g1(this);if(n){var i=n.context;i.outputData=e,n!==this.dataTask&&(i.data=e)}To(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return yt(e)},t.prototype.getSourceManager=function(){return To(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return To(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.formatTooltip=function(e,n,i){return hI({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Yt.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=Jb.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),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,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(!!i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Wp(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,n){for(var i=[],a=0;a<e.length;a++)i[0]=e[a],this.isSelected(e[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,n=Ht(e),i=[],a=0;a<n.length;a++){var o=e[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Wp(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Gp])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){xt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Wp(e,f);u[h]=!0,this._selectedDataIndicesMap[h]=e.getRawIndex(f)}}else if(s==="single"||s===!0){var d=n[l-1],h=Wp(e,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=e.getRawIndex(d),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var n=[];e.hasItemOption&&e.each(function(i){var a=e.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(e,n)}},t.registerClass=function(e){return Wt.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}(Wt);ze(Up,u1),ze(Up,Jb),sA(Up,Wt);function dI(r){var t=r.name;U_(r)||(r.name=pq(r)||t)}function pq(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return L(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function gq(r){return r.model.getRawData().count()}function mq(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),yq}function yq(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function vI(r,t){L($c(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,It(_q,t))})}function _q(r,t){var e=g1(r);return e&&e.setOutputEnd((t||this).count()),t}function g1(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var _e=Up,m1=function(){function r(){this.group=new Dt,this.uid=Tu("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();j_(m1),tp(m1);var Me=m1;function ku(){var r=jt();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pI=jt(),bq=ku(),y1=function(){function r(){this.group=new Dt,this.uid=Tu("viewChart"),this.renderTask=Yf({plan:xq,reset:Sq}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);!a||mI(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);!a||mI(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){bo(this.group,t)},r.markUpdateMethod=function(t,e){pI(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function gI(r,t,e){r&&Tf(r)&&(t==="emphasis"?Aa:Pa)(r,e)}function mI(r,t,e){var n=Ts(r,t),i=t&&t.highlightKey!=null?X6(t.highlightKey):null;n!=null?L(ce(n),function(a){gI(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){gI(a,e,i)})}j_(y1),tp(y1);function xq(r){return bq(r.model)}function Sq(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&pI(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),wq[l]}var wq={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)}}},he=y1,Yp="\0__throttleOriginMethod",yI="\0__throttleRate",_I="\0__throttleType";function qp(r,t,e){var n,i=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 d=[],v=0;v<arguments.length;v++)d[v]=arguments[v];n=new Date().getTime(),l=this,u=d;var p=c||t,g=c||e;c=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Nu(r,t,e,n){var i=r[t];if(!!i){var a=i[Yp]||i,o=i[_I],s=i[yI];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=qp(a,e,n==="debounce"),i[Yp]=a,i[_I]=n,i[yI]=e}return i}}function jf(r,t){var e=r[t];e&&e[Yp]&&(e.clear&&e.clear(),r[t]=e[Yp])}var bI=jt(),xI={itemStyle:Ds(YP,!0),lineStyle:Ds(UP,!0)},Cq={lineStyle:"stroke",itemStyle:"fill"};function SI(r,t){var e=r.visualStyleMapper||xI[t];return e||(console.warn("Unknown style type '"+t+"'."),xI.itemStyle)}function wI(r,t){var e=r.visualDrawType||Cq[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var Tq={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=SI(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=wI(r,n),u=o[l],c=_t(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"||_t(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||_t(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(d,v){var p=r.getDataParams(v),g=K({},o);g[l]=c(p),d.setItemVisual(v,"style",g)}}}},Xf=new fe,Mq={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=SI(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Xf.option=l[n];var u=i(Xf),c=o.ensureUniqueItemVisual(s,"style");K(c,u),Xf.option.decal&&(o.setItemVisual(s,"decal",Xf.option.decal),Xf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Dq={performRawSeries:!0,overallReset:function(r){var t=yt();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),bI(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=bI(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=wI(e,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",v=n.count();h[l]=e.getColorFromPalette(d,o,v)}})}})}},jp=Math.PI;function Aq(r,t){t=t||{},bt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Dt,n=new Gt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Ut({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 Gt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new mp({shape:{startAngle:-jp/2,endAngle:-jp/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:jp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:jp*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.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}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Pq=function(){function r(t,e,n,i){this._stageTaskMap=yt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(!!t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.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 n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=yt();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;L(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";Mr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,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,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;L(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(g){s(i,g)&&(g.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,i.block);v.each(function(g){g.perform(p)}),h.perform(p)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.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(n){e=n.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,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=yt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||Yf({plan:Rq,reset:kq,count:Bq}));d.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,d)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||Yf({reset:Lq});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=yt(),u=t.seriesType,c=t.getTargetSeries,f=!0,h=!1,d="";Mr(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,L(n.getSeries(),v));function v(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(h=!0,Yf({reset:Iq,onDirty:Eq})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return _t(t)&&(t={overallReset:t,seriesType:zq(t)}),t.uid=Tu("stageHandler"),e&&(t.visualType=e),t},r}();function Lq(r){r.overallReset(r.ecModel,r.api,r.payload)}function Iq(r){return r.overallProgress&&Oq}function Oq(){this.agent.dirty(),this.getDownstream().dirty()}function Eq(){this.agent&&this.agent.dirty()}function Rq(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function kq(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=ce(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?J(t,function(e,n){return CI(n)}):Nq}var Nq=CI(0);function CI(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function Bq(r){return r.data.count()}function zq(r){Xp=null;try{r(Zf,TI)}catch{}return Xp}var Zf={},TI={},Xp;MI(Zf,CL),MI(TI,TL),Zf.eachSeriesByType=Zf.eachRawSeriesByType=function(r){Xp=r},Zf.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Xp=r.subType)};function MI(r,t){for(var e in t.prototype)r[e]=Fe}var DI=Pq,AI=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Fq={color:AI,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],AI]},qr="#B9B8CE",PI="#100C2A",Zp=function(){return{axisLine:{lineStyle:{color:qr}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},LI=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],II={darkMode:!0,color:LI,backgroundColor:PI,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:qr}},textStyle:{color:qr},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:qr}},dataZoom:{borderColor:"#71708A",textStyle:{color:qr},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:qr}},timeline:{lineStyle:{color:qr},label:{color:qr},controlStyle:{color:qr,borderColor:qr}},calendar:{itemStyle:{color:PI},dayLabel:{color:qr},monthLabel:{color:qr},yearLabel:{color:qr}},timeAxis:Zp(),logAxis:Zp(),valueAxis:Zp(),categoryAxis:Zp(),line:{symbol:"circle"},graph:{color:LI},gauge:{title:{color:qr},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:qr},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};II.categoryAxis.splitLine.show=!1;var Vq=II,Hq=function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},n={},i={};if(ct(t)){var a=Gi(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};L(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],d=u.lastIndexOf(h);if(d>0&&d===u.length-h.length){var v=u.slice(0,d);v!=="data"&&(e.mainType=v,e[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.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,i,a));function c(f,h,d,v){return f[d]==null||h[v||d]===f[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),_1=["symbol","symbolSize","symbolRotate","symbolOffset"],OI=_1.concat(["symbolKeepAspect"]),$q={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 n={},i={},a=!1,o=0;o<_1.length;o++){var s=_1[o],l=r.get(s);_t(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,e.setVisual(K({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),t.isSeriesFiltered(r))return;var u=Ht(i);function c(f,h){for(var d=r.getRawValue(h),v=r.getDataParams(h),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(h,g,i[g](d,v))}}return{dataEach:a?c:null}}},Wq={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<OI.length;s++){var l=OI[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?n:null}}};function b1(r,t,e){switch(e){case"color":var n=r.getItemVisual(t,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function Kf(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)}}function EI(r,t,e,n){switch(e){case"color":var i=r.ensureUniqueItemVisual(t,"style");i[r.getVisual("drawType")]=n,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,n);break}}function RI(r,t){function e(n,i){var a=[];return n.eachComponent({mainType:"series",subType:r,query:i},function(o){a.push(o.seriesIndex)}),a}L([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=K({},i),o.dispatchAction(K(i,{type:n[1],seriesIndex:e(a,i)}))})})}function Bu(r,t,e,n,i){var a=r+t;e.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=Ts(f,i.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:Q(h)?f.getName(h[0]):f.getName(h),selected:ct(l)?l:K({},l)})}})}function Gq(r,t,e){r.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(Bu("map","selectchanged",t,i,n),Bu("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Bu("map","selected",t,i,n),Bu("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Bu("map","unselected",t,i,n),Bu("pie","unselected",t,i,n))})}function Zs(r,t,e){for(var n;r&&!(t(r)&&(n=r,e));)r=r.__hostTarget||r.parent;return n}var Uq=Math.round(Math.random()*9),Yq=typeof Object.defineProperty=="function",qq=function(){function r(){this._id="__ec_inner_"+Uq++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var n=this._guard(t);return Yq?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[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}(),jq=qq,Xq=Ft.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n+a),r.lineTo(e-i,n+a),r.closePath()}}),Zq=Ft.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n),r.lineTo(e,n+a),r.lineTo(e-i,n),r.closePath()}}),Kq=Ft.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),d=o*.6,v=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*d,l+s+h*d,e,n-v,e,n),r.bezierCurveTo(e,n-v,e-c+f*d,l+s+h*d,e-c,l+s),r.closePath()}}),Qq=Ft.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+e),r.lineTo(i,a+e/4*3),r.lineTo(i-o,a+e),r.lineTo(i,a),r.closePath()}}),Jq={line:er,rect:Gt,roundRect:Gt,square:Gt,circle:yi,diamond:Zq,pin:Kq,arrow:Qq,triangle:Xq},tj={line:function(r,t,e,n,i){i.x1=r,i.y1=t+n/2,i.x2=r+e,i.y2=t+n/2},rect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n},roundRect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n,i.r=Math.min(e,n)/4},square:function(r,t,e,n,i){var a=Math.min(e,n);i.x=r,i.y=t,i.width=a,i.height=a},circle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.r=Math.min(e,n)/2},diamond:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n},pin:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},arrow:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},triangle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n}},Kp={};L(Jq,function(r,t){Kp[t]=new r});var ej=Ft.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=Zv(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var i=Kp[n];i||(n="rect",i=Kp[n]),tj[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function rj(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function $e(r,t,e,n,i,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=Pb(r.slice(8),new kt(t,e,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=Of(r.slice(7),{},new kt(t,e,n,i),o?"center":"cover"):l=new ej({shape:{symbolType:r,x:t,y:e,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=rj,a&&l.setColor(a),l}function Qf(r){return Q(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function zu(r,t){if(r!=null)return Q(r)||(r=[r,r]),[at(r[0],t[0])||0,at(Et(r[1],r[0]),t[1])||0]}function Ks(r){return isFinite(r)}function nj(r,t,e){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*e.width+e.x,i=i*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),n=Ks(n)?n:0,i=Ks(i)?i:1,a=Ks(a)?a:0,o=Ks(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function ij(r,t,e){var n=e.width,i=e.height,a=Math.min(n,i),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*n+e.x,s=s*i+e.y,l=l*a),o=Ks(o)?o:.5,s=Ks(s)?s:.5,l=l>=0&&Ks(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function x1(r,t,e){for(var n=t.type==="radial"?ij(r,t,e):nj(r,t,e),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function aj(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 Qp(r){return parseInt(r,10)}function Fu(r,t,e){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[n]!=null&&e[n]!=="auto")return parseFloat(e[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||Qp(s[n])||Qp(r.style[n]))-(Qp(s[a])||0)-(Qp(s[o])||0)|0}function oj(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:qt(r)?[r]:Q(r)?r:null}function S1(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&oj(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=J(e,function(a){return a/i}),n/=i)}return[e,n]}var sj=new ji(!0);function Jp(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function kI(r){return typeof r=="string"&&r!=="none"}function tg(r){var t=r.fill;return t!=null&&t!=="none"}function NI(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 BI(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 w1(r,t,e){var n=Z_(t.image,t.__image,e);if(ep(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Gc),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lj(r,t,e,n){var i,a=Jp(e),o=tg(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||sj,f=t.__dirty;if(!n){var h=e.fill,d=e.stroke,v=o&&!!h.colorStops,p=a&&!!d.colorStops,g=o&&!!h.image,m=a&&!!d.image,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0;(v||p)&&(x=t.getBoundingRect()),v&&(y=f?x1(r,h,x):t.__canvasFillGradient,t.__canvasFillGradient=y),p&&(_=f?x1(r,d,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(b=f||!t.__canvasFillPattern?w1(r,h,t):t.__canvasFillPattern,t.__canvasFillPattern=b),m&&(S=f||!t.__canvasStrokePattern?w1(r,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),v?r.fillStyle=y:g&&(b?r.fillStyle=b:o=!1),p?r.strokeStyle=_:m&&(S?r.strokeStyle=S:a=!1)}var w=t.getGlobalScale();c.setScale(w[0],w[1],t.segmentIgnoreThreshold);var C,T;r.setLineDash&&e.lineDash&&(i=S1(t),C=i[0],T=i[1]);var D=!0;(u||f&iu)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),D=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),D&&c.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=T),n||(e.strokeFirst?(a&&BI(r,e),o&&NI(r,e)):(o&&NI(r,e),a&&BI(r,e))),C&&r.setLineDash([])}function uj(r,t,e){var n=t.__image=Z_(e.image,t.__image,t,t.onload);if(!(!n||!ep(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,c=e.sy||0;r.drawImage(n,u,c,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,c=e.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function cj(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||eo,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=S1(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Jp(e)&&r.strokeText(i,e.x,e.y),tg(e)&&r.fillText(i,e.x,e.y)):(tg(e)&&r.fillText(i,e.x,e.y),Jp(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var zI=["shadowBlur","shadowOffsetX","shadowOffsetY"],FI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function VI(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){on(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?As.opacity:o}(n||t.blend!==e.blend)&&(a||(on(r,i),a=!0),r.globalCompositeOperation=t.blend||As.blend);for(var s=0;s<zI.length;s++){var l=zI[s];(n||t[l]!==e[l])&&(a||(on(r,i),a=!0),r[l]=r.dpr*(t[l]||0))}return(n||t.shadowColor!==e.shadowColor)&&(a||(on(r,i),a=!0),r.shadowColor=t.shadowColor||As.shadowColor),a}function HI(r,t,e,n,i){var a=Jf(t,i.inHover),o=n?null:e&&Jf(e,i.inHover)||{};if(a===o)return!1;var s=VI(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(on(r,i),s=!0),kI(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(on(r,i),s=!0),kI(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(on(r,i),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||(on(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<FI.length;c++){var f=FI[c],h=f[0];(n||a[h]!==o[h])&&(s||(on(r,i),s=!0),r[h]=a[h]||f[1])}return s}function fj(r,t,e,n,i){return VI(r,Jf(t,i.inHover),e&&Jf(e,i.inHover),n,i)}function $I(r,t){var e=t.transform,n=r.dpr||1;e?r.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):r.setTransform(n,0,0,n,0,0)}function hj(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),$I(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=n}function dj(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 WI=1,GI=2,UI=3,YI=4;function vj(r){var t=tg(r),e=Jp(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 on(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function Jf(r,t){return t&&r.__hoverStyle||r.style}function C1(r,t){Qs(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Qs(r,t,e,n){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~yn,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||aj(a,o))&&(o&&o.length&&(on(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(on(r,e),r.save(),hj(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var c=t instanceof Ft&&t.autoBatch&&vj(t.style);s||dj(i,u.transform)?(on(r,e),$I(r,t)):c||on(r,e);var f=Jf(t,e.inHover);t instanceof Ft?(e.lastDrawType!==WI&&(l=!0,e.lastDrawType=WI),HI(r,t,u,l,e),(!c||!e.batchFill&&!e.batchStroke)&&r.beginPath(),lj(r,t,f,c),c&&(e.batchFill=f.fill||"",e.batchStroke=f.stroke||"")):t instanceof bf?(e.lastDrawType!==UI&&(l=!0,e.lastDrawType=UI),HI(r,t,u,l,e),cj(r,t,f)):t instanceof ur?(e.lastDrawType!==GI&&(l=!0,e.lastDrawType=GI),fj(r,t,u,l,e),uj(r,t,f)):t.getTemporalDisplayables&&(e.lastDrawType!==YI&&(l=!0,e.lastDrawType=YI),pj(r,t,e)),c&&n&&on(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function pj(r,t,e){var n=t.getDisplayables(),i=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Qs(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Qs(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var T1=new jq,qI=new ef(100),jI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Vu(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";r.dirty&&T1.delete(r);var a=T1.get(r);if(a)return a;var o=bt(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=i?1:1/e,T1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[e],f=!0,h=0;h<jI.length;++h){var d=o[jI[h]];if(d!=null&&!Q(d)&&!ct(d)&&!qt(d)&&typeof d!="boolean"){f=!1;break}c.push(d)}var v;if(f){v=c.join(",")+(i?"-svg":"");var p=qI.get(v);p&&(i?u.svgElement=p:u.image=p)}var g=ZI(o.dashArrayX),m=gj(o.dashArrayY),y=XI(o.symbol),_=mj(g),b=KI(m),S=!i&&fi.createCanvas(),x=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=T(),C;S&&(S.width=w.width*e,S.height=w.height*e,C=S.getContext("2d")),D(),f&&qI.put(v,S||x),u.image=S,u.svgElement=x,u.svgWidth=w.width,u.svgHeight=w.height;function T(){for(var A=1,P=0,I=_.length;P<I;++P)A=Z2(A,_[P]);for(var O=1,P=0,I=y.length;P<I;++P)O=Z2(O,y[P].length);A*=O;var E=b*_.length*y.length;return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(E,o.maxTileHeight))}}function D(){C&&(C.clearRect(0,0,S.width,S.height),o.backgroundColor&&(C.fillStyle=o.backgroundColor,C.fillRect(0,0,S.width,S.height)));for(var A=0,P=0;P<m.length;++P)A+=m[P];if(A<=0)return;for(var I=-b,O=0,E=0,R=0;I<w.height;){if(O%2===0){for(var z=E/2%y.length,B=0,Y=0,W=0;B<w.width*2;){for(var et=0,P=0;P<g[R].length;++P)et+=g[R][P];if(et<=0)break;if(Y%2===0){var V=(1-o.symbolSize)*.5,H=B+g[R][Y]*V,G=I+m[O]*V,j=g[R][Y]*o.symbolSize,tt=m[O]*o.symbolSize,nt=W/2%y[z].length;rt(H,G,j,tt,y[z][nt])}B+=g[R][Y],++W,++Y,Y===g[R].length&&(Y=0)}++R,R===g.length&&(R=0)}I+=m[O],++E,++O,O===m.length&&(O=0)}function rt(vt,ft,lt,mt,At){var Ct=i?1:e,F=$e(At,vt*Ct,ft*Ct,lt*Ct,mt*Ct,o.color,o.symbolKeepAspect);if(i){var X=n.painter.renderOneToVNode(F);X&&x.children.push(X)}else C1(C,F)}}}}function XI(r){if(!r||r.length===0)return[["rect"]];if(ct(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!ct(r[e])){t=!1;break}if(t)return XI([r]);for(var n=[],e=0;e<r.length;++e)ct(r[e])?n.push([r[e]]):n.push(r[e]);return n}function ZI(r){if(!r||r.length===0)return[[0,0]];if(qt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,n=0;n<r.length;++n)if(!qt(r[n])){e=!1;break}if(e)return ZI([r]);for(var i=[],n=0;n<r.length;++n)if(qt(r[n])){var t=Math.ceil(r[n]);i.push([t,t])}else{var t=J(r[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function gj(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(qt(r)){var t=Math.ceil(r);return[t,t]}var e=J(r,function(n){return Math.ceil(n)});return r.length%2?e.concat(e):e}function mj(r){return J(r,function(t){return KI(t)})}function KI(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function yj(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var n=e.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=Vu(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=Vu(i,t)}}})}var _j=new En,wi=_j,QI={};function bj(r,t){QI[r]=t}function JI(r){return QI[r]}var xj="5.4.1",Sj={zrender:"5.4.1"},wj=1,Cj=800,Tj=900,Mj=1e3,Dj=2e3,Aj=5e3,tO=1e3,Pj=1100,M1=2e3,eO=3e3,Lj=4e3,eg=4500,Ij=4600,Oj=5e3,Ej=6e3,rO=7e3,nO={PROCESSOR:{FILTER:Mj,SERIES_FILTER:Cj,STATISTIC:Aj},VISUAL:{LAYOUT:tO,PROGRESSIVE_LAYOUT:Pj,GLOBAL:M1,CHART:eO,POST_CHART_LAYOUT:Ij,COMPONENT:Lj,BRUSH:Oj,CHART_ITEM:eg,ARIA:Ej,DECAL:rO}},Ir="__flagInMainProcess",sn="__pendingUpdate",D1="__needsUpdateStatus",iO=/^[a-zA-Z0-9_]+$/,A1="__connectUpdateStatus",aO=0,Rj=1,kj=2;function oO(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return lO(this,r,t)}}function sO(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return lO(this,r,t)}}function lO(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),En.prototype[t].apply(r,e)}var uO=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(En),cO=uO.prototype;cO.on=sO("on"),cO.off=sO("off");var Hu,P1,rg,Mo,L1,I1,O1,th,eh,fO,hO,E1,dO,ng,vO,pO,Gn,gO,ig=function(r){q(t,r);function t(e,n,i){var a=r.call(this,new Hq)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},ct(n)&&(n=mO[n]),a._dom=e;var o="canvas",s="auto",l=!1,u=a._zr=z_(e,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Et(i.useDirtyRect,l),useCoarsePointer:Et(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=qp(dt(u.flush,u),17),n=Tt(n),n&&OL(n,!0),a._theme=n,a._locale=UU(i.locale||qP),a._coordSysMgr=new Ou;var c=a._api=vO(a);function f(h,d){return h.__prio-d.__prio}return Iv(og,f),Iv(k1,f),a._scheduler=new DI(a,c,k1,og),a._messageCenter=new uO,a._initEvents(),a.resize=dt(a.resize,a),u.animation.on("frame",a._onframe,a),fO(u,a),hO(u,a),Hc(a),a}return t.prototype._onframe=function(){if(!this._disposed){gO(this);var e=this._scheduler;if(this[sn]){var n=this[sn].silent;this[Ir]=!0;try{Hu(this),Mo.update.call(this,null,this[sn].updateParams)}catch(l){throw this[Ir]=!1,this[sn]=null,l}this._zr.flush(),this[Ir]=!1,this[sn]=null,th.call(this,n),eh.call(this,n)}else if(e.unfinished){var i=wj,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),I1(this,a),e.performVisualTasks(a),ng(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>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,n,i){if(!this[Ir]){if(this._disposed){this.id;return}var a,o,s;if(xt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ir]=!0,!this._model||n){var l=new TY(this._api),u=this._theme,c=this._model=new CL;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},N1);var f={seriesTransition:s,optionChanged:!0};if(i)this[sn]={silent:a,updateParams:f},this[Ir]=!1,this.getZr().wakeUp();else{try{Hu(this),Mo.update.call(this,null,f)}catch(h){throw this[sn]=null,this[Ir]=!1,h}this._ssr||this._zr.flush(),this[sn]=null,this[Ir]=!1,th.call(this,a),eh.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Yt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(!!Yt.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return L(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;L(n,function(l){i.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 L(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(sg[i]){var l=s,u=s,c=-s,f=-s,h=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(Js,function(_,b){if(_.group===i){var S=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Tt(e)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),c=o(x.right,c),f=o(x.bottom,f),h.push({dom:S,left:x.left,top:x.top})}}),l*=d,u*=d,c*=d,f*=d;var v=c-l,p=f-u,g=fi.createCanvas(),m=z_(g,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:p}),n){var y="";return L(h,function(_){var b=_.left-l,S=_.top-u;y+='<g transform="translate('+b+","+S+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new Gt({shape:{x:0,y:0,width:v,height:p},style:{fill:e.connectedBackgroundColor}})),L(h,function(_){var b=new ur({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return L1(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return L1(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var i=this._model,a,o=gf(i,e);return L(o,function(s,l){l.indexOf("Models")>=0&&L(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=gf(i,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?b1(s,l,n):Kf(s,n)},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;L(Nj,function(n){var i=function(a){var o=e.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Zs(s,function(v){var p=Lt(v);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType)||{},!0}else if(p.eventData)return l=K({},p.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),d=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},e.trigger(n,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),L(rh,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),L(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),Gq(this._messageCenter,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&&iA(this.getDom(),z1,"");var n=this,i=n._api,a=n._model;L(n._componentsViews,function(o){o.dispose(a,i)}),L(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Js[n.id]},t.prototype.resize=function(e){if(!this[Ir]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[sn]&&(a==null&&(a=this[sn].silent),i=!0,this[sn]=null),this[Ir]=!0;try{i&&Hu(this),Mo.update.call(this,{type:"resize",animation:K({duration:0},e&&e.animation)})}catch(o){throw this[Ir]=!1,o}this[Ir]=!1,th.call(this,a),eh.call(this,a)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(xt(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!B1[e]){var i=B1[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},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 n=K({},e);return n.type=rh[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(xt(n)||(n={silent:!!n}),!!ag[e.type]&&!!this._model){if(this[Ir]){this._pendingActions.push(e);return}var i=n.silent;O1.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&Yt.browser.weChat&&this._throttledZrFlush(),th.call(this,i),eh.call(this,i)}},t.prototype.updateLabelLayout=function(){wi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Hu=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),P1(f,!0),P1(f,!1),h.plan()},P1=function(f,h){for(var d=f._model,v=f._scheduler,p=h?f._componentsViews:f._chartsViews,g=h?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<p.length;_++)p[_].__alive=!1;h?d.eachComponent(function(x,w){x!=="series"&&b(w)}):d.eachSeries(b);function b(x){var w=x.__requireNewView;x.__requireNewView=!1;var C="_ec_"+x.id+"_"+x.type,T=!w&&g[C];if(!T){var D=Gi(x.type),A=h?Me.getClass(D.main,D.sub):he.getClass(D.sub);T=new A,T.init(d,y),g[C]=T,p.push(T),m.add(T.group)}x.__viewId=T.__id=C,T.__alive=!0,T.__model=x,T.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!h&&v.prepareView(T,x,d,y)}for(var _=0;_<p.length;){var S=p[_];S.__alive?_++:(!h&&S.renderTask.dispose(),m.remove(S.group),S.dispose(d,y),p.splice(_,1),g[S.__id]===S&&delete g[S.__id],S.__id=S.group.__ecComponentInfo=null)}},rg=function(f,h,d,v,p){var g=f._model;if(g.setUpdatePayload(d),!v){L([].concat(f._componentsViews).concat(f._chartsViews),S);return}var m={};m[v+"Id"]=d[v+"Id"],m[v+"Index"]=d[v+"Index"],m[v+"Name"]=d[v+"Name"];var y={mainType:v,query:m};p&&(y.subType=p);var _=d.excludeSeriesId,b;_!=null&&(b=yt(),L(ce(_),function(x){var w=Xe(x,null);w!=null&&b.set(w,!0)})),g&&g.eachComponent(y,function(x){var w=b&&b.get(x.id)!=null;if(!w)if(nP(d))if(x instanceof _e)d.type===Ns&&!d.notBlur&&!x.get(["emphasis","disabled"])&&H6(x,d,f._api);else{var C=_b(x.mainType,x.componentIndex,d.name,f._api),T=C.focusSelf,D=C.dispatchers;d.type===Ns&&T&&!d.notBlur&&yb(x.mainType,x.componentIndex,f._api),D&&L(D,function(A){d.type===Ns?Aa(A):Pa(A)})}else xb(d)&&x instanceof _e&&(G6(x,d,f._api),eP(x),Gn(f))},f),g&&g.eachComponent(y,function(x){var w=b&&b.get(x.id)!=null;w||S(f[v==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},f);function S(x){x&&x.__alive&&x[h]&&x[h](x.__model,g,f._api,d)}},Mo={prepareAndUpdate:function(f){Hu(this),Mo.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,h){var d=this._model,v=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(!!d){d.setUpdatePayload(f),m.restoreData(d,f),m.performSeriesTasks(d),g.create(d,v),m.performDataProcessorTasks(d,f),I1(this,d),g.update(d,v),e(d),m.performVisualTasks(d,f),E1(this,d,v,f,h);var y=d.get("backgroundColor")||"transparent",_=d.get("darkMode");p.setBackgroundColor(y),_!=null&&_!=="auto"&&p.setDarkMode(_),wi.trigger("afterupdate",d,v)}},updateTransform:function(f){var h=this,d=this._model,v=this._api;if(!!d){d.setUpdatePayload(f);var p=[];d.eachComponent(function(m,y){if(m!=="series"){var _=h.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,d,v,f);b&&b.update&&p.push(_)}else p.push(_)}});var g=yt();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,d,v,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0,dirtyMap:g}),ng(this,d,v,f,{},g),wi.trigger("afterupdate",d,v)}},updateView:function(f){var h=this._model;!h||(h.setUpdatePayload(f),he.markUpdateMethod(f,"updateView"),e(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),E1(this,h,this._api,f,{}),wi.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,d=this._model;!d||(d.setUpdatePayload(f),d.eachSeries(function(v){v.getData().clearAllVisual()}),he.markUpdateMethod(f,"updateVisual"),e(d),this._scheduler.performVisualTasks(d,f,{visualType:"visual",setDirty:!0}),d.eachComponent(function(v,p){if(v!=="series"){var g=h.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,d,h._api,f)}}),d.eachSeries(function(v){var p=h._chartsMap[v.__viewId];p.updateVisual(v,d,h._api,f)}),wi.trigger("afterupdate",d,this._api))},updateLayout:function(f){Mo.update.call(this,f)}},L1=function(f,h,d,v){if(f._disposed){f.id;return}for(var p=f._model,g=f._coordSysMgr.getCoordinateSystems(),m,y=gf(p,d),_=0;_<g.length;_++){var b=g[_];if(b[h]&&(m=b[h](p,y,v))!=null)return m}},I1=function(f,h){var d=f._chartsMap,v=f._scheduler;h.eachSeries(function(p){v.updateStreamModes(p,d[p.__viewId])})},O1=function(f,h){var d=this,v=this.getModel(),p=f.type,g=f.escapeConnect,m=ag[p],y=m.actionInfo,_=(y.update||"update").split(":"),b=_.pop(),S=_[0]!=null&&Gi(_[0]);this[Ir]=!0;var x=[f],w=!1;f.batch&&(w=!0,x=J(f.batch,function(O){return O=bt(K({},O),f),O.batch=null,O}));var C=[],T,D=xb(f),A=nP(f);if(A&&tP(this._api),L(x,function(O){if(T=m.action(O,d._model,d._api),T=T||K({},O),T.type=y.event||T.type,C.push(T),A){var E=Y_(f),R=E.queryOptionMap,z=E.mainTypeSpecified,B=z?R.keys()[0]:"series";rg(d,b,O,B),Gn(d)}else D?(rg(d,b,O,"series"),Gn(d)):S&&rg(d,b,O,S.main,S.sub)}),b!=="none"&&!A&&!D&&!S)try{this[sn]?(Hu(this),Mo.update.call(this,f),this[sn]=null):Mo[b].call(this,f)}catch(O){throw this[Ir]=!1,O}if(w?T={type:y.event||p,escapeConnect:g,batch:C}:T=C[0],this[Ir]=!1,!h){var P=this._messageCenter;if(P.trigger(T.type,T),D){var I={type:"selectchanged",escapeConnect:g,selected:U6(v),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};P.trigger(I.type,I)}}},th=function(f){for(var h=this._pendingActions;h.length;){var d=h.shift();O1.call(this,d,f)}},eh=function(f){!f&&this.trigger("updated")},fO=function(f,h){f.on("rendered",function(d){h.trigger("rendered",d),f.animation.isFinished()&&!h[sn]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},hO=function(f,h){f.on("mouseover",function(d){var v=d.target,p=Zs(v,Tf);p&&($6(p,d,h._api),Gn(h))}).on("mouseout",function(d){var v=d.target,p=Zs(v,Tf);p&&(W6(p,d,h._api),Gn(h))}).on("click",function(d){var v=d.target,p=Zs(v,function(y){return Lt(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=Lt(p);h._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],d=[],v=!1;if(f.eachComponent(function(y,_){var b=_.get("zlevel")||0,S=_.get("z")||0,x=_.getZLevelKey();v=v||!!x,(y==="series"?d:h).push({zlevel:b,z:S,idx:_.componentIndex,type:y,key:x})}),v){var p=h.concat(d),g,m;Iv(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),L(p,function(y){var _=f.getComponent(y.type,y.idx),b=y.zlevel,S=y.key;g!=null&&(b=Math.max(g,b)),S?(b===g&&S!==m&&b++,m=S):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}E1=function(f,h,d,v,p){n(h),dO(f,h,d,v,p),L(f._chartsViews,function(g){g.__alive=!1}),ng(f,h,d,v,p),L(f._chartsViews,function(g){g.__alive||g.remove(h,d)})},dO=function(f,h,d,v,p,g){L(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,h,d,v),s(y,m),c(y,m)})},ng=function(f,h,d,v,p,g){var m=f._scheduler;p=K(p||{},{updatedSeries:h.getSeries()}),wi.trigger("series:beforeupdate",h,d,p);var y=!1;h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var S=b.renderTask;m.updatePayload(S,v),u(_,b),g&&g.get(_.uid)&&S.dirty(),S.perform(m.getPerformArgs(S))&&(y=!0),b.group.silent=!!_.get("silent"),o(_,b),eP(_)}),m.unfinished=y||m.unfinished,wi.trigger("series:layoutlabels",h,d,p),wi.trigger("series:transition",h,d,p),h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];s(_,b),c(_,b)}),a(f,h),wi.trigger("series:afterupdate",h,d,p)},Gn=function(f){f[D1]=!0,f.getZr().wakeUp()},gO=function(f){!f[D1]||(f.getZr().storage.traverse(function(h){bu(h)||i(h)}),f[D1]=!1)};function i(f){for(var h=[],d=f.currentStates,v=0;v<d.length;v++){var p=d[v];p==="emphasis"||p==="blur"||p==="select"||h.push(p)}f.selected&&f.states.select&&h.push("select"),f.hoverState===lp&&f.states.emphasis?h.push("emphasis"):f.hoverState===xf&&f.states.blur&&h.push("blur"),f.useStates(h)}function a(f,h){var d=f._zr,v=d.storage,p=0;v.traverse(function(g){g.isGroup||p++}),p>h.get("hoverLayerThreshold")&&!Yt.node&&!Yt.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function s(f,h){if(!f.preventAutoZ){var d=f.get("z")||0,v=f.get("zlevel")||0;h.eachRendered(function(p){return l(p,d,v,-1/0),!0})}}function l(f,h,d,v){var p=f.getTextContent(),g=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),_=0;_<y.length;_++)v=Math.max(l(y[_],h,d,v),v);else f.z=h,f.zlevel=d,v=Math.max(f.z2,v);if(p&&(p.z=h,p.zlevel=d,isFinite(v)&&(p.z2=v+2)),g){var b=f.textGuideLineConfig;g.z=h,g.zlevel=d,isFinite(v)&&(g.z2=v+(b&&b.showAbove?1:-1))}return v}function u(f,h){h.eachRendered(function(d){if(!bu(d)){var v=d.getTextContent(),p=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),p=d.get("duration"),g=p>0?{duration:p,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(bu(m))return;if(m instanceof Ft&&Z6(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&i(m)}})}vO=function(f){return new(function(h){q(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var p=v.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);v=v.parent}},d.prototype.enterEmphasis=function(v,p){Aa(v,p),Gn(f)},d.prototype.leaveEmphasis=function(v,p){Pa(v,p),Gn(f)},d.prototype.enterBlur=function(v){ZA(v),Gn(f)},d.prototype.leaveBlur=function(v){gb(v),Gn(f)},d.prototype.enterSelect=function(v){KA(v),Gn(f)},d.prototype.leaveSelect=function(v){QA(v),Gn(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},d}(TL))(f)},pO=function(f){function h(d,v){for(var p=0;p<d.length;p++){var g=d[p];g[A1]=v}}L(rh,function(d,v){f._messageCenter.on(v,function(p){if(sg[f.group]&&f[A1]!==aO){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),m=[];L(Js,function(y){y!==f&&y.group===f.group&&m.push(y)}),h(m,aO),L(m,function(y){y[A1]!==Rj&&y.dispatchAction(g)}),h(m,kj)}})})}}(),t}(En),R1=ig.prototype;R1.on=oO("on"),R1.off=oO("off"),R1.one=function(r,t,e){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(r,i)}this.on.call(this,r,i,e)};var Nj=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function B1t(r){}var ag={},rh={},k1=[],N1=[],og=[],mO={},B1={},Js={},sg={},Bj=+new Date-0,zj=+new Date-0,z1="_echarts_instance_";function Fj(r,t,e){var n=!(e&&e.ssr);if(n){var i=F1(r);if(i)return i}var a=new ig(r,t,e);return a.id="ec_"+Bj++,Js[a.id]=a,n&&iA(r,z1,a.id),pO(a),wi.trigger("afterinit",a),a}function Vj(r){if(Q(r)){var t=r;r=null,L(t,function(e){e.group!=null&&(r=e.group)}),r=r||"g_"+zj++,L(t,function(e){e.group=r})}return sg[r]=!0,r}function yO(r){sg[r]=!1}var Hj=yO;function $j(r){ct(r)?r=Js[r]:r instanceof ig||(r=F1(r)),r instanceof ig&&!r.isDisposed()&&r.dispose()}function F1(r){return Js[N9(r,z1)]}function Wj(r){return Js[r]}function V1(r,t){mO[r]=t}function H1(r){Bt(N1,r)<0&&N1.push(r)}function $1(r,t){W1(k1,r,t,Dj)}function _O(r){lg("afterinit",r)}function bO(r){lg("afterupdate",r)}function lg(r,t){wi.on(r,t)}function Ci(r,t,e){_t(t)&&(e=t,t="");var n=xt(r)?r.type:[r,r={event:t}][0];r.event=(r.event||n).toLowerCase(),t=r.event,!rh[t]&&(Mr(iO.test(n)&&iO.test(t)),ag[n]||(ag[n]={action:e,actionInfo:r}),rh[t]=n)}function xO(r,t){Ou.register(r,t)}function Gj(r){var t=Ou.get(r);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function SO(r,t){W1(og,r,t,tO,"layout")}function Do(r,t){W1(og,r,t,eO,"visual")}var wO=[];function W1(r,t,e,n,i){if((_t(t)||xt(t))&&(e=t,t=n),!(Bt(wO,e)>=0)){wO.push(e);var a=DI.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function G1(r,t){B1[r]=t}function Uj(r){ID({createCanvas:r})}function CO(r,t,e){var n=JI("registerMap");n&&n(r,t,e)}function Yj(r){var t=JI("getMap");return t&&t(r)}var TO=JY;Do(M1,Tq),Do(eg,Mq),Do(eg,Dq),Do(M1,$q),Do(eg,Wq),Do(rO,yj),H1(OL),$1(Tj,EY),G1("default",Aq),Ci({type:Ns,event:Ns,update:Ns},Fe),Ci({type:up,event:up,update:up},Fe),Ci({type:wf,event:wf,update:wf},Fe),Ci({type:cp,event:cp,update:cp},Fe),Ci({type:Cf,event:Cf,update:Cf},Fe),V1("light",Fq),V1("dark",Vq);var qj={},MO=[],jj={registerPreprocessor:H1,registerProcessor:$1,registerPostInit:_O,registerPostUpdate:bO,registerUpdateLifecycle:lg,registerAction:Ci,registerCoordinateSystem:xO,registerLayout:SO,registerVisual:Do,registerTransform:TO,registerLoading:G1,registerMap:CO,registerImpl:bj,PRIORITY:nO,ComponentModel:Wt,ComponentView:Me,SeriesModel:_e,ChartView:he,registerComponentModel:function(r){Wt.registerClass(r)},registerComponentView:function(r){Me.registerClass(r)},registerSeriesModel:function(r){_e.registerClass(r)},registerChartView:function(r){he.registerClass(r)},registerSubTypeDefaulter:function(r,t){Wt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){$2(r,t)}};function zt(r){if(Q(r)){L(r,function(t){zt(t)});return}Bt(MO,r)>=0||(MO.push(r),_t(r)&&(r={install:r}),r.install(jj))}function nh(r){return r==null?0:r.length||1}function DO(r){return r}var Xj=function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||DO,this._newKeyGetter=i||DO,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,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=nh(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=nh(u),h=nh(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d<f;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=e[i],o=nh(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[i]=null}},r.prototype._initIndexMap=function(t,e,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!e){var l=e[s],u=nh(l);u===0?(e[s]=o,a&&n.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r}(),Ia=Xj,Zj=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 Kj(r,t){var e={},n=e.encode={},i=yt(),a=[],o=[],s={};L(r.dimensions,function(h){var d=r.getDimensionInfo(h),v=d.coordDim;if(v){var p=d.coordDimIndex;U1(n,v)[p]=h,d.isExtraCoord||(i.set(v,1),Qj(d.type)&&(a[0]=h),U1(s,v)[p]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}cL.each(function(g,m){var y=U1(n,m),_=d.otherDims[m];_!=null&&_!==!1&&(y[_]=d.name)})});var l=[],u={};i.each(function(h,d){var v=n[d];u[d]=v[0],l=l.concat(v)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=J(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),e.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,e.userOutput=new Zj(s,t),e}function U1(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function ug(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function Qj(r){return!(r==="ordinal"||r==="time")}var Jj=function(){function r(t){this.otherDims={},t!=null&&K(this,t)}return r}(),cg=Jj,tX=jt(),eX={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},AO=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=IO(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return Et(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=NL(this.source),n=!OO(t),i="",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)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=eX[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,v=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:v}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function PO(r){return r instanceof AO}function LO(r){for(var t=yt(),e=0;e<(r||[]).length;e++){var n=r[e],i=xt(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,e)}return t}function IO(r){var t=tX(r);return t.dimNameMap||(t.dimNameMap=LO(r.dimensionsDefine))}function OO(r){return r>30}var ih=xt,Ao=J,rX=typeof Int32Array=="undefined"?Array:Int32Array,nX="e\0\0",EO=-1,iX=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],aX=["_approximateExtent"],RO,fg,ah,oh,Y1,hg,q1,oX=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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;PO(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=ct(f)?new cg({name:f}):f instanceof cg?f:new cg(f),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var v=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,u[d]!=null&&(l=!0),h.createInvertedIndices&&(s[d]=[]),v.itemName===0&&(this._nameDimIdx=c),v.itemId===0&&(this._idDimIdx=c),i&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=yt();L(o,function(g){p.set(a[g].storeDimIndex,g)})}}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 n=this._dimIdxToName.get(e);if(n!=null)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(qt(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(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var i=this,a;if(t instanceof h1&&(a=t),!a){var o=this.dimensions,s=i1(t)||mr(t)?new FL(t,o.length):t;a=new h1;var l=Ao(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Kj(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 n=this._store.appendValues(t,e.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=e[l],o&&q1(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==wo&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Hn;if(l&&!i.pure)for(var u=[],c=t;c<e;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&w9(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=Xe(h,null));var d=f.id;o[c]==null&&d!=null&&(o[c]=Xe(d,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<e;c++)q1(this,c);RO(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},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){ih(t)?K(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return n==null&&this._nameDimIdx!=null&&(n=ah(this,this._nameDimIdx,e)),n==null&&(n=""),n},r.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},r.prototype.getId=function(t){return fg(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},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 n=this,i=this._store;return Q(t)?i.getValues(Ao(t,function(a){return n._getStoreDimIndex(a)}),e):i.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;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 n=t&&this._invertedIndicesMap[t],i=n[e];return i==null||isNaN(i)?EO:i},r.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},r.prototype.each=function(t,e,n){_t(t)&&(n=e,e=t,t=[]);var i=n||this,a=Ao(oh(t),this._getStoreDimIndex,this);this._store.each(a,i?dt(e,i):e)},r.prototype.filterSelf=function(t,e,n){_t(t)&&(n=e,e=t,t=[]);var i=n||this,a=Ao(oh(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?dt(e,i):e),this},r.prototype.selectRange=function(t){var e=this,n={},i=Ht(t);return L(i,function(a){var o=e._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(t,e,n){_t(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},r.prototype.map=function(t,e,n,i){var a=n||i||this,o=Ao(oh(t),this._getStoreDimIndex,this),s=hg(this);return s._store=this._store.map(o,a?dt(e,a):e),s},r.prototype.modify=function(t,e,n,i){var a=n||i||this,o=Ao(oh(t),this._getStoreDimIndex,this);this._store.modify(o,a?dt(e,a):e)},r.prototype.downSample=function(t,e,n,i){var a=hg(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),a},r.prototype.lttbDownSample=function(t,e){var n=hg(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new fe(n,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Ia(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return fg(t,n)},function(n){return fg(e,n)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},ih(t)?K(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return i==null?this.getVisual(e):i},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),Q(a)?a=a.slice():ih(a)&&(a=K({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ih(e)?K(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){ih(t)?K(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,n){this._itemLayouts[t]=n?K(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;fb(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){L(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Ao(this.dimensions,this._getDimInfo,this),this.hostModel)),Y1(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];!_t(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(wv(arguments)))})},r.internalField=function(){RO=function(t){var e=t._invertedIndicesMap;L(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new rX(o.categories.length);for(var l=0;l<n.length;l++)n[l]=EO;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},ah=function(t,e,n){return Xe(t._getCategory(e,n),null)},fg=function(t,e){var n=t._idList[e];return n==null&&t._idDimIdx!=null&&(n=ah(t,t._idDimIdx,e)),n==null&&(n=nX+e),n},oh=function(t){return Q(t)||(t=t!=null?[t]:[]),t},hg=function(t){var e=new r(t._schema?t._schema:Ao(t.dimensions,t._getDimInfo,t),t.hostModel);return Y1(e,t),e},Y1=function(t,e){L(iX.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,L(aX,function(n){t[n]=Tt(e[n])}),t._calculationInfo=K({},e._calculationInfo)},q1=function(t,e){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[e],l=i[e];if(s==null&&a!=null&&(n[e]=s=ah(t,a,e)),l==null&&o!=null&&(i[e]=l=ah(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),i[e]=l}}}(),r}(),Or=oX;function sX(r,t){return $u(r,t).dimensions}function $u(r,t){i1(r)||(r=o1(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=yt(),a=[],o=uX(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&OO(o),l=n===r.dimensionsDefine,u=l?IO(r):LO(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=yt(c),h=new KL(o),d=0;d<h.length;d++)h[d]=-1;function v(T){var D=h[T];if(D<0){var A=n[T],P=xt(A)?A:{name:A},I=new cg,O=P.name;O!=null&&u.get(O)!=null&&(I.name=I.displayName=O),P.type!=null&&(I.type=P.type),P.displayName!=null&&(I.displayName=P.displayName);var E=a.length;return h[T]=E,I.storeDimIndex=T,a.push(I),I}return a[D]}if(!s)for(var d=0;d<o;d++)v(d);f.each(function(T,D){var A=ce(T).slice();if(A.length===1&&!ct(A[0])&&A[0]<0){f.set(D,!1);return}var P=f.set(D,[]);L(A,function(I,O){var E=ct(I)?u.get(I):I;E!=null&&E<o&&(P[O]=E,g(v(E),D,O))})});var p=0;L(e,function(T){var D,A,P,I;if(ct(T))D=T,I={};else{I=T,D=I.name;var O=I.ordinalMeta;I.ordinalMeta=null,I=K({},I),I.ordinalMeta=O,A=I.dimsDef,P=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var E=f.get(D);if(E!==!1){if(E=ce(E),!E.length)for(var R=0;R<(A&&A.length||1);R++){for(;p<o&&v(p).coordDim!=null;)p++;p<o&&E.push(p++)}L(E,function(z,B){var Y=v(z);if(l&&I.type!=null&&(Y.type=I.type),g(bt(Y,I),D,B),Y.name==null&&A){var W=A[B];!xt(W)&&(W={name:W}),Y.name=Y.displayName=W.name,Y.defaultTooltip=W.defaultTooltip}P&&bt(Y.otherDims,P)})}});function g(T,D,A){cL.get(D)!=null?T.otherDims[D]=A:(T.coordDim=D,T.coordDimIndex=A,i.set(D,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function S(T){T.name==null&&(T.name=T.coordDim)}if(s)L(a,function(T){S(T)}),a.sort(function(T,D){return T.storeDimIndex-D.storeDimIndex});else for(var x=0;x<o;x++){var w=v(x),C=w.coordDim;C==null&&(w.coordDim=cX(b,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),S(w),w.type==null&&(vL(r,x)===br.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return lX(a),new AO({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function lX(r){for(var t=yt(),e=0;e<r.length;e++){var n=r[e],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function uX(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return L(t,function(a){var o;xt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function cX(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var fX=function(){function r(t){this.coordSysDims=[],this.axisMap=yt(),this.categoryAxisMap=yt(),this.coordSysName=t}return r}();function hX(r){var t=r.get("coordinateSystem"),e=new fX(t),n=dX[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var dX={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",Ye).models[0],a=r.getReferringComponents("yAxis",Ye).models[0];t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Wu(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Wu(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",Ye).models[0];t.coordSysDims=["single"],e.set("single",i),Wu(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",Ye).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Wu(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Wu(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();L(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];e.set(c,u),Wu(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Wu(r){return r.get("type")==="category"}function kO(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;vX(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(L(a,function(y,_){ct(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,v=c.type,p=0;L(a,function(y){y.coordDim===d&&p++});var g={name:f,coordDim:d,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,v),m.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function vX(r){return!PO(r.schema)}function Oa(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function j1(r,t){return Oa(r,t)?r.getCalculationInfo("stackResultDimension"):t}function pX(r,t){var e=r.get("coordinateSystem"),n=Ou.get(e),i;return t&&t.coordSysDims&&(i=J(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=ug(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function gX(r,t,e){var n,i;return e&&L(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Qi(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;r?(a=!0,i=o1(r)):(i=n.getSource(),a=i.sourceFormat===Hn);var o=hX(t),s=pX(t,o),l=e.useEncodeDefaulter,u=_t(l)?l:l?It(dL,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=$u(i,c),h=gX(f.dimensions,e.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),v=kO(t,{schema:f,store:d}),p=new Or(f,t);p.setCalculationInfo(v);var g=h!=null&&mX(i)?function(m,y,_,b){return b===h?_:this.defaultDimValueGetter(m,y,_,b)}:null;return p.hasItemOption=!1,p.initData(a?i:d,null,g),p}function mX(r){if(r.sourceFormat===Hn){var t=yX(r.data||[]);return!Q(hu(t))}}function yX(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var NO=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();tp(NO);var Ea=NO,_X=0,bX=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++_X}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&J(n,xX);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!ct(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=yt(this.categories))},r}();function xX(r){return xt(r)&&r.value!=null?r.value:r+""}var X1=bX;function Z1(r){return r.type==="interval"||r.type==="log"}function SX(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=$_(a/t,!0);e!=null&&o<e&&(o=i.interval=e),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=BO(o),l=i.niceTickExtent=[Ee(Math.ceil(r[0]/o)*o,s),Ee(Math.floor(r[1]/o)*o,s)];return wX(l,r),i}function K1(r){var t=Math.pow(10,Qv(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Ee(e*t)}function BO(r){return mi(r)+2}function zO(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function wX(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),zO(r,0,t),zO(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function dg(r,t){return r>=t[0]&&r<=t[1]}function vg(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function pg(r,t){return r*(t[1]-t[0])+t[0]}var FO=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new X1({})),Q(i)&&(i=new X1({categories:J(i,function(a){return xt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:ct(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),dg(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),vg(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(pg(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},t.prototype._getTickNumber=function(e){var n=this._ticksByOrdinalNumber;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getRawOrdinalNumber=function(e){var n=this._ordinalNumbersByTick;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var n=this.getRawOrdinalNumber(e.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ea);Ea.registerClass(FO);var Q1=FO,tl=Ee,VO=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dg(e,this._extent)},t.prototype.normalize=function(e){return vg(e,this._extent)},t.prototype.scale=function(e){return pg(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=BO(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]<a[0]&&(e?s.push({value:tl(a[0]-n,o)}):s.push({value:i[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=tl(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(e?s.push({value:tl(c+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,c=[],f=s.value-l.value,h=f/e;u<e-1;){var d=tl(l.value+(u+1)*h);d>a[0]&&d<a[1]&&c.push(d),u++}i.push(c)}return i},t.prototype.getLabel=function(e,n){if(e==null)return"";var i=n&&n.precision;i==null?i=mi(e.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=tl(e.value,i,!0);return Gb(a)},t.prototype.calcNiceTicks=function(e,n,i){e=e||5;var a=this._extent,o=a[1]-a[0];if(!!isFinite(o)){o<0&&(o=-o,a.reverse());var s=SX(a,e,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);e.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(n[0]=tl(Math.floor(n[0]/o)*o)),e.fixMax||(n[1]=tl(Math.ceil(n[1]/o)*o))},t.prototype.setNiceExtent=function(e,n){this._niceExtent=[e,n]},t.type="interval",t}(Ea);Ea.registerClass(VO);var Po=VO,HO=typeof Float32Array!="undefined",CX=HO?Float32Array:Array;function Ji(r){return Q(r)?HO?new Float32Array(r):r:new CX(r)}var J1="__ec_stack_";function tx(r){return r.get("stack")||J1+r.seriesIndex}function ex(r){return r.dim+r.index}function TX(r){var t=[],e=r.axis,n="axis0";if(e.type==="category"){for(var i=e.getBandWidth(),a=0;a<r.count;a++)t.push(bt({bandWidth:i,axisKey:n,stackId:J1+a},r));for(var o=GO(t),s=[],a=0;a<r.count;a++){var l=o[n][J1+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function $O(r,t){var e=[];return t.eachSeriesByType(r,function(n){qO(n)&&e.push(n)}),e}function MX(r){var t={};L(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,d=f.getDimensionIndex(f.mapDimension(c.dim)),v=f.getStore(),p=0,g=v.count();p<g;++p){var m=v.get(d,p);t[h]?t[h].push(m):t[h]=[m]}});var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function WO(r){var t=MX(r),e=[];return L(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=at(n.get("barWidth"),s),p=at(n.get("barMaxWidth"),s),g=at(n.get("barMinWidth")||(jO(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:ex(a),stackId:tx(n)})}),GO(e)}function GO(r){var t={};L(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var e={};return L(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ht(a).length;s=Math.max(35-l*4,15)+"%"}var u=at(s,o),c=at(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),L(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,h--}else{var b=d;y&&y<b&&(b=Math.min(y,f)),_&&_>b&&(b=_),b!==d&&(m.width=b,f-=b+c*b,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var v=0,p;L(a,function(m,y){m.width||(m.width=d),p=m,v+=m.width*(1+c)}),p&&(v-=p.width*c);var g=-v/2;L(a,function(m,y){e[i][y]=e[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),e}function DX(r,t,e){if(r&&t){var n=r[ex(t)];return n!=null&&e!=null?n[tx(e)]:n}}function UO(r,t){var e=$O(r,t),n=WO(e);L(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=tx(i),u=n[ex(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function YO(r){return{seriesType:r,plan:ku(),reset:function(t){if(!!qO(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),c=e.getCalculationInfo("stackResultDimension"),f=Oa(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=AX(i,a),v=jO(t),p=t.get("barMinHeight")||0,g=c&&e.getDimensionIndex(c),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,b){for(var S=_.count,x=v&&Ji(S*3),w=v&&l&&Ji(S*3),C=v&&Ji(S),T=n.master.getRect(),D=h?T.width:T.height,A,P=b.getStore(),I=0;(A=_.next())!=null;){var O=P.get(f?g:o,A),E=P.get(s,A),R=d,z=void 0;f&&(z=+O-P.get(o,A));var B=void 0,Y=void 0,W=void 0,et=void 0;if(h){var V=n.dataToPoint([O,E]);if(f){var H=n.dataToPoint([z,E]);R=H[0]}B=R,Y=V[1]+y,W=V[0]-R,et=m,Math.abs(W)<p&&(W=(W<0?-1:1)*p)}else{var V=n.dataToPoint([E,O]);if(f){var H=n.dataToPoint([E,z]);R=H[1]}B=V[0]+y,Y=R,W=m,et=V[1]-R,Math.abs(et)<p&&(et=(et<=0?-1:1)*p)}v?(x[I]=B,x[I+1]=Y,x[I+2]=h?W:et,w&&(w[I]=h?T.x:B,w[I+1]=h?Y:T.y,w[I+2]=D),C[A]=A):b.setItemLayout(A,{x:B,y:Y,width:W,height:et}),I+=3}v&&b.setLayout({largePoints:x,largeDataIndices:C,largeBackgroundPoints:w,valueAxisHorizontal:h})}}}}}}function qO(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function jO(r){return r.pipelineContext&&r.pipelineContext.large}function AX(r,t){return t.toGlobalCoord(t.dataToCoord(t.type==="log"?1:0))}var PX=function(r,t,e,n){for(;e<n;){var i=e+n>>>1;r[i][1]<t?e=i+1:n=i}return e},XO=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="time",n}return t.prototype.getLabel=function(e){var n=this.getSetting("useUTC");return Ff(e.value,XP[jU(Mu(this._minLevelUnit))]||XP.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return XU(e,n,i,o,a)},t.prototype.getTicks=function(){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=NX(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Vn,n[1]+=Vn),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Vn}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,n,i){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=gg.length,l=Math.min(PX(gg,this._approxInterval,0,s),s-1);this._interval=gg[l][1],this._minLevelUnit=gg[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return qt(e)?e:+xn(e)},t.prototype.contain=function(e){return dg(this.parse(e),this._extent)},t.prototype.normalize=function(e){return vg(this.parse(e),this._extent)},t.prototype.scale=function(e){return pg(e,this._extent)},t.type="time",t}(Po),gg=[["second",Vb],["minute",Hb],["hour",Bf],["quarter-day",Bf*6],["half-day",Bf*12],["day",Vn*1.2],["half-week",Vn*3.5],["week",Vn*7],["month",Vn*31],["quarter",Vn*95],["half-year",jP/2],["year",jP]];function LX(r,t,e,n){var i=xn(t),a=xn(e),o=function(v){return QP(i,v,n)===QP(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},d=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return d()}}function IX(r,t){return r/=Vn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function OX(r){var t=30*Vn;return r/=t,r>6?6:r>3?3:r>2?2:1}function EX(r){return r/=Bf,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function ZO(r,t){return r/=t?Hb:Vb,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function RX(r){return $_(r,!0)}function kX(r,t,e){var n=new Date(r);switch(Mu(t)){case"year":case"month":n[JP(e)](0);case"day":n[tL(e)](1);case"hour":n[eL(e)](0);case"minute":n[rL(e)](0);case"second":n[nL(e)](0),n[iL(e)](0)}return n.getTime()}function NX(r,t,e,n){var i=1e4,a=ZP,o=0;function s(D,A,P,I,O,E,R){for(var z=new Date(A),B=A,Y=z[I]();B<P&&B<=n[1];)R.push({value:B}),Y+=D,z[O](Y),B=z.getTime();R.push({value:B,notAdd:!0})}function l(D,A,P){var I=[],O=!A.length;if(!LX(Mu(D),n[0],n[1],e)){O&&(A=[{value:kX(new Date(n[0]),D,e)},{value:n[1]}]);for(var E=0;E<A.length-1;E++){var R=A[E].value,z=A[E+1].value;if(R!==z){var B=void 0,Y=void 0,W=void 0,et=!1;switch(D){case"year":B=Math.max(1,Math.round(t/Vn/365)),Y=Wb(e),W=ZU(e);break;case"half-year":case"quarter":case"month":B=OX(t),Y=Du(e),W=JP(e);break;case"week":case"half-week":case"day":B=IX(t),Y=Op(e),W=tL(e),et=!0;break;case"half-day":case"quarter-day":case"hour":B=EX(t),Y=Vf(e),W=eL(e);break;case"minute":B=ZO(t,!0),Y=Ep(e),W=rL(e);break;case"second":B=ZO(t,!1),Y=Rp(e),W=nL(e);break;case"millisecond":B=RX(t),Y=kp(e),W=iL(e);break}s(B,R,z,Y,W,et,I),D==="year"&&P.length>1&&E===0&&P.unshift({value:P[0].value-B})}}for(var E=0;E<I.length;E++)P.push(I[E]);return I}}for(var u=[],c=[],f=0,h=0,d=0;d<a.length&&o++<i;++d){var v=Mu(a[d]);if(!!qU(a[d])){l(a[d],u[u.length-1]||[],c);var p=a[d+1]?Mu(a[d+1]):null;if(v!==p){if(c.length){h=f,c.sort(function(D,A){return D.value-A.value});for(var g=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(g.push(c[m]),y>=n[0]&&y<=n[1]&&f++)}var _=(n[1]-n[0])/t;if(f>_*1.5&&h>_/1.5||(u.push(g),f>_||r===a[d]))break}c=[]}}}for(var b=ae(J(u,function(D){return ae(D,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(D){return D.length>0}),S=[],x=b.length-1,d=0;d<b.length;++d)for(var w=b[d],C=0;C<w.length;++C)S.push({value:w[C].value,level:x-d});S.sort(function(D,A){return D.value-A.value});for(var T=[],d=0;d<S.length;++d)(d===0||S[d].value!==S[d-1].value)&&T.push(S[d]);return T}Ea.registerClass(XO);var KO=XO,QO=Ea.prototype,sh=Po.prototype,BX=Ee,zX=Math.floor,FX=Math.ceil,mg=Math.pow,Ti=Math.log,rx=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Po,e._interval=0,e}return t.prototype.getTicks=function(e){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=sh.getTicks.call(this,e);return J(o,function(s){var l=s.value,u=Ee(mg(this.base,l));return u=l===i[0]&&this._fixMin?yg(u,a[0]):u,u=l===i[1]&&this._fixMax?yg(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,n){var i=Ti(this.base);e=Ti(Math.max(0,e))/i,n=Ti(Math.max(0,n))/i,sh.setExtent.call(this,e,n)},t.prototype.getExtent=function(){var e=this.base,n=QO.getExtent.call(this);n[0]=mg(e,n[0]),n[1]=mg(e,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=yg(n[0],a[0])),this._fixMax&&(n[1]=yg(n[1],a[1])),n},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var n=this.base;e[0]=Ti(e[0])/Ti(n),e[1]=Ti(e[1])/Ti(n),QO.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.calcNiceTicks=function(e){e=e||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=q2(i),o=e/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ee(FX(n[0]/a)*a),Ee(zX(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){sh.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Ti(e)/Ti(this.base),dg(e,this._extent)},t.prototype.normalize=function(e){return e=Ti(e)/Ti(this.base),vg(e,this._extent)},t.prototype.scale=function(e){return e=pg(e,this._extent),mg(this.base,e)},t.type="log",t}(Ea),JO=rx.prototype;JO.getMinorTicks=sh.getMinorTicks,JO.getLabel=sh.getLabel;function yg(r,t){return BX(r,mi(t))}Ea.registerClass(rx);var VX=rx,HX=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=this._modelMinRaw=e.get("min",!0);_t(a)?this._modelMinNum=_g(t,a({min:n[0],max:n[1]})):a!=="dataMin"&&(this._modelMinNum=_g(t,a));var o=this._modelMaxRaw=e.get("max",!0);if(_t(o)?this._modelMaxNum=_g(t,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=_g(t,o)),i)this._axisDataLen=e.getCategories().length;else{var s=e.get("boundaryGap"),l=Q(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[gi(l[0],1),gi(l[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:e-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=eu(s)||eu(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(t,e){this[WX[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=$X[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),$X={min:"_determinedMin",max:"_determinedMax"},WX={min:"_dataMin",max:"_dataMax"};function tE(r,t,e){var n=r.rawExtentInfo;return n||(n=new HX(r,t,e),r.rawExtentInfo=n,n)}function _g(r,t){return t==null?null:eu(t)?NaN:r.parse(t)}function eE(r,t){var e=r.type,n=tE(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=$O("bar",o),l=!1;if(L(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=WO(s),c=GX(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function GX(r,t,e,n){var i=e.axis.getExtent(),a=i[1]-i[0],o=DX(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;L(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;L(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-r,f=1-(s+l)/a,h=c/f-c;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function el(r,t){var e=t,n=eE(r,e),i=n.extent,a=e.get("splitNumber");r instanceof VX&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function lh(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Q1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new KO({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ea.getClass(t)||Po)}}function UX(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function uh(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(t):ct(t)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(t):_t(t)?function(n){return function(i,a){return e!=null&&(a=i.value-e),n(nx(r,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function nx(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function YX(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof Q1?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=uh(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var f=n?n[c]:{value:a[0]+c},h=s(f,c),d=o.getTextRect(h),v=qX(d,o.get("rotate")||0);l?l.union(v):l=v}return l}}function qX(r,t){var e=t*Math.PI/180,n=r.width,i=r.height,a=n*Math.abs(Math.cos(e))+Math.abs(i*Math.sin(e)),o=n*Math.abs(Math.sin(e))+Math.abs(i*Math.cos(e)),s=new kt(r.x,r.y,a,o);return s}function ix(r){var t=r.get("interval");return t==null?"auto":t}function rE(r){return r.type==="category"&&ix(r.getLabelModel())===0}function bg(r,t){var e={};return L(r.mapDimensionsAll(t),function(n){e[j1(r,n)]=!0}),Ht(e)}function jX(r,t,e){t&&L(bg(t,e),function(n){var i=t.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var Gu=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}();function XX(r){return Qi(null,r)}var ZX={isDimensionStacked:Oa,enableDataStack:kO,getStackedDimension:j1};function KX(r,t){var e=t;t instanceof fe||(e=new fe(t));var n=lh(e);return n.setExtent(r[0],r[1]),el(n,e),n}function QX(r){ze(r,Gu)}function JX(r,t){return t=t||{},me(r,null,null,t.state!=="normal")}var tZ=Object.freeze(Object.defineProperty({__proto__:null,createList:XX,getLayoutRect:qe,dataStack:ZX,createScale:KX,mixinAxisModelCommonMethods:QX,getECData:Lt,createTextStyle:JX,createDimensions:sX,createSymbol:$e,enableHoverEmphasis:mo},Symbol.toStringTag,{value:"Module"})),eZ=1e-8;function nE(r,t){return Math.abs(r-t)<eZ}function rl(r,t,e){var n=0,i=r[0];if(!i)return!1;for(var a=1;a<r.length;a++){var o=r[a];n+=Ma(i[0],i[1],o[0],o[1],t,e),i=o}var s=r[0];return(!nE(i[0],s[0])||!nE(i[1],s[1]))&&(n+=Ma(i[0],i[1],s[0],s[1],t,e)),n!==0}var rZ=[];function ax(r,t){for(var e=0;e<r.length;e++)sr(r[e],r[e],t)}function iE(r,t,e,n){for(var i=0;i<r.length;i++){var a=r[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(ba(t,t,a),xa(e,e,a))}}function nZ(r){for(var t=0,e=0,n=0,i=r.length,a=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],c=a*u-l*o;t+=c,e+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return t?[e/t/3,n/t/3,t]:[r[0][0]||0,r[0][1]||0]}var aE=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}(),oE=function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r}(),sE=function(){function r(t){this.type="linestring",this.points=t}return r}(),lE=function(r){q(t,r);function t(e,n,i){var a=r.call(this,e)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return t.prototype.calcCenter=function(){for(var e=this.geometries,n,i=0,a=0;a<e.length;a++){var o=e[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return nZ(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var n=this._rect;if(n&&!e)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return L(o,function(s){s.type==="polygon"?iE(s.exterior,i,a,e):L(s.points,function(l){iE(l,i,a,e)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new kt(i[0],i[1],a[0]-i[0],a[1]-i[1]),e||(this._rect=n),n},t.prototype.contain=function(e){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(e[0],e[1]))return!1;t:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(rl(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(rl(u[c],e[0],e[1]))continue t;return!0}}}return!1},t.prototype.transformTo=function(e,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new kt(e,n,i,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(ax(h.exterior,u),L(h.interiors,function(d){ax(d,u)})):L(h.points,function(d){ax(d,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 n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(aE),iZ=function(r){q(t,r);function t(e,n){var i=r.call(this,e)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,n=e.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=jc(rZ),o=e;o&&!o.isGeoSVGGraphicRoot;)Vi(a,o.getLocalTransform(),a),o=o.parent;return ps(a,a),sr(i,i,a),i},t}(aE);function aZ(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var n=t.features;return L(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(!!o)switch(a.type){case"LineString":a.coordinates=uE(s,o,e);break;case"Polygon":ox(s,o,e);break;case"MultiLineString":ox(s,o,e);break;case"MultiPolygon":L(s,function(l,u){return ox(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function ox(r,t,e){for(var n=0;n<r.length;n++)r[n]=uE(r[n],t[n],e)}function uE(r,t,e){for(var n=[],i=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+=i,l+=a,i=s,a=l,n.push([s/e,l/e])}return n}function sx(r,t){return r=aZ(r),J(ae(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,i=e.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new oE(o[0],o.slice(1)));break;case"MultiPolygon":L(i.coordinates,function(l){l[0]&&a.push(new oE(l[0],l.slice(1)))});break;case"LineString":a.push(new sE([i.coordinates]));break;case"MultiLineString":a.push(new sE(i.coordinates))}var s=new lE(n[t||"name"],a,n.cp);return s.properties=n,s})}var oZ=Object.freeze(Object.defineProperty({__proto__:null,linearMap:oe,round:Ee,asc:bn,getPrecision:mi,getPrecisionSafe:U2,getPixelPrecision:F_,getPercentWithPrecision:m9,MAX_SAFE_INTEGER:V_,remRadian:H_,isRadianAroundZero:df,parseDate:xn,quantity:q2,quantityExponent:Qv,nice:$_,quantile:Jv,reformIntervals:W_,isNumeric:G_,numericToNumber:Wi},Symbol.toStringTag,{value:"Module"})),sZ=Object.freeze(Object.defineProperty({__proto__:null,parse:xn,format:Ff},Symbol.toStringTag,{value:"Module"})),lZ=Object.freeze(Object.defineProperty({__proto__:null,extendShape:LP,extendPath:IP,makePath:Of,makeImage:Pb,mergePath:Sn,resizePath:Lb,createIcon:Su,updateProps:Xt,initProps:Te,getTransform:_o,clipPointsByRect:Ib,clipRectByRect:RP,registerShape:Fn,getShapeClass:Cp,Group:Dt,Image:ur,Text:Ut,Circle:yi,Ellipse:pp,Sector:Gr,Ring:Pf,Polygon:Ur,Polyline:Yr,Rect:Gt,Line:er,BezierCurve:Lf,Arc:mp,IncrementalDisplayable:DP,CompoundPath:yp,LinearGradient:yu,RadialGradient:Mb,BoundingRect:kt},Symbol.toStringTag,{value:"Module"})),uZ=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Gb,toCamelCase:Ub,normalizeCssArray:Ws,encodeHTML:Vr,formatTpl:jb,getTooltipMarker:oL,formatTime:JU,capitalFirst:tY,truncateText:uA,getTextRect:KU},Symbol.toStringTag,{value:"Module"})),cZ=Object.freeze(Object.defineProperty({__proto__:null,map:J,each:L,indexOf:Bt,inherits:W0,reduce:In,filter:ae,bind:dt,curry:It,isArray:Q,isString:ct,isObject:xt,isFunction:_t,extend:K,defaults:bt,clone:Tt,merge:Ot},Symbol.toStringTag,{value:"Module"})),ch=jt();function fZ(r){return r.type==="category"?dZ(r):pZ(r)}function hZ(r,t){return r.type==="category"?vZ(r,t):{ticks:J(r.scale.getTicks(),function(e){return e.value})}}function dZ(r){var t=r.getLabelModel(),e=cE(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function cE(r,t){var e=fE(r,"labels"),n=ix(t),i=hE(e,n);if(i)return i;var a,o;return _t(n)?a=pE(r,n):(o=n==="auto"?gZ(r):n,a=vE(r,o)),dE(e,n,{labels:a,labelCategoryInterval:o})}function vZ(r,t){var e=fE(r,"ticks"),n=ix(t),i=hE(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),_t(n))a=pE(r,n,!0);else if(n==="auto"){var s=cE(r,r.getLabelModel());o=s.labelCategoryInterval,a=J(s.labels,function(l){return l.tickValue})}else o=n,a=vE(r,o,!0);return dE(e,n,{ticks:a,tickCategoryInterval:o})}function pZ(r){var t=r.scale.getTicks(),e=uh(r);return{labels:J(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function fE(r,t){return ch(r)[t]||(ch(r)[t]=[])}function hE(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function dE(r,t,e){return r.push({key:t,value:e}),e}function gZ(r){var t=ch(r).autoInterval;return t!=null?t:ch(r).autoInterval=r.calculateCategoryInterval()}function mZ(r){var t=yZ(r),e=uh(r),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,d=0;l<=a[1];l+=s){var v=0,p=0,g=ff(e({value:l}),t.font,"center","top");v=g.width*1.3,p=g.height*1.3,h=Math.max(h,v,7),d=Math.max(d,p,7)}var m=h/c,y=d/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),b=ch(r.model),S=r.getExtent(),x=b.lastAutoInterval,w=b.lastTickCount;return x!=null&&w!=null&&Math.abs(x-_)<=1&&Math.abs(w-o)<=1&&x>_&&b.axisExtent0===S[0]&&b.axisExtent1===S[1]?_=x:(b.lastTickCount=o,b.lastAutoInterval=_,b.axisExtent0=S[0],b.axisExtent1=S[1]),_}function yZ(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 vE(r,t,e){var n=uh(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=rE(r),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);d&&v-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(e?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function pE(r,t,e){var n=r.scale,i=uh(r),a=[];return L(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var gE=[0,1],_Z=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return F_(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),mE(n,i.count())),oe(t,gE,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),mE(n,i.count()));var a=oe(t,n,gE,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=hZ(this,e),i=n.ticks,a=J(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return bZ(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=J(n,function(a){return J(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return fZ(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return mZ(this)},r}();function mE(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function bZ(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;L(t,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var f=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1]});function h(d,v){return d=Ee(d),v=Ee(v),f?d>v:d<v}}var Un=_Z;function xZ(r){var t=Wt.extend(r);return Wt.registerClass(t),t}function SZ(r){var t=Me.extend(r);return Me.registerClass(t),t}function wZ(r){var t=_e.extend(r);return _e.registerClass(t),t}function CZ(r){var t=he.extend(r);return he.registerClass(t),t}var fh=Math.PI*2,nl=ji.CMD,TZ=["top","right","bottom","left"];function MZ(r,t,e,n,i){var a=e.width,o=e.height;switch(r){case"top":n.set(e.x+a/2,e.y-t),i.set(0,-1);break;case"bottom":n.set(e.x+a/2,e.y+o+t),i.set(0,1);break;case"left":n.set(e.x-t,e.y+o/2),i.set(-1,0);break;case"right":n.set(e.x+a+t,e.y+o/2),i.set(1,0);break}}function DZ(r,t,e,n,i,a,o,s,l){o-=r,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*e+r,f=s*e+t;if(Math.abs(n-i)%fh<1e-4)return l[0]=c,l[1]=f,u-e;if(a){var h=n;n=po(i),i=po(h)}else n=po(n),i=po(i);n>i&&(i+=fh);var d=Math.atan2(s,o);if(d<0&&(d+=fh),d>=n&&d<=i||d+fh>=n&&d+fh<=i)return l[0]=c,l[1]=f,u-e;var v=e*Math.cos(n)+r,p=e*Math.sin(n)+t,g=e*Math.cos(i)+r,m=e*Math.sin(i)+t,y=(v-o)*(v-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=v,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function xg(r,t,e,n,i,a,o,s){var l=i-r,u=a-t,c=e-r,f=n-t,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var d=l*c+u*f,v=d/h;s&&(v=Math.min(Math.max(v,0),1)),v*=h;var p=o[0]=r+v*c,g=o[1]=t+v*f;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}function yE(r,t,e,n,i,a,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(i,r),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var Mi=[];function AZ(r,t,e){var n=yE(t.x,t.y,t.width,t.height,r.x,r.y,Mi);return e.set(Mi[0],Mi[1]),n}function PZ(r,t,e){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,f=r.x,h=r.y,d=0;d<c.length;){var v=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var p=u;switch(v){case nl.M:a=c[d++],o=c[d++],n=a,i=o;break;case nl.L:p=xg(n,i,c[d],c[d+1],f,h,Mi,!0),n=c[d++],i=c[d++];break;case nl.C:p=h2(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],f,h,Mi),n=c[d++],i=c[d++];break;case nl.Q:p=v2(n,i,c[d++],c[d++],c[d],c[d+1],f,h,Mi),n=c[d++],i=c[d++];break;case nl.A:var g=c[d++],m=c[d++],y=c[d++],_=c[d++],b=c[d++],S=c[d++];d+=1;var x=!!(1-c[d++]);s=Math.cos(b)*y+g,l=Math.sin(b)*_+m,d<=1&&(a=s,o=l);var w=(f-g)*_/y+g;p=DZ(g,m,_,b,b+S,x,w,h,Mi),n=Math.cos(b+S)*y+g,i=Math.sin(b+S)*_+m;break;case nl.R:a=n=c[d++],o=i=c[d++];var C=c[d++],T=c[d++];p=yE(a,o,C,T,f,h,Mi);break;case nl.Z:p=xg(n,i,a,o,f,h,Mi,!0),n=a,i=o;break}p<u&&(u=p,e.set(Mi[0],Mi[1]))}return u}var Di=new Rt,be=new Rt,We=new Rt,ta=new Rt,ea=new Rt;function _E(r,t){if(!!r){var e=r.getTextGuideLine(),n=r.getTextContent();if(!!(n&&e)){var i=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||TZ,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=r.getComputedTransform(),f=c&&ps([],c),h=t.get("length2")||0;u&&We.copy(u);for(var d=0;d<o.length;d++){var v=o[d];MZ(v,0,s,Di,ta),Rt.scaleAndAdd(be,Di,ta,h),be.transform(f);var p=r.getBoundingRect(),g=u?u.distance(be):r instanceof Ft?PZ(be,r.path,We):AZ(be,p,We);g<l&&(l=g,be.transform(c),We.transform(c),We.toArray(a[0]),be.toArray(a[1]),Di.toArray(a[2]))}bE(a,t.get("minTurnAngle")),e.setShape({points:a})}}}var Sg=[],jr=new Rt;function bE(r,t){if(t<=180&&t>0){t=t/180*Math.PI,Di.fromArray(r[0]),be.fromArray(r[1]),We.fromArray(r[2]),Rt.sub(ta,Di,be),Rt.sub(ea,We,be);var e=ta.len(),n=ea.len();if(!(e<.001||n<.001)){ta.scale(1/e),ea.scale(1/n);var i=ta.dot(ea),a=Math.cos(t);if(a<i){var o=xg(be.x,be.y,We.x,We.y,Di.x,Di.y,Sg,!1);jr.fromArray(Sg),jr.scaleAndAdd(ea,o/Math.tan(Math.PI-t));var s=We.x!==be.x?(jr.x-be.x)/(We.x-be.x):(jr.y-be.y)/(We.y-be.y);if(isNaN(s))return;s<0?Rt.copy(jr,be):s>1&&Rt.copy(jr,We),jr.toArray(r[1])}}}}function LZ(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Di.fromArray(r[0]),be.fromArray(r[1]),We.fromArray(r[2]),Rt.sub(ta,be,Di),Rt.sub(ea,We,be);var n=ta.len(),i=ea.len();if(!(n<.001||i<.001)){ta.scale(1/n),ea.scale(1/i);var a=ta.dot(t),o=Math.cos(e);if(a<o){var s=xg(be.x,be.y,We.x,We.y,Di.x,Di.y,Sg,!1);jr.fromArray(Sg);var l=Math.PI/2,u=Math.acos(ea.dot(t)),c=l+u-e;if(c>=l)Rt.copy(jr,We);else{jr.scaleAndAdd(ea,s/Math.tan(Math.PI/2-c));var f=We.x!==be.x?(jr.x-be.x)/(We.x-be.x):(jr.y-be.y)/(We.y-be.y);if(isNaN(f))return;f<0?Rt.copy(jr,be):f>1&&Rt.copy(jr,We)}jr.toArray(r[1])}}}}function xE(r,t,e,n){var i=e==="normal",a=i?r:r.ensureState(e);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function IZ(r,t){var e=t.smooth,n=t.points;if(!!n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var i=_a(n[0],n[1]),a=_a(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*e,s=qc([],n[1],n[0],o/i),l=qc([],n[1],n[2],o/a),u=qc([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function lx(r,t,e){var n=r.getTextGuideLine(),i=r.getTextContent();if(!i){n&&r.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<Sf.length;l++){var u=Sf[l],c=t[u],f=u==="normal";if(c){var h=c.get("show"),d=f?s:Et(i.states[u]&&i.states[u].ignore,s);if(d||!Et(h,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0);continue}n||(n=new Yr,r.setTextGuideLine(n),!f&&(s||!o)&&xE(n,!0,"normal",t.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),xE(n,!1,u,c)}}if(n){bt(n.style,e),n.style.fill=null;var p=a.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=IZ}}function ux(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},n=0;n<Wr.length;n++){var i=Wr[n];e[i]=r.getModel([i,t])}return e}function SE(r){for(var t=[],e=0;e<r.length;e++){var n=r[e];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=i.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new xp(o,a):null;t.push({label:i,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return t}function wE(r,t,e,n,i,a){var o=r.length;if(o<2)return;r.sort(function(C,T){return C.rect[t]-T.rect[t]});for(var s=0,l,u=!1,c=0,f=0;f<o;f++){var h=r[f],d=h.rect;l=d[t]-s,l<0&&(d[t]-=l,h.label[t]-=l,u=!0);var v=Math.max(-l,0);c+=v,s=d[t]+d[e]}c>0&&a&&S(-c/o,0,o);var p=r[0],g=r[o-1],m,y;_(),m<0&&x(-m,.8),y<0&&x(y,.8),_(),b(m,y,1),b(y,m,-1),_(),m<0&&w(-m),y<0&&w(y);function _(){m=p.rect[t]-n,y=i-g.rect[t]-g.rect[e]}function b(C,T,D){if(C<0){var A=Math.min(T,-C);if(A>0){S(A*D,0,o);var P=A+C;P<0&&x(-P*D,1)}else x(-C*D,1)}}function S(C,T,D){C!==0&&(u=!0);for(var A=T;A<D;A++){var P=r[A],I=P.rect;I[t]+=C,P.label[t]+=C}}function x(C,T){for(var D=[],A=0,P=1;P<o;P++){var I=r[P-1].rect,O=Math.max(r[P].rect[t]-I[t]-I[e],0);D.push(O),A+=O}if(!!A){var E=Math.min(Math.abs(C)/A,T);if(C>0)for(var P=0;P<o-1;P++){var R=D[P]*E;S(R,0,P+1)}else for(var P=o-1;P>0;P--){var R=D[P-1]*E;S(-R,P,o)}}}function w(C){var T=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(o-1)),A=0;A<o-1;A++)if(T>0?S(D,0,A+1):S(-D,o-A-1,o),C-=D,C<=0)return}return u}function OZ(r,t,e,n){return wE(r,"x","width",t,e,n)}function CE(r,t,e,n){return wE(r,"y","height",t,e,n)}function TE(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new kt(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i<r.length;i++){var a=r[i],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,c=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var f=a.obb,h=!1,d=0;d<t.length;d++){var v=t[d];if(!!e.intersect(v.rect)){if(o&&v.axisAligned){h=!0;break}if(v.obb||(v.obb=new xp(v.localRect,v.transform)),f||(f=new xp(s,l)),f.intersect(v.obb)){h=!0;break}}}h?(n(u),c&&n(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}function EZ(r){if(r){for(var t=[],e=0;e<r.length;e++)t.push(r[e].slice());return t}}function RZ(r,t){var e=r.label,n=t&&t.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:EZ(n&&n.shape.points)}}var ME=["align","verticalAlign","width","height","fontSize"],wn=new Ca,cx=jt(),kZ=jt();function wg(r,t,e){for(var n=0;n<e.length;n++){var i=e[n];t[i]!=null&&(r[i]=t[i])}}var Cg=["x","y","rotation"],NZ=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(t,e,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();kt.applyTransform(c,c,u),u?wn.setLocalTransform(u):(wn.x=wn.y=wn.rotation=wn.originX=wn.originY=0,wn.scaleX=wn.scaleY=1);var f=i.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var d=f.getComputedTransform();kt.applyTransform(h,h,d)}var v=h&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:v,seriesModel:n,dataIndex:t,dataType:e,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:v&&v.ignore,x:wn.x,y:wn.y,scaleX:wn.scaleX,scaleY:wn.scaleY,rotation:wn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");!(_t(i)||Ht(i).length)||t.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=Lt(a);o&&!o.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,n,o,i)})},r.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function i(_,b){return function(){_E(_,b)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;_t(o.layoutOption)?c=o.layoutOption(RZ(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=at(c.x,e),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=at(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),h=!1)}var v=cx(s);v.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<ME.length;p++){var g=ME[p];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),i=SE(this._labelList),a=ae(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=ae(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});OZ(a,0,e),CE(o,0,n);var s=ae(i,function(l){return l.layoutOption.hideOverlap});TE(s)},r.prototype.processLabelsOverall=function(){var t=this;L(this._chartViewList,function(e){var n=e.__model,i=e.ignoreLabelLineUpdate,a=n.isAnimationEnabled();e.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=cx(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,n),a&&t._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=Lt(t),a=i.dataIndex;if(n&&a!=null){var o=e.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style"),c=o.getVisual("drawType");l.stroke=u[c];var f=s.getModel("labelLine");lx(t,ux(s),l),_E(t,f)}},r.prototype._animateLabels=function(t,e){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!bu(t))){var a=cx(n),o=a.oldLayout,s=Lt(t),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=e.getData(s.dataType);if(o){n.attr(o);var h=t.prevStates;h&&(Bt(h,"select")>=0&&n.attr(a.oldLayoutSelect),Bt(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Xt(n,u,e,l)}else if(n.attr(u),!Cu(n).valueAnimation){var f=Et(n.style.opacity,1);n.style.opacity=0,Te(n,{style:{opacity:f}},e,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};wg(d,u,Cg),wg(d,n.states.select,Cg)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};wg(v,u,Cg),wg(v,n.states.emphasis,Cg)}GP(n,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){var a=kZ(i),o=a.oldLayout,p={points:i.shape.points};o?(i.attr({shape:o}),Xt(i,{shape:p},e)):(i.setShape(p),i.style.strokePercent=0,Te(i,{style:{strokePercent:1}},e)),a.oldLayout=p}},r}(),BZ=NZ,fx=jt();function zZ(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var i=fx(e).labelManager;i||(i=fx(e).labelManager=new BZ),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=fx(e).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(e.getViewOfSeriesModel(a))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}var hx=Math.sin,dx=Math.cos,DE=Math.PI,il=Math.PI*2,FZ=180/DE,VZ=function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){this._add("C",t,e,n,i,a,o)},r.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},r.prototype.arc=function(t,e,n,i,a,o){this.ellipse(t,e,n,n,0,i,a,o)},r.prototype.ellipse=function(t,e,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=co(f-il)||(c?u>=il:-u>=il),d=u>0?u%il:u%il+il,v=!1;h?v=!0:co(f)?v=!1:v=d>=DE==!!c;var p=t+n*dx(o),g=e+i*hx(o);this._start&&this._add("M",p,g);var m=Math.round(a*FZ);if(h){var y=1/this._p,_=(c?1:-1)*(il-y);this._add("A",n,i,m,1,+c,t+n*dx(o+_),e+i*hx(o+_)),y>.01&&this._add("A",n,i,m,0,+c,p,g)}else{var b=t+n*dx(s),S=e+i*hx(s);this._add("A",n,i,m,+v,+c,b,S)}},r.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var d=arguments[h];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*f)/f)}this._d.push(t+c.join(" ")),this._start=t==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),AE=VZ,hh="none",HZ=Math.round;function $Z(r){var t=r.fill;return t!=null&&t!==hh}function WZ(r){var t=r.stroke;return t!=null&&t!==hh}var vx=["lineCap","miterLimit","lineJoin"],GZ=J(vx,function(r){return"stroke-"+r.toLowerCase()});function UZ(r,t,e,n){var i=t.opacity==null?1:t.opacity;if(e instanceof ur){r("opacity",i);return}if($Z(t)){var a=sf(t.fill);r("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;(n||o<1)&&r("fill-opacity",o)}else r("fill",hh);if(WZ(t)){var s=sf(t.stroke);r("stroke",s.color);var l=t.strokeNoScale?e.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,f=t.strokeFirst;if((n||u!==1)&&r("stroke-width",u),(n||f)&&r("paint-order",f?"stroke":"fill"),(n||c<1)&&r("stroke-opacity",c),t.lineDash){var h=S1(e),d=h[0],v=h[1];d&&(v=HZ(v||0),r("stroke-dasharray",d.join(",")),(v||n)&&r("stroke-dashoffset",v))}else n&&r("stroke-dasharray",hh);for(var p=0;p<vx.length;p++){var g=vx[p];if(n||t[g]!==sp[g]){var m=t[g]||sp[g];m&&r(GZ[p],m)}}}else n&&r("stroke",hh)}var PE="http://www.w3.org/2000/svg",LE="http://www.w3.org/1999/xlink",YZ="http://www.w3.org/2000/xmlns/",qZ="http://www.w3.org/XML/1998/namespace";function IE(r){return document.createElementNS(PE,r)}function ir(r,t,e,n,i){return{tag:r,attrs:e||{},children:n,text:i,key:t}}function jZ(r,t){var e=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),e.push(a))}return"<"+r+" "+e.join(" ")+">"}function XZ(r){return"</"+r+">"}function px(r,t){t=t||{};var e=t.newline?`
|
|
207
|
+
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs;return jZ(o,s)+Vr(i.text)+(a?""+e+J(a,function(l){return n(l)}).join(e)+e:"")+XZ(o)}return n(r)}function ZZ(r,t,e){e=e||{};var n=e.newline?`
|
|
208
|
+
`:"",i=" {"+n,a=n+"}",o=J(Ht(r),function(l){return l+i+J(Ht(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+a}).join(n),s=J(Ht(t),function(l){return"@keyframes "+l+i+J(Ht(t[l]),function(u){return u+i+J(Ht(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function gx(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function OE(r,t,e,n){return ir("svg","root",{width:r,height:t,xmlns:PE,"xmlns:xlink":LE,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+t:!1},e)}var EE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},al="transform-origin";function KZ(r,t,e){var n=K({},r.shape);K(n,t),r.buildPath(e,n);var i=new AE;return i.reset(w2(r)),e.rebuildPath(i,1),i.generateStr(),i.getStr()}function QZ(r,t){var e=t.originX,n=t.originY;(e||n)&&(r[al]=e+"px "+n+"px")}var JZ={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function RE(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function tK(r,t,e){var n=r.shape.paths,i={},a,o;if(L(n,function(l){var u=gx(e.zrId);u.animation=!0,Tg(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Ht(c),d=h.length;if(!!d){o=h[d-1];var v=c[o];for(var p in v){var g=v[p];i[p]=i[p]||{d:""},i[p].d+=g.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=RE(i,e);return a.replace(o,s)}}function kE(r){return ct(r)?EE[r]?"cubic-bezier("+EE[r]+")":u_(r)?r:"":""}function Tg(r,t,e,n){var i=r.animators,a=i.length,o=[];if(r instanceof yp){var s=tK(r,t,e);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],h=kE(c.getClip().easing),d=c.getDelay();h?f.push(h):f.push("linear"),d&&f.push(d/1e3+"s"),c.getLoop()&&f.push("infinite");var v=f.join(" ");l[v]=l[v]||[v,[]],l[v][1].push(c)}function p(y){var _=y[1],b=_.length,S={},x={},w={},C="animation-timing-function";function T(rt,vt,ft){for(var lt=rt.getTracks(),mt=rt.getMaxTime(),At=0;At<lt.length;At++){var Ct=lt[At];if(Ct.needsAnimate()){var F=Ct.keyframes,X=Ct.propName;if(ft&&(X=ft(X)),X)for(var Z=0;Z<F.length;Z++){var ut=F[Z],ht=Math.round(ut.time/mt*100)+"%",ot=kE(ut.easing),gt=ut.rawValue;(ct(gt)||qt(gt))&&(vt[ht]=vt[ht]||{},vt[ht][X]=ut.rawValue,ot&&(vt[ht][C]=ot))}}}}for(var D=0;D<b;D++){var A=_[D],P=A.targetName;P?P==="shape"&&T(A,x):!n&&T(A,S)}for(var I in S){var O={};N2(O,r),K(O,S[I]);var E=C2(O),R=S[I][C];w[I]=E?{transform:E}:{},QZ(w[I],O),R&&(w[I][C]=R)}var z,B=!0;for(var I in x){w[I]=w[I]||{};var Y=!z,R=x[I][C];Y&&(z=new ji);var W=z.len();z.reset(),w[I].d=KZ(r,x[I],z);var et=z.len();if(!Y&&W!==et){B=!1;break}R&&(w[I][C]=R)}if(!B)for(var I in w)delete w[I].d;if(!n)for(var D=0;D<b;D++){var A=_[D],P=A.targetName;P==="style"&&T(A,w,function(lt){return JZ[lt]})}for(var V=Ht(w),H=!0,G,D=1;D<V.length;D++){var j=V[D-1],tt=V[D];if(w[j][al]!==w[tt][al]){H=!1;break}G=w[j][al]}if(H&&G){for(var I in w)w[I][al]&&delete w[I][al];t[al]=G}if(ae(V,function(rt){return Ht(w[rt]).length>0}).length){var nt=RE(w,e);return nt+" "+y[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var m=e.zrId+"-cls-"+e.cssClassIdx++;e.cssNodes["."+m]={animation:o.join(",")},t.class=m}}var dh=Math.round;function NE(r){return r&&ct(r.src)}function BE(r){return r&&_t(r.toDataURL)}function mx(r,t,e,n){UZ(function(i,a){var o=i==="fill"||i==="stroke";o&&S2(a)?WE(t,r,i,n):o&&g_(a)?GE(e,r,i,n):r[i]=a},t,e,!1),sK(e,r,n)}function zE(r){return co(r[0]-1)&&co(r[1])&&co(r[2])&&co(r[3]-1)}function eK(r){return co(r[4])&&co(r[5])}function yx(r,t,e){if(t&&!(eK(t)&&zE(t))){var n=e?10:1e4;r.transform=zE(t)?"translate("+dh(t[4]*n)/n+" "+dh(t[5]*n)/n+")":I7(t)}}function FE(r,t,e){for(var n=r.points,i=[],a=0;a<n.length;a++)i.push(dh(n[a][0]*e)/e),i.push(dh(n[a][1]*e)/e);t.points=i.join(" ")}function VE(r){return!r.smooth}function rK(r){var t=J(r,function(e){return typeof e=="string"?[e,e]:e});return function(e,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=e[o[0]];s!=null&&(n[o[1]]=dh(s*i)/i)}}}var nK={circle:[rK(["cx","cy","r"])],polyline:[FE,VE],polygon:[FE,VE]};function iK(r){for(var t=r.animators,e=0;e<t.length;e++)if(t[e].targetName==="shape")return!0;return!1}function HE(r,t){var e=r.style,n=r.shape,i=nK[r.type],a={},o=t.animation,s="path",l=r.style.strokePercent,u=t.compress&&w2(r)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&iK(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var h=r.path;f&&(h.beginPath(),r.buildPath(h,r.shape),r.pathUpdated());var d=h.getVersion(),v=r,p=v.__svgPathBuilder;(v.__svgPathVersion!==d||!p||l!==v.__svgPathStrokePercent)&&(p||(p=v.__svgPathBuilder=new AE),p.reset(u),h.rebuildPath(p,l),p.generateStr(),v.__svgPathVersion=d,v.__svgPathStrokePercent=l),a.d=p.getStr()}return yx(a,r.transform),mx(a,e,r,t),t.animation&&Tg(r,a,t),ir(s,r.id+"",a)}function aK(r,t){var e=r.style,n=e.image;if(n&&!ct(n)&&(NE(n)?n=n.src:BE(n)&&(n=n.toDataURL())),!!n){var i=e.x||0,a=e.y||0,o=e.width,s=e.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),yx(l,r.transform),mx(l,e,r,t),t.animation&&Tg(r,l,t),ir("image",r.id+"",l)}}function oK(r,t){var e=r.style,n=e.text;if(n!=null&&(n+=""),!(!n||isNaN(e.x)||isNaN(e.y))){var i=e.font||eo,a=e.x||0,o=E7(e.y||0,Xv(i),e.textBaseline),s=O7[e.textAlign]||e.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(EA(e)){var u="",c=e.fontStyle,f=IA(e.fontSize);if(!parseFloat(f))return;var h=e.fontFamily||LD,d=e.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),yx(l,r.transform),mx(l,e,r,t),t.animation&&Tg(r,l,t),ir("text",r.id+"",l,void 0,n)}}function $E(r,t){if(r instanceof Ft)return HE(r,t);if(r instanceof ur)return aK(r,t);if(r instanceof bf)return oK(r,t)}function sK(r,t,e){var n=r.style;if(R7(n)){var i=k7(r),a=e.shadowCache,o=a[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,d=sf(n.shadowColor),v=d.opacity,p=d.color,g=h/2/l,m=h/2/u,y=g+" "+m;o=e.zrId+"-s"+e.shadowIdx++,e.defs[o]=ir("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ir("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":p,"flood-opacity":v})]),a[i]=o}t.filter=Hv(o)}}function WE(r,t,e,n){var i=r[e],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(b2(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(x2(i))a="radialGradient",o.cx=Et(i.x,.5),o.cy=Et(i.y,.5),o.r=Et(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=p_(s[u].offset)*100+"%",h=s[u].color,d=sf(h),v=d.color,p=d.opacity,g={offset:f};g["stop-color"]=v,p<1&&(g["stop-opacity"]=p),l.push(ir("stop",u+"",g))}var m=ir(a,"",o,l),y=px(m),_=n.gradientCache,b=_[y];b||(b=n.zrId+"-g"+n.gradientIdx++,_[y]=b,o.id=b,n.defs[b]=ir(a,b,o,l)),t[e]=Hv(b)}function GE(r,t,e,n){var i=r.style[e],a=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(_2(i)){var h=i.imageWidth,d=i.imageHeight,v=void 0,p=i.image;if(ct(p)?v=p:NE(p)?v=p.src:BE(p)&&(v=p.toDataURL()),typeof Image=="undefined"){var g="Image width/height must been given explictly in svg-ssr renderer.";Mr(h,g),Mr(d,g)}else if(h==null||d==null){var m=function(D,A){if(D){var P=D.elm,I=h||A.width,O=d||A.height;D.tag==="pattern"&&(u?(O=1,I/=a.width):c&&(I=1,O/=a.height)),D.attrs.width=I,D.attrs.height=O,P&&(P.setAttribute("width",I),P.setAttribute("height",O))}},y=Z_(v,null,r,function(D){l||m(x,D),m(f,D)});y&&y.width&&y.height&&(h=h||y.width,d=d||y.height)}f=ir("image","img",{href:v,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=Tt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(!!f){var _,b;l?_=b=1:u?(b=1,_=o.width/a.width):c?(_=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),b!=null&&!isNaN(b)&&(o.height=b);var S=C2(i);S&&(o.patternTransform=S);var x=ir("pattern","",o,[f]),w=px(x),C=n.patternCache,T=C[w];T||(T=n.zrId+"-p"+n.patternIdx++,C[w]=T,o.id=T,x=n.defs[T]=ir("pattern",T,o,[f])),t[e]=Hv(T)}}function lK(r,t,e){var n=e.clipPathCache,i=e.defs,a=n[r.id];if(!a){a=e.zrId+"-c"+e.clipPathIdx++;var o={id:a};n[r.id]=a,i[a]=ir("clipPath",a,o,[HE(r,e)])}t["clip-path"]=Hv(a)}function UE(r){return document.createTextNode(r)}function ol(r,t,e){r.insertBefore(t,e)}function YE(r,t){r.removeChild(t)}function qE(r,t){r.appendChild(t)}function jE(r){return r.parentNode}function XE(r){return r.nextSibling}function _x(r,t){r.textContent=t}var ZE=58,uK=120,cK=ir("","");function bx(r){return r===void 0}function ra(r){return r!==void 0}function fK(r,t,e){for(var n={},i=t;i<=e;++i){var a=r[i].key;a!==void 0&&(n[a]=i)}return n}function vh(r,t){var e=r.key===t.key,n=r.tag===t.tag;return n&&e}function ph(r){var t,e=r.children,n=r.tag;if(ra(n)){var i=r.elm=IE(n);if(xx(cK,r),Q(e))for(t=0;t<e.length;++t){var a=e[t];a!=null&&qE(i,ph(a))}else ra(r.text)&&!xt(r.text)&&qE(i,UE(r.text))}else r.elm=UE(r.text);return r.elm}function KE(r,t,e,n,i){for(;n<=i;++n){var a=e[n];a!=null&&ol(r,ph(a),t)}}function Mg(r,t,e,n){for(;e<=n;++e){var i=t[e];if(i!=null)if(ra(i.tag)){var a=jE(i.elm);YE(a,i.elm)}else YE(r,i.elm)}}function xx(r,t){var e,n=t.elm,i=r&&r.attrs||{},a=t.attrs||{};if(i!==a){for(e in a){var o=a[e],s=i[e];s!==o&&(o===!0?n.setAttribute(e,""):o===!1?n.removeAttribute(e):e.charCodeAt(0)!==uK?n.setAttribute(e,o):e==="xmlns:xlink"||e==="xmlns"?n.setAttributeNS(YZ,e,o):e.charCodeAt(3)===ZE?n.setAttributeNS(qZ,e,o):e.charCodeAt(5)===ZE?n.setAttributeNS(LE,e,o):n.setAttribute(e,o))}for(e in i)e in a||n.removeAttribute(e)}}function hK(r,t,e){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=e.length-1,u=e[0],c=e[l],f,h,d,v;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=e[++i]:c==null?c=e[--l]:vh(o,u)?(Uu(o,u),o=t[++n],u=e[++i]):vh(s,c)?(Uu(s,c),s=t[--a],c=e[--l]):vh(o,c)?(Uu(o,c),ol(r,o.elm,XE(s.elm)),o=t[++n],c=e[--l]):vh(s,u)?(Uu(s,u),ol(r,s.elm,o.elm),s=t[--a],u=e[++i]):(bx(f)&&(f=fK(t,n,a)),h=f[u.key],bx(h)?ol(r,ph(u),o.elm):(d=t[h],d.tag!==u.tag?ol(r,ph(u),o.elm):(Uu(d,u),t[h]=void 0,ol(r,d.elm,o.elm))),u=e[++i]);(n<=a||i<=l)&&(n>a?(v=e[l+1]==null?null:e[l+1].elm,KE(r,v,e,i,l)):Mg(r,t,n,a))}function Uu(r,t){var e=t.elm=r.elm,n=r.children,i=t.children;r!==t&&(xx(r,t),bx(t.text)?ra(n)&&ra(i)?n!==i&&hK(e,n,i):ra(i)?(ra(r.text)&&_x(e,""),KE(e,null,i,0,i.length-1)):ra(n)?Mg(e,n,0,n.length-1):ra(r.text)&&_x(e,""):r.text!==t.text&&(ra(n)&&Mg(e,n,0,n.length-1),_x(e,t.text)))}function dK(r,t){if(vh(r,t))Uu(r,t);else{var e=r.elm,n=jE(e);ph(t),n!==null&&(ol(n,t.elm,XE(e)),Mg(n,[r],0,0))}return t}var vK=0,pK=function(){function r(t,e,n){if(this.type="svg",this.refreshHover=QE(),this.configLayer=QE(),this.storage=e,this._opts=n=K({},n),this.root=t,this._id="zr"+vK++,this._oldVNode=OE(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=IE("svg");xx(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",dK(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return $E(t,gx(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=gx(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[],s=this._bgVNode=gK(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=ir("g","main",{},[]);this._paintList(e,a,l?l.children:o),l&&o.push(l);var u=J(Ht(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(ir("defs","defs",{},u)),t.animation){var c=ZZ(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=ir("style","stl",{},[],c);o.push(f)}}return OE(n,i,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},px(this.renderToVNode({animation:Et(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Et(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=t[c];if(!f.invisible){var h=f.__clipPaths,d=h&&h.length||0,v=l&&l.length||0,p=void 0;for(p=Math.max(d-1,v-1);p>=0&&!(h&&l&&h[p]===l[p]);p--);for(var g=v-1;g>p;g--)o--,s=a[o-1];for(var m=p+1;m<d;m++){var y={};lK(h[m],y,e);var _=ir("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=h;var b=$E(f,e);b&&(s?s.children:n).push(b)}}},r.prototype.resize=function(t,e){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),e!=null&&(n.height=e),i&&a&&(a.style.display="none",t=Fu(i,0,n),e=Fu(i,1,n),a.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,a){var o=a.style;o.width=t+"px",o.height=e+"px"}if(g_(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",e));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",e))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(t){var e=this.renderToString(),n="data:image/svg+xml;";return t?(e=B7(e),e&&n+"base64,"+e):n+"charset=UTF-8,"+encodeURIComponent(e)},r}();function QE(r){return function(){}}function gK(r,t,e,n){var i;if(e&&e!=="none")if(i=ir("rect","bg",{width:r,height:t,x:"0",y:"0",id:"0"}),S2(e))WE({fill:e},i.attrs,"fill",n);else if(g_(e))GE({style:{fill:e},dirty:Fe,getBoundingRect:function(){return{width:r,height:t}}},i.attrs,"fill",n);else{var a=sf(e),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}var mK=pK;function yK(r){r.registerPainter("svg",mK)}function JE(r,t,e){var n=fi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*e,n.height=a*e,n}var _K=function(r){Ce(t,r);function t(e,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||jv,typeof e=="string"?o=JE(e,n,i):xt(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(U0(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=JE("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new kt(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new kt(0,0,0,0);_.copy(y),o.push(_)}else{for(var b=!1,S=1/0,x=0,w=0;w<o.length;++w){var C=o[w];if(C.intersect(y)){var T=new kt(0,0,0,0);T.copy(C),T.union(y),o[w]=T,b=!0;break}else if(l){u.copy(y),u.union(C);var D=y.width*y.height,A=C.width*C.height,P=u.width*u.height,I=P-D-A;I<S&&(S=I,x=w)}}if(l&&(o[x].union(y),b=!0),!b){var _=new kt(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=e[f];if(h){var d=h.shouldBePainted(i,a,!0,!0),v=h.__isRendered&&(h.__dirty&yn||!d)?h.getPrevPaintRect():null;v&&c(v);var p=d&&(h.__dirty&yn||!h.__isRendered)?h.getPaintRect():null;p&&c(p)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],d=h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var v=h.getPrevPaintRect();v&&c(v)}}var g;do{g=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var m=f+1;m<o.length;)o[f].intersect(o[m])?(g=!0,o[f].union(o[m]),o.splice(m,1)):m++;f++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=n+"px"),a.width=e*i,a.height=n*i,s&&(s.width=e*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||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 d=this.domBack;function v(p,g,m,y){if(o.clearRect(p,g,m,y),n&&n!=="transparent"){var _=void 0;if(Vc(n)){var b=n.global||n.__width===m&&n.__height===y;_=b&&n.__canvasGradient||x1(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else ND(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,_=w1(o,n,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(p,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,p,g,m,y),o.restore())}!i||u?v(0,0,s,l):i.length&&L(i,function(p){v(p.x*f,p.y*f,p.width*f,p.height*f)})},t}(En),Sx=_K,tR=1e5,sl=314159,Dg=.01,bK=.001;function xK(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function SK(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}var wK=function(){function r(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=K({},n||{}),this.dpr=n.devicePixelRatio||jv,this._singleCanvas=a,this.root=t;var o=t.style;o&&(U0(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=t,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var d=new Sx(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[sl]=d,d.zlevel=sl,s.push(sl),this._domRoot=t}else{this._width=Fu(t,0,n),this._height=Fu(t,1,n);var u=this._domRoot=SK(this._width,this._height);t.appendChild(u)}}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=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(tR)),a||(a=n.ctx,a.save()),Qs(a,s,i,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(tR)},r.prototype.paintOne=function(t,e){C1(t,e)},r.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;s_(function(){l._paintList(t,e,n,i)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(sl).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},r.prototype._doPaintList=function(t,e,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,f=!1,h=function(p){var g=a[p],m=g.ctx,y=o&&g.createRepaintRects(t,e,d._width,d._height),_=n?g.__startIndex:g.__drawIndex,b=!n&&g.incremental&&Date.now,S=b&&Date.now(),x=g.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,y);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||n)&&g.clear(!1,x,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var C,T=function(I){var O={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(C=_;C<g.__endIndex;C++){var E=t[C];if(E.__inHover&&(f=!0),i._doPaintEl(E,g,o,I,O,C===g.__endIndex-1),b){var R=Date.now()-S;if(R>15)break}}O.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var D=d.dpr,A=0;A<y.length;++A){var P=y[A];m.save(),m.beginPath(),m.rect(P.x*D,P.y*D,P.width*D,P.height*D),m.clip(),T(P),m.restore()}else m.save(),T(),m.restore();g.__drawIndex=C,g.__drawIndex<g.__endIndex&&(c=!1)},d=this,v=0;v<a.length;v++)h(v);return Yt.wxa&&L(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(t,e,n,i,a,o){var s=e.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Qs(s,t,a,o),t.setPrevPaintRect(l))}else Qs(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=sl);var n=this._layers[t];return n||(n=new Sx("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Ot(n,this._layerConfig[t],!0):this._layerConfig[t-Dg]&&Ot(n,this._layerConfig[t-Dg],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},r.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[t]&&!!xK(e)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,h){f.__dirty=f.__used=!1});function e(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+bK,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Dg:0),this._needsManuallyCompositing),c.__builtin__||bv("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,e(l),a=c),i.__dirty&yn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,L(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?Ot(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Dg){var o=this._layers[a];Ot(o,n[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];!i||(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(Bt(n,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Fu(a,0,i),e=Fu(a,1,i),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(sl).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[sl].dom;var e=new Sx("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,a=e.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Qs(n,c,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}(),CK=wK;function TK(r){r.registerPainter("canvas",CK)}var MK=function(r){q(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){return Qi(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new Dt,i=$e("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=$e(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.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="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(_e),DK=MK;function Yu(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=Eu(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<e.length;o++)a.push(Eu(r,t,e[o]));return a.join(" ")}}function eR(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!Q(t))return t+"";for(var n=[],i=0;i<e.length;i++){var a=r.getDimensionIndex(e[i]);a>=0&&n.push(t[a])}return n.join(" ")}var AK=function(r){q(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o){this.removeAll();var s=$e(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=PK,this._symbolType=e,this.add(s)},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(){Aa(this.childAt(0))},t.prototype.downplay=function(){Pa(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var f=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):Xt(h,d,s,n),bi(h)}if(this._updateCommon(e,n,l,i,a),u){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Te(h,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),l=e.hostModel,u,c,f,h,d,v,p,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,v=a.emphasisDisabled),!a||e.hasItemOption){var y=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),d=_.get("blurScope"),v=_.get("disabled"),p=rr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var S=zu(e.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),m&&s.attr("cursor",m);var x=e.getItemVisual(n,"style"),w=x.fill;if(s instanceof ur){var C=s.style;s.useStyle(K({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},x))}else s.__isEmptyBrush?s.useStyle(K({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=e.getItemVisual(n,"liftZ"),D=this._z2;T!=null?D==null&&(this._z2=s.z2,s.z2+=T):D!=null&&(s.z2=D,this._z2=null);var A=o&&o.useNameLabel;_r(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:w,defaultOpacity:x.opacity});function P(E){return A?e.getName(E):Yu(e,E)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var O=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*O,I.scaleY=this._sizeY*O,this.setSymbolScale(1),Re(this,h,d,v)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=Lt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&yo(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();yo(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return Qf(e.getItemVisual(n,"symbolSize"))},t}(Dt);function PK(r,t){this.parent.drift(r,t)}var gh=AK;function Cx(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function rR(r){return r!=null&&!xt(r)&&(r={isIgnore:r}),r||{}}function nR(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:rr(t),cursorStyle:t.get("cursor")}}var LK=function(){function r(t){this.group=new Dt,this._SymbolCtor=t||gh}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=rR(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=nR(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var h=c(f);if(Cx(t,h,f,e)){var d=new o(t,f,l,u);d.setPosition(h),t.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),v=c(f);if(!Cx(t,v,f,e)){n.remove(d);return}var p=t.getItemVisual(f,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==p)n.remove(d),d=new o(t,f,l,u),d.setPosition(v);else{d.updateData(t,f,l,u);var m={x:v[0],y:v[1]};s?d.attr(m):Xt(d,m,i)}n.add(d),t.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=nR(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=rR(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(Cx(e,o,a,n)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){bo(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},n.hostModel)}):e.removeAll()},r}(),mh=LK;function iR(r,t,e){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=IK(i,e),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=J(r.dimensions,function(v){return t.mapDimension(v)}),h=!1,d=t.getCalculationInfo("stackResultDimension");return Oa(t,f[0])&&(h=!0,f[0]=d),Oa(t,f[1])&&(h=!0,f[1]=d),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function IK(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:qt(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function aR(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function OK(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function EK(r,t,e,n,i,a,o,s){for(var l=OK(r,t),u=[],c=[],f=[],h=[],d=[],v=[],p=[],g=iR(i,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],S=!0,x=void 0,w=void 0;switch(b.cmd){case"=":x=b.idx*2,w=b.idx1*2;var C=m[x],T=m[x+1],D=y[w],A=y[w+1];(isNaN(C)||isNaN(T))&&(C=D,T=A),u.push(C,T),c.push(D,A),f.push(e[x],e[x+1]),h.push(n[w],n[w+1]),p.push(t.getRawIndex(b.idx1));break;case"+":var P=b.idx,I=g.dataDimsForPoint,O=i.dataToPoint([t.get(I[0],P),t.get(I[1],P)]);w=P*2,u.push(O[0],O[1]),c.push(y[w],y[w+1]);var E=aR(g,i,t,P);f.push(E[0],E[1]),h.push(n[w],n[w+1]),p.push(t.getRawIndex(P));break;case"-":S=!1}S&&(d.push(b),v.push(v.length))}v.sort(function(j,tt){return p[j]-p[tt]});for(var R=u.length,z=Ji(R),B=Ji(R),Y=Ji(R),W=Ji(R),et=[],_=0;_<v.length;_++){var V=v[_],H=_*2,G=V*2;z[H]=u[G],z[H+1]=u[G+1],B[H]=c[G],B[H+1]=c[G+1],Y[H]=f[G],Y[H+1]=f[G+1],W[H]=h[G],W[H+1]=h[G+1],et[_]=d[V]}return{current:z,next:B,stackedOnCurrent:Y,stackedOnNext:W,status:et}}var Lo=Math.min,Io=Math.max;function ll(r,t){return isNaN(r)||isNaN(t)}function Tx(r,t,e,n,i,a,o,s,l){for(var u,c,f,h,d,v,p=e,g=0;g<n;g++){var m=t[p*2],y=t[p*2+1];if(p>=i||p<0)break;if(ll(m,y)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](m,y),f=m,h=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){p+=a;continue}if(o>0){for(var S=p+a,x=t[S*2],w=t[S*2+1];x===m&&w===y&&g<n;)g++,S+=a,p+=a,x=t[S*2],w=t[S*2+1],m=t[p*2],y=t[p*2+1],_=m-u,b=y-c;var C=g+1;if(l)for(;ll(x,w)&&C<n;)C++,S+=a,x=t[S*2],w=t[S*2+1];var T=.5,D=0,A=0,P=void 0,I=void 0;if(C>=n||ll(x,w))d=m,v=y;else{D=x-u,A=w-c;var O=m-u,E=x-m,R=y-c,z=w-y,B=void 0,Y=void 0;if(s==="x"){B=Math.abs(O),Y=Math.abs(E);var W=D>0?1:-1;d=m-W*B*o,v=y,P=m+W*Y*o,I=y}else if(s==="y"){B=Math.abs(R),Y=Math.abs(z);var et=A>0?1:-1;d=m,v=y-et*B*o,P=m,I=y+et*Y*o}else B=Math.sqrt(O*O+R*R),Y=Math.sqrt(E*E+z*z),T=Y/(Y+B),d=m-D*o*(1-T),v=y-A*o*(1-T),P=m+D*o*T,I=y+A*o*T,P=Lo(P,Io(x,m)),I=Lo(I,Io(w,y)),P=Io(P,Lo(x,m)),I=Io(I,Lo(w,y)),D=P-m,A=I-y,d=m-D*B/Y,v=y-A*B/Y,d=Lo(d,Io(u,m)),v=Lo(v,Io(c,y)),d=Io(d,Lo(u,m)),v=Io(v,Lo(c,y)),D=m-d,A=y-v,P=m+D*Y/B,I=y+A*Y/B}r.bezierCurveTo(f,h,d,v,m,y),f=P,h=I}else r.lineTo(m,y)}u=m,c=y,p+=a}return g}var oR=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),RK=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new oR},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ll(i[o*2-2],i[o*2-1]);o--);for(;a<o&&ll(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Tx(e,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(e,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ji.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var h=a[f++],d=void 0,v=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(d=a[f++],v=a[f++],_=u?(e-s)/(d-s):(e-l)/(v-l),_<=1&&_>=0){var b=u?(v-l)*_+l:(d-s)*_+s;return u?[e,b]:[b,e]}s=d,l=v;break;case o.C:d=a[f++],v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++];var S=u?Nv(s,d,p,m,e,c):Nv(l,v,g,y,e,c);if(S>0)for(var x=0;x<S;x++){var w=c[x];if(w<=1&&w>=0){var b=u?tr(l,v,g,y,w):tr(s,d,p,m,w);return u?[e,b]:[b,e]}}s=m,l=y;break}}},t}(Ft),kK=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(oR),sR=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new kK},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ll(i[s*2-2],i[s*2-1]);s--);for(;o<s&&ll(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Tx(e,i,o,s,s,1,n.smooth,l,n.connectNulls);Tx(e,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,e.closePath()}},t}(Ft);function lR(r,t,e,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=e.get(["lineStyle","width"])||2;o-=c/2,s-=c/2,l+=c,u+=c,o=Math.floor(o),l=Math.round(l);var f=new Gt({shape:{x:o,y:s,width:l,height:u}});if(t){var h=r.getBaseAxis(),d=h.isHorizontal(),v=h.inverse;d?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var p=_t(i)?function(g){i(g,f)}:null;Te(f,{shape:{width:l,height:u,x:o,y:s}},e,null,n,p)}return f}function uR(r,t,e){var n=r.getArea(),i=Ee(n.r0,1),a=Ee(n.r,1),o=new Gr({shape:{cx:Ee(r.cx,1),cy:Ee(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Te(o,{shape:{endAngle:n.endAngle,r:a}},e)}return o}function Ag(r,t,e,n,i){if(r){if(r.type==="polar")return uR(r,t,e);if(r.type==="cartesian2d")return lR(r,t,e,n,i)}else return null;return null}function ul(r,t){return r.type===t}function cR(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function fR(r){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i))}return[[t,e],[n,i]]}function hR(r,t){var e=fR(r),n=e[0],i=e[1],a=fR(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function dR(r){return qt(r)?r:r?.5:0}function NK(r,t,e){if(!e.valueDim)return[];for(var n=t.count(),i=Ji(n*2),a=0;a<n;a++){var o=aR(e,r,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Oo(r,t,e,n){var i=t.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,l=[],u=[],c=[],f=[];if(n){for(s=0;s<r.length;s+=2)!isNaN(r[s])&&!isNaN(r[s+1])&&f.push(r[s],r[s+1]);r=f}for(s=0;s<r.length-2;s+=2)switch(c[0]=r[s+2],c[1]=r[s+3],u[0]=r[s],u[1]=r[s+1],o.push(u[0],u[1]),e){case"end":l[a]=c[a],l[1-a]=u[1-a],o.push(l[0],l[1]);break;case"middle":var h=(u[a]+c[a])/2,d=[];l[a]=d[a]=h,l[1-a]=u[1-a],d[1-a]=c[1-a],o.push(l[0],l[1]),o.push(d[0],d[1]);break;default:l[a]=u[a],l[1-a]=c[1-a],o.push(l[0],l[1])}return o.push(r[s++],r[s++]),o}function BK(r,t){var e=[],n=r.length,i,a;function o(c,f,h){var d=c.coord,v=(h-d)/(f.coord-d),p=v_(v,[c.color,f.color]);return{coord:h,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>t){a?e.push(o(a,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),a=l}return e}function zK(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!!a){var l=t.getAxis(i),u=J(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=BK(u,i==="x"?e.getWidth():e.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,p=h[0].coord-v,g=h[d-1].coord+v,m=g-p;if(m<.001)return"transparent";L(h,function(_){_.offset=(_.coord-p)/m}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var y=new yu(0,0,0,0,h,!0);return y[i]=p,y[i+"2"]=g,y}}}function FK(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(!!a&&!(i&&VK(a,t))){var o=t.mapDimension(a.dim),s={};return L(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function VK(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(gh.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function HK(r,t){return isNaN(r)||isNaN(t)}function $K(r){for(var t=r.length/2;t>0&&HK(r[t*2-2],r[t*2-1]);t--);return t-1}function vR(r,t){return[r[t*2],r[t*2+1]]}function WK(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){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 pR(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Wr.length;t++)if(r.get([Wr[t],"endLabel","show"]))return!0;return!1}function Mx(r,t,e,n){if(ul(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=pR(n)?function(d,v){r._endLabelOnDuring(d,v,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=lR(t,e,n,function(){var d=r._endLabel;d&&e&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.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 uR(t,e,n)}function GK(r,t){var e=t.getBaseAxis(),n=e.isHorizontal(),i=e.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var UK=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Dt,n=new mh;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=e},t.prototype.render=function(e,n,i){var a=this,o=e.coordinateSystem,s=this.group,l=e.getData(),u=e.getModel("lineStyle"),c=e.getModel("areaStyle"),f=l.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,v=this._symbolDraw,p=this._polyline,g=this._polygon,m=this._lineGroup,y=e.get("animation"),_=!c.isEmpty(),b=c.get("origin"),S=iR(o,l,b),x=_&&NK(o,l,S),w=e.get("showSymbol"),C=e.get("connectNulls"),T=w&&!h&&FK(e,l,o),D=this._data;D&&D.eachItemGraphicEl(function(tt,nt){tt.__temp&&(s.remove(tt),D.setItemGraphicEl(nt,null))}),w||v.remove(),s.add(m);var A=h?!1:e.get("step"),P;o&&o.getArea&&e.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var I=zK(l,o,i)||l.getVisual("style")[l.getVisual("drawType")];if(!(p&&d.type===o.type&&A===this._step))w&&v.updateData(l,{isIgnore:T,clipShape:P,disableAnimation:!0,getSymbolPoint:function(tt){return[f[tt*2],f[tt*2+1]]}}),y&&this._initSymbolLabelAnimation(l,o,P),A&&(f=Oo(f,o,A,C),x&&(x=Oo(x,o,A,C))),p=this._newPolyline(f),_?g=this._newPolygon(f,x):g&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,Gs(I)),m.setClipPath(Mx(this,o,!0,e));else{_&&!g?g=this._newPolygon(f,x):g&&!_&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,Gs(I));var O=m.getClipPath();if(O){var E=Mx(this,o,!1,e);Te(O,{shape:E.shape},e)}else m.setClipPath(Mx(this,o,!0,e));w&&v.updateData(l,{isIgnore:T,clipShape:P,disableAnimation:!0,getSymbolPoint:function(tt){return[f[tt*2],f[tt*2+1]]}}),(!cR(this._stackedOnPoints,x)||!cR(this._points,f))&&(y?this._doUpdateAnimation(l,x,o,i,A,b,C):(A&&(f=Oo(f,o,A,C),x&&(x=Oo(x,o,A,C))),p.setShape({points:f}),g&&g.setShape({points:f,stackedOnPoints:x})))}var R=e.getModel("emphasis"),z=R.get("focus"),B=R.get("blurScope"),Y=R.get("disabled");if(p.useStyle(bt(u.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),yr(p,e,"lineStyle"),p.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Lt(p).seriesIndex=e.seriesIndex,Re(p,z,B,Y);var et=dR(e.get("smooth")),V=e.get("smoothMonotone");if(p.setShape({smooth:et,smoothMonotone:V,connectNulls:C}),g){var H=l.getCalculationInfo("stackedOnSeries"),G=0;g.useStyle(bt(c.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),H&&(G=dR(H.get("smooth"))),g.setShape({smooth:et,stackedOnSmooth:G,smoothMonotone:V,connectNulls:C}),yr(g,e,"areaStyle"),Lt(g).seriesIndex=e.seriesIndex,Re(g,z,B,Y)}var j=function(tt){a._changePolyState(tt)};l.eachItemGraphicEl(function(tt){tt&&(tt.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=f,this._step=A,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,p),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,n){Lt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=Ts(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(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=e.get("zlevel")||0,d=e.get("z")||0;u=new gh(o,s),u.x=c,u.y=f,u.setZ(h,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else he.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=Ts(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 he.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;hp(this._polyline,e),n&&hp(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new RK({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new sR({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");_t(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=_t(f)?f(null):f;e.eachItemGraphicEl(function(d,v){var p=d;if(p){var g=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var b=i,S=n.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-S[1]/180*Math.PI):(m=b.r0,y=b.r,_=S[0])}else{var x=i;a?(m=x.x,y=x.x+x.width,_=d.x):(m=x.y+x.height,y=x.y,_=d.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var C=_t(f)?f(v):c*w+h,T=p.getSymbolPath(),D=T.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(pR(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 Ut({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=$K(l);c>=0&&(_r(s,rr(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?eR(o,d):Yu(o,f)},enableTextSetter:!0},GK(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,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=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,S=(m?p:0)*(y?-1:1),x=(m?0:-p)*(y?-1:1),w=m?"x":"y",C=WK(f,b,w),T=C.range,D=T[1]-T[0],A=void 0;if(D>=1){if(D>1&&!d){var P=vR(f,T[0]);u.attr({x:P[0]+S,y:P[1]+x}),o&&(A=h.getRawValue(T[0]))}else{var P=c.getPointOn(b,w);P&&u.attr({x:P[0]+S,y:P[1]+x});var I=h.getRawValue(T[0]),O=h.getRawValue(T[1]);o&&(A=aA(i,v,I,O,C.t))}a.lastFrameIndex=T[0]}else{var E=e===1||a.lastFrameIndex>0?T[0]:0,P=vR(f,E);o&&(A=h.getRawValue(E)),u.attr({x:P[0]+S,y:P[1]+x})}o&&Cu(u).setLabelText(A)}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,h=EK(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(d=Oo(h.current,i,o,l),v=Oo(h.stackedOnCurrent,i,o,l),p=Oo(h.next,i,o,l),g=Oo(h.stackedOnNext,i,o,l)),hR(d,p)>3e3||c&&hR(v,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=d;var m={shape:{points:p}};h.current!==d&&(m.shape.__points=h.next),u.stopAnimation(),Xt(u,m,f),c&&(c.setShape({points:d,stackedOnPoints:v}),c.stopAnimation(),Xt(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,b=0;b<_.length;b++){var S=_[b].cmd;if(S==="="){var x=e.getItemGraphicEl(_[b].idx1);x&&y.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,C=0;C<y.length;C++){var T=y[C].el,D=y[C].ptIdx*2;T.x=w[D],T.y=w[D+1],T.markRedraw()}})},t.prototype.remove=function(e){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(he),YK=UK;function yh(r,t){return{seriesType:r,plan:ku(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(!!i){var s=J(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Oa(n,s[0])&&(s[0]=u),Oa(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(d,v){for(var p=d.end-d.start,g=o&&Ji(p*l),m=[],y=[],_=d.start,b=0;_<d.end;_++){var S=void 0;if(l===1){var x=c.get(f,_);S=i.dataToPoint(x,null,y)}else m[0]=c.get(f,_),m[1]=c.get(h,_),S=i.dataToPoint(m,null,y);o?(g[b++]=S[0],g[b++]=S[1]):v.setItemLayout(_,S.slice())}o&&v.setLayout("points",g)}}}}}}var qK={average:function(r){for(var t=0,e=0,n=0;n<r.length;n++)isNaN(r[n])||(t+=r[n],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]}},jK=function(r){return Math.round(r.length/2)};function gR(r){return{seriesType:r,reset:function(t,e,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var v=void 0;ct(a)?v=qK[a]:_t(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,v,jK))}}}}}function XK(r){r.registerChartView(YK),r.registerSeriesModel(DK),r.registerLayout(yh("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,gR("line"))}var mR=function(r){q(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,n){return Qi(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.dataToPoint(a.clampData(e));if(i)L(a.getAxes(),function(f,h){if(f.type==="category"){var d=f.getTicksCoords(),v=a.clampData(e)[h];n&&(n[h]==="x1"||n[h]==="y1")&&(v+=1),v>d.length-1&&(v=d.length-1),v<0&&(v=0),d[v]&&(o[h]=f.toGlobalCoord(d[v].coord))}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;o[c]+=l+u/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(_e);_e.registerClass(mR);var Pg=mR,ZK=function(r){q(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 Qi(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,i){return i.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=xo(Pg.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Pg),KK=ZK,QK=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}(),JK=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new QK},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?f-c<d:c-f<d;v||(c=f-(h?d:-d));var p=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);v?(e.moveTo(p*o+i,g*o+a),e.arc(p*u+i,g*u+a,l,-Math.PI+c,c,!h)):e.moveTo(p*s+i,g*s+a),e.arc(i,a,s,c,f,!h),e.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&e.arc(i,a,o,f,c,h)},t}(Ft),Lg=JK;function tQ(r,t){t=t||{};var e=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Zv(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,d=u.r0,v=(h+d)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=e?Math.abs(h-d)/2:0,_=Math.cos,b=Math.sin,S=c+h*_(p),x=f+h*b(p),w="left",C="top";switch(s){case"startArc":S=c+(d-l)*_(m),x=f+(d-l)*b(m),w="center",C="top";break;case"insideStartArc":S=c+(d+l)*_(m),x=f+(d+l)*b(m),w="center",C="bottom";break;case"startAngle":S=c+v*_(p)+Ig(p,l+y,!1),x=f+v*b(p)+Og(p,l+y,!1),w="right",C="middle";break;case"insideStartAngle":S=c+v*_(p)+Ig(p,-l+y,!1),x=f+v*b(p)+Og(p,-l+y,!1),w="left",C="middle";break;case"middle":S=c+v*_(m),x=f+v*b(m),w="center",C="middle";break;case"endArc":S=c+(h+l)*_(m),x=f+(h+l)*b(m),w="center",C="bottom";break;case"insideEndArc":S=c+(h-l)*_(m),x=f+(h-l)*b(m),w="center",C="top";break;case"endAngle":S=c+v*_(g)+Ig(g,l+y,!0),x=f+v*b(g)+Og(g,l+y,!0),w="left",C="middle";break;case"insideEndAngle":S=c+v*_(g)+Ig(g,-l+y,!0),x=f+v*b(g)+Og(g,-l+y,!0),w="right",C="middle";break;default:return Zv(n,i,a)}return n=n||{},n.x=S,n.y=x,n.align=w,n.verticalAlign=C,n}}function eQ(r,t,e,n){if(qt(n)){r.setTextConfig({rotation:n});return}else if(Q(t)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.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 Ig(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Og(r,t,e){return t*Math.cos(r)*(e?1:-1)}var Dx=Math.max,Ax=Math.min;function rQ(r,t){var e=r.getArea&&r.getArea();if(ul(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(e.x-=i,e.width+=i*2):(e.y-=i,e.height+=i*2)}}return e}var nQ=function(r){q(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,n,i,a){this._model=e,this._removeOnRenderedListener(i),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,n,i):this._renderNormal(e,n,i,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,n){this._progressiveEls=[],this._incrementalRenderLarge(e,n)},t.prototype.eachRendered=function(e){bo(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e,n,i,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,d=iQ(e,u);d&&this._enableRealtimeSort(d,s,i);var v=e.get("clip",!0)||d,p=rQ(u,s);o.removeClipPath();var g=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],S=this._backgroundEls,x=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function C(A){var P=Eg[u.type](s,A),I=fQ(u,f,P);return I.useStyle(y.getItemStyle()),u.type==="cartesian2d"&&I.setShape("r",_),b[A]=I,I}s.diff(l).add(function(A){var P=s.getItemModel(A),I=Eg[u.type](s,A,P);if(m&&C(A),!(!s.hasValue(A)||!SR[u.type](I))){var O=!1;v&&(O=yR[u.type](p,I));var E=_R[u.type](e,s,A,I,f,h,c.model,!1,g);d&&(E.forceLabelAnimation=!0),CR(E,s,A,P,I,e,f,u.type==="polar"),x?E.attr({shape:I}):d?bR(d,h,E,I,A,f,!1,!1):Te(E,{shape:I},e,A),s.setItemGraphicEl(A,E),o.add(E),E.ignore=O}}).update(function(A,P){var I=s.getItemModel(A),O=Eg[u.type](s,A,I);if(m){var E=void 0;S.length===0?E=C(P):(E=S[P],E.useStyle(y.getItemStyle()),u.type==="cartesian2d"&&E.setShape("r",_),b[A]=E);var R=Eg[u.type](s,A),z=AR(f,R,u);Xt(E,{shape:z},h,A)}var B=l.getItemGraphicEl(P);if(!s.hasValue(A)||!SR[u.type](O)){o.remove(B);return}var Y=!1;if(v&&(Y=yR[u.type](p,O),Y&&o.remove(B)),B?bi(B):B=_R[u.type](e,s,A,O,f,h,c.model,!!B,g),d&&(B.forceLabelAnimation=!0),w){var W=B.getTextContent();if(W){var et=Cu(W);et.prevValue!=null&&(et.prevValue=et.value)}}else CR(B,s,A,I,O,e,f,u.type==="polar");x?B.attr({shape:O}):d?bR(d,h,B,O,A,f,!0,w):Xt(B,{shape:O},e,A,null),s.setItemGraphicEl(A,B),B.ignore=Y,o.add(B)}).remove(function(A){var P=l.getItemGraphicEl(A);P&&If(P,e,A)}).execute();var T=this._backgroundGroup||(this._backgroundGroup=new Dt);T.removeAll();for(var D=0;D<b.length;++D)T.add(b[D]);o.add(T),this._backgroundEls=b,this._data=s},t.prototype._renderLarge=function(e,n,i){this._clear(),MR(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,n){this._removeBackground(),MR(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var n=e.get("clip",!0)&&Ag(e.coordinateSystem,!1,e),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(e,n,i){var a=this;if(!!n.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,e,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,n,i){var a=[];return e.each(e.mapDimension(n.dim),function(o,s){var l=i(s);l=l==null?NaN:l,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:J(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,n,i){for(var a=i.scale,o=e.mapDimension(i.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:n(e.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,i,a){if(!!this._isOrderChangedWithinSameData(e,n,i)){var o=this._dataSort(e,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,i){var a=n.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){If(a,e,Lt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(he),yR={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,a=r.y+r.height,o=Dx(t.x,r.x),s=Ax(t.x+t.width,i),l=Dx(t.y,r.y),u=Ax(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>i?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),n<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 n=t.r;t.r=t.r0,t.r0=n}var i=Ax(t.r,r.r),a=Dx(t.r0,r.r0);t.r=i,t.r0=a;var o=i-a<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},_R={cartesian2d:function(r,t,e,n,i,a,o,s,l){var u=new Gt({shape:K({},n),z2:1});if(u.__dataIndex=e,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,t,e,n,i,a,o,s,l){var u=!i&&l?Lg:Gr,c=new u({shape:n,z2:1});c.name="item";var f=wR(i);if(c.calculateTextPosition=tQ(f,{isRoundCap:u===Lg}),a){var h=c.shape,d=i?"r":"endAngle",v={};h[d]=i?0:n.startAngle,v[d]=n[d],(s?Xt:Te)(c,{shape:v},a)}return c}};function iQ(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function bR(r,t,e,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Xt:Te)(e,{shape:l},t,i,null);var c=t?r.baseAxis.model:null;(o?Xt:Te)(e,{shape:u},c,i)}function xR(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var aQ=["x","y","width","height"],oQ=["cx","cy","r","startAngle","endAngle"],SR={cartesian2d:function(r){return!xR(r,aQ)},polar:function(r){return!xR(r,oQ)}},Eg={cartesian2d:function(r,t,e){var n=r.getItemLayout(t),i=e?lQ(e,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function sQ(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function wR(r){return function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}}(r)}function CR(r,t,e,n,i,a,o,s){var l=t.getItemVisual(e,"style");s||r.setShape("r",n.get(["itemStyle","borderRadius"])||0),r.useStyle(l);var u=n.getShallow("cursor");u&&r.attr("cursor",u);var c=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",f=rr(n);_r(r,f,{labelFetcher:a,labelDataIndex:e,defaultText:Yu(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var h=r.getTextContent();if(s&&h){var d=n.get(["label","position"]);r.textConfig.inside=d==="middle"?!0:null,eQ(r,d==="outside"?c:d,wR(o),n.get(["label","rotate"]))}WP(h,f,a.getRawValue(e),function(p){return eR(t,p)});var v=n.getModel(["emphasis"]);Re(r,v.get("focus"),v.get("blurScope"),v.get("disabled")),yr(r,n),sQ(i)&&(r.style.fill="none",r.style.stroke="none",L(r.states,function(p){p.style&&(p.style.fill=p.style.stroke="none")}))}function lQ(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var uQ=function(){function r(){}return r}(),TR=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new uQ},t.prototype.buildPath=function(e,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],e.rect(s[0],s[1],l[0],l[1])},t}(Ft);function MR(r,t,e,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new TR({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),e&&e.push(c)}var f=new TR({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual("style")),Lt(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",DR),f.on("mousemove",DR)),e&&e.push(f)}var DR=qp(function(r){var t=this,e=cQ(t,r.offsetX,r.offsetY);Lt(t).dataIndex=e>=0?e:null},30,!1);function cQ(r,t,e){for(var n=r.baseDimIdx,i=1-n,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[n]=u,l[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function AR(r,t,e){if(ul(e,"cartesian2d")){var n=t,i=e.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=e.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function fQ(r,t,e){var n=r.type==="polar"?Gr:Gt;return new n({shape:AR(t,e,r),silent:!0,z2:0})}var hQ=nQ;function dQ(r){r.registerChartView(hQ),r.registerSeriesModel(KK),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,It(UO,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,YO("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,gR("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var Rg=Math.PI*2,PR=Math.PI/180;function LR(r,t){return qe(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function IR(r,t){var e=LR(r,t),n=r.get("center"),i=r.get("radius");Q(i)||(i=[0,i]);var a=at(e.width,t.getWidth()),o=at(e.height,t.getHeight()),s=Math.min(a,o),l=at(i[0],s/2),u=at(i[1],s/2),c,f,h=r.coordinateSystem;if(h){var d=h.dataToPoint(n);c=d[0]||0,f=d[1]||0}else Q(n)||(n=[n,n]),c=at(n[0],a)+e.x,f=at(n[1],o)+e.y;return{cx:c,cy:f,r0:l,r:u}}function vQ(r,t,e){t.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=LR(n,e),s=IR(n,e),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*PR,d=n.get("minAngle")*PR,v=0;i.each(a,function(D){!isNaN(D)&&v++});var p=i.getSum(a),g=Math.PI/(p||v)*2,m=n.get("clockwise"),y=n.get("roseType"),_=n.get("stillShowZeroSum"),b=i.getDataExtent(a);b[0]=0;var S=Rg,x=0,w=h,C=m?1:-1;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(D,A){var P;if(isNaN(D)){i.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:l,cy:u,r0:f,r:y?NaN:c});return}y!=="area"?P=p===0&&_?g:D*g:P=Rg/v,P<d?(P=d,S-=d):x+=D;var I=w+C*P;i.setItemLayout(A,{angle:P,startAngle:w,endAngle:I,clockwise:m,cx:l,cy:u,r0:f,r:y?oe(D,b,[f,c]):c}),w=I}),S<Rg&&v)if(S<=.001){var T=Rg/v;i.each(a,function(D,A){if(!isNaN(D)){var P=i.getItemLayout(A);P.angle=T,P.startAngle=h+C*A*T,P.endAngle=h+C*(A+1)*T}})}else g=S/x,w=h,i.each(a,function(D,A){if(!isNaN(D)){var P=i.getItemLayout(A),I=P.angle===d?d:D*g;P.startAngle=w,P.endAngle=w+C*I,w+=C*I}})})}function _h(r){return{seriesType:r,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var pQ=Math.PI/180;function OR(r,t,e,n,i,a,o,s,l,u){if(r.length<2)return;function c(p){for(var g=p.rB,m=g*g,y=0;y<p.list.length;y++){var _=p.list[y],b=Math.abs(_.label.y-e),S=n+_.len,x=S*S,w=Math.sqrt((1-Math.abs(b*b/m))*x),C=t+(w+_.len2)*i,T=C-_.label.x,D=_.targetTextWidth-T*i;ER(_,D,!0),_.label.x=C}}function f(p){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<p.length;y++)if(p[y].labelAlignTo==="none"){var _=p[y],b=_.label.y>e?m:g,S=Math.abs(_.label.y-e);if(S>=b.maxY){var x=_.label.x-t-_.len2*i,w=n+_.len,C=Math.abs(x)<w?Math.sqrt(S*S/(1-x*x/w/w)):w;b.rB=C,b.maxY=S}b.list.push(_)}c(g),c(m)}for(var h=r.length,d=0;d<h;d++)if(r[d].position==="outer"&&r[d].labelAlignTo==="labelLine"){var v=r[d].label.x-u;r[d].linePoints[1][0]+=v,r[d].label.x=u}CE(r,l,l+o)&&f(r)}function gQ(r,t,e,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<r.length;h++){var d=r[h].label;Px(r[h])||(d.x<t?(c=Math.min(c,d.x),l.push(r[h])):(f=Math.max(f,d.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var v=r[h];if(!Px(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var d=v.label,p=v.linePoints,g=void 0;v.labelAlignTo==="edge"?d.x<t?g=p[2][0]-v.labelDistance-o-v.edgeDistance:g=o+i-v.edgeDistance-p[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?d.x<t?g=c-o-v.bleedMargin:g=o+i-f-v.bleedMargin:d.x<t?g=d.x-o-v.bleedMargin:g=o+i-d.x-v.bleedMargin,v.targetTextWidth=g,ER(v,g)}}OR(u,t,e,n,1,i,a,o,s,f),OR(l,t,e,n,-1,i,a,o,s,c);for(var h=0;h<r.length;h++){var v=r[h];if(!Px(v)&&v.linePoints){var d=v.label,p=v.linePoints,m=v.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,b=d.style.backgroundColor?0:_,S=v.rect.width+b,x=p[1][0]-p[2][0];m?d.x<t?p[2][0]=o+v.edgeDistance+S+v.labelDistance:p[2][0]=o+i-v.edgeDistance-S-v.labelDistance:(d.x<t?p[2][0]=d.x+v.labelDistance:p[2][0]=d.x-v.labelDistance,p[1][0]=p[2][0]+x),p[1][1]=p[2][1]=d.y}}}function ER(r,t,e){if(e===void 0&&(e=!1),r.labelStyleWidth==null){var n=r.label,i=n.style,a=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||e){var f=a.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=t-l,v=t<c?d:e?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",v)}var p=n.getBoundingRect();a.width=p.width;var g=(n.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-f)/2}}}function Px(r){return r.position==="center"}function mQ(r){var t=r.getData(),e=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*pQ,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(x){x.ignore=!0}function v(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}t.each(function(x){var w=t.getItemGraphicEl(x),C=w.shape,T=w.getTextContent(),D=w.getTextGuideLine(),A=t.getItemModel(x),P=A.getModel("label"),I=P.get("position")||A.get(["emphasis","label","position"]),O=P.get("distanceToLabelLine"),E=P.get("alignTo"),R=at(P.get("edgeDistance"),u),z=P.get("bleedMargin"),B=A.getModel("labelLine"),Y=B.get("length");Y=at(Y,u);var W=B.get("length2");if(W=at(W,u),Math.abs(C.endAngle-C.startAngle)<o){L(T.states,d),T.ignore=!0,D&&(L(D.states,d),D.ignore=!0);return}if(!!v(T)){var et=(C.startAngle+C.endAngle)/2,V=Math.cos(et),H=Math.sin(et),G,j,tt,nt;n=C.cx,i=C.cy;var rt=I==="inside"||I==="inner";if(I==="center")G=C.cx,j=C.cy,nt="center";else{var vt=(rt?(C.r+C.r0)/2*V:C.r*V)+n,ft=(rt?(C.r+C.r0)/2*H:C.r*H)+i;if(G=vt+V*3,j=ft+H*3,!rt){var lt=vt+V*(Y+l-C.r),mt=ft+H*(Y+l-C.r),At=lt+(V<0?-1:1)*W,Ct=mt;E==="edge"?G=V<0?c+R:c+u-R:G=At+(V<0?-O:O),j=Ct,tt=[[vt,ft],[lt,mt],[At,Ct]]}nt=rt?"center":E==="edge"?V>0?"right":"left":V>0?"left":"right"}var F=Math.PI,X=0,Z=P.get("rotate");if(qt(Z))X=Z*(F/180);else if(I==="center")X=0;else if(Z==="radial"||Z===!0){var ut=V<0?-et+F:-et;X=ut}else if(Z==="tangential"&&I!=="outside"&&I!=="outer"){var ht=Math.atan2(V,H);ht<0&&(ht=F*2+ht);var ot=H>0;ot&&(ht=F+ht),X=ht-F}if(a=!!X,T.x=G,T.y=j,T.rotation=X,T.setStyle({verticalAlign:"middle"}),rt){T.setStyle({align:nt});var Zt=T.states.select;Zt&&(Zt.x+=T.x,Zt.y+=T.y)}else{var gt=T.getBoundingRect().clone();gt.applyTransform(T.getComputedTransform());var ve=(T.style.margin||0)+2.1;gt.y-=ve/2,gt.height+=ve,e.push({label:T,labelLine:D,position:I,len:Y,len2:W,minTurnAngle:B.get("minTurnAngle"),maxSurfaceAngle:B.get("maxSurfaceAngle"),surfaceNormal:new Rt(V,H),linePoints:tt,textAlign:nt,labelDistance:O,labelAlignTo:E,edgeDistance:R,bleedMargin:z,rect:gt,unconstrainedWidth:gt.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:rt})}}),!a&&r.get("avoidLabelOverlap")&&gQ(e,n,i,l,u,h,c,f);for(var p=0;p<e.length;p++){var g=e[p],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(L(m.states,d),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var S=g.linePoints;_||!S?(L(y.states,d),y.ignore=!0):(bE(S,g.minTurnAngle),LZ(S,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:S}),m.__hostTarget.textGuideLineConfig={anchor:new Rt(S[0][0],S[0][1])})}}}function qu(r,t,e){var n=r.get("borderRadius");if(n==null)return e?{cornerRadius:0}:null;Q(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:J(n,function(a){return gi(a,i)})}}var yQ=function(r){q(t,r);function t(e,n,i){var a=r.call(this)||this;a.z2=2;var o=new Ut;return a.setTextContent(o),a.updateData(e,n,i,!0),a}return t.prototype.updateData=function(e,n,i,a){var o=this,s=e.hostModel,l=e.getItemModel(n),u=l.getModel("emphasis"),c=e.getItemLayout(n),f=K(qu(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(Te(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,Te(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Te(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Xt(o,{shape:{endAngle:c.endAngle}},s,n))}else bi(o),Xt(o,{shape:f},s,n);o.useStyle(e.getItemVisual(n,"style")),yr(o,l);var d=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),p=Math.cos(d)*v,g=Math.sin(d)*v,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,e,n),o.ensureState("emphasis").shape=K({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},qu(u.getModel("itemStyle"),c)),K(o.ensureState("select"),{x:p,y:g,shape:qu(l.getModel(["select","itemStyle"]),c)}),K(o.ensureState("blur"),{shape:qu(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&K(y.ensureState("select"),{x:p,y:g}),K(_.ensureState("select"),{x:p,y:g}),Re(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;_r(a,rr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:e.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=e.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Yr,this.setTextGuideLine(d)),lx(this,ux(o),{stroke:u,opacity:zi(s.get(["lineStyle","opacity"]),c,1)})}},t}(Gr),_Q=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,i,a){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var h=new Gr({shape:IR(e,i)});h.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(d){var v=new yQ(o,d,u);o.setItemGraphicEl(d,v),l.add(v)}).update(function(d,v){var p=s.getItemGraphicEl(v);p.updateData(o,d,u),p.off("click"),l.add(p),o.setItemGraphicEl(d,p)}).remove(function(d){var v=s.getItemGraphicEl(d);If(v,e,d)}).execute(),mQ(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(he),bQ=_Q;function ju(r,t,e){t=Q(t)&&{coordDimensions:t}||K({encodeDefine:r.getEncode()},t);var n=r.getSource(),i=$u(n,t).dimensions,a=new Or(i,r);return a.initData(n,e),a}var xQ=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r}(),bh=xQ,SQ=jt(),wQ=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bh(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ju(this,{coordDimensions:["value"],encodeDefaulter:It(Zb,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),i=SQ(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Y2(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Cs(e,"labelLine",["show"]);var n=e.labelLine,i=e.emphasis.labelLine;n.show=n.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(_e),CQ=wQ;function TQ(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qt(o)&&!isNaN(o)&&o<0)})}}}function MQ(r){r.registerChartView(bQ),r.registerSeriesModel(CQ),RI("pie",r.registerAction),r.registerLayout(It(vQ,"pie")),r.registerProcessor(_h("pie")),r.registerProcessor(TQ("pie"))}var DQ=function(r){q(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,n){return Qi(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e==null?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e==null?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,n,i){return i.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(_e),AQ=DQ,RR=4,PQ=function(){function r(){}return r}(),LQ=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new PQ},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]<RR,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var h=i[f++],d=i[f++];isNaN(h)||isNaN(d)||c&&!c.contain(h,d)||(s.x=h-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,n=e.points,i=e.size,a=this._ctx,o=this.softClipShape,s;if(!!a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(e>=f&&n>=h&&e<=f+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(e=i[0],n=i[1],a.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h<i.length;){var d=i[h++],v=i[h++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(v,u),f=Math.max(v,f)}e=this._rect=new kt(l-o/2,u-s/2,c-l+o,f-u+s)}return e},t}(Ft),IQ=function(){function r(){this.group=new Dt}return r.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;e=new Float32Array(e.buffer,a,i)}n.setShape("points",e),n.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],a=e.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,e,n)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new LQ({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=$e(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<RR;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=Lt(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(u.dataIndex=f+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),OQ=IQ,EQ=function(r){q(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,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,n,i){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,i){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=yh("").reset(e,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){var n=e.coordinateSystem,i=n&&n.getArea&&n.getArea();return e.get("clip",!0)?i:null},t.prototype._updateSymbolDraw=function(e,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new OQ:new mh,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(he),RQ=EQ,kQ=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Wt),NQ=kQ,Lx=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ye).models[0]},t.type="cartesian2dAxis",t}(Wt);ze(Lx,Gu);var kR={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},BQ=Ot({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},kR),Ix=Ot({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},kR),zQ=Ot({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ix),FQ=bt({logBase:10},Ix),NR={category:BQ,value:Ix,time:zQ,log:FQ},VQ={value:1,category:1,time:1,log:1};function Xu(r,t,e,n){L(VQ,function(i,a){var o=Ot(Ot({},NR[a],!0),n,!0),s=function(l){q(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=Hf(this),d=h?Au(c):{},v=f.getTheme();Ot(c,v.get(a+"Axis")),Ot(c,this.getDefaultOption()),c.type=BR(c),h&&So(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=X1.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.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",BR)}function BR(r){return r.type||(r.data?"category":"value")}var HQ=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 J(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),ae(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}(),$Q=HQ,Ox=["x","y"];function zR(r){return r.type==="interval"||r.type==="time"}var WQ=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Ox,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!zR(e)||!zR(n))){var i=e.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[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]-i[0]*c,d=o[1]-a[0]*f,v=this._transform=[c,0,0,f,h,d];this._invTransform=ps([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.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,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new kt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return sr(i,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(e[0]),u=a.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var i=[];if(this._invTransform)return sr(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1]),a=Math.min(n[0],n[1]),o=Math.max(e[0],e[1])-i,s=Math.max(n[0],n[1])-a;return new kt(i,a,o,s)},t}($Q),GQ=function(r){q(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||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 n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Un),UQ=GQ;function Ex(r,t,e){e=e||{};var n=r.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,v=u==="x"?[f[2]-d,f[3]+d]:[f[0]-d,f[1]+d];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));v[h.onZero]=Math.max(Math.min(p,v[1]),v[0])}a.position=[u==="y"?v[h[l]]:f[0],u==="x"?v[h[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?v[h[s]]-v[h.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Je(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function FR(r){return r.get("coordinateSystem")==="cartesian2d"}function VR(r){var t={xAxisModel:null,yAxisModel:null};return L(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,Ye).models[0];t[n]=a}),t}var Rx=Math.log;function HR(r,t,e){var n=Po.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,!0),o=i.length-1,s=n.getInterval.call(e),l=eE(r,t),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=Rx(r.base);u=[Rx(u[0])/h,Rx(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var v=n.getInterval.call(r),p=u[0],g=u[1];if(c&&f)v=(g-p)/o;else if(c)for(g=u[0]+v*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)v=K1(v),g=u[0]+v*o;else if(f)for(p=u[1]-v*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)v=K1(v),p=u[1]-v*o;else{var m=r.getTicks().length-1;m>o&&(v=K1(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=Ee(g-y),p<0&&u[0]>=0?(p=0,g=Ee(y)):g>0&&u[1]<=0&&(g=0,p=-Ee(y))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(r,p+v*_,g+v*b),n.setInterval.call(r,v),(_||b)&&n.setNiceExtent.call(r,p+v,g-v)}var YQ=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Ox,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Ht(o),u=l.length;if(!!u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],v=d.model,p=d.scale;Z1(p)&&v.get("alignTicks")&&v.get("interval")==null?c.push(d):(el(p,v),Z1(p)&&(s=d))}c.length&&(s||(s=c.pop(),el(s.scale,s.model)),L(c,function(g){HR(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};L(n.x,function(o){$R(n,"y",o,a)}),L(n.y,function(o){$R(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=qe(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(L(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=YX(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),L(this._coordsList,function(u){u.calcAffineTransform()});function l(){L(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),qQ(u,c?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}xt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===e)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,n=t.xAxisModel||e&&e.getReferringComponents("xAxis",Ye).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",Ye).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,Bt(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.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,n){var i=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,L(s.x,function(c,f){L(s.y,function(h,d){var v="x"+f+"y"+d,p=new WQ(v);p.master=i,p.model=t,i._coordsMap[v]=p,i._coordsList.push(p),p.addAxis(c),p.addAxis(h)})});function u(c){return function(f,h){if(!!kx(f,t)){var d=f.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var v=new UQ(c,lh(f),[0,0],f.get("type"),d),p=v.type==="category";v.onBand=p&&f.get("boundaryGap"),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._updateScale=function(t,e){L(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(FR(i)){var a=VR(i),o=a.xAxisModel,s=a.yAxisModel;if(!kx(o,e)||!kx(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){L(bg(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],n=[];return L(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);Bt(e,a)<0&&e.push(a),Bt(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}},r.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,a){var o=new r(i,t,e);o.name="grid_"+a,o.resize(i,e,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){if(!!FR(i)){var a=VR(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=Ox,r}();function kx(r,t){return r.getCoordSysModel()===t}function $R(r,t,e,n){e.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)WR(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&WR(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function WR(r){return r&&r.type!=="category"&&r.type!=="time"&&UX(r)}function qQ(r,t){var e=r.getExtent(),n=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+t}:function(i){return n-i+t},r.toLocalCoord=r.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}var jQ=YQ,Eo=Math.PI,cl=function(){function r(t,e){this.group=new Dt,this.opt=e,this.axisModel=t,bt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Dt({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(t){return!!GR[t]},r.prototype.add=function(t){GR[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,n){var i=H_(e-t),a,o;return df(i)?(o=n>0?"top":"bottom",a="center"):df(i-Eo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Eo?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,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}(),GR={axisLine:function(r,t,e,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(sr(s,s,o),sr(l,l,o));var c=K({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new er({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});xu(f.shape,f.style.lineWidth),f.anid="line",e.add(f);var h=t.get(["axisLine","symbol"]);if(h!=null){var d=t.get(["axisLine","symbolSize"]);ct(h)&&(h=[h,h]),(ct(d)||qt(d))&&(d=[d,d]);var v=zu(t.get(["axisLine","symbolOffset"])||0,d),p=d[0],g=d[1];L([{rotate:r.rotation+Math.PI/2,offset:v[0],r:0},{rotate:r.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var _=$e(h[y],-p/2,-g/2,p,g,c.stroke,!0),b=m.r+m.offset,S=u?l:s;_.attr({rotation:m.rotate,x:S[0]+b*Math.cos(r.rotation),y:S[1]-b*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var i=KQ(e,n,t,r),a=JQ(e,n,t,r);if(ZQ(t,a,i),QQ(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=SE(J(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));TE(o)}},axisName:function(r,t,e,n){var i=Je(r.axisName,t.get("name"));if(!!i){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,YR(a)?r.labelOffset+o*l:0],h,d=t.get("nameRotate");d!=null&&(d=d*Eo/180);var v;YR(a)?h=cl.innerTextLayout(r.rotation,d!=null?d:r.rotation,o):(h=XQ(r.rotation,a,d||0,u),v=r.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(h.rotation)),!isFinite(v)&&(v=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=Je(r.nameTruncateMaxWidth,g.maxWidth,v),_=new Ut({x:f[0],y:f[1],rotation:h.rotation,silent:cl.isLabelSilent(t),style:me(s,{text:i,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(wu({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var b=cl.makeAxisEventDataBase(t);b.targetType="axisName",b.name=i,Lt(_).eventData=b}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function XQ(r,t,e,n){var i=H_(e-r),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return df(i-Eo/2)?(o=l?"bottom":"top",a="center"):df(i-Eo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Eo*1.5&&i>Eo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function ZQ(r,t,e){if(!rE(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],c=e[1],f=e[e.length-1],h=e[e.length-2];n===!1?(Yn(a),Yn(u)):UR(a,o)&&(n?(Yn(o),Yn(c)):(Yn(a),Yn(u))),i===!1?(Yn(s),Yn(f)):UR(l,s)&&(i?(Yn(l),Yn(h)):(Yn(s),Yn(f)))}}function Yn(r){r&&(r.ignore=!0)}function UR(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var i=jc([]);return ao(i,i,-r.rotation),e.applyTransform(Vi([],i,r.getLocalTransform())),n.applyTransform(Vi([],i,t.getLocalTransform())),e.intersect(n)}}function YR(r){return r==="middle"||r==="center"}function qR(r,t,e,n,i){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&&(sr(o,o,t),sr(s,s,t));var c=new er({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});xu(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,a.push(c)}return a}function KQ(r,t,e,n){var i=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),u=i.getTicksCoords(),c=qR(u,t.transform,l,bt(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)r.add(c[f]);return c}}function QQ(r,t,e,n){var i=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(!!o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=bt(s.getLineStyle(),bt(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var f=qR(o[c],t.transform,l,u,"minorticks_"+c),h=0;h<f.length;h++)r.add(f[h])}}function JQ(r,t,e,n){var i=e.axis,a=Je(n.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(Je(n.labelRotate,o.get("rotate"))||0)*Eo/180,c=cl.innerTextLayout(n.rotation,u,n.labelDirection),f=e.getCategories&&e.getCategories(!0),h=[],d=cl.isLabelSilent(e),v=e.get("triggerEvent");return L(l,function(p,g){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,y=p.formattedLabel,_=p.rawLabel,b=o;if(f&&f[m]){var S=f[m];xt(S)&&S.textStyle&&(b=new fe(S.textStyle,o,e.ecModel))}var x=b.getTextColor()||e.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(m),C=new Ut({x:w,y:n.labelOffset+n.labelDirection*s,rotation:c.rotation,silent:d,z2:10+(p.level||0),style:me(b,{text:y,align:b.getShallow("align",!0)||c.textAlign,verticalAlign:b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||c.textVerticalAlign,fill:_t(x)?x(i.type==="category"?_:i.type==="value"?m+"":m,g):x})});if(C.anid="label_"+m,v){var T=cl.makeAxisEventDataBase(e);T.targetType="axisLabel",T.value=_,T.tickIndex=g,i.type==="category"&&(T.dataIndex=m),Lt(C).eventData=T}t.add(C),C.updateTransform(),h.push(C),r.add(C),C.decomposeTransform()}),h}}var Ra=cl;function tJ(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eJ(e,r,t),e.seriesInvolved&&nJ(e,r),e}function eJ(r,t,e){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];L(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=xh(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(L(s.getAxes(),It(p,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&L(v.baseAxes,It(p,d?"cross":!0,h)),d&&L(v.otherAxes,It(p,"cross",!1))}function p(g,m,y){var _=y.model.getModel("axisPointer",i),b=_.get("show");if(!(!b||b==="auto"&&!g&&!zx(_))){m==null&&(m=_.get("triggerTooltip")),_=g?rJ(y,f,i,t,g,m):_;var S=_.get("snap"),x=xh(y.model),w=m||S||y.type==="category",C=r.axesInfo[x]={key:x,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,involveSeries:w,snap:S,useHandle:zx(_),seriesModels:[],linkGroup:null};u[x]=C,r.seriesInvolved=r.seriesInvolved||w;var T=iJ(a,y);if(T!=null){var D=o[T]||(o[T]={axesInfo:{}});D.axesInfo[x]=C,D.mapper=a[T].mapper,C.linkGroup=D}}}})}function rJ(r,t,e,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};L(s,function(h){l[h]=Tt(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),i==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&bt(u,f.textStyle)}}return r.model.getModel("axisPointer",new fe(l,e,n))}function nJ(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||L(r.coordSysAxesInfo[xh(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function iJ(r,t){for(var e=t.model,n=t.dim,i=0;i<r.length;i++){var a=r[i]||{};if(Nx(a[n+"AxisId"],e.id)||Nx(a[n+"AxisIndex"],e.componentIndex)||Nx(a[n+"AxisName"],e.name))return i}}function Nx(r,t){return r==="all"||Q(r)&&Bt(r,t)>=0||r===t}function aJ(r){var t=Bx(r);if(!!t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=zx(e);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function Bx(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[xh(r)]}function oJ(r){var t=Bx(r);return t&&t.axisPointerModel}function zx(r){return!!r.get(["handle","show"])}function xh(r){return r.type+"||"+r.id}var jR={},sJ=function(r){q(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,n,i,a){this.axisPointerClass&&aJ(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},t.prototype.updateAxisPointer=function(e,n,i,a){this._doUpdateAxisPointerClass(e,i,!1)},t.prototype.remove=function(e,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(e,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(!!a){var o=oJ(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,n){jR[e]=n},t.getAxisPointerClass=function(e){return e&&jR[e]},t.type="axis",t}(Me),fl=sJ,Fx=jt();function XR(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0});if(!!u.length){var c=s.length,f=Fx(r).splitAreaColors,h=yt(),d=0;if(f)for(var v=0;v<u.length;v++){var p=f.get(u[v].tickValue);if(p!=null){d=(p+(c-1)*v)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=Q(s)?s:[s];for(var v=1;v<u.length;v++){var y=i.toGlobalCoord(u[v].coord),_=void 0,b=void 0,S=void 0,x=void 0;i.isHorizontal()?(_=g,b=l.y,S=y-_,x=l.height,g=_+S):(_=l.x,b=g,S=l.width,x=y-b,g=b+x);var w=u[v-1].tickValue;w!=null&&h.set(w,d),t.add(new Gt({anid:w!=null?"area_"+w:null,shape:{x:_,y:b,width:S,height:x},style:bt({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}Fx(r).splitAreaColors=h}}}function ZR(r){Fx(r).splitAreaColors=null}var lJ=["axisLine","axisTickLabel","axisName"],uJ=["splitArea","splitLine","minorSplitLine"],KR=function(r){q(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,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Dt,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=Ex(s,e),u=new Ra(e,K({handleAutoShown:function(f){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Z1(h[d].getOtherAxis(e.axis).scale))return!0;return!1}},l));L(lJ,u.add,u),this._axisGroup.add(u.getGroup()),L(uJ,function(f){e.get([f,"show"])&&cJ[f](this,this._axisGroup,e,s)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||Ef(o,this._axisGroup,e),r.prototype.render.call(this,e,n,i,a)}},t.prototype.remove=function(){ZR(this)},t.type="cartesianAxis",t}(fl),cJ={splitLine:function(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=Q(s)?s:[s];for(var l=n.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,f=i.getTicksCoords({tickModel:a}),h=[],d=[],v=o.getLineStyle(),p=0;p<f.length;p++){var g=i.toGlobalCoord(f[p].coord);u?(h[0]=g,h[1]=l.y,d[0]=g,d[1]=l.y+l.height):(h[0]=l.x,h[1]=g,d[0]=l.x+l.width,d[1]=g);var m=c++%s.length,y=f[p].tickValue,_=new er({anid:y!=null?"line_"+f[p].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:bt({stroke:s[m]},v),silent:!0});xu(_.shape,v.lineWidth),t.add(_)}}},minorSplitLine:function(r,t,e,n){var i=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(!!u.length)for(var c=[],f=[],h=o.getLineStyle(),d=0;d<u.length;d++)for(var v=0;v<u[d].length;v++){var p=i.toGlobalCoord(u[d][v].coord);l?(c[0]=p,c[1]=s.y,f[0]=p,f[1]=s.y+s.height):(c[0]=s.x,c[1]=p,f[0]=s.x+s.width,f[1]=p);var g=new er({anid:"minor_line_"+u[d][v].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]},style:h,silent:!0});xu(g.shape,h.lineWidth),t.add(g)}},splitArea:function(r,t,e,n){XR(r,t,e,n)}},QR=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(KR),fJ=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=QR.type,e}return t.type="yAxis",t}(KR),hJ=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,n){this.group.removeAll(),e.get("show")&&this.group.add(new Gt({shape:e.coordinateSystem.getRect(),style:bt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Me),JR={offset:0};function tk(r){r.registerComponentView(hJ),r.registerComponentModel(NQ),r.registerCoordinateSystem("cartesian2d",jQ),Xu(r,"x",Lx,JR),Xu(r,"y",Lx,JR),r.registerComponentView(QR),r.registerComponentView(fJ),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function dJ(r){zt(tk),r.registerSeriesModel(AQ),r.registerChartView(RQ),r.registerLayout(yh("scatter"))}function vJ(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(!!i){var a=i.getIndicatorAxes();L(a,function(o,s){e.each(e.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=ek(c)?c:rk(i)})}),e.each(function(o){var s=kD(n[o],function(l){return ek(l)})||rk(i);n[o].push(s.slice()),e.setItemLayout(o,n[o])})}})}function ek(r){return!isNaN(r[0])&&!isNaN(r[1])}function rk(r){return[r.cx,r.cy]}function pJ(r){var t=r.polar;if(t){Q(t)||(t=[t]);var e=[];L(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],Q(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):e.push(n)}),r.polar=e}L(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var gJ=function(r){q(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,n,i){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=this._data;function u(h,d){var v=h.getItemVisual(d,"symbol")||"circle";if(v!=="none"){var p=Qf(h.getItemVisual(d,"symbolSize")),g=$e(v,-1,-1,2,2),m=h.getItemVisual(d,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:m*Math.PI/180||0}),g}}function c(h,d,v,p,g,m){v.removeAll();for(var y=0;y<d.length-1;y++){var _=u(p,g);_&&(_.__dimIdx=y,h[y]?(_.setPosition(h[y]),kf[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},e,g)):_.setPosition(d[y]),v.add(_))}}function f(h){return J(h,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(h){var d=s.getItemLayout(h);if(!!d){var v=new Ur,p=new Yr,g={shape:{points:d}};v.shape.points=f(d),p.shape.points=f(d),Te(v,g,e,h),Te(p,g,e,h);var m=new Dt,y=new Dt;m.add(p),m.add(v),m.add(y),c(p.shape.points,d,y,s,h,!0),s.setItemGraphicEl(h,m)}}).update(function(h,d){var v=l.getItemGraphicEl(d),p=v.childAt(0),g=v.childAt(1),m=v.childAt(2),y={shape:{points:s.getItemLayout(h)}};!y.shape.points||(c(p.shape.points,y.shape.points,m,s,h,!1),bi(g),bi(p),Xt(p,y,e),Xt(g,y,e),s.setItemGraphicEl(h,v))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,d){var v=s.getItemModel(d),p=h.childAt(0),g=h.childAt(1),m=h.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(h),p.useStyle(bt(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),yr(p,v,"lineStyle"),yr(g,v,"areaStyle");var b=v.getModel("areaStyle"),S=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=S,L(["emphasis","select","blur"],function(C){var T=v.getModel([C,"areaStyle"]),D=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(C).ignore=D&&S}),g.useStyle(bt(b.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var x=v.getModel("emphasis"),w=x.getModel("itemStyle").getItemStyle();m.eachChild(function(C){if(C instanceof ur){var T=C.style;C.useStyle(K({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},y))}else C.useStyle(y),C.setColor(_),C.style.strokeNoScale=!0;var D=C.ensureState("emphasis");D.style=Tt(w);var A=s.getStore().get(s.getDimensionIndex(C.__dimIdx),d);(A==null||isNaN(A))&&(A=""),_r(C,rr(v),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:C.__dimIdx,defaultText:A,inheritColor:_,defaultOpacity:y.opacity})}),Re(h,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(he),mJ=gJ,yJ=function(r){q(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.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bh(dt(this.getData,this),dt(this.getRawData,this))},t.prototype.getInitialData=function(e,n){return ju(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(e),u=l===""?this.name:l,c=cI(this,e);return nr("section",{header:u,sortBlocks:!0,blocks:J(s,function(f){var h=a.get(a.mapDimension(f.dim),e);return nr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(J(i.dimensions,function(u){return n.mapDimension(u)}),e),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(_e),_J=yJ,Sh=NR.value;function kg(r,t){return bt({show:t},r)}var bJ=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),d=J(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var p=l;v.color!=null&&(p=bt({color:v.color},l));var g=Ot(Tt(v),{boundaryGap:e,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:h},!1);if(ct(c)){var m=g.name;g.name=c.replace("{value}",m!=null?m:"")}else _t(c)&&(g.name=c(g.name,g));var y=new fe(g,null,this.ecModel);return ze(y,Gu.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ot({lineStyle:{color:"#bbb"}},Sh.axisLine),axisLabel:kg(Sh.axisLabel,!1),axisTick:kg(Sh.axisTick,!1),splitLine:kg(Sh.splitLine,!0),splitArea:kg(Sh.splitArea,!0),indicator:[]},t}(Wt),xJ=bJ,SJ=["axisLine","axisTickLabel","axisName"],wJ=function(r){q(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,n,i){var a=this.group;a.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var n=e.coordinateSystem,i=n.getIndicatorAxes(),a=J(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Ra(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});L(a,function(o){L(SJ,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var n=e.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),v=Q(h)?h:[h],p=Q(d)?d:[d],g=[],m=[];function y(E,R,z){var B=z%R.length;return E[B]=E[B]||[],B}if(a==="circle")for(var _=i[0].getTicksCoords(),b=n.cx,S=n.cy,x=0;x<_.length;x++){if(c){var w=y(g,v,x);g[w].push(new yi({shape:{cx:b,cy:S,r:_[x].coord}}))}if(f&&x<_.length-1){var w=y(m,p,x);m[w].push(new Pf({shape:{cx:b,cy:S,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var C,T=J(i,function(E,R){var z=E.getTicksCoords();return C=C==null?z.length-1:Math.min(z.length-1,C),J(z,function(B){return n.coordToPoint(B.coord,R)})}),D=[],x=0;x<=C;x++){for(var A=[],P=0;P<i.length;P++)A.push(T[P][x]);if(A[0]&&A.push(A[0].slice()),c){var w=y(g,v,x);g[w].push(new Yr({shape:{points:A}}))}if(f&&D){var w=y(m,p,x-1);m[w].push(new Ur({shape:{points:A.concat(D)}}))}D=A.slice().reverse()}var I=l.getLineStyle(),O=u.getAreaStyle();L(m,function(E,R){this.group.add(Sn(E,{style:bt({stroke:"none",fill:p[R%p.length]},O),silent:!0}))},this),L(g,function(E,R){this.group.add(Sn(E,{style:bt({fill:"none",stroke:v[R%v.length]},I),silent:!0}))},this)},t.type="radar",t}(Me),CJ=wJ,TJ=function(r){q(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(Un),MJ=TJ,DJ=function(){function r(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=J(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new MJ(o,new Po);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},r.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},r.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var a=Math.atan2(-n,e),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),a=e.getHeight(),o=Math.min(i,a)/2;this.cx=at(n[0],i),this.cy=at(n[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var s=t.get("radius");(ct(s)||qt(s))&&(s=[0,s]),this.r0=at(s[0],o),this.r=at(s[1],o),L(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;L(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();L(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Po;o.setExtent(0,a),o.setInterval(1),L(n,function(s,l){HR(s.scale,s.model,o)})},r.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.create=function(t,e){var n=[];return t.eachComponent("radar",function(i){var a=new r(i,t,e);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},r.dimensions=[],r}(),AJ=DJ;function PJ(r){r.registerCoordinateSystem("radar",AJ),r.registerComponentModel(xJ),r.registerComponentView(CJ),r.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(n){e.setItemVisual(n,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function LJ(r){zt(PJ),r.registerChartView(mJ),r.registerSeriesModel(_J),r.registerLayout(vJ),r.registerProcessor(_h("radar")),r.registerPreprocessor(pJ)}var nk="\0_ec_interaction_mutex";function IJ(r,t,e){var n=Vx(r);n[t]=e}function OJ(r,t,e){var n=Vx(r),i=n[t];i===e&&(n[t]=null)}function ik(r,t){return!!Vx(r)[t]}function Vx(r){return r[nk]||(r[nk]={})}Ci({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Fe);var EJ=function(r){q(t,r);function t(e){var n=r.call(this)||this;n._zr=e;var i=dt(n._mousedownHandler,n),a=dt(n._mousemoveHandler,n),o=dt(n._mouseupHandler,n),s=dt(n._mousewheelHandler,n),l=dt(n._pinchHandler,n);return n.enable=function(u,c){this.disable(),this._opt=bt(Tt(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",i),e.on("mousemove",a),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!qD(e)){for(var n=e.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!Ng("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||ik(this._zr,"globalPan"))){var n=e.offsetX,i=e.offsetY,a=this._x,o=this._y,s=n-a,l=i-o;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&Sa(e.event),ak(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:a,oldY:o,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){qD(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var n=Ng("zoomOnMouseWheel",e,this._opt),i=Ng("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;Hx(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);Hx(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!ik(this._zr,"globalPan")){var n=e.pinchScale>1?1.1:1/1.1;Hx(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(En);function Hx(r,t,e,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(Sa(n.event),ak(r,t,e,n,i))}function ak(r,t,e,n,i){i.isAvailableBehavior=dt(Ng,null,e,n),r.trigger(t,i)}function Ng(r,t,e){var n=e[r];return!r||n&&(!ct(n)||t.event[n+"Key"])}var wh=EJ;function $x(r,t,e){var n=r.target;n.x+=t,n.y+=e,n.dirty()}function Wx(r,t,e,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(e-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var RJ={axisPointer:1,tooltip:1,brush:1};function Bg(r,t,e){var n=t.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==e&&!RJ.hasOwnProperty(n.mainType)&&i&&i.model!==e}function ok(r){if(ct(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var Gx,zg={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},sk=Ht(zg),Fg={"alignment-baseline":"textBaseline","stop-color":"stopColor"},lk=Ht(Fg),kJ=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var n=ok(t);this._defsUsePending=[];var i=new Dt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||e.width),l=parseFloat(n.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Cn(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;zJ(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=Vg(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=gk(c,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var d=i;i=new Dt,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!e.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Gt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},r.prototype._parseNode=function(t,e,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!a){var c=Gx[s];if(c&&pt(Gx,s)){l=c.call(this,t,e);var f=t.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});e.add(l)}}var d=uk[s];if(d&&pt(uk,s)){var v=d.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=v)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var n=new bf({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),NJ(n,e);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,e.add(n),n},r.internalField=function(){Gx={g:function(t,e){var n=new Dt;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Gt;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new yi;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new er;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new pp;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n=t.getAttribute("points"),i;n&&(i=hk(n));var a=new Ur({shape:{points:i||[]},silent:!0});return qn(e,a),Cn(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,e){var n=t.getAttribute("points"),i;n&&(i=hk(n));var a=new Yr({shape:{points:i||[]},silent:!0});return qn(e,a),Cn(t,a,this._defsUsePending,!1,!1),a},image:function(t,e){var n=new ur;return qn(e,n),Cn(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new Dt;return qn(e,s),Cn(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new Dt;return qn(e,s),Cn(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,e){var n=t.getAttribute("d")||"",i=hP(n);return qn(e,i),Cn(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),uk={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),a=new yu(t,e,n,i);return ck(r,a),fk(r,a),a},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),i=new Mb(t,e,n);return ck(r,i),fk(r,i),i}};function ck(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function fk(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var n=e.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};pk(e,a,a);var o=a.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:o})}e=e.nextSibling}}function qn(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),bt(t.__inheritedStyle,r.__inheritedStyle))}function hk(r){for(var t=Vg(r),e=[],n=0;n<t.length;n+=2){var i=parseFloat(t[n]),a=parseFloat(t[n+1]);e.push([i,a])}return e}function Cn(r,t,e,n,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};r.nodeType===1&&(HJ(r,t),pk(r,o,s),n||$J(r,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=dk(a,"fill",o.fill,e)),o.stroke!=null&&(a.style.stroke=dk(a,"stroke",o.stroke,e)),L(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),L(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=J(Vg(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function NJ(r,t){var e=t.__selfStyle;if(e){var n=e.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),r.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var BJ=/^url\(\s*#(.*?)\)/;function dk(r,t,e,n){var i=e&&e.match(BJ);if(i){var a=On(i[1]);n.push([r,t,a]);return}return e==="none"&&(e=null),e}function zJ(r,t){for(var e=0;e<t.length;e++){var n=t[e];n[0].style[n[1]]=r[n[2]]}}var FJ=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Vg(r){return r.match(FJ)||[]}var VJ=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Ux=Math.PI/180;function HJ(r,t){var e=r.getAttribute("transform");if(e){e=e.replace(/,/g," ");var n=[],i=null;e.replace(VJ,function(f,h,d){return n.push(h,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=Vg(o);switch(i=i||mn(),s){case"translate":hi(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Av(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ao(i,i,-parseFloat(l[0])*Ux);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Ux);Vi(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Ux);Vi(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var vk=/([^\s:;]+)\s*:\s*([^:;]+)/g;function pk(r,t,e){var n=r.getAttribute("style");if(!!n){vk.lastIndex=0;for(var i;(i=vk.exec(n))!=null;){var a=i[1],o=pt(zg,a)?zg[a]:null;o&&(t[o]=i[2]);var s=pt(Fg,a)?Fg[a]:null;s&&(e[s]=i[2])}}}function $J(r,t,e){for(var n=0;n<sk.length;n++){var i=sk[n],a=r.getAttribute(i);a!=null&&(t[zg[i]]=a)}for(var n=0;n<lk.length;n++){var i=lk[n],a=r.getAttribute(i);a!=null&&(e[Fg[i]]=a)}}function gk(r,t){var e=t.width/r.width,n=t.height/r.height,i=Math.min(e,n);return{scale:i,x:-(r.x+r.width/2)*i+(t.x+t.width/2),y:-(r.y+r.height/2)*i+(t.y+t.height/2)}}function WJ(r,t){var e=new kJ;return e.parse(r,t)}var GJ=yt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),UJ=function(){function r(t,e){this.type="geoSVG",this._usedGraphicMap=yt(),this._freedGraphics=[],this._mapName=t,this._parsedXML=ok(e)}return r.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=qJ(t.named),n=e.regions,i=e.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(t){var e,n;try{e=t&&WJ(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=e.root,Mr(n!=null)}catch(g){throw new Error(`Invalid svg format
|
|
209
|
+
`+g.message)}var i=new Dt;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=e.width,o=e.height,s=e.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,h=void 0;if(a!=null?(u=0,f=a):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,f=d.width),c==null&&(c=d.y,h=d.height)}l=this._boundingRect=new kt(u,c,f,h)}if(s){var v=gk(s,l);n.scaleX=n.scaleY=v.scale,n.x=v.x,n.y=v.y}i.setClipPath(new Gt({shape:l.plain()}));var p=[];return L(e.named,function(g){GJ.get(g.svgNodeTagLower)!=null&&(p.push(g),YJ(g.el))}),{root:i,boundingRect:l,named:p}},r.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n),n)},r.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},r}();function YJ(r){r.silent=!1,r.isGroup&&r.traverse(function(t){t.silent=!1})}function qJ(r){var t=[],e=yt();return L(r,function(n){if(n.namedFrom==null){var i=new iZ(n.name,n.el);t.push(i),e.set(n.name,i)}}),{regions:t,regionsMap:e}}for(var Yx=[126,25],mk="\u5357\u6D77\u8BF8\u5C9B",hl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],dl=0;dl<hl.length;dl++)for(var Zu=0;Zu<hl[dl].length;Zu++)hl[dl][Zu][0]/=10.5,hl[dl][Zu][1]/=-10.5/.75,hl[dl][Zu][0]+=Yx[0],hl[dl][Zu][1]+=Yx[1];function jJ(r,t){if(r==="china"){for(var e=0;e<t.length;e++)if(t[e].name===mk)return;t.push(new lE(mk,J(hl,function(n){return{type:"polygon",exterior:n}}),Yx))}}var XJ={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function ZJ(r,t){if(r==="china"){var e=XJ[t.name];if(e){var n=t.getCenter();n[0]+=e[0]/10.5,n[1]+=-e[1]/(10.5/.75),t.setCenter(n)}}}var KJ=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function QJ(r,t){r==="china"&&t.name==="\u53F0\u6E7E"&&t.geometries.push({type:"polygon",exterior:KJ[0]})}var JJ="name",ttt=function(){function r(t,e,n){this.type="geoJSON",this._parsedMap=yt(),this._mapName=t,this._specialAreas=n,this._geoJSON=rtt(e)}return r.prototype.load=function(t,e){e=e||JJ;var n=this._parsedMap.get(e);if(!n){var i=this._parseToRegions(e);n=this._parsedMap.set(e,{regions:i,boundingRect:ett(i)})}var a=yt(),o=[];return L(n.regions,function(s){var l=s.name;t&&pt(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new kt(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(t){var e=this._mapName,n=this._geoJSON,i;try{i=n?sx(n,t):[]}catch(a){throw new Error(`Invalid geoJson format
|
|
210
|
+
`+a.message)}return jJ(e,i),L(i,function(a){var o=a.name;ZJ(e,a),QJ(e,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function ett(r){for(var t,e=0;e<r.length;e++){var n=r[e].getBoundingRect();t=t||n.clone(),t.union(n)}return t}function rtt(r){return ct(r)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Ch=yt(),ka={registerMap:function(r,t,e){if(t.svg){var n=new UJ(r,t.svg);Ch.set(r,n)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?e=t.specialAreas:i=t;var n=new ttt(r,i,e);Ch.set(r,n)}},getGeoResource:function(r){return Ch.get(r)},getMapForUser:function(r){var t=Ch.get(r);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(r,t,e){var n=Ch.get(r);if(!!n)return n.load(t,e)}},qx=["rect","circle","line","ellipse","polygon","polyline","path"],ntt=yt(qx),itt=yt(qx.concat(["g"])),att=yt(qx.concat(["g"])),yk=jt();function Hg(r){var t=r.getItemStyle(),e=r.get("areaColor");return e!=null&&(t.fill=e),t}function _k(r){var t=r.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var ott=function(){function r(t){var e=new Dt;this.uid=Tu("ec_map_draw"),this._controller=new wh(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new Dt),e.add(this._svgGroup=new Dt)}return r.prototype.draw=function(t,e,n,i,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(m){!s&&m.getHostGeoModel()===t&&(s=m.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this.group,f=l.getTransformInfo(),h=f.raw,d=f.roam,v=!u.childAt(0)||a;v?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):Xt(c,d,t);var p=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,n),this._updateMapSelectHandler(t,u,n,i)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=yt(),n=yt(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var v=[],p=!u&&l&&l.project,g=0;g<d.length;++g){var m=c(d[g],p);m&&v.push(m)}return v}function h(d){return{shape:{points:f(d)}}}i.removeAll(),L(t.geo.regions,function(d){var v=d.name,p=e.get(v),g=n.get(v)||{},m=g.dataIdx,y=g.regionModel;p||(p=e.set(v,new Dt),i.add(p),m=s?s.indexOfName(v):null,y=t.isGeo?o.getRegionModel(v):s?s.getItemModel(m):null,n.set(v,{dataIdx:m,regionModel:y}));var _=[],b=[];L(d.geometries,function(w){if(w.type==="polygon"){var C=[w.exterior].concat(w.interiors||[]);u&&(C=Tk(C,u)),L(C,function(D){_.push(new Ur(h(D)))})}else{var T=w.points;u&&(T=Tk(T,u,!0)),L(T,function(D){b.push(new Yr(h(D)))})}});var S=c(d.getCenter(),l&&l.project);function x(w,C){if(!!w.length){var T=new yp({culling:!0,segmentIgnoreThreshold:1,shape:{paths:w}});p.add(T),bk(t,T,m,y),xk(t,T,v,y,o,m,S),C&&(_k(T),L(T.states,_k))}}x(_),x(b,!0)}),e.each(function(d,v){var p=n.get(v),g=p.dataIdx,m=p.regionModel;Sk(t,d,v,m,o,g),wk(t,d,v,m,o),Ck(t,d,v,m,o)},this)},r.prototype._buildSVG=function(t){var e=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var i=this._svgDispatcherMap=yt(),a=!1;L(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,d=l.getRegionModel(s);if(ntt.get(c)!=null&&f instanceof Bn&&bk(t,f,h,d),f instanceof Bn&&(f.culling=!0),f.z2EmphasisLift=0,!o.namedFrom&&(att.get(c)!=null&&xk(t,f,s,d,l,h,null),Sk(t,f,s,d,l,h),wk(t,f,s,d,l),itt.get(c)!=null)){var v=Ck(t,f,s,d,l);v==="self"&&(a=!0);var p=i.get(s)||i.set(s,[]);p.push(f)}},this),this._enableBlurEntireSVG(a,t)},r.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var n=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){Bs(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var n=e.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(t);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},r.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},r.prototype._useSVG=function(t){var e=ka.getGeoResource(t);if(e&&e.type==="geoSVG"){var n=e.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},r.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=ka.getGeoResource(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(t,e,n){var i=t.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=i.getZoom(),a.enable(t.get("roam")||!1);var s=t.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=t.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,$x(o,u.dx,u.dy),n.dispatchAction(K(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Wx(o,u.scale,u.originX,u.originY),n.dispatchAction(K(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,f){return i.containPoint([c,f])&&!Bg(u,n,t)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=yk(e).ignore)})},r.prototype._updateMapSelectHandler=function(t,e,n,i){var a=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){a._mouseDownFlag=!0}),e.on("click",function(o){!a._mouseDownFlag||(a._mouseDownFlag=!1)}))},r}();function bk(r,t,e,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Hg(i),u=Hg(a),c=Hg(s),f=Hg(o),h=r.data;if(h){var d=h.getItemVisual(e,"style"),v=h.getItemVisual(e,"decal");r.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),v&&(l.decal=Vu(v,r.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=f,Bs(t)}function xk(r,t,e,n,i,a,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var f=l?e:a,h=void 0;(!s||a>=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;_r(t,rr(n),{labelFetcher:h,labelDataIndex:f,defaultText:e},d);var v=t.getTextContent();if(v&&(yk(v).ignore=v.ignore,t.textConfig&&o)){var p=t.getBoundingRect().clone();t.textConfig.layoutRect=p,t.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Sk(r,t,e,n,i,a){r.data?r.data.setItemGraphicEl(a,t):Lt(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:e,region:n&&n.option||{}}}function wk(r,t,e,n,i){r.data||wu({el:t,componentModel:i,itemName:e,itemTooltipOption:n.get("tooltip")})}function Ck(r,t,e,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Re(t,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&j6(t,i,e),o}function Tk(r,t,e){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),L(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),n}var Mk=ott,stt=function(r){q(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,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===e.id){var s=this._mapDraw;s&&o.add(s.group)}else if(e.needsDrawMap){var s=this._mapDraw||new Mk(i);o.add(s.group),s.draw(e,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(e,n,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,n,i){var a=e.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new yi({style:{fill:e.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:vu+1)});if(!f){var d=e.mainSeries.getData(),v=a.getName(l),p=d.indexOfName(v),g=a.getItemModel(l),m=g.getModel("label"),y=d.getItemGraphicEl(p);_r(h,rr(g),{labelFetcher:{getFormattedLabel:function(_,b){return e.getFormattedLabel(p,b)}},defaultText:v}),h.disableLabelAnimation=!0,m.get("position")||h.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){hp(h,_)}}o.add(h)}}})},t.type="map",t}(he),ltt=stt,utt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},e}return t.prototype.getInitialData=function(e){for(var n=ju(this,{coordDimensions:["value"],encodeDefaulter:It(Zb,this)}),i=yt(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,!0)}var u=ka.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return L(u.regions,function(c){var f=c.name;i.get(f)||a.push(f)}),n.appendValues([],a),n},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return e!=null?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var n=this.getData();return n.get(n.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var n=this.getData();return n.getItemModel(n.indexOfName(e))},t.prototype.formatTooltip=function(e,n,i){for(var a=this.getData(),o=this.getRawValue(e),s=a.getName(e),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=a.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return nr("section",{header:u.join(", "),noHeader:!u.length,blocks:[nr("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var n=e.icon||"roundRect",i=$e(n,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return i.setStyle(e.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(_e),ctt=utt;function ftt(r,t){var e={};return L(r,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);e[o]=e[o]||[],isNaN(i)||e[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(n,i){for(var a="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=e[a].length,c=0;c<u;c++)s=Math.min(s,e[a][c]),l=Math.max(l,e[a][c]),o+=e[a][c];var f;return t==="min"?f=s:t==="max"?f=l:t==="average"?f=o/u:f=o,u===0?NaN:f})}function htt(r){var t={};r.eachSeriesByType("map",function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)}),L(t,function(e,n){for(var i=ftt(J(e,function(o){return o.getData()}),e[0].get("mapValueCalculation")),a=0;a<e.length;a++)e[a].originalData=e[a].getData();for(var a=0;a<e.length;a++)e[a].seriesGroup=e,e[a].needsDrawMap=a===0&&!e[a].getHostGeoModel(),e[a].setData(i.cloneShallow()),e[a].mainSeries=e[0]})}function dtt(r){var t={};r.eachSeriesByType("map",function(e){var n=e.getMapType();if(!(e.getHostGeoModel()||t[n])){var i={};L(e.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var d=i[f]||0,v=s.dataToPoint(h.getCenter());i[f]=d+1,l.setItemLayout(c,{point:v,offset:d})}})});var a=e.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),t[n]=!0}})}var Dk=sr,vtt=function(r){q(t,r);function t(e){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Ca,n._rawTransformable=new Ca,n.name=e,n}return t.prototype.setBoundingRect=function(e,n,i,a){return this._rect=new kt(e,n,i,a),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,n,i,a){this._transformTo(e,n,i,a),this._viewRect=new kt(e,n,i,a)},t.prototype._transformTo=function(e,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new kt(e,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e,n){!e||(this._center=[at(e[0],n.getWidth()),at(e[1],n.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var n=this.zoomLimit;n&&(n.max!=null&&(e=Math.min(n.max,e)),n.min!=null&&(e=Math.max(n.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),n=e.x+e.width/2,i=e.y+e.height/2;return[n,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=sr([],a,e),i=sr([],i,e),n.originX=a[0],n.originY=a[1],n.x=i[0]-a[0],n.y=i[1]-a[1],n.scaleX=n.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,n=this._rawTransformable;n.parent=e,e.updateTransform(),n.updateTransform(),Dv(this.transform||(this.transform=[]),n.transform||mn()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],ps(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,n=this._roamTransformable,i=new Ca;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?Dk(i,e,a):Dr(i,e)},t.prototype.pointToData=function(e){var n=this.invTransform;return n?Dk([],e,n):[e[0],e[1]]},t.prototype.convertToPixel=function(e,n,i){var a=Ak(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,n,i){var a=Ak(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(Ca);function Ak(r){var t=r.seriesModel;return t?t.coordinateSystem:null}var Th=vtt,ptt={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Pk=["lng","lat"],Lk=function(r){q(t,r);function t(e,n,i){var a=r.call(this,e)||this;a.dimensions=Pk,a.type="geo",a._nameCoordMap=yt(),a.map=n;var o=i.projection,s=ka.load(n,i.nameMap,i.nameProperty),l=ka.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=ptt[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var d=u[h].getBoundingRect(o);f=f||d.clone(),f.union(d)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:Et(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return t.prototype._transformTo=function(e,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new kt(e,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(e))return n[i]}},t.prototype.addGeoCoord=function(e,n){this._nameCoordMap.set(e,n)},t.prototype.getGeoCoord=function(e){var n=this._regionsMap.get(e);return this._nameCoordMap.get(e)||n&&n.getCenter()},t.prototype.dataToPoint=function(e,n,i){if(ct(e)&&(e=this.getGeoCoord(e)),e){var a=this.projection;return a&&(e=a.project(e)),e&&this.projectedToPoint(e,n,i)}},t.prototype.pointToData=function(e){var n=this.projection;return n&&(e=n.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(e){return r.prototype.pointToData.call(this,e)},t.prototype.projectedToPoint=function(e,n,i){return r.prototype.dataToPoint.call(this,e,n,i)},t.prototype.convertToPixel=function(e,n,i){var a=Ik(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,n,i){var a=Ik(n);return a===this?a.pointToData(i):null},t}(Th);ze(Lk,Th);function Ik(r){var t=r.geoModel,e=r.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",Ye).models[0]||{}).coordinateSystem:null}var Ok=Lk;function Ek(r,t){var e=r.get("boundingCoords");if(e!=null){var n=e[0],i=e[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(x,w,C,T){for(var D=C-x,A=T-w,P=0;P<=100;P++){var I=P/100,O=a.project([x+D*I,w+A*I]);ba(n,n,O),xa(i,i,O)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var f=this.getBoundingRect(),h=r.get("layoutCenter"),d=r.get("layoutSize"),v=t.getWidth(),p=t.getHeight(),g=f.width/f.height*this.aspectScale,m=!1,y,_;h&&d&&(y=[at(h[0],v),at(h[1],p)],_=at(d,Math.min(v,p)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)&&(m=!0));var b;if(m)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=y[1]-b.height/2,b.x=y[0]-b.width/2;else{var S=r.getBoxLayoutParams();S.aspect=g,b=qe(S,{width:v,height:p})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function gtt(r,t){L(t.get("geoCoord"),function(e,n){r.addGeoCoord(n,e)})}var mtt=function(){function r(){this.dimensions=Pk}return r.prototype.create=function(t,e){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Ok(l+s,l,K({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ek,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),L(a,function(o,s){var l=J(o,function(c){return c.get("nameMap")}),u=new Ok(s,s,K({nameMap:xv(l)},i(o[0])));u.zoomLimit=Je.apply(null,J(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=Ek,u.resize(o[0],e),L(o,function(c){c.coordinateSystem=u,gtt(u,c)})}),n},r.prototype.getFilledRegions=function(t,e,n,i){for(var a=(t||[]).slice(),o=yt(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=ka.load(e,n,i);return L(l.regions,function(u){var c=u.name;!o.get(c)&&a.push({name:c})}),a},r}(),ytt=new mtt,Rk=ytt,_tt=function(r){q(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,n,i){var a=ka.getGeoResource(e.map);if(a&&a.type==="geoJSON"){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,i),Cs(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,n=this.option;n.regions=Rk.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=In(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new fe(o,e,e.ecModel)),o.selected&&(i[s]=!0)),a},yt()),n.selectedMap||(n.selectedMap=i)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new fe(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,n){var i=this.getRegionModel(e),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:e};if(_t(a))return o.status=n,a(o);if(ct(a))return a.replace("{a}",e!=null?e:"")},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var n=this.option,i=n.selectedMode;if(!!i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[e]=!0}},t.prototype.unSelect=function(e){var n=this.option.selectedMap;n&&(n[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var n=this.option.selectedMap;return!!(n&&n[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(Wt),btt=_tt;function kk(r,t){return r.pointToProjected?r.pointToProjected(t):r.pointToData(t)}function jx(r,t,e,n){var i=r.getZoom(),a=r.getCenter(),o=t.zoom,s=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(t.dx!=null&&t.dy!=null&&(s[0]-=t.dx,s[1]-=t.dy,r.setCenter(kk(r,s),n)),o!=null){if(e){var l=e.min||0,u=e.max||1/0;o=Math.max(Math.min(i*o,u),l)/i}r.scaleX*=o,r.scaleY*=o;var c=(t.originX-r.x)*(o-1),f=(t.originY-r.y)*(o-1);r.x-=c,r.y-=f,r.updateTransform(),r.setCenter(kk(r,s),n),r.setZoom(o*i)}return{center:r.getCenter(),zoom:r.getZoom()}}var xtt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return t.prototype.init=function(e,n){this._api=n},t.prototype.render=function(e,n,i,a){if(this._model=e,!e.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Mk(i));var o=this._mapDraw;o.draw(e,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,n,i)},t.prototype._handleRegionClick=function(e){var n;Zs(e.target,function(i){return(n=Lt(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(e,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=Lt(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Me),Stt=xtt;function wtt(r,t,e){ka.registerMap(r,t,e)}function Nk(r){r.registerCoordinateSystem("geo",Rk),r.registerComponentModel(btt),r.registerComponentView(Stt),r.registerImpl("registerMap",wtt),r.registerImpl("getMap",function(e){return ka.getMapForUser(e)});function t(e,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[e](i.name);var u=l.coordinateSystem;L(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];L(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,n,i){var a=e.componentType||"series";n.eachComponent({mainType:a,query:e},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=jx(s,e,o.get("scaleLimit"),i);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&L(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Ctt(r){zt(Nk),r.registerChartView(ltt),r.registerSeriesModel(ctt),r.registerLayout(dtt),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,htt),RI("map",r.registerAction)}function Ttt(r){var t=r;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],n,i;n=e.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function Mtt(r,t){var e=r.isExpand?r.children:[],n=r.parentNode.children,i=r.hierNode.i?n[r.hierNode.i-1]:null;if(e.length){Ptt(r);var a=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+t(r,i),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else i&&(r.hierNode.prelim=i.hierNode.prelim+t(r,i));r.parentNode.hierNode.defaultAncestor=Ltt(r,i,r.parentNode.hierNode.defaultAncestor||n[0],t)}function Dtt(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Bk(r){return arguments.length?r:Ett}function Mh(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function Att(r,t){return qe(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Ptt(r){for(var t=r.children,e=t.length,n=0,i=0;--e>=0;){var a=t[e];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Ltt(r,t,e,n){if(t){for(var i=r,a=r,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Xx(s),a=Zx(a),s&&a;){i=Xx(i),o=Zx(o),i.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(Ott(Itt(s,r,e),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!Xx(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!Zx(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,e=r)}return e}function Xx(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function Zx(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function Itt(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function Ott(r,t,e){var n=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=n}function Ett(r,t){return r.parentNode===t.parentNode?1:2}var Rtt=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),ktt=function(r){q(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 Rtt},t.prototype.buildPath=function(e,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=at(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,e.moveTo(o[0],o[1]),e.lineTo(d[0],d[1]),e.moveTo(s[0],s[1]),d[c]=s[c],e.lineTo(d[0],d[1]),d[c]=l[c],e.lineTo(d[0],d[1]),e.lineTo(l[0],l[1]);for(var v=1;v<a-1;v++){var p=i[v];e.moveTo(p[0],p[1]),d[c]=p[c],e.lineTo(d[0],d[1])}},t}(Ft),Ntt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new Dt,e}return t.prototype.init=function(e,n){this._controller=new wh(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,n,i){var a=e.getData(),o=e.layoutInfo,s=this._mainGroup,l=e.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(e,i),this._updateController(e,n,i);var u=this._data;a.diff(u).add(function(c){zk(a,c)&&Fk(a,c,null,s,e)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!zk(a,c)){h&&$k(u,f,h,s,e);return}Fk(a,c,h,s,e)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&$k(u,c,f,s,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:f})})}),this._data=a},t.prototype._updateViewCoordSys=function(e,n){var i=e.getData(),a=[];i.each(function(f){var h=i.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&a.push([+h.x,+h.y])});var o=[],s=[];op(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=e.coordinateSystem=new Th;c.zoomLimit=e.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(e.get("center"),n),c.setZoom(e.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(e,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!Bg(u,i,e)}),o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){$x(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Wx(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(e),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var n=e.getData(),i=this._getNodeGlobalScale(e);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(e){var n=e.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(he);function zk(r,t){var e=r.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function Fk(r,t,e,n,i){var a=!e,o=r.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=r.getItemGraphicEl(f.dataIndex),d=f.getLayout(),v=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,p=o.getLayout();a?(e=new gh(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=v.x,e.y=v.y):e.updateData(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=p.rawX,e.__radialRawY=p.rawY,n.add(e),r.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,Xt(e,{x:p.x,y:p.y},i);var g=e.getSymbolPath();if(i.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,b=void 0,S=void 0;if(p.x===y.x&&o.isExpand===!0&&m.children.length){var x={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};b=Math.atan2(x.y-y.y,x.x-y.x),b<0&&(b=Math.PI*2+b),S=x.x<y.x,S&&(b=b-Math.PI)}else b=Math.atan2(p.y-y.y,p.x-y.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(S=p.x<y.x,S&&(b=b-Math.PI)):(S=p.x>y.x,S||(b=b-Math.PI));var w=S?"left":"right",C=s.getModel("label"),T=C.get("rotate"),D=T*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:C.get("position")||w,rotation:T==null?-b:D,origin:"center"}),A.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),I=P==="relative"?$c(o.getAncestorsIndices(),o.getDescendantIndices()):P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():null;I&&(Lt(e).focus=I),Btt(i,o,c,e,v,d,p,n),e.__edge&&(e.onHoverStateChange=function(O){if(O!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===xf||hp(e.__edge,O)}})}function Btt(r,t,e,n,i,a,o,s){var l=t.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),p=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=n.__edge=new Lf({shape:Kx(c,f,h,i,i)})),Xt(p,{shape:Kx(c,f,h,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}p||(p=n.__edge=new ktt({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:d}})),Xt(p,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}p&&!(u==="polyline"&&!t.isExpand)&&(p.useStyle(bt({strokeNoScale:!0,fill:null},v)),yr(p,l,"lineStyle"),Bs(p),s.add(p))}function Vk(r,t,e,n,i){var a=t.tree.root,o=Hk(a,r),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(r.dataIndex);if(!!u){var c=t.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),d=n.get("edgeShape"),v=n.get("layout"),p=n.get("orient"),g=n.get(["lineStyle","curveness"]);h&&(d==="curve"?yo(h,{shape:Kx(v,p,g,l,l),style:{opacity:0}},n,{cb:function(){e.remove(h)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&yo(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){e.remove(h)},removeOpt:i}))}}function Hk(r,t){for(var e=t.parentNode===r?t:t.parentNode||t,n;n=e.getLayout(),n==null;)e=e.parentNode===r?e:e.parentNode||e;return{source:e,sourceLayout:n}}function $k(r,t,e,n,i){var a=r.tree.getNodeByDataIndex(t),o=r.tree.root,s=Hk(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};yo(e,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(e),r.setItemGraphicEl(t,null)},removeOpt:l}),e.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){Vk(u,r,n,i,l)}),Vk(a,r,n,i,l)}function Kx(r,t,e,n,i){var a,o,s,l,u,c,f,h;if(r==="radial"){u=n.rawX,f=n.rawY,c=i.rawX,h=i.rawY;var d=Mh(u,f),v=Mh(u,f+(h-f)*e),p=Mh(c,h+(f-h)*e),g=Mh(c,h);return{x1:d.x||0,y1:d.y||0,x2:g.x||0,y2:g.y||0,cpx1:v.x||0,cpy1:v.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=n.x,f=n.y,c=i.x,h=i.y,(t==="LR"||t==="RL")&&(a=u+(c-u)*e,o=f,s=c+(u-c)*e,l=h),(t==="TB"||t==="BT")&&(a=u,o=f+(h-f)*e,s=c,l=h+(f-h)*e);return{x1:u,y1:f,x2:c,y2:h,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var ztt=Ntt,jn=jt();function Wk(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,Gk(t,e,r),L(e,function(n){L(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,It(Ftt,r))})}),t.wrapMethod("cloneShallow",It(Htt,r)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,It(Vtt,r))}),Mr(e[t.dataType]===t)}function Ftt(r,t){if(Gtt(this)){var e=K({},jn(this).datas);e[this.dataType]=t,Gk(t,e,r)}else Qx(t,this.dataType,jn(this).mainData,r);return t}function Vtt(r,t){return r.struct&&r.struct.update(),t}function Htt(r,t){return L(jn(t).datas,function(e,n){e!==t&&Qx(e.cloneShallow(),n,t,r)}),t}function $tt(r){var t=jn(this).mainData;return r==null||t==null?t:jn(t).datas[r]}function Wtt(){var r=jn(this).mainData;return r==null?[{data:r}]:J(Ht(jn(r).datas),function(t){return{type:t,data:jn(r).datas[t]}})}function Gtt(r){return jn(r).mainData===r}function Gk(r,t,e){jn(r).datas={},L(t,function(n,i){Qx(n,i,r,e)})}function Qx(r,t,e,n){jn(e).datas[t]=r,jn(r).mainData=e,r.dataType=t,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=r),r.getLinkedData=$tt,r.getLinkedDataAll=Wtt}var Utt=function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,n){_t(t)&&(n=e,e=t,t=null),t=t||{},ct(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=e.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,e,n);i==="postorder"&&e.call(n,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var a=n[e].getNodeById(t);if(a)return a}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var a=n[e].contains(t);if(a)return a}},r.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r}(),Ytt=function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,n){var i=new r(e),a=[],o=1;s(t);function s(c,f){var h=c.value;o=Math.max(o,Q(h)?h.length:1),a.push(c);var d=new Utt(Xe(c.name,""),i);f?qtt(d,f):i.root=d,i._nodes.push(d);var v=c.children;if(v)for(var p=0;p<v.length;p++)s(v[p],d)}i.root.updateDepthAndHeight(0);var l=$u(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Or(l,e);return u.initData(a),n&&n(u),Wk({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r}();function qtt(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}var Jx=Ytt;function Dh(r,t,e){if(r&&Bt(t,r.type)>=0){var n=e.getData().tree.root,i=r.targetNode;if(ct(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function Uk(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function tS(r,t){var e=Uk(r);return Bt(e,t)>=0}function $g(r,t){for(var e=[];r;){var n=r.dataIndex;e.push({name:r.name,dataIndex:n,value:t.getRawValue(n)}),r=r.parentNode}return e.reverse(),e}var jtt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var n={name:e.name,children:e.data},i=e.leaves||{},a=new fe(i,this,this.ecModel),o=Jx.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=e.expandAndCollapse,c=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return nr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=$g(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(_e),Xtt=jtt;function Ztt(r,t,e){for(var n=[r],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)t(a,e)}function Ah(r,t){for(var e=[r],n;n=e.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)e.push(i[a])}}function Ktt(r,t){r.eachSeriesByType("tree",function(e){Qtt(e,t)})}function Qtt(r,t){var e=Att(r,t);r.layoutInfo=e;var n=r.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(e.height,e.width)/2,o=Bk(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(i=e.width,a=e.height,o=Bk());var s=r.getData().tree.root,l=s.children[0];if(l){Ttt(s),Ztt(l,Mtt,o),s.hierNode.modifier=-l.hierNode.prelim,Ah(l,Dtt);var u=l,c=l,f=l;Ah(l,function(_){var b=_.getLayout().x;b<u.getLayout().x&&(u=_),b>c.getLayout().x&&(c=_),_.depth>f.depth&&(f=_)});var h=u===c?1:o(u,c)/2,d=h-u.getLayout().x,v=0,p=0,g=0,m=0;if(n==="radial")v=i/(c.getLayout().x+h+d),p=a/(f.depth-1||1),Ah(l,function(_){g=(_.getLayout().x+d)*v,m=(_.depth-1)*p;var b=Mh(g,m);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(p=a/(c.getLayout().x+h+d),v=i/(f.depth-1||1),Ah(l,function(_){m=(_.getLayout().x+d)*p,g=y==="LR"?(_.depth-1)*v:i-(_.depth-1)*v,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(v=i/(c.getLayout().x+h+d),p=a/(f.depth-1||1),Ah(l,function(_){g=(_.getLayout().x+d)*v,m=y==="TB"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)}))}}}function Jtt(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),n=e.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(i.dataIndex,"style");K(s,o)})})}function tet(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=jx(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function eet(r){r.registerChartView(ztt),r.registerSeriesModel(Xtt),r.registerLayout(Ktt),r.registerVisual(Jtt),tet(r)}var Yk=["treemapZoomToNode","treemapRender","treemapMove"];function ret(r){for(var t=0;t<Yk.length;t++)r.registerAction({type:Yk[t],update:"updateView"},Fe);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,n){n.eachComponent({mainType:"series",subType:"treemap",query:e},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Dh(e,s,a);if(l){var u=a.getViewRoot();u&&(e.direction=tS(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function qk(r){var t=r.getData(),e=t.tree,n={};e.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=t1(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var net=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,n){var i={name:e.name,children:e.data};jk(i);var a=e.levels||[],o=this.designatedVisualItemStyle={},s=new fe({itemStyle:o},this,n);a=e.levels=iet(a,n);var l=J(a||[],function(f){return new fe(f,s,n)},this),u=Jx.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var v=u.getNodeByDataIndex(d),p=v?l[v.depth]:null;return h.parentModel=p||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return nr("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=$g(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},K(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var n=this._idIndexMap;n||(n=this._idIndexMap=yt(),this._idIndexMapCount=0);var i=n.get(e);return i==null&&n.set(e,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){qk(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(_e);function jk(r){var t=0;L(r.children,function(n){jk(n);var i=n.value;Q(i)&&(i=i[0]),t+=i});var e=r.value;Q(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Q(r.value)?r.value[0]=e:r.value=e}function iet(r,t){var e=ce(t.get("color")),n=ce(t.get(["aria","decal","decals"]));if(!!e){r=r||[];var i,a;L(r,function(s){var l=new fe(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=e.slice()),!a&&n&&(o.decal=n.slice()),r}}var aet=net,oet=8,Xk=8,eS=5,set=function(){function r(t){this.group=new Dt,t.add(this.group)}return r.prototype.render=function(t,e,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(t,f,s,l,u,c,i),zp(o,f.pos,f.box)}},r.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var a=Xe(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+oet*2,e.emptyItemWidth);e.totalWidth+=s+Xk,e.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(t,e,n,i,a,o,s){for(var l=0,u=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),f=eY(e.pos,e.box),h=e.totalWidth,d=e.renderList,v=i.getModel("itemStyle").getItemStyle(),p=d.length-1;p>=0;p--){var g=d[p],m=g.node,y=g.width,_=g.text;h>f.width&&(h-=y-u,y=u,_=null);var b=new Ur({shape:{points:uet(l,0,y,c,p===d.length-1,p===0)},style:bt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ut({style:me(a,{text:_})}),textConfig:{position:"inside"},z2:vu*1e4,onclick:It(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=me(o,{text:_}),b.ensureState("emphasis").style=v,Re(b,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(b),cet(b,t,m),l+=y+Xk}},r.prototype.remove=function(){this.group.removeAll()},r}();function uet(r,t,e,n,i,a){var o=[[i?r:r-eS,t],[r+e,t],[r+e,t+n],[i?r:r-eS,t+n]];return!a&&o.splice(2,0,[r+e+eS,t+n/2]),!i&&o.push([r,t+n/2]),o}function cet(r,t,e){Lt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&$g(e,t)}}var fet=set,het=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:a}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function det(){return new het}var rS=Dt,Zk=Gt,Kk=3,Qk="label",Jk="upperLabel",vet=vu*10,pet=vu*2,get=vu*3,vl=Ds([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),tN=function(r){var t=vl(r);return t.stroke=t.fill=t.lineWidth=null,t},Wg=jt(),met=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Ph(),e}return t.prototype.render=function(e,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Bt(o,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Dh(a,s,e),u=a&&a.type,c=e.layoutInfo,f=!this._oldTree,h=this._storage,d=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,v=this._giveContainerGroup(c),p=e.get("animation"),g=this._doRender(v,e,d);p&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(v,g,e,d):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(e,i,l)}},t.prototype._giveContainerGroup=function(e){var n=this._containerGroup;return n||(n=this._containerGroup=new rS,this._initEvents(n),this.group.add(n)),n.x=e.x,n.y=e.y,n},t.prototype._doRender=function(e,n,i){var a=n.getData().tree,o=this._oldTree,s=Ph(),l=Ph(),u=this._storage,c=[];function f(g,m,y,_){return yet(n,l,u,i,s,c,g,m,y,_)}d(a.root?[a.root]:[],o&&o.root?[o.root]:[],e,a===o||!o,0);var h=v(u);return this._oldTree=a,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:p};function d(g,m,y,_,b){_?(m=g,L(g,function(w,C){!w.isRemoved()&&x(C,C)})):new Ia(m,g,S,S).add(x).update(x).remove(It(x,null)).execute();function S(w){return w.getId()}function x(w,C){var T=w!=null?g[w]:null,D=C!=null?m[C]:null,A=f(T,D,y,b);A&&d(T&&T.viewChildren||[],D&&D.viewChildren||[],A,_,b+1)}}function v(g){var m=Ph();return g&&L(g,function(y,_){var b=m[_];L(y,function(S){S&&(b.push(S),Wg(S).willDelete=!0)})}),m}function p(){L(h,function(g){L(g,function(m){m.parent&&m.parent.remove(m)})}),L(c,function(g){g.invisible=!0,g.dirty()})}},t.prototype._doAnimation=function(e,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(_t(o)?0:o)||0,u=(_t(s)?null:s)||"cubicOut",c=det();L(n.willDeleteEls,function(f,h){L(f,function(d,v){if(!d.invisible){var p=d.parent,g,m=Wg(p);if(a&&a.direction==="drillDown")g=p===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=h==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(d,g,l,0,u)}})}),L(this._storage,function(f,h){L(f,function(d,v){var p=n.lastsForAnimation[h][v],g={};!p||(d instanceof Dt?p.oldX!=null&&(g.x=d.x,g.y=d.y,d.x=p.oldX,d.y=p.oldY):(p.oldShape&&(g.shape=K({},d.shape),d.setShape(p.oldShape)),p.fadein?(d.setStyle("opacity",0),g.style={opacity:1}):d.style.opacity!==1&&(g.style={opacity:1})),c.add(d,g,l,0,u))})},this),this._state="animating",c.finished(dt(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(e){var n=this._controller;n||(n=this._controller=new wh(e.getZr()),n.enable(this.seriesModel.get("roam")),n.on("pan",dt(this._onPan,this)),n.on("zoom",dt(this._onZoom,this)));var i=new kt(0,0,e.getWidth(),e.getHeight());n.setPointerChecker(function(a,o,s){return i.contain(o,s)})},t.prototype._clearController=function(){var e=this._controller;e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>Kk||Math.abs(e.dy)>Kk)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var n=e.originX,i=e.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new kt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,i-=l.y;var u=mn();hi(u,u,[-n,-i]),Av(u,u,[e.scale,e.scale]),hi(u,u,[n,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var n=this;e.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(!!a){var o=n.findTarget(i.offsetX,i.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Np(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(e,n,i){var a=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new fet(this.group))).render(e,n,i.node,function(o){a._state!=="animating"&&(tS(e.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ph(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(he);function Ph(){return{nodeGroup:[],background:[],content:[]}}function yet(r,t,e,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,v=c.height,p=c.borderWidth,g=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,b=c.upperHeight,S=_&&_.length,x=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),C=h.getModel(["blur","itemStyle"]),T=h.getModel(["select","itemStyle"]),D=x.get("borderRadius")||0,A=G("nodeGroup",rS);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),Wg(A).nodeWidth=d,Wg(A).nodeHeight=v,c.isAboveViewRoot)return A;var P=G("background",Zk,u,pet);P&&Y(A,P,S&&c.upperLabelHeight);var I=h.getModel("emphasis"),O=I.get("focus"),E=I.get("blurScope"),R=I.get("disabled"),z=O==="ancestor"?o.getAncestorsIndices():O==="descendant"?o.getDescendantIndices():O;if(S)Tf(A)&&zs(A,!1),P&&(zs(P,!R),f.setItemGraphicEl(o.dataIndex,P),bb(P,z,E));else{var B=G("content",Zk,u,get);B&&W(A,B),P.disableMorphing=!0,P&&Tf(P)&&zs(P,!1),zs(A,!R),f.setItemGraphicEl(o.dataIndex,A),bb(A,z,E)}return A;function Y(nt,rt,vt){var ft=Lt(rt);if(ft.dataIndex=o.dataIndex,ft.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:d,height:v,r:D}),g)et(rt);else{rt.invisible=!1;var lt=o.getVisual("style"),mt=lt.stroke,At=tN(x);At.fill=mt;var Ct=vl(w);Ct.fill=w.get("borderColor");var F=vl(C);F.fill=C.get("borderColor");var X=vl(T);if(X.fill=T.get("borderColor"),vt){var Z=d-2*p;V(rt,mt,lt.opacity,{x:p,y:0,width:Z,height:b})}else rt.removeTextContent();rt.setStyle(At),rt.ensureState("emphasis").style=Ct,rt.ensureState("blur").style=F,rt.ensureState("select").style=X,Bs(rt)}nt.add(rt)}function W(nt,rt){var vt=Lt(rt);vt.dataIndex=o.dataIndex,vt.seriesIndex=r.seriesIndex;var ft=Math.max(d-2*p,0),lt=Math.max(v-2*p,0);if(rt.culling=!0,rt.setShape({x:p,y:p,width:ft,height:lt,r:D}),g)et(rt);else{rt.invisible=!1;var mt=o.getVisual("style"),At=mt.fill,Ct=tN(x);Ct.fill=At,Ct.decal=mt.decal;var F=vl(w),X=vl(C),Z=vl(T);V(rt,At,mt.opacity,null),rt.setStyle(Ct),rt.ensureState("emphasis").style=F,rt.ensureState("blur").style=X,rt.ensureState("select").style=Z,Bs(rt)}nt.add(rt)}function et(nt){!nt.invisible&&a.push(nt)}function V(nt,rt,vt,ft){var lt=h.getModel(ft?Jk:Qk),mt=Xe(h.get("name"),null),At=lt.getShallow("show");_r(nt,rr(h,ft?Jk:Qk),{defaultText:At?mt:null,inheritColor:rt,defaultOpacity:vt,labelFetcher:r,labelDataIndex:o.dataIndex});var Ct=nt.getTextContent();if(!!Ct){var F=Ct.style,X=Cv(F.padding||0);ft&&(nt.setTextConfig({layoutRect:ft}),Ct.disableLabelLayout=!0),Ct.beforeUpdate=function(){var ut=Math.max((ft?ft.width:nt.shape.width)-X[1]-X[3],0),ht=Math.max((ft?ft.height:nt.shape.height)-X[0]-X[2],0);(F.width!==ut||F.height!==ht)&&Ct.setStyle({width:ut,height:ht})},F.truncateMinChar=2,F.lineOverflow="truncate",H(F,ft,c);var Z=Ct.getState("emphasis");H(Z?Z.style:null,ft,c)}}function H(nt,rt,vt){var ft=nt?nt.text:null;if(!rt&&vt.isLeafRoot&&ft!=null){var lt=r.get("drillDownIcon",!0);nt.text=lt?lt+" "+ft:ft}}function G(nt,rt,vt,ft){var lt=y!=null&&e[nt][y],mt=i[nt];return lt?(e[nt][y]=null,j(mt,lt)):g||(lt=new rt,lt instanceof Bn&&(lt.z2=_et(vt,ft)),tt(mt,lt)),t[nt][m]=lt}function j(nt,rt){var vt=nt[m]={};rt instanceof rS?(vt.oldX=rt.x,vt.oldY=rt.y):vt.oldShape=K({},rt.shape)}function tt(nt,rt){var vt=nt[m]={},ft=o.parentNode,lt=rt instanceof Dt;if(ft&&(!n||n.direction==="drillDown")){var mt=0,At=0,Ct=i.background[ft.getRawIndex()];!n&&Ct&&Ct.oldShape&&(mt=Ct.oldShape.width,At=Ct.oldShape.height),lt?(vt.oldX=0,vt.oldY=At):vt.oldShape={x:mt,y:At,width:0,height:0}}vt.fadein=!lt}}function _et(r,t){return r*vet+t}var bet=met,Lh=L,xet=xt,Gg=-1,nS=function(){function r(t){var e=t.mappingMethod,n=t.type,i=this.option=Tt(t);this.type=n,this.mappingMethod=e,this._normalizeData=Tet[e];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[e],e==="piecewise"?(iS(i),wet(i)):e==="category"?i.categories?Cet(i):iS(i,!0):(Mr(e!=="linear"||i.dataExtent),iS(i))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return dt(this._normalizeData,this)},r.listVisualTypes=function(){return Ht(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,n){xt(t)?L(t,e,n):e.call(n,t)},r.mapVisual=function(t,e,n){var i,a=Q(t)?[]:xt(t)?{}:(i=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(t){var e={},n;return t&&Lh(r.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(e[a]=t[a],n=!0)}),n?e:null},r.prepareVisualTypes=function(t){if(Q(t))t=t.slice();else if(xet(t)){var e=[];Lh(t,function(n,i){e.push(i)}),t=e}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,n){for(var i,a=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||ct(l)&&l===t+"")return o;n&&h(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(Yg(f[1],t,c[1]))return o}else if(c[1]===1/0){if(Yg(f[0],c[0],t))return o}else if(Yg(f[0],c[0],t)&&Yg(f[1],t,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return t===1/0?e.length-1:t===-1/0?0:i;function h(d,v){var p=Math.abs(d-t);p<a&&(a=p,i=v)}},r.visualHandlers={color:{applyVisual:Ih("color"),getColorMapper:function(){var t=this.option;return dt(t.mappingMethod==="category"?function(e,n){return!n&&(e=this._normalizeData(e)),Oh.call(this,e)}:function(e,n,i){var a=!!i;return!n&&(e=this._normalizeData(e)),i=nf(e,t.parsedVisual,i),a?i:vi(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return vi(nf(t,this.option.parsedVisual),"rgba")},category:Oh,piecewise:function(t,e){var n=oS.call(this,e);return n==null&&(n=vi(nf(t,this.option.parsedVisual),"rgba")),n},fixed:pl}},colorHue:Ug(function(t,e){return su(t,e)}),colorSaturation:Ug(function(t,e){return su(t,null,e)}),colorLightness:Ug(function(t,e){return su(t,null,null,e)}),colorAlpha:Ug(function(t,e){return af(t,e)}),decal:{applyVisual:Ih("decal"),_normalizedToVisual:{linear:null,category:Oh,piecewise:null,fixed:null}},opacity:{applyVisual:Ih("opacity"),_normalizedToVisual:aS([0,1])},liftZ:{applyVisual:Ih("liftZ"),_normalizedToVisual:{linear:pl,category:pl,piecewise:pl,fixed:pl}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:eN,category:Oh,piecewise:function(t,e){var n=oS.call(this,e);return n==null&&(n=eN.call(this,t)),n},fixed:pl}},symbolSize:{applyVisual:Ih("symbolSize"),_normalizedToVisual:aS([0,1])}},r}();function wet(r){var t=r.pieceList;r.hasSpecialVisual=!1,L(t,function(e,n){e.originIndex=n,e.visual!=null&&(r.hasSpecialVisual=!0)})}function Cet(r){var t=r.categories,e=r.categoryMap={},n=r.visual;if(Lh(t,function(o,s){e[o]=s}),!Q(n)){var i=[];xt(n)?Lh(n,function(o,s){var l=e[s];i[l!=null?l:Gg]=o}):i[Gg]=n,n=rN(r,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete e[t[a]],t.pop())}function iS(r,t){var e=r.visual,n=[];xt(e)?Lh(e,function(a){n.push(a)}):e!=null&&n.push(e);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),rN(r,n)}function Ug(r){return{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);n("color",r(e("color"),i))},_normalizedToVisual:aS([0,1])}}function eN(r){var t=this.option.visual;return t[Math.round(oe(r,[0,1],[0,t.length-1],!0))]||{}}function Ih(r){return function(t,e,n){n(r,this.mapValueToVisual(t))}}function Oh(r){var t=this.option.visual;return t[this.option.loop&&r!==Gg?r%t.length:r]}function pl(){return this.option.visual[0]}function aS(r){return{linear:function(t){return oe(t,r,this.option.visual,!0)},category:Oh,piecewise:function(t,e){var n=oS.call(this,e);return n==null&&(n=oe(t,r,this.option.visual,!0)),n},fixed:pl}}function oS(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var n=nS.findPieceIndex(r,e),i=e[n];if(i&&i.visual)return i.visual[this.type]}}function rN(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=J(t,function(e){var n=Hr(e);return n||[0,0,0,1]})),t}var Tet={linear:function(r){return oe(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=nS.findPieceIndex(r,t,!0);if(e!=null)return oe(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t==null?Gg:t},fixed:Fe};function Yg(r,t,e){return r?t<=e:t<e}var xr=nS,Met="itemStyle",nN=jt(),Det={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||iN(e,{},r.getViewRoot().getAncestors(),r)}};function iN(r,t,e,n){var i=r.getModel(),a=r.getLayout(),o=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(Met),l=Aet(s,t,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=aN(l),c=Pet(f,h)),u.stroke=c;var d=r.viewChildren;if(!d||!d.length)h=aN(l),u.fill=h;else{var v=Let(r,i,a,s,l,d);L(d,function(p,g){if(p.depth>=e.length||p===e[p.depth]){var m=Iet(i,l,p,g,v,n);iN(p,m,e,n)}})}}}function Aet(r,t,e){var n=K({},t),i=e.designatedVisualItemStyle;return L(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function aN(r){var t=sS(r,"color");if(t){var e=sS(r,"colorAlpha"),n=sS(r,"colorSaturation");return n&&(t=su(t,null,null,n)),e&&(t=af(t,e)),t}}function Pet(r,t){return t!=null?su(t,null,null,r):null}function sS(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function Let(r,t,e,n,i,a){if(!(!a||!a.length)){var o=lS(t,"color")||i.color!=null&&i.color!=="none"&&(lS(t,"colorAlpha")||lS(t,"colorSaturation"));if(!!o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new xr(f);return nN(h).drColorMappingBy=c,h}}}function lS(r,t){var e=r.get(t);return Q(e)&&e.length?{name:t,range:e}:null}function Iet(r,t,e,n,i,a){var o=K({},t);if(i){var s=i.type,l=s==="color"&&nN(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Eh=Math.max,qg=Math.min,oN=Je,uS=L,sN=["itemStyle","borderWidth"],Oet=["itemStyle","gapWidth"],Eet=["upperLabel","show"],Ret=["upperLabel","height"],ket={seriesType:"treemap",reset:function(r,t,e,n){var i=e.getWidth(),a=e.getHeight(),o=r.option,s=qe(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=o.size||[],u=at(oN(s.width,l[0]),i),c=at(oN(s.height,l[1]),a),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],d=Dh(n,h,r),v=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),g=Uk(p);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?Het(r,d,p,u,c):v?[v.width,v.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),lN(p,_,!1,0),b=p.getLayout(),uS(g,function(x,w){var C=(g[w+1]||p).getValue();x.setLayout(K({dataExtent:[C,C],borderWidth:0,upperHeight:0},b))})}var S=r.getData().tree.root;S.setLayout($et(s,v,d),!0),r.setLayoutInfo(s),cN(S,new kt(-s.x,-s.y,i,a),g,p,0)}};function lN(r,t,e,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(sN),u=s.get(Oet)/2,c=fN(s),f=Math.max(l,c),h=l-u,d=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=Eh(i-2*h,0),a=Eh(a-h-d,0);var v=i*a,p=Net(r,s,v,t,e,n);if(!!p.length){var g={x:h,y:d,width:i,height:a},m=qg(i,a),y=1/0,_=[];_.area=0;for(var b=0,S=p.length;b<S;){var x=p[b];_.push(x),_.area+=x.getLayout().area;var w=Vet(_,m,t.squareRatio);w<=y?(b++,y=w):(_.area-=_.pop().getLayout().area,uN(_,m,g,u,!1),m=qg(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&uN(_,m,g,u,!0),!e){var C=s.get("childrenVisibleMin");C!=null&&v<C&&(e=!0)}for(var b=0,S=p.length;b<S;b++)lN(p[b],t,e,n+1)}}}function Net(r,t,e,n,i,a){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return r.viewChildren=[];o=ae(o,function(d){return!d.isRemoved()}),zet(o,s);var u=Fet(t,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=Bet(t,e,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*e;o[c].setLayout({area:h})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Bet(r,t,e,n,i){if(!n)return e;for(var a=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/e*t<a&&(s=l,e-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),e}function zet(r,t){return t&&r.sort(function(e,n){var i=t==="asc"?e.getValue()-n.getValue():n.getValue()-e.getValue();return i===0?t==="asc"?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}),r}function Fet(r,t,e){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=r.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],uS(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Vet(r,t,e){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;a<s;a++)o=r[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=r.area*r.area,u=t*t*e;return l?Eh(u*n/l,l/(u*i)):1/0}function uN(r,t,e,n,i){var a=t===e.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=e[s[a]],c=t?r.area/t:0;(i||c>e[l[o]])&&(c=e[l[o]]);for(var f=0,h=r.length;f<h;f++){var d=r[f],v={},p=c?d.getLayout().area/c:0,g=v[l[o]]=Eh(c-2*n,0),m=e[s[a]]+e[l[a]]-u,y=f===h-1||m<p?m:p,_=v[l[a]]=Eh(y-2*n,0);v[s[o]]=e[s[o]]+qg(n,g/2),v[s[a]]=u+qg(n,_/2),u+=y,d.setLayout(v,!0)}e[s[o]]+=c,e[l[o]]-=c}function Het(r,t,e,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===e)return o;for(var s,l=n*i,u=l*r.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,f=s.children,h=0,d=f.length;h<d;h++)c+=f[h].getValue();var v=a.getValue();if(v===0)return o;u*=c/v;var p=s.getModel(),g=p.get(sN),m=Math.max(g,fN(p));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>V_&&(u=V_),a=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,i*y]}function $et(r,t,e){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!e)return n;var i=e.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function cN(r,t,e,n,i){var a=r.getLayout(),o=e[i],s=o&&o===r;if(!(o&&!s||i===e.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new kt(t.x-a.x,t.y-a.y,t.width,t.height);uS(r.viewChildren||[],function(u){cN(u,l,e,n,i+1)})}}function fN(r){return r.get(Eet)?r.get(Ret):0}function Wet(r){r.registerSeriesModel(aet),r.registerChartView(bet),r.registerVisual(Det),r.registerLayout(ket),ret(r)}function Get(r){var t=r.findComponents({mainType:"legend"});!t||!t.length||r.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),i=e.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){qt(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function Uet(r){var t={};r.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),i=e.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(s,t)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){ct(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");K(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)i.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function jg(r){return r instanceof Array||(r=[r,r]),r}function Yet(r){r.eachSeriesByType("graph",function(t){var e=t.getGraph(),n=t.getEdgeData(),i=jg(t.get("edgeSymbol")),a=jg(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=e.getEdgeByIndex(o),u=jg(s.getShallow("symbol",!0)),c=jg(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(K(h,f),h.stroke){case"source":{var d=l.node1.getVisual("style");h.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");h.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var cS="-->",Xg=function(r){return r.get("autoCurveness")||null},hN=function(r,t){var e=Xg(r),n=20,i=[];if(qt(e))n=e;else if(Q(e)){r.__curvenessList=e;return}t>n&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},Rh=function(r,t,e){var n=[r.id,r.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[e.uid,n,i].join(cS)},dN=function(r){var t=r.split(cS);return[t[0],t[2],t[1]].join(cS)},qet=function(r,t){var e=Rh(r.node1,r.node2,t);return t.__edgeMap[e]},jet=function(r,t){var e=fS(Rh(r.node1,r.node2,t),t),n=fS(Rh(r.node2,r.node1,t),t);return e+n},fS=function(r,t){var e=t.__edgeMap;return e[r]?e[r].length:0};function Xet(r){!Xg(r)||(r.__curvenessList=[],r.__edgeMap={},hN(r))}function Zet(r,t,e,n){if(!!Xg(e)){var i=Rh(r,t,e),a=e.__edgeMap,o=a[dN(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function hS(r,t,e,n){var i=Xg(t),a=Q(i);if(!i)return null;var o=qet(r,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===e){s=l;break}var u=jet(r,t);hN(t,u),r.lineStyle=r.lineStyle||{};var c=Rh(r.node1,r.node2,t),f=t.__curvenessList,h=a||u%2?0:1;if(o.isForward)return f[h+s];var d=dN(c),v=fS(d,t),p=f[s+v+h];return n?a?i&&i[0]===0?(v+h)%2?p:-p:((v%2?0:1)+h)%2?p:-p:(v+h)%2?p:-p:f[s+v+h]}function vN(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),dS(e,r)}}function dS(r,t){r.eachEdge(function(e,n){var i=zi(e.getModel().get(["lineStyle","curveness"]),-hS(e,t,n,!0),0),a=Fi(e.node1.getLayout()),o=Fi(e.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),e.setLayout(s)})}function Ket(r,t){r.eachSeriesByType("graph",function(e){var n=e.get("layout"),i=e.coordinateSystem;if(i&&i.type!=="view"){var a=e.getData(),o=[];L(i.dimensions,function(h){o=o.concat(a.mapDimensionsAll(h))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=a.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}dS(a.graph,e)}else(!n||n==="none")&&vN(e)})}function kh(r){var t=r.coordinateSystem;if(t.type!=="view")return 1;var e=r.option.nodeScaleRatio,n=t.scaleX,i=t.getZoom(),a=(i-1)*e+1;return a/n}function Nh(r){var t=r.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var pN=Math.PI,vS=[];function pS(r,t,e,n){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=r.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(e){var h=i.pointToData(n),d=h[0],v=h[1],p=[d-l,v-u];vs(p,p),Yc(p,p,c),e.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);gN(e,g,l,u)}Qet[t](r,s,o,c,l,u,f),s.eachEdge(function(m,y){var _=zi(m.getModel().get(["lineStyle","curveness"]),hS(m,r,y),0),b=Fi(m.node1.getLayout()),S=Fi(m.node2.getLayout()),x,w=(b[0]+S[0])/2,C=(b[1]+S[1])/2;+_&&(_*=3,x=[l*_+w*(1-_),u*_+C*(1-_)]),m.setLayout([b,S,x])})}}}var Qet={value:function(r,t,e,n,i,a,o){var s=0,l=e.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=h})},symbolSize:function(r,t,e,n,i,a,o){var s=0;vS.length=o;var l=kh(r);t.eachNode(function(f){var h=Nh(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var d=Math.asin(h/2/n);isNaN(d)&&(d=pN/2),vS[f.dataIndex]=d,s+=d*2});var u=(2*pN-s)/o/2,c=0;t.eachNode(function(f){var h=u+vS[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=h})}};function gN(r,t,e,n){var i=r.getGraphicEl();if(!!i){var a=r.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-e);u<0&&(u=Math.PI*2+u);var c=l[0]<e;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");K(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Jet(r){r.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&pS(t,"symbolSize")})}var Ku=Tv;function trt(r,t,e){for(var n=r,i=t,a=e.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=e.gravity==null?.1:e.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=ro(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Fi(f.p),f.edges=null}var h=e.friction==null?.6:e.friction,d=h,v,p;return{warmUp:function(){d=h*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){v=g},afterStep:function(g){p=g},step:function(g){v&&v(n,i);for(var m=[],y=n.length,_=0;_<i.length;_++){var b=i[_];if(!b.ignoreForceLayout){var S=b.n1,x=b.n2;no(m,x.p,S.p);var w=Uc(m)-b.d,C=x.w/(S.w+x.w);isNaN(C)&&(C=0),vs(m,m),!S.fixed&&Ku(S.p,S.p,m,C*w*d),!x.fixed&&Ku(x.p,x.p,m,-(1-C)*w*d)}}for(var _=0;_<y;_++){var T=n[_];T.fixed||(no(m,l,T.p),Ku(T.p,T.p,m,u*d))}for(var _=0;_<y;_++)for(var S=n[_],D=_+1;D<y;D++){var x=n[D];no(m,x.p,S.p);var w=Uc(m);w===0&&(HD(m,Math.random()-.5,Math.random()-.5),w=1);var A=(S.rep+x.rep)/w/w;!S.fixed&&Ku(S.pp,S.pp,m,A),!x.fixed&&Ku(x.pp,x.pp,m,-A)}for(var P=[],_=0;_<y;_++){var T=n[_];T.fixed||(no(P,T.p,T.pp),Ku(T.p,T.p,P,d),Dr(T.pp,T.p))}d=d*.992;var I=d<.01;p&&p(n,i,I),g&&g(I)}}}function ert(r){r.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(_){var b=a.getId(_);a.setItemLayout(_,n[b]||[NaN,NaN])}):!l||l==="none"?vN(t):l==="circular"&&pS(t,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),d=Q(f)?f:[f,f],v=Q(h)?h:[h,h];v=[v[1],v[0]];var p=a.mapArray("value",function(_,b){var S=a.getItemLayout(b),x=oe(_,u,d);return isNaN(x)&&(x=(d[0]+d[1])/2),{w:x,rep:x,fixed:a.getItemModel(b).get("fixed"),p:!S||isNaN(S[0])||isNaN(S[1])?null:S}}),g=o.mapArray("value",function(_,b){var S=i.getEdgeByIndex(b),x=oe(_,c,v);isNaN(x)&&(x=(v[0]+v[1])/2);var w=S.getModel(),C=zi(S.getModel().get(["lineStyle","curveness"]),-hS(S,t,b,!0),0);return{n1:p[S.node1.dataIndex],n2:p[S.node2.dataIndex],d:x,curveness:C,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=e.getBoundingRect(),y=trt(p,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,b){for(var S=0,x=_.length;S<x;S++)_[S].fixed&&Dr(_[S].p,i.getNodeByIndex(S).getLayout())}),y.afterStep(function(_,b,S){for(var x=0,w=_.length;x<w;x++)_[x].fixed||i.getNodeByIndex(x).setLayout(_[x].p),n[a.getId(x)]=_[x].p;for(var x=0,w=b.length;x<w;x++){var C=b[x],T=i.getEdgeByIndex(x),D=C.n1.p,A=C.n2.p,P=T.getLayout();P=P?P.slice():[],P[0]=P[0]||[],P[1]=P[1]||[],Dr(P[0],D),Dr(P[1],A),+C.curveness&&(P[2]=[(D[0]+A[0])/2-(D[1]-A[1])*C.curveness,(D[1]+A[1])/2-(A[0]-D[0])*C.curveness]),T.setLayout(P)}}),t.forceLayout=y,t.preservedPoints=n,y.step()}else t.forceLayout=null})}function rrt(r,t,e){var n=K(r.getBoxLayoutParams(),{aspect:e});return qe(n,{width:t.getWidth(),height:t.getHeight()})}function nrt(r,t){var e=[];return r.eachSeriesByType("graph",function(n){var i=n.get("coordinateSystem");if(!i||i==="view"){var a=n.getData(),o=a.mapArray(function(g){var m=a.getItemModel(g);return[+m.get("x"),+m.get("y")]}),s=[],l=[];op(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=rrt(n,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],d=c.width,v=c.height,p=n.coordinateSystem=new Th;p.zoomLimit=n.get("scaleLimit"),p.setBoundingRect(s[0],s[1],f,h),p.setViewRect(c.x,c.y,d,v),p.setCenter(n.get("center"),t),p.setZoom(n.get("zoom")),e.push(p)}}),e}var mN=er.prototype,gS=Lf.prototype,yN=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(yN);function mS(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var irt=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new yN},t.prototype.buildPath=function(e,n){mS(n)?mN.buildPath.call(this,e,n):gS.buildPath.call(this,e,n)},t.prototype.pointAt=function(e){return mS(this.shape)?mN.pointAt.call(this,e):gS.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var n=this.shape,i=mS(n)?[n.x2-n.x1,n.y2-n.y1]:gS.tangentAt.call(this,e);return vs(i,i)},t}(Ft),art=irt,yS=["fromSymbol","toSymbol"];function _N(r){return"_"+r+"Type"}function bN(r,t,e){var n=t.getItemVisual(e,r);if(!(!n||n==="none")){var i=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=Qf(i),u=zu(o||0,l),c=$e(n,-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 ort(r){var t=new art({name:"line",subPixelOptimize:!0});return _S(t.shape,r),t}function _S(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 srt=function(r){q(t,r);function t(e,n,i){var a=r.call(this)||this;return a._createLine(e,n,i),a}return t.prototype._createLine=function(e,n,i){var a=e.hostModel,o=e.getItemLayout(n),s=ort(o);s.shape.percent=0,Te(s,{shape:{percent:1}},a,n),this.add(s),L(yS,function(l){var u=bN(l,e,n);this.add(u),this[_N(l)]=e.getItemVisual(n,l)},this),this._updateCommonStl(e,n,i)},t.prototype.updateData=function(e,n,i){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(n),l={shape:{}};_S(l.shape,s),Xt(o,l,a,n),L(yS,function(u){var c=e.getItemVisual(n,u),f=_N(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=bN(u,e,n);this.add(h)}this[f]=c},this),this._updateCommonStl(e,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,n,i){var a=e.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,h=i&&i.focus,d=i&&i.blurScope;if(!i||e.hasItemOption){var v=e.getItemModel(n),p=v.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),f=p.get("disabled"),h=p.get("focus"),d=p.get("blurScope"),c=rr(v)}var g=e.getItemVisual(n,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,L(yS,function(x){var w=this.childOfName(x);if(w){w.setColor(m),w.style.opacity=g.opacity;for(var C=0;C<Wr.length;C++){var T=Wr[C],D=o.getState(T);if(D){var A=D.style||{},P=w.ensureState(T),I=P.style||(P.style={});A.stroke!=null&&(I[w.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(I.opacity=A.opacity)}}w.markRedraw()}},this);var y=a.getRawValue(n);_r(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(x,w){return a.getFormattedLabel(x,w,e.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(y==null?e.getName(n):isFinite(y)?Ee(y):y)+""});var _=this.getTextContent();if(_){var b=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=b.get("position")||"middle";var S=b.get("distance");Q(S)||(S=[S,S]),_.__labelDistance=S}this.setTextConfig({position:null,local:!0,inside:!1}),Re(this,h,d,f)},t.prototype.highlight=function(){Aa(this)},t.prototype.downplay=function(){Pa(this)},t.prototype.updateLayout=function(e,n){this.setLinePoints(e.getItemLayout(n))},t.prototype.setLinePoints=function(e){var n=this.childOfName("line");_S(n.shape,e),n.dirty()},t.prototype.beforeUpdate=function(){var e=this,n=e.childOfName("fromSymbol"),i=e.childOfName("toSymbol"),a=e.getTextContent();if(!n&&!i&&(!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=no([],f,c);vs(h,h);function d(D,A){var P=D.__specifiedRotation;if(P==null){var I=l.tangentAt(A);D.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else D.attr("rotation",P)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(f),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var v=void 0,p=void 0,g=a.__labelDistance,m=g[0]*o,y=g[1]*o,_=u/2,b=l.tangentAt(_),S=[b[1],-b[0]],x=l.pointAt(_);S[1]>0&&(S[0]=-S[0],S[1]=-S[1]);var w=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(b[1],b[0]);f[0]<c[0]&&(C=Math.PI+C),a.rotation=C}var T=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":T=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":T=y,p="top";break;default:T=0,p="middle"}switch(a.__position){case"end":a.x=h[0]*m+f[0],a.y=h[1]*y+f[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*m+c[0],a.y=-h[1]*y+c[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*w+c[0],a.y=c[1]+T,v=b[0]<0?"right":"left",a.originX=-m*w,a.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=x[0],a.y=x[1]+T,v="center",a.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*w+f[0],a.y=f[1]+T,v=b[0]>=0?"right":"left",a.originX=m*w,a.originY=-T;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||v})}},t}(Dt),bS=srt,lrt=function(){function r(t){this.group=new Dt,this._LineCtor=t||bS}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=xN(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){i.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=xN(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function n(s){!s.isGroup&&!urt(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=e.getItemLayout(i);if(xS(a)){var o=new this._LineCtor(e,i,this._seriesScope);o.traverse(n),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){bo(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,n){var i=t.getItemLayout(e);if(!!xS(i)){var a=new this._LineCtor(t,e,n);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,n,i,a){var o=t.getItemGraphicEl(n);if(!xS(e.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(e,i,a):o=new this._LineCtor(e,i,a),e.setItemGraphicEl(i,o),this.group.add(o)},r}();function urt(r){return r.animators&&r.animators.length>0}function xN(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:rr(t)}}function SN(r){return isNaN(r[0])||isNaN(r[1])}function xS(r){return r&&!SN(r[0])&&!SN(r[1])}var SS=lrt,wS=[],CS=[],TS=[],Qu=lr,MS=io,wN=Math.abs;function CN(r,t,e){for(var n=r[0],i=r[1],a=r[2],o=1/0,s,l=e*e,u=.1,c=.1;c<=.9;c+=.1){wS[0]=Qu(n[0],i[0],a[0],c),wS[1]=Qu(n[1],i[1],a[1],c);var f=wN(MS(wS,t)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var d=s+u;CS[0]=Qu(n[0],i[0],a[0],s),CS[1]=Qu(n[1],i[1],a[1],s),TS[0]=Qu(n[0],i[0],a[0],d),TS[1]=Qu(n[1],i[1],a[1],d);var f=MS(CS,t)-l;if(wN(f)<.01)break;var v=MS(TS,t)-l;u/=2,f<0?v>=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function DS(r,t){var e=[],n=tf,i=[[],[],[]],a=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Fi(u[0]),Fi(u[1])],u[2]&&u.__original.push(Fi(u[2])));var h=u.__original;if(u[2]!=null){if(Dr(i[0],h[0]),Dr(i[1],h[2]),Dr(i[2],h[1]),c&&c!=="none"){var d=Nh(s.node1),v=CN(i,h[0],d*t);n(i[0][0],i[1][0],i[2][0],v,e),i[0][0]=e[3],i[1][0]=e[4],n(i[0][1],i[1][1],i[2][1],v,e),i[0][1]=e[3],i[1][1]=e[4]}if(f&&f!=="none"){var d=Nh(s.node2),v=CN(i,h[1],d*t);n(i[0][0],i[1][0],i[2][0],v,e),i[1][0]=e[1],i[2][0]=e[2],n(i[0][1],i[1][1],i[2][1],v,e),i[1][1]=e[1],i[2][1]=e[2]}Dr(u[0],i[0]),Dr(u[1],i[2]),Dr(u[2],i[1])}else{if(Dr(a[0],h[0]),Dr(a[1],h[1]),no(o,a[1],a[0]),vs(o,o),c&&c!=="none"){var d=Nh(s.node1);Tv(a[0],a[0],o,d*t)}if(f&&f!=="none"){var d=Nh(s.node2);Tv(a[1],a[1],o,-d*t)}Dr(u[0],a[0]),Dr(u[1],a[1])}})}function TN(r){return r.type==="view"}var crt=function(r){q(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,n){var i=new mh,a=new SS,o=this.group;this._controller=new wh(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(e,n,i){var a=this,o=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(TN(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Xt(u,c,e)}DS(e.getGraph(),kh(e));var f=e.getData();s.updateData(f);var h=e.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(e,n,i),clearTimeout(this._layoutTimeout);var d=e.forceLayout,v=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,v);var p=e.get("layout");f.graph.eachNode(function(_){var b=_.dataIndex,S=_.getGraphicEl(),x=_.getModel();if(!!S){S.off("drag").off("dragend");var w=x.get("draggable");w&&S.on("drag",function(T){switch(p){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,v),d.setFixed(b),f.setItemLayout(b,[S.x,S.y]);break;case"circular":f.setItemLayout(b,[S.x,S.y]),_.setLayout({fixed:!0},!0),pS(e,"symbolSize",_,[T.offsetX,T.offsetY]),a.updateLayout(e);break;case"none":default:f.setItemLayout(b,[S.x,S.y]),dS(e.getGraph(),e),a.updateLayout(e);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),S.setDraggable(w,!!x.get("cursor"));var C=x.get(["emphasis","focus"]);C==="adjacency"&&(Lt(S).focus=_.getAdjacentDataIndices())}}),f.graph.eachEdge(function(_){var b=_.getGraphicEl(),S=_.getModel().get(["emphasis","focus"]);!b||S==="adjacency"&&(Lt(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=f.getLayout("cx"),y=f.getLayout("cy");f.graph.eachNode(function(_){gN(_,g,m,y)}),this._firstRender=!1},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,n){var i=this;(function a(){e.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(e,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!Bg(u,i,e)}),!TN(e.coordinateSystem)){o.disable();return}o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){$x(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Wx(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),DS(e.getGraph(),kh(e)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,n=e.getData(),i=kh(e);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(e){DS(e.getGraph(),kh(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(he),frt=crt;function Ju(r){return"_EC_"+r}var hrt=function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var n=this._nodesMap;if(!n[Ju(t)]){var i=new gl(t,e);return i.hostGraph=this,this.nodes.push(i),n[Ju(t)]=i,i}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[Ju(t)]},r.prototype.addEdge=function(t,e,n){var i=this._nodesMap,a=this._edgesMap;if(qt(t)&&(t=this.nodes[t]),qt(e)&&(e=this.nodes[e]),t instanceof gl||(t=i[Ju(t)]),e instanceof gl||(e=i[Ju(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new MN(t,e,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof gl&&(t=t.id),e instanceof gl&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(e,n[a],a)},r.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(e,n[a],a)},r.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof gl||(e=this._nodesMap[Ju(e)]),!!e){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(t.call(i,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)n[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(s){var l=i[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)i[e.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},r}(),gl=function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t==null?"":t,this.dataIndex=e==null?-1:e}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},r}(),MN=function(){function r(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=n==null?-1:n}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,n=e.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r}();function DN(r,t){return{getValue:function(e){var n=this[r][t];return n.getStore().get(n.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,n){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,n)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,n){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,n)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}ze(gl,DN("hostGraph","data")),ze(MN,DN("hostGraph","edgeData"));var drt=hrt;function AN(r,t,e,n,i){for(var a=new drt(n),o=0;o<r.length;o++)a.addNode(Je(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],f=c.source,h=c.target;a.addEdge(f,h,u)&&(l.push(c),s.push(Je(Xe(c.id,null),f+" > "+h)),u++)}var d=e.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar")v=Qi(r,e);else{var p=Ou.get(d),g=p?p.dimensions||[]:[];Bt(g,"value")<0&&g.concat(["value"]);var m=$u(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;v=new Or(m,e),v.initData(r)}var y=new Or(["value"],e);return y.initData(l,s),i&&i(v,y),Wk({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var vrt=function(r){q(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.init=function(e){r.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new bh(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Cs(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,n){var i=e.edges||e.links||[],a=e.data||e.nodes||[],o=this;if(a&&i){Xet(this);var s=AN(a,i,this,!0,l);return L(s.edges,function(u){Zet(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var p=o._categoriesModels,g=v.getShallow("category"),m=p[g];return m&&(m.parentModel=v.parentModel,v.parentModel=m),v});var f=fe.prototype.getModel;function h(v,p){var g=f.call(this,v,p);return g.resolveParentPath=d,g}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=h,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(e,i),s=a.graph.getEdgeByIndex(e),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=hI({series:this,dataIndex:e,multipleSeries:n});return f},t.prototype._updateCategoriesData=function(){var e=J(this.option.categories||[],function(i){return i.value!=null?i:K({value:0},i)}),n=new Or(["value"],this);n.initData(e),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(_e),prt=vrt,grt={type:"graphRoam",event:"graphRoam",update:"none"};function mrt(r){r.registerChartView(frt),r.registerSeriesModel(prt),r.registerProcessor(Get),r.registerVisual(Uet),r.registerVisual(Yet),r.registerLayout(Ket),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Jet),r.registerLayout(ert),r.registerCoordinateSystem("graphView",{dimensions:Th.dimensions,create:nrt}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Fe),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Fe),r.registerAction(grt,function(t,e,n){e.eachComponent({mainType:"series",query:t},function(i){var a=i.coordinateSystem,o=jx(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var yrt=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),_rt=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new yrt},t.prototype.buildPath=function(e,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,e.moveTo(u,c),e.lineTo(n.x+i(l)*s,n.y+a(l)*s),e.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),e.lineTo(n.x-i(l)*s,n.y-a(l)*s),e.lineTo(u,c)},t}(Ft),brt=_rt;function xrt(r,t){var e=r.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=at(e[0],t.getWidth()),s=at(e[1],t.getHeight()),l=at(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Zg(r,t){var e=r==null?"":r+"";return t&&(ct(t)?e=t.replace("{value}",e):_t(t)&&(e=t(r))),e}var Srt=function(r){q(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,n,i){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),o=xrt(e,i);this._renderMain(e,n,i,a,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,n,i,a,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,f=e.getModel("axisLine"),h=f.get("roundCap"),d=h?Lg:Gr,v=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),m=[u,c];yA(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,b=[],S=0;v&&S<a.length;S++){var x=Math.min(Math.max(a[S][0],0),1);c=u+y*x;var w=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:a[S][1]}),w.setStyle(p.getLineStyle(["color","width"])),b.push(w),_=c}b.reverse(),L(b,function(T){return s.add(T)});var C=function(T){if(T<=0)return a[0][1];var D;for(D=0;D<a.length;D++)if(a[D][0]>=T&&(D===0?0:a[D-1][0])<T)return a[D][1];return a[D-1][1]};this._renderTicks(e,n,i,C,o,u,c,l,g),this._renderTitleAndDetail(e,n,i,C,o),this._renderAnchor(e,o),this._renderPointer(e,n,i,C,o,u,c,l,g)},t.prototype._renderTicks=function(e,n,i,a,o,s,l,u,c){for(var f=this.group,h=o.cx,d=o.cy,v=o.r,p=+e.get("min"),g=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),_=e.getModel("axisLabel"),b=e.get("splitNumber"),S=y.get("splitNumber"),x=at(m.get("length"),v),w=at(y.get("length"),v),C=s,T=(l-s)/b,D=T/S,A=m.getModel("lineStyle").getLineStyle(),P=y.getModel("lineStyle").getLineStyle(),I=m.get("distance"),O,E,R=0;R<=b;R++){if(O=Math.cos(C),E=Math.sin(C),m.get("show")){var z=I?I+c:c,B=new er({shape:{x1:O*(v-z)+h,y1:E*(v-z)+d,x2:O*(v-x-z)+h,y2:E*(v-x-z)+d},style:A,silent:!0});A.stroke==="auto"&&B.setStyle({stroke:a(R/b)}),f.add(B)}if(_.get("show")){var z=_.get("distance")+I,Y=Zg(Ee(R/b*(g-p)+p),_.get("formatter")),W=a(R/b),et=O*(v-x-z)+h,V=E*(v-x-z)+d,H=_.get("rotate"),G=0;H==="radial"?(G=-C+2*Math.PI,G>Math.PI/2&&(G+=Math.PI)):H==="tangential"?G=-C-Math.PI/2:qt(H)&&(G=H*Math.PI/180),G===0?f.add(new Ut({style:me(_,{text:Y,x:et,y:V,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:O<-.4?"left":O>.4?"right":"center"},{inheritColor:W}),silent:!0})):f.add(new Ut({style:me(_,{text:Y,x:et,y:V,verticalAlign:"middle",align:"center"},{inheritColor:W}),silent:!0,originX:et,originY:V,rotation:G}))}if(y.get("show")&&R!==b){var z=y.get("distance");z=z?z+c:c;for(var j=0;j<=S;j++){O=Math.cos(C),E=Math.sin(C);var tt=new er({shape:{x1:O*(v-z)+h,y1:E*(v-z)+d,x2:O*(v-w-z)+h,y2:E*(v-w-z)+d},silent:!0,style:P});P.stroke==="auto"&&tt.setStyle({stroke:a((R+j/S)/b)}),f.add(tt),C+=D}C-=D}else C+=T}},t.prototype._renderPointer=function(e,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,v=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),m=g.get("show"),y=e.getData(),_=y.mapDimension("value"),b=+e.get("min"),S=+e.get("max"),x=[b,S],w=[s,l];function C(D,A){var P=y.getItemModel(D),I=P.getModel("pointer"),O=at(I.get("width"),o.r),E=at(I.get("length"),o.r),R=e.get(["pointer","icon"]),z=I.get("offsetCenter"),B=at(z[0],o.r),Y=at(z[1],o.r),W=I.get("keepAspect"),et;return R?et=$e(R,B-O/2,Y-E,O,E,null,W):et=new brt({shape:{angle:-Math.PI/2,width:O,r:E,x:B,y:Y}}),et.rotation=-(A+Math.PI/2),et.x=o.cx,et.y=o.cy,et}function T(D,A){var P=g.get("roundCap"),I=P?Lg:Gr,O=g.get("overlap"),E=O?g.get("width"):c/y.count(),R=O?o.r-E:o.r-(D+1)*E,z=O?o.r:o.r-D*E,B=new I({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:z}});return O&&(B.z2=S-y.get(_,D)%S),B}(m||p)&&(y.diff(h).add(function(D){var A=y.get(_,D);if(p){var P=C(D,s);Te(P,{rotation:-((isNaN(+A)?w[0]:oe(A,x,w,!0))+Math.PI/2)},e),f.add(P),y.setItemGraphicEl(D,P)}if(m){var I=T(D,s),O=g.get("clip");Te(I,{shape:{endAngle:oe(A,x,w,O)}},e),f.add(I),fb(e.seriesIndex,y.dataType,D,I),v[D]=I}}).update(function(D,A){var P=y.get(_,D);if(p){var I=h.getItemGraphicEl(A),O=I?I.rotation:s,E=C(D,O);E.rotation=O,Xt(E,{rotation:-((isNaN(+P)?w[0]:oe(P,x,w,!0))+Math.PI/2)},e),f.add(E),y.setItemGraphicEl(D,E)}if(m){var R=d[A],z=R?R.shape.endAngle:s,B=T(D,z),Y=g.get("clip");Xt(B,{shape:{endAngle:oe(P,x,w,Y)}},e),f.add(B),fb(e.seriesIndex,y.dataType,D,B),v[D]=B}}).execute(),y.each(function(D){var A=y.getItemModel(D),P=A.getModel("emphasis"),I=P.get("focus"),O=P.get("blurScope"),E=P.get("disabled");if(p){var R=y.getItemGraphicEl(D),z=y.getItemVisual(D,"style"),B=z.fill;if(R instanceof ur){var Y=R.style;R.useStyle(K({image:Y.image,x:Y.x,y:Y.y,width:Y.width,height:Y.height},z))}else R.useStyle(z),R.type!=="pointer"&&R.setColor(B);R.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a(oe(y.get(_,D),x,[0,1],!0))),R.z2EmphasisLift=0,yr(R,A),Re(R,I,O,E)}if(m){var W=v[D];W.useStyle(y.getItemVisual(D,"style")),W.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),W.z2EmphasisLift=0,yr(W,A),Re(W,I,O,E)}}),this._progressEls=v)},t.prototype._renderAnchor=function(e,n){var i=e.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=$e(s,n.cx-o/2+at(l[0],n.r),n.cy-o/2+at(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(e,n,i,a,o){var s=this,l=e.getData(),u=l.mapDimension("value"),c=+e.get("min"),f=+e.get("max"),h=new Dt,d=[],v=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Ut({silent:!0}),v[m]=new Ut({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],v[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),b=new Dt,S=a(oe(_,[c,f],[0,1],!0)),x=y.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),C=o.cx+at(w[0],o.r),T=o.cy+at(w[1],o.r),D=d[m];D.attr({z2:g?0:2,style:me(x,{x:C,y:T,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:S})}),b.add(D)}var A=y.getModel("detail");if(A.get("show")){var P=A.get("offsetCenter"),I=o.cx+at(P[0],o.r),O=o.cy+at(P[1],o.r),E=at(A.get("width"),o.r),R=at(A.get("height"),o.r),z=e.get(["progress","show"])?l.getItemVisual(m,"style").fill:S,D=v[m],B=A.get("formatter");D.attr({z2:g?0:2,style:me(A,{x:I,y:O,text:Zg(_,B),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:z})}),WP(D,{normal:A},_,function(W){return Zg(W,B)}),p&&GP(D,m,l,e,{getFormattedLabel:function(W,et,V,H,G,j){return Zg(j?j.interpolatedValue:_,B)}}),b.add(D)}h.add(b)}),this.group.add(h),this._titleEls=d,this._detailEls=v},t.type="gauge",t}(he),wrt=Srt,Crt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,n){return ju(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(_e),Trt=Crt;function Mrt(r){r.registerChartView(wrt),r.registerSeriesModel(Trt)}var Drt=["itemStyle","opacity"],Art=function(r){q(t,r);function t(e,n){var i=r.call(this)||this,a=i,o=new Yr,s=new Ut;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return t.prototype.updateData=function(e,n,i){var a=this,o=e.hostModel,s=e.getItemModel(n),l=e.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Drt);c=c==null?1:c,i||bi(a),a.useStyle(e.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Te(a,{style:{opacity:c}},o,n)):Xt(a,{style:{opacity:c},shape:{points:l.points}},o,n),yr(a,s),this._updateLabel(e,n),Re(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=e.hostModel,l=e.getItemModel(n),u=e.getItemLayout(n),c=u.label,f=e.getItemVisual(n,"style"),h=f.fill;_r(o,rr(l),{labelFetcher:e.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:e.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var d=c.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new Rt(d[0][0],d[0][1]):null},Xt(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),lx(i,ux(l),{stroke:h})},t}(Ur),Prt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Art(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);If(u,e,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(he),Lrt=Prt,Irt=function(r){q(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){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bh(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,n){return ju(this,{coordDimensions:["value"],encodeDefaulter:It(Zb,this)})},t.prototype._defaultLabelLine=function(e){Cs(e,"labelLine",["show"]);var n=e.labelLine,i=e.emphasis.labelLine;n.show=n.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var n=this.getData(),i=r.prototype.getDataParams.call(this,e),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(_e),Ort=Irt;function Ert(r,t){return qe(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Rrt(r,t){for(var e=r.mapDimension("value"),n=r.mapArray(e,function(l){return l}),i=[],a=t==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return _t(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function krt(r){var t=r.hostModel,e=t.get("orient");r.each(function(n){var i=r.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,d,v;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),v=[[h,d],[h,d]];else{var p=void 0,g=void 0,m=void 0,y=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=p-_,h=m-5,f="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=p+_,h=m+5,f="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,d=y-5,f="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,d=y+5,f="center"):o==="rightTop"?(p=e==="horizontal"?u[3][0]:u[1][0],g=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(y=g-_,d=y-5,f="center"):(m=p+_,h=m+5,f="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],e==="horizontal"?(y=g+_,d=y+5,f="center"):(m=p+_,h=m+5,f="bottom")):o==="leftTop"?(p=u[0][0],g=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(y=g-_,d=y-5,f="center"):(m=p-_,h=m-5,f="right")):o==="leftBottom"?(p=e==="horizontal"?u[1][0]:u[3][0],g=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(y=g+_,d=y+5,f="center"):(m=p-_,h=m-5,f="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e==="horizontal"?(y=g+_,d=y+5,f="center"):(m=p+_,h=m+5,f="left")),e==="horizontal"?(m=p,h=m):(y=g,d=y),v=[[p,g],[m,y]]}l.label={linePoints:v,x:h,y:d,verticalAlign:"middle",textAlign:f,inside:c}})}function Nrt(r,t){r.eachSeriesByType("funnel",function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),o=Ert(e,t),s=e.get("orient"),l=o.width,u=o.height,c=Rrt(n,a),f=o.x,h=o.y,d=s==="horizontal"?[at(e.get("minSize"),u),at(e.get("maxSize"),u)]:[at(e.get("minSize"),l),at(e.get("maxSize"),l)],v=n.getDataExtent(i),p=e.get("min"),g=e.get("max");p==null&&(p=Math.min(v[0],0)),g==null&&(g=v[1]);var m=e.get("funnelAlign"),y=e.get("gap"),_=s==="horizontal"?l:u,b=(_-y*(n.count()-1))/n.count(),S=function(O,E){if(s==="horizontal"){var R=n.get(i,O)||0,z=oe(R,[p,g],d,!0),B=void 0;switch(m){case"top":B=h;break;case"center":B=h+(u-z)/2;break;case"bottom":B=h+(u-z);break}return[[E,B],[E,B+z]]}var Y=n.get(i,O)||0,W=oe(Y,[p,g],d,!0),et;switch(m){case"left":et=f;break;case"center":et=f+(l-W)/2;break;case"right":et=f+l-W;break}return[[et,E],[et+W,E]]};a==="ascending"&&(b=-b,y=-y,s==="horizontal"?f+=l:h+=u,c=c.reverse());for(var x=0;x<c.length;x++){var w=c[x],C=c[x+1],T=n.getItemModel(w);if(s==="horizontal"){var D=T.get(["itemStyle","width"]);D==null?D=b:(D=at(D,l),a==="ascending"&&(D=-D));var A=S(w,f),P=S(C,f+D);f+=D+y,n.setItemLayout(w,{points:A.concat(P.slice().reverse())})}else{var I=T.get(["itemStyle","height"]);I==null?I=b:(I=at(I,u),a==="ascending"&&(I=-I));var A=S(w,h),P=S(C,h+I);h+=I+y,n.setItemLayout(w,{points:A.concat(P.slice().reverse())})}}krt(n)})}function Brt(r){r.registerChartView(Lrt),r.registerSeriesModel(Ort),r.registerLayout(Nrt),r.registerProcessor(_h("funnel"))}var zrt=.3,Frt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new Dt,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,c=u.dimensions,f=IN(e);s.diff(l).add(h).update(d).remove(v).execute();function h(g){var m=LN(s,o,g,c,u);AS(m,s,g,f)}function d(g,m){var y=l.getItemGraphicEl(m),_=PN(s,g,c,u);s.setItemGraphicEl(g,y),Xt(y,{shape:{points:_}},e,g),bi(y),AS(y,s,g,f)}function v(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var p=Vrt(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},t.prototype.incrementalPrepareRender=function(e,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=IN(n),u=this._progressiveEls=[],c=e.start;c<e.end;c++){var f=LN(a,this._dataGroup,c,s,o);f.incremental=!0,AS(f,a,c,l),u.push(f)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(he);function Vrt(r,t,e){var n=r.model,i=r.getRect(),a=new Gt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Te(a,{shape:{width:i.width,height:i.height}},t,e),a}function PN(r,t,e,n){for(var i=[],a=0;a<e.length;a++){var o=e[a],s=r.get(r.mapDimension(o),t);Hrt(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function LN(r,t,e,n,i){var a=PN(r,e,n,i),o=new Yr({shape:{points:a},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function IN(r){var t=r.get("smooth",!0);return t===!0&&(t=zrt),t=Wi(t),eu(t)&&(t=0),{smooth:t}}function AS(r,t,e,n){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var i=t.getItemModel(e),a=i.getModel("emphasis");yr(r,i,"lineStyle"),Re(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function Hrt(r,t){return t==="category"?r==null:r==null||isNaN(r)}var $rt=Frt,Wrt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,n){return Qi(null,this,{useEncodeDefaulter:dt(Grt,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){e===o&&a.push(i.getRawIndex(s))}),a},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(_e);function Grt(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(!!t){var e={};return L(t.dimensions,function(n){var i=Urt(n);e[n]=i}),e}}function Urt(r){return+r.replace("dim","")}var Yrt=Wrt,qrt=["lineStyle","opacity"],jrt={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,a){e.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(qrt,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}},Xrt=jrt;function Zrt(r){Krt(r),Qrt(r)}function Krt(r){if(!r.parallel){var t=!1;L(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function Qrt(r){var t=ce(r.parallelAxis);L(t,function(e){if(!!xt(e)){var n=e.parallelIndex||0,i=ce(r.parallel)[n];i&&i.parallelAxisDefault&&Ot(e,i.parallelAxisDefault,!1)}})}var Jrt=5,tnt=function(r){q(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,n,i){this._model=e,this._api=i,this._handlers||(this._handlers={},L(ent,function(a,o){i.getZr().on(o,this._handlers[o]=dt(a,this))},this)),Nu(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,n){jf(this,"_throttledDispatchExpand"),L(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(K({type:"parallelAxisExpand"},e))},t.type="parallel",t}(Me),ent={mousedown:function(r){PS(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(PS(this,"click")&&t){var e=[r.offsetX,r.offsetY],n=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(n>Jrt)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!PS(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=e.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function PS(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var rnt=tnt,nnt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var n=this.option;e&&Ot(n,e,!0),this._initDimensions()},t.prototype.contains=function(e,n){var i=e.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(e){L(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){e.hasOwnProperty(n)&&(this.option[n]=e[n])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[],i=ae(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);L(i,function(a){e.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Wt),int=nnt,ant=function(r){q(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Un),ont=ant;function ml(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=tc(i,[0,o])),a!=null&&(a=Math.max(a,i!=null?i:0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=tc(s,[0,o]),i=a=tc(s,[i,a]),n=0}t[0]=tc(t[0],e),t[1]=tc(t[1],e);var l=LS(t,n);t[n]+=r;var u=i||0,c=e.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=tc(t[n],c);var f;return f=LS(t,n),i!=null&&(f.sign!==l.sign||f.span<i)&&(t[1-n]=t[n]+l.sign*i),f=LS(t,n),a!=null&&f.span>a&&(t[1-n]=t[n]+f.sign*a),t}function LS(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 tc(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var IS=L,ON=Math.min,EN=Math.max,RN=Math.floor,snt=Math.ceil,kN=Ee,lnt=Math.PI,unt=function(){function r(t,e,n){this.type="parallel",this._axesMap=yt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return r.prototype._init=function(t,e,n){var i=t.dimensions,a=t.parallelAxisIndex;IS(i,function(o,s){var l=a[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(o,new ont(o,lh(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+e.axisLength&&s>=i&&s<=i+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(!!t.contains(n,e)){var i=n.getData();IS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),el(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=qe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=e[i[o]],l=[0,s],u=this.dimensions.length,c=Kg(t.get("axisExpandWidth"),l),f=Kg(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=t.get("axisExpandWindow"),v;if(d)v=Kg(d[1]-d[0],l),d[1]=d[0]+v;else{v=Kg(c*(f-1),l);var p=t.get("axisExpandCenter")||RN(u/2);d=[c*p-v/2],d[1]=d[0]+v}var g=(s-v)/(u-f);g<3&&(g=0);var m=[RN(kN(d[0]/c,1))+1,snt(kN(d[1]/c,1))-1],y=g/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:e[n[o]],layoutLength:s,axisBase:e[n[1-o]],axisLength:e[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;e.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),IS(n,function(o,s){var l=(i.axisExpandable?fnt:cnt)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:lnt/2,vertical:0},f=[u[a].x+t.x,u[a].y+t.y],h=c[a],d=mn();ao(d,d,h),hi(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];L(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=t.getValues(s,c),d=0,v=o.length;d<v;d++){var p=l[d].getActiveState(h[d]);if(p==="inactive"){f="inactive";break}}}e(f,c)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)e.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(t,e){var n=this._axesLayout[e];return xi([t,0],n.transform)},r.prototype.getAxisLayout=function(t){return Tt(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",c=e.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<a*f[0]?(u="jump",l=s-a*f[2]):h&&c&&s>a*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=e.axisExpandWidth/c,l?ml(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[EN(0,v-d/2)],i[1]=ON(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function Kg(r,t){return ON(EN(r,t[0]),t[1])}function cnt(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function fnt(r,t){var e=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return r<o[0]?(s=r*a,c=a):r<=o[1]?(s=t.axisExpandWindow0Pos+r*n-t.axisExpandWindow[0],l=n,u=!0):(s=e-(i-1-r)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}var hnt=unt;function dnt(r,t){var e=[];return r.eachComponent("parallel",function(n,i){var a=new hnt(n,r,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,e.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",Ye).models[0];n.coordinateSystem=i.coordinateSystem}}),e}var vnt={create:dnt},pnt=vnt,NN=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return Ds([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var n=this.activeIntervals=Tt(e);if(n)for(var i=n.length-1;i>=0;i--)bn(n[i])},t.prototype.getActiveState=function(e){var n=this.activeIntervals;if(!n.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=e&&e<=n[a][1])return"active";return"inactive"},t}(Wt);ze(NN,Gu);var BN=NN,yl=!0,Bh=Math.min,ec=Math.max,gnt=Math.pow,mnt=1e4,ynt=6,_nt=6,zN="globalPan",bnt={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},xnt={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},FN={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},Snt=0,wnt=function(r){q(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new Dt,n._uid="brushController_"+Snt++,L(Lnt,function(i,a){this._handlers[a]=dt(i,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||IJ(n,zN,this._uid),L(this._handlers,function(i,a){n.on(a,i)}),this._brushType=e.brushType,this._brushOption=Ot(Tt(FN),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;OJ(e,zN,this._uid),L(this._handlers,function(n,i){e.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};L(e,function(i){n[i.panelId]=Tt(i)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=J(e,function(h){return Ot(Tt(FN),h,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Ia(i,e,u,l).add(c).update(c).remove(f).execute(),this;function l(h,d){return(h.id!=null?h.id:n+d)+"-"+h.brushType}function u(h,d){return l(h.__brushOption,d)}function c(h,d){var v=e[h];if(d!=null&&i[d]===s)a[h]=i[d];else{var p=a[h]=d!=null?(i[d].__brushOption=v,i[d]):HN(o,VN(o,v));OS(o,p)}}function f(h){i[h]!==s&&o.group.remove(i[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),kS(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(En);function VN(r,t){var e=Qg[t.brushType].createCover(r,t);return e.__brushOption=t,WN(e,t),r.group.add(e),e}function HN(r,t){var e=ES(t);return e.endCreating&&(e.endCreating(r,t),WN(t,t.__brushOption)),t}function $N(r,t){var e=t.__brushOption;ES(t).updateCoverShape(r,t,e.range,e)}function WN(r,t){var e=t.z;e==null&&(e=mnt),r.traverse(function(n){n.z=e,n.z2=e})}function OS(r,t){ES(t).updateCommon(r,t),$N(r,t)}function ES(r){return Qg[r.__brushOption.brushType]}function RS(r,t,e){var n=r._panels;if(!n)return yl;var i,a=r._transform;return L(n,function(o){o.isTargetByCursor(t,e,a)&&(i=o)}),i}function GN(r,t){var e=r._panels;if(!e)return yl;var n=t.__brushOption.panelId;return n!=null?e[n]:yl}function kS(r){var t=r._covers,e=t.length;return L(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function _l(r,t){var e=J(r._covers,function(n){var i=n.__brushOption,a=Tt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Cnt(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],i=e[0]-n[0],a=e[1]-n[1],o=gnt(i*i+a*a,.5);return o>ynt}function UN(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function YN(r,t,e,n){var i=new Dt;return i.add(new Gt({name:"main",style:BS(e),silent:!0,draggable:!0,cursor:"move",drift:It(XN,r,t,i,["n","s","w","e"]),ondragend:It(_l,t,{isEnd:!0})})),L(n,function(a){i.add(new Gt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:It(XN,r,t,i,a),ondragend:It(_l,t,{isEnd:!0})}))}),i}function qN(r,t,e,n){var i=n.brushStyle.lineWidth||0,a=ec(i,_nt),o=e[0][0],s=e[1][0],l=o-i/2,u=s-i/2,c=e[0][1],f=e[1][1],h=c-a+i/2,d=f-a+i/2,v=c-o,p=f-s,g=v+i,m=p+i;Na(r,t,"main",o,s,v,p),n.transformable&&(Na(r,t,"w",l,u,a,m),Na(r,t,"e",h,u,a,m),Na(r,t,"n",l,u,g,a),Na(r,t,"s",l,d,g,a),Na(r,t,"nw",l,u,a,a),Na(r,t,"ne",h,u,a,a),Na(r,t,"sw",l,d,a,a),Na(r,t,"se",h,d,a,a))}function NS(r,t){var e=t.__brushOption,n=e.transformable,i=t.childAt(0);i.useStyle(BS(e)),i.attr({silent:!n,cursor:n?"move":"default"}),L([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?zS(r,a[0]):Mnt(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?xnt[s]+"-resize":null})})}function Na(r,t,e,n,i,a,o){var s=t.childOfName(e);s&&s.setShape(Ant(FS(r,t,[[n,i],[n+a,i+o]])))}function BS(r){return bt({strokeNoScale:!0},r.brushStyle)}function jN(r,t,e,n){var i=[Bh(r,e),Bh(t,n)],a=[ec(r,e),ec(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Tnt(r){return _o(r.group)}function zS(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Mp(e[t],Tnt(r));return n[i]}function Mnt(r,t){var e=[zS(r,t[0]),zS(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function XN(r,t,e,n,i,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=ZN(t,i,a);L(n,function(u){var c=bnt[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(jN(s[0][0],s[1][0],s[0][1],s[1][1])),OS(t,e),_l(t,{isEnd:!1})}function Dnt(r,t,e,n){var i=t.__brushOption.range,a=ZN(r,e,n);L(i,function(o){o[0]+=a[0],o[1]+=a[1]}),OS(r,t),_l(r,{isEnd:!1})}function ZN(r,t,e){var n=r.group,i=n.transformCoordToLocal(t,e),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function FS(r,t,e){var n=GN(r,t);return n&&n!==yl?n.clipPath(e,r._transform):Tt(e)}function Ant(r){var t=Bh(r[0][0],r[1][0]),e=Bh(r[0][1],r[1][1]),n=ec(r[0][0],r[1][0]),i=ec(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:i-e}}function Pnt(r,t,e){if(!(!r._brushType||Int(r,t.offsetX,t.offsetY))){var n=r._zr,i=r._covers,a=RS(r,t,e);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===yl||s.panelId===a.panelId)&&Qg[s.brushType].contain(i[o],e[0],e[1]))return}a&&n.setCursorStyle("crosshair")}}function VS(r){var t=r.event;t.preventDefault&&t.preventDefault()}function HS(r,t,e){return r.childOfName("main").contain(t,e)}function KN(r,t,e,n){var i=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),Cnt(r)||i){if(a&&!i){o.brushMode==="single"&&kS(r);var l=Tt(o);l.brushType=QN(l.brushType,a),l.panelId=a===yl?null:a.panelId,i=r._creatingCover=VN(r,l),r._covers.push(i)}if(i){var u=Qg[QN(r._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(FS(r,i,r._track)),n&&(HN(r,i),u.updateCommon(r,i)),$N(r,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&RS(r,t,e)&&kS(r)&&(s={isEnd:n,removeOnClick:!0});return s}function QN(r,t){return r==="auto"?t.defaultBrushType:r}var Lnt={mousedown:function(r){if(this._dragging)JN(this,r);else if(!r.target||!r.target.draggable){VS(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=RS(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,n=this.group.transformCoordToLocal(t,e);if(Pnt(this,r,n),this._dragging){VS(r);var i=KN(this,r,n,!1);i&&_l(this,i)}},mouseup:function(r){JN(this,r)}};function JN(r,t){if(r._dragging){VS(t);var e=t.offsetX,n=t.offsetY,i=r.group.transformCoordToLocal(e,n),a=KN(r,t,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&_l(r,a)}}function Int(r,t,e){var n=r._zr;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var Qg={lineX:t5(0),lineY:t5(1),rect:{createCover:function(r,t){function e(n){return n}return YN({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=UN(r);return jN(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){qN(r,t,e,n)},updateCommon:NS,contain:HS},polygon:{createCover:function(r,t){var e=new Dt;return e.add(new Yr({name:"main",style:BS(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ur({name:"main",draggable:!0,drift:It(Dnt,r,t),ondragend:It(_l,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:FS(r,t,e)})},updateCommon:NS,contain:HS}};function t5(r){return{createCover:function(t,e){return YN({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=UN(t),n=Bh(e[0][r],e[1][r]),i=ec(e[0][r],e[1][r]);return[n,i]},updateCoverShape:function(t,e,n,i){var a,o=GN(t,e);if(o!==yl&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),qN(t,e,l,i)},updateCommon:NS,contain:HS}}var $S=wnt;function e5(r){return r=WS(r),function(t){return Ib(t,r)}}function r5(r,t){return r=WS(r),function(e){var n=t!=null?t:e,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function n5(r,t,e){var n=WS(r);return function(i,a){return n.contain(a[0],a[1])&&!Bg(i,t,e)}}function WS(r){return kt.create(r)}var Ont=["axisLine","axisTickLabel","axisName"],Ent=function(r){q(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,n){r.prototype.init.apply(this,arguments),(this._brushController=new $S(n.getZr())).on("brush",dt(this._onBrush,this))},t.prototype.render=function(e,n,i,a){if(!Rnt(e,n,a)){this.axisModel=e,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Dt,this.group.add(this._axisGroup),!!e.get("show")){var s=Nnt(e,n),l=s.coordinateSystem,u=e.getAreaSelectStyle(),c=u.width,f=e.axis.dim,h=l.getAxisLayout(f),d=K({strokeContainThreshold:c},h),v=new Ra(e,d);L(Ont,v.add,v),this._axisGroup.add(v.getGroup()),this._refreshBrushController(d,u,e,s,c,i),Ef(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=kt.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:e5(f),isTargetByCursor:n5(f,s,a),getLinearBrushOtherExtent:r5(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(knt(i))},t.prototype._onBrush=function(e){var n=e.areas,i=this.axisModel,a=i.axis,o=J(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Me);function Rnt(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function knt(r){var t=r.axis;return J(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function Nnt(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var Bnt=Ent,znt={type:"axisAreaSelect",event:"axisAreaSelected"};function Fnt(r){r.registerAction(znt,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Vnt={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function i5(r){r.registerComponentView(rnt),r.registerComponentModel(int),r.registerCoordinateSystem("parallel",pnt),r.registerPreprocessor(Zrt),r.registerComponentModel(BN),r.registerComponentView(Bnt),Xu(r,"parallel",BN,Vnt),Fnt(r)}function Hnt(r){zt(i5),r.registerChartView($rt),r.registerSeriesModel(Yrt),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Xrt)}var $nt=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),Wnt=function(r){q(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new $nt},t.prototype.buildPath=function(e,n){var i=n.extent;e.moveTo(n.x1,n.y1),e.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(e.lineTo(n.x2+i,n.y2),e.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(e.lineTo(n.x2,n.y2+i),e.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),e.closePath()},t.prototype.highlight=function(){Aa(this)},t.prototype.downplay=function(){Pa(this)},t}(Ft),Gnt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,n,i){var a=this,o=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,c=l.height,f=e.getData(),h=e.getData("edge"),d=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(v){var p=new Wnt,g=Lt(p);g.dataIndex=v.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var m=v.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),b=v.node1.getLayout(),S=v.node1.getModel(),x=S.get("localX"),w=S.get("localY"),C=v.node2.getLayout(),T=v.node2.getModel(),D=T.get("localX"),A=T.get("localY"),P=v.getLayout(),I,O,E,R,z,B,Y,W;switch(p.shape.extent=Math.max(1,P.dy),p.shape.orient=d,d==="vertical"?(I=(x!=null?x*u:b.x)+P.sy,O=(w!=null?w*c:b.y)+b.dy,E=(D!=null?D*u:C.x)+P.ty,R=A!=null?A*c:C.y,z=I,B=O*(1-_)+R*_,Y=E,W=O*_+R*(1-_)):(I=(x!=null?x*u:b.x)+b.dx,O=(w!=null?w*c:b.y)+P.sy,E=D!=null?D*u:C.x,R=(A!=null?A*c:C.y)+P.ty,z=I*(1-_)+E*_,B=O,Y=I*_+E*(1-_),W=R),p.setShape({x1:I,y1:O,x2:E,y2:R,cpx1:z,cpy1:B,cpx2:Y,cpy2:W}),p.useStyle(y.getItemStyle()),p.style.fill){case"source":p.style.fill=v.node1.getVisual("color"),p.style.decal=v.node1.getVisual("style").decal;break;case"target":p.style.fill=v.node2.getVisual("color"),p.style.decal=v.node2.getVisual("style").decal;break;case"gradient":var et=v.node1.getVisual("color"),V=v.node2.getVisual("color");ct(et)&&ct(V)&&(p.style.fill=new yu(0,0,+(d==="horizontal"),+(d==="vertical"),[{color:et,offset:0},{color:V,offset:1}]))}_r(p,rr(m,"edgeLabel"),{labelFetcher:e,labelDataIndex:v.dataIndex,defaultText:""+m.get("value")}),p.setTextConfig({position:"inside"});var H=m.getModel("emphasis");yr(p,m,"lineStyle",function(j){return j.getItemStyle()}),s.add(p),h.setItemGraphicEl(v.dataIndex,p);var G=H.get("focus");Re(p,G==="adjacency"?v.getAdjacentDataIndices():G,H.get("blurScope"),H.get("disabled")),Lt(p).dataType="edge"}),o.eachNode(function(v){var p=v.getLayout(),g=v.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),b=new Gt({shape:{x:m!=null?m*u:p.x,y:y!=null?y*c:p.y,width:p.dx,height:p.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});_r(b,rr(g),{labelFetcher:e,labelDataIndex:v.dataIndex,defaultText:v.id}),b.disableLabelAnimation=!0,b.setStyle("fill",v.getVisual("color")),b.setStyle("decal",v.getVisual("style").decal),yr(b,g),s.add(b),f.setItemGraphicEl(v.dataIndex,b),Lt(b).dataType="node";var S=_.get("focus");Re(b,S==="adjacency"?v.getAdjacentDataIndices():S,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(v,p){var g=f.getItemModel(p);g.get("draggable")&&(v.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(Unt(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(he);function Unt(r,t,e){var n=new Gt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Te(n,{shape:{width:r.width+20}},t,e),n}var Ynt=Gnt,qnt=function(r){q(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,n){var i=e.edges||e.links,a=e.data||e.nodes,o=e.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new fe(o[l],this,n));if(a&&i){var u=AN(a,i,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(d,v){var p=d.parentModel,g=p.getData().getItemLayout(v);if(g){var m=g.depth,y=p.levelModels[m];y&&(d.parentModel=y)}return d}),h.wrapMethod("getItemModel",function(d,v){var p=d.parentModel,g=p.getGraph().getEdgeByIndex(v),m=g.node1.getLayout();if(m){var y=m.depth,_=p.levelModels[y];_&&(d.parentModel=_)}return d})}},t.prototype.setNodePosition=function(e,n){var i=this.option.data||this.option.nodes,a=i[e];a.localX=n[0],a.localY=n[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(e,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return nr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(e),f=c.getLayout().value,h=this.getDataParams(e,i).data.name;return nr("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,n){var i=r.prototype.getDataParams.call(this,e,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(e),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(_e),jnt=qnt;function Xnt(r,t){r.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=Znt(e,t);e.layoutInfo=a;var o=a.width,s=a.height,l=e.getGraph(),u=l.nodes,c=l.edges;Qnt(u);var f=ae(u,function(p){return p.getLayout().value===0}),h=f.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),v=e.get("nodeAlign");Knt(u,c,n,i,o,s,h,d,v)})}function Znt(r,t){return qe(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Knt(r,t,e,n,i,a,o,s,l){Jnt(r,t,e,i,a,s,l),nit(r,t,a,i,n,o,s),hit(r,s)}function Qnt(r){L(r,function(t){var e=ko(t.outEdges,Jg),n=ko(t.inEdges,Jg),i=t.getValue()||0,a=Math.max(e,n,i);t.setLayout({value:a},!0)})}function Jnt(r,t,e,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<t.length;h++)s[h]=1;for(var h=0;h<r.length;h++)l[h]=r[h].inEdges.length,l[h]===0&&u.push(r[h]);for(var d=-1;u.length;){for(var v=0;v<u.length;v++){var p=u[v],g=p.hostGraph.data.getRawDataItem(p.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>d&&(d=g.depth),p.setLayout({depth:m?g.depth:f},!0),a==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var y=0;y<p.outEdges.length;y++){var _=p.outEdges[y],b=t.indexOf(_);s[b]=0;var S=_.node2,x=r.indexOf(S);--l[x]===0&&c.indexOf(S)<0&&c.push(S)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=d>f-1?d:f-1;o&&o!=="left"&&tit(r,o,a,w);var C=a==="vertical"?(i-e)/w:(n-e)/w;rit(r,C,a)}function a5(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function tit(r,t,e,n){if(t==="right"){for(var i=[],a=r,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}L(r,function(f){a5(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else t==="justify"&&eit(r,n)}function eit(r,t){L(r,function(e){!a5(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function rit(r,t,e){L(r,function(n){var i=n.getLayout().depth*t;e==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function nit(r,t,e,n,i,a,o){var s=iit(r,o);ait(s,t,e,n,i,o),GS(s,i,e,n,o);for(var l=1;a>0;a--)l*=.99,oit(s,l,o),GS(s,i,e,n,o),fit(s,l,o),GS(s,i,e,n,o)}function iit(r,t){var e=[],n=t==="vertical"?"y":"x",i=q_(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),L(i.keys,function(a){e.push(i.buckets.get(a))}),e}function ait(r,t,e,n,i,a){var o=1/0;L(r,function(s){var l=s.length,u=0;L(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(e-(l-1)*i)/u;c<o&&(o=c)}),L(r,function(s){L(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),L(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function GS(r,t,e,n,i){var a=i==="vertical"?"x":"y";L(r,function(o){o.sort(function(p,g){return p.getLayout()[a]-g.getLayout()[a]});for(var s,l,u,c=0,f=o.length,h=i==="vertical"?"dx":"dy",d=0;d<f;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+t;var v=i==="vertical"?n:e;if(u=c-t-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function oit(r,t,e){L(r.slice().reverse(),function(n){L(n,function(i){if(i.outEdges.length){var a=ko(i.outEdges,sit,e)/ko(i.outEdges,Jg);if(isNaN(a)){var o=i.outEdges.length;a=o?ko(i.outEdges,lit,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(a-Ro(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ro(i,e))*t;i.setLayout({y:l},!0)}}})})}function sit(r,t){return Ro(r.node2,t)*r.getValue()}function lit(r,t){return Ro(r.node2,t)}function uit(r,t){return Ro(r.node1,t)*r.getValue()}function cit(r,t){return Ro(r.node1,t)}function Ro(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Jg(r){return r.getValue()}function ko(r,t,e){for(var n=0,i=r.length,a=-1;++a<i;){var o=+t(r[a],e);isNaN(o)||(n+=o)}return n}function fit(r,t,e){L(r,function(n){L(n,function(i){if(i.inEdges.length){var a=ko(i.inEdges,uit,e)/ko(i.inEdges,Jg);if(isNaN(a)){var o=i.inEdges.length;a=o?ko(i.inEdges,cit,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(a-Ro(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ro(i,e))*t;i.setLayout({y:l},!0)}}})})}function hit(r,t){var e=t==="vertical"?"x":"y";L(r,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[e]-a.node2.getLayout()[e]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[e]-a.node1.getLayout()[e]})}),L(r,function(n){var i=0,a=0;L(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),L(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function dit(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes,i=e.edges;if(n.length){var a=1/0,o=-1/0;L(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),L(n,function(s){var l=new xr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&L(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function vit(r){r.registerChartView(Ynt),r.registerSeriesModel(jnt),r.registerLayout(Xnt),r.registerVisual(dit),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var o5=function(){function r(){}return r.prototype.getInitialData=function(t,e){var n,i=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],v=d[c].get("type"),p=d[1-c].get("type"),g=t.data;if(g&&l){var m=[];L(g,function(b,S){var x;Q(b)?(x=b.slice(),b.unshift(S)):Q(b.value)?(x=K({},b),x.value=x.value.slice(),b.value.unshift(S)):x=b,m.push(x)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:f,type:ug(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:ug(p),dimsDef:y.slice()}];return ju(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:It(dL,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),s5=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(_e);ze(s5,o5,!0);var pit=s5,git=function(r){q(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,n,i){var a=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=l5(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(bi(f),u5(h,f,a,u)):f=l5(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(e){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(he),mit=function(){function r(){}return r}(),yit=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new mit},t.prototype.buildPath=function(e,n){var i=n.points,a=0;for(e.moveTo(i[a][0],i[a][1]),a++;a<4;a++)e.lineTo(i[a][0],i[a][1]);for(e.closePath();a<i.length;a++)e.moveTo(i[a][0],i[a][1]),a++,e.lineTo(i[a][0],i[a][1])},t}(Ft);function l5(r,t,e,n,i){var a=r.ends,o=new yit({shape:{points:i?_it(a,n,r):a}});return u5(r,o,t,e,i),o}function u5(r,t,e,n,i){var a=e.hostModel,o=kf[i?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},a,n),t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(n),l=s.getModel("emphasis");yr(t,s),Re(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function _it(r,t,e){return J(r,function(n){return n=n.slice(),n[t]=e.initBaseline,n})}var bit=git,zh=L;function xit(r){var t=Sit(r);zh(t,function(e){var n=e.seriesModels;!n.length||(wit(e),zh(n,function(i,a){Cit(i,e.boxOffsetList[a],e.boxWidthList[a])}))})}function Sit(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=Bt(e,i);a<0&&(a=e.length,e[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function wit(r){var t=r.axis,e=r.seriesModels,n=e.length,i=r.boxWidthList=[],a=r.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;zh(e,function(v){l=Math.max(l,v.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}zh(e,function(v){var p=v.get("boxWidth");Q(p)||(p=[p,p]),o.push([at(p[0],s)||0,at(p[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,d=h/2-c/2;zh(e,function(v,p){a.push(d),d+=f+h,i.push(Math.min(Math.max(h,o[p][0]),o[p][1]))})}function Cit(r,t,e){var n=r.coordinateSystem,i=r.getData(),a=e/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<i.count();f++){var h=i.get(u,f),d=_(h,c[2],f),v=_(h,c[0],f),p=_(h,c[1],f),g=_(h,c[3],f),m=_(h,c[4],f),y=[];b(y,p,!1),b(y,g,!0),y.push(v,p,m,g),S(y,v),S(y,m),S(y,d),i.setItemLayout(f,{initBaseline:d[s],ends:y})}function _(x,w,C){var T=i.get(w,C),D=[];D[o]=x,D[s]=T;var A;return isNaN(x)||isNaN(T)?A=[NaN,NaN]:(A=n.dataToPoint(D),A[o]+=t),A}function b(x,w,C){var T=w.slice(),D=w.slice();T[o]+=a,D[o]-=a,C?x.push(T,D):x.push(D,T)}function S(x,w){var C=w.slice(),T=w.slice();C[o]-=a,T[o]+=a,x.push(C,T)}}function Tit(r,t){t=t||{};for(var e=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<r.length;o++){var s=bn(r[o].slice()),l=Jv(s,.25),u=Jv(s,.5),c=Jv(s,.75),f=s[0],h=s[s.length-1],d=(i==null?1.5:i)*(c-l),v=a?f:Math.max(f,l-d),p=a?h:Math.min(h,c+d),g=t.itemNameFormatter,m=_t(g)?g({value:o}):ct(g)?g.replace("{value}",o+""):o+"";e.push([m,v,l,u,c,p]);for(var y=0;y<s.length;y++){var _=s[y];if(_<v||_>p){var b=[m,_];n.push(b)}}}return{boxData:e,outliers:n}}var Mit={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Pr){var n="";ie(n)}var i=Tit(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Dit(r){r.registerSeriesModel(pit),r.registerChartView(bit),r.registerLayout(xit),r.registerTransform(Mit)}var Ait=["color","borderColor"],Pit=function(r){q(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,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){bo(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&c5(u,f))return;var h=US(f,c,!0);Te(h,{shape:{points:f.ends}},e,c),YS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&c5(u,d)){a.remove(h);return}h?(Xt(h,{shape:{points:d.ends}},e,c),bi(h)):h=US(d),YS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),f5(e,this.group);var n=e.get("clip",!0)?Ag(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=i.getItemLayout(o),l=US(s);YS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){f5(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(he),Lit=function(){function r(){}return r}(),Iit=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new Lit},t.prototype.buildPath=function(e,n){var i=n.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t}(Ft);function US(r,t,e){var n=r.ends;return new Iit({shape:{points:e?Oit(n,r):n},z2:100})}function c5(r,t){for(var e=!0,n=0;n<t.ends.length;n++)if(r.contain(t.ends[n][0],t.ends[n][1])){e=!1;break}return e}function YS(r,t,e,n){var i=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,yr(r,i)}function Oit(r,t){return J(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var Eit=function(){function r(){}return r}(),qS=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new Eit},t.prototype.buildPath=function(e,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];e.moveTo(o,i[a++]),e.lineTo(o,i[a++])}else a+=3},t}(Ft);function f5(r,t,e,n){var i=r.getData(),a=i.getLayout("largePoints"),o=new qS({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new qS({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new qS({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),jS(1,o,r),jS(-1,s,r),jS(0,l,r),n&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function jS(r,t,e,n){var i=e.get(["itemStyle",r>0?"borderColor":"borderColor0"])||e.get(["itemStyle",r>0?"color":"color0"]);r===0&&(i=e.get(["itemStyle","borderColorDoji"]));var a=e.getModel("itemStyle").getItemStyle(Ait);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var Rit=Pit,h5=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,n,i){var a=n.getItemLayout(e);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(_e);ze(h5,o5,!0);var kit=h5;function Nit(r){!r||!Q(r.series)||L(r.series,function(t){xt(t)&&t.type==="k"&&(t.type="candlestick")})}var Bit=["itemStyle","borderColor"],zit=["itemStyle","borderColor0"],Fit=["itemStyle","borderColorDoji"],Vit=["itemStyle","color"],Hit=["itemStyle","color0"],$it={seriesType:"candlestick",plan:ku(),performRawSeries:!0,reset:function(r,t){function e(a,o){return o.get(a>0?Vit:Hit)}function n(a,o){return o.get(a===0?Fit:a>0?Bit:zit)}if(!t.isSeriesFiltered(r)){var i=r.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=e(u,l),c.stroke=n(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");K(f,c)}}}}}},Wit=$it,Git={seriesType:"candlestick",plan:ku(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),n=Uit(r,e),i=0,a=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[i])),l=J(e.mapDimensionsAll(o[a]),e.getDimensionIndex,e),u=l[0],c=l[1],f=l[2],h=l[3];if(e.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?v:d};function d(p,g){for(var m,y=g.getStore();(m=p.next())!=null;){var _=y.get(s,m),b=y.get(u,m),S=y.get(c,m),x=y.get(f,m),w=y.get(h,m),C=Math.min(b,S),T=Math.max(b,S),D=z(C,_),A=z(T,_),P=z(x,_),I=z(w,_),O=[];B(O,A,0),B(O,D,1),O.push(W(I),W(A),W(P),W(D));var E=g.getItemModel(m),R=!!E.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:d5(y,m,b,S,c,R),initBaseline:b>S?A[a]:D[a],ends:O,brushRect:Y(x,w,_)})}function z(et,V){var H=[];return H[i]=V,H[a]=et,isNaN(V)||isNaN(et)?[NaN,NaN]:t.dataToPoint(H)}function B(et,V,H){var G=V.slice(),j=V.slice();G[i]=Tp(G[i]+n/2,1,!1),j[i]=Tp(j[i]-n/2,1,!0),H?et.push(G,j):et.push(j,G)}function Y(et,V,H){var G=z(et,H),j=z(V,H);return G[i]-=n/2,j[i]-=n/2,{x:G[0],y:G[1],width:n,height:j[1]-G[1]}}function W(et){return et[i]=Tp(et[i],1),et}}function v(p,g){for(var m=Ji(p.count*4),y=0,_,b=[],S=[],x,w=g.getStore(),C=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var T=w.get(s,x),D=w.get(u,x),A=w.get(c,x),P=w.get(f,x),I=w.get(h,x);if(isNaN(T)||isNaN(P)||isNaN(I)){m[y++]=NaN,y+=3;continue}m[y++]=d5(w,x,D,A,c,C),b[i]=T,b[a]=P,_=t.dataToPoint(b,null,S),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,b[a]=I,_=t.dataToPoint(b,null,S),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function d5(r,t,e,n,i,a){var o;return e>n?o=-1:e<n?o=1:o=a?0:t>0?r.get(i,t-1)<=n?1:-1:1,o}function Uit(r,t){var e=r.getBaseAxis(),n,i=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=at(Et(r.get("barMaxWidth"),i),i),o=at(Et(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?at(s,i):Math.max(Math.min(i/2,a),o)}var Yit=Git;function qit(r){r.registerChartView(Rit),r.registerSeriesModel(kit),r.registerPreprocessor(Nit),r.registerVisual(Wit),r.registerLayout(Yit)}function v5(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var jit=function(r){q(t,r);function t(e,n){var i=r.call(this)||this,a=new gh(e,n),o=new Dt;return i.add(a),i.add(o),i.updateData(e,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var n=e.symbolType,i=e.color,a=e.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=$e(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),o.add(l)}v5(o,e)},t.prototype.updateEffectAnimation=function(e){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}v5(i,e)},t.prototype.highlight=function(){Aa(this)},t.prototype.downplay=function(){Pa(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,n){var i=this,a=e.hostModel;this.childAt(0).updateData(e,n);var o=this.childAt(1),s=e.getItemModel(n),l=e.getItemVisual(n,"symbol"),u=Qf(e.getItemVisual(n,"symbolSize")),c=e.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var d=zu(e.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var v=e.getItemVisual(n,"symbolRotate");o.rotation=(v||0)*Math.PI/180||0;var p={};p.showEffectOn=a.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=n/e.count(),p.z=a.getShallow("z")||0,p.zlevel=a.getShallow("zlevel")||0,p.symbolType=l,p.color=f,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&i.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=p,Re(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(Dt),Xit=jit,Zit=function(r){q(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._symbolDraw=new mh(Xit)},t.prototype.render=function(e,n,i){var a=e.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var n=e.coordinateSystem,i=n&&n.getArea&&n.getArea();return e.get("clip",!0)?i:null},t.prototype.updateTransform=function(e,n,i){var a=e.getData();this.group.dirty();var o=yh("").reset(e,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var n=e.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=XD(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(he),Kit=Zit,Qit=function(r){q(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,n){return Qi(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,n,i){return i.point(n.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(_e),Jit=Qit;function tat(r){r.registerChartView(Kit),r.registerSeriesModel(Jit),r.registerLayout(yh("effectScatter"))}var eat=function(r){q(t,r);function t(e,n,i){var a=r.call(this)||this;return a.add(a.createLine(e,n,i)),a._updateEffectSymbol(e,n),a}return t.prototype.createLine=function(e,n,i){return new bS(e,n,i)},t.prototype._updateEffectSymbol=function(e,n){var i=e.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");Q(o)||(o=[o,o]);var l=e.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=$e(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(e,a,n))},t.prototype._updateEffectAnimation=function(e,n,i){var a=this.childAt(1);if(!!a){var o=e.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Je(n.get("delay"),function(d){return d/e.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;_t(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,n,i,a,o){if(n>0){e.__t=0;var s=this,l=e.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(e)});a||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return _a(e.__p1,e.__cp1)+_a(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,n){e.__p1=n[0],e.__p2=n[1],e.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(e,n,i){this.childAt(0).updateData(e,n,i),this._updateEffectSymbol(e,n)},t.prototype._updateSymbolPosition=function(e){var n=e.__p1,i=e.__p2,a=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=lr,c=l_;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=e.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=e.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);e.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=_a(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):e.__lastT===1?e.scaleY=2*_a(n,s):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=s[0],e.y=s[1]},t.prototype.updateLayout=function(e,n){this.childAt(0).updateLayout(e,n);var i=e.getItemModel(n).getModel("effect");this._updateEffectAnimation(e,i,n)},t}(Dt),p5=eat,rat=function(r){q(t,r);function t(e,n,i){var a=r.call(this)||this;return a._createPolyline(e,n,i),a}return t.prototype._createPolyline=function(e,n,i){var a=e.getItemLayout(n),o=new Yr({shape:{points:a}});this.add(o),this._updateCommonStl(e,n,i)},t.prototype.updateData=function(e,n,i){var a=e.hostModel,o=this.childAt(0),s={shape:{points:e.getItemLayout(n)}};Xt(o,s,a,n),this._updateCommonStl(e,n,i)},t.prototype._updateCommonStl=function(e,n,i){var a=this.childAt(0),o=e.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||e.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}a.useStyle(e.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var h=a.ensureState("emphasis");h.style=s,Re(this,l,u,c)},t.prototype.updateLayout=function(e,n){var i=this.childAt(0);i.setShape("points",e.getItemLayout(n))},t}(Dt),g5=rat,nat=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,n,i){return new g5(e,n,i)},t.prototype._updateAnimationPoints=function(e,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=_a(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var n=e.__t<1?e.__t:2-e.__t,i=this._points,a=this._offsets,o=i.length;if(!!a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];e.x=f[0]*(1-c)+c*h[0],e.y=f[1]*(1-c)+c*h[1];var d=e.__t<1?h[0]-f[0]:f[0]-h[0],v=e.__t<1?h[1]-f[1]:f[1]-h[1];e.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,e.ignore=!1}},t}(p5),iat=nat,aat=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),oat=function(r){q(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aat},t.prototype.buildPath=function(e,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){e.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)e.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],f=i[o++],h=i[o++];if(e.moveTo(u,c),a>0){var d=(u+f)/2-(c-h)*a,v=(c+h)/2-(f-u)*a;e.quadraticCurveTo(d,v,f,h)}else e.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var f=a[u++],h=a[u++],d=1;d<c;d++){var v=a[u++],p=a[u++];if(vo(f,h,v,p,s,e,n))return l}l++}else for(var l=0,u=0;u<a.length;){var f=a[u++],h=a[u++],v=a[u++],p=a[u++];if(o>0){var g=(f+v)/2-(h-p)*o,m=(h+p)/2-(v-f)*o;if(_A(f,h,g,m,v,p,s,e,n))return l}else if(vo(f,h,v,p,s,e,n))return l;l++}return-1},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(e=i[0],n=i[1],a.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],f=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}e=this._rect=new kt(a,o,s,l)}return e},t}(Ft),sat=function(){function r(){this.group=new Dt}return r.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},r.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(t,e){var n=this._newAdded[0],i=e.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,e),l.__startIndex=t.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new oat({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},r.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=e.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=Lt(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),lat=sat,uat={seriesType:"lines",plan:ku(),reset:function(r){var t=r.coordinateSystem;if(!!t){var e=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(e){for(var u=0,c=i.start;c<i.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=i.start;c<i.end;c++){var d=r.getLineCoords(c,o);e&&(s[f++]=d);for(var v=0;v<d;v++)h=t.dataToPoint(o[v],!1,h),s[f++]=h[0],s[f++]=h[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var p=a.getItemModel(c),d=r.getLineCoords(c,o),g=[];if(e)for(var m=0;m<d;m++)g.push(t.dataToPoint(o[m]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var y=p.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}a.setItemLayout(c,g)}}}}}},m5=uat,cat=function(r){q(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,n,i){var a=e.getData(),o=this._updateLineDraw(a,e),s=e.get("zlevel"),l=e.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=e.get("clip",!0)&&Ag(e.coordinateSystem,!1,e);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,i){var a=e.getData(),o=this._updateLineDraw(a,e);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,i){this._lineDraw.incrementalUpdate(e,n.getData()),this._finished=e.end===n.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,n,i){var a=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=m5.reset(e,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(e,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new lat:new SS(o?a?iat:g5:a?p5:bS),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var n=e.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(e,n){this.remove(e,n)},t.type="lines",t}(he),fat=cat,hat=typeof Uint32Array=="undefined"?Array:Uint32Array,dat=typeof Float64Array=="undefined"?Array:Float64Array;function y5(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=J(t,function(e){var n=[e[0].coord,e[1].coord],i={coords:n};return e[0].name&&(i.fromName=e[0].name),e[1].name&&(i.toName=e[1].name),xv([i,e[0],e[1]])}))}var vat=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],y5(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(y5(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var n=this._processFlatCoordsArray(e.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=$c(this._flatCoords,n.flatCoords),this._flatCoordsOffset=$c(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),e.data=new Float32Array(n.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var n=this.getData().getItemModel(e),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[e*2],a=this._flatCoordsOffset[e*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(e),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(e){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),qt(e[0])){for(var i=e.length,a=new hat(i),o=new dat(i),s=0,l=0,u=0,c=0;c<i;){u++;var f=e[c++];a[l++]=s+n,a[l++]=f;for(var h=0;h<f;h++){var d=e[c++],v=e[c++];o[s++]=d,o[s++]=v}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,n){var i=new Or(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=a.getItemModel(e),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e==null?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e==null?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),n=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(_e),pat=vat;function tm(r){return r instanceof Array||(r=[r,r]),r}var gat={seriesType:"lines",reset:function(r){var t=tm(r.get("symbol")),e=tm(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",e&&e[0]),n.setVisual("toSymbolSize",e&&e[1]);function i(a,o){var s=a.getItemModel(o),l=tm(s.getShallow("symbol",!0)),u=tm(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}},mat=gat;function yat(r){r.registerChartView(fat),r.registerSeriesModel(pat),r.registerLayout(m5),r.registerVisual(mat)}var _at=256,bat=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=fi.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=t.length;f.width=e,f.height=n;for(var v=0;v<d;++v){var p=t[v],g=p[0],m=p[1],y=p[2],_=i(y);h.globalAlpha=_,h.drawImage(s,g-c,m-c)}if(!f.width||!f.height)return f;for(var b=h.getImageData(0,0,f.width,f.height),S=b.data,x=0,w=S.length,C=this.minOpacity,T=this.maxOpacity,D=T-C;x<w;){var _=S[x+3]/256,A=Math.floor(_*(_at-1))*4;if(_>0){var P=o(_)?l:u;_>0&&(_=_*D+C),S[x++]=P[A],S[x++]=P[A+1],S[x++]=P[A+2],S[x++]=P[A+3]*_*256}else x+=4}return h.putImageData(b,0,0),f},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=fi.createCanvas()),e=this.pointSize+this.blurSize,n=e*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},r.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r}(),xat=bat;function Sat(r,t,e){var n=r[1]-r[0];t=J(t,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&e[s]}}function wat(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(n){return n>=t[0]&&n<=t[1]}}function _5(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Cat=function(r){q(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,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):_5(o)&&this._renderOnGeo(o,e,a,i)},t.prototype.incrementalPrepareRender=function(e,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,n,i,a){var o=n.coordinateSystem;o&&(_5(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){bo(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,n,i,a,o){var s=e.coordinateSystem,l=ul(s,"cartesian2d"),u,c,f,h;if(l){var d=s.getAxis("x"),v=s.getAxis("y");u=d.getBandWidth()+.5,c=v.getBandWidth()+.5,f=d.scale.getExtent(),h=v.scale.getExtent()}for(var p=this.group,g=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),y=e.getModel(["blur","itemStyle"]).getItemStyle(),_=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),S=rr(e),x=e.getModel("emphasis"),w=x.get("focus"),C=x.get("blurScope"),T=x.get("disabled"),D=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=i;A<a;A++){var P=void 0,I=g.getItemVisual(A,"style");if(l){var O=g.get(D[0],A),E=g.get(D[1],A);if(isNaN(g.get(D[2],A))||isNaN(O)||isNaN(E)||O<f[0]||O>f[1]||E<h[0]||E>h[1])continue;var R=s.dataToPoint([O,E]);P=new Gt({shape:{x:R[0]-u/2,y:R[1]-c/2,width:u,height:c},style:I})}else{if(isNaN(g.get(D[1],A)))continue;P=new Gt({z2:1,shape:s.dataToRect([g.get(D[0],A)]).contentShape,style:I})}if(g.hasItemOption){var z=g.getItemModel(A),B=z.getModel("emphasis");m=B.getModel("itemStyle").getItemStyle(),y=z.getModel(["blur","itemStyle"]).getItemStyle(),_=z.getModel(["select","itemStyle"]).getItemStyle(),b=z.get(["itemStyle","borderRadius"]),w=B.get("focus"),C=B.get("blurScope"),T=B.get("disabled"),S=rr(z)}P.shape.r=b;var Y=e.getRawValue(A),W="-";Y&&Y[2]!=null&&(W=Y[2]+""),_r(P,S,{labelFetcher:e,labelDataIndex:A,defaultOpacity:I.opacity,defaultText:W}),P.ensureState("emphasis").style=m,P.ensureState("blur").style=y,P.ensureState("select").style=_,Re(P,w,C,T),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),p.add(P),g.setItemGraphicEl(A,P),this._progressiveEls&&this._progressiveEls.push(P)}},t.prototype._renderOnGeo=function(e,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new xat;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=e.getViewRect().clone(),f=e.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),v=Math.min(c.width+c.x,a.getWidth()),p=Math.min(c.height+c.y,a.getHeight()),g=v-h,m=p-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(w,C,T){var D=e.dataToPoint([w,C]);return D[0]-=h,D[1]-=d,D.push(T),D}),b=i.getExtent(),S=i.type==="visualMap.continuous"?wat(b,i.option.range):Sat(b,i.getPieceList(),i.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},S);var x=new ur({style:{width:g,height:m,x:h,y:d,image:u.canvas},silent:!0});this.group.add(x)},t.type="heatmap",t}(he),Tat=Cat,Mat=function(r){q(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,n){return Qi(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Ou.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(_e),Dat=Mat;function Aat(r){r.registerChartView(Tat),r.registerSeriesModel(Dat)}var Pat=["itemStyle","borderWidth"],b5=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],XS=new yi,Lat=function(r){q(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,n,i){var a=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:b5[+c],categoryDim:b5[1-+c]};return o.diff(s).add(function(d){if(!!o.hasValue(d)){var v=D5(o,d),p=x5(o,d,v,h),g=A5(o,h,p);o.setItemGraphicEl(d,g),a.add(g),I5(g,h,p)}}).update(function(d,v){var p=s.getItemGraphicEl(v);if(!o.hasValue(d)){a.remove(p);return}var g=D5(o,d),m=x5(o,d,g,h),y=L5(o,m);p&&y!==p.__pictorialShapeStr&&(a.remove(p),o.setItemGraphicEl(d,null),p=null),p?Bat(p,h,m):p=A5(o,h,m,!0),o.setItemGraphicEl(d,p),p.__pictorialSymbolMeta=m,a.add(p),I5(p,h,m)}).remove(function(d){var v=s.getItemGraphicEl(d);v&&P5(s,d,v.__pictorialSymbolMeta.animationModel,v)}).execute(),this._data=o,this.group},t.prototype.remove=function(e,n){var i=this.group,a=this._data;e.get("animation")?a&&a.eachItemGraphicEl(function(o){P5(a,Lt(o).dataIndex,e,o)}):i.removeAll()},t.type="pictorialBar",t}(he);function x5(r,t,e,n){var i=r.getItemLayout(t),a=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=e.get("symbolPatternSize")||2,f=e.isAnimationEnabled(),h={dataIndex:t,layout:i,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?e:null,hoverScale:f&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};Iat(e,a,i,n,h),Oat(r,t,i,a,o,h.boundingLength,h.pxSign,c,n,h),Eat(e,h.symbolScale,u,n,h);var d=h.symbolSize,v=zu(e.get("symbolOffset"),d);return Rat(e,d,i,a,o,v,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function Iat(r,t,e,n,i){var a=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[a.wh]<=0),c;if(Q(o)){var f=[ZS(s,o[0])-l,ZS(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=ZS(s,o)-l:t?c=n.coordSysExtent[a.index][u]-l:c=e[a.wh];i.boundingLength=c,t&&(i.repeatCutLength=e[a.wh]),i.pxSign=c>0?1:-1}function ZS(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function Oat(r,t,e,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(e[f.wh]),d=r.getItemVisual(t,"symbolSize"),v;Q(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[f.index]=at(v[f.index],h),v[c.index]=at(v[c.index],n?h:Math.abs(a)),u.symbolSize=v;var p=u.symbolScale=[v[0]/s,v[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function Eat(r,t,e,n,i){var a=r.get(Pat)||0;a&&(XS.attr({scaleX:t[0],scaleY:t[1],rotation:e}),XS.updateTransform(),a/=XS.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function Rat(r,t,e,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,v=f.pxSign,p=Math.max(t[d.index]+s,0),g=p;if(n){var m=Math.abs(l),y=Je(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var b=at(y,t[d.index]),S=Math.max(p+b*2,0),x=_?0:b*2,w=G_(n),C=w?n:O5((m+x)/S),T=m-C*p;b=T/2/(_?C:Math.max(C-1,1)),S=p+b*2,x=_?0:b*2,!w&&n!=="fixed"&&(C=u?O5((Math.abs(u)+x)/S):0),g=C*S-x,f.repeatTimes=C,f.symbolMargin=b}var D=v*(g/2),A=f.pathPosition=[];A[h.index]=e[h.wh]/2,A[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(A[0]+=a[0],A[1]+=a[1]);var P=f.bundlePosition=[];P[h.index]=e[h.xy],P[d.index]=e[d.xy];var I=f.barRectShape=K({},e);I[d.wh]=v*Math.max(Math.abs(e[d.wh]),Math.abs(A[d.index]+D)),I[h.wh]=e[h.wh];var O=f.clipShape={};O[h.xy]=-e[h.xy],O[h.wh]=c.ecSize[h.wh],O[d.xy]=0,O[d.wh]=e[d.wh]}function S5(r){var t=r.symbolPatternSize,e=$e(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function w5(r,t,e,n){var i=r.__pictorialBundle,a=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,f=a[t.valueDim.index]+o+e.symbolMargin*2;for(KS(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c<u?rc(p,null,v(c),e,n):rc(p,null,{scaleX:0,scaleY:0},e,n,function(){i.remove(p)}),c++});c<u;c++){var h=S5(e);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var d=v(c);rc(h,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},e,n)}function v(p){var g=s.slice(),m=e.pxSign,y=p;return(e.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-p),g[l.index]=f*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function C5(r,t,e,n){var i=r.__pictorialBundle,a=r.__pictorialMainPath;a?rc(a,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,n):(a=r.__pictorialMainPath=S5(e),i.add(a),rc(a,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,n))}function T5(r,t,e){var n=K({},t.barRectShape),i=r.__pictorialBarRect;i?rc(i,null,{shape:n},t,e):(i=r.__pictorialBarRect=new Gt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function M5(r,t,e,n){if(e.symbolClip){var i=r.__pictorialClipPath,a=K({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(i)Xt(i,{shape:a},s,l);else{a[o.wh]=0,i=new Gt({shape:a}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=e.clipShape[o.wh],kf[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function D5(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=kat,e.isAnimationEnabled=Nat,e}function kat(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Nat(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function A5(r,t,e,n){var i=new Dt,a=new Dt;return i.add(a),i.__pictorialBundle=a,a.x=e.bundlePosition[0],a.y=e.bundlePosition[1],e.symbolRepeat?w5(i,t,e):C5(i,t,e),T5(i,e,n),M5(i,t,e,n),i.__pictorialShapeStr=L5(r,e),i.__pictorialSymbolMeta=e,i}function Bat(r,t,e){var n=e.animationModel,i=e.dataIndex,a=r.__pictorialBundle;Xt(a,{x:e.bundlePosition[0],y:e.bundlePosition[1]},n,i),e.symbolRepeat?w5(r,t,e,!0):C5(r,t,e,!0),T5(r,e,!0),M5(r,t,e,!0)}function P5(r,t,e,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];KS(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),L(a,function(o){yo(o,{scaleX:0,scaleY:0},e,t,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(t,null)}function L5(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function KS(r,t,e){L(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&t.call(e,n)})}function rc(r,t,e,n,i,a){t&&r.attr(t),n.symbolClip&&!i?e&&r.attr(e):e&&kf[i?"updateProps":"initProps"](r,e,n.animationModel,n.dataIndex,a)}function I5(r,t,e){var n=e.dataIndex,i=e.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");KS(r,function(p){if(p instanceof ur){var g=p.style;p.useStyle(K({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var m=p.ensureState("emphasis");m.style=o,h&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var d=t.valueDim.posDesc[+(e.boundingLength>0)],v=r.__pictorialBarRect;_r(v,rr(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Yu(t.seriesModel.getData(),n),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:d}),Re(r,c,f,a.get("disabled"))}function O5(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var zat=Lat,Fat=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=xo(Pg.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Pg),Vat=Fat;function Hat(r){r.registerChartView(zat),r.registerSeriesModel(Vat),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,It(UO,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,YO("pictorialBar"))}var $at=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(g){return g.name}var d=new Ia(this._layersSeries||[],l,h,h),v=[];d.add(dt(p,this,"add")).update(dt(p,this,"update")).remove(dt(p,this,"remove")).execute();function p(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var b=[],S=[],x,w=l[m].indices,C=0;C<w.length;C++){var T=a.getItemLayout(w[C]),D=T.x,A=T.y0,P=T.y;b.push(D,A),S.push(D,A+P),x=a.getItemVisual(w[C],"style")}var I,O=a.getItemLayout(w[0]),E=e.getModel("label"),R=E.get("margin"),z=e.getModel("emphasis");if(g==="add"){var B=v[m]=new Dt;I=new sR({shape:{points:b,stackedOnPoints:S,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),B.add(I),s.add(B),e.isAnimationEnabled()&&I.setClipPath(Wat(I.getBoundingRect(),e,function(){I.removeClipPath()}))}else{var B=_[y];I=B.childAt(0),s.add(B),v[m]=B,Xt(I,{shape:{points:b,stackedOnPoints:S}},e),bi(I)}_r(I,rr(e),{labelDataIndex:w[C-1],defaultText:a.getName(w[C-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),I.setTextConfig({position:null,local:!0});var Y=I.getTextContent();Y&&(Y.x=O.x-R,Y.y=O.y0+O.y/2),I.useStyle(x),a.setItemGraphicEl(m,I),yr(I,e),Re(I,z.get("focus"),z.get("blurScope"),z.get("disabled"))}this._layersSeries=l,this._layers=v},t.type="themeRiver",t}(he);function Wat(r,t,e){var n=new Gt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Te(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},t,e),n}var Gat=$at,QS=2,Uat=function(r){q(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){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bh(dt(this.getData,this),dt(this.getRawData,this))},t.prototype.fixData=function(e){var n=e.length,i={},a=q_(e,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];a.buckets.each(function(h,d){o.push({name:d,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,e[n]=[f,0,u],n++)}return e},t.prototype.getInitialData=function(e,n){for(var i=this.getReferringComponents("singleAxis",Ye).models[0],a=i.get("type"),o=ae(e.data,function(v){return v[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=yt(),c=0,f=0;f<s.length;++f)l.push(s[f][QS]),u.get(s[f][QS])||(u.set(s[f][QS],c),c++);var h=$u(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:ug(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Or(h,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var e=this.getData(),n=e.count(),i=[],a=0;a<n;++a)i[a]=a;var o=e.mapDimension("single"),s=q_(i,function(u){return e.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return e.get(o,f)-e.get(o,h)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(e,n,i){Q(e)||(e=e?[e]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,d=o[c].indices.length,v=0;v<d;++v){var p=a.get(e[0],o[c].indices[v]),g=Math.abs(p-n);g<=f&&(u=p,f=g,h=o[c].indices[v])}s.push(h)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=a.getName(e),s=a.get(a.mapDimension("value"),e);return nr("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(_e),Yat=Uat;function qat(r,t){r.eachSeriesByType("themeRiver",function(e){var n=e.getData(),i=e.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=e.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=at(s[0],o.height),s[1]=at(s[1],o.height);var u=o.height-s[0]-s[1];E5(n,e,u)}else{s[0]=at(s[0],o.width),s[1]=at(s[1],o.width);var c=o.width-s[0]-s[1];E5(n,e,c)}n.setLayout("layoutInfo",a)})}function E5(r,t,e){if(!!r.count())for(var n=t.coordinateSystem,i=t.getLayerSeries(),a=r.mapDimension("single"),o=r.mapDimension("value"),s=J(i,function(g){return J(g.indices,function(m){var y=n.dataToPoint(r.get(a,m));return y[1]=r.get(o,m),y})}),l=jat(s),u=l.y0,c=e/l.max,f=i.length,h=i[0].indices.length,d,v=0;v<h;++v){d=u[v]*c,r.setItemLayout(i[0].indices[v],{layerIndex:0,x:s[0][v][0],y0:d,y:s[0][v][1]*c});for(var p=1;p<f;++p)d+=s[p-1][v][1]*c,r.setItemLayout(i[p].indices[v],{layerIndex:p,x:s[p][v][0],y0:d,y:s[p][v][1]*c})}}function jat(r){for(var t=r.length,e=r[0].length,n=[],i=[],a=0,o=0;o<e;++o){for(var s=0,l=0;l<t;++l)s+=r[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<e;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<e;++c){var f=n[c]+i[c];f>a&&(a=f)}return{y0:i,max:a}}function Xat(r){r.registerChartView(Gat),r.registerSeriesModel(Yat),r.registerLayout(qat),r.registerProcessor(_h("themeRiver"))}var Zat=2,Kat=4,Qat=function(r){q(t,r);function t(e,n,i,a){var o=r.call(this)||this;o.z2=Zat,o.textConfig={inside:!0},Lt(o).seriesIndex=n.seriesIndex;var s=new Ut({z2:Kat,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,n,i,a),o}return t.prototype.updateData=function(e,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Lt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=K({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=Vu(d,o));var v=qu(l.getModel("itemStyle"),f,!0);K(f,v),L(Wr,function(y){var _=s.ensureState(y),b=l.getModel([y,"itemStyle"]);_.style=b.getItemStyle();var S=qu(b,f);S&&(_.shape=S)}),e?(s.setShape(f),s.shape.r=c.r0,Xt(s,{shape:{r:c.r}},i,n.dataIndex)):(Xt(s,{shape:f},i),bi(s)),s.useStyle(h),this._updateLabel(i);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Re(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(v!=null&&Math.abs(s)<v);h.ignore=!p,L(Sf,function(m){var y=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),_=m==="normal",b=_?h:h.ensureState(m),S=e.getFormattedLabel(d,m);_&&(S=S||n.node.name),b.style=me(y,{},null,m!=="normal",!0),S&&(b.style.text=S);var x=y.get("show");x!=null&&!_&&(b.ignore=!x);var w=g(y,"position"),C=_?f:f.states[m],T=C.style.fill;C.textConfig={outsideFill:y.get("color")==="inherit"?T:null,inside:w!=="outside"};var D,A=g(y,"distance")||0,P=g(y,"align");w==="outside"?(D=o.r+A,P=l>Math.PI/2?"right":"left"):!P||P==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,P="center"):P==="left"?(D=o.r0+A,l>Math.PI/2&&(P="right")):P==="right"&&(D=o.r-A,l>Math.PI/2&&(P="left")),b.style.align=P,b.style.verticalAlign=g(y,"verticalAlign")||"middle",b.x=D*u+o.cx,b.y=D*c+o.cy;var I=g(y,"rotate"),O=0;I==="radial"?(O=-l,O<-Math.PI/2&&(O+=Math.PI)):I==="tangential"?(O=Math.PI/2-l,O>Math.PI/2?O-=Math.PI:O<-Math.PI/2&&(O+=Math.PI)):qt(I)&&(O=I*Math.PI/180),b.rotation=O});function g(m,y){var _=m.get(y);return _==null?a.get(y):_}h.dirtyStyle()},t}(Gr),R5=Qat,JS="sunburstRootToNode",k5="sunburstHighlight",Jat="sunburstUnhighlight";function tot(r){r.registerAction({type:JS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=Dh(t,[JS],i);if(o){var s=i.getViewRoot();s&&(t.direction=tS(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:k5,update:"none"},function(t,e,n){t=K({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=Dh(t,[k5],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(K(t,{type:"highlight"}))}),r.registerAction({type:Jat,update:"updateView"},function(t,e,n){t=K({},t),n.dispatchAction(K(t,{type:"downplay"}))})}var eot=function(r){q(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,n,i,a){var o=this;this.seriesModel=e,this.api=i,this.ecModel=n;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),c=this.group,f=e.get("renderLabelForZeroData"),h=[];u.eachNode(function(y){h.push(y)});var d=this._oldChildren||[];v(h,d),m(l,u),this._initEvents(),this._oldChildren=h;function v(y,_){if(y.length===0&&_.length===0)return;new Ia(_,y,b,b).add(S).update(S).remove(It(S,null)).execute();function b(x){return x.getId()}function S(x,w){var C=x==null?null:y[x],T=w==null?null:_[w];p(C,T)}}function p(y,_){if(!f&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,e,n,i),s.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var b=new R5(y,e,n,i);c.add(b),s.setItemGraphicEl(y.dataIndex,b)}}}function g(y){!y||y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,e,n,i):(o.virtualPiece=new R5(y,e,n,i),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=e.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Np(u,c)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:JS,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(he),rot=eot,not=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,n){var i={name:e.name,children:e.data};N5(i);var a=this._levelModels=J(e.levels||[],function(l){return new fe(l,this,n)},this),o=Jx.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=$g(i,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){qk(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(_e);function N5(r){var t=0;L(r.children,function(n){N5(n);var i=n.value;Q(i)&&(i=i[0]),t+=i});var e=r.value;Q(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Q(r.value)?r.value[0]=e:r.value=e}var iot=not,B5=Math.PI/180;function aot(r,t,e){t.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");Q(a)||(a=[0,a]),Q(i)||(i=[i,i]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=at(i[0],o),c=at(i[1],s),f=at(a[0],l/2),h=at(a[1],l/2),d=-n.get("startAngle")*B5,v=n.get("minAngle")*B5,p=n.getData().tree.root,g=n.getViewRoot(),m=g.depth,y=n.get("sort");y!=null&&z5(g,y);var _=0;L(g.children,function(R){!isNaN(R.getValue())&&_++});var b=g.getValue(),S=Math.PI/(b||_)*2,x=g.depth>0,w=g.height-(x?-1:1),C=(h-f)/(w||1),T=n.get("clockwise"),D=n.get("stillShowZeroSum"),A=T?1:-1,P=function(R,z){if(!!R){var B=z;if(R!==p){var Y=R.getValue(),W=b===0&&D?S:Y*S;W<v&&(W=v),B=z+A*W;var et=R.depth-m-(x?-1:1),V=f+C*et,H=f+C*(et+1),G=n.getLevelModel(R);if(G){var j=G.get("r0",!0),tt=G.get("r",!0),nt=G.get("radius",!0);nt!=null&&(j=nt[0],tt=nt[1]),j!=null&&(V=at(j,l/2)),tt!=null&&(H=at(tt,l/2))}R.setLayout({angle:W,startAngle:z,endAngle:B,clockwise:T,cx:u,cy:c,r0:V,r:H})}if(R.children&&R.children.length){var rt=0;L(R.children,function(vt){rt+=P(vt,z+rt)})}return B-z}};if(x){var I=f,O=f+C,E=Math.PI*2;p.setLayout({angle:E,startAngle:d,endAngle:d+E,clockwise:T,cx:u,cy:c,r0:I,r:O})}P(g,d)})}function z5(r,t){var e=r.children||[];r.children=oot(e,t),e.length&&L(r.children,function(n){z5(n,t)})}function oot(r,t){if(_t(t)){var e=J(r,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return e.sort(function(i,a){return t(i.params,a.params)}),J(e,function(i){return r[i.index]})}else{var n=t==="asc";return r.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function sot(r){var t={};function e(n,i,a){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&ct(s)&&(s=zv(s,(n.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");K(u,l)})})}function lot(r){r.registerChartView(rot),r.registerSeriesModel(iot),r.registerLayout(It(aot,"sunburst")),r.registerProcessor(It(_h,"sunburst")),r.registerVisual(sot),tot(r)}var F5={color:"fill",borderColor:"stroke"},uot={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ba=jt(),cot=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,n){return Qi(null,this)},t.prototype.getDataParams=function(e,n,i){var a=r.prototype.getDataParams.call(this,e,n);return i&&(a.info=Ba(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(_e),fot=cot;function hot(r,t){return t=t||[0,0],J(["x","y"],function(e,n){var i=this.getAxis(e),a=t[n],o=r[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function dot(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:dt(hot,r)}}}function vot(r,t){return t=t||[0,0],J([0,1],function(e){var n=t[e],i=r[e]/2,a=[],o=[];return a[e]=n-i,o[e]=n+i,a[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(a)[e]-this.dataToPoint(o)[e])},this)}function pot(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:dt(vot,r)}}}function got(r,t){var e=this.getAxis(),n=t instanceof Array?t[0]:t,i=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(n-i)-e.dataToCoord(n+i))}function mot(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:dt(got,r)}}}function yot(r,t){return t=t||[0,0],J(["Radius","Angle"],function(e,n){var i="get"+e+"Axis",a=this[i](),o=t[n],s=r[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function _ot(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=e.dataToAngle(i[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:dt(yot,r)}}}function bot(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(n,i){return r.dataToPoint(n,i)}}}}function V5(r,t,e,n){return r&&(r.legacy||r.legacy!==!1&&!e&&!n&&t!=="tspan"&&(t==="text"||pt(r,"text")))}function H5(r,t,e){var n=r,i,a,o;if(t==="text")o=n;else{o={},pt(n,"text")&&(o.text=n.text),pt(n,"rich")&&(o.rich=n.rich),pt(n,"textFill")&&(o.fill=n.textFill),pt(n,"textStroke")&&(o.stroke=n.textStroke),pt(n,"fontFamily")&&(o.fontFamily=n.fontFamily),pt(n,"fontSize")&&(o.fontSize=n.fontSize),pt(n,"fontStyle")&&(o.fontStyle=n.fontStyle),pt(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=pt(n,"textPosition");e?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),pt(n,"textPosition")&&(i.position=n.textPosition),pt(n,"textOffset")&&(i.offset=n.textOffset),pt(n,"textRotation")&&(i.rotation=n.textRotation),pt(n,"textDistance")&&(i.distance=n.textDistance)}return $5(o,r),L(o.rich,function(l){$5(l,l)}),{textConfig:i,textContent:a}}function $5(r,t){!t||(t.font=t.textFont||t.font,pt(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),pt(t,"textAlign")&&(r.align=t.textAlign),pt(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),pt(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),pt(t,"textWidth")&&(r.width=t.textWidth),pt(t,"textHeight")&&(r.height=t.textHeight),pt(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),pt(t,"textPadding")&&(r.padding=t.textPadding),pt(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),pt(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),pt(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),pt(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),pt(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),pt(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),pt(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function W5(r,t,e){var n=r;n.textPosition=n.textPosition||e.position||"inside",e.offset!=null&&(n.textOffset=e.offset),e.rotation!=null&&(n.textRotation=e.rotation),e.distance!=null&&(n.textDistance=e.distance);var i=n.textPosition.indexOf("inside")>=0,a=r.fill||"#000";G5(n,t);var o=n.textFill==null;return i?o&&(n.textFill=e.insideFill||"#fff",!n.textStroke&&e.insideStroke&&(n.textStroke=e.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||e.outsideFill||"#000"),!n.textStroke&&e.outsideStroke&&(n.textStroke=e.outsideStroke)),n.text=t.text,n.rich=t.rich,L(t.rich,function(s){G5(s,s)}),n}function G5(r,t){!t||(pt(t,"fill")&&(r.textFill=t.fill),pt(t,"stroke")&&(r.textStroke=t.fill),pt(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),pt(t,"font")&&(r.font=t.font),pt(t,"fontStyle")&&(r.fontStyle=t.fontStyle),pt(t,"fontWeight")&&(r.fontWeight=t.fontWeight),pt(t,"fontSize")&&(r.fontSize=t.fontSize),pt(t,"fontFamily")&&(r.fontFamily=t.fontFamily),pt(t,"align")&&(r.textAlign=t.align),pt(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),pt(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),pt(t,"width")&&(r.textWidth=t.width),pt(t,"height")&&(r.textHeight=t.height),pt(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),pt(t,"padding")&&(r.textPadding=t.padding),pt(t,"borderColor")&&(r.textBorderColor=t.borderColor),pt(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),pt(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),pt(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),pt(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),pt(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),pt(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),pt(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),pt(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),pt(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),pt(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var U5={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Y5=Ht(U5);In($i,function(r,t){return r[t]=1,r},{}),$i.join(", ");var em=["","style","shape","extra"],nc=jt();function tw(r,t,e,n,i){var a=r+"Animation",o=_u(r,n,i)||{},s=nc(t).userDuring;return o.duration>0&&(o.during=s?dt(Tot,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),K(o,e[a]),o}function rm(r,t,e,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=e.isAnimationEnabled(),l=nc(r),u=t.style;l.userDuring=t.during;var c={},f={};if(Dot(r,t,f),X5("shape",t,f),X5("extra",t,f),!a&&s&&(Mot(r,t,c),j5("shape",r,t,c),j5("extra",r,t,c),Aot(r,t,u,c)),f.style=u,xot(r,f,o),wot(r,t),s)if(a){var h={};L(em,function(v){var p=v?t[v]:t;p&&p.enterFrom&&(v&&(h[v]=h[v]||{}),K(v?h[v]:h,p.enterFrom))});var d=tw("enter",r,t,e,i);d.duration>0&&r.animateFrom(h,d)}else Sot(r,t,i||0,e,c);q5(r,t),u?r.dirty():r.markRedraw()}function q5(r,t){for(var e=nc(r).leaveToProps,n=0;n<em.length;n++){var i=em[n],a=i?t[i]:t;a&&a.leaveTo&&(e||(e=nc(r).leaveToProps={}),i&&(e[i]=e[i]||{}),K(i?e[i]:e,a.leaveTo))}}function nm(r,t,e,n){if(r){var i=r.parent,a=nc(r).leaveToProps;if(a){var o=tw("update",r,t,e,0);o.done=function(){i.remove(r),n&&n()},r.animateTo(a,o)}else i.remove(r),n&&n()}}function bl(r){return r==="all"}function xot(r,t,e){var n=t.style;if(!r.isGroup&&n){if(e){r.useStyle({});for(var i=r.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}t&&(t.style=null,t&&r.attr(t),t.style=n)}function Sot(r,t,e,n,i){if(i){var a=tw("update",r,t,n,e);a.duration>0&&r.animateFrom(i,a)}}function wot(r,t){pt(t,"silent")&&(r.silent=t.silent),pt(t,"ignore")&&(r.ignore=t.ignore),r instanceof Bn&&pt(t,"invisible")&&(r.invisible=t.invisible),r instanceof Ft&&pt(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var na={},Cot={setTransform:function(r,t){return na.el[r]=t,this},getTransform:function(r){return na.el[r]},setShape:function(r,t){var e=na.el,n=e.shape||(e.shape={});return n[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=na.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=na.el,n=e.style;return n&&(n[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=na.el.style;if(t)return t[r]},setExtra:function(r,t){var e=na.el.extra||(na.el.extra={});return e[r]=t,this},getExtra:function(r){var t=na.el.extra;if(t)return t[r]}};function Tot(){var r=this,t=r.el;if(!!t){var e=nc(t).userDuring,n=r.userDuring;if(e!==n){r.el=r.userDuring=null;return}na.el=t,n(Cot)}}function j5(r,t,e,n){var i=e[r];if(!!i){var a=t[r],o;if(a){var s=e.transition,l=i.transition;if(l)if(!o&&(o=n[r]={}),bl(l))K(o,a);else for(var u=ce(l),c=0;c<u.length;c++){var f=u[c],h=a[f];o[f]=h}else if(bl(s)||Bt(s,r)>=0){!o&&(o=n[r]={});for(var d=Ht(a),c=0;c<d.length;c++){var f=d[c],h=a[f];Pot(i[f],h)&&(o[f]=h)}}}}}function X5(r,t,e){var n=t[r];if(!!n)for(var i=e[r]={},a=Ht(n),o=0;o<a.length;o++){var s=a[o];i[s]=lf(n[s])}}function Mot(r,t,e){for(var n=t.transition,i=bl(n)?$i:ce(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];e[o]=s}}}function Dot(r,t,e){for(var n=0;n<Y5.length;n++){var i=Y5[n],a=U5[i],o=t[i];o&&(e[a[0]]=o[0],e[a[1]]=o[1])}for(var n=0;n<$i.length;n++){var s=$i[n];t[s]!=null&&(e[s]=t[s])}}function Aot(r,t,e,n){if(!!e){var i=r.style,a;if(i){var o=e.transition,s=t.transition;if(o&&!bl(o)){var l=ce(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=i[c];a[c]=f}}else if(r.getAnimationStyleProps&&(bl(s)||bl(o)||Bt(s,"style")>=0)){var h=r.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var v=Ht(e),u=0;u<v.length;u++){var c=v[u];if(d[c]){var f=i[c];a[c]=f}}}}}}}function Pot(r,t){return mr(r)?r!==t:r!=null&&isFinite(r)}var Z5=jt(),Lot=["percent","easing","shape","style","extra"];function K5(r){r.stopAnimation("keyframe"),r.attr(Z5(r))}function im(r,t,e){if(!(!e.isAnimationEnabled()||!t)){if(Q(t)){L(t,function(s){im(r,s,e)});return}var n=t.keyframes,i=t.duration;if(e&&i==null){var a=_u("enter",e,0);i=a&&a.duration}if(!(!n||!i)){var o=Z5(r);L(em,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),L(n,function(u){var c=r.animators,f=s?u[s]:u;if(!!f){var h=Ht(f);if(s||(h=ae(h,function(p){return Bt(Lot,p)<0})),!!h.length){l||(l=r.animate(s,t.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(h);s&&(o[s]=o[s]||{});var v=s?o[s]:o;L(h,function(p){v[p]=((s?r[s]:r)||{})[p]}),l.whenWithKeys(i*u.percent,f,h,u.easing)}}}),l&&l.delay(t.delay||0).duration(i).start(t.easing)}})}}}var za="emphasis",No="normal",ew="blur",rw="select",Bo=[No,za,ew,rw],nw={normal:["itemStyle"],emphasis:[za,"itemStyle"],blur:[ew,"itemStyle"],select:[rw,"itemStyle"]},iw={normal:["label"],emphasis:[za,"label"],blur:[ew,"label"],select:[rw,"label"]},Iot=["x","y"],Oot="e\0\0",Xn={normal:{},emphasis:{},blur:{},select:{}},Eot={cartesian2d:dot,geo:pot,single:mot,polar:_ot,calendar:bot};function aw(r){return r instanceof Ft}function ow(r){return r instanceof Bn}function Rot(r,t){t.copyTransform(r),ow(t)&&ow(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,aw(t)&&aw(r)&&t.setShape(r.shape))}var kot=function(r){q(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,n,i,a){this._progressiveEls=null;var o=this._data,s=e.getData(),l=this.group,u=J5(e,s,n,i);o||l.removeAll(),s.diff(o).add(function(f){uw(i,null,f,u(f,a),e,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&nm(h,Ba(h).option,e)}).update(function(f,h){var d=o.getItemGraphicEl(h);uw(i,d,f,u(f,a),e,l,s)}).execute();var c=e.get("clip",!0)?Ag(e.coordinateSystem,!1,e):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,n,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,n,i,a,o){var s=n.getData(),l=J5(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var f=e.start;f<e.end;f++){var h=uw(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},t.prototype.eachRendered=function(e){bo(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(he),Not=kot;function sw(r){var t=r.type,e;if(t==="path"){var n=r.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=iB(n);e=Of(a,null,i,n.layout||"center"),Ba(e).customPathData=a}else if(t==="image")e=new ur({}),Ba(e).customImagePath=r.style.image;else if(t==="text")e=new Ut({});else if(t==="group")e=new Dt;else{if(t==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Cp(t);if(!o){var s="";ie(s)}e=new o}return Ba(e).customGraphicType=t,e.name=r.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function lw(r,t,e,n,i,a,o){K5(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),n&&n.transition==null&&(n.transition=Iot);var l=n&&n.style;if(l){if(t.type==="text"){var u=l;pt(u,"textFill")&&(u.fill=u.textFill),pt(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=aw(t)?l.decal:null;r&&f&&(f.dirty=!0,c=Vu(f,r)),l.__decalPattern=c}if(ow(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}rm(t,n,a,{dataIndex:e,isInit:o,clearStyle:!0}),im(t,n.keyframeAnimation,a)}function Q5(r,t,e,n,i){var a=t.isGroup?null:t,o=i&&i[r].cfg;if(a){var s=a.ensureState(r);if(n===!1){var l=a.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Bs(a)}}function Bot(r,t,e){if(!r.isGroup){var n=r,i=e.currentZ,a=e.currentZLevel;n.z=i,n.zlevel=a;var o=t.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Bo.length;s++)zot(n,t,Bo[s])}}function zot(r,t,e){var n=e===No,i=n?t:am(t,e),a=i?i.z2:null,o;a!=null&&(o=n?r:r.ensureState(e),o.z2=a||0)}function J5(r,t,e,n){var i=r.get("renderItem"),a=r.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms(a):Eot[a.type](a));for(var s=bt({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:b,style:x,ordinalRawValue:S,styleEmphasis:w,visual:D,barLayout:A,currentSeriesIndices:P,font:I},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:Fot(r.getData())},u,c,f={},h={},d={},v={},p=0;p<Bo.length;p++){var g=Bo[p];d[g]=r.getModel(nw[g]),v[g]=r.getModel(iw[g])}function m(O){return O===u?c||(c=t.getItemModel(O)):t.getItemModel(O)}function y(O,E){return t.hasItemOption?O===u?f[E]||(f[E]=m(O).getModel(nw[E])):m(O).getModel(nw[E]):d[E]}function _(O,E){return t.hasItemOption?O===u?h[E]||(h[E]=m(O).getModel(iw[E])):m(O).getModel(iw[E]):v[E]}return function(O,E){return u=O,c=null,f={},h={},i&&i(bt({dataIndexInside:O,dataIndex:t.getRawIndex(O),actionType:E?E.type:null},l),s)};function b(O,E){return E==null&&(E=u),t.getStore().get(t.getDimensionIndex(O||0),E)}function S(O,E){E==null&&(E=u),O=O||0;var R=t.getDimensionInfo(O);if(!R){var z=t.getDimensionIndex(O);return z>=0?t.getStore().get(z,E):void 0}var B=t.get(R.name,E),Y=R&&R.ordinalMeta;return Y?Y.categories[B]:B}function x(O,E){E==null&&(E=u);var R=t.getItemVisual(E,"style"),z=R&&R.fill,B=R&&R.opacity,Y=y(E,No).getItemStyle();z!=null&&(Y.fill=z),B!=null&&(Y.opacity=B);var W={inheritColor:ct(z)?z:"#000"},et=_(E,No),V=me(et,null,W,!1,!0);V.text=et.getShallow("show")?Et(r.getFormattedLabel(E,No),Yu(t,E)):null;var H=Ap(et,W,!1);return T(O,Y),Y=W5(Y,V,H),O&&C(Y,O),Y.legacy=!0,Y}function w(O,E){E==null&&(E=u);var R=y(E,za).getItemStyle(),z=_(E,za),B=me(z,null,null,!0,!0);B.text=z.getShallow("show")?zi(r.getFormattedLabel(E,za),r.getFormattedLabel(E,No),Yu(t,E)):null;var Y=Ap(z,null,!0);return T(O,R),R=W5(R,B,Y),O&&C(R,O),R.legacy=!0,R}function C(O,E){for(var R in E)pt(E,R)&&(O[R]=E[R])}function T(O,E){O&&(O.textFill&&(E.textFill=O.textFill),O.textPosition&&(E.textPosition=O.textPosition))}function D(O,E){if(E==null&&(E=u),pt(F5,O)){var R=t.getItemVisual(E,"style");return R?R[F5[O]]:null}if(pt(uot,O))return t.getItemVisual(E,O)}function A(O){if(a.type==="cartesian2d"){var E=a.getBaseAxis();return TX(bt({axis:E},O))}}function P(){return e.getCurrentSeriesIndices()}function I(O){return $P(O,e)}}function Fot(r){var t={};return L(r.dimensions,function(e){var n=r.getDimensionInfo(e);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=r.getDimensionIndex(e)}}),t}function uw(r,t,e,n,i,a,o){if(!n){a.remove(t);return}var s=cw(r,t,e,n,i,a);return s&&o.setItemGraphicEl(e,s),s&&Re(s,n.focus,n.blurScope,n.emphasisDisabled),s}function cw(r,t,e,n,i,a){var o=-1,s=t;t&&tB(t,n,i)&&(o=Bt(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=sw(n),s&&Rot(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Xn.normal.cfg=Xn.normal.conOpt=Xn.emphasis.cfg=Xn.emphasis.conOpt=Xn.blur.cfg=Xn.blur.conOpt=Xn.select.cfg=Xn.select.conOpt=null,Xn.isLegacy=!1,Hot(u,e,n,i,l,Xn),Vot(u,e,n,i,l),lw(r,u,e,n,Xn,i,l),pt(n,"info")&&(Ba(u).info=n.info);for(var c=0;c<Bo.length;c++){var f=Bo[c];if(f!==No){var h=am(n,f),d=fw(n,h,f);Q5(f,u,h,d,Xn)}}return Bot(u,n,i),n.type==="group"&&$ot(r,u,e,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function tB(r,t,e){var n=Ba(r),i=t.type,a=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Yot(a)&&iB(a)!==n.customPathData||i==="image"&&pt(o,"image")&&o.image!==n.customImagePath}function Vot(r,t,e,n,i){var a=e.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&tB(o,a,n)&&(o=null),o||(o=sw(a),r.setClipPath(o)),lw(null,o,t,a,null,n,i)}}function Hot(r,t,e,n,i,a){if(!r.isGroup){eB(e,null,a),eB(e,za,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=sw(o),r.setTextContent(c)),lw(null,c,t,o,null,n,i);for(var f=o&&o.style,h=0;h<Bo.length;h++){var d=Bo[h];if(d!==No){var v=a[d].conOpt;Q5(d,c,v,fw(o,v,d),null)}}f?c.dirty():c.markRedraw()}}}}function eB(r,t,e){var n=t?am(r,t):r,i=t?fw(r,n,za):r.style,a=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?t?am(s,t):s:null;if(i&&(e.isLegacy||V5(i,a,!!o,!!l))){e.isLegacy=!0;var u=H5(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var f=t?e[t]:e.normal;f.cfg=o,f.conOpt=l}function am(r,t){return t?r?r[t]:null:r}function fw(r,t,e){var n=t&&t.style;return n==null&&e===za&&r&&(n=r.styleEmphasis),n}function $ot(r,t,e,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Got({api:r,oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var f=a[c],h=t.childAt(c);f?(f.ignore==null&&(f.ignore=!1),cw(r,h,e,f,i,t)):h.ignore=!0}for(var d=t.childCount()-1;d>=c;d--){var v=t.childAt(d);Wot(t,v,i)}}}function Wot(r,t,e){t&&nm(t,Ba(r).option,e)}function Got(r){new Ia(r.oldChildren,r.newChildren,rB,rB,r).add(nB).update(nB).remove(Uot).execute()}function rB(r,t){var e=r&&r.name;return e!=null?e:Oot+t}function nB(r,t){var e=this.context,n=r!=null?e.newChildren[r]:null,i=t!=null?e.oldChildren[t]:null;cw(e.api,i,e.dataIndex,n,e.seriesModel,e.group)}function Uot(r){var t=this.context,e=t.oldChildren[r];e&&nm(e,Ba(e).option,t.seriesModel)}function iB(r){return r&&(r.pathData||r.d)}function Yot(r){return r&&(pt(r,"pathData")||pt(r,"d"))}function qot(r){r.registerChartView(Not),r.registerSeriesModel(fot)}var xl=jt(),aB=Tt,hw=dt,jot=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!i&&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,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Dt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var h=It(oB,e,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}uB(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 n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Bx(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=xl(t).pointerEl=new kf[a.type](aB(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=xl(t).labelEl=new Ut(aB(e.label));t.add(a),lB(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=xl(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=xl(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),lB(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Su(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Sa(u.event)},onmousedown:hw(this._onHandleDragMove,this,0,0),drift:hw(this._onHandleDragMove,this),ondragend:hw(this._onHandleDragEnd,this)}),n.add(i)),uB(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Q(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Nu(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){oB(this._axisPointerModel,!e&&this._moveAnimation,this._handle,dw(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(!!n){this._dragging=!0;var i=this.updateHandleTransform(dw(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(dw(i)),xl(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(!!t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.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(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),jf(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r}();function oB(r,t,e,n){sB(xl(e).lastProp,n)||(xl(e).lastProp=n,t?Xt(e,n,r):(e.stopAnimation(),e.attr(n)))}function sB(r,t){if(xt(r)&&xt(t)){var e=!0;return L(t,function(n,i){e=e&&sB(r[i],n)}),!!e}else return r===t}function lB(r,t){r[t.get(["label","show"])?"show":"hide"]()}function dw(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function uB(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}var vw=jot;function pw(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function cB(r,t,e,n,i){var a=e.get("value"),o=fB(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ws(s.get("padding")||0),u=s.getFont(),c=ff(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=h),v==="center"&&(f[0]-=h/2);var p=i.verticalAlign;p==="bottom"&&(f[1]-=d),p==="middle"&&(f[1]-=d/2),Xot(f,h,d,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:me(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Xot(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-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 fB(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:nx(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ct(o)?a=o.replace("{value}",a):_t(o)&&(a=o(s))}return a}function gw(r,t,e){var n=mn();return ao(n,n,e.rotation),hi(n,n,e.position),xi([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function hB(r,t,e,n,i,a){var o=Ra.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),cB(t,n,i,a,{position:gw(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function mw(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function dB(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function vB(r,t,e,n,i,a){return{cx:r,cy:t,r0:e,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Zot=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=pB(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=pw(a),d=Kot[u](s,f,c);d.style=h,e.graphicKey=d.type,e.pointer=d}var v=Ex(l.model,i);hB(n,e,v,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=Ex(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=gw(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=pB(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:d,tooltipOption:v[c]}},t}(vw);function pB(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var Kot={line:function(r,t,e){var n=mw([t,e[0]],[t,e[1]],gB(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:dB([t-n/2,e[0]],[n,i],gB(r))}}};function gB(r){return r.dim==="x"?0:1}var Qot=Zot,Jot=function(r){q(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,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(Wt),tst=Jot,Fa=jt(),est=L;function mB(r,t,e){if(!Yt.node){var n=t.getZr();Fa(n).records||(Fa(n).records={}),rst(n,t);var i=Fa(n).records[r]||(Fa(n).records[r]={});i.handler=e}}function rst(r,t){if(Fa(r).initialized)return;Fa(r).initialized=!0,e("click",It(yB,"click")),e("mousemove",It(yB,"mousemove")),e("globalout",ist);function e(n,i){r.on(n,function(a){var o=ast(t);est(Fa(r).records,function(s){s&&i(s,a,o.dispatchAction)}),nst(o.pendings,t)})}}function nst(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function ist(r,t,e){r.handler("leave",null,e)}function yB(r,t,e,n){t.handler(r,e,n)}function ast(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function yw(r,t){if(!Yt.node){var e=t.getZr(),n=(Fa(e).records||{})[r];n&&(Fa(e).records[r]=null)}}var ost=function(r){q(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,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";mB("axisPointer",i,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,n){yw("axisPointer",n)},t.prototype.dispose=function(e,n){yw("axisPointer",n)},t.type="axisPointer",t}(Me),sst=ost;function _B(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Ts(a,r);if(o==null||o<0||Q(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,v=a.mapDimension(h),p=[];p[d]=a.get(v,o),p[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(J(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var bB=jt();function lst(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||dt(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){om(i)&&(i=_B({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=om(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||om(i),h={},d={},v={list:[],map:{}},p={showPointer:It(cst,d),showTooltip:It(fst,v)};L(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);L(s.coordSysAxesInfo[y],function(b,S){var x=b.axis,w=pst(u,b);if(!f&&_&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=x.pointToData(i)),C!=null&&xB(b,C,p,!1,h)}})});var g={};return L(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&L(_.axesInfo,function(b,S){var x=d[S];if(b!==m&&x){var w=x.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,SB(b),SB(m)))),g[m.key]=w}})}),L(g,function(m,y){xB(c[y],m,p,!0,h)}),hst(d,c,h),dst(v,i,r,o),vst(c,o,e),h}}function xB(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=ust(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&K(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function ust(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,e);h=d.dataIndices,f=d.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,e.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var v=r-f,p=Math.abs(v);p<=o&&((p<o||v>=0&&s<0)&&(o=p,s=v,i=f,a.length=0),L(h,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function cst(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function fst(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=xh(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:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function hst(r,t,e){var n=e.axesInfo=[];L(t,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function dst(r,t,e,n){if(om(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function vst(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=bB(n)[i]||{},o=bB(n)[i]={};L(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&L(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];L(a,function(u,c){!o[c]&&l.push(u)}),L(o,function(u,c){!a[c]&&s.push(u)}),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 pst(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function SB(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function om(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Fh(r){fl.registerAxisPointerClass("CartesianAxisPointer",Qot),r.registerComponentModel(tst),r.registerComponentView(sst),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Q(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=tJ(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lst)}function gst(r){zt(tk),zt(Fh)}var mst=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=pw(a),v=_st[h](s,l,f,c);v.style=d,e.graphicKey=v.type,e.pointer=v}var p=a.get(["label","margin"]),g=yst(n,i,a,l,p);cB(e,i,a,o,g)},t}(vw);function yst(r,t,e,n,i){var a=t.axis,o=a.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=mn();ao(h,h,s),hi(h,h,[n.cx,n.cy]),u=xi([o,-i],h);var d=t.getModel("axisLabel").get("rotate")||0,v=Ra.innerTextLayout(s,d*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var p=l[1];u=n.coordToPoint([p+i,o]);var g=n.cx,m=n.cy;c=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-m)/p<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var _st={line:function(r,t,e,n){return r.dim==="angle"?{type:"Line",shape:mw(t.coordToPoint([n[0],e]),t.coordToPoint([n[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,n){var i=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:vB(t.cx,t.cy,n[0],n[1],(-e-i/2)*a,(-e+i/2)*a)}:{type:"Sector",shape:vB(t.cx,t.cy,e-i/2,e+i/2,0,Math.PI*2)}}},bst=mst,xst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var n,i=this.ecModel;return i.eachComponent(e,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Wt),Sst=xst,_w=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ye).models[0]},t.type="polarAxis",t}(Wt);ze(_w,Gu);var wst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}(_w),Cst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}(_w),bw=function(r){q(t,r);function t(e,n){return r.call(this,"radius",e,n)||this}return t.prototype.pointToData=function(e,n){return this.polar.pointToData(e,n)[this.dim==="radius"?0:1]},t}(Un);bw.prototype.dataToRadius=Un.prototype.dataToCoord,bw.prototype.radiusToData=Un.prototype.coordToData;var Tst=bw,Mst=jt(),xw=function(r){q(t,r);function t(e,n){return r.call(this,"angle",e,n||[0,360])||this}return t.prototype.pointToData=function(e,n){return this.polar.pointToData(e,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,n=e.getLabelModel(),i=e.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=ff(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),v=Mst(e.model),p=v.lastAutoInterval,g=v.lastTickCount;return p!=null&&g!=null&&Math.abs(p-d)<=1&&Math.abs(g-o)<=1&&p>d?d=p:(v.lastTickCount=o,v.lastAutoInterval=d),d},t}(Un);xw.prototype.dataToAngle=Un.prototype.dataToCoord,xw.prototype.angleToData=Un.prototype.coordToData;var Dst=xw,wB=["radius","angle"],Ast=function(){function r(t){this.dimensions=wB,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Tst,this._angleAxis=new Dst,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+n*n);e/=l,n/=l;for(var u=Math.atan2(-n,e)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI,i=Math.cos(n)*e+this.cx,a=-Math.sin(n)*e+this.cy;return[i,a]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),n=e.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(t,e,n){var i=CB(e);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(t,e,n){var i=CB(e);return i===this?this.pointToData(n):null},r}();function CB(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}var Pst=Ast;function Lst(r,t,e){var n=t.get("center"),i=e.getWidth(),a=e.getHeight();r.cx=at(n[0],i),r.cy=at(n[1],a);var o=r.getRadiusAxis(),s=Math.min(i,a)/2,l=t.get("radius");l==null?l=[0,"100%"]:Q(l)||(l=[0,l]);var u=[at(l[0],s),at(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Ist(r,t){var e=this,n=e.getAngleAxis(),i=e.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();L(bg(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),L(bg(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),el(n.scale,n.model),el(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Ost(r){return r.mainType==="angleAxis"}function TB(r,t){if(r.type=t.get("type"),r.scale=lh(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),Ost(t)){r.inverse=r.inverse!==t.get("clockwise");var e=t.get("startAngle");r.setExtent(e,e+(r.inverse?-360:360))}t.axis=r,r.model=t}var Est={dimensions:wB,create:function(r,t){var e=[];return r.eachComponent("polar",function(n,i){var a=new Pst(i+"");a.update=Ist;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");TB(o,l),TB(s,u),Lst(a,n,t),e.push(a),n.coordinateSystem=a,a.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Ye).models[0];n.coordinateSystem=i.coordinateSystem}}),e}},Rst=Est,kst=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function sm(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var n=r.coordToPoint([t[0],e]),i=r.coordToPoint([t[1],e]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function lm(r){var t=r.getRadiusAxis();return t.inverse?0:1}function MB(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var Nst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,n){if(this.group.removeAll(),!!e.get("show")){var i=e.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=J(i.getViewLabels(),function(c){c=Tt(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});MB(u),MB(s),L(kst,function(c){e.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Bst[c](this.group,e,a,s,l,o,u)},this)}},t.type="angleAxis",t}(fl),Bst={axisLine:function(r,t,e,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=lm(e),l=s?0:1,u;a[l]===0?u=new yi({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Pf({shape:{cx:e.cx,cy:e.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,t,e,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[lm(e)],u=J(n,function(c){return new er({shape:sm(e,[l,l+s],c.coord)})});r.add(Sn(u,{style:bt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,n,i,a){if(!!i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[lm(e)],c=[],f=0;f<i.length;f++)for(var h=0;h<i[f].length;h++)c.push(new er({shape:sm(e,[u,u+l],i[f][h].coord)}));r.add(Sn(c,{style:bt(s.getModel("lineStyle").getLineStyle(),bt(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,t,e,n,i,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");L(o,function(f,h){var d=l,v=f.tickValue,p=a[lm(e)],g=e.coordToPoint([p+u,f.coord]),m=e.cx,y=e.cy,_=Math.abs(g[0]-m)/p<.3?"center":g[0]>m?"left":"right",b=Math.abs(g[1]-y)/p<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[v]){var S=s[v];xt(S)&&S.textStyle&&(d=new fe(S.textStyle,l,l.ecModel))}var x=new Ut({silent:Ra.isLabelSilent(t),style:me(d,{x:g[0],y:g[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:b})});if(r.add(x),c){var w=Ra.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=f.rawLabel,Lt(x).eventData=w}},this)},splitLine:function(r,t,e,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new er({shape:sm(e,a,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Sn(c[f],{style:bt({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(r,t,e,n,i,a){if(!!i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new er({shape:sm(e,a,i[u][c].coord)}));r.add(Sn(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(r,t,e,n,i,a){if(!!n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,d=Math.min(a[0],a[1]),v=Math.max(a[0],a[1]),p=t.get("clockwise"),g=1,m=n.length;g<=m;g++){var y=g===m?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Gr({shape:{cx:e.cx,cy:e.cy,r0:d,r:v,startAngle:h,endAngle:-y*f,clockwise:p},silent:!0})),h=-y*f}for(var g=0;g<c.length;g++)r.add(Sn(c[g],{style:bt({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},zst=Nst,Fst=["axisLine","axisTickLabel","axisName"],Vst=["splitLine","splitArea","minorSplitLine"],Hst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,n){if(this.group.removeAll(),!!e.get("show")){var i=this._axisGroup,a=this._axisGroup=new Dt;this.group.add(a);var o=e.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),f=l.getExtent()[0],h=o.getExtent(),d=Wst(s,e,f),v=new Ra(e,d);L(Fst,v.add,v),a.add(v.getGroup()),Ef(i,a,e),L(Vst,function(p){e.get([p,"show"])&&!o.scale.isBlank()&&$st[p](this.group,e,s,f,h,u,c)},this)}},t.type="radiusAxis",t}(fl),$st={splitLine:function(r,t,e,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<a.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new yi({shape:{cx:e.cx,cy:e.cy,r:Math.max(a[f].coord,0)}}))}for(var f=0;f<c.length;f++)r.add(Sn(c[f],{style:bt({stroke:l[f%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,t,e,n,i,a,o){if(!!o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new yi({shape:{cx:e.cx,cy:e.cy,r:o[c][f].coord}}));r.add(Sn(u,{style:bt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,t,e,n,i,a){if(!!a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=a[0].coord,h=1;h<a.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Gr({shape:{cx:e.cx,cy:e.cy,r0:f,r:a[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=a[h].coord}for(var h=0;h<c.length;h++)r.add(Sn(c[h],{style:bt({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function Wst(r,t,e){return{position:[r.cx,r.cy],rotation:e/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}var Gst=Hst;function DB(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function AB(r,t){return t.dim+r.model.componentIndex}function Ust(r,t,e){var n={},i=Yst(ae(t.getSeriesByType(r),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=AB(s,l),c=DB(a),f=i[u][c],h=f.offset,d=f.width,v=s.getOtherAxis(l),p=a.coordinateSystem.cx,g=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(v.dim),b=o.mapDimension(l.dim),S=Oa(o,_),x=l.dim!=="radius"||!a.get("roundCap",!0),w=v.dataToCoord(0),C=0,T=o.count();C<T;C++){var D=o.get(_,C),A=o.get(b,C),P=D>=0?"p":"n",I=w;S&&(n[c][A]||(n[c][A]={p:w,n:w}),I=n[c][A][P]);var O=void 0,E=void 0,R=void 0,z=void 0;if(v.dim==="radius"){var B=v.dataToCoord(D)-w,Y=l.dataToCoord(A);Math.abs(B)<m&&(B=(B<0?-1:1)*m),O=I,E=I+B,R=Y-h,z=R-d,S&&(n[c][A][P]=E)}else{var W=v.dataToCoord(D,x)-w,et=l.dataToCoord(A);Math.abs(W)<y&&(W=(W<0?-1:1)*y),O=et+h,E=O+d,R=I,z=I+W,S&&(n[c][A][P]=z)}o.setItemLayout(C,{cx:p,cy:g,r0:O,r:E,startAngle:-R*Math.PI/180,endAngle:-z*Math.PI/180,clockwise:R>=z})}}})}function Yst(r){var t={};L(r,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=AB(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;t[l]=f;var d=DB(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var v=at(n.get("barWidth"),c),p=at(n.get("barMaxWidth"),c),g=n.get("barGap"),m=n.get("barCategoryGap");v&&!h[d].width&&(v=Math.min(f.remainedWidth,v),h[d].width=v,f.remainedWidth-=v),p&&(h[d].maxWidth=p),g!=null&&(f.gap=g),m!=null&&(f.categoryGap=m)});var e={};return L(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=at(n.categoryGap,o),l=at(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),L(a,function(p,g){var m=p.maxWidth;m&&m<f&&(m=Math.min(m,u),p.width&&(m=Math.min(m,p.width)),u-=m,p.width=m,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,d;L(a,function(p,g){p.width||(p.width=f),d=p,h+=p.width*(1+l)}),d&&(h-=d.width*l);var v=-h/2;L(a,function(p,g){e[i][g]=e[i][g]||{offset:v,width:p.width},v+=p.width*(1+l)})}),e}var qst={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},jst={splitNumber:5},Xst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="polar",t}(Me);function Zst(r){zt(Fh),fl.registerAxisPointerClass("PolarAxisPointer",bst),r.registerCoordinateSystem("polar",Rst),r.registerComponentModel(Sst),r.registerComponentView(Xst),Xu(r,"angle",wst,qst),Xu(r,"radius",Cst,jst),r.registerComponentView(zst),r.registerComponentView(Gst),r.registerLayout(It(Ust,"bar"))}function Sw(r,t){t=t||{};var e=r.coordinateSystem,n=r.axis,i={},a=n.position,o=n.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[a],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Je(t.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=t.rotate;return h==null&&(h=r.get(["axisLabel","rotate"])),i.labelRotation=a==="top"?-h:h,i.z2=1,i}var Kst=["axisLine","axisTickLabel","axisName"],Qst=["splitArea","splitLine"],Jst=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Dt;var l=Sw(e),u=new Ra(e,l);L(Kst,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),L(Qst,function(c){e.get([c,"show"])&&tlt[c](this,this.group,this._axisGroup,e)},this),Ef(s,this._axisGroup,e),r.prototype.render.call(this,e,n,i,a)},t.prototype.remove=function(){ZR(this)},t.type="singleAxis",t}(fl),tlt={splitLine:function(r,t,e,n){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),c=i.isHorizontal(),f=[],h=0,d=i.getTicksCoords({tickModel:a}),v=[],p=[],g=0;g<d.length;++g){var m=i.toGlobalCoord(d[g].coord);c?(v[0]=m,v[1]=u.y,p[0]=m,p[1]=u.y+u.height):(v[0]=u.x,v[1]=m,p[0]=u.x+u.width,p[1]=m);var y=new er({shape:{x1:v[0],y1:v[1],x2:p[0],y2:p[1]},silent:!0});xu(y.shape,l);var _=h++%s.length;f[_]=f[_]||[],f[_].push(y)}for(var b=o.getLineStyle(["color"]),g=0;g<f.length;++g)t.add(Sn(f[g],{style:bt({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(r,t,e,n){XR(r,e,n,n)}},elt=Jst,PB=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(Wt);ze(PB,Gu.prototype);var ww=PB,rlt=function(r){q(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return 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.pointToData=function(e,n){return this.coordinateSystem.pointToData(e)[0]},t}(Un),nlt=rlt,LB=["single"],ilt=function(){function r(t,e,n){this.type="single",this.dimension="single",this.dimensions=LB,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}return r.prototype._init=function(t,e,n){var i=this.dimension,a=new nlt(i,lh(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(t,e){t.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();L(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),el(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(t,e){this._rect=qe({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],a=e.inverse?1:0;e.setExtent(i[a],i[1-a]),this._updateAxisTransform(e,n?t.x:t.y)},r.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+e}:function(o){return i-o+e},t.toLocalCoord=a?function(o){return o-e}:function(o){return i-o+e}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],a=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[a]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},r.prototype.convertToPixel=function(t,e,n){var i=IB(e);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(t,e,n){var i=IB(e);return i===this?this.pointToData(n):null},r}();function IB(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function alt(r,t){var e=[];return r.eachComponent("singleAxis",function(n,i){var a=new ilt(n,r,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,e.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Ye).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),e}var olt={create:alt,dimensions:LB},slt=olt,OB=["x","y"],llt=["width","height"],ult=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Cw(l,1-um(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=pw(a),d=clt[f](s,c,u);d.style=h,e.graphicKey=d.type,e.pointer=d}var v=Sw(i);hB(n,e,v,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=Sw(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=gw(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.coordinateSystem,l=um(o),u=Cw(s,l),c=[e.x,e.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=Cw(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(vw),clt={line:function(r,t,e){var n=mw([t,e[0]],[t,e[1]],um(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=r.getBandWidth(),i=e[1]-e[0];return{type:"Rect",shape:dB([t-n/2,e[0]],[n,i],um(r))}}};function um(r){return r.isHorizontal()?0:1}function Cw(r,t){var e=r.getRect();return[e[OB[t]],e[OB[t]]+e[llt[t]]]}var flt=ult,hlt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(Me);function dlt(r){zt(Fh),fl.registerAxisPointerClass("SingleAxisPointer",flt),r.registerComponentView(hlt),r.registerComponentView(elt),r.registerComponentModel(ww),Xu(r,"single",ww,ww.defaultOption),r.registerCoordinateSystem("single",slt)}var vlt=function(r){q(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,n,i){var a=Au(e);r.prototype.init.apply(this,arguments),EB(e,a)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),EB(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Wt);function EB(r,t){var e=r.cellSize,n;Q(e)?n=e:n=r.cellSize=[e,e],n.length===1&&(n[1]=n[0]);var i=J([0,1],function(a){return rY(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});So(r,t,{type:"box",ignoreSize:i})}var plt=vlt,glt=function(r){q(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,n,i){var a=this.group;a.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(e,s,a),this._renderLines(e,s,l,a),this._renderYearText(e,s,l,a),this._renderMonthText(e,u,l,a),this._renderWeekText(e,u,s,l,a)},t.prototype._renderDayRect=function(e,n,i){for(var a=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,f=new Gt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},t.prototype._renderLines=function(e,n,i,a){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){v(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([p],!1).tl);var g=o._getLinePointsOfOneWeek(e,p,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(e,n,i){var a=[e[0].slice(),e[e.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(e,n,i){var a=new Yr({z2:20,shape:{points:e},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(e,n,i){for(var a=e.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,n){return ct(e)&&e?QU(e,n):_t(e)?e(n):n.nameMap},t.prototype._yearTextPositionControl=function(e,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,n,i,a){var o=e.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var p=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:v},m=this._formatterLabel(p,g),y=new Ut({z2:30,style:me(o,{text:m})});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},t.prototype._monthTextPositionControl=function(e,n,i,a,o){var s="left",l="top",u=e[0],c=e[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,n,i,a){var o=e.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ct(s))&&(s&&(n=Fb(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",p=0;p<f[h].length-1;p++){var g=f[h][p].slice(),m=this._firstDayOfMonth[p];if(v){var y=this._firstDayPoints[p];g[d]=(y[d]+f[0][p+1][d])/2}var _=o.get("formatter"),b=s[+m.m-1],S={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:b},x=this._formatterLabel(_,S),w=new Ut({z2:30,style:K(me(o,{text:x}),this._monthTextPositionControl(g,v,i,u,l))});a.add(w)}}},t.prototype._weekTextPositionControl=function(e,n,i,a,o){var s="center",l="middle",u=e[0],c=e[1],f=i==="start";return n==="horizontal"?(u=u+a+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+a+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(e,n,i,a,o){var s=e.getModel("dayLabel");if(!!s.get("show")){var l=e.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||ct(c)){c&&(n=Fb(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||J(n.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var v=l.getNextNDay(i.end.time,7-i.lweek).time,p=[l.getCellWidth(),l.getCellHeight()];f=at(f,Math.min(p[1],p[0])),u==="start"&&(v=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var g=0;g<7;g++){var m=l.getNextNDay(v,g),y=l.dataToRect([m.time],!1).center,_=g;_=Math.abs((g+h)%7);var b=new Ut({z2:30,style:K(me(s,{text:c[_]}),this._weekTextPositionControl(y,a,u,f,p))});o.add(b)}}},t.type="calendar",t}(Me),mlt=glt,Tw=864e5,ylt=function(){function r(t,e,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=t}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(t){t=xn(t);var e=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:e+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:e+"-"+i+"-"+o,date:t}},r.prototype.getNextNDay=function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},r.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];L([0,1],function(f){c(a,f)&&(o[i[f]]=a[f]*s[f])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=qe(o,l);L([0,1],function(f){c(a,f)||(a[f]=u[i[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(t,e){Q(t)&&(t=t[0]),e==null&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,a=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+Tw))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},r.prototype.dataToRect=function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},r.prototype.convertToPixel=function(t,e,n){var i=RB(e);return i===this?i.dataToPoint(n):null},r.prototype.convertFromPixel=function(t,e,n){var i=RB(e);return i===this?i.pointToData(n):null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var t=this._model.get("range"),e;if(Q(t)&&t.length===1&&(t=t[0]),Q(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);e=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return t;var s=this._getRangeInfo(e);return s.start.time>s.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;e[0].time>e[1].time&&(n=!0,e.reverse());var i=Math.floor(e[1].time/Tw)-Math.floor(e[0].time/Tw)+1,a=new Date(e[0].time),o=a.getDate(),s=e[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-e[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-e[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+e[0].day+6)/7),f=n?-c+1:c-1;return n&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:i,weeks:c,nthWeek:f,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&e<i.fweek||t===i.weeks&&e>i.lweek)return null;var a=(t-1)*7-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},r.create=function(t,e){var n=[];return t.eachComponent("calendar",function(i){var a=new r(i);n.push(a),i.coordinateSystem=a}),t.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function RB(r){var t=r.calendarModel,e=r.seriesModel,n=t?t.coordinateSystem:e?e.coordinateSystem:null;return n}var _lt=ylt;function blt(r){r.registerComponentModel(plt),r.registerComponentView(mlt),r.registerCoordinateSystem("calendar",_lt)}function xlt(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function kB(r,t){var e;return L(t,function(n){r[n]!=null&&r[n]!=="auto"&&(e=!0)}),e}function Slt(r,t,e){var n=K({},e),i=r[t],a=e.$action||"merge";a==="merge"?i?(Ot(i,n,!0),So(i,n,{ignoreSize:!0}),lL(e,i),cm(e,i),cm(e,i,"shape"),cm(e,i,"style"),cm(e,i,"extra"),e.clipPath=i.clipPath):r[t]=n:a==="replace"?r[t]=n:a==="remove"&&i&&(r[t]=null)}var NB=["transition","enterFrom","leaveTo"],wlt=NB.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function cm(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var n=e?NB:wlt,i=0;i<n.length;i++){var a=n[i];r[a]==null&&t[a]!=null&&(r[a]=t[a])}}function Clt(r,t){if(!!r&&(r.hv=t.hv=[kB(t,["left","right"]),kB(t,["top","bottom"])],r.type==="group")){var e=r,n=t;e.width==null&&(e.width=n.width=0),e.height==null&&(e.height=n.height=0)}}var Tlt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,e,n),this.option.elements=i},t.prototype.optionUpdated=function(e,n){var i=this.option,a=(n?i:e).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=rA(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];L(l,function(c,f){var h=c.newOption;!h||(u.push(h),xlt(c,h),Slt(o,f,h),Clt(o[f],h))},this),i.elements=ae(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(e,n,i){L(e,function(a){if(!!a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(Wt),BB={path:null,compoundPath:null,group:Dt,image:ur,text:Ut},Zn=jt(),Mlt=function(r){q(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._elMap=yt()},t.prototype.render=function(e,n,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},t.prototype._updateElements=function(e){var n=e.useElOptionsToUpdate();if(!!n){var i=this._elMap,a=this.group,o=e.get("z"),s=e.get("zlevel");L(n,function(l){var u=Xe(l.id,null),c=u!=null?i.get(u):null,f=Xe(l.parentId,null),h=f!=null?i.get(f):a,d=l.type,v=l.style;d==="text"&&v&&l.hv&&l.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var p=l.textContent,g=l.textConfig;if(v&&V5(v,d,!!g,!!p)){var m=H5(v,d,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!p&&m.textContent&&(p=m.textContent)}var y=Dlt(l),_=l.$action||"merge",b=_==="merge",S=_==="replace";if(b){var x=!c,w=c;x?w=zB(u,h,l.type,i):(w&&(Zn(w).isNew=!1),K5(w)),w&&(rm(w,y,e,{isInit:x}),FB(w,l,o,s))}else if(S){fm(c,l,i,e);var C=zB(u,h,l.type,i);C&&(rm(C,y,e,{isInit:!0}),FB(C,l,o,s))}else _==="remove"&&(q5(c,l),fm(c,l,i,e));var T=i.get(u);if(T&&p)if(b){var D=T.getTextContent();D?D.attr(p):T.setTextContent(new Ut(p))}else S&&T.setTextContent(new Ut(p));if(T){var A=l.clipPath;if(A){var P=A.type,I=void 0,x=!1;if(b){var O=T.getClipPath();x=!O||Zn(O).type!==P,I=x?Mw(P):O}else S&&(x=!0,I=Mw(P));T.setClipPath(I),rm(I,A,e,{isInit:x}),im(I,A.keyframeAnimation,e)}var E=Zn(T);T.setTextConfig(g),E.option=l,Alt(T,e,l),wu({el:T,componentModel:e,itemName:T.name,itemTooltipOption:l.tooltip}),im(T,l.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,n){for(var i=e.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var f=i[c],h=Xe(f.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var v=d.parent,p=v===a,g=Zn(d),m=Zn(v);g.width=at(g.option.width,p?s:m.width)||0,g.height=at(g.option.height,p?l:m.height)||0}}for(var c=i.length-1;c>=0;c--){var f=i[c],h=Xe(f.id,null),d=h!=null?o.get(h):null;if(!!d){var v=d.parent,m=Zn(v),y=v===a?{width:s,height:l}:{width:m.width,height:m.height},_={},b=zp(d,f,y,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Zn(d).isNew&&b){for(var S=f.transition,x={},w=0;w<u.length;w++){var C=u[w],T=_[C];S&&(bl(S)||Bt(S,C)>=0)?x[C]=T:d[C]=T}Xt(d,x,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,n=this._elMap;n.each(function(i){fm(i,Zn(i).option,n,e._lastGraphicModel)}),this._elMap=yt()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Me);function Mw(r){var t=pt(BB,r)?BB[r]:Cp(r),e=new t({});return Zn(e).type=r,e}function zB(r,t,e,n){var i=Mw(e);return t.add(i),n.set(r,i),Zn(i).id=r,Zn(i).isNew=!0,i}function fm(r,t,e,n){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(a){fm(a,t,e,n)}),nm(r,t,n),e.removeKey(Zn(r).id))}function FB(r,t,e,n){r.isGroup||L([["cursor",Bn.prototype.cursor],["zlevel",n||0],["z",e||0],["z2",0]],function(i){var a=i[0];pt(t,a)?r[a]=Et(t[a],i[1]):r[a]==null&&(r[a]=i[1])}),L(Ht(t),function(i){if(i.indexOf("on")===0){var a=t[i];r[i]=_t(a)?a:null}}),pt(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function Dlt(r){return r=K({},r),L(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(sL),function(t){delete r[t]}),r}function Alt(r,t,e){var n=Lt(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Lt(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),n&&(n.info=e.info)}function Plt(r){r.registerComponentModel(Tlt),r.registerComponentView(Mlt),r.registerPreprocessor(function(t){var e=t.graphic;Q(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var VB=["x","y","radius","angle","single"],Llt=["cartesian2d","polar","singleAxis"];function Ilt(r){var t=r.get("coordinateSystem");return Bt(Llt,t)>=0}function zo(r){return r+"Axis"}function Olt(r,t){var e=yt(),n=[],i=yt();r.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var v=e.get(h);v&&v[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(e.get(f)||e.set(f,[]))[h]=!0})}return n}function HB(r){var t=r.ecModel,e={infoList:[],infoMap:yt()};return r.eachTargetAxis(function(n,i){var a=t.getComponent(zo(n),i);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}var Dw=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}(),Elt=function(r){q(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,n,i){var a=$B(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=$B(e);Ot(this.option,e,!0),Ot(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;L([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=yt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return L(VB,function(i){var a=this.getReferringComponents(zo(i),k9);if(!!a.specified){n=!0;var o=new Dw;L(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(!!f){var h=new Dw;if(h.add(f.componentIndex),e.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",Ye).models[0];d&&L(u,function(v){f.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",Ye).models[0]&&h.add(v.componentIndex)})}}}a&&L(VB,function(u){if(!!a){var c=i.findComponents({mainType:zo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new Dw;f.add(c[0].componentIndex),e.set(u,f),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,i=this.get("rangeMode");L([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(zo(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){L(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(zo(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;L([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;L(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[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;n||(n=u)}return n},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}(Wt);function $B(r){var t={};return L(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var Vh=Elt,Rlt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(Vh),klt=Rlt,Nlt=function(r){q(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,n,i,a){this.dataZoomModel=e,this.ecModel=n,this.api=i},t.type="dataZoom",t}(Me),Aw=Nlt,Blt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(Aw),zlt=Blt,ic=L,WB=bn,Flt=function(){function r(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(Ilt(e)){var n=zo(this._dimName),i=e.getReferringComponents(n,Ye).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Tt(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ic(["start","end"],function(h,d){var v=t[h],p=t[h+"Value"];a[d]==="percent"?(v==null&&(v=o[d]),p=i.parse(oe(v,o,e))):(u=!0,p=p==null?e[d]:i.parse(p),v=oe(p,e,o)),l[d]=p==null||isNaN(p)?e[d]:p,s[d]=v==null||isNaN(v)?o[d]:v}),WB(l),WB(s);var c=this._minMaxSpan;u?f(l,s,e,o,!1):f(s,l,o,e,!0);function f(h,d,v,p,g){var m=g?"Span":"ValueSpan";ml(0,h,v,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=oe(h[y],v,p,!0),g&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Vlt(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;ic(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(!!c.length){if(a==="weakFilter"){var f=u.getStore(),h=J(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var v,p,g,m=0;m<c.length;m++){var y=f.get(h[m],d),_=!isNaN(y),b=y<o[0],S=y>o[1];if(_&&!b&&!S)return!0;_&&(g=!0),b&&(v=!0),S&&(p=!0)}return g&&v&&p})}else ic(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(p){return s(p)?p:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});ic(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ic(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=oe(n[0]+o,n,[0,100],!0):a!=null&&(o=oe(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(!!e){var i=F_(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function Vlt(r,t,e){var n=[1/0,-1/0];ic(e,function(o){jX(n,o.getData(),t)});var i=r.getAxisModel(),a=tE(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Hlt=Flt,$lt={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(zo(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Hlt(i,a,s,r),e.push(o.__dzAxisProxy))});var n=yt();return L(e,function(i){L(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}},Wlt=$lt;function Glt(r){r.registerAction("dataZoom",function(t,e){var n=Olt(e,t);L(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var GB=!1;function Pw(r){GB||(GB=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Wlt),Glt(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Ult(r){r.registerComponentModel(klt),r.registerComponentView(zlt),Pw(r)}var Kn=function(){function r(){}return r}(),UB={};function ac(r,t){UB[r]=t}function YB(r){return UB[r]}var Ylt=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;L(this.option.feature,function(n,i){var a=YB(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),Ot(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(Wt),qlt=Ylt;function jlt(r,t,e){var n=t.getBoxLayoutParams(),i=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=qe(n,a,i);Ys(t.get("orient"),r,t.get("itemGap"),o.width,o.height),zp(r,n,a,i)}function qB(r,t){var e=Ws(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new Gt({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:n,silent:!0,z2:-1}),r}var Xlt=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),f=[];L(u,function(v,p){f.push(p)}),new Ia(this._featureNames||[],f).add(h).update(h).remove(It(h,null)).execute(),this._featureNames=f;function h(v,p){var g=f[v],m=f[p],y=u[g],_=new fe(y,e,e.ecModel),b;if(a&&a.newTitle!=null&&a.featureName===g&&(y.title=a.newTitle),g&&!m){if(Zlt(g))b={onclick:_.option.onclick,featureName:g};else{var S=YB(g);if(!S)return;b=new S}c[g]=b}else if(b=c[m],!b)return;b.uid=Tu("toolbox-feature"),b.model=_,b.ecModel=n,b.api=i;var x=b instanceof Kn;if(!g&&m){x&&b.dispose&&b.dispose(n,i);return}if(!_.get("show")||x&&b.unusable){x&&b.remove&&b.remove(n,i);return}d(_,b,g),_.setIconStatus=function(w,C){var T=this.option,D=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[w]=C,D[w]&&(C==="emphasis"?Aa:Pa)(D[w])},b instanceof Kn&&b.render&&b.render(_,n,i,a)}function d(v,p,g){var m=v.getModel("iconStyle"),y=v.getModel(["emphasis","iconStyle"]),_=p instanceof Kn&&p.getIcons?p.getIcons():v.get("icon"),b=v.get("title")||{},S,x;ct(_)?(S={},S[g]=_):S=_,ct(b)?(x={},x[g]=b):x=b;var w=v.iconPaths={};L(S,function(C,T){var D=Su(C,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(m.getItemStyle());var A=D.ensureState("emphasis");A.style=y.getItemStyle();var P=new Ut({style:{text:x[T],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null},ignore:!0});D.setTextContent(P),wu({el:D,componentModel:e,itemName:T,formatterParamsExtra:{title:x[T]}}),D.__title=x[T],D.on("mouseover",function(){var I=y.getItemStyle(),O=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:y.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||O}),P.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){v.get(["iconStatus",T])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(v.get(["iconStatus",T])==="emphasis"?Aa:Pa)(D),o.add(D),D.on("click",dt(p.onclick,p,n,i,T)),w[T]=D})}jlt(o,e,i),o.add(qB(o.getBoundingRect(),e)),l||o.eachChild(function(v){var p=v.__title,g=v.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=v.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!_t(_)&&p){var b=_.style||(_.style={}),S=ff(p,Ut.makeFont(b)),x=v.x+o.x,w=v.y+o.y+s,C=!1;w+S.height>i.getHeight()&&(m.position="top",C=!0);var T=C?-5-S.height:s+10;x+S.width/2>i.getWidth()?(m.position=["100%",T],b.align="right"):x-S.width/2<0&&(m.position=[0,T],b.align="left")}})},t.prototype.updateView=function(e,n,i,a){L(this._features,function(o){o instanceof Kn&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(e,n){L(this._features,function(i){i instanceof Kn&&i.remove&&i.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){L(this._features,function(i){i instanceof Kn&&i.dispose&&i.dispose(e,n)})},t.type="toolbox",t}(Me);function Zlt(r){return r.indexOf("my")===0}var Klt=Xlt,Qlt=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var i=this.model,a=i.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Yt.browser;if(_t(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,v=o?decodeURIComponent(h[1]):h[1];d&&(v=window.atob(v));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=v.length,m=new Uint8Array(g);g--;)m[g]=v.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var b=_.contentWindow,S=b.document;S.open("image/svg+xml","replace"),S.write(v),S.close(),b.focus(),S.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',C=window.open();C.document.write(w),C.document.title=a}},t.getDefaultOption=function(e){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(Kn),Jlt=Qlt,jB="__ec_magicType_stack__",tut=[["line","bar"],["stack"]],eut=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),i={};return L(e.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(e){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(!!XB[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,v=XB[i](h,d,f,a);v&&(bt(v,f.option),s.series.push(v));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=f.getReferringComponents(y,Ye).models[0],b=_.componentIndex;s[y]=s[y]||[];for(var S=0;S<=b;S++)s[y][b]=s[y][b]||{};s[y][b].boundaryGap=i==="bar"}}};L(tut,function(f){Bt(f,i)>=0&&L(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ot({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Kn),XB={line:function(r,t,e,n){if(r==="bar")return Ot({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return Ot({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var i=e.get("stack")===jB;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ot({id:t,stack:i?"":jB},n.get(["option","stack"])||{},!0)}};Ci({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var rut=eut,hm=new Array(60).join("-"),oc=" ";function nut(r){var t={},e=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else e.push(i)}else e.push(i)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function iut(r){var t=[];return L(r,function(e,n){var i=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(J(e.series,function(d){return d.name})),l=[i.model.getCategories()];L(e.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(p){return p}))});for(var u=[s.join(oc)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(oc))}t.push(u.join(`
|
|
211
|
+
`))}),t.join(`
|
|
212
|
+
|
|
213
|
+
`+hm+`
|
|
214
|
+
|
|
215
|
+
`)}function aut(r){return J(r,function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=e.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+oc:"")+i.join(oc))}),n.join(`
|
|
216
|
+
`)}).join(`
|
|
217
|
+
|
|
218
|
+
`+hm+`
|
|
219
|
+
|
|
220
|
+
`)}function out(r){var t=nut(r);return{value:ae([iut(t.seriesGroupByCategoryAxis),aut(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
|
221
|
+
|
|
222
|
+
`+hm+`
|
|
223
|
+
|
|
224
|
+
`),meta:t.meta}}function dm(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sut(r){var t=r.slice(0,r.indexOf(`
|
|
225
|
+
`));if(t.indexOf(oc)>=0)return!0}var Lw=new RegExp("["+oc+"]+","g");function lut(r){for(var t=r.split(/\n+/g),e=dm(t.shift()).split(Lw),n=[],i=J(e,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=dm(t[a]).split(Lw);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function uut(r){for(var t=r.split(/\n+/g),e=dm(t.shift()),n=[],i=0;i<t.length;i++){var a=dm(t[i]);if(!!a){var o=a.split(Lw),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:e,data:n}}function cut(r,t){var e=r.split(new RegExp(`
|
|
226
|
+
*`+hm+`
|
|
227
|
+
*`,"g")),n={series:[]};return L(e,function(i,a){if(sut(i)){var o=lut(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=uut(i);n.series.push(o)}}),n}var fut=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),d=out(e);if(_t(f)){var v=f(n.getOption());ct(v)?u.innerHTML=v:tu(v)&&u.appendChild(v)}else{c.readOnly=a.get("readOnly");var p=c.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=a.get("textColor"),p.borderColor=a.get("textareaBorderColor"),p.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),b=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var S=this;function x(){i.removeChild(o),S._dom=null}e_(_,"click",x),e_(b,"click",function(){if(h==null&&f!=null||h!=null&&f==null){x();return}var w;try{_t(h)?w=h(u,n.getOption()):w=cut(c.value,g)}catch(C){throw x(),new Error("Data view format error "+C)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),x()}),_.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(b),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(e,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,n){this.remove(e,n)},t.getDefaultOption=function(e){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},t}(Kn);function hut(r,t){return J(r,function(e,n){var i=t&&t[n];if(xt(i)&&!Q(i)){var a=xt(e)&&!Q(e);a||(e={value:e});var o=i.name!=null&&e.name==null;return e=bt(e,i),o&&delete e.name,e}else return e})}Ci({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];L(r.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)e.push(K({type:"scatter"},n));else{var a=i.get("data");e.push({name:n.name,data:hut(n.data,a)})}}),t.mergeOption(bt({series:e},r.newOption))});var dut=fut,ZB=L,KB=jt();function vut(r,t){var e=Iw(r);ZB(t,function(n,i){for(var a=e.length-1;a>=0;a--){var o=e[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();e[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),e.push(t)}function put(r){var t=Iw(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return ZB(e,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function gut(r){KB(r).snapshots=null}function mut(r){return Iw(r).length}function Iw(r){var t=KB(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var yut=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){gut(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(Kn);Ci({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var _ut=yut,but=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],xut=function(){function r(t,e,n){var i=this;this._targetInfoList=[];var a=QB(e,t);L(Sut,function(o,s){(!n||!n.include||Bt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Ew[n.brushType](0,a,i);n.__rangeOffset={offset:rz[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){L(t,function(i){var a=this.findTargetInfo(i,e);a&&a!==!0&&L(a.coordSyses,function(o){var s=Ew[i.brushType](1,o,i.range,!0);n(i,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){L(t,function(n){var i=this.findTargetInfo(n,e);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Ew[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?rz[n.brushType](a.values,o.offset,wut(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return J(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:e5(i),isTargetByCursor:n5(i,t,n.coordSysModel),getLinearBrushOtherExtent:r5(i)}})},r.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&Bt(i.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=QB(e,t),a=0;a<n.length;a++){var o=n[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<JB.length;l++)if(JB[l](i,o))return o}return!0},r}();function Ow(r){return r[0]>r[1]&&r.reverse(),r}function QB(r,t){return gf(r,t,{includeMainTypes:but})}var Sut={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=yt(),o={},s={};!e&&!n&&!i||(L(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),L(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),L(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];L(u.getCartesians(),function(f,h){(Bt(e,f.getAxis("x").model)>=0||Bt(n,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:tz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){L(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:tz.geo})})}},JB=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&e&&(i=e.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],tz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(_o(r)),t}},Ew={lineX:It(ez,0),lineY:It(ez,1),rect:function(r,t,e,n){var i=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),a=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[Ow([i[0],a[0]]),Ow([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=J(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function ez(r,t,e,n){var i=e.getAxis(["x","y"][r]),a=Ow(J([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var rz={lineX:It(nz,0),lineY:It(nz,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return J(r,function(n,i){return[n[0]-e[0]*t[i][0],n[1]-e[1]*t[i][1]]})}};function nz(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function wut(r,t){var e=iz(r),n=iz(t),i=[e[0]/n[0],e[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function iz(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Rw=xut,kw=L,Cut=L9("toolbox-dataZoom_"),Tut=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){this._brushController||(this._brushController=new $S(i.getZr()),this._brushController.on("brush",dt(this._onBrush,this)).mount()),Aut(e,n,this,a,i),Dut(e,n)},t.prototype.onclick=function(e,n,i){Mut[i].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new Rw(Nw(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),vut(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,v=l(u,d,a),p=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=ml(0,f.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,c.componentIndex);v&&(h=d)}),h}},t.prototype._dispatchZoomAction=function(e){var n=[];kw(e,function(i,a){n.push(Tt(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(Kn),Mut={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(put(this.ecModel))}};function Nw(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function Dut(r,t){r.setIconStatus("back",mut(t)>1?"emphasis":"normal")}function Aut(r,t,e,n,i){var a=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new Rw(Nw(r),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}lY("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),i=[],a=Nw(n),o=gf(r,a);kw(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),kw(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Cut+u+f};h[c]=f,i.push(h)}return i});var Put=Tut;function Lut(r){r.registerComponentModel(qlt),r.registerComponentView(Klt),ac("saveAsImage",Jlt),ac("magicType",rut),ac("dataView",dut),ac("dataZoom",Put),ac("restore",_ut),zt(Ult)}var Iut=function(r){q(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",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(Wt),Out=Iut;function az(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function oz(r){if(!!Yt.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e<n;e++)if(r[e]in t)return r[e]}}var sz=oz(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Eut=oz(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function lz(r,t){if(!r)return t;t=Ub(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function Rut(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?t?e[t]:e:null}var kut=lz(Eut,"transition"),Bw=lz(sz,"transform"),Nut="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Yt.transform3dSupported?"will-change:transform;":"");function But(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function zut(r,t,e){if(!ct(e)||e==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");t=Gs(t);var a=But(e),o=Math.max(Math.round(i)*1.5,6),s="",l=Bw+":",u;Bt(["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+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function Fut(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,i="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,i+=Yt.transformSupported?","+Bw+n:",left"+n+",top"+n),kut+":"+i}function uz(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Yt.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Yt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+Bw+":"+o+";":[["top",0],["left",0],[sz,o]]}function Vut(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont()),e&&t.push("line-height:"+Math.round(e*3/2)+"px");var i=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),L(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Hut(r,t,e){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=fI(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),t&&i&&n.push(Fut(i,e)),a&&n.push("background-color:"+a),L(["width","color","radius"],function(d){var v="border-"+d,p=Ub(v),g=r.get(p);g!=null&&n.push(v+":"+g+(d==="color"?"":"px"))}),n.push(Vut(c)),f!=null&&n.push("padding:"+Ws(f).join("px ")+"px"),n.join(";")+";"}function cz(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&U8(r,o,document.body,n,i)}else{r[0]=n,r[1]=i;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 $ut=function(){function r(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Yt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;cz(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;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=a.handler,c=a.painter.getViewportRoot();Rn(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){var e=this._container,n=Rut(e,"position"),i=e.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Nut+Hut(t,!this._firstShow,this._longHide)+uz(a[0],a[1],!0)+("border-color:"+Gs(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(ct(a)&&n.get("trigger")==="item"&&!az(n)&&(s=zut(n,i,a)),ct(t))o.innerHTML=t+s;else if(t){o.innerHTML="",Q(t)||(t=[t]);for(var l=0;l<t.length;l++)tu(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.offsetWidth,t.offsetHeight]},r.prototype.moveTo=function(t,e){var n=this._styleCoord;if(cz(n,this._zr,this._appendToBody,t,e),n[0]!=null&&n[1]!=null){var i=this.el.style,a=uz(n[0],n[1]);L(a,function(o){i[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;e.visibility="hidden",e.opacity="0",Yt.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)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},r}(),Wut=$ut,Gut=function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),hz(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized()},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,n,i,a){var o=this;xt(t)&&ie(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ut({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:fI(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),L(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),L(["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(),n=fz(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},r.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;hz(i,this._zr,t,e),t=i[0],e=i[1];var a=n.style,o=Fo(a.borderWidth||0),s=fz(a);n.x=t+o+s.left,n.y=e+o+s.top,n.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)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Fo(r){return Math.max(0,r)}function fz(r){var t=Fo(r.shadowBlur||0),e=Fo(r.shadowOffsetX||0),n=Fo(r.shadowOffsetY||0);return{left:Fo(t-e),right:Fo(t+e),top:Fo(t-n),bottom:Fo(t+n)}}function hz(r,t,e,n){r[0]=e,r[1]=n,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var Uut=Gut,Yut=new Gt({shape:{x:-1,y:-1,width:2,height:2}}),qut=function(r){q(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,n){if(!(Yt.node||!n.getDom())){var i=e.getComponent("tooltip"),a=this._renderMode=B9(i.get("renderMode"));this._tooltipContent=a==="richText"?new Uut(n):new Wut(n.getDom(),n,{appendToBody:i.get("appendToBody",!0)})}},t.prototype.render=function(e,n,i){if(!(Yt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=n,this._api=i,this._alwaysShowContent=e.get("alwaysShowContent");var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Nu(this,"_updatePosition",50,"fixRate"):jf(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,n=e.get("triggerOn");mB("itemTooltip",this._api,dt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||Yt.node||!i.getDom())){var o=dz(a,i);this._ticket="";var s=a.dataByCoordSys,l=Kut(a,n,i);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=Yut;c.x=a.x,c.y=a.y,c.update(),Lt(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,n,i,a))return;var f=_B(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,i,a){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(dz(a,i))},t.prototype._manuallyAxisShowTip=function(e,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(!!u){var c=u.getData(),f=Hh([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=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(i){this._lastDataByCoordSys=null;var s,l;Zs(i,function(u){if(Lt(u).dataIndex!=null)return s=u,!0;if(Lt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(e,s,n):l?this._showComponentItemTooltip(e,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=dt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Hh([n.tooltipOption],a),l=this._renderMode,u=[],c=nr("section",{blocks:[],noHeader:!0}),f=[],h=new p1;L(e,function(y){L(y.dataByAxis,function(_){var b=i.getComponent(_.axisDim+"Axis",_.axisIndex),S=_.value;if(!(!b||S==null)){var x=fB(S,b.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=nr("section",{header:x,noHeader:!On(x),sortBlocks:!0,blocks:[]});c.blocks.push(w),L(_.seriesDataIndices,function(C){var T=i.getSeriesByIndex(C.seriesIndex),D=C.dataIndexInside,A=T.getDataParams(D);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=nx(b.axis,{value:S}),A.axisValueLabel=x,A.marker=h.makeTooltipMarker("item",Gs(A.color),l);var P=UL(T.formatTooltip(D,!0,null)),I=P.frag;if(I){var O=Hh([T],a).get("valueFormatter");w.blocks.push(O?K({valueFormatter:O},I):I)}P.text&&f.push(P.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,v=s.get("order"),p=lI(c,h,l,v,i.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?`
|
|
228
|
+
|
|
229
|
+
`:"<br/>",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=Lt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,v=e.positionDefault,p=Hh([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new p1;m.marker=y.makeTooltipMarker("item",Gs(m.color),d);var _=UL(u.formatTooltip(c,!1,f)),b=p.get("order"),S=p.get("valueFormatter"),x=_.frag,w=x?lI(S?K({valueFormatter:S},x):x,y,d,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,w,m,C,e.offsetX,e.offsetY,e.position,e.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=Lt(n),o=a.tooltipConfig,s=o.option||{};if(ct(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=e.positionDefault,h=Hh(u,this._tooltipModel,f?{position:f}:null),d=h.get("content"),v=Math.random()+"",p=new p1;this._showOrMove(h,function(){var g=Tt(h.get("formatterParams")||{});this._showTooltipContent(h,d,g,v,e.offsetX,e.offsetY,e.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,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 d=n,v=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),p=v.color;if(h)if(ct(h)){var g=e.ecModel.get("useUTC"),m=Q(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=Ff(m.axisValue,d,g)),d=jb(d,i,!0)}else if(_t(h)){var _=dt(function(b,S){b===this._ticket&&(f.setContent(S,c,e,p,l),this._updatePosition(e,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,_)}else d=h;f.setContent(d,c,e,p,l),f.show(e,p),this._updatePosition(e,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(e,n,i,a){if(i==="axis"||Q(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!Q(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||e.get("position");var f=o.getSize(),h=e.get("align"),d=e.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),_t(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),Q(n))i=at(n[0],u),a=at(n[1],c);else if(xt(n)){var p=n;p.width=f[0],p.height=f[1];var g=qe(p,{width:u,height:c});i=g.x,a=g.y,h=null,d=null}else if(ct(n)&&l){var m=Zut(n,v,f,e.get("borderWidth"));i=m[0],a=m[1]}else{var m=jut(i,a,o,u,c,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=vz(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=vz(d)?f[1]/2:d==="bottom"?f[1]:0),az(e)){var m=Xut(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&L(i,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&L(u,function(h,d){var v=f[d]||{},p=h.seriesDataIndices||[],g=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&p.length===g.length,o&&L(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&L(h.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){Yt.node||!n.getDom()||(jf(this,"_updatePosition"),this._tooltipContent.dispose(),yw("itemTooltip",n))},t.type="tooltip",t}(Me);function Hh(r,t,e){var n=t.ecModel,i;e?(i=new fe(e,n,n),i=new fe(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof fe&&(o=o.get("tooltip",!0)),ct(o)&&(o={formatter:o}),o&&(i=new fe(o,i,n)))}return i}function dz(r,t){return r.dispatchAction||dt(t.dispatchAction,t)}function jut(r,t,e,n,i,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function Xut(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function Zut(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-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 vz(r){return r==="center"||r==="middle"}function Kut(r,t,e){var n=Y_(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=mf(t,i,n.get(i),{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=Lt(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var Qut=qut;function Jut(r){zt(Fh),r.registerComponentModel(Out),r.registerComponentView(Qut),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Fe),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Fe)}var tct=["rect","polygon","keep","clear"];function ect(r,t){var e=ce(r?r.brush:[]);if(!!e.length){var n=[];L(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=r&&r.toolbox;Q(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),rct(s),t&&!s.length&&s.push.apply(s,tct)}}function rct(r){var t={};L(r,function(e){t[e]=1}),r.length=0,L(t,function(e,n){r.push(n)})}var pz=L;function gz(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function zw(r,t,e){var n={};return pz(t,function(a){var o=n[a]=i();pz(r[a],function(s,l){if(!!xr.isValidType(l)){var u={type:l,visual:s};e&&e(u,a),o[l]=new xr(u),l==="opacity"&&(u=Tt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new xr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function mz(r,t,e){var n;L(e,function(i){t.hasOwnProperty(i)&&gz(t[i])&&(n=!0)}),n&&L(e,function(i){t.hasOwnProperty(i)&&gz(t[i])?r[i]=Tt(t[i]):delete r[i]})}function nct(r,t,e,n,i,a){var o={};L(r,function(f){var h=xr.prepareVisualTypes(t[f]);o[f]=h});var s;function l(f){return b1(e,s,f)}function u(f,h){EI(e,s,f,h)}a==null?e.each(c):e.each([a],c);function c(f,h){s=a==null?f:h;var d=e.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,f),p=t[v],g=o[v],m=0,y=g.length;m<y;m++){var _=g[m];p[_]&&p[_].applyVisual(f,l,u)}}}function ict(r,t,e,n){var i={};return L(r,function(a){var o=xr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(S){return b1(s,f,S)}function c(S,x){EI(s,f,S,x)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var v=n!=null?h.get(l,f):f,p=e(v),g=t[p],m=i[p],y=0,_=m.length;y<_;y++){var b=m[y];g[b]&&g[b].applyVisual(v,u,c)}}}}}function act(r){var t=r.brushType,e={point:function(n){return yz[t].point(n,e,r)},rect:function(n){return yz[t].rect(n,e,r)}};return e}var yz={lineX:_z(0),lineY:_z(1),rect:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])},rect:function(r,t,e){return r&&e.boundingRect.intersect(r)}},polygon:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])&&rl(e.range,r[0],r[1])},rect:function(r,t,e){var n=e.range;if(!r||n.length<=1)return!1;var i=r.x,a=r.y,o=r.width,s=r.height,l=n[0];if(rl(n,i,a)||rl(n,i+o,a)||rl(n,i,a+s)||rl(n,i+o,a+s)||kt.create(r).contain(l[0],l[1])||Rf(i,a,i+o,a,n)||Rf(i,a,i,a+s,n)||Rf(i+o,a,i+o,a+s,n)||Rf(i,a+s,i+o,a+s,n))return!0}}};function _z(r){var t=["x","y"],e=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[r];return $h(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[r]],n[t[r]]+n[e[r]]];return s[1]<s[0]&&s.reverse(),$h(s[0],o)||$h(s[1],o)||$h(o[0],s)||$h(o[1],s)}}}}function $h(r,t){return t[0]<=r&&r<=t[1]}var bz=["inBrush","outOfBrush"],Fw="__ecBrushSelect",Vw="__ecInBrushSelectEvent";function xz(r){r.eachComponent({mainType:"brush"},function(t){var e=t.brushTargetManager=new Rw(t.option,r);e.setInputRanges(t.areas,r)})}function oct(r,t,e){var n=[],i,a;r.eachComponent({mainType:"brush"},function(o){e&&e.type==="takeGlobalCursor"&&o.setBrushOption(e.key==="brush"?e.brushOption:{brushType:!1})}),xz(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Tt(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],v=!1;s||(i=u.throttleType,a=u.throttleDelay);var p=J(o.areas,function(S){var x=cct[S.brushType],w=bt({boundingRect:x?x(S):void 0},S);return w.selectors=act(w),w}),g=zw(o.option,bz,function(S){S.mappingMethod="fixed"});Q(c)&&L(c,function(S){f[S]=1});function m(S){return c==="all"||!!f[S]}function y(S){return!!S.length}r.eachSeries(function(S,x){var w=d[x]=[];S.subType==="parallel"?_(S,x):b(S,x,w)});function _(S,x){var w=S.coordinateSystem;v=v||w.hasAxisBrushed(),m(x)&&w.eachActiveState(S.getData(),function(C,T){C==="active"&&(h[T]=1)})}function b(S,x,w){if(!(!S.brushSelector||uct(o,x))&&(L(p,function(T){o.brushTargetManager.controlSeries(T,S,r)&&w.push(T),v=v||y(w)}),m(x)&&y(w))){var C=S.getData();C.each(function(T){Sz(S,w,C,T)&&(h[T]=1)})}}r.eachSeries(function(S,x){var w={seriesId:S.id,seriesIndex:x,seriesName:S.name,dataIndex:[]};l.selected.push(w);var C=d[x],T=S.getData(),D=m(x)?function(A){return h[A]?(w.dataIndex.push(T.getRawIndex(A)),"inBrush"):"outOfBrush"}:function(A){return Sz(S,C,T,A)?(w.dataIndex.push(T.getRawIndex(A)),"inBrush"):"outOfBrush"};(m(x)?v:y(C))&&nct(bz,g,T,D)})}),sct(t,i,a,n,e)}function sct(r,t,e,n,i){if(!!i){var a=r.getZr();if(!a[Vw]){a[Fw]||(a[Fw]=lct);var o=Nu(a,Fw,e,t);o(r,n)}}}function lct(r,t){if(!r.isDisposed()){var e=r.getZr();e[Vw]=!0,r.dispatchAction({type:"brushSelect",batch:t}),e[Vw]=!1}}function Sz(r,t,e,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(r.brushSelector(n,e,o.selectors,o))return!0}}function uct(r,t){var e=r.option.seriesIndex;return e!=null&&e!=="all"&&(Q(e)?Bt(e,t)<0:t!==e)}var cct={rect:function(r){return wz(r.range)},polygon:function(r){for(var t,e=r.range,n=0,i=e.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=e[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&wz(t)}};function wz(r){return new kt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var fct=function(r){q(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,n){this.ecModel=e,this.api=n,this.model,(this._brushController=new $S(n.getZr())).on("brush",dt(this._onBrush,this)).mount()},t.prototype.render=function(e,n,i,a){this.model=e,this._updateController(e,n,i,a)},t.prototype.updateTransform=function(e,n,i,a){xz(n),this._updateController(e,n,i,a)},t.prototype.updateVisual=function(e,n,i,a){this.updateTransform(e,n,i,a)},t.prototype.updateView=function(e,n,i,a){this._updateController(e,n,i,a)},t.prototype._updateController=function(e,n,i,a){(!a||a.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Tt(i),$from:n}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Tt(i),$from:n})},t.type="brush",t}(Me),hct=fct,dct="#ddd",vct=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,n){var i=this.option;!n&&mz(i,e,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:dct},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(e){!e||(this.areas=J(e,function(n){return Cz(this.option,n)},this))},t.prototype.setBrushOption=function(e){this.brushOption=Cz(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Wt);function Cz(r,t){return Ot({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new fe(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var pct=vct,gct=["rect","polygon","lineX","lineY","keep","clear"],mct=function(r){q(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,L(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(e,n,i){this.render(e,n,i)},t.prototype.getIcons=function(){var e=this.model,n=e.get("icon",!0),i={};return L(e.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(e,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var n={show:!0,type:gct.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(Kn),yct=mct;function _ct(r){r.registerComponentView(hct),r.registerComponentModel(pct),r.registerPreprocessor(ect),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,oct),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Fe),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Fe),ac("brush",yct)}var bct=function(r){q(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.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Wt),xct=function(r){q(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,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=Et(e.get("textBaseline"),e.get("textVerticalAlign")),c=new Ut({style:me(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=e.get("subtext"),d=new Ut({style:me(s,{text:h,fill:s.getTextColor(),y:f.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);c.silent=!v&&!g,d.silent=!p&&!g,v&&c.on("click",function(){Np(v,"_"+e.get("target"))}),p&&d.on("click",function(){Np(p,"_"+e.get("subtarget"))}),Lt(c).eventData=Lt(d).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(c),h&&a.add(d);var m=a.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=qe(y,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),d.setStyle(b),m=a.getBoundingRect();var S=_.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var w=new Gt({shape:{x:m.x-S[3],y:m.y-S[0],width:m.width+S[1]+S[3],height:m.height+S[0]+S[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Me);function Sct(r){r.registerComponentModel(bct),r.registerComponentView(xct)}var wct=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var n=this._data.count();this.option.loop?e=(e%n+n)%n:(e>=n&&(e=n-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,n=e.data||[],i=e.axisType,a=this._names=[],o;i==="category"?(o=[],L(n,function(u,c){var f=Xe(hu(u),""),h;xt(u)?(h=Tt(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Or([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Wt),Tz=wct,Mz=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=xo(Tz.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(Tz);ze(Mz,u1.prototype);var Cct=Mz,Tct=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(Me),Mct=Tct,Dct=function(r){q(t,r);function t(e,n,i,a){var o=r.call(this,e,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Un),Act=Dct,Hw=Math.PI,Dz=jt(),Pct=function(r){q(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,n){this.api=n},t.prototype.render=function(e,n,i){if(this.model=e,this.api=i,this.ecModel=n,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,e);e.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return nr("nameValue",{noName:!0,value:c})},L(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,e)},this),this._renderAxisLabel(a,s,l,e),this._position(a,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,n){var i=e.get(["label","position"]),a=e.get("orient"),o=Ict(e,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ct(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Hw/2},f=a==="vertical"?o.height:o.width,h=e.getModel("controlStyle"),d=h.get("show",!0),v=d?h.get("itemSize"):0,p=d?h.get("itemGap"):0,g=v+p,m=e.get(["label","rotate"])||0;m=m*Hw/180;var y,_,b,S=h.get("position",!0),x=d&&h.get("showPlayBtn",!0),w=d&&h.get("showPrevBtn",!0),C=d&&h.get("showNextBtn",!0),T=0,D=f;S==="left"||S==="bottom"?(x&&(y=[0,0],T+=g),w&&(_=[T,0],T+=g),C&&(b=[D-v,0],D-=g)):(x&&(y=[D-v,0],D-=g),w&&(_=[0,0],T+=g),C&&(b=[D-v,0],D-=g));var A=[T,D];return e.get("inverse")&&A.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[a],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:b,axisExtent:A,controlSize:v,controlGap:p}},t.prototype._position=function(e,n){var i=this._mainGroup,a=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=mn(),l=o.x,u=o.y+o.height;hi(s,s,[-l,-u]),ao(s,s,-Hw/2),hi(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),h=y(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||ct(p)){var g=p==="+"?0:1;_(d,f,c,1,g),_(v,h,c,1,1-g)}else{var g=p>=0?0:1;_(d,f,c,1,g),v[1]=d[1]+p}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=e.rotation,m(i),m(a);function m(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function y(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function _(b,S,x,w,C){b[w]+=x[w][C]-S[w][C]}},t.prototype._createAxis=function(e,n){var i=n.getData(),a=n.get("axisType"),o=Lct(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Act("value",o,e.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(e){var n=this[e]=new Dt;return this.group.add(n),n},t.prototype._renderAxisLine=function(e,n,i,a){var o=i.getExtent();if(!!a.get(["lineStyle","show"])){var s=new er({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:K({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new er({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:bt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(e,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],L(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),p={x:c,y:0,onclick:dt(o._changeTimeline,o,u.value)},g=Az(f,h,n,p);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=v.getItemStyle(),mo(g);var m=Lt(g);f.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,n,i,a){var o=this,s=i.getLabelModel();if(!!s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],L(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),v=h.getModel(["emphasis","label"]),p=h.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),m=new Ut({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:dt(o._changeTimeline,o,f),silent:!1,style:me(d,{text:c.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});m.ensureState("emphasis").style=me(v),m.ensureState("progress").style=me(p),n.add(m),mo(m),Dz(m).dataIndex=f,o._tickLabels.push(m)})}},t.prototype._renderControl=function(e,n,i,a){var o=e.controlSize,s=e.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(e.nextBtnPosition,"next",dt(this._changeTimeline,this,f?"-":"+")),h(e.prevBtnPosition,"prev",dt(this._changeTimeline,this,f?"+":"-")),h(e.playPosition,c?"stop":"play",dt(this._handlePlayClick,this,!c),!0);function h(d,v,p,g){if(!!d){var m=gi(Et(a.get(["controlStyle",v+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=Oct(a,v+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,n.add(_),mo(_)}}},t.prototype._renderCurrentPointer=function(e,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=dt(u._handlePointerDrag,u),f.ondragend=dt(u._handlePointerDragend,u),Pz(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){Pz(f,u._progressLine,s,i,a)}};this._currentPointer=Az(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,n){var i=this._toAxisCoord(e)[0],a=this._axis,o=bn(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=e.model;e._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){var n=this._mainGroup.getLocalTransform();return xi(e,n,!0)},t.prototype._findNearestTick=function(e){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-e);c<i&&(i=c,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var n=this.model.getCurrentIndex();e==="+"?e=n+1:e==="-"&&(e=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<e);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",Dz(i[a]).dataIndex<=e)},t.type="timeline.slider",t}(Mct);function Lct(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Q1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new KO({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Po}}function Ict(r,t){return qe(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},r.get("padding"))}function Oct(r,t,e,n){var i=n.style,a=Su(r.get(["controlStyle",t]),n||{},new kt(e[0],e[1],e[2],e[3]));return i&&a.setStyle(i),a}function Az(r,t,e,n,i,a){var o=t.get("color");if(i)i.setColor(o),e.add(i),a&&a.onUpdate(i);else{var s=r.get("symbol");i=$e(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),e.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=Ot({rectHover:!0,z2:100},n,!0);var u=Qf(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=zu(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function Pz(r,t,e,n,i,a){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",e));if(a||!o.get("animation",!0))r.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}var Ect=Pct;function Rct(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,n){var i=e.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),bt({currentIndex:i.option.currentIndex},t)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function kct(r){var t=r&&r.timeline;Q(t)||(t=t?[t]:[]),L(t,function(e){!e||Nct(e)})}function Nct(r){var t=r.type,e={number:"value",time:"time"};if(e[t]&&(r.axisType=e[t],delete r.type),Lz(r),Sl(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Sl(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Sl(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}L(r.data||[],function(i){xt(i)&&!Q(i)&&(!Sl(i,"value")&&Sl(i,"name")&&(i.value=i.name),Lz(i))})}function Lz(r){var t=r.itemStyle||(r.itemStyle={}),e=t.emphasis||(t.emphasis={}),n=r.label||r.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};L(n,function(o,s){!a[s]&&!Sl(i,s)&&(i[s]=o)}),e.label&&!Sl(n,"emphasis")&&(n.emphasis=e.label,delete e.label)}function Sl(r,t){return r.hasOwnProperty(t)}function Bct(r){r.registerComponentModel(Cct),r.registerComponentView(Ect),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),Rct(r),r.registerPreprocessor(kct)}function $w(r,t){if(!r)return!1;for(var e=Q(r)?r:[r],n=0;n<e.length;n++)if(e[n]&&e[n][t])return!0;return!1}function vm(r){Cs(r,"label",["show"])}var pm=jt(),Iz=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Yt.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,n){this._mergeOption(e,n,!1,!1)},t.prototype._mergeOption=function(e,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=pm(s)[o];if(!l||!l.data){pm(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&vm(l),L(l.data,function(c){c instanceof Array?(vm(c[0]),vm(c[1])):vm(c)}),u=this.createMarkerModelFromSeries(l,this,n),K(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),pm(s)[o]=u},this)},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return nr("section",{header:this.name,blocks:[nr("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.getMarkerModelFromSeries=function(e,n){return pm(e)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Wt);ze(Iz,u1.prototype);var Vo=Iz,zct=function(r){q(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,n,i){return new t(e,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Vo),Fct=zct;function Ww(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function Vct(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function gm(r,t,e,n,i,a){var o=[],s=Oa(t,n),l=s?t.getCalculationInfo("stackResultDimension"):n,u=Uw(t,l,r),c=t.indicesOfNearest(l,u)[0];o[i]=t.get(e,c),o[a]=t.get(l,c);var f=t.get(n,c),h=mi(t.get(n,c));return h=Math.min(h,20),h>=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var Gw={min:It(gm,"min"),max:It(gm,"max"),average:It(gm,"average"),median:It(gm,"median")};function Wh(r,t){if(!!t){var e=r.getData(),n=r.coordinateSystem,i=n.dimensions;if(!Vct(t)&&!Q(t.coord)&&n){var a=Oz(t,e,n,r);if(t=Tt(t),t.type&&Gw[t.type]&&a.baseAxis&&a.valueAxis){var o=Bt(i,a.baseAxis.dim),s=Bt(i,a.valueAxis.dim),l=Gw[t.type](e,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)t.coord=[];else for(var u=t.coord,c=0;c<2;c++)Gw[u[c]]&&(u[c]=Uw(e,e.mapDimension(i[c]),u[c]));return t}}function Oz(r,t,e,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,i.valueAxis=e.getAxis(Hct(n,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Hct(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Gh(r,t){return r&&r.containData&&t.coord&&!Ww(t)?r.containData(t.coord):!0}function $ct(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!Ww(t)&&!Ww(e)?r.containZone(t.coord,e.coord):!0}function Ez(r,t){return r?function(e,n,i,a){var o=a<2?e.coord&&e.coord[a]:e.value;return Co(o,t[a])}:function(e,n,i,a){return Co(e.value,t[a])}}function Uw(r,t,e){if(e==="average"){var n=0,i=0;return r.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Yw=jt(),Wct=function(r){q(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=yt()},t.prototype.render=function(e,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){Yw(s).keep=!1}),n.eachSeries(function(s){var l=Vo.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!Yw(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(e){Yw(e).keep=!0},t.prototype.toggleBlurSeries=function(e,n){var i=this;L(e,function(a){var o=Vo.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?ZA(l):gb(l))})}})},t.type="marker",t}(Me),qw=Wct;function Rz(r,t,e){var n=t.coordinateSystem;r.each(function(i){var a=r.getItemModel(i),o,s=at(a.get("x"),e.getWidth()),l=at(a.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(r.getValues(r.dimensions,i));else if(n){var u=r.get(n.dimensions[0],i),c=r.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var Gct=function(r){q(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,n,i){n.eachSeries(function(a){var o=Vo.getMarkerModelFromSeries(a,"markPoint");o&&(Rz(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(e,n,i,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new mh),f=Uct(o,e,n);n.setData(f),Rz(n.getData(),e,a),f.each(function(h){var d=f.getItemModel(h),v=d.getShallow("symbol"),p=d.getShallow("symbolSize"),g=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(_t(v)||_t(p)||_t(g)||_t(m)){var _=n.getRawValue(h),b=n.getDataParams(h);_t(v)&&(v=v(_,b)),_t(p)&&(p=p(_,b)),_t(g)&&(g=g(_,b)),_t(m)&&(m=m(_,b))}var S=d.getModel("itemStyle").getItemStyle(),x=Kf(l,"color");S.fill||(S.fill=x),f.setItemVisual(h,{symbol:v,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:S})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Lt(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||e.get("silent")},t.type="markPoint",t}(qw);function Uct(r,t,e){var n;r?n=J(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return K(K({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Or(n,e),a=J(e.get("data"),It(Wh,t));r&&(a=ae(a,It(Gh,r)));var o=Ez(!!r,n);return i.initData(a,null,o),i}var Yct=Gct;function qct(r){r.registerComponentModel(Fct),r.registerComponentView(Yct),r.registerPreprocessor(function(t){$w(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var jct=function(r){q(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,n,i){return new t(e,n,i)},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}(Vo),Xct=jct,mm=jt(),Zct=function(r,t,e,n){var i=r.getData(),a;if(Q(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Je(n.yAxis,n.xAxis);else{var u=Oz(n,i,t,r);s=u.valueAxis;var c=j1(i,u.valueDataDim);l=Uw(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=Tt(n),v={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,v.coord[h]=1/0;var p=e.get("precision");p>=0&&qt(l)&&(l=+l.toFixed(Math.min(p,20))),d.coord[f]=v.coord[f]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var g=[Wh(r,a[0]),Wh(r,a[1]),K({},a[2])];return g[2].type=g[2].type||null,Ot(g[2],g[0]),Ot(g[2],g[1]),g};function ym(r){return!isNaN(r)&&!isFinite(r)}function kz(r,t,e,n){var i=1-r,a=n.dimensions[r];return ym(t[i])&&ym(e[i])&&t[r]===e[r]&&n.getAxis(a).containData(t[r])}function Kct(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,n=t[1].coord;if(e&&n&&(kz(1,e,n,r)||kz(0,e,n,r)))return!0}return Gh(r,t[0])&&Gh(r,t[1])}function jw(r,t,e,n,i){var a=n.coordinateSystem,o=r.getItemModel(t),s,l=at(o.get("x"),i.getWidth()),u=at(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.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(ul(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),c=a.dimensions;ym(r.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[e?0:1]):ym(r.get(c[1],t))&&(s[1]=v.toGlobalCoord(v.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var Qct=function(r){q(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,n,i){n.eachSeries(function(a){var o=Vo.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=mm(o).from,u=mm(o).to;l.each(function(c){jw(l,c,!0,a,i),jw(u,c,!1,a,i)}),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,n,i,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new SS);this.group.add(c.group);var f=Jct(o,e,n),h=f.from,d=f.to,v=f.line;mm(n).from=h,mm(n).to=d,n.setData(v);var p=n.get("symbol"),g=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");Q(p)||(p=[p,p]),Q(g)||(g=[g,g]),Q(m)||(m=[m,m]),Q(y)||(y=[y,y]),f.from.each(function(b){_(h,b,!0),_(d,b,!1)}),v.each(function(b){var S=v.getItemModel(b).getModel("lineStyle").getLineStyle();v.setItemLayout(b,[h.getItemLayout(b),d.getItemLayout(b)]),S.stroke==null&&(S.stroke=h.getItemVisual(b,"style").fill),v.setItemVisual(b,{fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:d.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(b,"symbolOffset"),toSymbolRotate:d.getItemVisual(b,"symbolRotate"),toSymbolSize:d.getItemVisual(b,"symbolSize"),toSymbol:d.getItemVisual(b,"symbol"),style:S})}),c.updateData(v),f.line.eachItemGraphicEl(function(b){Lt(b).dataModel=n,b.traverse(function(S){Lt(S).dataModel=n})});function _(b,S,x){var w=b.getItemModel(S);jw(b,S,x,e,a);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=Kf(l,"color")),b.setItemVisual(S,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Et(w.get("symbolOffset",!0),y[x?0:1]),symbolRotate:Et(w.get("symbolRotate",!0),m[x?0:1]),symbolSize:Et(w.get("symbolSize"),g[x?0:1]),symbol:Et(w.get("symbol",!0),p[x?0:1]),style:C})}this.markKeep(c),c.group.silent=n.get("silent")||e.get("silent")},t.type="markLine",t}(qw);function Jct(r,t,e){var n;r?n=J(r&&r.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return K(K({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Or(n,e),a=new Or(n,e),o=new Or([],e),s=J(e.get("data"),It(Zct,t,r,e));r&&(s=ae(s,It(Kct,r)));var l=Ez(!!r,n);return i.initData(J(s,function(u){return u[0]}),null,l),a.initData(J(s,function(u){return u[1]}),null,l),o.initData(J(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}var tft=Qct;function eft(r){r.registerComponentModel(Xct),r.registerComponentView(tft),r.registerPreprocessor(function(t){$w(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var rft=function(r){q(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,n,i){return new t(e,n,i)},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}(Vo),nft=rft,_m=jt(),ift=function(r,t,e,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Wh(r,i),s=Wh(r,a),l=o.coord,u=s.coord;l[0]=Je(l[0],-1/0),l[1]=Je(l[1],-1/0),u[0]=Je(u[0],1/0),u[1]=Je(u[1],1/0);var c=xv([{},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 bm(r){return!isNaN(r)&&!isFinite(r)}function Nz(r,t,e,n){var i=1-r;return bm(t[i])&&bm(e[i])}function aft(r,t){var e=t.coord[0],n=t.coord[1],i={coord:e,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return ul(r,"cartesian2d")?e&&n&&(Nz(1,e,n)||Nz(0,e,n))?!0:$ct(r,i,a):Gh(r,i)||Gh(r,a)}function Bz(r,t,e,n,i){var a=n.coordinateSystem,o=r.getItemModel(t),s,l=at(o.get(e[0]),i.getWidth()),u=at(o.get(e[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],t),f=r.getValues(["x1","y1"],t),h=a.clampData(c),d=a.clampData(f),v=[];e[0]==="x0"?v[0]=h[0]>d[0]?f[0]:c[0]:v[0]=h[0]>d[0]?c[0]:f[0],e[1]==="y0"?v[1]=h[1]>d[1]?f[1]:c[1]:v[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(v,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),m=[p,g];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(ul(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);bm(p)?s[0]=y.toGlobalCoord(y.getExtent()[e[0]==="x0"?0:1]):bm(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var zz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oft=function(r){q(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,n,i){n.eachSeries(function(a){var o=Vo.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=J(zz,function(f){return Bz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,n,i,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Dt});this.group.add(c.group),this.markKeep(c);var f=sft(o,e,n);n.setData(f),f.each(function(h){var d=J(zz,function(C){return Bz(f,h,C,e,a)}),v=o.getAxis("x").scale,p=o.getAxis("y").scale,g=v.getExtent(),m=p.getExtent(),y=[v.parse(f.get("x0",h)),v.parse(f.get("x1",h))],_=[p.parse(f.get("y0",h)),p.parse(f.get("y1",h))];bn(y),bn(_);var b=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),S=!b;f.setItemLayout(h,{points:d,allClipped:S});var x=f.getItemModel(h).getModel("itemStyle").getItemStyle(),w=Kf(l,"color");x.fill||(x.fill=w,ct(x.fill)&&(x.fill=af(x.fill,.4))),x.stroke||(x.stroke=w),f.setItemVisual(h,"style",x)}),f.diff(_m(c).data).add(function(h){var d=f.getItemLayout(h);if(!d.allClipped){var v=new Ur({shape:{points:d.points}});f.setItemGraphicEl(h,v),c.group.add(v)}}).update(function(h,d){var v=_m(c).data.getItemGraphicEl(d),p=f.getItemLayout(h);p.allClipped?v&&c.group.remove(v):(v?Xt(v,{shape:{points:p.points}},n,h):v=new Ur({shape:{points:p.points}}),f.setItemGraphicEl(h,v),c.group.add(v))}).remove(function(h){var d=_m(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var v=f.getItemModel(d),p=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),_r(h,rr(v),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:ct(p.fill)?af(p.fill,1):"#000"}),yr(h,v),Re(h,null,null,v.get(["emphasis","disabled"])),Lt(h).dataModel=n}),_m(c).data=f,c.group.silent=n.get("silent")||e.get("silent")},t.type="markArea",t}(qw);function sft(r,t,e){var n,i,a=["x0","y0","x1","y1"];if(r){var o=J(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return K(K({},f),{name:u,ordinalMeta:null})});i=J(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new Or(i,e)}else i=[{name:"value",type:"float"}],n=new Or(i,e);var s=J(e.get("data"),It(ift,t,r,e));r&&(s=ae(s,It(aft,r)));var l=r?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return Co(d,i[h])}:function(u,c,f,h){return Co(u.value,i[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}var lft=oft;function uft(r){r.registerComponentModel(nft),r.registerComponentView(lft),r.registerPreprocessor(function(t){$w(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var cft=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"])}},fft=function(r){q(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,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),Q(n)&&L(n,function(a,o){ct(a)&&(a={type:a}),n[o]=Ot(a,cft(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<e.length;i++){var a=e[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var n=[],i=[];e.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();e.isSeriesFiltered(l)||(i=i.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&U_(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=yt(),s=J(a,function(l){return(ct(l)||qt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new fe(l,this,this.ecModel))},this);this._data=ae(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;L(a,function(o){n[o.get("name")]=!1})}n[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var n=this.option.selected;n.hasOwnProperty(e)||(n[e]=!0),this[n[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,n=this.option.selected;L(e,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,n=this.option.selected;L(e,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(e){var n=this.option.selected;return!(n.hasOwnProperty(e)&&!n[e])&&Bt(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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Wt),Xw=fft,sc=It,Zw=L,xm=Dt,hft=function(r){q(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 xm),this.group.add(this._selectorGroup=new xm),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){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,n,i,l,s,u);var c=e.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},h=e.get("padding"),d=qe(c,f,h),v=this.layoutInner(e,o,d,a,l,u),p=qe(bt({width:v.width,height:v.height},c),f,h);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=qB(v,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this.getContentGroup(),c=yt(),f=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),Zw(n.getData(),function(d,v){var p=d.get("name");if(!this.newlineDisabled&&(p===""||p===`
|
|
230
|
+
`)){var g=new xm;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!c.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),S=y.getVisual("style"),x=this._createItem(m,p,v,d,n,e,_,S,b,f,a);x.on("click",sc(Fz,p,null,a,h)).on("mouseover",sc(Kw,m.name,null,a,h)).on("mouseout",sc(Qw,m.name,null,a,h)),c.set(p,!0)}else i.eachRawSeries(function(w){if(!c.get(p)&&w.legendVisualProvider){var C=w.legendVisualProvider;if(!C.containName(p))return;var T=C.indexOfName(p),D=C.getItemVisual(T,"style"),A=C.getItemVisual(T,"legendIcon"),P=Hr(D.fill);P&&P[3]===0&&(P[3]=.2,D=K(K({},D),{fill:vi(P,"rgba")}));var I=this._createItem(w,p,v,d,n,e,{},D,A,f,a);I.on("click",sc(Fz,null,p,a,h)).on("mouseover",sc(Kw,null,p,a,h)).on("mouseout",sc(Qw,null,p,a,h)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();Zw(e,function(u){var c=u.type,f=new Ut({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);_r(f,{normal:h,emphasis:d},{defaultText:u.title}),mo(f)})},t.prototype._createItem=function(e,n,i,a,o,s,l,u,c,f,h){var d=e.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=dft(c,a,l,u,d,g,h),S=new xm,x=a.getModel("textStyle");if(_t(e.getLegendIcon)&&(!_||_==="inherit"))S.add(e.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;S.add(vft({itemWidth:v,itemHeight:p,icon:c,iconRotate:w,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,T=s,D=o.get("formatter"),A=n;ct(D)&&D?A=D.replace("{name}",n!=null?n:""):_t(D)&&(A=D(n));var P=a.get("inactiveColor");S.add(new Ut({style:me(x,{text:A,x:C,y:p/2,fill:g?x.getTextColor():P,align:T,verticalAlign:"middle"})}));var I=new Gt({shape:S.getBoundingRect(),invisible:!0}),O=a.getModel("tooltip");return O.get("show")&&wu({el:I,componentModel:o,itemName:n,itemTooltipOption:O.option}),S.add(I),S.eachChild(function(E){E.silent=!0}),I.silent=!f,this.getContentGroup().add(S),mo(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ys(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ys("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?d[p]+=c[g]+v:f[p]+=h[g]+v,d[1-p]+=c[m]/2-h[m]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+v+h[g],_[m]=Math.max(c[m],h[m]),_[y]=Math.min(0,h[y]+d[1-p]),_}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}(Me);function dft(r,t,e,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Zw(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}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"?n.decal:Vu(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:e).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function vft(r){var t=r.icon||"roundRect",e=$e(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="#fff",e.style.lineWidth=2),e}function Fz(r,t,e,n){Qw(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r!=null?r:t}),Kw(r,t,e,n)}function Vz(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;n<i&&!(e=t[n].states.emphasis);)n++;return e&&e.hoverLayer}function Kw(r,t,e,n){Vz(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:n})}function Qw(r,t,e,n){Vz(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:n})}var Hz=hft;function pft(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Uh(r,t,e){var n={},i=r==="toggleSelected",a;return e.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](t.name):r==="allSelect"||r==="inverseSelect"?o[r]():(o[r](t.name),a=o.isSelected(t.name));var s=o.getData();L(s,function(l){var u=l.get("name");if(!(u===`
|
|
231
|
+
`||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function gft(r){r.registerAction("legendToggleSelect","legendselectchanged",It(Uh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",It(Uh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",It(Uh,"inverseSelect")),r.registerAction("legendSelect","legendselected",It(Uh,"select")),r.registerAction("legendUnSelect","legendunselected",It(Uh,"unSelect"))}function $z(r){r.registerComponentModel(Xw),r.registerComponentView(Hz),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,pft),r.registerSubTypeDefaulter("legend",function(){return"plain"}),gft(r)}var mft=function(r){q(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,n,i){var a=Au(e);r.prototype.init.call(this,e,n,i),Wz(this,e,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),Wz(this,this.option,e)},t.type="legend.scroll",t.defaultOption=xo(Xw.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(Xw);function Wz(r,t,e){var n=r.getOrient(),i=[1,1];i[n.index]=0,So(t,e,{type:"box",ignoreSize:!!i})}var yft=mft,Gz=Dt,Jw=["width","height"],tC=["x","y"],_ft=function(r){q(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 Gz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Gz)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=Q(f)?f:[f,f];v("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Ut({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,g){var m=p+"DataIndex",y=Su(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:dt(u._pageGo,u,m,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=p,c.add(y)}},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,c=Jw[u],f=tC[u],h=Jw[1-u],d=tC[1-u];o&&Ys("horizontal",l,e.get("selectorItemGap",!0));var v=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=Tt(i);o&&(m[c]=i[c]-p[c]-v);var y=this._layoutContentAndController(e,a,m,u,c,h,d,f);if(o){if(s==="end")g[u]+=y[c]+v;else{var _=p[c]+v;g[u]-=_,y[f]-=_}y[c]+=p[c]+v,g[1-u]+=y[d]+y[h]/2-p[h]/2,y[h]=Math.max(y[h],p[h]),y[d]=Math.min(y[d],p[d]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Ys(e.get("orient"),c,e.get("itemGap"),a?i.width:null,a?null:i.height),Ys("horizontal",h,e.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),v=h.getBoundingRect(),p=this._showController=d[o]>i[o],g=[-d.x,-d.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=Et(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var b=e.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=d[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),h.setPosition(y);var S={x:0,y:0};if(S[o]=p?i[o]:d[o],S[s]=Math.max(d[s],v[s]),S[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var x={x:0,y:0};x[o]=Math.max(i[o]-v[o]-_,0),x[s]=S[s],f.setClipPath(new Gt({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Xt(c,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),S},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;L(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ct(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Jw[o],l=tC[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=h;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!S(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=_;return v;function b(x){if(x){var w=x.getBoundingRect(),C=w[l]+x[l];return{s:C,e:C+w[s],i:x.__legendDataIndex}}}function S(x,w){return x.e>=w&&x.s<=w+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(n=s)}),n!=null?n:a},t.type="legend.scroll",t}(Hz),bft=_ft;function xft(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function Sft(r){zt($z),r.registerComponentModel(yft),r.registerComponentView(bft),xft(r)}function wft(r){zt($z),zt(Sft)}var Cft=function(r){q(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=xo(Vh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Vh),Tft=Cft,eC=jt();function Mft(r,t,e){eC(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function Dft(r,t){for(var e=eC(r).coordSysRecordMap,n=e.keys(),i=0;i<n.length;i++){var a=n[i],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||Uz(e,o))}}}function Uz(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function Aft(r,t){var e={model:t,containsPoint:It(Lft,t),dispatchAction:It(Pft,r),dataZoomInfoMap:null,controller:null},n=e.controller=new wh(r.getZr());return L(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(!!a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],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 Pft(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Lft(r,t,e,n){return r.coordinateSystem.containPoint([e,n])}function Ift(r){var t,e="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[e+s]>n[e+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function Oft(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=eC(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=yt());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=HB(a);L(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Aft(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=yt());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.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){Uz(i,a);return}var c=Ift(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Nu(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Eft=function(r){q(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,n,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),Mft(i,e,{pan:dt(rC.pan,this),zoom:dt(rC.zoom,this),scrollMove:dt(rC.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Dft(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Aw),rC={zoom:function(r,t,e,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(!!o){var s=nC[t](null,[n.originX,n.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/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ml(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Yz(function(r,t,e,n,i,a){var o=nC[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Yz(function(r,t,e,n,i,a){var o=nC[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function Yz(r){return function(t,e,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(!!s){var l=r(o,s,t,e,n,i);if(ml(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var nC={grid:function(r,t,e,n,i){var a=e.axis,o={},s=i.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,n,i){var a=e.axis,o={},s=i.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,n,i){var a=e.axis,o=i.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}},Rft=Eft;function qz(r){Pw(r),r.registerComponentModel(Tft),r.registerComponentView(Rft),Oft(r)}var kft=function(r){q(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=xo(Vh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Vh),Nft=kft,Yh=Gt,jz=7,Bft=1,iC=30,zft=7,qh="horizontal",Xz="vertical",Fft=5,Vft=["line","bar","candlestick","scatter"],Hft={easing:"cubicOut",duration:100,delay:0},$ft=function(r){q(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,n){this.api=n,this._onBrush=dt(this._onBrush,this),this._onBrushEnd=dt(this._onBrushEnd,this)},t.prototype.render=function(e,n,i,a){if(r.prototype.render.apply(this,arguments),Nu(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(){jf(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 n=this._displayables.sliderGroup=new Dt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,i=e.get("brushSelect"),a=i?zft:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===qh?{right:s.width-o.x-o.width,top:s.height-iC-jz-a,width:o.width,height:iC}:{right:jz,top:o.y,width:iC,height:o.height},u=Au(e.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=qe(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Xz&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===qh&&!o?{scaleY:l?1:-1,scaleX:1}:i===qh&&o?{scaleY:l?1:-1,scaleX:-1}:i===Xz&&!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]);e.x=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=e.get("brushSelect");i.add(new Yh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Yh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:dt(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)),i.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,i=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||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],v=[0,n[0]],p=[[n[0],0],[0,0]],g=[],m=v[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),b;o.each([l],function(T,D){if(_>0&&D%_){y+=m;return}var A=T==null||isNaN(T)||T==="",P=A?0:oe(T,f,d,!0);A&&!b&&D?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!A&&b&&(p.push([y,0]),g.push([y,0])),p.push([y,P]),g.push([y,P]),y+=m,b=A}),u=this._shadowPolygonPts=p,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var S=this.dataZoomModel;function x(T){var D=S.getModel(T?"selectedDataBackground":"dataBackground"),A=new Dt,P=new Ur({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Yr({shape:{points:c},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(P),A.add(I),A}for(var w=0;w<3;w++){var C=x(w===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();L(l,function(u){if(!i&&!(n!==!0&&Bt(Vft,u.get("type"))<0)){var c=a.getComponent(zo(o),s).axis,f=Wft(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,i=n.handles=[null,null],a=n.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=n.filler=new Yh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Yh({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:Bft,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!Kp[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var S=$e(b,-1,0,2,2,null,!0);S.attr({cursor:Zz(this._orient),draggable:!0,drift:dt(this._onDragMove,this,_),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1),z2:5});var x=S.getBoundingRect(),w=l.get("handleSize");this._handleHeight=at(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),mo(S);var C=l.get("handleColor");C!=null&&(S.style.fill=C),o.add(i[_]=S);var T=l.getModel("textStyle");e.add(a[_]=new Ut({silent:!0,invisible:!0,style:me(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var d=h;if(f){var v=at(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Gt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),g=v*.8,m=n.moveHandleIcon=$e(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+v/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new Gt({invisible:!0,shape:{y:s[1]-y,height:v+y}}),d.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:Zz(this._orient),drift:dt(this._onDragMove,this,"all"),ondragstart:dt(this._showDataInfo,this,!0),ondragend:dt(this._onDragEnd,this),onmouseover:dt(this._showDataInfo,this,!0),onmouseout:dt(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[oe(e[0],[0,100],n,!0),oe(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ml(n,a,o,i.get("zoomLock")?"all":e,s.minSpan!=null?oe(s.minSpan,l,o,!0):null,s.maxSpan!=null?oe(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=bn([oe(a[0],o,l,!0),oe(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var n=this._displayables,i=this._handleEnds,a=bn(i.slice()),o=this._size;L([0,1],function(d){var v=n.handles[d],p=this._handleHeight;v.attr({scaleX:p/2,scaleY:p/2,x:i[d]+(d?-1:1),y:o[1]/2-p/2})},this),n.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]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.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 Gt,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 n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=e?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=bn(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(v){var p=_o(i.handles[v].parent,this.group),g=Mp(v===0?"right":"left",p),m=this._handleWidth/2+Fft,y=xi([h[v]+(v===0?-m:m),this._size[1]/2],p);a[v].setStyle({x:y[0],y:y[1],verticalAlign:o===qh?"middle":g,align:o===qh?g:"center",text:s[v]})}},t.prototype._formatLabel=function(e,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=e==null||isNaN(e)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return _t(a)?a(e,s):ct(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){e=this._dragging||e;var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!e),i[1].attr("invisible",!e),n.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},t.prototype._onDragMove=function(e,n,i,a){this._dragging=!0,Sa(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=xi([n,i],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._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,i=e.offsetY;this._brushStart=new Rt(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=bn([oe(i.x,o,s,!0),oe(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Sa(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Yh({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,n),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 n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Hft:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=HB(this.dataZoomModel).infoList;if(!e&&n.length){var i=n[0].model.coordinateSystem;e=i.getRect&&i.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}(Aw);function Wft(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function Zz(r){return r==="vertical"?"ns-resize":"ew-resize"}var Gft=$ft;function Kz(r){r.registerComponentModel(Nft),r.registerComponentView(Gft),Pw(r)}function Uft(r){zt(qz),zt(Kz)}var Yft={get:function(r,t,e){var n=Tt((qft[r]||{})[t]);return e&&Q(n)?n[n.length-1]:n}},qft={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Qz=Yft,Jz=xr.mapVisual,jft=xr.eachVisual,Xft=Q,tF=L,Zft=bn,Kft=oe,Qft=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.optionUpdated=function(e,n){var i=this.option;!n&&mz(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var n=this.stateList;e=dt(e,this),this.controllerVisuals=zw(this.option.controller,n,e),this.targetVisuals=zw(this.option.target,n,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,n=[];return e==null||e==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=ce(e),n},t.prototype.eachTargetSeries=function(e,n){L(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&e.call(n,a)},this)},t.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(i){i===e&&(n=!0)}),n},t.prototype.formatValueText=function(e,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],Q(e)&&(e=e.slice(),u=!0);var c=n?e:u?[f(e[0]),f(e[1])]:f(e);if(ct(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(_t(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?i[0]+" "+c[1]:e[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,n=Zft([e.min,e.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(e){var n=this.option.dimension;if(n!=null)return e.getDimensionIndex(n);for(var i=e.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ot(a,i),Ot(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Xft(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:e.get("gradientColor")}}function u(f,h,d){var v=f[h],p=f[d];v&&!p&&(p=f[d]={},tF(v,function(g,m){if(!!xr.isValidType(m)){var y=Qz.get(m,"inactive",s);y!=null&&(p[m]=y,m==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";tF(this.stateList,function(m){var y=this.itemSize,_=f[m];_||(_=f[m]={color:s?v:[v]}),_.symbol==null&&(_.symbol=h&&Tt(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=d&&Tt(d)||(s?y[0]:[y[0],y[0]])),_.symbol=Jz(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var S=-1/0;jft(b,function(x){x>S&&(S=x)}),_.symbolSize=Jz(b,function(x){return Kft(x,[0,S],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Wt),Sm=Qft,eF=[20,140],Jft=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=eF[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=eF[1])},t.prototype._resetRange=function(){var e=this.getExtent(),n=this.option.range;!n||n.auto?(e.auto=1,this.option.range=e):Q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],e[0]),n[1]=Math.min(n[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var n=this.option.controller[e].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),n=bn((this.get("range")||[]).slice());return n[0]>e[1]&&(n[0]=e[1]),n[1]>e[1]&&(n[1]=e[1]),n[0]<e[0]&&(n[0]=e[0]),n[1]<e[0]&&(n[1]=e[0]),n},t.prototype.getValueState=function(e){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=e)&&(n[1]>=i[1]||e<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(e){var n=rF(this,"outOfRange",this.getExtent()),i=rF(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:e(d,v)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=xo(Sm.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(Sm);function rF(r,t,e){if(e[0]===e[1])return e.slice();for(var n=200,i=(e[1]-e[0])/n,a=e[0],o=[],s=0;s<=n&&a<e[1];s++)o.push(a),a+=i;return o.push(e[1]),o}var tht=Jft,eht=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,n){this.ecModel=e,this.api=n},t.prototype.render=function(e,n,i,a){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,n,i,a)},t.prototype.renderBackground=function(e){var n=this.visualMapModel,i=Ws(n.get("padding")||0),a=e.getBoundingRect();e.add(new Gt({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,v){s[d]=v}var f=o.controllerVisuals[a||o.getValueState(e)],h=xr.prepareVisualTypes(f);return L(h,function(d){var v=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",v=f.__alphaForOpacity),xr.dependsOn(d,n)&&v&&v.applyVisual(e,u,c)}),s[n]},t.prototype.positionGroup=function(e){var n=this.visualMapModel,i=this.api;zp(e,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(e,n,i,a){},t.type="visualMap",t}(Me),nF=eht,iF=[["left","right","width"],["top","bottom","height"]];function aF(r,t,e){var n=r.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=iF[o],l=[0,null,10],u={},c=0;c<3;c++)u[iF[1-o][c]]=l[c],u[s[c]]=c===2?e[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=qe(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function wm(r,t){return L(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var ia=oe,rht=L,oF=Math.min,aC=Math.max,nht=12,iht=6,aht=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.doRender=function(e,n,i,a){this._api=i,(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,n=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(n);var i=e.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(e,n,i){if(!!n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Ut({style:me(d,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(e){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=aF(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new Dt;u.add(c),c.add(i.outOfRange=sF()),c.add(i.inRange=sF(null,s?uF(this._orient):null,dt(this._dragHandle,this,"all",!1),dt(this._dragHandle,this,"all",!0))),c.setClipPath(new Gt({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=aC(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),e.add(u)},t.prototype._createHandle=function(e,n,i,a,o,s){var l=dt(this._dragHandle,this,i,!1),u=dt(this._dragHandle,this,i,!0),c=gi(e.get("handleSize"),a[0]),f=$e(e.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=uF(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){Sa(m.event)}}),f.x=a[0]/2,f.useStyle(e.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),zs(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,v=new Ut({cursor:h,draggable:!0,drift:l,onmousemove:function(m){Sa(m.event)},ondragend:u,style:me(d,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var p=[c,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=p,g.handleLabels[i]=v},t.prototype._createIndicator=function(e,n,i,a,o){var s=gi(e.get("indicatorSize"),i[0]),l=$e(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof ur){var c=l.style;l.useStyle(K({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Ut({silent:!0,invisible:!0,style:me(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:iht)+i[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=h,v.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,n,i,a){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():lF(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,n=this._dataInterval=e.getSelected(),i=e.getExtent(),a=[0,e.itemSize[1]];this._handleEnds=[ia(n[0],i,a,!0),ia(n[1],i,a,!0)]},t.prototype._updateInterval=function(e,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];ml(n,a,o,e,0);var s=i.getExtent();this._dataInterval=[ia(a[0],o,s,!0),ia(a[1],o,s,!0)]},t.prototype._updateView=function(e){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new yu(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,n){var i=100,a=[],o=(e[1]-e[0])/i;a.push({color:this.getControllerVisual(e[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=e[0]+o*s;if(l>e[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(e[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(e,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-n[1],e[1]]]},t.prototype._createBarGroup=function(e){var n=this._orient,i=this.visualMapModel.get("inverse");return new Dt(n==="horizontal"&&!i?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,n){if(!!this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();rht([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=e[c];var h=ia(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var v=xi(i.handleLabelPoints[c],_o(f,this.group));s[c].setStyle({x:v[0],y:v[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(!!f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(e,"color",h),v=this.getControllerVisual(e,"symbolSize"),p=ia(e,s,u,!0),g=l[0]-v/2,m={x:f.x,y:f.y};f.y=p,f.x=g;var y=xi(c.indicatorLabelPoint,_o(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),S=this._orient,x=S==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:x?b:"middle",align:x?"center":b});var w={x:g,y:p,style:{fill:d}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(w,T),_.animateTo(C,T)}else f.attr(w),_.attr(C);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var A=0;A<D.length;A++)this._api.enterBlur(D[A])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(n){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,a=e._applyTransform([n.offsetX,n.offsetY],e._shapes.mainGroup,!0,!0);a[1]=oF(aC(0,a[1]),i[1]),e._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,n){var i=this.visualMapModel,a=i.itemSize;if(!!i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();e=oF(aC(o[0],e),o[1]);var l=oht(i,s,o),u=[e-l,e+l],c=ia(e,o,s,!0),f=[ia(u[0],o,s,!0),ia(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,d=[];(n||lF(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var v=E9(h,d);this._dispatchHighDown("downplay",wm(v[0],i)),this._dispatchHighDown("highlight",wm(v[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var n;if(Zs(e.target,function(l){var u=Lt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(!!a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this._api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",wm(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,n,i,a){var o=_o(n,a?null:this.group);return Q(e)?xi(e,o,i):Mp(e,o,i)},t.prototype._dispatchHighDown=function(e,n){n&&n.length&&this.api.dispatchAction({type:e,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(nF);function sF(r,t,e,n){return new Ur({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(i){Sa(i.event)},ondragend:n})}function oht(r,t,e){var n=nht/2,i=r.get("hoverLinkDataSize");return i&&(n=ia(i,t,e,!0)/2),n}function lF(r){var t=r.get("hoverLinkOnHandle");return!!(t==null?r.get("realtime"):t)}function uF(r){return r==="vertical"?"ns-resize":"ew-resize"}var sht=aht,lht={type:"selectDataRange",event:"dataRangeSelected",update:"update"},uht=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},cht=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(n){var i=r.pipelineContext;!n.isTargetSeries(r)||i&&i.large||e.push(ict(n.stateList,n.targetVisuals,dt(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var a=i.getVisualMeta(dt(fht,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(e);o>=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function fht(r,t,e,n){for(var i=t.targetVisuals[n],a=xr.prepareVisualTypes(i),o={color:Kf(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(e,f,h)}return o.color;function f(d){return o[d]}function h(d,v){o[d]=v}}var cF=L;function hht(r){var t=r&&r.visualMap;Q(t)||(t=t?[t]:[]),cF(t,function(e){if(!!e){lc(e,"splitList")&&!lc(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var n=e.pieces;n&&Q(n)&&cF(n,function(i){xt(i)&&(lc(i,"start")&&!lc(i,"min")&&(i.min=i.start),lc(i,"end")&&!lc(i,"max")&&(i.max=i.end))})}})}function lc(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var fF=!1;function hF(r){fF||(fF=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(lht,uht),L(cht,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(hht))}function dF(r){r.registerComponentModel(tht),r.registerComponentView(sht),hF(r)}var dht=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],vht[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Tt(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=J(this._pieceList,function(l){return l=Tt(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,n={},i=xr.listVisualTypes(),a=this.isCategory();L(e.pieces,function(s){L(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),L(n,function(s,l){var u=!1;L(this.stateList,function(c){u=u||o(e,c,l)||o(e.target,c,l)},this),!u&&L(this.stateList,function(c){(e[c]||(e[c]={}))[l]=Qz.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,n){var i=this.option,a=this._pieceList,o=(n?i:e).selected||{};if(i.selected=o,L(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;L(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=Tt(e)},t.prototype.getValueState=function(e){var n=xr.findPieceIndex(e,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=xr.findPieceIndex(l,i);c===e&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(e){var n;if(this.isCategory())n=e.value;else if(e.value!=null)n=e.value;else{var i=e.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=e(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return L(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=xo(Sm.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Sm),vht={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(e)!==a&&e<5;)e++;t.precision=e,a=+a.toFixed(e),t.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),W_(r),L(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;L(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),vF(t,r)},pieces:function(r){var t=this.option;L(t.pieces,function(e,n){xt(e)||(e={value:e});var i={text:"",index:n};if(e.label!=null&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=e[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=xr.retrieveVisuals(e),r.push(i)},this),vF(t,r),W_(r),L(r,function(e){var n=e.close,i=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,i)},this)}};function vF(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var pht=dht,ght=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Je(n.get("showLabel",!0),!f);f&&this._renderEndsText(e,f[0],u,h,l),L(c.viewPieceList,function(d){var v=d.piece,p=new Dt;p.onclick=dt(this._onItemClick,this,v),this._enableHoverLink(p,d.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),h){var m=this.visualMapModel.getValueState(g);p.add(new Ut({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}e.add(p)},this),f&&this._renderEndsText(e,f[1],u,h,l),Ys(n.get("orient"),e,n.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,n){var i=this;e.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:wm(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,n=e.option;if(n.orient==="vertical")return aF(e,this.api,e.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(e,n,i,a,o){if(!!n){var s=new Dt,l=this.visualMapModel.textStyleModel;s.add(new Ut({style:me(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,n=J(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=e.get("text"),a=e.get("orient"),o=e.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(e,n,i){e.add($e(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(e){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(!!a){var o=Tt(i.selected),s=n.getSelectedMapKey(e);a==="single"||a===!0?(o[s]=!0,L(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(nF),mht=ght;function pF(r){r.registerComponentModel(pht),r.registerComponentView(mht),hF(r)}function yht(r){zt(dF),zt(pF)}var _ht={label:{enabled:!0},decal:{show:!1}},gF=jt(),bht={};function xht(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var n=Tt(_ht);Ot(n.label,r.getLocaleModel().get("aria"),!1),Ot(e.option,n,!1),i(),a();function i(){var u=e.getModel("decal"),c=u.get("show");if(c){var f=yt();r.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),gF(h).scope=d}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(_t(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var y=t1(h.ecModel,h.name,bht,r.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",b(_,y))}else{var v=h.getRawData(),p={},g=gF(h).scope;d.each(function(S){var x=d.getRawIndex(S);p[x]=S});var m=v.count();v.each(function(S){var x=p[S],w=v.getName(S)||S+"",C=t1(h.ecModel,w,g,m),T=d.getItemVisual(x,"decal");d.setItemVisual(x,"decal",b(T,C))})}function b(S,x){var w=S?K(K({},x),S):x;return w.dirty=!0,w}})}}function a(){var u=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=bt(c.option,u),!!c.get("enabled")){var f=t.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),d=c.get(["data","maxCount"])||10,v=c.get(["series","maxCount"])||10,p=Math.min(h,v),g;if(!(h<1)){var m=s();if(m){var y=c.get(["general","withTitle"]);g=o(y,{title:m})}else g=c.get(["general","withoutTitle"]);var _=[],b=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(b,{seriesCount:h}),r.eachSeries(function(C,T){if(T<p){var D=void 0,A=C.get("name"),P=A?"withName":"withoutName";D=h>1?c.get(["series","multiple",P]):c.get(["series","single",P]),D=o(D,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var I=C.getData();if(I.count()>d){var O=c.get(["data","partialData"]);D+=o(O,{displayCnt:d})}else D+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),z=[],B=0;B<I.count();B++)if(B<d){var Y=I.getName(B),W=I.getValues(B),et=c.get(["data",Y?"withName":"withoutName"]);z.push(o(et,{name:Y,value:W.join(E)}))}D+=z.join(E)+R,_.push(D)}});var S=c.getModel(["series","multiple","separator"]),x=S.get("middle"),w=S.get("end");g+=_.join(x)+w,f.setAttribute("aria-label",g)}}}function o(u,c){if(!ct(u))return u;var f=u;return L(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return r.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function Sht(r){if(!(!r||!r.aria)){var t=r.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},L(["description","general","series","data"],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function wht(r){r.registerPreprocessor(Sht),r.registerVisual(r.PRIORITY.VISUAL.ARIA,xht)}var mF={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Cht=function(){function r(t){var e=this._condVal=ct(t)?new RegExp(t):BD(t)?t:null;if(e==null){var n="";ie(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return ct(e)?this._condVal.test(t):qt(e)?this._condVal.test(t+""):!1},r}(),Tht=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Mht=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},r}(),Dht=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},r}(),Aht=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Pht=function(){function r(){}return r.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,n=e(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},r}();function oC(r,t){if(r===!0||r===!1){var e=new Tht;return e.value=r,e}var n="";return _F(r)||ie(n),r.and?yF("and",r,t):r.or?yF("or",r,t):r.not?Lht(r,t):Iht(r,t)}function yF(r,t,e){var n=t[r],i="";Q(n)||ie(i),n.length||ie(i);var a=r==="and"?new Mht:new Dht;return a.children=J(n,function(o){return oC(o,e)}),a.children.length||ie(i),a}function Lht(r,t){var e=r.not,n="";_F(e)||ie(n);var i=new Aht;return i.child=oC(e,t),i.child||ie(n),i}function Iht(r,t){for(var e="",n=t.prepareGetValue(r),i=[],a=Ht(r),o=r.parser,s=o?qL(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=pt(mF,u)?mF[u]:u,f=r[u],h=s?s(f):f,d=YY(c,h)||c==="reg"&&new Cht(h);d||ie(e),i.push(d)}}i.length||ie(e);var v=new Pht;return v.valueGetterParam=n,v.valueParser=s,v.getValue=t.getValue,v.subCondList=i,v}function _F(r){return xt(r)&&!mr(r)}var Oht=function(){function r(t,e){this._cond=oC(t,e)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function Eht(r,t){return new Oht(r,t)}var Rht={type:"echarts:filter",transform:function(r){for(var t=r.upstream,e,n=Eht(r.config,{valueGetterAttrMap:yt({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;pt(s,"dimension")||ie(l);var c=t.getDimensionInfo(u);return c||ie(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)e=t.getRawDataItem(a),n.evaluate()&&i.push(e);return{data:i}}},kht={type:"echarts:sort",transform:function(r){var t=r.upstream,e=r.config,n="",i=ce(e);i.length||ie(n);var a=[];L(i,function(c){var f=c.dimension,h=c.order,d=c.parser,v=c.incomparable;if(f==null&&ie(n),h!=="asc"&&h!=="desc"&&ie(n),v&&v!=="min"&&v!=="max"){var p="";ie(p)}if(h!=="asc"&&h!=="desc"){var g="";ie(g)}var m=t.getDimensionInfo(f);m||ie(n);var y=d?qL(d):null;d&&!y&&ie(n),a.push({dimIdx:m.index,parser:y,comparator:new XL(h,v)})});var o=t.sourceFormat;o!==Pr&&o!==$n&&ie(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],v=t.retrieveValueFromItem(c,d.dimIdx),p=t.retrieveValueFromItem(f,d.dimIdx);d.parser&&(v=d.parser(v),p=d.parser(p));var g=d.comparator.evaluate(v,p);if(g!==0)return g}return 0}),{data:s}}};function Nht(r){r.registerTransform(Rht),r.registerTransform(kht)}var Bht=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,n,i){r.prototype.init.call(this,e,n,i),this._sourceManager=new eI(this),rI(this)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),rI(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Ki},t}(Wt),zht=function(r){q(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(Me);function Fht(r){r.registerComponentModel(Bht),r.registerComponentView(zht)}var aa=ji.CMD;function uc(r,t){return Math.abs(r-t)<1e-5}function sC(r){var t=r.data,e=r.len(),n=[],i,a=0,o=0,s=0,l=0;function u(I,O){i&&i.length>2&&n.push(i),i=[I,O]}function c(I,O,E,R){uc(I,E)&&uc(O,R)||i.push(I,O,E,R,E,R)}function f(I,O,E,R,z,B){var Y=Math.abs(O-I),W=Math.tan(Y/4)*4/3,et=O<I?-1:1,V=Math.cos(I),H=Math.sin(I),G=Math.cos(O),j=Math.sin(O),tt=V*z+E,nt=H*B+R,rt=G*z+E,vt=j*B+R,ft=z*W*et,lt=B*W*et;i.push(tt-ft*H,nt+lt*V,rt+ft*j,vt-lt*G,rt,vt)}for(var h,d,v,p,g=0;g<e;){var m=t[g++],y=g===1;switch(y&&(a=t[g],o=t[g+1],s=a,l=o,(m===aa.L||m===aa.C||m===aa.Q)&&(i=[s,l])),m){case aa.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case aa.L:h=t[g++],d=t[g++],c(a,o,h,d),a=h,o=d;break;case aa.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case aa.Q:h=t[g++],d=t[g++],v=t[g++],p=t[g++],i.push(a+2/3*(h-a),o+2/3*(d-o),v+2/3*(h-v),p+2/3*(d-p),v,p),a=v,o=p;break;case aa.A:var _=t[g++],b=t[g++],S=t[g++],x=t[g++],w=t[g++],C=t[g++]+w;g+=1;var T=!t[g++];h=Math.cos(w)*S+_,d=Math.sin(w)*x+b,y?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(C)*S+_,o=Math.sin(C)*x+b;for(var D=(T?-1:1)*Math.PI/2,A=w;T?A>C:A<C;A+=D){var P=T?Math.max(A+D,C):Math.min(A+D,C);f(A,P,_,b,S,x)}break;case aa.R:s=a=t[g++],l=o=t[g++],h=s+t[g++],d=l+t[g++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case aa.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function lC(r,t,e,n,i,a,o,s,l,u){if(uc(r,e)&&uc(t,n)&&uc(i,o)&&uc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,d=s-t,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var p=e-r,g=n-t,m=i-o,y=a-s,_=p*p+g*g,b=m*m+y*y;if(_<f&&b<f){l.push(o,s);return}var S=h*p+d*g,x=-h*m-d*y,w=_-S*S,C=b-x*x;if(w<f&&S>=0&&C<f&&x>=0){l.push(o,s);return}var T=[],D=[];lo(r,e,i,o,.5,T),lo(t,n,a,s,.5,D),lC(T[0],D[0],T[1],D[1],T[2],D[2],T[3],D[3],l,u),lC(T[4],D[4],T[5],D[5],T[6],D[6],T[7],D[7],l,u)}function Vht(r,t){var e=sC(r),n=[];t=t||1;for(var i=0;i<e.length;i++){var a=e[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],v=a[u++],p=a[u++];lC(s,l,c,f,h,d,v,p,o,t),s=v,l=p}n.push(o)}return n}function bF(r,t,e){var n=r[t],i=r[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*e)),s=Math.floor(e/o);s===0&&(s=1,o=e);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=e-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function xF(r,t,e){for(var n=r.r0,i=r.r,a=r.startAngle,o=r.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=bF([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var v=(c?u:s)/f[d],p=0;p<f[d];p++){var g={};c?(g.startAngle=a+h*d,g.endAngle=a+h*(d+1),g.r0=n+v*p,g.r=n+v*(p+1)):(g.startAngle=a+v*p,g.endAngle=a+v*(p+1),g.r0=n+h*d,g.r=n+h*(d+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,e.push(g)}}function Hht(r,t,e){for(var n=r.width,i=r.height,a=n>i,o=bF([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var d=r[l]/o[h],v=0;v<o[h];v++){var p={};p[u]=h*f,p[c]=v*d,p[s]=f,p[l]=d,p.x+=r.x,p.y+=r.y,e.push(p)}}function SF(r,t,e,n){return r*n-e*t}function $ht(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,c=o-i,f=s-a,h=SF(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=r-i,v=t-a,p=SF(d,v,c,f)/h;return p<0||p>1?null:new Rt(p*l+r,p*u+t)}function Wht(r,t,e){var n=new Rt;Rt.sub(n,e,t),n.normalize();var i=new Rt;Rt.sub(i,r,t);var a=i.dot(n);return a}function cc(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Ght(r,t,e){for(var n=r.length,i=[],a=0;a<n;a++){var o=r[a],s=r[(a+1)%n],l=$ht(o[0],o[1],s[0],s[1],t.x,t.y,e.x,e.y);l&&i.push({projPt:Wht(l,t,e),pt:l,idx:a})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],v=[h],p=[d],a=u.idx+1;a<=c.idx;a++)cc(v,r[a].slice());cc(v,d),cc(v,h);for(var a=c.idx+1;a<=u.idx+n;a++)cc(p,r[a%n].slice());return cc(p,h),cc(p,d),[{points:v},{points:p}]}function wF(r){var t=r.points,e=[],n=[];op(t,e,n);var i=new kt(e[0],e[1],n[0]-e[0],n[1]-e[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Rt,c=new Rt;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),Ght(t,u,c)}function Cm(r,t,e,n){if(e===1)n.push(t);else{var i=Math.floor(e/2),a=r(t);Cm(r,a[0],i,n),Cm(r,a[1],e-i,n)}return n}function Uht(r,t){for(var e=[],n=0;n<t;n++)e.push(Cb(r));return e}function Yht(r,t){t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel}function qht(r){for(var t=[],e=0;e<r.length;)t.push([r[e++],r[e++]]);return t}function jht(r,t){var e=[],n=r.shape,i;switch(r.type){case"rect":Hht(n,t,e),i=Gt;break;case"sector":xF(n,t,e),i=Gr;break;case"circle":xF({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,e),i=Gr;break;default:var a=r.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=J(Vht(r.getUpdatedPathProxy(),o),function(m){return qht(m)}),l=s.length;if(l===0)Cm(wF,{points:s[0]},t,e);else if(l===t)for(var u=0;u<l;u++)e.push({points:s[u]});else{var c=0,f=J(s,function(m){var y=[],_=[];op(m,y,_);var b=(_[1]-y[1])*(_[0]-y[0]);return c+=b,{poly:m,area:b}});f.sort(function(m,y){return y.area-m.area});for(var h=t,u=0;u<l;u++){var d=f[u];if(h<=0)break;var v=u===l-1?h:Math.ceil(d.area/c*t);v<0||(Cm(wF,{points:d.poly},v,e),h-=v)}}i=Ur;break}if(!i)return Uht(r,t);for(var p=[],u=0;u<e.length;u++){var g=new i;g.setShape(e[u]),Yht(r,g),p.push(g)}return p}function Xht(r,t){var e=r.length,n=t.length;if(e===n)return[r,t];for(var i=[],a=[],o=e<n?r:t,s=Math.min(e,n),l=Math.abs(n-e)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var v=o[d-2],p=o[d-1],g=o[d++],m=o[d++],y=o[d++],_=o[d++],b=o[d++],S=o[d++];if(h<=0){f.push(g,m,y,_,b,S);continue}for(var x=Math.min(h,c-1)+1,w=1;w<=x;w++){var C=w/x;lo(v,g,y,b,C,i),lo(p,m,_,S,C,a),v=i[3],p=a[3],f.push(i[1],a[1],i[2],a[2],v,p),g=i[5],m=a[5],y=i[6],_=a[6]}h-=x-1}return o===r?[f,t]:[r,f]}function CF(r,t){for(var e=r.length,n=r[e-2],i=r[e-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function Zht(r,t){for(var e,n,i,a=[],o=[],s=0;s<Math.max(r.length,t.length);s++){var l=r[s],u=t[s],c=void 0,f=void 0;l?u?(e=Xht(l,u),c=e[0],f=e[1],n=c,i=f):(f=CF(i||l,l),c=l):(c=CF(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function TF(r){for(var t=0,e=0,n=0,i=r.length,a=0,o=i-2;a<i;o=a,a+=2){var s=r[o],l=r[o+1],u=r[a],c=r[a+1],f=s*c-u*l;t+=f,e+=(s+u)*f,n+=(l+c)*f}return t===0?[r[0]||0,r[1]||0]:[e/t/3,n/t/3,t]}function Kht(r,t,e,n){for(var i=(r.length-2)/6,a=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,v=r[d]-e[0],p=r[d+1]-e[1],g=t[h]-n[0],m=t[h+1]-n[1],y=g-v,_=m-p;f+=y*y+_*_}f<a&&(a=f,o=u)}return o}function Qht(r){for(var t=[],e=r.length,n=0;n<e;n+=2)t[n]=r[e-n-2],t[n+1]=r[e-n-1];return t}function Jht(r,t,e,n){for(var i=[],a,o=0;o<r.length;o++){var s=r[o],l=t[o],u=TF(s),c=TF(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,v=1/0,p=[],g=s.length;a&&(s=Qht(s));for(var m=Kht(s,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var b=(m+_)%y+2;f[_+2]=s[b]-u[0],f[_+3]=s[b+1]-u[1]}if(f[0]=s[m]-u[0],f[1]=s[m+1]-u[1],e>0)for(var S=n/e,x=-n/2;x<=n/2;x+=S){for(var w=Math.sin(x),C=Math.cos(x),T=0,_=0;_<s.length;_+=2){var D=f[_],A=f[_+1],P=l[_]-c[0],I=l[_+1]-c[1],O=P*C-I*w,E=P*w+I*C;p[_]=O,p[_+1]=E;var R=O-D,z=E-A;T+=R*R+z*z}if(T<v){v=T,d=x;for(var B=0;B<p.length;B++)h[B]=p[B]}}else for(var Y=0;Y<g;Y+=2)h[Y]=l[Y]-c[0],h[Y+1]=l[Y+1]-c[1];i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function Tm(r){return r.__isCombineMorphing}var MF="__mOriginal_";function Mm(r,t,e){var n=MF+t,i=r[n]||r[t];r[n]||(r[n]=r[t]);var a=e.replace,o=e.after,s=e.before;r[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function jh(r,t){var e=MF+t;r[e]&&(r[t]=r[e],r[e]=null)}function DF(r,t){for(var e=0;e<r.length;e++)for(var n=r[e],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function AF(r,t){var e=r.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=Zht(sC(e),sC(n)),a=i[0],o=i[1],s=r.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&DF(a,s),l&&DF(o,l),Mm(t,"updateTransform",{replace:u}),t.transform=null;var c=Jht(a,o,10,Math.PI),f=[];Mm(t,"buildPath",{replace:function(h){for(var d=t.__morphT,v=1-d,p=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,b=m.rotation*d,S=m.fromCp,x=m.toCp,w=Math.sin(b),C=Math.cos(b);qc(p,S,x,d);for(var T=0;T<y.length;T+=2){var D=y[T],A=y[T+1],P=_[T],I=_[T+1],O=D*v+P*d,E=A*v+I*d;f[T]=O*C-E*w+p[0],f[T+1]=O*w+E*C+p[1]}var R=f[0],z=f[1];h.moveTo(R,z);for(var T=2;T<y.length;){var P=f[T++],I=f[T++],B=f[T++],Y=f[T++],W=f[T++],et=f[T++];R===P&&z===I&&B===W&&Y===et?h.lineTo(W,et):h.bezierCurveTo(P,I,B,Y,W,et),R=W,z=et}}}})}function uC(r,t,e){if(!r||!t)return t;var n=e.done,i=e.during;AF(r,t),t.__morphT=0;function a(){jh(t,"buildPath"),jh(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},bt({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},e)),t}function tdt(r,t,e,n,i,a){var o=16;r=i===e?0:Math.round(32767*(r-e)/(i-e)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Dm(r){var t=1/0,e=1/0,n=-1/0,i=-1/0,a=J(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),e=Math.min(f,e),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=J(a,function(s,l){return{cp:s,z:tdt(s[0],s[1],t,e,n,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function PF(r){return jht(r.path,r.count)}function cC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function edt(r,t,e){var n=[];function i(S){for(var x=0;x<S.length;x++){var w=S[x];Tm(w)?i(w.childrenRef()):w instanceof Ft&&n.push(w)}}i(r);var a=n.length;if(!a)return cC();var o=e.dividePath||PF,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),cC();n=Dm(n),s=Dm(s);for(var l=e.done,u=e.during,c=e.individualDelay,f=new Ca,h=0;h<a;h++){var d=n[h],v=s[h];v.parent=t,v.copyTransform(f),c||AF(d,v)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function p(S){for(var x=0;x<s.length;x++)s[x].addSelfToZr(S)}Mm(t,"addSelfToZr",{after:function(S){p(S)}}),Mm(t,"removeSelfFromZr",{after:function(S){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(S)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,jh(t,"addSelfToZr"),jh(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},h=0;h<m;h++){var b=c?bt({delay:(e.delay||0)+c(h,m,n[h],s[h]),done:_},e):e;uC(n[h],s[h],b)}else t.__morphT=0,t.animateTo({__morphT:1},bt({during:function(S){for(var x=0;x<m;x++){var w=s[x];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(S)},done:function(){g();for(var S=0;S<r.length;S++)jh(r[S],"updateTransform");l&&l()}},e));return t.__zr&&p(t.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function rdt(r,t,e){var n=t.length,i=[],a=e.dividePath||PF;function o(d){for(var v=0;v<d.length;v++){var p=d[v];Tm(p)?o(p.childrenRef()):p instanceof Ft&&i.push(p)}}if(Tm(r)){o(r.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(Cb(i[l++%s]));i.length=n}else{i=a({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),cC()}i=Dm(i),t=Dm(t);for(var f=e.individualDelay,u=0;u<n;u++){var h=f?bt({delay:(e.delay||0)+f(u,n,i[u],t[u])},e):e;uC(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function LF(r){return Q(r[0])}function IF(r,t){for(var e=[],n=r.length,i=0;i<n;i++)e.push({one:r[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)e[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!e[i].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var a=l.length,u=Math.ceil(a/2);e[i].many=l.slice(u,a),e[s].many=l.slice(0,u),s++}return e}var ndt={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var i=Cb(r.path);i.setStyle("opacity",e),t.push(i)}return t},split:null};function fC(r,t,e,n,i,a){if(!r.length||!t.length)return;var o=_u("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;LF(r)&&(u=r,c=t),LF(t)&&(u=t,c=r);function f(m,y,_,b,S){var x=m.many,w=m.one;if(x.length===1&&!S){var C=y?x[0]:w,T=y?w:x[0];if(Tm(C))f({many:[C],one:T},!0,_,b,!0);else{var D=s?bt({delay:s(_,b)},l):l;uC(C,T,D),a(C,T,C,T,D)}}else for(var A=bt({dividePath:ndt[e],individualDelay:s&&function(z,B,Y,W){return s(z+_,b)}},l),P=y?edt(x,w,A):rdt(w,x,A),I=P.fromIndividuals,O=P.toIndividuals,E=I.length,R=0;R<E;R++){var D=s?bt({delay:s(R,E)},l):l;a(I[R],O[R],y?x[R]:m.one,y?m.one:x[R],D)}}for(var h=u?u===r:r.length>t.length,d=u?IF(c,u):IF(h?t:r,[h?r:t]),v=0,p=0;p<d.length;p++)v+=d[p].many.length;for(var g=0,p=0;p<d.length;p++)f(d[p],h,g,v),g+=d[p].many.length}function wl(r){if(!r)return[];if(Q(r)){for(var t=[],e=0;e<r.length;e++)t.push(wl(r[e]));return t}var n=[];return r.traverse(function(i){i instanceof Ft&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var OF=1e4,idt=jt();function adt(r){for(var t=r.dimensions,e=0;e<t.length;e++){var n=r.getDimensionInfo(t[e]);if(n&&n.otherDims.itemGroupId===0)return t[e]}}function EF(r){var t=[];return L(r,function(e){var n=e.data;if(!(n.count()>OF))for(var i=n.getIndices(),a=adt(n),o=0;o<i.length;o++)t.push({dataGroupId:e.dataGroupId,data:n,dim:e.dim||a,divide:e.divide,dataIndex:o})}),t}function hC(r,t,e){r.traverse(function(n){n instanceof Ft&&Te(n,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function dC(r){if(r.parent){var t=r.getComputedTransform();r.setLocalTransform(t),r.parent.remove(r)}}function fc(r){r.stopAnimation(),r.isGroup&&r.traverse(function(t){t.stopAnimation()})}function odt(r,t,e){var n=_u("update",e,t);n&&r.traverse(function(i){if(i instanceof Bn){var a=MU(i);a&&i.animateFrom({style:a},n)}})}function sdt(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++){var i=r[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function RF(r,t,e){var n=EF(r),i=EF(t);function a(m,y,_,b,S){(_||m)&&y.animateFrom({style:_&&_!==m?K(K({},_.style),m.style):m.style},S)}function o(m){for(var y=0;y<m.length;y++)if(m[y].dim)return m[y].dim}var s=o(n),l=o(i),u=!1;function c(m,y){return function(_){var b=_.data,S=_.dataIndex;if(y)return b.getId(S);var x=_.dataGroupId,w=m?s||l:l||s,C=w&&b.getDimensionInfo(w),T=C&&C.ordinalMeta;if(C){var D=b.get(C.name,S);return T&&T.categories[D]||D+""}var A=b.getRawDataItem(S);return A&&A.groupId?A.groupId+"":x||b.getId(S)}}var f=sdt(n,i),h={};if(!f)for(var d=0;d<i.length;d++){var v=i[d],p=v.data.getItemGraphicEl(v.dataIndex);p&&(h[p.id]=!0)}function g(m,y){var _=n[y],b=i[m],S=b.data.hostModel,x=_.data.getItemGraphicEl(_.dataIndex),w=b.data.getItemGraphicEl(b.dataIndex);if(x===w){w&&odt(w,b.dataIndex,S);return}x&&h[x.id]||w&&(fc(w),x?(fc(x),dC(x),u=!0,fC(wl(x),wl(w),b.divide,S,m,a)):hC(w,S,m))}new Ia(n,i,c(!0,f),c(!1,f),null,"multiple").update(g).updateManyToOne(function(m,y){var _=i[m],b=_.data,S=b.hostModel,x=b.getItemGraphicEl(_.dataIndex),w=ae(J(y,function(C){return n[C].data.getItemGraphicEl(n[C].dataIndex)}),function(C){return C&&C!==x&&!h[C.id]});x&&(fc(x),w.length?(L(w,function(C){fc(C),dC(C)}),u=!0,fC(wl(w),wl(x),_.divide,S,m,a)):hC(x,S,_.dataIndex))}).updateOneToMany(function(m,y){var _=n[y],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var S=ae(J(m,function(w){return i[w].data.getItemGraphicEl(i[w].dataIndex)}),function(w){return w&&w!==b}),x=i[m[0]].data.hostModel;S.length&&(L(S,function(w){return fc(w)}),b?(fc(b),dC(b),u=!0,fC(wl(b),wl(S),_.divide,x,m[0],a)):L(S,function(w){return hC(w,x,m[0])}))}}).updateManyToMany(function(m,y){new Ia(y,m,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return i[_].data.getId(i[_].dataIndex)}).update(function(_,b){g(m[_],y[b])}).execute()}).execute(),u&&L(t,function(m){var y=m.data,_=y.hostModel,b=_&&e.getViewOfSeriesModel(_),S=_u("update",_,0);b&&_.isAnimationEnabled()&&S&&S.duration>0&&b.group.traverse(function(x){x instanceof Ft&&!x.animators.length&&x.animateFrom({style:{opacity:0}},S)})})}function kF(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function NF(r){return Q(r)?r.sort().join(","):r}function Ho(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function ldt(r,t){var e=yt(),n=yt(),i=yt();return L(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=kF(a),c=NF(u);n.set(c,{dataGroupId:s,data:l}),Q(u)&&L(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),L(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=kF(a),u=NF(l),c=n.get(u);if(c)e.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ho(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ho(s),data:s}]});else if(Q(l)){var f=[];L(l,function(v){var p=n.get(v);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ho(p.data),data:p.data})}),f.length&&e.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ho(s)}]})}else{var h=i.get(l);if(h){var d=e.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ho(h.data)}],newSeries:[]},e.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Ho(s)})}}}}),e}function BF(r,t){for(var e=0;e<r.length;e++){var n=t.seriesIndex!=null&&t.seriesIndex===r[e].seriesIndex||t.seriesId!=null&&t.seriesId===r[e].id;if(n)return e}}function udt(r,t,e,n){var i=[],a=[];L(ce(r.from),function(o){var s=BF(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Ho(t.oldData[s]),dim:o.dimension})}),L(ce(r.to),function(o){var s=BF(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Ho(l),dim:o.dimension})}}),i.length>0&&a.length>0&&RF(i,a,n)}function cdt(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){L(ce(n.seriesTransition),function(i){L(ce(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Gp]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(t,e,n){var i=idt(e);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)L(ce(a),function(d){udt(d,i,n,e)});else{var o=ldt(i,n);L(o.keys(),function(d){var v=o.get(d);RF(v.oldSeries,v.newSeries,e)})}L(n.updatedSeries,function(d){d[Gp]&&(d[Gp]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<OF&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}zt([TK]),zt([yK]),zt([XK,dQ,MQ,dJ,LJ,Ctt,eet,Wet,mrt,Mrt,Brt,Hnt,vit,Dit,qit,tat,yat,Aat,Hat,Xat,lot,qot]),zt(gst),zt(Zst),zt(Nk),zt(dlt),zt(i5),zt(blt),zt(Plt),zt(Lut),zt(Jut),zt(Fh),zt(_ct),zt(Sct),zt(Bct),zt(qct),zt(eft),zt(uft),zt(wft),zt(Uft),zt(qz),zt(Kz),zt(yht),zt(dF),zt(pF),zt(wht),zt(Nht),zt(Fht),zt(cdt),zt(zZ);var fdt=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:zb,version:xj,dependencies:Sj,PRIORITY:nO,init:Fj,connect:Vj,disConnect:yO,disconnect:Hj,dispose:$j,getInstanceByDom:F1,getInstanceById:Wj,registerTheme:V1,registerPreprocessor:H1,registerProcessor:$1,registerPostInit:_O,registerPostUpdate:bO,registerUpdateLifecycle:lg,registerAction:Ci,registerCoordinateSystem:xO,getCoordinateSystemDimensions:Gj,registerLayout:SO,registerVisual:Do,registerLoading:G1,setCanvasCreator:Uj,registerMap:CO,getMap:Yj,registerTransform:TO,dataTool:qj,throttle:qp,use:zt,setPlatformAPI:ID,parseGeoJSON:sx,parseGeoJson:sx,env:Yt,Model:fe,Axis:Un,innerDrawElementOnCanvas:C1,zrender:p9,matrix:r7,vector:V8,zrUtil:E8,color:L7,helper:tZ,number:oZ,time:sZ,graphic:lZ,format:uZ,util:cZ,List:Or,ComponentModel:Wt,ComponentView:Me,SeriesModel:_e,ChartView:he,extendComponentModel:xZ,extendComponentView:SZ,extendSeriesModel:wZ,extendChartView:CZ},Symbol.toStringTag,{value:"Module"})),Cl={},hc={},zF={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=1,e=function(){return"".concat(t++)};r.default=e})(zF);var Am={},Pm={},vC={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){n.apply(o,l)},i)}};r.default=t})(vC);var Va={};Object.defineProperty(Va,"__esModule",{value:!0}),Va.SensorTabIndex=Va.SensorClassName=Va.SizeSensorId=void 0;var hdt="size-sensor-id";Va.SizeSensorId=hdt;var ddt="size-sensor-object";Va.SensorClassName=ddt;var vdt="-1";Va.SensorTabIndex=vdt,Object.defineProperty(Pm,"__esModule",{value:!0}),Pm.createSensor=void 0;var pdt=gdt(vC),FF=Va;function gdt(r){return r&&r.__esModule?r:{default:r}}var mdt=function(t){var e=void 0,n=[],i=function(){getComputedStyle(t).position==="static"&&(t.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",a),a()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",FF.SensorClassName),c.setAttribute("tabindex",FF.SensorTabIndex),c.type="text/html",t.appendChild(c),c.data="about:blank",c},a=(0,pdt.default)(function(){n.forEach(function(u){u(t)})}),o=function(c){e||(e=i()),n.indexOf(c)===-1&&n.push(c)},s=function(){e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",a),e.parentNode.removeChild(e),e=void 0,n=[])},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&e&&s()};return{element:t,bind:o,destroy:s,unbind:l}};Pm.createSensor=mdt;var Lm={};Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.createSensor=void 0;var ydt=_dt(vC);function _dt(r){return r&&r.__esModule?r:{default:r}}var bdt=function(t){var e=void 0,n=[],i=(0,ydt.default)(function(){n.forEach(function(u){u(t)})}),a=function(){var c=new ResizeObserver(i);return c.observe(t),i(),c},o=function(c){e||(e=a()),n.indexOf(c)===-1&&n.push(c)},s=function(){e.disconnect(),n=[],e=void 0},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&e&&s()};return{element:t,bind:o,destroy:s,unbind:l}};Lm.createSensor=bdt,Object.defineProperty(Am,"__esModule",{value:!0}),Am.createSensor=void 0;var xdt=Pm,Sdt=Lm,wdt=typeof ResizeObserver!="undefined"?Sdt.createSensor:xdt.createSensor;Am.createSensor=wdt,Object.defineProperty(hc,"__esModule",{value:!0}),hc.removeSensor=hc.getSensor=void 0;var Cdt=Mdt(zF),Tdt=Am,Im=Va;function Mdt(r){return r&&r.__esModule?r:{default:r}}var Xh={},Ddt=function(t){var e=t.getAttribute(Im.SizeSensorId);if(e&&Xh[e])return Xh[e];var n=(0,Cdt.default)();t.setAttribute(Im.SizeSensorId,n);var i=(0,Tdt.createSensor)(t);return Xh[n]=i,i};hc.getSensor=Ddt;var Adt=function(t){var e=t.element.getAttribute(Im.SizeSensorId);t.element.removeAttribute(Im.SizeSensorId),t.destroy(),e&&Xh[e]&&delete Xh[e]};hc.removeSensor=Adt,Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.ver=HF=Cl.clear=VF=Cl.bind=void 0;var pC=hc,Pdt=function(t,e){var n=(0,pC.getSensor)(t);return n.bind(e),function(){n.unbind(e)}},VF=Cl.bind=Pdt,Ldt=function(t){var e=(0,pC.getSensor)(t);(0,pC.removeSensor)(e)},HF=Cl.clear=Ldt,Idt="1.0.1";Cl.ver=Idt;function $F(r,t){var e={};return t.forEach(function(n){e[n]=r[n]}),e}function gC(r){return typeof r=="function"}function Odt(r){return typeof r=="string"}var dc=function r(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(i=n;i--!==0;)if(!r(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!r(t[o],e[o]))return!1}return!0}return t!==t&&e!==e},Edt=function(r){PD(t,r);function t(e){var n=r.call(this,e)||this;return n.echarts=e.echarts,n.ele=null,n.isInitialResize=!0,n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var n=this.props.shouldSetOption;if(!(gC(n)&&!n(e,this.props))){if(!dc(e.theme,this.props.theme)||!dc(e.opts,this.props.opts)||!dc(e.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var i=["option","notMerge","lazyUpdate","showLoading","loadingOption"];dc($F(this.props,i),$F(e,i))||this.updateEChartsOption(),(!dc(e.style,this.props.style)||!dc(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},t.prototype.dispose=function(){if(this.ele){try{HF(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){var e=this,n=this.props,i=n.onEvents,a=n.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,i||{}),gC(a)&&a(o),this.ele&&VF(this.ele,function(){e.resize()})},t.prototype.bindEvents=function(e,n){function i(o,s){Odt(o)&&gC(s)&&e.on(o,function(l){s(l,e)})}for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i(a,n[a])},t.prototype.updateEChartsOption=function(){var e=this.props,n=e.option,i=e.notMerge,a=i===void 0?!1:i,o=e.lazyUpdate,s=o===void 0?!1:o,l=e.showLoading,u=e.loadingOption,c=u===void 0?null:u,f=this.getEchartsInstance();return f.setOption(n,a,s),l?f.showLoading(c):f.hideLoading(),f},t.prototype.resize=function(){var e=this.getEchartsInstance();if(!this.isInitialResize)try{e.resize()}catch(n){console.warn(n)}this.isInitialResize=!1},t.prototype.render=function(){var e=this,n=this.props,i=n.style,a=n.className,o=a===void 0?"":a,s=B0({height:300},i);return M("div",{ref:function(l){e.ele=l},style:s,className:"echarts-for-react "+o})},t}(k.PureComponent),de=function(r){PD(t,r);function t(e){var n=r.call(this,e)||this;return n.echarts=fdt,n}return t}(Edt);const Rdt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var c;const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(f=>f.label)},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r.labels}],yAxis:[{type:"value",position:i.axis}],series:(c=r.datasets)==null?void 0:c.map(f=>({data:f.data,type:"line",name:f.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:u}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:f=>{s(f.name)}}})]})};/*!
|
|
232
|
+
* Chart.js v3.9.1
|
|
233
|
+
* https://www.chartjs.org
|
|
234
|
+
* (c) 2022 Chart.js Contributors
|
|
235
|
+
* Released under the MIT License
|
|
236
|
+
*/function Ha(){}const kdt=function(){let r=0;return function(){return r++}}();function ye(r){return r===null||typeof r=="undefined"}function Pe(r){if(Array.isArray&&Array.isArray(r))return!0;const t=Object.prototype.toString.call(r);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ue(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}const Sr=r=>(typeof r=="number"||r instanceof Number)&&isFinite(+r);function Qn(r,t){return Sr(r)?r:t}function Jt(r,t){return typeof r=="undefined"?t:r}const Ndt=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:r/t,WF=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*t:+r;function Ae(r,t,e){if(r&&typeof r.call=="function")return r.apply(e,t)}function xe(r,t,e,n){let i,a,o;if(Pe(r))if(a=r.length,n)for(i=a-1;i>=0;i--)t.call(e,r[i],i);else for(i=0;i<a;i++)t.call(e,r[i],i);else if(ue(r))for(o=Object.keys(r),a=o.length,i=0;i<a;i++)t.call(e,r[o[i]],o[i])}function Om(r,t){let e,n,i,a;if(!r||!t||r.length!==t.length)return!1;for(e=0,n=r.length;e<n;++e)if(i=r[e],a=t[e],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Em(r){if(Pe(r))return r.map(Em);if(ue(r)){const t=Object.create(null),e=Object.keys(r),n=e.length;let i=0;for(;i<n;++i)t[e[i]]=Em(r[e[i]]);return t}return r}function GF(r){return["__proto__","prototype","constructor"].indexOf(r)===-1}function Bdt(r,t,e,n){if(!GF(r))return;const i=t[r],a=e[r];ue(i)&&ue(a)?Zh(i,a,n):t[r]=Em(a)}function Zh(r,t,e){const n=Pe(t)?t:[t],i=n.length;if(!ue(r))return r;e=e||{};const a=e.merger||Bdt;for(let o=0;o<i;++o){if(t=n[o],!ue(t))continue;const s=Object.keys(t);for(let l=0,u=s.length;l<u;++l)a(s[l],r,t,e)}return r}function Kh(r,t){return Zh(r,t,{merger:zdt})}function zdt(r,t,e){if(!GF(r))return;const n=t[r],i=e[r];ue(n)&&ue(i)?Kh(n,i):Object.prototype.hasOwnProperty.call(t,r)||(t[r]=Em(i))}const UF={"":r=>r,x:r=>r.x,y:r=>r.y};function $o(r,t){return(UF[t]||(UF[t]=Fdt(t)))(r)}function Fdt(r){const t=Vdt(r);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Vdt(r){const t=r.split("."),e=[];let n="";for(const i of t)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function mC(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Jn=r=>typeof r!="undefined",Wo=r=>typeof r=="function",YF=(r,t)=>{if(r.size!==t.size)return!1;for(const e of r)if(!t.has(e))return!1;return!0};function Hdt(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}const ke=Math.PI,De=2*ke,$dt=De+ke,Rm=Number.POSITIVE_INFINITY,Wdt=ke/180,Ge=ke/2,Qh=ke/4,qF=ke*2/3,ti=Math.log10,oa=Math.sign;function jF(r){const t=Math.round(r);r=Jh(r,t,r/1e3)?t:r;const e=Math.pow(10,Math.floor(ti(r))),n=r/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function Gdt(r){const t=[],e=Math.sqrt(r);let n;for(n=1;n<e;n++)r%n===0&&(t.push(n),t.push(r/n));return e===(e|0)&&t.push(e),t.sort((i,a)=>i-a).pop(),t}function vc(r){return!isNaN(parseFloat(r))&&isFinite(r)}function Jh(r,t,e){return Math.abs(r-t)<e}function Udt(r,t){const e=Math.round(r);return e-t<=r&&e+t>=r}function XF(r,t,e){let n,i,a;for(n=0,i=r.length;n<i;n++)a=r[n][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Ai(r){return r*(ke/180)}function yC(r){return r*(180/ke)}function ZF(r){if(!Sr(r))return;let t=1,e=0;for(;Math.round(r*t)/t!==r;)t*=10,e++;return e}function KF(r,t){const e=t.x-r.x,n=t.y-r.y,i=Math.sqrt(e*e+n*n);let a=Math.atan2(n,e);return a<-.5*ke&&(a+=De),{angle:a,distance:i}}function _C(r,t){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function Ydt(r,t){return(r-t+$dt)%De-ke}function Pi(r){return(r%De+De)%De}function td(r,t,e,n){const i=Pi(r),a=Pi(t),o=Pi(e),s=Pi(a-i),l=Pi(o-i),u=Pi(i-a),c=Pi(i-o);return i===a||i===o||n&&a===o||s>l&&u<c}function Er(r,t,e){return Math.max(t,Math.min(e,r))}function qdt(r){return Er(r,-32768,32767)}function Go(r,t,e,n=1e-6){return r>=Math.min(t,e)-n&&r<=Math.max(t,e)+n}function bC(r,t,e){e=e||(o=>r[o]<t);let n=r.length-1,i=0,a;for(;n-i>1;)a=i+n>>1,e(a)?i=a:n=a;return{lo:i,hi:n}}const Tl=(r,t,e,n)=>bC(r,e,n?i=>r[i][t]<=e:i=>r[i][t]<e),jdt=(r,t,e)=>bC(r,e,n=>r[n][t]>=e);function Xdt(r,t,e){let n=0,i=r.length;for(;n<i&&r[n]<t;)n++;for(;i>n&&r[i-1]>e;)i--;return n>0||i<r.length?r.slice(n,i):r}const QF=["push","pop","shift","splice","unshift"];function Zdt(r,t){if(r._chartjs){r._chartjs.listeners.push(t);return}Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),QF.forEach(e=>{const n="_onData"+mC(e),i=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return r._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...a)}),o}})})}function JF(r,t){const e=r._chartjs;if(!e)return;const n=e.listeners,i=n.indexOf(t);i!==-1&&n.splice(i,1),!(n.length>0)&&(QF.forEach(a=>{delete r[a]}),delete r._chartjs)}function tV(r){const t=new Set;let e,n;for(e=0,n=r.length;e<n;++e)t.add(r[e]);return t.size===n?r:Array.from(t)}const eV=function(){return typeof window=="undefined"?function(r){return r()}:window.requestAnimationFrame}();function rV(r,t,e){const n=e||(o=>Array.prototype.slice.call(o));let i=!1,a=[];return function(...o){a=n(o),i||(i=!0,eV.call(window,()=>{i=!1,r.apply(t,a)}))}}function Kdt(r,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(r,t,n)):r.apply(this,n),t}}const xC=r=>r==="start"?"left":r==="end"?"right":"center",Rr=(r,t,e)=>r==="start"?t:r==="end"?e:(t+e)/2,Qdt=(r,t,e,n)=>r===(n?"left":"right")?e:r==="center"?(t+e)/2:t;function nV(r,t,e){const n=t.length;let i=0,a=n;if(r._sorted){const{iScale:o,_parsed:s}=r,l=o.axis,{min:u,max:c,minDefined:f,maxDefined:h}=o.getUserBounds();f&&(i=Er(Math.min(Tl(s,o.axis,u).lo,e?n:Tl(t,l,o.getPixelForValue(u)).lo),0,n-1)),h?a=Er(Math.max(Tl(s,o.axis,c,!0).hi+1,e?0:Tl(t,l,o.getPixelForValue(c),!0).hi+1),i,n)-i:a=n-i}return{start:i,count:a}}function iV(r){const{xScale:t,yScale:e,_scaleRanges:n}=r,i={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return r._scaleRanges=i,!0;const a=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,i),a}const km=r=>r===0||r===1,aV=(r,t,e)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-t)*De/e)),oV=(r,t,e)=>Math.pow(2,-10*r)*Math.sin((r-t)*De/e)+1,ed={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*Ge)+1,easeOutSine:r=>Math.sin(r*Ge),easeInOutSine:r=>-.5*(Math.cos(ke*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>km(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>km(r)?r:aV(r,.075,.3),easeOutElastic:r=>km(r)?r:oV(r,.075,.3),easeInOutElastic(r){return km(r)?r:r<.5?.5*aV(r*2,.1125,.45):.5+.5*oV(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let t=1.70158;return(r/=.5)<1?.5*(r*r*(((t*=1.525)+1)*r-t)):.5*((r-=2)*r*(((t*=1.525)+1)*r+t)+2)},easeInBounce:r=>1-ed.easeOutBounce(1-r),easeOutBounce(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},easeInOutBounce:r=>r<.5?ed.easeInBounce(r*2)*.5:ed.easeOutBounce(r*2-1)*.5+.5};/*!
|
|
237
|
+
* @kurkle/color v0.2.1
|
|
238
|
+
* https://github.com/kurkle/color#readme
|
|
239
|
+
* (c) 2022 Jukka Kurkela
|
|
240
|
+
* Released under the MIT License
|
|
241
|
+
*/function rd(r){return r+.5|0}const Uo=(r,t,e)=>Math.max(Math.min(r,e),t);function nd(r){return Uo(rd(r*2.55),0,255)}function Yo(r){return Uo(rd(r*255),0,255)}function $a(r){return Uo(rd(r/2.55)/100,0,1)}function sV(r){return Uo(rd(r*100),0,100)}const ei={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},SC=[..."0123456789ABCDEF"],Jdt=r=>SC[r&15],tvt=r=>SC[(r&240)>>4]+SC[r&15],Nm=r=>(r&240)>>4===(r&15),evt=r=>Nm(r.r)&&Nm(r.g)&&Nm(r.b)&&Nm(r.a);function rvt(r){var t=r.length,e;return r[0]==="#"&&(t===4||t===5?e={r:255&ei[r[1]]*17,g:255&ei[r[2]]*17,b:255&ei[r[3]]*17,a:t===5?ei[r[4]]*17:255}:(t===7||t===9)&&(e={r:ei[r[1]]<<4|ei[r[2]],g:ei[r[3]]<<4|ei[r[4]],b:ei[r[5]]<<4|ei[r[6]],a:t===9?ei[r[7]]<<4|ei[r[8]]:255})),e}const nvt=(r,t)=>r<255?t(r):"";function ivt(r){var t=evt(r)?Jdt:tvt;return r?"#"+t(r.r)+t(r.g)+t(r.b)+nvt(r.a,t):void 0}const avt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function lV(r,t,e){const n=t*Math.min(e,1-e),i=(a,o=(a+r/30)%12)=>e-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function ovt(r,t,e){const n=(i,a=(i+r/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function svt(r,t,e){const n=lV(r,1,.5);let i;for(t+e>1&&(i=1/(t+e),t*=i,e*=i),i=0;i<3;i++)n[i]*=1-t-e,n[i]+=t;return n}function lvt(r,t,e,n,i){return r===i?(t-e)/n+(t<e?6:0):t===i?(e-r)/n+2:(r-t)/n+4}function wC(r){const e=r.r/255,n=r.g/255,i=r.b/255,a=Math.max(e,n,i),o=Math.min(e,n,i),s=(a+o)/2;let l,u,c;return a!==o&&(c=a-o,u=s>.5?c/(2-a-o):c/(a+o),l=lvt(e,n,i,c,a),l=l*60+.5),[l|0,u||0,s]}function CC(r,t,e,n){return(Array.isArray(t)?r(t[0],t[1],t[2]):r(t,e,n)).map(Yo)}function TC(r,t,e){return CC(lV,r,t,e)}function uvt(r,t,e){return CC(svt,r,t,e)}function cvt(r,t,e){return CC(ovt,r,t,e)}function uV(r){return(r%360+360)%360}function fvt(r){const t=avt.exec(r);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?nd(+t[5]):Yo(+t[5]));const i=uV(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=uvt(i,a,o):t[1]==="hsv"?n=cvt(i,a,o):n=TC(i,a,o),{r:n[0],g:n[1],b:n[2],a:e}}function hvt(r,t){var e=wC(r);e[0]=uV(e[0]+t),e=TC(e),r.r=e[0],r.g=e[1],r.b=e[2]}function dvt(r){if(!r)return;const t=wC(r),e=t[0],n=sV(t[1]),i=sV(t[2]);return r.a<255?`hsla(${e}, ${n}%, ${i}%, ${$a(r.a)})`:`hsl(${e}, ${n}%, ${i}%)`}const cV={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},fV={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vvt(){const r={},t=Object.keys(fV),e=Object.keys(cV);let n,i,a,o,s;for(n=0;n<t.length;n++){for(o=s=t[n],i=0;i<e.length;i++)a=e[i],s=s.replace(a,cV[a]);a=parseInt(fV[o],16),r[s]=[a>>16&255,a>>8&255,a&255]}return r}let Bm;function pvt(r){Bm||(Bm=vvt(),Bm.transparent=[0,0,0,0]);const t=Bm[r.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const gvt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function mvt(r){const t=gvt.exec(r);let e=255,n,i,a;if(!!t){if(t[7]!==n){const o=+t[7];e=t[8]?nd(o):Uo(o*255,0,255)}return n=+t[1],i=+t[3],a=+t[5],n=255&(t[2]?nd(n):Uo(n,0,255)),i=255&(t[4]?nd(i):Uo(i,0,255)),a=255&(t[6]?nd(a):Uo(a,0,255)),{r:n,g:i,b:a,a:e}}}function yvt(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${$a(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}const MC=r=>r<=.0031308?r*12.92:Math.pow(r,1/2.4)*1.055-.055,pc=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function _vt(r,t,e){const n=pc($a(r.r)),i=pc($a(r.g)),a=pc($a(r.b));return{r:Yo(MC(n+e*(pc($a(t.r))-n))),g:Yo(MC(i+e*(pc($a(t.g))-i))),b:Yo(MC(a+e*(pc($a(t.b))-a))),a:r.a+e*(t.a-r.a)}}function zm(r,t,e){if(r){let n=wC(r);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=TC(n),r.r=n[0],r.g=n[1],r.b=n[2]}}function hV(r,t){return r&&Object.assign(t||{},r)}function dV(r){var t={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(t={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(t.a=Yo(r[3]))):(t=hV(r,{r:0,g:0,b:0,a:1}),t.a=Yo(t.a)),t}function bvt(r){return r.charAt(0)==="r"?mvt(r):fvt(r)}class Fm{constructor(t){if(t instanceof Fm)return t;const e=typeof t;let n;e==="object"?n=dV(t):e==="string"&&(n=rvt(t)||pvt(t)||bvt(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=hV(this._rgb);return t&&(t.a=$a(t.a)),t}set rgb(t){this._rgb=dV(t)}rgbString(){return this._valid?yvt(this._rgb):void 0}hexString(){return this._valid?ivt(this._rgb):void 0}hslString(){return this._valid?dvt(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let a;const o=e===a?.5:e,s=2*o-1,l=n.a-i.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-u,n.r=255&u*n.r+a*i.r+.5,n.g=255&u*n.g+a*i.g+.5,n.b=255&u*n.b+a*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=_vt(this._rgb,t._rgb,e)),this}clone(){return new Fm(this.rgb)}alpha(t){return this._rgb.a=Yo(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=rd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return zm(this._rgb,2,t),this}darken(t){return zm(this._rgb,2,-t),this}saturate(t){return zm(this._rgb,1,t),this}desaturate(t){return zm(this._rgb,1,-t),this}rotate(t){return hvt(this._rgb,t),this}}function vV(r){return new Fm(r)}function pV(r){if(r&&typeof r=="object"){const t=r.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function gV(r){return pV(r)?r:vV(r)}function DC(r){return pV(r)?r:vV(r).saturate(.5).darken(.1).hexString()}const Ml=Object.create(null),AC=Object.create(null);function id(r,t){if(!t)return r;const e=t.split(".");for(let n=0,i=e.length;n<i;++n){const a=e[n];r=r[a]||(r[a]=Object.create(null))}return r}function PC(r,t,e){return typeof t=="string"?Zh(id(r,t),e):Zh(id(r,""),t)}class xvt{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,n)=>DC(n.backgroundColor),this.hoverBorderColor=(e,n)=>DC(n.borderColor),this.hoverColor=(e,n)=>DC(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return PC(this,t,e)}get(t){return id(this,t)}describe(t,e){return PC(AC,t,e)}override(t,e){return PC(Ml,t,e)}route(t,e,n,i){const a=id(this,t),o=id(this,n),s="_"+e;Object.defineProperties(a,{[s]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[s],u=o[i];return ue(l)?Object.assign({},u,l):Jt(l,u)},set(l){this[s]=l}}})}}var se=new xvt({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Svt(r){return!r||ye(r.size)||ye(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}function Vm(r,t,e,n,i){let a=t[i];return a||(a=t[i]=r.measureText(i).width,e.push(i)),a>n&&(n=a),n}function wvt(r,t,e,n){n=n||{};let i=n.data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(i=n.data={},a=n.garbageCollect=[],n.font=t),r.save(),r.font=t;let o=0;const s=e.length;let l,u,c,f,h;for(l=0;l<s;l++)if(f=e[l],f!=null&&Pe(f)!==!0)o=Vm(r,i,a,o,f);else if(Pe(f))for(u=0,c=f.length;u<c;u++)h=f[u],h!=null&&!Pe(h)&&(o=Vm(r,i,a,o,h));r.restore();const d=a.length/2;if(d>e.length){for(l=0;l<d;l++)delete i[a[l]];a.splice(0,d)}return o}function Dl(r,t,e){const n=r.currentDevicePixelRatio,i=e!==0?Math.max(e/2,.5):0;return Math.round((t-i)*n)/n+i}function mV(r,t){t=t||r.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,r.width,r.height),t.restore()}function LC(r,t,e,n){yV(r,t,e,n,null)}function yV(r,t,e,n,i){let a,o,s,l,u,c;const f=t.pointStyle,h=t.rotation,d=t.radius;let v=(h||0)*Wdt;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){r.save(),r.translate(e,n),r.rotate(v),r.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),r.restore();return}if(!(isNaN(d)||d<=0)){switch(r.beginPath(),f){default:i?r.ellipse(e,n,i/2,d,0,0,De):r.arc(e,n,d,0,De),r.closePath();break;case"triangle":r.moveTo(e+Math.sin(v)*d,n-Math.cos(v)*d),v+=qF,r.lineTo(e+Math.sin(v)*d,n-Math.cos(v)*d),v+=qF,r.lineTo(e+Math.sin(v)*d,n-Math.cos(v)*d),r.closePath();break;case"rectRounded":u=d*.516,l=d-u,o=Math.cos(v+Qh)*l,s=Math.sin(v+Qh)*l,r.arc(e-o,n-s,u,v-ke,v-Ge),r.arc(e+s,n-o,u,v-Ge,v),r.arc(e+o,n+s,u,v,v+Ge),r.arc(e-s,n+o,u,v+Ge,v+ke),r.closePath();break;case"rect":if(!h){l=Math.SQRT1_2*d,c=i?i/2:l,r.rect(e-c,n-l,2*c,2*l);break}v+=Qh;case"rectRot":o=Math.cos(v)*d,s=Math.sin(v)*d,r.moveTo(e-o,n-s),r.lineTo(e+s,n-o),r.lineTo(e+o,n+s),r.lineTo(e-s,n+o),r.closePath();break;case"crossRot":v+=Qh;case"cross":o=Math.cos(v)*d,s=Math.sin(v)*d,r.moveTo(e-o,n-s),r.lineTo(e+o,n+s),r.moveTo(e+s,n-o),r.lineTo(e-s,n+o);break;case"star":o=Math.cos(v)*d,s=Math.sin(v)*d,r.moveTo(e-o,n-s),r.lineTo(e+o,n+s),r.moveTo(e+s,n-o),r.lineTo(e-s,n+o),v+=Qh,o=Math.cos(v)*d,s=Math.sin(v)*d,r.moveTo(e-o,n-s),r.lineTo(e+o,n+s),r.moveTo(e+s,n-o),r.lineTo(e-s,n+o);break;case"line":o=i?i/2:Math.cos(v)*d,s=Math.sin(v)*d,r.moveTo(e-o,n-s),r.lineTo(e+o,n+s);break;case"dash":r.moveTo(e,n),r.lineTo(e+Math.cos(v)*d,n+Math.sin(v)*d);break}r.fill(),t.borderWidth>0&&r.stroke()}}function ad(r,t,e){return e=e||.5,!t||r&&r.x>t.left-e&&r.x<t.right+e&&r.y>t.top-e&&r.y<t.bottom+e}function IC(r,t){r.save(),r.beginPath(),r.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),r.clip()}function OC(r){r.restore()}function Cvt(r,t,e,n,i){if(!t)return r.lineTo(e.x,e.y);if(i==="middle"){const a=(t.x+e.x)/2;r.lineTo(a,t.y),r.lineTo(a,e.y)}else i==="after"!=!!n?r.lineTo(t.x,e.y):r.lineTo(e.x,t.y);r.lineTo(e.x,e.y)}function Tvt(r,t,e,n){if(!t)return r.lineTo(e.x,e.y);r.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function Al(r,t,e,n,i,a={}){const o=Pe(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,u;for(r.save(),r.font=i.string,Mvt(r,a),l=0;l<o.length;++l)u=o[l],s&&(a.strokeColor&&(r.strokeStyle=a.strokeColor),ye(a.strokeWidth)||(r.lineWidth=a.strokeWidth),r.strokeText(u,e,n,a.maxWidth)),r.fillText(u,e,n,a.maxWidth),Dvt(r,e,n,u,a),n+=i.lineHeight;r.restore()}function Mvt(r,t){t.translation&&r.translate(t.translation[0],t.translation[1]),ye(t.rotation)||r.rotate(t.rotation),t.color&&(r.fillStyle=t.color),t.textAlign&&(r.textAlign=t.textAlign),t.textBaseline&&(r.textBaseline=t.textBaseline)}function Dvt(r,t,e,n,i){if(i.strikethrough||i.underline){const a=r.measureText(n),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,u=e+a.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;r.strokeStyle=r.fillStyle,r.beginPath(),r.lineWidth=i.decorationWidth||2,r.moveTo(o,c),r.lineTo(s,c),r.stroke()}}function od(r,t){const{x:e,y:n,w:i,h:a,radius:o}=t;r.arc(e+o.topLeft,n+o.topLeft,o.topLeft,-Ge,ke,!0),r.lineTo(e,n+a-o.bottomLeft),r.arc(e+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,ke,Ge,!0),r.lineTo(e+i-o.bottomRight,n+a),r.arc(e+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,Ge,0,!0),r.lineTo(e+i,n+o.topRight),r.arc(e+i-o.topRight,n+o.topRight,o.topRight,0,-Ge,!0),r.lineTo(e+o.topLeft,n)}const Avt=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Pvt=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Lvt(r,t){const e=(""+r).match(Avt);if(!e||e[1]==="normal")return t*1.2;switch(r=+e[2],e[3]){case"px":return r;case"%":r/=100;break}return t*r}const Ivt=r=>+r||0;function EC(r,t){const e={},n=ue(t),i=n?Object.keys(t):t,a=ue(r)?n?o=>Jt(r[o],r[t[o]]):o=>r[o]:()=>r;for(const o of i)e[o]=Ivt(a(o));return e}function _V(r){return EC(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Pl(r){return EC(r,["topLeft","topRight","bottomLeft","bottomRight"])}function kr(r){const t=_V(r);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ar(r,t){r=r||{},t=t||se.font;let e=Jt(r.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=Jt(r.style,t.style);n&&!(""+n).match(Pvt)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const i={family:Jt(r.family,t.family),lineHeight:Lvt(Jt(r.lineHeight,t.lineHeight),e),size:e,style:n,weight:Jt(r.weight,t.weight),string:""};return i.string=Svt(i),i}function Hm(r,t,e,n){let i=!0,a,o,s;for(a=0,o=r.length;a<o;++a)if(s=r[a],s!==void 0&&(t!==void 0&&typeof s=="function"&&(s=s(t),i=!1),e!==void 0&&Pe(s)&&(s=s[e%s.length],i=!1),s!==void 0))return n&&!i&&(n.cacheable=!1),s}function Ovt(r,t,e){const{min:n,max:i}=r,a=WF(t,(i-n)/2),o=(s,l)=>e&&s===0?0:s+l;return{min:o(n,-Math.abs(a)),max:o(i,a)}}function qo(r,t){return Object.assign(Object.create(r),t)}function RC(r,t=[""],e=r,n,i=()=>r[0]){Jn(n)||(n=CV("_fallback",r));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:e,_fallback:n,_getTarget:i,override:o=>RC([o,...r],t,e,n)};return new Proxy(a,{deleteProperty(o,s){return delete o[s],delete o._keys,delete r[0][s],!0},get(o,s){return xV(o,s,()=>Vvt(s,t,r,o))},getOwnPropertyDescriptor(o,s){return Reflect.getOwnPropertyDescriptor(o._scopes[0],s)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(o,s){return TV(o).includes(s)},ownKeys(o){return TV(o)},set(o,s,l){const u=o._storage||(o._storage=i());return o[s]=u[s]=l,delete o._keys,!0}})}function gc(r,t,e,n){const i={_cacheable:!1,_proxy:r,_context:t,_subProxy:e,_stack:new Set,_descriptors:bV(r,n),setContext:a=>gc(r,a,e,n),override:a=>gc(r.override(a),t,e,n)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete r[o],!0},get(a,o,s){return xV(a,o,()=>Rvt(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(r,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,o)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(a,o){return Reflect.has(r,o)},ownKeys(){return Reflect.ownKeys(r)},set(a,o,s){return r[o]=s,delete a[o],!0}})}function bV(r,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=r;return{allKeys:i,scriptable:e,indexable:n,isScriptable:Wo(e)?e:()=>e,isIndexable:Wo(n)?n:()=>n}}const Evt=(r,t)=>r?r+mC(t):t,kC=(r,t)=>ue(t)&&r!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function xV(r,t,e){if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const n=e();return r[t]=n,n}function Rvt(r,t,e){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=r;let s=n[t];return Wo(s)&&o.isScriptable(t)&&(s=kvt(t,s,r,e)),Pe(s)&&s.length&&(s=Nvt(t,s,r,o.isIndexable)),kC(t,s)&&(s=gc(s,i,a&&a[t],o)),s}function kvt(r,t,e,n){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=e;if(s.has(r))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+r);return s.add(r),t=t(a,o||n),s.delete(r),kC(r,t)&&(t=NC(i._scopes,i,r,t)),t}function Nvt(r,t,e,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=e;if(Jn(a.index)&&n(r))t=t[a.index%t.length];else if(ue(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const f=NC(u,i,r,c);t.push(gc(f,a,o&&o[r],s))}}return t}function SV(r,t,e){return Wo(r)?r(t,e):r}const Bvt=(r,t)=>r===!0?t:typeof r=="string"?$o(t,r):void 0;function zvt(r,t,e,n,i){for(const a of t){const o=Bvt(e,a);if(o){r.add(o);const s=SV(o._fallback,e,i);if(Jn(s)&&s!==e&&s!==n)return s}else if(o===!1&&Jn(n)&&e!==n)return null}return!1}function NC(r,t,e,n){const i=t._rootScopes,a=SV(t._fallback,e,n),o=[...r,...i],s=new Set;s.add(n);let l=wV(s,o,e,a||e,n);return l===null||Jn(a)&&a!==e&&(l=wV(s,o,a,l,n),l===null)?!1:RC(Array.from(s),[""],i,a,()=>Fvt(t,e,n))}function wV(r,t,e,n,i){for(;e;)e=zvt(r,t,e,n,i);return e}function Fvt(r,t,e){const n=r._getTarget();t in n||(n[t]={});const i=n[t];return Pe(i)&&ue(e)?e:i}function Vvt(r,t,e,n){let i;for(const a of t)if(i=CV(Evt(a,r),e),Jn(i))return kC(r,i)?NC(e,n,r,i):i}function CV(r,t){for(const e of t){if(!e)continue;const n=e[r];if(Jn(n))return n}}function TV(r){let t=r._keys;return t||(t=r._keys=Hvt(r._scopes)),t}function Hvt(r){const t=new Set;for(const e of r)for(const n of Object.keys(e).filter(i=>!i.startsWith("_")))t.add(n);return Array.from(t)}function MV(r,t,e,n){const{iScale:i}=r,{key:a="r"}=this._parsing,o=new Array(n);let s,l,u,c;for(s=0,l=n;s<l;++s)u=s+e,c=t[u],o[s]={r:i.parse($o(c,a),u)};return o}const $vt=Number.EPSILON||1e-14,mc=(r,t)=>t<r.length&&!r[t].skip&&r[t],DV=r=>r==="x"?"y":"x";function Wvt(r,t,e,n){const i=r.skip?t:r,a=t,o=e.skip?t:e,s=_C(a,i),l=_C(o,a);let u=s/(s+l),c=l/(s+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const f=n*u,h=n*c;return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+h*(o.x-i.x),y:a.y+h*(o.y-i.y)}}}function Gvt(r,t,e){const n=r.length;let i,a,o,s,l,u=mc(r,0);for(let c=0;c<n-1;++c)if(l=u,u=mc(r,c+1),!(!l||!u)){if(Jh(t[c],0,$vt)){e[c]=e[c+1]=0;continue}i=e[c]/t[c],a=e[c+1]/t[c],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),e[c]=i*o*t[c],e[c+1]=a*o*t[c])}}function Uvt(r,t,e="x"){const n=DV(e),i=r.length;let a,o,s,l=mc(r,0);for(let u=0;u<i;++u){if(o=s,s=l,l=mc(r,u+1),!s)continue;const c=s[e],f=s[n];o&&(a=(c-o[e])/3,s[`cp1${e}`]=c-a,s[`cp1${n}`]=f-a*t[u]),l&&(a=(l[e]-c)/3,s[`cp2${e}`]=c+a,s[`cp2${n}`]=f+a*t[u])}}function Yvt(r,t="x"){const e=DV(t),n=r.length,i=Array(n).fill(0),a=Array(n);let o,s,l,u=mc(r,0);for(o=0;o<n;++o)if(s=l,l=u,u=mc(r,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[e]-l[e])/c:0}a[o]=s?u?oa(i[o-1])!==oa(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}Gvt(r,i,a),Uvt(r,a,t)}function $m(r,t,e){return Math.max(Math.min(r,e),t)}function qvt(r,t){let e,n,i,a,o,s=ad(r[0],t);for(e=0,n=r.length;e<n;++e)o=a,a=s,s=e<n-1&&ad(r[e+1],t),a&&(i=r[e],o&&(i.cp1x=$m(i.cp1x,t.left,t.right),i.cp1y=$m(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=$m(i.cp2x,t.left,t.right),i.cp2y=$m(i.cp2y,t.top,t.bottom)))}function jvt(r,t,e,n,i){let a,o,s,l;if(t.spanGaps&&(r=r.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")Yvt(r,i);else{let u=n?r[r.length-1]:r[0];for(a=0,o=r.length;a<o;++a)s=r[a],l=Wvt(u,s,r[Math.min(a+1,o-(n?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}t.capBezierPoints&&qvt(r,e)}function AV(){return typeof window!="undefined"&&typeof document!="undefined"}function BC(r){let t=r.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Wm(r,t,e){let n;return typeof r=="string"?(n=parseInt(r,10),r.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=r,n}const Gm=r=>window.getComputedStyle(r,null);function Xvt(r,t){return Gm(r).getPropertyValue(t)}const Zvt=["top","right","bottom","left"];function Ll(r,t,e){const n={};e=e?"-"+e:"";for(let i=0;i<4;i++){const a=Zvt[i];n[a]=parseFloat(r[t+"-"+a+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Kvt=(r,t,e)=>(r>0||t>0)&&(!e||!e.shadowRoot);function Qvt(r,t){const e=r.touches,n=e&&e.length?e[0]:r,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(Kvt(i,a,r.target))s=i,l=a;else{const u=t.getBoundingClientRect();s=n.clientX-u.left,l=n.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function Il(r,t){if("native"in r)return r;const{canvas:e,currentDevicePixelRatio:n}=t,i=Gm(e),a=i.boxSizing==="border-box",o=Ll(i,"padding"),s=Ll(i,"border","width"),{x:l,y:u,box:c}=Qvt(r,e),f=o.left+(c&&s.left),h=o.top+(c&&s.top);let{width:d,height:v}=t;return a&&(d-=o.width+s.width,v-=o.height+s.height),{x:Math.round((l-f)/d*e.width/n),y:Math.round((u-h)/v*e.height/n)}}function Jvt(r,t,e){let n,i;if(t===void 0||e===void 0){const a=BC(r);if(!a)t=r.clientWidth,e=r.clientHeight;else{const o=a.getBoundingClientRect(),s=Gm(a),l=Ll(s,"border","width"),u=Ll(s,"padding");t=o.width-u.width-l.width,e=o.height-u.height-l.height,n=Wm(s.maxWidth,a,"clientWidth"),i=Wm(s.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:n||Rm,maxHeight:i||Rm}}const zC=r=>Math.round(r*10)/10;function tpt(r,t,e,n){const i=Gm(r),a=Ll(i,"margin"),o=Wm(i.maxWidth,r,"clientWidth")||Rm,s=Wm(i.maxHeight,r,"clientHeight")||Rm,l=Jvt(r,t,e);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=Ll(i,"border","width"),h=Ll(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-a.width),c=Math.max(0,n?Math.floor(u/n):c-a.height),u=zC(Math.min(u,o,l.maxWidth)),c=zC(Math.min(c,s,l.maxHeight)),u&&!c&&(c=zC(u/2)),{width:u,height:c}}function PV(r,t,e){const n=t||1,i=Math.floor(r.height*n),a=Math.floor(r.width*n);r.height=i/n,r.width=a/n;const o=r.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${r.height}px`,o.style.width=`${r.width}px`),r.currentDevicePixelRatio!==n||o.height!==i||o.width!==a?(r.currentDevicePixelRatio=n,o.height=i,o.width=a,r.ctx.setTransform(n,0,0,n,0,0),!0):!1}const ept=function(){let r=!1;try{const t={get passive(){return r=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return r}();function LV(r,t){const e=Xvt(r,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ol(r,t,e,n){return{x:r.x+e*(t.x-r.x),y:r.y+e*(t.y-r.y)}}function rpt(r,t,e,n){return{x:r.x+e*(t.x-r.x),y:n==="middle"?e<.5?r.y:t.y:n==="after"?e<1?r.y:t.y:e>0?t.y:r.y}}function npt(r,t,e,n){const i={x:r.cp2x,y:r.cp2y},a={x:t.cp1x,y:t.cp1y},o=Ol(r,i,e),s=Ol(i,a,e),l=Ol(a,t,e),u=Ol(o,s,e),c=Ol(s,l,e);return Ol(u,c,e)}const IV=new Map;function ipt(r,t){t=t||{};const e=r+JSON.stringify(t);let n=IV.get(e);return n||(n=new Intl.NumberFormat(r,t),IV.set(e,n)),n}function sd(r,t,e){return ipt(t,e).format(r)}const apt=function(r,t){return{x(e){return r+r+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},opt=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,t){return r+t},leftForLtr(r,t){return r}}};function yc(r,t,e){return r?apt(t,e):opt()}function OV(r,t){let e,n;(t==="ltr"||t==="rtl")&&(e=r.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),r.prevTextDirection=n)}function EV(r,t){t!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",t[0],t[1]))}function RV(r){return r==="angle"?{between:td,compare:Ydt,normalize:Pi}:{between:Go,compare:(t,e)=>t-e,normalize:t=>t}}function kV({start:r,end:t,count:e,loop:n,style:i}){return{start:r%e,end:t%e,loop:n&&(t-r+1)%e===0,style:i}}function spt(r,t,e){const{property:n,start:i,end:a}=e,{between:o,normalize:s}=RV(n),l=t.length;let{start:u,end:c,loop:f}=r,h,d;if(f){for(u+=l,c+=l,h=0,d=l;h<d&&o(s(t[u%l][n]),i,a);++h)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:f,style:r.style}}function lpt(r,t,e){if(!e)return[r];const{property:n,start:i,end:a}=e,o=t.length,{compare:s,between:l,normalize:u}=RV(n),{start:c,end:f,loop:h,style:d}=spt(r,t,e),v=[];let p=!1,g=null,m,y,_;const b=()=>l(i,_,m)&&s(i,_)!==0,S=()=>s(a,m)===0||l(a,_,m),x=()=>p||b(),w=()=>!p||S();for(let C=c,T=c;C<=f;++C)y=t[C%o],!y.skip&&(m=u(y[n]),m!==_&&(p=l(m,i,a),g===null&&x()&&(g=s(m,i)===0?C:T),g!==null&&w()&&(v.push(kV({start:g,end:C,loop:h,count:o,style:d})),g=null),T=C,_=m));return g!==null&&v.push(kV({start:g,end:f,loop:h,count:o,style:d})),v}function upt(r,t){const e=[],n=r.segments;for(let i=0;i<n.length;i++){const a=lpt(n[i],r.points,t);a.length&&e.push(...a)}return e}function cpt(r,t,e,n){let i=0,a=t-1;if(e&&!n)for(;i<t&&!r[i].skip;)i++;for(;i<t&&r[i].skip;)i++;for(i%=t,e&&(a+=i);a>i&&r[a%t].skip;)a--;return a%=t,{start:i,end:a}}function fpt(r,t,e,n){const i=r.length,a=[];let o=t,s=r[t],l;for(l=t+1;l<=e;++l){const u=r[l%i];u.skip||u.stop?s.skip||(n=!1,a.push({start:t%i,end:(l-1)%i,loop:n}),t=o=u.stop?l:null):(o=l,s.skip&&(t=l)),s=u}return o!==null&&a.push({start:t%i,end:o%i,loop:n}),a}function hpt(r,t){const e=r.points,n=r.options.spanGaps,i=e.length;if(!i)return[];const a=!!r._loop,{start:o,end:s}=cpt(e,i,a,n);if(n===!0)return NV(r,[{start:o,end:s,loop:a}],e,t);const l=s<o?s+i:s,u=!!r._fullLoop&&o===0&&s===i-1;return NV(r,fpt(e,o,l,u),e,t)}function NV(r,t,e,n){return!n||!n.setContext||!e?t:dpt(r,t,e,n)}function dpt(r,t,e,n){const i=r._chart.getContext(),a=BV(r.options),{_datasetIndex:o,options:{spanGaps:s}}=r,l=e.length,u=[];let c=a,f=t[0].start,h=f;function d(v,p,g,m){const y=s?-1:1;if(v!==p){for(v+=l;e[v%l].skip;)v-=y;for(;e[p%l].skip;)p+=y;v%l!==p%l&&(u.push({start:v%l,end:p%l,loop:g,style:m}),c=m,f=p%l)}}for(const v of t){f=s?f:v.start;let p=e[f%l],g;for(h=f+1;h<=v.end;h++){const m=e[h%l];g=BV(n.setContext(qo(i,{type:"segment",p0:p,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),vpt(g,c)&&d(f,h-1,v.loop,c),p=m,c=g}f<h-1&&d(f,h-1,v.loop,c)}return u}function BV(r){return{backgroundColor:r.backgroundColor,borderCapStyle:r.borderCapStyle,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderJoinStyle:r.borderJoinStyle,borderWidth:r.borderWidth,borderColor:r.borderColor}}function vpt(r,t){return t&&JSON.stringify(r)!==JSON.stringify(t)}/*!
|
|
242
|
+
* Chart.js v3.9.1
|
|
243
|
+
* https://www.chartjs.org
|
|
244
|
+
* (c) 2022 Chart.js Contributors
|
|
245
|
+
* Released under the MIT License
|
|
246
|
+
*/class ppt{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const a=e.listeners[i],o=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=eV.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const a=n.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,n,t,"progress")),a.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);!e||(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Wa=new ppt;const zV="transparent",gpt={boolean(r,t,e){return e>.5?t:r},color(r,t,e){const n=gV(r||zV),i=n.valid&&gV(t||zV);return i&&i.valid?i.mix(n,e).hexString():t},number(r,t,e){return r+(t-r)*e}};class mpt{constructor(t,e,n,i){const a=e[n];i=Hm([t.to,i,a,t.from]);const o=Hm([t.from,a,i]);this._active=!0,this._fn=t.fn||gpt[t.type||typeof o],this._easing=ed[t.easing]||ed.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],a=n-this._start,o=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Hm([t.to,e,i,t.from]),this._from=Hm([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||e<n),!this._active){this._target[i]=s,this._notify(!0);return}if(e<0){this._target[i]=a;return}l=e/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][e]()}}const ypt=["x","y","borderWidth","radius","tension"],_pt=["color","borderColor","backgroundColor"];se.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const bpt=Object.keys(se.animation);se.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:r=>r!=="onProgress"&&r!=="onComplete"&&r!=="fn"}),se.set("animations",{colors:{type:"color",properties:_pt},numbers:{type:"number",properties:ypt}}),se.describe("animations",{_fallback:"animation"}),se.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:r=>r|0}}}});class FV{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!ue(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const i=t[n];if(!ue(i))return;const a={};for(const o of bpt)a[o]=i[o];(Pe(i.properties)&&i.properties||[n]).forEach(o=>{(o===n||!e.has(o))&&e.set(o,a)})})}_animateOptions(t,e){const n=e.options,i=Spt(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&xpt(t.options.$animations,n).then(()=>{t.options=n},()=>{}),a}_createAnimations(t,e){const n=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,e));continue}const c=e[u];let f=a[u];const h=n.get(u);if(f)if(h&&f.active()){f.update(h,c,s);continue}else f.cancel();if(!h||!h.duration){t[u]=c;continue}a[u]=f=new mpt(h,t,u,c),i.push(f)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return Wa.add(this._chart,n),!0}}function xpt(r,t){const e=[],n=Object.keys(t);for(let i=0;i<n.length;i++){const a=r[n[i]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function Spt(r,t){if(!t)return;let e=r.options;if(!e){r.options=t;return}return e.$shared&&(r.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function VV(r,t){const e=r&&r.options||{},n=e.reverse,i=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:n?a:i,end:n?i:a}}function wpt(r,t,e){if(e===!1)return!1;const n=VV(r,e),i=VV(t,e);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function Cpt(r){let t,e,n,i;return ue(r)?(t=r.top,e=r.right,n=r.bottom,i=r.left):t=e=n=i=r,{top:t,right:e,bottom:n,left:i,disabled:r===!1}}function HV(r,t){const e=[],n=r._getSortedDatasetMetas(t);let i,a;for(i=0,a=n.length;i<a;++i)e.push(n[i].index);return e}function $V(r,t,e,n={}){const i=r.keys,a=n.mode==="single";let o,s,l,u;if(t!==null){for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===e){if(n.all)continue;break}u=r.values[l],Sr(u)&&(a||t===0||oa(t)===oa(u))&&(t+=u)}return t}}function Tpt(r){const t=Object.keys(r),e=new Array(t.length);let n,i,a;for(n=0,i=t.length;n<i;++n)a=t[n],e[n]={x:a,y:r[a]};return e}function WV(r,t){const e=r&&r.options.stacked;return e||e===void 0&&t.stack!==void 0}function Mpt(r,t,e){return`${r.id}.${t.id}.${e.stack||e.type}`}function Dpt(r){const{min:t,max:e,minDefined:n,maxDefined:i}=r.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?e:Number.POSITIVE_INFINITY}}function Apt(r,t,e){const n=r[t]||(r[t]={});return n[e]||(n[e]={})}function GV(r,t,e,n){for(const i of t.getMatchingVisibleMetas(n).reverse()){const a=r[i.index];if(e&&a>0||!e&&a<0)return i.index}return null}function UV(r,t){const{chart:e,_cachedMeta:n}=r,i=e._stacks||(e._stacks={}),{iScale:a,vScale:o,index:s}=n,l=a.axis,u=o.axis,c=Mpt(a,o,n),f=t.length;let h;for(let d=0;d<f;++d){const v=t[d],{[l]:p,[u]:g}=v,m=v._stacks||(v._stacks={});h=m[u]=Apt(i,c,p),h[s]=g,h._top=GV(h,o,!0,n.type),h._bottom=GV(h,o,!1,n.type)}}function FC(r,t){const e=r.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Ppt(r,t){return qo(r,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Lpt(r,t,e){return qo(r,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ld(r,t){const e=r.controller.index,n=r.vScale&&r.vScale.axis;if(!!n){t=t||r._parsed;for(const i of t){const a=i._stacks;if(!a||a[n]===void 0||a[n][e]===void 0)return;delete a[n][e]}}}const VC=r=>r==="reset"||r==="none",YV=(r,t)=>t?r:Object.assign({},r),Ipt=(r,t,e)=>r&&!t.hidden&&t._stacked&&{keys:HV(e,!0),values:null};class Li{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=WV(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ld(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(f,h,d,v)=>f==="x"?h:f==="r"?v:d,a=e.xAxisID=Jt(n.xAxisID,FC(t,"x")),o=e.yAxisID=Jt(n.yAxisID,FC(t,"y")),s=e.rAxisID=Jt(n.rAxisID,FC(t,"r")),l=e.indexAxis,u=e.iAxisID=i(l,a,o,s),c=e.vAxisID=i(l,o,a,s);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&JF(this._data,this),t._stacked&&ld(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(ue(e))this._data=Tpt(e);else if(n!==e){if(n){JF(n,this);const i=this._cachedMeta;ld(i),i._parsed=[]}e&&Object.isExtensible(e)&&Zdt(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const a=e._stacked;e._stacked=WV(e.vScale,e),e.stack!==n.stack&&(i=!0,ld(e),e.stack=n.stack),this._resyncElements(t),(i||a!==e._stacked)&&UV(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:a,_stacked:o}=n,s=a.axis;let l=t===0&&e===i.length?!0:n._sorted,u=t>0&&n._parsed[t-1],c,f,h;if(this._parsing===!1)n._parsed=i,n._sorted=!0,h=i;else{Pe(i[t])?h=this.parseArrayData(n,i,t,e):ue(i[t])?h=this.parseObjectData(n,i,t,e):h=this.parsePrimitiveData(n,i,t,e);const d=()=>f[s]===null||u&&f[s]<u[s];for(c=0;c<e;++c)n._parsed[c+t]=f=h[c],l&&(d()&&(l=!1),u=f);n._sorted=l}o&&UV(this,h)}parsePrimitiveData(t,e,n,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,u=a.getLabels(),c=a===o,f=new Array(i);let h,d,v;for(h=0,d=i;h<d;++h)v=h+n,f[h]={[s]:c||a.parse(u[v],v),[l]:o.parse(e[v],v)};return f}parseArrayData(t,e,n,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,u,c,f;for(l=0,u=i;l<u;++l)c=l+n,f=e[c],s[l]={x:a.parse(f[0],c),y:o.parse(f[1],c)};return s}parseObjectData(t,e,n,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,f,h,d;for(c=0,f=i;c<f;++c)h=c+n,d=e[h],u[c]={x:a.parse($o(d,s),h),y:o.parse($o(d,l),h)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,a=this._cachedMeta,o=e[t.axis],s={keys:HV(i,!0),values:e._stacks[t.axis]};return $V(s,o,a.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const a=n[e.axis];let o=a===null?NaN:a;const s=i&&n._stacks[e.axis];i&&s&&(i.values=s,o=$V(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,a=n._sorted&&t===n.iScale,o=i.length,s=this._getOtherScale(t),l=Ipt(e,n,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:f}=Dpt(s);let h,d;function v(){d=i[h];const p=d[s.axis];return!Sr(d[t.axis])||c>p||f<p}for(h=0;h<o&&!(!v()&&(this.updateRangeFromParsed(u,t,d,l),a));++h);if(a){for(h=o-1;h>=0;--h)if(!v()){this.updateRangeFromParsed(u,t,d,l);break}}return u}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,a,o;for(i=0,a=e.length;i<a;++i)o=e[i][t.axis],Sr(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,a=this.getParsed(t);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Cpt(Jt(this.options.clip,wpt(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],a=e.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,a,s,l),c=s;c<s+l;++c){const f=i[c];f.hidden||(f.active&&u?o.push(f):f.draw(t,a))}for(c=0;c<o.length;++c)o[c].draw(t,a)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=Lpt(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=Ppt(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=n,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i=e==="active",a=this._cachedDataOpts,o=t+"-"+e,s=a[o],l=this.enableOptionSharing&&Jn(n);if(s)return YV(s,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],h=u.getOptionScopes(this.getDataset(),c),d=Object.keys(se.elements[t]),v=()=>this.getContext(n,i),p=u.resolveNamedOptions(h,d,v,f);return p.$shared&&(p.$shared=l,a[o]=Object.freeze(YV(p,l))),p}_resolveAnimations(t,e,n){const i=this.chart,a=this._cachedDataOpts,o=`animation-${e}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const c=this.chart.config,f=c.datasetAnimationScopeKeys(this._type,e),h=c.getOptionScopes(this.getDataset(),f);l=c.createResolver(h,this.getContext(t,n,e))}const u=new FV(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(u)),u}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||VC(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,a=this.getSharedOptions(n),o=this.includeOptions(e,a)||a!==i;return this.updateSharedOptions(a,e,n),{sharedOptions:a,includeOptions:o}}updateElement(t,e,n,i){VC(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!VC(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const a=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const i=n.length,a=e.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,e,n=!0){const i=this._cachedMeta,a=i.data,o=t+e;let s;const l=u=>{for(u.length+=e,s=u.length-1;s>=o;s--)u[s]=u[s-e]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,e),n&&this.updateElements(a,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&ld(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Li.defaults={},Li.prototype.datasetElementType=null,Li.prototype.dataElementType=null;function Opt(r,t){if(!r._cache.$bar){const e=r.getMatchingVisibleMetas(t);let n=[];for(let i=0,a=e.length;i<a;i++)n=n.concat(e[i].controller.getAllParsedValues(r));r._cache.$bar=tV(n.sort((i,a)=>i-a))}return r._cache.$bar}function Ept(r){const t=r.iScale,e=Opt(t,r.type);let n=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(Jn(s)&&(n=Math.min(n,Math.abs(o-s)||n)),s=o)};for(i=0,a=e.length;i<a;++i)o=t.getPixelForValue(e[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return n}function Rpt(r,t,e,n){const i=e.barThickness;let a,o;return ye(i)?(a=t.min*e.categoryPercentage,o=e.barPercentage):(a=i*n,o=1),{chunk:a/n,ratio:o,start:t.pixels[r]-a/2}}function kpt(r,t,e,n){const i=t.pixels,a=i[r];let o=r>0?i[r-1]:null,s=r<i.length-1?i[r+1]:null;const l=e.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const u=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/n,ratio:e.barPercentage,start:u}}function Npt(r,t,e,n){const i=e.parse(r[0],n),a=e.parse(r[1],n),o=Math.min(i,a),s=Math.max(i,a);let l=o,u=s;Math.abs(o)>Math.abs(s)&&(l=s,u=o),t[e.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:o,max:s}}function qV(r,t,e,n){return Pe(r)?Npt(r,t,e,n):t[e.axis]=e.parse(r,n),t}function jV(r,t,e,n){const i=r.iScale,a=r.vScale,o=i.getLabels(),s=i===a,l=[];let u,c,f,h;for(u=e,c=e+n;u<c;++u)h=t[u],f={},f[i.axis]=s||i.parse(o[u],u),l.push(qV(h,f,a,u));return l}function HC(r){return r&&r.barStart!==void 0&&r.barEnd!==void 0}function Bpt(r,t,e){return r!==0?oa(r):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function zpt(r){let t,e,n,i,a;return r.horizontal?(t=r.base>r.x,e="left",n="right"):(t=r.base<r.y,e="bottom",n="top"),t?(i="end",a="start"):(i="start",a="end"),{start:e,end:n,reverse:t,top:i,bottom:a}}function Fpt(r,t,e,n){let i=t.borderSkipped;const a={};if(!i){r.borderSkipped=a;return}if(i===!0){r.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:u,bottom:c}=zpt(r);i==="middle"&&e&&(r.enableBorderRadius=!0,(e._top||0)===n?i=u:(e._bottom||0)===n?i=c:(a[XV(c,o,s,l)]=!0,i=u)),a[XV(i,o,s,l)]=!0,r.borderSkipped=a}function XV(r,t,e,n){return n?(r=Vpt(r,t,e),r=ZV(r,e,t)):r=ZV(r,t,e),r}function Vpt(r,t,e){return r===t?e:r===e?t:r}function ZV(r,t,e){return r==="start"?t:r==="end"?e:r}function Hpt(r,{inflateAmount:t},e){r.inflateAmount=t==="auto"?e===1?.33:0:t}class Um extends Li{parsePrimitiveData(t,e,n,i){return jV(t,e,n,i)}parseArrayData(t,e,n,i){return jV(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=a.axis==="x"?s:l,c=o.axis==="x"?s:l,f=[];let h,d,v,p;for(h=n,d=n+i;h<d;++h)p=e[h],v={},v[a.axis]=a.parse($o(p,u),h),f.push(qV($o(p,c),v,o,h));return f}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const a=n._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,a=this.getParsed(t),o=a._custom,s=HC(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+n.getLabelForValue(a[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),c=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(e,i);for(let d=e;d<e+n;d++){const v=this.getParsed(d),p=a||ye(v[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),g=this._calculateBarIndexPixels(d,c),m=(v._stacks||{})[s.axis],y={horizontal:u,base:p.base,enableBorderRadius:!m||HC(v._custom)||o===m._top||o===m._bottom,x:u?p.head:g.center,y:u?g.center:p.head,height:u?g.size:Math.abs(p.size),width:u?Math.abs(p.size):g.size};h&&(y.options=f||this.resolveDataElementOptions(d,t[d].active?"active":i));const _=y.options||t[d].options;Fpt(y,_,m,o),Hpt(y,_,c.ratio),this.updateElement(t[d],d,y,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=n.options.stacked,o=[],s=l=>{const u=l.controller.getParsed(e),c=u&&u[l.vScale.axis];if(ye(c)||isNaN(c))return!0};for(const l of i)if(!(e!==void 0&&s(l))&&((a===!1||o.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),a=e!==void 0?i.indexOf(e):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let a,o;for(a=0,o=e.data.length;a<o;++a)i.push(n.getPixelForValue(this.getParsed(a)[n.axis],a));const s=t.barThickness;return{min:s||Ept(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n},options:{base:i,minBarLength:a}}=this,o=i||0,s=this.getParsed(t),l=s._custom,u=HC(l);let c=s[e.axis],f=0,h=n?this.applyStack(e,s,n):c,d,v;h!==c&&(f=h-c,h=c),u&&(c=l.barStart,h=l.barEnd-l.barStart,c!==0&&oa(c)!==oa(l.barEnd)&&(f=0),f+=c);const p=!ye(i)&&!u?i:f;let g=e.getPixelForValue(p);if(this.chart.getDataVisibility(t)?d=e.getPixelForValue(f+h):d=g,v=d-g,Math.abs(v)<a){v=Bpt(v,e,o)*a,c===o&&(g-=v/2);const m=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),_=Math.min(m,y),b=Math.max(m,y);g=Math.max(Math.min(g,b),_),d=g+v}if(g===e.getPixelForValue(o)){const m=oa(v)*e.getLineWidthForValue(o)/2;g+=m,v-=m}return{size:v,base:g,head:d,center:d+v/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,a=i.skipNull,o=Jt(i.maxBarThickness,1/0);let s,l;if(e.grouped){const u=a?this._getStackCount(t):e.stackCount,c=i.barThickness==="flex"?kpt(t,e,i,u):Rpt(t,e,i,u),f=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);s=c.start+c.chunk*f+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else s=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(o,e.min*e.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let a=0;for(;a<i;++a)this.getParsed(a)[e.axis]!==null&&n[a].draw(this._ctx)}}Um.id="bar",Um.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Um.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class $C extends Li{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const a=super.parsePrimitiveData(t,e,n,i);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+n).radius;return a}parseArrayData(t,e,n,i){const a=super.parseArrayData(t,e,n,i);for(let o=0;o<a.length;o++){const s=e[n+o];a[o]._custom=Jt(s[2],this.resolveDataElementOptions(o+n).radius)}return a}parseObjectData(t,e,n,i){const a=super.parseObjectData(t,e,n,i);for(let o=0;o<a.length;o++){const s=e[n+o];a[o]._custom=Jt(s&&s.r&&+s.r,this.resolveDataElementOptions(o+n).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:n,yScale:i}=e,a=this.getParsed(t),o=n.getLabelForValue(a.x),s=i.getLabelForValue(a.y),l=a._custom;return{label:e.label,value:"("+o+", "+s+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const a=i==="reset",{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,i),c=o.axis,f=s.axis;for(let h=e;h<e+n;h++){const d=t[h],v=!a&&this.getParsed(h),p={},g=p[c]=a?o.getPixelForDecimal(.5):o.getPixelForValue(v[c]),m=p[f]=a?s.getBasePixel():s.getPixelForValue(v[f]);p.skip=isNaN(g)||isNaN(m),u&&(p.options=l||this.resolveDataElementOptions(h,d.active?"active":i),a&&(p.options.radius=0)),this.updateElement(d,h,p,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return e!=="active"&&(i.radius=0),i.radius+=Jt(n&&n._custom,a),i}}$C.id="bubble",$C.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},$C.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function $pt(r,t,e){let n=1,i=1,a=0,o=0;if(t<De){const s=r,l=s+t,u=Math.cos(s),c=Math.sin(s),f=Math.cos(l),h=Math.sin(l),d=(_,b,S)=>td(_,s,l,!0)?1:Math.max(b,b*e,S,S*e),v=(_,b,S)=>td(_,s,l,!0)?-1:Math.min(b,b*e,S,S*e),p=d(0,u,f),g=d(Ge,c,h),m=v(ke,u,f),y=v(ke+Ge,c,h);n=(p-m)/2,i=(g-y)/2,a=-(p+m)/2,o=-(g+y)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}class ud extends Li{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let a=l=>+n[l];if(ue(n[t])){const{key:l="value"}=this._parsing;a=u=>+$o(n[u],l)}let o,s;for(o=t,s=t+e;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return Ai(this.options.rotation-90)}_getCircumference(){return Ai(this.options.circumference)}_getRotationExtents(){let t=De,e=-De;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)){const i=this.chart.getDatasetMeta(n).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),e=Math.max(e,a+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(n.width,n.height)-o)/2,0),l=Math.min(Ndt(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:c,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:v,offsetY:p}=$pt(f,c,l),g=(n.width-o)/h,m=(n.height-o)/d,y=Math.max(Math.min(g,m)/2,0),_=WF(this.options.radius,y),b=Math.max(_*l,0),S=(_-b)/this._getVisibleDatasetWeightTotal();this.offsetX=v*_,this.offsetY=p*_,i.total=this.calculateTotal(),this.outerRadius=_-S*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-S*u,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,a=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/De)}updateElements(t,e,n,i){const a=i==="reset",o=this.chart,s=o.chartArea,u=o.options.animation,c=(s.left+s.right)/2,f=(s.top+s.bottom)/2,h=a&&u.animateScale,d=h?0:this.innerRadius,v=h?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(e,i);let m=this._getRotation(),y;for(y=0;y<e;++y)m+=this._circumference(y,a);for(y=e;y<e+n;++y){const _=this._circumference(y,a),b=t[y],S={x:c+this.offsetX,y:f+this.offsetY,startAngle:m,endAngle:m+_,circumference:_,outerRadius:v,innerRadius:d};g&&(S.options=p||this.resolveDataElementOptions(y,b.active?"active":i)),m+=_,this.updateElement(b,y,S,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n=0,i;for(i=0;i<e.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!e[i].hidden&&(n+=Math.abs(a))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?De*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=sd(e._parsed[t],n.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=n.data.datasets.length;i<a;++i)if(n.isDatasetVisible(i)){o=n.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const a=this.resolveDataElementOptions(n);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(Jt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ud.id="doughnut",ud.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},ud.descriptors={_scriptable:r=>r!=="spacing",_indexable:r=>r!=="spacing"},ud.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const t=r.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=r.legend.options;return t.labels.map((n,i)=>{const o=r.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!r.getDataVisibility(i),index:i}})}return[]}},onClick(r,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){let t=r.label;const e=": "+r.formattedValue;return Pe(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};class WC extends Li{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:a}=e,o=this.chart._animationsDisabled;let{start:s,count:l}=nV(e,i,o);this._drawStart=s,this._drawCount=l,iV(e)&&(s=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:u},t),this.updateElements(i,s,l,t)}updateElements(t,e,n,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:f}=this._getSharedOptions(e,i),h=o.axis,d=s.axis,{spanGaps:v,segment:p}=this.options,g=vc(v)?v:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||i==="none";let y=e>0&&this.getParsed(e-1);for(let _=e;_<e+n;++_){const b=t[_],S=this.getParsed(_),x=m?b:{},w=ye(S[d]),C=x[h]=o.getPixelForValue(S[h],_),T=x[d]=a||w?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,S,l):S[d],_);x.skip=isNaN(C)||isNaN(T)||w,x.stop=_>0&&Math.abs(S[h]-y[h])>g,p&&(x.parsed=S,x.raw=u.data[_]),f&&(x.options=c||this.resolveDataElementOptions(_,b.active?"active":i)),m||this.updateElement(b,_,x,i),y=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}WC.id="line",WC.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},WC.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class GC extends Li{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=sd(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,e,n,i){return MV.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(i/2,0),o=Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0),s=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,n,i){const a=i==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,f=u.yCenter,h=u.getIndexAngle(0)-.5*ke;let d=h,v;const p=360/this.countVisibleElements();for(v=0;v<e;++v)d+=this._computeAngle(v,i,p);for(v=e;v<e+n;v++){const g=t[v];let m=d,y=d+this._computeAngle(v,i,p),_=o.getDataVisibility(v)?u.getDistanceFromCenterForValue(this.getParsed(v).r):0;d=y,a&&(l.animateScale&&(_=0),l.animateRotate&&(m=y=h));const b={x:c,y:f,innerRadius:0,outerRadius:_,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(v,g.active?"active":i)};this.updateElement(g,v,b,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((n,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Ai(this.resolveDataElementOptions(t,e).angle||n):0}}GC.id="polarArea",GC.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},GC.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const t=r.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=r.legend.options;return t.labels.map((n,i)=>{const o=r.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!r.getDataVisibility(i),index:i}})}return[]}},onClick(r,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){return r.chart.data.labels[r.dataIndex]+": "+r.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class KV extends ud{}KV.id="pie",KV.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class UC extends Li{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return MV.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],a=e.iScale.getLabels();if(n.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===i.length,options:o};this.updateElement(n,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const a=this._cachedMeta.rScale,o=i==="reset";for(let s=e;s<e+n;s++){const l=t[s],u=this.resolveDataElementOptions(s,l.active?"active":i),c=a.getPointPositionForValue(s,this.getParsed(s).r),f=o?a.xCenter:c.x,h=o?a.yCenter:c.y,d={x:f,y:h,angle:c.angle,skip:isNaN(f)||isNaN(h),options:u};this.updateElement(l,s,d,i)}}}UC.id="radar",UC.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},UC.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ii{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return vc(this.x)&&vc(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach(a=>{i[a]=n[a]&&n[a].active()?n[a]._to:this[a]}),i}}Ii.defaults={},Ii.defaultRoutes=void 0;const QV={values(r){return Pe(r)?r:""+r},numeric(r,t,e){if(r===0)return"0";const n=this.chart.options.locale;let i,a=r;if(e.length>1){const u=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),a=Wpt(r,e)}const o=ti(Math.abs(a)),s=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),sd(r,n,l)},logarithmic(r,t,e){if(r===0)return"0";const n=r/Math.pow(10,Math.floor(ti(r)));return n===1||n===2||n===5?QV.numeric.call(this,r,t,e):""}};function Wpt(r,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&r!==Math.floor(r)&&(e=r-Math.floor(r)),e}var Ym={formatters:QV};se.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(r,t)=>t.lineWidth,tickColor:(r,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ym.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),se.route("scale.ticks","color","","color"),se.route("scale.grid","color","","borderColor"),se.route("scale.grid","borderColor","","borderColor"),se.route("scale.title","color","","color"),se.describe("scale",{_fallback:!1,_scriptable:r=>!r.startsWith("before")&&!r.startsWith("after")&&r!=="callback"&&r!=="parser",_indexable:r=>r!=="borderDash"&&r!=="tickBorderDash"}),se.describe("scales",{_fallback:"scale"}),se.describe("scale.ticks",{_scriptable:r=>r!=="backdropPadding"&&r!=="callback",_indexable:r=>r!=="backdropPadding"});function Gpt(r,t){const e=r.options.ticks,n=e.maxTicksLimit||Upt(r),i=e.major.enabled?qpt(t):[],a=i.length,o=i[0],s=i[a-1],l=[];if(a>n)return jpt(t,l,i,a/n),l;const u=Ypt(i,t,n);if(a>0){let c,f;const h=a>1?Math.round((s-o)/(a-1)):null;for(qm(t,l,u,ye(h)?0:o-h,o),c=0,f=a-1;c<f;c++)qm(t,l,u,i[c],i[c+1]);return qm(t,l,u,s,ye(h)?t.length:s+h),l}return qm(t,l,u),l}function Upt(r){const t=r.options.offset,e=r._tickSize(),n=r._length/e+(t?0:1),i=r._maxLength/e;return Math.floor(Math.min(n,i))}function Ypt(r,t,e){const n=Xpt(r),i=t.length/e;if(!n)return Math.max(i,1);const a=Gdt(n);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function qpt(r){const t=[];let e,n;for(e=0,n=r.length;e<n;e++)r[e].major&&t.push(e);return t}function jpt(r,t,e,n){let i=0,a=e[0],o;for(n=Math.ceil(n),o=0;o<r.length;o++)o===a&&(t.push(r[o]),i++,a=e[i*n])}function qm(r,t,e,n,i){const a=Jt(n,0),o=Math.min(Jt(i,r.length),r.length);let s=0,l,u,c;for(e=Math.ceil(e),i&&(l=i-n,e=l/Math.floor(l/e)),c=a;c<0;)s++,c=Math.round(a+s*e);for(u=Math.max(a,0);u<o;u++)u===c&&(t.push(r[u]),s++,c=Math.round(a+s*e))}function Xpt(r){const t=r.length;let e,n;if(t<2)return!1;for(n=r[0],e=1;e<t;++e)if(r[e]-r[e-1]!==n)return!1;return n}const Zpt=r=>r==="left"?"right":r==="right"?"left":r,JV=(r,t,e)=>t==="top"||t==="left"?r[t]+e:r[t]-e;function t4(r,t){const e=[],n=r.length/t,i=r.length;let a=0;for(;a<i;a+=n)e.push(r[Math.floor(a)]);return e}function Kpt(r,t,e){const n=r.ticks.length,i=Math.min(t,n-1),a=r._startPixel,o=r._endPixel,s=1e-6;let l=r.getPixelForTick(i),u;if(!(e&&(n===1?u=Math.max(l-a,o-l):t===0?u=(r.getPixelForTick(1)-l)/2:u=(l-r.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<a-s||l>o+s)))return l}function Qpt(r,t){xe(r,e=>{const n=e.gc,i=n.length/2;let a;if(i>t){for(a=0;a<i;++a)delete e.data[n[a]];n.splice(0,i)}})}function cd(r){return r.drawTicks?r.tickLength:0}function e4(r,t){if(!r.display)return 0;const e=ar(r.font,t),n=kr(r.padding);return(Pe(r.text)?r.text.length:1)*e.lineHeight+n.height}function Jpt(r,t){return qo(r,{scale:t,type:"scale"})}function tgt(r,t,e){return qo(r,{tick:e,index:t,type:"tick"})}function egt(r,t,e){let n=xC(r);return(e&&t!=="right"||!e&&t==="right")&&(n=Zpt(n)),n}function rgt(r,t,e,n){const{top:i,left:a,bottom:o,right:s,chart:l}=r,{chartArea:u,scales:c}=l;let f=0,h,d,v;const p=o-i,g=s-a;if(r.isHorizontal()){if(d=Rr(n,a,s),ue(e)){const m=Object.keys(e)[0],y=e[m];v=c[m].getPixelForValue(y)+p-t}else e==="center"?v=(u.bottom+u.top)/2+p-t:v=JV(r,e,t);h=s-a}else{if(ue(e)){const m=Object.keys(e)[0],y=e[m];d=c[m].getPixelForValue(y)-g+t}else e==="center"?d=(u.left+u.right)/2-g+t:d=JV(r,e,t);v=Rr(n,o,i),f=e==="left"?-Ge:Ge}return{titleX:d,titleY:v,maxWidth:h,rotation:f}}class El extends Ii{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=Qn(t,Number.POSITIVE_INFINITY),e=Qn(e,Number.NEGATIVE_INFINITY),n=Qn(n,Number.POSITIVE_INFINITY),i=Qn(i,Number.NEGATIVE_INFINITY),{min:Qn(t,n),max:Qn(e,i),minDefined:Sr(t),maxDefined:Sr(e)}}getMinMax(t){let{min:e,max:n,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:e,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)o=s[l].controller.getMinMax(this,t),i||(e=Math.min(e,o.min)),a||(n=Math.max(n,o.max));return e=a&&e>n?n:e,n=i&&e>n?e:n,{min:Qn(e,Qn(n,e)),max:Qn(n,Qn(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ae(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ovt(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?t4(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Gpt(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ae(this.options.afterUpdate,[this])}beforeSetDimensions(){Ae(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ae(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Ae(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ae(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,a;for(n=0,i=t.length;n<i;n++)a=t[n],a.label=Ae(e.callback,[a.value,n,t],this)}afterTickToLabelConversion(){Ae(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ae(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=this.ticks.length,i=e.minRotation||0,a=e.maxRotation;let o=i,s,l,u;if(!this._isVisible()||!e.display||i>=a||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),f=c.widest.width,h=c.highest.height,d=Er(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/n:d/(n-1),f+6>s&&(s=d/(n-(t.offset?.5:1)),l=this.maxHeight-cd(t.grid)-e.padding-e4(t.title,this.chart.options.font),u=Math.sqrt(f*f+h*h),o=yC(Math.min(Math.asin(Er((c.highest.height+6)/s,-1,1)),Math.asin(Er(l/u,-1,1))-Math.asin(Er(h/u,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Ae(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ae(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=e4(i,e.options.font);if(s?(t.width=this.maxWidth,t.height=cd(a)+l):(t.height=this.maxHeight,t.width=cd(a)+l),n.display&&this.ticks.length){const{first:u,last:c,widest:f,highest:h}=this._getLabelSizes(),d=n.padding*2,v=Ai(this.labelRotation),p=Math.cos(v),g=Math.sin(v);if(s){const m=n.mirror?0:g*f.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+m+d)}else{const m=n.mirror?0:p*f.width+g*h.height;t.width=Math.min(this.maxWidth,t.width+m+d)}this._calculatePadding(u,c,g,p)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;l?u?(h=i*t.width,d=n*e.height):(h=n*t.height,d=i*e.width):a==="start"?d=e.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-f+o)*this.width/(this.width-f),0)}else{let c=e.height/2,f=t.height/2;a==="start"?(c=0,f=t.height):a==="end"&&(c=e.height,f=0),this.paddingTop=c+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ae(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)ye(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=t4(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length)}return t}_computeLabelSizes(t,e){const{ctx:n,_longestTextCache:i}=this,a=[],o=[];let s=0,l=0,u,c,f,h,d,v,p,g,m,y,_;for(u=0;u<e;++u){if(h=t[u].label,d=this._resolveTickFontOptions(u),n.font=v=d.string,p=i[v]=i[v]||{data:{},gc:[]},g=d.lineHeight,m=y=0,!ye(h)&&!Pe(h))m=Vm(n,p.data,p.gc,m,h),y=g;else if(Pe(h))for(c=0,f=h.length;c<f;++c)_=h[c],!ye(_)&&!Pe(_)&&(m=Vm(n,p.data,p.gc,m,_),y+=g);a.push(m),o.push(y),s=Math.max(m,s),l=Math.max(y,l)}Qpt(i,e);const b=a.indexOf(s),S=o.indexOf(l),x=w=>({width:a[w]||0,height:o[w]||0});return{first:x(0),last:x(e-1),widest:x(b),highest:x(S),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return qdt(this._alignToPixels?Dl(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=tgt(this.getContext(),t,n))}return this.$context||(this.$context=Jpt(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Ai(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:a,position:o}=i,s=a.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),f=cd(a),h=[],d=a.setContext(this.getContext()),v=d.drawBorder?d.borderWidth:0,p=v/2,g=function(E){return Dl(n,E,v)};let m,y,_,b,S,x,w,C,T,D,A,P;if(o==="top")m=g(this.bottom),x=this.bottom-f,C=m-p,D=g(t.top)+p,P=t.bottom;else if(o==="bottom")m=g(this.top),D=t.top,P=g(t.bottom)-p,x=m+p,C=this.top+f;else if(o==="left")m=g(this.right),S=this.right-f,w=m-p,T=g(t.left)+p,A=t.right;else if(o==="right")m=g(this.left),T=t.left,A=g(t.right)-p,S=m+p,w=this.left+f;else if(e==="x"){if(o==="center")m=g((t.top+t.bottom)/2+.5);else if(ue(o)){const E=Object.keys(o)[0],R=o[E];m=g(this.chart.scales[E].getPixelForValue(R))}D=t.top,P=t.bottom,x=m+p,C=x+f}else if(e==="y"){if(o==="center")m=g((t.left+t.right)/2);else if(ue(o)){const E=Object.keys(o)[0],R=o[E];m=g(this.chart.scales[E].getPixelForValue(R))}S=m-p,w=S-f,T=t.left,A=t.right}const I=Jt(i.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/I));for(y=0;y<c;y+=O){const E=a.setContext(this.getContext(y)),R=E.lineWidth,z=E.color,B=E.borderDash||[],Y=E.borderDashOffset,W=E.tickWidth,et=E.tickColor,V=E.tickBorderDash||[],H=E.tickBorderDashOffset;_=Kpt(this,y,s),_!==void 0&&(b=Dl(n,_,R),l?S=w=T=A=b:x=C=D=P=b,h.push({tx1:S,ty1:x,tx2:w,ty2:C,x1:T,y1:D,x2:A,y2:P,width:R,color:z,borderDash:B,borderDashOffset:Y,tickWidth:W,tickColor:et,tickBorderDash:V,tickBorderDashOffset:H}))}return this._ticksLength=c,this._borderValue=m,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:a}=n,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:c,mirror:f}=a,h=cd(n.grid),d=h+c,v=f?-c:d,p=-Ai(this.labelRotation),g=[];let m,y,_,b,S,x,w,C,T,D,A,P,I="middle";if(i==="top")x=this.bottom-v,w=this._getXAxisLabelAlignment();else if(i==="bottom")x=this.top+v,w=this._getXAxisLabelAlignment();else if(i==="left"){const E=this._getYAxisLabelAlignment(h);w=E.textAlign,S=E.x}else if(i==="right"){const E=this._getYAxisLabelAlignment(h);w=E.textAlign,S=E.x}else if(e==="x"){if(i==="center")x=(t.top+t.bottom)/2+d;else if(ue(i)){const E=Object.keys(i)[0],R=i[E];x=this.chart.scales[E].getPixelForValue(R)+d}w=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center")S=(t.left+t.right)/2-d;else if(ue(i)){const E=Object.keys(i)[0],R=i[E];S=this.chart.scales[E].getPixelForValue(R)}w=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?I="top":l==="end"&&(I="bottom"));const O=this._getLabelSizes();for(m=0,y=s.length;m<y;++m){_=s[m],b=_.label;const E=a.setContext(this.getContext(m));C=this.getPixelForTick(m)+a.labelOffset,T=this._resolveTickFontOptions(m),D=T.lineHeight,A=Pe(b)?b.length:1;const R=A/2,z=E.color,B=E.textStrokeColor,Y=E.textStrokeWidth;let W=w;o?(S=C,w==="inner"&&(m===y-1?W=this.options.reverse?"left":"right":m===0?W=this.options.reverse?"right":"left":W="center"),i==="top"?u==="near"||p!==0?P=-A*D+D/2:u==="center"?P=-O.highest.height/2-R*D+D:P=-O.highest.height+D/2:u==="near"||p!==0?P=D/2:u==="center"?P=O.highest.height/2-R*D:P=O.highest.height-A*D,f&&(P*=-1)):(x=C,P=(1-A)*D/2);let et;if(E.showLabelBackdrop){const V=kr(E.backdropPadding),H=O.heights[m],G=O.widths[m];let j=x+P-V.top,tt=S-V.left;switch(I){case"middle":j-=H/2;break;case"bottom":j-=H;break}switch(w){case"center":tt-=G/2;break;case"right":tt-=G;break}et={left:tt,top:j,width:G+V.width,height:H+V.height,color:E.backdropColor}}g.push({rotation:p,label:b,font:T,color:z,strokeColor:B,strokeWidth:Y,textOffset:P,textAlign:W,textBaseline:I,translation:[S,x],backdrop:et})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Ai(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let u,c;return e==="left"?i?(c=this.right+a,n==="near"?u="left":n==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-s,n==="near"?u="right":n==="center"?(u="center",c-=l/2):(u="left",c=this.left)):e==="right"?i?(c=this.left+a,n==="near"?u="right":n==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+s,n==="near"?u="left":n==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:a,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,a,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,u,c)=>{!c.width||!c.color||(n.save(),n.lineWidth=c.width,n.strokeStyle=c.color,n.setLineDash(c.borderDash||[]),n.lineDashOffset=c.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(u.x,u.y),n.stroke(),n.restore())};if(e.display)for(a=0,o=i.length;a<o;++a){const l=i[a];e.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:n}}=this,i=n.setContext(this.getContext()),a=n.drawBorder?i.borderWidth:0;if(!a)return;const o=n.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,u,c,f;this.isHorizontal()?(l=Dl(t,this.left,a)-a/2,u=Dl(t,this.right,o)+o/2,c=f=s):(c=Dl(t,this.top,a)-a/2,f=Dl(t,this.bottom,o)+o/2,l=u=s),e.save(),e.lineWidth=i.borderWidth,e.strokeStyle=i.borderColor,e.beginPath(),e.moveTo(l,c),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&IC(n,i);const a=this._labelItems||(this._labelItems=this._computeLabelItems(t));let o,s;for(o=0,s=a.length;o<s;++o){const l=a[o],u=l.font,c=l.label;l.backdrop&&(n.fillStyle=l.backdrop.color,n.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let f=l.textOffset;Al(n,c,0,f,u,l)}i&&OC(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const a=ar(n.font),o=kr(n.padding),s=n.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||ue(e)?(l+=o.bottom,Pe(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:f,rotation:h}=rgt(this,l,e,s);Al(t,n.text,0,0,a,{color:n.color,maxWidth:f,rotation:h,textAlign:egt(s,e,i),textBaseline:"middle",translation:[u,c]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=Jt(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==El.prototype.draw?[{z:e,draw:i=>{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:e,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let a,o;for(a=0,o=e.length;a<o;++a){const s=e[a];s[n]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return ar(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class jm{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;agt(e)&&(n=this.register(e));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,ngt(t,o,n),this.override&&se.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in se[i]&&(delete se[i][n],this.override&&delete Ml[n])}}function ngt(r,t,e){const n=Zh(Object.create(null),[e?se.get(e):{},se.get(t),r.defaults]);se.set(t,n),r.defaultRoutes&&igt(t,r.defaultRoutes),r.descriptors&&se.describe(t,r.descriptors)}function igt(r,t){Object.keys(t).forEach(e=>{const n=e.split("."),i=n.pop(),a=[r].concat(n).join("."),o=t[e].split("."),s=o.pop(),l=o.join(".");se.route(a,i,l,s)})}function agt(r){return"id"in r&&"defaults"in r}class ogt{constructor(){this.controllers=new jm(Li,"datasets",!0),this.elements=new jm(Ii,"elements"),this.plugins=new jm(Object,"plugins"),this.scales=new jm(El,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(i=>{const a=n||this._getRegistryForType(i);n||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):xe(i,o=>{const s=n||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,e,n){const i=mC(t);Ae(n["before"+i],[],n),e[t](n),Ae(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var sa=new ogt;class YC extends Li{update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:a,count:o}=nV(e,n,i);if(this._drawStart=a,this._drawCount=o,iV(e)&&(a=0,o=n.length),this.options.showLine){const{dataset:s,_dataset:l}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=n;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:u},t)}this.updateElements(n,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=sa.getElement("line")),super.addElements()}updateElements(t,e,n,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),f=this.getSharedOptions(c),h=this.includeOptions(i,f),d=o.axis,v=s.axis,{spanGaps:p,segment:g}=this.options,m=vc(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||i==="none";let _=e>0&&this.getParsed(e-1);for(let b=e;b<e+n;++b){const S=t[b],x=this.getParsed(b),w=y?S:{},C=ye(x[v]),T=w[d]=o.getPixelForValue(x[d],b),D=w[v]=a||C?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,x,l):x[v],b);w.skip=isNaN(T)||isNaN(D)||C,w.stop=b>0&&Math.abs(x[d]-_[d])>m,g&&(w.parsed=x,w.raw=u.data[b]),h&&(w.options=f||this.resolveDataElementOptions(b,S.active?"active":i)),y||this.updateElement(S,b,w,i),_=x}this.updateSharedOptions(f,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let s=0;for(let l=e.length-1;l>=0;--l)s=Math.max(s,e[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const a=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,a,o)/2}}YC.id="scatter",YC.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},YC.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(r){return"("+r.label+", "+r.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Rl(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class qC{constructor(t){this.options=t||{}}init(t){}formats(){return Rl()}parse(t,e){return Rl()}format(t,e){return Rl()}add(t,e,n){return Rl()}diff(t,e,n){return Rl()}startOf(t,e,n){return Rl()}endOf(t,e){return Rl()}}qC.override=function(r){Object.assign(qC.prototype,r)};var sgt={_date:qC};function lgt(r,t,e,n){const{controller:i,data:a,_sorted:o}=r,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const l=s._reversePixels?jdt:Tl;if(n){if(i._sharedOptions){const u=a[0],c=typeof u.getRange=="function"&&u.getRange(t);if(c){const f=l(a,t,e-c),h=l(a,t,e+c);return{lo:f.lo,hi:h.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function fd(r,t,e,n,i){const a=r.getSortedVisibleDatasetMetas(),o=e[t];for(let s=0,l=a.length;s<l;++s){const{index:u,data:c}=a[s],{lo:f,hi:h}=lgt(a[s],t,o,i);for(let d=f;d<=h;++d){const v=c[d];v.skip||n(v,u,d)}}}function ugt(r){const t=r.indexOf("x")!==-1,e=r.indexOf("y")!==-1;return function(n,i){const a=t?Math.abs(n.x-i.x):0,o=e?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function jC(r,t,e,n,i){const a=[];return!i&&!r.isPointInArea(t)||fd(r,e,t,function(s,l,u){!i&&!ad(s,r.chartArea,0)||s.inRange(t.x,t.y,n)&&a.push({element:s,datasetIndex:l,index:u})},!0),a}function cgt(r,t,e,n){let i=[];function a(o,s,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],n),{angle:f}=KF(o,{x:t.x,y:t.y});td(f,u,c)&&i.push({element:o,datasetIndex:s,index:l})}return fd(r,e,t,a),i}function fgt(r,t,e,n,i,a){let o=[];const s=ugt(e);let l=Number.POSITIVE_INFINITY;function u(c,f,h){const d=c.inRange(t.x,t.y,i);if(n&&!d)return;const v=c.getCenterPoint(i);if(!(!!a||r.isPointInArea(v))&&!d)return;const g=s(t,v);g<l?(o=[{element:c,datasetIndex:f,index:h}],l=g):g===l&&o.push({element:c,datasetIndex:f,index:h})}return fd(r,e,t,u),o}function XC(r,t,e,n,i,a){return!a&&!r.isPointInArea(t)?[]:e==="r"&&!n?cgt(r,t,e,i):fgt(r,t,e,n,i,a)}function r4(r,t,e,n,i){const a=[],o=e==="x"?"inXRange":"inYRange";let s=!1;return fd(r,e,t,(l,u,c)=>{l[o](t[e],i)&&(a.push({element:l,datasetIndex:u,index:c}),s=s||l.inRange(t.x,t.y,i))}),n&&!s?[]:a}var hgt={evaluateInteractionItems:fd,modes:{index(r,t,e,n){const i=Il(t,r),a=e.axis||"x",o=e.includeInvisible||!1,s=e.intersect?jC(r,i,a,n,o):XC(r,i,a,!1,n,o),l=[];return s.length?(r.getSortedVisibleDatasetMetas().forEach(u=>{const c=s[0].index,f=u.data[c];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:c})}),l):[]},dataset(r,t,e,n){const i=Il(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;let s=e.intersect?jC(r,i,a,n,o):XC(r,i,a,!1,n,o);if(s.length>0){const l=s[0].datasetIndex,u=r.getDatasetMeta(l).data;s=[];for(let c=0;c<u.length;++c)s.push({element:u[c],datasetIndex:l,index:c})}return s},point(r,t,e,n){const i=Il(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;return jC(r,i,a,n,o)},nearest(r,t,e,n){const i=Il(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;return XC(r,i,a,e.intersect,n,o)},x(r,t,e,n){const i=Il(t,r);return r4(r,i,"x",e.intersect,n)},y(r,t,e,n){const i=Il(t,r);return r4(r,i,"y",e.intersect,n)}}};const n4=["left","top","right","bottom"];function hd(r,t){return r.filter(e=>e.pos===t)}function i4(r,t){return r.filter(e=>n4.indexOf(e.pos)===-1&&e.box.axis===t)}function dd(r,t){return r.sort((e,n)=>{const i=t?n:e,a=t?e:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function dgt(r){const t=[];let e,n,i,a,o,s;for(e=0,n=(r||[]).length;e<n;++e)i=r[e],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:e,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function vgt(r){const t={};for(const e of r){const{stack:n,pos:i,stackWeight:a}=e;if(!n||!n4.includes(i))continue;const o=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function pgt(r,t){const e=vgt(r),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=r.length;a<o;++a){s=r[a];const{fullSize:l}=s.box,u=e[s.stack],c=u&&s.stackWeight/u.weight;s.horizontal?(s.width=c?c*n:l&&t.availableWidth,s.height=i):(s.width=n,s.height=c?c*i:l&&t.availableHeight)}return e}function ggt(r){const t=dgt(r),e=dd(t.filter(u=>u.box.fullSize),!0),n=dd(hd(t,"left"),!0),i=dd(hd(t,"right")),a=dd(hd(t,"top"),!0),o=dd(hd(t,"bottom")),s=i4(t,"x"),l=i4(t,"y");return{fullSize:e,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:hd(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function a4(r,t,e,n){return Math.max(r[e],t[e])+Math.max(r[n],t[n])}function o4(r,t){r.top=Math.max(r.top,t.top),r.left=Math.max(r.left,t.left),r.bottom=Math.max(r.bottom,t.bottom),r.right=Math.max(r.right,t.right)}function mgt(r,t,e,n){const{pos:i,box:a}=e,o=r.maxPadding;if(!ue(i)){e.size&&(r[i]-=e.size);const f=n[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?a.height:a.width),e.size=f.size/f.count,r[i]+=e.size}a.getPadding&&o4(o,a.getPadding());const s=Math.max(0,t.outerWidth-a4(o,r,"left","right")),l=Math.max(0,t.outerHeight-a4(o,r,"top","bottom")),u=s!==r.w,c=l!==r.h;return r.w=s,r.h=l,e.horizontal?{same:u,other:c}:{same:c,other:u}}function ygt(r){const t=r.maxPadding;function e(n){const i=Math.max(t[n]-r[n],0);return r[n]+=i,i}r.y+=e("top"),r.x+=e("left"),e("right"),e("bottom")}function _gt(r,t){const e=t.maxPadding;function n(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],e[o])}),a}return n(r?["left","right"]:["top","bottom"])}function vd(r,t,e,n){const i=[];let a,o,s,l,u,c;for(a=0,o=r.length,u=0;a<o;++a){s=r[a],l=s.box,l.update(s.width||t.w,s.height||t.h,_gt(s.horizontal,t));const{same:f,other:h}=mgt(t,e,s,n);u|=f&&i.length,c=c||h,l.fullSize||i.push(s)}return u&&vd(i,t,e,n)||c}function Xm(r,t,e,n,i){r.top=e,r.left=t,r.right=t+n,r.bottom=e+i,r.width=n,r.height=i}function s4(r,t,e,n){const i=e.padding;let{x:a,y:o}=t;for(const s of r){const l=s.box,u=n[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/u.weight||1;if(s.horizontal){const f=t.w*c,h=u.size||l.height;Jn(u.start)&&(o=u.start),l.fullSize?Xm(l,i.left,o,e.outerWidth-i.right-i.left,h):Xm(l,t.left+u.placed,o,f,h),u.start=o,u.placed+=f,o=l.bottom}else{const f=t.h*c,h=u.size||l.width;Jn(u.start)&&(a=u.start),l.fullSize?Xm(l,a,i.top,h,e.outerHeight-i.bottom-i.top):Xm(l,a,t.top+u.placed,h,f),u.start=a,u.placed+=f,a=l.right}}t.x=a,t.y=o}se.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ri={addBox(r,t){r.boxes||(r.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},r.boxes.push(t)},removeBox(r,t){const e=r.boxes?r.boxes.indexOf(t):-1;e!==-1&&r.boxes.splice(e,1)},configure(r,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(r,t,e,n){if(!r)return;const i=kr(r.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(e-i.height,0),s=ggt(r.boxes),l=s.vertical,u=s.horizontal;xe(r.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const c=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),h=Object.assign({},i);o4(h,kr(n));const d=Object.assign({maxPadding:h,w:a,h:o,x:i.left,y:i.top},i),v=pgt(l.concat(u),f);vd(s.fullSize,d,f,v),vd(l,d,f,v),vd(u,d,f,v)&&vd(l,d,f,v),ygt(d),s4(s.leftAndTop,d,f,v),d.x+=d.w,d.y+=d.h,s4(s.rightAndBottom,d,f,v),r.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},xe(s.chartArea,p=>{const g=p.box;Object.assign(g,r.chartArea),g.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class l4{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class bgt extends l4{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Zm="$chartjs",xgt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},u4=r=>r===null||r==="";function Sgt(r,t){const e=r.style,n=r.getAttribute("height"),i=r.getAttribute("width");if(r[Zm]={initial:{height:n,width:i,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",u4(i)){const a=LV(r,"width");a!==void 0&&(r.width=a)}if(u4(n))if(r.style.height==="")r.height=r.width/(t||2);else{const a=LV(r,"height");a!==void 0&&(r.height=a)}return r}const c4=ept?{passive:!0}:!1;function wgt(r,t,e){r.addEventListener(t,e,c4)}function Cgt(r,t,e){r.canvas.removeEventListener(t,e,c4)}function Tgt(r,t){const e=xgt[r.type]||r.type,{x:n,y:i}=Il(r,t);return{type:e,chart:t,native:r,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Km(r,t){for(const e of r)if(e===t||e.contains(t))return!0}function Mgt(r,t,e){const n=r.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Km(s.addedNodes,n),o=o&&!Km(s.removedNodes,n);o&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}function Dgt(r,t,e){const n=r.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Km(s.removedNodes,n),o=o&&!Km(s.addedNodes,n);o&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}const pd=new Map;let f4=0;function h4(){const r=window.devicePixelRatio;r!==f4&&(f4=r,pd.forEach((t,e)=>{e.currentDevicePixelRatio!==r&&t()}))}function Agt(r,t){pd.size||window.addEventListener("resize",h4),pd.set(r,t)}function Pgt(r){pd.delete(r),pd.size||window.removeEventListener("resize",h4)}function Lgt(r,t,e){const n=r.canvas,i=n&&BC(n);if(!i)return;const a=rV((s,l)=>{const u=i.clientWidth;e(s,l),u<i.clientWidth&&e()},window),o=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||a(u,c)});return o.observe(i),Agt(r,a),o}function ZC(r,t,e){e&&e.disconnect(),t==="resize"&&Pgt(r)}function Igt(r,t,e){const n=r.canvas,i=rV(a=>{r.ctx!==null&&e(Tgt(a,r))},r,a=>{const o=a[0];return[o,o.offsetX,o.offsetY]});return wgt(n,t,i),i}class Ogt extends l4{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Sgt(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Zm])return!1;const n=e[Zm].initial;["height","width"].forEach(a=>{const o=n[a];ye(o)?e.removeAttribute(a):e.setAttribute(a,o)});const i=n.style||{};return Object.keys(i).forEach(a=>{e.style[a]=i[a]}),e.width=e.width,delete e[Zm],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),o={attach:Mgt,detach:Dgt,resize:Lgt}[e]||Igt;i[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;({attach:ZC,detach:ZC,resize:ZC}[e]||Cgt)(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return tpt(t,e,n,i)}isAttached(t){const e=BC(t);return!!(e&&e.isConnected)}}function Egt(r){return!AV()||typeof OffscreenCanvas!="undefined"&&r instanceof OffscreenCanvas?bgt:Ogt}class Rgt{constructor(){this._init=[]}notify(t,e,n,i){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,e,n);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,n,i){i=i||{};for(const a of t){const o=a.plugin,s=o[n],l=[e,i,a.options];if(Ae(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){ye(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=Jt(n.options&&n.options.plugins,{}),a=kgt(n);return i===!1&&!e?[]:Bgt(t,a,i,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function kgt(r){const t={},e=[],n=Object.keys(sa.plugins.items);for(let a=0;a<n.length;a++)e.push(sa.getPlugin(n[a]));const i=r.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];e.indexOf(o)===-1&&(e.push(o),t[o.id]=!0)}return{plugins:e,localIds:t}}function Ngt(r,t){return!t&&r===!1?null:r===!0?{}:r}function Bgt(r,{plugins:t,localIds:e},n,i){const a=[],o=r.getContext();for(const s of t){const l=s.id,u=Ngt(n[l],i);u!==null&&a.push({plugin:s,options:zgt(r.config,{plugin:s,local:e[l]},u,o)})}return a}function zgt(r,{plugin:t,local:e},n,i){const a=r.pluginScopeKeys(t),o=r.getOptionScopes(n,a);return e&&t.defaults&&o.push(t.defaults),r.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function KC(r,t){const e=se.datasets[r]||{};return((t.datasets||{})[r]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Fgt(r,t){let e=r;return r==="_index_"?e=t:r==="_value_"&&(e=t==="x"?"y":"x"),e}function Vgt(r,t){return r===t?"_index_":"_value_"}function Hgt(r){if(r==="top"||r==="bottom")return"x";if(r==="left"||r==="right")return"y"}function QC(r,t){return r==="x"||r==="y"?r:t.axis||Hgt(t.position)||r.charAt(0).toLowerCase()}function $gt(r,t){const e=Ml[r.type]||{scales:{}},n=t.scales||{},i=KC(r.type,t),a=Object.create(null),o=Object.create(null);return Object.keys(n).forEach(s=>{const l=n[s];if(!ue(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=QC(s,l),c=Vgt(u,i),f=e.scales||{};a[u]=a[u]||s,o[s]=Kh(Object.create(null),[{axis:u},l,f[u],f[c]])}),r.data.datasets.forEach(s=>{const l=s.type||r.type,u=s.indexAxis||KC(l,t),f=(Ml[l]||{}).scales||{};Object.keys(f).forEach(h=>{const d=Fgt(h,u),v=s[d+"AxisID"]||a[d]||d;o[v]=o[v]||Object.create(null),Kh(o[v],[{axis:d},n[v],f[h]])})}),Object.keys(o).forEach(s=>{const l=o[s];Kh(l,[se.scales[l.type],se.scale])}),o}function d4(r){const t=r.options||(r.options={});t.plugins=Jt(t.plugins,{}),t.scales=$gt(r,t)}function v4(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function Wgt(r){return r=r||{},r.data=v4(r.data),d4(r),r}const p4=new Map,g4=new Set;function Qm(r,t){let e=p4.get(r);return e||(e=t(),p4.set(r,e),g4.add(e)),e}const gd=(r,t,e)=>{const n=$o(t,e);n!==void 0&&r.add(n)};class Ggt{constructor(t){this._config=Wgt(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=v4(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),d4(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qm(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Qm(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Qm(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return Qm(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return(!i||e)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:a}=this,o=this._cachedScopes(t,n),s=o.get(e);if(s)return s;const l=new Set;e.forEach(c=>{t&&(l.add(t),c.forEach(f=>gd(l,t,f))),c.forEach(f=>gd(l,i,f)),c.forEach(f=>gd(l,Ml[a]||{},f)),c.forEach(f=>gd(l,se,f)),c.forEach(f=>gd(l,AC,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),g4.has(e)&&o.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ml[e]||{},se.datasets[e]||{},{type:e},se,AC]}resolveNamedOptions(t,e,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=m4(this._resolverCache,t,i);let l=o;if(Ygt(o,e)){a.$shared=!1,n=Wo(n)?n():n;const u=this.createResolver(t,n,s);l=gc(o,n,u)}for(const u of e)a[u]=l[u];return a}createResolver(t,e,n=[""],i){const{resolver:a}=m4(this._resolverCache,t,n);return ue(e)?gc(a,e,void 0,i):a}}function m4(r,t,e){let n=r.get(t);n||(n=new Map,r.set(t,n));const i=e.join();let a=n.get(i);return a||(a={resolver:RC(t,e),subPrefixes:e.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const Ugt=r=>ue(r)&&Object.getOwnPropertyNames(r).reduce((t,e)=>t||Wo(r[e]),!1);function Ygt(r,t){const{isScriptable:e,isIndexable:n}=bV(r);for(const i of t){const a=e(i),o=n(i),s=(o||a)&&r[i];if(a&&(Wo(s)||Ugt(s))||o&&Pe(s))return!0}return!1}var qgt="3.9.1";const jgt=["top","bottom","left","right","chartArea"];function y4(r,t){return r==="top"||r==="bottom"||jgt.indexOf(r)===-1&&t==="x"}function _4(r,t){return function(e,n){return e[r]===n[r]?e[t]-n[t]:e[r]-n[r]}}function b4(r){const t=r.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Ae(e&&e.onComplete,[r],t)}function Xgt(r){const t=r.chart,e=t.options.animation;Ae(e&&e.onProgress,[r],t)}function x4(r){return AV()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}const Jm={},S4=r=>{const t=x4(r);return Object.values(Jm).filter(e=>e.canvas===t).pop()};function Zgt(r,t,e){const n=Object.keys(r);for(const i of n){const a=+i;if(a>=t){const o=r[i];delete r[i],(e>0||a>t)&&(r[a+e]=o)}}}function Kgt(r,t,e,n){return!e||r.type==="mouseout"?null:n?t:r}class md{constructor(t,e){const n=this.config=new Ggt(e),i=x4(t),a=S4(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Egt(i)),this.platform.updateConfig(n);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;if(this.id=kdt(),this.ctx=s,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Rgt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kdt(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Jm[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Wa.listen(this,"complete",b4),Wa.listen(this,"progress",Xgt),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:a}=this;return ye(t)?e&&a?a:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():PV(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return mV(this.canvas,this.ctx),this}stop(){return Wa.stop(this),this}resize(t,e){Wa.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,e,a),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,PV(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Ae(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};xe(e,(n,i)=>{n.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let a=[];e&&(a=a.concat(Object.keys(e).map(o=>{const s=e[o],l=QC(o,s),u=l==="r",c=l==="x";return{options:s,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),xe(a,o=>{const s=o.options,l=s.id,u=QC(l,s),c=Jt(s.type,o.dtype);(s.position===void 0||y4(s.position,u)!==y4(o.dposition))&&(s.position=o.dposition),i[l]=!0;let f=null;if(l in n&&n[l].type===c)f=n[l];else{const h=sa.getScale(c);f=new h({id:l,type:c,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(s,t)}),xe(i,(o,s)=>{o||delete n[s]}),xe(n,o=>{ri.configure(this,o,o.options),ri.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((i,a)=>i.index-a.index),n>e){for(let i=e;i<n;++i)this._destroyDatasetMeta(i);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(_4("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,i)=>{e.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const a=e[n];let o=this.getDatasetMeta(n);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=a.indexAxis||KC(s,this.options),o.order=a.order||0,o.index=n,o.label=""+a.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=sa.getController(s),{datasetElementType:u,dataElementType:c}=se.datasets[s];Object.assign(l.prototype,{dataElementType:sa.getElement(c),datasetElementType:u&&sa.getElement(u)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){xe(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:f}=this.getDatasetMeta(u),h=!i&&a.indexOf(f)===-1;f.buildOrUpdateElements(h),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),i||xe(a,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(_4("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){xe(this.scales,t=>{ri.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!YF(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:a}of e){const o=n==="_removeElements"?-a:a;Zgt(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=n(0);for(let a=1;a<e;a++)if(!YF(i,n(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ri.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],xe(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Wo(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Wa.has(this)?this.attached&&!Wa.running(this)&&Wa.start(this):(this.draw(),b4({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resize(n,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,a;for(i=0,a=e.length;i<a;++i){const o=e[i];(!t||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,i=!n.disabled,a=this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&IC(e,{left:n.left===!1?0:a.left-n.left,right:n.right===!1?this.width:a.right+n.right,top:n.top===!1?0:a.top-n.top,bottom:n.bottom===!1?this.height:a.bottom+n.bottom}),t.controller.draw(),i&&OC(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ad(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const a=hgt.modes[e];return typeof a=="function"?a(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter(a=>a&&a._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=qo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);Jn(e)?(a.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(a,{visible:n}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Wa.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),mV(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Jm[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(a,o)=>{e.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};xe(this.options.events,a=>n(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,u)=>{e.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(e.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",a),n("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),n("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){xe(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},xe(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let a,o,s,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!Om(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}_updateHoverStyles(t,e,n){const i=this.options.hover,a=(l,u)=>l.filter(c=>!u.some(f=>c.datasetIndex===f.datasetIndex&&c.index===f.index)),o=a(e,t),s=n?t:a(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const a=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:a}=this,o=e,s=this._getActiveElements(t,i,n,o),l=Hdt(t),u=Kgt(t,this._lastEvent,n,l);n&&(this._lastEvent=null,Ae(a.onHover,[t,s,this],this),l&&Ae(a.onClick,[t,s,this],this));const c=!Om(s,i);return(c||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=u,c}_getActiveElements(t,e,n,i){if(t.type==="mouseout")return[];if(!n)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}const w4=()=>xe(md.instances,r=>r._plugins.invalidate()),jo=!0;Object.defineProperties(md,{defaults:{enumerable:jo,value:se},instances:{enumerable:jo,value:Jm},overrides:{enumerable:jo,value:Ml},registry:{enumerable:jo,value:sa},version:{enumerable:jo,value:qgt},getChart:{enumerable:jo,value:S4},register:{enumerable:jo,value:(...r)=>{sa.add(...r),w4()}},unregister:{enumerable:jo,value:(...r)=>{sa.remove(...r),w4()}}});function C4(r,t,e){const{startAngle:n,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:l}=t;let u=i/s;r.beginPath(),r.arc(a,o,s,n-u,e+u),l>i?(u=i/l,r.arc(a,o,l,e+u,n-u,!0)):r.arc(a,o,i,e+Ge,n-Ge),r.closePath(),r.clip()}function Qgt(r){return EC(r,["outerStart","outerEnd","innerStart","innerEnd"])}function Jgt(r,t,e,n){const i=Qgt(r.options.borderRadius),a=(e-t)/2,o=Math.min(a,n*t/2),s=l=>{const u=(e-Math.min(a,l))*n/2;return Er(l,0,Math.min(a,u))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Er(i.innerStart,0,o),innerEnd:Er(i.innerEnd,0,o)}}function _c(r,t,e,n){return{x:e+r*Math.cos(t),y:n+r*Math.sin(t)}}function JC(r,t,e,n,i,a){const{x:o,y:s,startAngle:l,pixelMargin:u,innerRadius:c}=t,f=Math.max(t.outerRadius+n+e-u,0),h=c>0?c+n+e+u:0;let d=0;const v=i-l;if(n){const E=c>0?c-n:0,R=f>0?f-n:0,z=(E+R)/2,B=z!==0?v*z/(z+n):v;d=(v-B)/2}const p=Math.max(.001,v*f-e/ke)/f,g=(v-p)/2,m=l+g+d,y=i-g-d,{outerStart:_,outerEnd:b,innerStart:S,innerEnd:x}=Jgt(t,h,f,y-m),w=f-_,C=f-b,T=m+_/w,D=y-b/C,A=h+S,P=h+x,I=m+S/A,O=y-x/P;if(r.beginPath(),a){if(r.arc(o,s,f,T,D),b>0){const z=_c(C,D,o,s);r.arc(z.x,z.y,b,D,y+Ge)}const E=_c(P,y,o,s);if(r.lineTo(E.x,E.y),x>0){const z=_c(P,O,o,s);r.arc(z.x,z.y,x,y+Ge,O+Math.PI)}if(r.arc(o,s,h,y-x/h,m+S/h,!0),S>0){const z=_c(A,I,o,s);r.arc(z.x,z.y,S,I+Math.PI,m-Ge)}const R=_c(w,m,o,s);if(r.lineTo(R.x,R.y),_>0){const z=_c(w,T,o,s);r.arc(z.x,z.y,_,m-Ge,T)}}else{r.moveTo(o,s);const E=Math.cos(T)*f+o,R=Math.sin(T)*f+s;r.lineTo(E,R);const z=Math.cos(D)*f+o,B=Math.sin(D)*f+s;r.lineTo(z,B)}r.closePath()}function tmt(r,t,e,n,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){JC(r,t,e,n,o+De,i);for(let u=0;u<a;++u)r.fill();isNaN(s)||(l=o+s%De,s%De===0&&(l+=De))}return JC(r,t,e,n,l,i),r.fill(),l}function emt(r,t,e){const{x:n,y:i,startAngle:a,pixelMargin:o,fullCircles:s}=t,l=Math.max(t.outerRadius-o,0),u=t.innerRadius+o;let c;for(e&&C4(r,t,a+De),r.beginPath(),r.arc(n,i,u,a+De,a,!0),c=0;c<s;++c)r.stroke();for(r.beginPath(),r.arc(n,i,l,a,a+De),c=0;c<s;++c)r.stroke()}function rmt(r,t,e,n,i,a){const{options:o}=t,{borderWidth:s,borderJoinStyle:l}=o,u=o.borderAlign==="inner";!s||(u?(r.lineWidth=s*2,r.lineJoin=l||"round"):(r.lineWidth=s,r.lineJoin=l||"bevel"),t.fullCircles&&emt(r,t,u),u&&C4(r,t,i),JC(r,t,e,n,i,a),r.stroke())}class tT extends Ii{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:a,distance:o}=KF(i,{x:t,y:e}),{startAngle:s,endAngle:l,innerRadius:u,outerRadius:c,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=this.options.spacing/2,v=Jt(f,l-s)>=De||td(a,s,l),p=Go(o,u+h,c+h);return v&&p}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:a,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:u}=this.options,c=(i+a)/2,f=(o+s+u+l)/2;return{x:e+Math.cos(c)*f,y:n+Math.sin(c)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/2,a=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=n>De?Math.floor(n/De):0,n===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(i){s=i/2;const u=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(u)*s,Math.sin(u)*s),this.circumference>=ke&&(s=i)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const l=tmt(t,this,s,a,o);rmt(t,this,s,a,l,o),t.restore()}}tT.id="arc",tT.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},tT.defaultRoutes={backgroundColor:"backgroundColor"};function T4(r,t,e=t){r.lineCap=Jt(e.borderCapStyle,t.borderCapStyle),r.setLineDash(Jt(e.borderDash,t.borderDash)),r.lineDashOffset=Jt(e.borderDashOffset,t.borderDashOffset),r.lineJoin=Jt(e.borderJoinStyle,t.borderJoinStyle),r.lineWidth=Jt(e.borderWidth,t.borderWidth),r.strokeStyle=Jt(e.borderColor,t.borderColor)}function nmt(r,t,e){r.lineTo(e.x,e.y)}function imt(r){return r.stepped?Cvt:r.tension||r.cubicInterpolationMode==="monotone"?Tvt:nmt}function M4(r,t,e={}){const n=r.length,{start:i=0,end:a=n-1}=e,{start:o,end:s}=t,l=Math.max(i,o),u=Math.min(a,s),c=i<o&&a<o||i>s&&a>s;return{count:n,start:l,loop:t.loop,ilen:u<l&&!c?n+u-l:u-l}}function amt(r,t,e,n){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:u}=M4(i,e,n),c=imt(a);let{move:f=!0,reverse:h}=n||{},d,v,p;for(d=0;d<=u;++d)v=i[(s+(h?u-d:d))%o],!v.skip&&(f?(r.moveTo(v.x,v.y),f=!1):c(r,p,v,h,a.stepped),p=v);return l&&(v=i[(s+(h?u:0))%o],c(r,p,v,h,a.stepped)),!!l}function omt(r,t,e,n){const i=t.points,{count:a,start:o,ilen:s}=M4(i,e,n),{move:l=!0,reverse:u}=n||{};let c=0,f=0,h,d,v,p,g,m;const y=b=>(o+(u?s-b:b))%a,_=()=>{p!==g&&(r.lineTo(c,g),r.lineTo(c,p),r.lineTo(c,m))};for(l&&(d=i[y(0)],r.moveTo(d.x,d.y)),h=0;h<=s;++h){if(d=i[y(h)],d.skip)continue;const b=d.x,S=d.y,x=b|0;x===v?(S<p?p=S:S>g&&(g=S),c=(f*c+b)/++f):(_(),r.lineTo(b,S),v=x,f=0,p=g=S),m=S}_()}function eT(r){const t=r.options,e=t.borderDash&&t.borderDash.length;return!r._decimated&&!r._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?omt:amt}function smt(r){return r.stepped?rpt:r.tension||r.cubicInterpolationMode==="monotone"?npt:Ol}function lmt(r,t,e,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,e,n)&&i.closePath()),T4(r,t.options),r.stroke(i)}function umt(r,t,e,n){const{segments:i,options:a}=t,o=eT(t);for(const s of i)T4(r,a,s.style),r.beginPath(),o(r,t,s,{start:e,end:e+n-1})&&r.closePath(),r.stroke()}const cmt=typeof Path2D=="function";function fmt(r,t,e,n){cmt&&!t.options.segment?lmt(r,t,e,n):umt(r,t,e,n)}class ty extends Ii{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;jvt(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=hpt(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],a=this.points,o=upt(this,{property:e,start:i,end:i});if(!o.length)return;const s=[],l=smt(n);let u,c;for(u=0,c=o.length;u<c;++u){const{start:f,end:h}=o[u],d=a[f],v=a[h];if(d===v){s.push(d);continue}const p=Math.abs((i-d[e])/(v[e]-d[e])),g=l(d,v,p,n.stepped);g[e]=t[e],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,e,n){return eT(this)(t,this,e,n)}path(t,e,n){const i=this.segments,a=eT(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const s of i)o&=a(t,this,s,{start:e,end:e+n-1});return!!o}draw(t,e,n,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),fmt(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ty.id="line",ty.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},ty.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},ty.descriptors={_scriptable:!0,_indexable:r=>r!=="borderDash"&&r!=="fill"};function D4(r,t,e,n){const i=r.options,{[e]:a}=r.getProps([e],n);return Math.abs(t-a)<i.radius+i.hitRadius}class rT extends Ii{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],n);return Math.pow(t-a,2)+Math.pow(e-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return D4(this,t,"x",e)}inYRange(t,e){return D4(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const n=e&&t.borderWidth||0;return(e+n)*2}draw(t,e){const n=this.options;this.skip||n.radius<.1||!ad(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,LC(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}rT.id="point",rT.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},rT.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function A4(r,t){const{x:e,y:n,base:i,width:a,height:o}=r.getProps(["x","y","base","width","height"],t);let s,l,u,c,f;return r.horizontal?(f=o/2,s=Math.min(e,i),l=Math.max(e,i),u=n-f,c=n+f):(f=a/2,s=e-f,l=e+f,u=Math.min(n,i),c=Math.max(n,i)),{left:s,top:u,right:l,bottom:c}}function Xo(r,t,e,n){return r?0:Er(t,e,n)}function hmt(r,t,e){const n=r.options.borderWidth,i=r.borderSkipped,a=_V(n);return{t:Xo(i.top,a.top,0,e),r:Xo(i.right,a.right,0,t),b:Xo(i.bottom,a.bottom,0,e),l:Xo(i.left,a.left,0,t)}}function dmt(r,t,e){const{enableBorderRadius:n}=r.getProps(["enableBorderRadius"]),i=r.options.borderRadius,a=Pl(i),o=Math.min(t,e),s=r.borderSkipped,l=n||ue(i);return{topLeft:Xo(!l||s.top||s.left,a.topLeft,0,o),topRight:Xo(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Xo(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Xo(!l||s.bottom||s.right,a.bottomRight,0,o)}}function vmt(r){const t=A4(r),e=t.right-t.left,n=t.bottom-t.top,i=hmt(r,e/2,n/2),a=dmt(r,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function nT(r,t,e,n){const i=t===null,a=e===null,s=r&&!(i&&a)&&A4(r,n);return s&&(i||Go(t,s.left,s.right))&&(a||Go(e,s.top,s.bottom))}function pmt(r){return r.topLeft||r.topRight||r.bottomLeft||r.bottomRight}function gmt(r,t){r.rect(t.x,t.y,t.w,t.h)}function iT(r,t,e={}){const n=r.x!==e.x?-t:0,i=r.y!==e.y?-t:0,a=(r.x+r.w!==e.x+e.w?t:0)-n,o=(r.y+r.h!==e.y+e.h?t:0)-i;return{x:r.x+n,y:r.y+i,w:r.w+a,h:r.h+o,radius:r.radius}}class ey extends Ii{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:a,outer:o}=vmt(this),s=pmt(o.radius)?od:gmt;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,iT(o,e,a)),t.clip(),s(t,iT(a,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,iT(a,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return nT(this,t,e,n)}inXRange(t,e){return nT(this,t,null,e)}inYRange(t,e){return nT(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+i)/2:e,y:a?n:(n+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ey.id="bar",ey.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ey.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const P4=(r,t)=>{let{boxHeight:e=t,boxWidth:n=t}=r;return r.usePointStyle&&(e=Math.min(e,t),n=r.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},mmt=(r,t)=>r!==null&&t!==null&&r.datasetIndex===t.datasetIndex&&r.index===t.index;class L4 extends Ii{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Ae(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,i)=>t.sort(n,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,i=ar(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=P4(n,a);let u,c;e.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,a,s,l)+10):(c=this.maxHeight,u=this._fitCols(o,a,s,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+s;let f=t;a.textAlign="left",a.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach((v,p)=>{const g=n+e/2+a.measureText(v.text).width;(p===0||u[u.length-1]+g+2*s>o)&&(f+=c,u[u.length-(p>0?0:1)]=0,d+=c,h++),l[p]={left:0,top:d,row:h,width:g,height:i},u[u.length-1]+=g+s}),f}_fitCols(t,e,n,i){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let f=s,h=0,d=0,v=0,p=0;return this.legendItems.forEach((g,m)=>{const y=n+e/2+a.measureText(g.text).width;m>0&&d+i+2*s>c&&(f+=h+s,u.push({width:h,height:d}),v+=h+s,p++,h=d=0),l[m]={left:v,top:d,col:p,width:y,height:i},h=Math.max(h,y),d+=i+s}),f+=h,u.push({width:h,height:d}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:a}}=this,o=yc(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=Rr(n,this.left+i,this.right-this.lineWidths[s]);for(const u of e)s!==u.row&&(s=u.row,l=Rr(n,this.left+i,this.right-this.lineWidths[s])),u.top+=this.top+t+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let s=0,l=Rr(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const u of e)u.col!==s&&(s=u.col,l=Rr(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;IC(t,this),this._draw(),OC(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:a,labels:o}=t,s=se.color,l=yc(t.rtl,this.left,this.width),u=ar(o.font),{color:c,padding:f}=o,h=u.size,d=h/2;let v;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=P4(o,h),y=function(w,C,T){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;i.save();const D=Jt(T.lineWidth,1);if(i.fillStyle=Jt(T.fillStyle,s),i.lineCap=Jt(T.lineCap,"butt"),i.lineDashOffset=Jt(T.lineDashOffset,0),i.lineJoin=Jt(T.lineJoin,"miter"),i.lineWidth=D,i.strokeStyle=Jt(T.strokeStyle,s),i.setLineDash(Jt(T.lineDash,[])),o.usePointStyle){const A={radius:g*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:D},P=l.xPlus(w,p/2),I=C+d;yV(i,A,P,I,o.pointStyleWidth&&p)}else{const A=C+Math.max((h-g)/2,0),P=l.leftForLtr(w,p),I=Pl(T.borderRadius);i.beginPath(),Object.values(I).some(O=>O!==0)?od(i,{x:P,y:A,w:p,h:g,radius:I}):i.rect(P,A,p,g),i.fill(),D!==0&&i.stroke()}i.restore()},_=function(w,C,T){Al(i,T.text,w,C+m/2,u,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},b=this.isHorizontal(),S=this._computeTitleHeight();b?v={x:Rr(a,this.left+f,this.right-n[0]),y:this.top+f+S,line:0}:v={x:this.left+f,y:Rr(a,this.top+S+f,this.bottom-e[0].height),line:0},OV(this.ctx,t.textDirection);const x=m+f;this.legendItems.forEach((w,C)=>{i.strokeStyle=w.fontColor||c,i.fillStyle=w.fontColor||c;const T=i.measureText(w.text).width,D=l.textAlign(w.textAlign||(w.textAlign=o.textAlign)),A=p+d+T;let P=v.x,I=v.y;l.setWidth(this.width),b?C>0&&P+A+f>this.right&&(I=v.y+=x,v.line++,P=v.x=Rr(a,this.left+f,this.right-n[v.line])):C>0&&I+x>this.bottom&&(P=v.x=P+e[v.line].width+f,v.line++,I=v.y=Rr(a,this.top+S+f,this.bottom-e[v.line].height));const O=l.x(P);y(O,I,w),P=Qdt(D,P+p+d,b?P+A:this.right,t.rtl),_(l.x(P),I,w),b?v.x+=A+f:v.y+=x}),EV(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=ar(e.font),i=kr(e.padding);if(!e.display)return;const a=yc(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=n.size/2,u=i.top+l;let c,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+u,f=Rr(t.align,f,this.right-h);else{const v=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);c=u+Rr(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const d=Rr(s,f,f+h);o.textAlign=a.textAlign(xC(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=n.string,Al(o,e.text,d,c,n)}_computeTitleHeight(){const t=this.options.title,e=ar(t.font),n=kr(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,a;if(Go(t,this.left,this.right)&&Go(e,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Go(t,i.left,i.left+i.width)&&Go(e,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!ymt(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=mmt(i,n);i&&!a&&Ae(e.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&Ae(e.onHover,[t,n,this],this)}else n&&Ae(e.onClick,[t,n,this],this)}}function ymt(r,t){return!!((r==="mousemove"||r==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(r==="click"||r==="mouseup"))}var _mt={id:"legend",_element:L4,start(r,t,e){const n=r.legend=new L4({ctx:r.ctx,options:e,chart:r});ri.configure(r,n,e),ri.addBox(r,n)},stop(r){ri.removeBox(r,r.legend),delete r.legend},beforeUpdate(r,t,e){const n=r.legend;ri.configure(r,n,e),n.options=e},afterUpdate(r){const t=r.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(r,t){t.replay||r.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(r,t,e){const n=t.datasetIndex,i=e.chart;i.isDatasetVisible(n)?(i.hide(n),t.hidden=!0):(i.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:r=>r.chart.options.color,boxWidth:40,padding:10,generateLabels(r){const t=r.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:i,color:a}}=r.legend.options;return r._getSortedDatasetMetas().map(o=>{const s=o.controller.getStyle(e?0:void 0),l=kr(s.borderWidth);return{text:t[o.index].label,fillStyle:s.backgroundColor,fontColor:a,hidden:!o.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:i||s.textAlign,borderRadius:0,datasetIndex:o.index}},this)}},title:{color:r=>r.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:r=>!r.startsWith("on"),labels:{_scriptable:r=>!["generateLabels","filter","sort"].includes(r)}}};class I4 extends Ii{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const i=Pe(n.text)?n.text.length:1;this._padding=kr(n.padding);const a=i*ar(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:i,right:a,options:o}=this,s=o.align;let l=0,u,c,f;return this.isHorizontal()?(c=Rr(s,n,a),f=e+t,u=a-n):(o.position==="left"?(c=n+t,f=Rr(s,i,e),l=ke*-.5):(c=a-t,f=Rr(s,e,i),l=ke*.5),u=i-e),{titleX:c,titleY:f,maxWidth:u,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=ar(e.font),a=n.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:u}=this._drawArgs(a);Al(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:u,textAlign:xC(e.align),textBaseline:"middle",translation:[o,s]})}}function bmt(r,t){const e=new I4({ctx:r.ctx,options:t,chart:r});ri.configure(r,e,t),ri.addBox(r,e),r.titleBlock=e}var xmt={id:"title",_element:I4,start(r,t,e){bmt(r,e)},stop(r){const t=r.titleBlock;ri.removeBox(r,t),delete r.titleBlock},beforeUpdate(r,t,e){const n=r.titleBlock;ri.configure(r,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const yd={average(r){if(!r.length)return!1;let t,e,n=0,i=0,a=0;for(t=0,e=r.length;t<e;++t){const o=r[t].element;if(o&&o.hasValue()){const s=o.tooltipPosition();n+=s.x,i+=s.y,++a}}return{x:n/a,y:i/a}},nearest(r,t){if(!r.length)return!1;let e=t.x,n=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=r.length;a<o;++a){const l=r[a].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=_C(t,u);c<i&&(i=c,s=l)}}if(s){const l=s.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function la(r,t){return t&&(Pe(t)?Array.prototype.push.apply(r,t):r.push(t)),r}function Ga(r){return(typeof r=="string"||r instanceof String)&&r.indexOf(`
|
|
247
|
+
`)>-1?r.split(`
|
|
248
|
+
`):r}function Smt(r,t){const{element:e,datasetIndex:n,index:i}=t,a=r.getDatasetMeta(n).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:r,label:o,parsed:a.getParsed(i),raw:r.data.datasets[n].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:e}}function O4(r,t){const e=r.chart.ctx,{body:n,footer:i,title:a}=r,{boxWidth:o,boxHeight:s}=t,l=ar(t.bodyFont),u=ar(t.titleFont),c=ar(t.footerFont),f=a.length,h=i.length,d=n.length,v=kr(t.padding);let p=v.height,g=0,m=n.reduce((b,S)=>b+S.before.length+S.lines.length+S.after.length,0);if(m+=r.beforeBody.length+r.afterBody.length,f&&(p+=f*u.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),m){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=d*b+(m-d)*l.lineHeight+(m-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*c.lineHeight+(h-1)*t.footerSpacing);let y=0;const _=function(b){g=Math.max(g,e.measureText(b).width+y)};return e.save(),e.font=u.string,xe(r.title,_),e.font=l.string,xe(r.beforeBody.concat(r.afterBody),_),y=t.displayColors?o+2+t.boxPadding:0,xe(n,b=>{xe(b.before,_),xe(b.lines,_),xe(b.after,_)}),y=0,e.font=c.string,xe(r.footer,_),e.restore(),g+=v.width,{width:g,height:p}}function wmt(r,t){const{y:e,height:n}=t;return e<n/2?"top":e>r.height-n/2?"bottom":"center"}function Cmt(r,t,e,n){const{x:i,width:a}=n,o=e.caretSize+e.caretPadding;if(r==="left"&&i+a+o>t.width||r==="right"&&i-a-o<0)return!0}function Tmt(r,t,e,n){const{x:i,width:a}=e,{width:o,chartArea:{left:s,right:l}}=r;let u="center";return n==="center"?u=i<=(s+l)/2?"left":"right":i<=a/2?u="left":i>=o-a/2&&(u="right"),Cmt(u,r,t,e)&&(u="center"),u}function E4(r,t,e){const n=e.yAlign||t.yAlign||wmt(r,e);return{xAlign:e.xAlign||t.xAlign||Tmt(r,t,e,n),yAlign:n}}function Mmt(r,t){let{x:e,width:n}=r;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function Dmt(r,t,e){let{y:n,height:i}=r;return t==="top"?n+=e:t==="bottom"?n-=i+e:n-=i/2,n}function R4(r,t,e,n){const{caretSize:i,caretPadding:a,cornerRadius:o}=r,{xAlign:s,yAlign:l}=e,u=i+a,{topLeft:c,topRight:f,bottomLeft:h,bottomRight:d}=Pl(o);let v=Mmt(t,s);const p=Dmt(t,l,u);return l==="center"?s==="left"?v+=u:s==="right"&&(v-=u):s==="left"?v-=Math.max(c,h)+i:s==="right"&&(v+=Math.max(f,d)+i),{x:Er(v,0,n.width-t.width),y:Er(p,0,n.height-t.height)}}function ry(r,t,e){const n=kr(e.padding);return t==="center"?r.x+r.width/2:t==="right"?r.x+r.width-n.right:r.x+n.left}function k4(r){return la([],Ga(r))}function Amt(r,t,e){return qo(r,{tooltip:t,tooltipItems:e,type:"tooltip"})}function N4(r,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?r.override(e):r}class aT extends Ii{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,a=new FV(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Amt(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,i=n.beforeTitle.apply(this,[t]),a=n.title.apply(this,[t]),o=n.afterTitle.apply(this,[t]);let s=[];return s=la(s,Ga(i)),s=la(s,Ga(a)),s=la(s,Ga(o)),s}getBeforeBody(t,e){return k4(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:n}=e,i=[];return xe(t,a=>{const o={before:[],lines:[],after:[]},s=N4(n,a);la(o.before,Ga(s.beforeLabel.call(this,a))),la(o.lines,s.label.call(this,a)),la(o.after,Ga(s.afterLabel.call(this,a))),i.push(o)}),i}getAfterBody(t,e){return k4(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:n}=e,i=n.beforeFooter.apply(this,[t]),a=n.footer.apply(this,[t]),o=n.afterFooter.apply(this,[t]);let s=[];return s=la(s,Ga(i)),s=la(s,Ga(a)),s=la(s,Ga(o)),s}_createItems(t){const e=this._active,n=this.chart.data,i=[],a=[],o=[];let s=[],l,u;for(l=0,u=e.length;l<u;++l)s.push(Smt(this.chart,e[l]));return t.filter&&(s=s.filter((c,f,h)=>t.filter(c,f,h,n))),t.itemSort&&(s=s.sort((c,f)=>t.itemSort(c,f,n))),xe(s,c=>{const f=N4(t.callbacks,c);i.push(f.labelColor.call(this,c)),a.push(f.labelPointStyle.call(this,c)),o.push(f.labelTextColor.call(this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=yd[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=O4(this,n),u=Object.assign({},s,l),c=E4(this.chart,n,u),f=R4(n,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const a=this.getCaretPosition(t,n,i);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:f}=Pl(s),{x:h,y:d}=t,{width:v,height:p}=e;let g,m,y,_,b,S;return a==="center"?(b=d+p/2,i==="left"?(g=h,m=g-o,_=b+o,S=b-o):(g=h+v,m=g+o,_=b-o,S=b+o),y=g):(i==="left"?m=h+Math.max(l,c)+o:i==="right"?m=h+v-Math.max(u,f)-o:m=this.caretX,a==="top"?(_=d,b=_-o,g=m-o,y=m+o):(_=d+p,b=_+o,g=m+o,y=m-o),S=_),{x1:g,x2:m,x3:y,y1:_,y2:b,y3:S}}drawTitle(t,e,n){const i=this.title,a=i.length;let o,s,l;if(a){const u=yc(n.rtl,this.x,this.width);for(t.x=ry(this,n.titleAlign,n),e.textAlign=u.textAlign(n.titleAlign),e.textBaseline="middle",o=ar(n.titleFont),s=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,l=0;l<a;++l)e.fillText(i[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=n.titleMarginBottom-s)}}_drawColorBox(t,e,n,i,a){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:u,boxPadding:c}=a,f=ar(a.bodyFont),h=ry(this,"left",a),d=i.x(h),v=l<f.lineHeight?(f.lineHeight-l)/2:0,p=e.y+v;if(a.usePointStyle){const g={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},m=i.leftForLtr(d,u)+u/2,y=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,LC(t,g,m,y),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,LC(t,g,m,y)}else{t.lineWidth=ue(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const g=i.leftForLtr(d,u-c),m=i.leftForLtr(i.xPlus(d,1),u-c-2),y=Pl(o.borderRadius);Object.values(y).some(_=>_!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,od(t,{x:g,y:p,w:u,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),od(t,{x:m,y:p+1,w:u-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,p,u,l),t.strokeRect(g,p,u,l),t.fillStyle=o.backgroundColor,t.fillRect(m,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:c}=n,f=ar(n.bodyFont);let h=f.lineHeight,d=0;const v=yc(n.rtl,this.x,this.width),p=function(C){e.fillText(C,v.x(t.x+d),t.y+h/2),t.y+=h+a},g=v.textAlign(o);let m,y,_,b,S,x,w;for(e.textAlign=o,e.textBaseline="middle",e.font=f.string,t.x=ry(this,g,n),e.fillStyle=n.bodyColor,xe(this.beforeBody,p),d=s&&g!=="right"?o==="center"?u/2+c:u+2+c:0,b=0,x=i.length;b<x;++b){for(m=i[b],y=this.labelTextColors[b],e.fillStyle=y,xe(m.before,p),_=m.lines,s&&_.length&&(this._drawColorBox(e,t,b,v,n),h=Math.max(f.lineHeight,l)),S=0,w=_.length;S<w;++S)p(_[S]),h=f.lineHeight;xe(m.after,p)}d=0,h=f.lineHeight,xe(this.afterBody,p),t.y-=a}drawFooter(t,e,n){const i=this.footer,a=i.length;let o,s;if(a){const l=yc(n.rtl,this.x,this.width);for(t.x=ry(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",o=ar(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,s=0;s<a;++s)e.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:u,height:c}=n,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:v}=Pl(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(s+f,l),o==="top"&&this.drawCaret(t,e,n,i),e.lineTo(s+u-h,l),e.quadraticCurveTo(s+u,l,s+u,l+h),o==="center"&&a==="right"&&this.drawCaret(t,e,n,i),e.lineTo(s+u,l+c-v),e.quadraticCurveTo(s+u,l+c,s+u-v,l+c),o==="bottom"&&this.drawCaret(t,e,n,i),e.lineTo(s+d,l+c),e.quadraticCurveTo(s,l+c,s,l+c-d),o==="center"&&a==="left"&&this.drawCaret(t,e,n,i),e.lineTo(s,l+f),e.quadraticCurveTo(s,l,s+f,l),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,a=n&&n.y;if(i||a){const o=yd[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=O4(this,t),l=Object.assign({},o,this._size),u=E4(e,t,l),c=R4(t,l,u,e);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=kr(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=n,this.drawBackground(a,t,i,e),OV(t,e.textDirection),a.y+=o.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),EV(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),a=!Om(n,i),o=this._positionChanged(i,e);(a||o)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,e,n),s=this._positionChanged(o,t),l=e||!Om(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return e;const o=this.chart.getElementsAtEventForMode(t,a.mode,a,n);return a.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:i,options:a}=this,o=yd[a.position].call(this,t,e);return o!==!1&&(n!==o.x||i!==o.y)}}aT.positioners=yd;var Pmt={id:"tooltip",_element:aT,positioners:yd,afterInit(r,t,e){e&&(r.tooltip=new aT({chart:r,options:e}))},beforeUpdate(r,t,e){r.tooltip&&r.tooltip.initialize(e)},reset(r,t,e){r.tooltip&&r.tooltip.initialize(e)},afterDraw(r){const t=r.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(r.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",e)}},afterEvent(r,t){if(r.tooltip){const e=t.replay;r.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(r,t)=>t.bodyFont.size,boxWidth:(r,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ha,title(r){if(r.length>0){const t=r[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:Ha,beforeBody:Ha,beforeLabel:Ha,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let t=r.dataset.label||"";t&&(t+=": ");const e=r.formattedValue;return ye(e)||(t+=e),t},labelColor(r){const e=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const e=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Ha,afterBody:Ha,beforeFooter:Ha,footer:Ha,afterFooter:Ha}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Lmt=(r,t,e,n)=>(typeof t=="string"?(e=r.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Imt(r,t,e,n){const i=r.indexOf(t);if(i===-1)return Lmt(r,t,e,n);const a=r.lastIndexOf(t);return i!==a?e:i}const Omt=(r,t)=>r===null?null:Er(Math.round(r),0,t);class ny extends El{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:i,label:a}of e)n[i]===a&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(ye(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Imt(n,t,Jt(e,t),this._addedLabels),Omt(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=e;o++)i.push({value:o});return i}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ny.id="category",ny.defaults={ticks:{callback:ny.prototype.getLabelForValue}};function Emt(r,t){const e=[],{bounds:i,step:a,min:o,max:s,precision:l,count:u,maxTicks:c,maxDigits:f,includeBounds:h}=r,d=a||1,v=c-1,{min:p,max:g}=t,m=!ye(o),y=!ye(s),_=!ye(u),b=(g-p)/(f+1);let S=jF((g-p)/v/d)*d,x,w,C,T;if(S<1e-14&&!m&&!y)return[{value:p},{value:g}];T=Math.ceil(g/S)-Math.floor(p/S),T>v&&(S=jF(T*S/v/d)*d),ye(l)||(x=Math.pow(10,l),S=Math.ceil(S*x)/x),i==="ticks"?(w=Math.floor(p/S)*S,C=Math.ceil(g/S)*S):(w=p,C=g),m&&y&&a&&Udt((s-o)/a,S/1e3)?(T=Math.round(Math.min((s-o)/S,c)),S=(s-o)/T,w=o,C=s):_?(w=m?o:w,C=y?s:C,T=u-1,S=(C-w)/T):(T=(C-w)/S,Jh(T,Math.round(T),S/1e3)?T=Math.round(T):T=Math.ceil(T));const D=Math.max(ZF(S),ZF(w));x=Math.pow(10,ye(l)?D:l),w=Math.round(w*x)/x,C=Math.round(C*x)/x;let A=0;for(m&&(h&&w!==o?(e.push({value:o}),w<o&&A++,Jh(Math.round((w+A*S)*x)/x,o,B4(o,b,r))&&A++):w<o&&A++);A<T;++A)e.push({value:Math.round((w+A*S)*x)/x});return y&&h&&C!==s?e.length&&Jh(e[e.length-1].value,s,B4(s,b,r))?e[e.length-1].value=s:e.push({value:s}):(!y||C===s)&&e.push({value:C}),e}function B4(r,t,{horizontal:e,minRotation:n}){const i=Ai(n),a=(e?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+r).length;return Math.min(t/a,o)}class iy extends El{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return ye(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=e?i:l,s=l=>a=n?a:l;if(t){const l=oa(i),u=oa(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(i===a){let l=1;(a>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(a*.05)),s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,o=Emt(i,a);return t.bounds==="ticks"&&XF(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return sd(t,this.chart.options.locale,this.options.ticks.format)}}class oT extends iy{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Sr(t)?t:0,this.max=Sr(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Ai(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}oT.id="linear",oT.defaults={ticks:{callback:Ym.formatters.numeric}};function z4(r){return r/Math.pow(10,Math.floor(ti(r)))===1}function Rmt(r,t){const e=Math.floor(ti(t.max)),n=Math.ceil(t.max/Math.pow(10,e)),i=[];let a=Qn(r.min,Math.pow(10,Math.floor(ti(t.min)))),o=Math.floor(ti(a)),s=Math.floor(a/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do i.push({value:a,major:z4(a)}),++s,s===10&&(s=1,++o,l=o>=0?1:l),a=Math.round(s*Math.pow(10,o)*l)/l;while(o<e||o===e&&s<n);const u=Qn(r.max,a);return i.push({value:u,major:z4(a)}),i}class F4 extends El{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=iy.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return Sr(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Sr(t)?Math.max(0,t):null,this.max=Sr(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const a=l=>n=t?n:l,o=l=>i=e?i:l,s=(l,u)=>Math.pow(10,Math.floor(ti(l))+u);n===i&&(n<=0?(a(1),o(10)):(a(s(n,-1)),o(s(i,1)))),n<=0&&a(s(i,-1)),i<=0&&o(s(n,1)),this._zero&&this.min!==this._suggestedMin&&n===s(this.min,0)&&a(s(n,-1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Rmt(e,this);return t.bounds==="ticks"&&XF(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":sd(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ti(t),this._valueRange=ti(this.max)-ti(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ti(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}F4.id="logarithmic",F4.defaults={ticks:{callback:Ym.formatters.logarithmic,major:{enabled:!0}}};function sT(r){const t=r.ticks;if(t.display&&r.display){const e=kr(t.backdropPadding);return Jt(t.font&&t.font.size,se.font.size)+e.height}return 0}function kmt(r,t,e){return e=Pe(e)?e:[e],{w:wvt(r,t.string,e),h:e.length*t.lineHeight}}function V4(r,t,e,n,i){return r===n||r===i?{start:t-e/2,end:t+e/2}:r<n||r>i?{start:t-e,end:t}:{start:t,end:t+e}}function Nmt(r){const t={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},e=Object.assign({},t),n=[],i=[],a=r._pointLabels.length,o=r.options.pointLabels,s=o.centerPointLabels?ke/a:0;for(let l=0;l<a;l++){const u=o.setContext(r.getPointLabelContext(l));i[l]=u.padding;const c=r.getPointPosition(l,r.drawingArea+i[l],s),f=ar(u.font),h=kmt(r.ctx,f,r._pointLabels[l]);n[l]=h;const d=Pi(r.getIndexAngle(l)+s),v=Math.round(yC(d)),p=V4(v,c.x,h.w,0,180),g=V4(v,c.y,h.h,90,270);Bmt(e,t,d,p,g)}r.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),r._pointLabelItems=zmt(r,n,i)}function Bmt(r,t,e,n,i){const a=Math.abs(Math.sin(e)),o=Math.abs(Math.cos(e));let s=0,l=0;n.start<t.l?(s=(t.l-n.start)/a,r.l=Math.min(r.l,t.l-s)):n.end>t.r&&(s=(n.end-t.r)/a,r.r=Math.max(r.r,t.r+s)),i.start<t.t?(l=(t.t-i.start)/o,r.t=Math.min(r.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,r.b=Math.max(r.b,t.b+l))}function zmt(r,t,e){const n=[],i=r._pointLabels.length,a=r.options,o=sT(a)/2,s=r.drawingArea,l=a.pointLabels.centerPointLabels?ke/i:0;for(let u=0;u<i;u++){const c=r.getPointPosition(u,s+o+e[u],l),f=Math.round(yC(Pi(c.angle+Ge))),h=t[u],d=Hmt(c.y,h.h,f),v=Fmt(f),p=Vmt(c.x,h.w,v);n.push({x:c.x,y:d,textAlign:v,left:p,top:d,right:p+h.w,bottom:d+h.h})}return n}function Fmt(r){return r===0||r===180?"center":r<180?"left":"right"}function Vmt(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function Hmt(r,t,e){return e===90||e===270?r-=t/2:(e>270||e<90)&&(r-=t),r}function $mt(r,t){const{ctx:e,options:{pointLabels:n}}=r;for(let i=t-1;i>=0;i--){const a=n.setContext(r.getPointLabelContext(i)),o=ar(a.font),{x:s,y:l,textAlign:u,left:c,top:f,right:h,bottom:d}=r._pointLabelItems[i],{backdropColor:v}=a;if(!ye(v)){const p=Pl(a.borderRadius),g=kr(a.backdropPadding);e.fillStyle=v;const m=c-g.left,y=f-g.top,_=h-c+g.width,b=d-f+g.height;Object.values(p).some(S=>S!==0)?(e.beginPath(),od(e,{x:m,y,w:_,h:b,radius:p}),e.fill()):e.fillRect(m,y,_,b)}Al(e,r._pointLabels[i],s,l+o.lineHeight/2,o,{color:a.color,textAlign:u,textBaseline:"middle"})}}function H4(r,t,e,n){const{ctx:i}=r;if(e)i.arc(r.xCenter,r.yCenter,t,0,De);else{let a=r.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let o=1;o<n;o++)a=r.getPointPosition(o,t),i.lineTo(a.x,a.y)}}function Wmt(r,t,e,n){const i=r.ctx,a=t.circular,{color:o,lineWidth:s}=t;!a&&!n||!o||!s||e<0||(i.save(),i.strokeStyle=o,i.lineWidth=s,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),H4(r,e,a,n),i.closePath(),i.stroke(),i.restore())}function Gmt(r,t,e){return qo(r,{label:e,index:t,type:"pointLabel"})}class ay extends iy{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=kr(sT(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Sr(t)&&!isNaN(t)?t:0,this.max=Sr(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/sT(this.options))}generateTickLabels(t){iy.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{const i=Ae(this.options.pointLabels.callback,[e,n],this);return i||i===0?i:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Nmt(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){const e=De/(this._pointLabels.length||1),n=this.options.startAngle||0;return Pi(t*e+Ai(n))}getDistanceFromCenterForValue(t){if(ye(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(ye(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return Gmt(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-Ge+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:a}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),H4(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i}=e,a=this._pointLabels.length;let o,s,l;if(e.pointLabels.display&&$mt(this,a),i.display&&this.ticks.forEach((u,c)=>{if(c!==0){s=this.getDistanceFromCenterForValue(u.value);const f=i.setContext(this.getContext(c-1));Wmt(this,f,s,a)}}),n.display){for(t.save(),o=a-1;o>=0;o--){const u=n.setContext(this.getPointLabelContext(o)),{color:c,lineWidth:f}=u;!f||!c||(t.lineWidth=f,t.strokeStyle=c,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!e.reverse)return;const u=n.setContext(this.getContext(l)),c=ar(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(s.label).width,t.fillStyle=u.backdropColor;const f=kr(u.backdropPadding);t.fillRect(-o/2-f.left,-a-c.size/2-f.top,o+f.width,c.size+f.height)}Al(t,s.label,0,-a,c,{color:u.color})}),t.restore()}drawTitle(){}}ay.id="radialLinear",ay.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ym.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}},ay.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ay.descriptors={angleLines:{_fallback:"grid"}};const oy={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ln=Object.keys(oy);function Umt(r,t){return r-t}function $4(r,t){if(ye(t))return null;const e=r._adapter,{parser:n,round:i,isoWeekday:a}=r._parseOpts;let o=t;return typeof n=="function"&&(o=n(o)),Sr(o)||(o=typeof n=="string"?e.parse(o,n):e.parse(o)),o===null?null:(i&&(o=i==="week"&&(vc(a)||a===!0)?e.startOf(o,"isoWeek",a):e.startOf(o,i)),+o)}function W4(r,t,e,n){const i=ln.length;for(let a=ln.indexOf(r);a<i-1;++a){const o=oy[ln[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((e-t)/(s*o.size))<=n)return ln[a]}return ln[i-1]}function Ymt(r,t,e,n,i){for(let a=ln.length-1;a>=ln.indexOf(e);a--){const o=ln[a];if(oy[o].common&&r._adapter.diff(i,n,o)>=t-1)return o}return ln[e?ln.indexOf(e):0]}function qmt(r){for(let t=ln.indexOf(r)+1,e=ln.length;t<e;++t)if(oy[ln[t]].common)return ln[t]}function G4(r,t,e){if(!e)r[t]=!0;else if(e.length){const{lo:n,hi:i}=bC(e,t),a=e[n]>=t?e[n]:e[i];r[a]=!0}}function jmt(r,t,e,n){const i=r._adapter,a=+i.startOf(t[0].value,n),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,n))l=e[s],l>=0&&(t[l].major=!0);return t}function U4(r,t,e){const n=[],i={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,n.push({value:s,major:!1});return a===0||!e?n:jmt(r,n,i,e)}class sy extends El{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const n=t.time||(t.time={}),i=this._adapter=new sgt._date(t.adapters.date);i.init(e),Kh(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:$4(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!s&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Sr(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),a=Sr(a)&&!isNaN(a)?a:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=Xdt(i,a,o);return this._unit=e.unit||(n.autoSkip?W4(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):Ymt(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:qmt(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),U4(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e=0,n=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?e=1-i:e=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?n=a:n=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=Er(e,0,o),n=Er(n,0,o),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,a=i.time,o=a.unit||W4(a.minUnit,e,n,this._getLabelCapacity(e)),s=Jt(a.stepSize,1),l=o==="week"?a.isoWeekday:!1,u=vc(l)||l===!0,c={};let f=e,h,d;if(u&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,u?"day":o),t.diff(n,e,o)>1e5*s)throw new Error(e+" and "+n+" are too far apart with stepSize of "+s+" "+o);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<n;h=+t.add(h,s,o),d++)G4(c,h,v);return(h===n||i.bounds==="ticks"||d===1)&&G4(c,h,v),Object.keys(c).sort((p,g)=>p-g).map(p=>+p)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}_tickFormatFunction(t,e,n,i){const a=this.options,o=a.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&o[s],c=l&&o[l],f=n[e],h=l&&c&&f&&f.major,d=this._adapter.format(t,i||(h?c:u)),v=a.ticks.callback;return v?Ae(v,[d,e,n],this):d}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=Ai(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:n*a+s*o,h:n*o+s*a}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,a=this._tickFormatFunction(t,0,U4(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,n=i.length;e<n;++e)t=t.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push($4(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tV(t.sort(Umt))}}sy.id="time",sy.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function ly(r,t,e){let n=0,i=r.length-1,a,o,s,l;e?(t>=r[n].pos&&t<=r[i].pos&&({lo:n,hi:i}=Tl(r,"pos",t)),{pos:a,time:s}=r[n],{pos:o,time:l}=r[i]):(t>=r[n].time&&t<=r[i].time&&({lo:n,hi:i}=Tl(r,"time",t)),{time:a,pos:s}=r[n],{time:o,pos:l}=r[i]);const u=o-a;return u?s+(l-s)*(t-a)/u:s}class Y4 extends sy{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ly(e,this.min),this._tableRange=ly(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],a=[];let o,s,l,u,c;for(o=0,s=t.length;o<s;++o)u=t[o],u>=e&&u<=n&&i.push(u);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(o=0,s=i.length;o<s;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&a.push({time:u,pos:o/(s-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(ly(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return ly(this._table,n*this._tableRange+this._minPos,!0)}}Y4.id="timeseries",Y4.defaults=sy.defaults;const q4="label";function j4(r,t){typeof r=="function"?r(t):r&&(r.current=t)}function Xmt(r,t){Object.assign(r.options,t)}function X4(r,t){r.labels=t}function Z4(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:q4;const n=[];r.datasets=t.map(i=>{const a=r.datasets.find(o=>o[e]===i[e]);return!a||!i.data||n.includes(a)?{...i}:(n.push(a),Object.assign(a,i),a)})}function Zmt(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q4;const e={labels:[],datasets:[]};return X4(e,r.labels),Z4(e,r.datasets,t),e}function Kmt(r,t){let{height:e=150,width:n=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:u=[],fallbackContent:c,updateMode:f,...h}=r;const d=k.useRef(null),v=k.useRef(),p=()=>{!d.current||(v.current=new md(d.current,{type:o,data:Zmt(s,a),options:l&&{...l},plugins:u}),j4(t,v.current))},g=()=>{j4(t,null),v.current&&(v.current.destroy(),v.current=null)};return k.useEffect(()=>{!i&&v.current&&l&&Xmt(v.current,l)},[i,l]),k.useEffect(()=>{!i&&v.current&&X4(v.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&v.current&&s.datasets&&Z4(v.current.config.data,s.datasets,a)},[i,s.datasets]),k.useEffect(()=>{!v.current||(i?(g(),setTimeout(p)):v.current.update(f))},[i,l,s.labels,s.datasets,f]),k.useEffect(()=>{!v.current||(g(),setTimeout(p))},[o]),k.useEffect(()=>(p(),()=>g()),[]),M("canvas",{...Object.assign({ref:d,role:"img",height:e,width:n},h),children:c})}const Qmt=k.forwardRef(Kmt);function Jmt(r,t){return md.register(t),k.forwardRef((e,n)=>M(Qmt,{...Object.assign({},e,{ref:n,type:r})}))}const tyt=Jmt("bar",Um);md.register(ny,oT,ey,xmt,Pmt,_mt);const eyt=({data:r,colors:t,updateGroup:e,isEnableGroupBy:n})=>{const i={backgroundColor:t!=null&&t.length?t[0]:"#5470c6",hoverBackgroundColor:t!=null&&t.length?t[0]:"#5470c6",responsive:!0,maintainAspectRatio:!1,onClick:(a,o)=>{var u;const s=o[0].index,l=(u=r.labels)==null?void 0:u[s];n&&e&&e(l)},plugins:{legend:{position:"top"},tooltip:{backgroundColor:"black"}}};return M(Vt,{children:r.datasets&&r.labels&&M(tyt,{width:10,height:169,data:r,options:i})})},ryt=({data:r,margins:t,legendSettings:e,labelSettings:n,enableSaveAs:i,colors:a,updateGroup:o,isEnableGroupBy:s})=>{var f;const l=["bar","line"];let u=1;const c={grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},...a!=null&&a.length?{color:a}:{},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(h=>h.label)},xAxis:[{type:"category",data:r.labels,axisPointer:{type:"shadow"}}],yAxis:[{type:"value",min:0,max:9e3,interval:3e3},{type:"value",min:0,max:25,interval:5}],series:(f=r.datasets)==null?void 0:f.map(h=>(u===0?u=1:u=0,{name:h.label,type:l[u],tooltip:{valueFormatter(d){return`${d}`}},data:h.data,label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!s&&M(de,{style:{width:"100%",height:"90%"},option:c}),s&&o&&M(de,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{o(h.name)}}})]})},nyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var c,f;const u={tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},xAxis:{type:"category",boundaryGap:!1,data:r.labels},yAxis:{type:"value",position:i.axis},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:(c=r.datasets)==null?void 0:c.map(h=>h.label)},series:(f=r.datasets)==null?void 0:f.map(h=>({data:h.data,type:"line",name:h.label,label:{show:n.show,position:n.position},emphasis:{focus:"series"}}))};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:u}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{s(h.name)}}})]})},iyt=({data:r,margins:t,legendSettings:e,labelSettings:n,enableSaveAs:i,colors:a,updateGroup:o,isEnableGroupBy:s})=>{var c,f,h,d;if(((f=(c=r==null?void 0:r.datasets[0])==null?void 0:c.data)==null?void 0:f.length)>1){const v=[];let p=100;(h=r==null?void 0:r.datasets)==null||h.map(m=>{const y=[];let _=0;m.data.map(b=>{const S={value:b,name:r.labels[_]};y.push(S),_+=1}),v.push([m.label,y])});const g={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},series:v.map(m=>(p-=20,{name:m[0],type:"pie",radius:`${p}%`,data:m[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:n.show,position:n.position},labelLine:{show:!1}}))};return $(Vt,{children:[s&&M(de,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:m=>{o(m.name)}}}),!s&&M(de,{style:{width:"100%",height:"100%"},option:g})]})}const l=r==null?void 0:r.datasets.map((v,p)=>{var g;return{value:v.data,name:(g=r==null?void 0:r.labels)==null?void 0:g[p]}}),u={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},legend:{data:(d=r==null?void 0:r.labels)!=null&&d[0]?r==null?void 0:r.labels:["legend"],show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position},series:{type:"pie",radius:"80%",data:l,label:{show:!1},labelLine:{show:!1}}};return M(Vt,{children:$(Vt,{children:[s&&M(de,{style:{width:"100%",height:"100%"},option:u,onEvents:{click:v=>{o(v.name)}}}),!s&&M(de,{style:{width:"100%",height:"100%"},option:u})]})})},ayt=({data:r,margins:t,legendSettings:e,labelSettings:n,enableSaveAs:i,colors:a,updateGroup:o,isEnableGroupBy:s})=>{var u;const l={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(c=>c.label)},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01]},yAxis:{type:"category",data:r.labels},series:(u=r.datasets)==null?void 0:u.map(c=>({data:c.data,type:"bar",name:c.label,emphasis:{focus:"series"},label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!s&&M(de,{style:{width:"100%",height:"90%"},option:l}),s&&o&&M(de,{style:{width:"100%",height:"90%"},option:l,onEvents:{click:c=>{o(c.name)}}})]})},oyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var c;const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:f=>`${f.map(h=>`${h.seriesName}: ${h.value}<br />`).join("")}`},xAxis:{type:"category",data:r.labels},yAxis:{type:"value",position:i.axis},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(f=>f.label)},series:(c=r.datasets)==null?void 0:c.map(f=>({symbolSize:10,data:f.data,type:"scatter",name:f.label,label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:u}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:f=>{s(f.name)}}})]})},syt=({data:r,margins:t,labelSettings:e,axisSettings:n,enableSaveAs:i,colors:a,updateGroup:o,isEnableGroupBy:s})=>{var u,c;const l={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(f){const h=f[1];return`${h.name}<br/>${h.value}`}},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:{type:"category",splitLine:{show:!1},data:r.labels},yAxis:{type:"value",position:n.axis},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:(u=r.datasets)==null?void 0:u[1]},{name:"Life Cost",type:"bar",stack:"Total",label:{show:e.show,position:e.position},data:(c=r.datasets)==null?void 0:c[0]}]};return $(Vt,{children:[!s&&M(de,{style:{width:"100%",height:"90%"},option:l}),s&&o&&M(de,{style:{width:"100%",height:"90%"},option:l,onEvents:{click:f=>{o(f.name)}}})]})},lyt=({funnelData:r,margins:t,legendSettings:e,labelSettings:n,colors:i})=>{const a={tooltip:{trigger:"item",formatter:"{b} : {c}k",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r==null?void 0:r.name},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:3,label:{show:n.show,position:n.position},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:r}]};return M(de,{style:{width:"100%",height:"90%"},option:a})},uyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var h,d;const u=[];let c=10;(h=r==null?void 0:r.datasets)==null||h.map(v=>{const p=[];let g=0;const m=v.label;v.data.map(y=>{p.push([r.labels[g],y,m]),g+=1}),u.push(p)});const f={tooltip:{backgroundColor:"black",textStyle:{color:"white"}},...o!=null&&o.length?{color:o}:{},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:(d=r==null?void 0:r.datasets)==null?void 0:d.map(v=>v.label)},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:{splitLine:{lineStyle:{type:"dashed"}}},yAxis:{position:i.axis,splitLine:{lineStyle:{type:"dashed"}},scale:!0},series:u.map(v=>{c+=3;const p="0123456789ABCDEF";let g="#";for(let m=0;m<6;m+=1)g+=p[Math.floor(Math.random()*16)];return{name:v[0][0],data:v,type:"scatter",symbolSize:c,emphasis:{focus:"series",label:{show:!0,formatter(m){return`${m.data[2]}: ${m.data[1]}`},position:"top",backgroundColor:"black",textStyle:{color:"white"}}},itemStyle:{shadowBlur:10,shadowColor:"rgba(120, 36, 50, 0.5)",shadowOffsetY:5,color:g},label:{show:n.show,position:n.position}}})};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:f}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},cyt=({data:r,margins:t,legendSettings:e,labelSettings:n,enableSaveAs:i,colors:a,updateGroup:o,isEnableGroupBy:s})=>{var c,f;if(((c=r==null?void 0:r.labels)==null?void 0:c.length)>1){const h=[];let d=70,v=100;(f=r==null?void 0:r.datasets)==null||f.map(g=>{const m=[];let y=0;g.data.map(_=>{const b={value:_,name:r.labels[y]};m.push(b),y+=1}),h.push([g.label,m])});const p={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},series:h.map(g=>(d-=20,v-=20,{name:g[0],type:"pie",radius:[`${d}%`,`${v}%`],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:g[1],labelLine:{show:!1}}))};return $(Vt,{children:[!s&&M(de,{style:{width:"100%",height:"90%"},option:p}),s&&o&&M(de,{style:{width:"100%",height:"90%"},option:p,onEvents:{click:g=>{o(g.name)}}})]})}const l=r==null?void 0:r.datasets.map(h=>({value:h.data,name:h.label})),u={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:r==null?void 0:r.datasets.map(h=>h.label),orient:"vertical",left:"left"},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},series:{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:l,labelLine:{show:!1}}};return $(Vt,{children:[!s&&M(de,{style:{width:"100%",height:"90%"},option:u}),s&&o&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{o(h.name)}}})]})},fyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var h;const u=["start","middle","end"];let c=2;const f={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(d=>d.label)},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels},yAxis:{type:"value",position:i.axis},series:(h=r.datasets)==null?void 0:h.map(d=>(c===0?c=1:c===1?c=2:c=0,{name:d.label,type:"line",step:u[c],data:d.data,areaStyle:{},label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:f}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})},hyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var c,f;const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...o!=null&&o.length?{color:o}:{},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(h=>h.label)},xAxis:[{type:"category",data:r.labels,axisTick:{alignWithLabel:!0}}],yAxis:[{type:"value",position:i.axis}],series:[{name:(c=r.datasets[0])==null?void 0:c.label,type:"bar",barWidth:"100%",data:(f=r.datasets[0])==null?void 0:f.data,label:{show:n.show,position:n.position}}]};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:u}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{s(h.name)}}})]})},dyt=({gaugeData:r,margins:t,legendSettings:e,enableSaveAs:n,colors:i})=>{let a=0;r==null||r.map(l=>{a+=l.value});const o=Math.floor(a/(r==null?void 0:r.length)),s={toolbox:{feature:{saveAsImage:n&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:o+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:o}]}]};return M(de,{style:{width:"100%",height:"113%"},option:s})},vyt=({data:r,margins:t,enableSaveAs:e,colors:n})=>{var s,l,u;const i=[],a=[];if((r==null?void 0:r.length)&&((s=r==null?void 0:r[0])==null?void 0:s[0])!==((l=r==null?void 0:r[1])==null?void 0:l[0])){const c=[r==null?void 0:r[0],r==null?void 0:r[1]];c==null||c.map(f=>{f.map(h=>{i.includes(h)||i.push(h)})});for(let f=0;f<((u=r==null?void 0:r[0])==null?void 0:u.length);f+=1)a.push({source:r[0][f],target:r[1][f],value:r[2][f]})}const o={toolbox:{feature:{saveAsImage:e&&{name:"databrain"}}},...n!=null&&n.length?{color:n}:{},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:i==null?void 0:i.map(c=>({name:c})),links:a}};return M(de,{style:{width:"100%",height:"100%"},option:o})},pyt=({data:r,margins:t,legendSettings:e,labelSettings:n,axisSettings:i,enableSaveAs:a,colors:o,updateGroup:s,isEnableGroupBy:l})=>{var c,f;const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:h=>`${h.map(d=>`${d.seriesName}: ${d.value}<br />`).join("")}`},xAxis:{type:"category",data:r==null?void 0:r.labels},yAxis:{type:"value",position:i.axis},legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:(c=r==null?void 0:r.datasets)==null?void 0:c.map(h=>h.label)},series:(f=r==null?void 0:r.datasets)==null?void 0:f.map(h=>({data:h.data,type:"bar",name:h.label,stack:"x",emphasis:{focus:"series"},label:{show:n.show,position:n.position}}))};return $(Vt,{children:[!l&&M(de,{style:{width:"100%",height:"90%"},option:u}),l&&s&&M(de,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{s(h.name)}}})]})},gyt=({data:r})=>{var t,e;return $("div",{className:"flex flex-col justify-center w-full h-full border-2 divide-solid items-center p-4",children:[M(St,{styleClass:"font-14c",variant:"h1",className:"text-lg mb-2",children:(r==null?void 0:r.length)&&((t=r[0])==null?void 0:t.label)}),M(St,{styleClass:"font-14c",variant:"h1",className:"text-6xl",children:(r==null?void 0:r.length)&&((e=r[0])==null?void 0:e.value)}),M(St,{styleClass:"font-14",variant:"h1",className:"text-sm mt-2",children:"vs last sync"})]})},myt=({data:r,margins:t,legendSettings:e,axisSettings:n,enableSaveAs:i,colors:a})=>{var u;const o=[],s=[];(u=r==null?void 0:r.datasets)==null||u.map(c=>{o.push(c.data),s.push(c.label)});const l={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},title:[{text:"Box Plot",left:"center"}],legend:{show:e.show,top:e.top,left:e.left,right:e.right,bottom:e.bottom,orient:e.position,data:r.datasets.map(c=>c.label)},dataset:[{source:o},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${t.marginLeft}%`,bottom:`${t.marginBottom}%`,top:`${t.marginTop}%`,right:`${t.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:!1}},yAxis:{type:"value",position:n.axis,splitArea:{show:!0}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]};return M(de,{style:{width:"100%",height:"90%"},option:l})},yyt=({data:r})=>{var n,i,a;let t=0;const e=[];if(r)for(let o=0;o<((i=(n=r==null?void 0:r.datasets[0])==null?void 0:n.data)==null?void 0:i.length);o+=1){const s=[];s.push(t+1);for(let l=0;l<(r==null?void 0:r.datasets.length);l+=1){const u=(a=r==null?void 0:r.datasets[l])==null?void 0:a.data[t];s.push(u)}e.push(s),t+=1}return M("div",{className:"h-full relative flex p-4",children:M("div",{className:"w-full h-full flex flex-col",children:M("div",{className:"pl-1 sticky w-full h-[4%]",children:$("table",{className:"w-full",children:[M("thead",{children:$("tr",{className:"sticky top-0 bg-[#EAEEFC] h-10",children:[M("th",{className:"w-64 px-4 border-l divide-solid",scope:"col",children:M(St,{styleClass:"font-14c",variant:"h1",children:"#"})},"num"),r==null?void 0:r.datasets.map(o=>M("th",{className:"w-64 px-4 border-l divide-solid",scope:"col",children:M(St,{styleClass:"font-14c",variant:"h1",children:o.label})},o))]})}),M("tbody",{children:e.map((o,s)=>M("tr",{className:"h-14",children:o.map((l,u)=>M("td",{className:"px-4 text-center border-l divide-solid",children:M(St,{styleClass:"font-14",variant:"p",children:JSON.stringify(l)})},u))},s))})]})})})})},lT=({labels:r,data:t,chartType:e,funnelData:n,sankeyData:i,singleValueData:a,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d})=>{var v,p,g,m;if(e===Be.line)return M(nyt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,updateGroup:h,isEnableGroupBy:d});if(e===Be.stepped)return M(fyt,{labels:r,data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.bar)return M(eyt,{data:t,updateGroup:h,isEnableGroupBy:d});if(e===Be.stack)return M(pyt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.histogram)return M(hyt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.bubble)return M(uyt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.scatter)return M(oyt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.row)return M(ayt,{data:t,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.area)return(v=t.datasets)==null||v.map(y=>Object.assign(y,{fill:!0})),M(Rdt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.combo){if((p=t.datasets)!=null&&p.length){const y=t.datasets[0];Object.assign(y,{type:"line"})}return M(ryt,{data:t,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d})}if(e===Be.pie)return M(iyt,{data:t,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.doughnut)return M(cyt,{data:t,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d});if(e===Be.waterfall){let y;if((g=t.datasets)!=null&&g.length){const _=(m=t.datasets[0])==null?void 0:m.data,b=[_==null?void 0:_[0]];if(_!=null&&_.length)for(let S=1;S<_.length-1;S++)b.push(b[S-1]-_[S]);b.push(_==null?void 0:_[_.length-1]),y={labels:t.labels,datasets:[_,b]}}return M(syt,{data:y||t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f,updateGroup:h,isEnableGroupBy:d})}return e===Be.funnel?M(lyt,{funnelData:n,margins:o,legendSettings:s,labelSettings:l,colors:f}):e===Be.gauge?M(dyt,{gaugeData:n,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f}):e===Be.sankey?M(vyt,{data:i,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:c,colors:f}):e===Be.singleValue?M(gyt,{data:a,margins:o,legendSettings:s,labelSettings:l}):e===Be.boxplot?M(myt,{data:t,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:c,colors:f}):e===Be.table?M(yyt,{data:t,margins:o,legendSettings:s,labelSettings:l}):M("div",{className:"w-full flex items-center justify-center h-80",children:"No chart selected"})};var K4={"btn-primary":"_btn-primary_14f0q_1","btn-secondary":"_btn-secondary_14f0q_5","btn-reject":"_btn-reject_14f0q_9","btn-outlined":"_btn-outlined_14f0q_14","btn-tertiary":"_btn-tertiary_14f0q_18","btn-default":"_btn-default_14f0q_22","btn-large":"_btn-large_14f0q_25","btn-small":"_btn-small_14f0q_28","btn-xs":"_btn-xs_14f0q_31","btn-medium":"_btn-medium_14f0q_34","btn-11rem":"_btn-11rem_14f0q_38"};const Nt=({isDisabled:r=!1,type:t="button",className:e,children:n="",variant:i="primary",size:a="none",onClick:o,title:s})=>{const l=ya(e,K4[`btn-${i}`],a==="none"?null:K4[`btn-${a}`]);return M("button",{type:t,className:i==="custom"?e:l,onClick:o,disabled:r,title:s,children:n})},_yt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M13.46 12L19 17.54V19h-1.46L12 13.46L6.46 19H5v-1.46L10.54 12L5 6.46V5h1.46L12 10.54L17.54 5H19v1.46L13.46 12Z"})}),byt=({children:r,isOpen:t,onClose:e,headerTitle:n,customHeader:i,icon:a})=>{const[o,s]=k.useState();return k.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),t?Ld.default.createPortal(M("div",{className:"modal",onClick:e,children:$("div",{className:"popup",onClick:l=>{l.stopPropagation()},children:[M("section",{className:"header",children:i||$(Vt,{children:[$("span",{className:"text-lg font-semibold text-[#182C60] flex flex-row gap-2 items-center justify-center",children:[a,n]}),M(Nt,{variant:"custom",type:"button",onClick:e,children:M(_yt,{})})]})}),M("section",{className:"content",children:r})]})}),o):null};var Zo=st.default.memo(byt);const Q4=({isShow:r,onCancel:t,chart:e})=>M(Zo,{isOpen:r,onClose:t,headerTitle:"Chart Preview",children:M("div",{className:"w-[90vw] h-[80vh] p-8",children:e&&M(lT,{labels:e.labels,data:e.data,chartType:e.chartType,funnelData:e.funnelData,sankeyData:e.sankeyData,singleValueData:e.singleValueData,margins:e.margins,legendSettings:e.legendSettings,labelSettings:e.labelSettings,axisSettings:e.axisSettings,enableSaveAs:!0})})}),bc=r=>$("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),M("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:M("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]}),xyt=r=>{const t="data:text/csv;charset=utf-8,";if(!r.length)return t;const e=[],n=r[0],i=Object.keys(n);e.push(`S.No,${i.join(",").toUpperCase()}`),r.forEach((s,l)=>{const u=Object.values(s);e.push(`${l+1},${u.join(",")}`)});const a=e.join(`
|
|
249
|
+
`);return encodeURI(t+a)},Syt=r=>M("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M6 3v26h20V9.6l-.3-.3l-6-6l-.3-.3H6zm2 2h10v6h6v16H8V5zm12 1.4L22.6 9H20V6.4zM15 13v5h-3l4 4l4-4h-3v-5h-2zm-3 10v2h8v-2h-8z"})}),wyt=({data:r=[],fileName:t="export",className:e})=>M("a",{href:xyt(r),download:`${t}.csv`,className:ya("cursor-pointer z-50 text-lg text-gray-500 hover:text-blue-h4",e),target:"_self",children:M(Syt,{})});var Cyt=st.default.memo(wyt);const Tyt=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],J4=({data:r,measure:t,sankeyValues:e,singleValue:n,step:i,xAxis:a,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>a&&h[a]):[],l=o==null?void 0:o.map((h,d)=>({label:h,data:Array.isArray(r)?r.map(v=>v[o[d]]):[],borderColor:Tyt[d]})),u=Array.isArray(r)?r.map(h=>t&&i&&{value:h[t],name:h[i]}):[],c=e==null?void 0:e.map((h,d)=>Array.isArray(r)?r.map(v=>v[e[d]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},uy=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:$("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[M("circle",{cx:12,cy:12,r:10}),M("path",{strokeLinecap:"round",d:"M12 7h.01"}),M("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 11h2v5m-2 0h4"})]})}),Myt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M9 9H3V7h4V3h2v6Zm0 6H3v2h4v4h2v-6Zm12 0h-6v6h2v-4h4v-2Zm-6-6h6V7h-4V3h-2v6Z"})}),Dyt=(r,t,e)=>{const n=r==null?void 0:r.map(i=>({...i,[e]:parseInt(i[e],10)}));return n==null?void 0:n.reduce((i,a)=>{const o=t.reduce((s,l)=>s+=a[l],"");return i[o]||(i[o]={[e]:0},t.forEach(s=>i[o][s]=a[s])),i[o][e]+=a[e],i},{})},ua=(r,t,e,n)=>{var o;const i=Object.keys((o=r==null?void 0:r[0])!=null?o:[]).filter(s=>!e.includes(s)),a=Dyt(r,t,i[0]);n(Object.values(a))},Ayt=({globalFilters:r,metricItem:t,onMaximize:e,client:n,param:i,colors:a})=>{var mt;const o={};if(i!=null&&i.values)for(const At in i.values){const Ct=`${At}_variable`;o[Ct]=i.values[At]}const[s,l]=k.useState(""),[u,c]=k.useState(""),[f,h]=k.useState([]),[d,v]=k.useState(""),[p,g]=k.useState(""),[m,y]=k.useState([]),[_,b]=k.useState(""),[S,x]=k.useState([]),{data:w,isLoading:C}=wD({id:t==null?void 0:t.id,clientId:n,filterValues:o,globalFilters:r}),T=(mt=w==null?void 0:w.externalMetricQuery)==null?void 0:mt.data,[D,A]=k.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[P,I]=k.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[O,E]=k.useState({axis:"left",show:!1,position:"hidden"}),[R,z]=k.useState({axis:"left"}),[B,Y]=k.useState(!1),[W,et]=k.useState([]),[V,H]=k.useState(),[G,j]=k.useState([]);k.useEffect(()=>{h(t==null?void 0:t.chartOptions.yAxisList),c(t==null?void 0:t.chartOptions.xAxis),v(t==null?void 0:t.chartOptions.step),g(t==null?void 0:t.chartOptions.measure),l(t==null?void 0:t.chartOptions.chartType),x(T!=null?T:[]),y(t==null?void 0:t.chartOptions.sankeyValues),b(t==null?void 0:t.chartOptions.singleValue),A(t==null?void 0:t.chartOptions.margins),I(t==null?void 0:t.chartOptions.legendSettings),E(t==null?void 0:t.chartOptions.labelSettings),z(t!=null&&t.chartOptions.axisSettings?t==null?void 0:t.chartOptions.axisSettings:"left"),Y(t==null?void 0:t.isEnableGroupBy),et(t==null?void 0:t.selectedGroupBy),H(t==null?void 0:t.groupBy)},[t,T]);const{labels:tt,datasets:nt,funnelData:rt,sankeyData:vt,singleValueData:ft}=J4({data:B?G:S,measure:p,sankeyValues:m,singleValue:_,step:d,xAxis:u,yAxisList:f});k.useEffect(()=>{if(G.length&&B){const Ct=(F=>{const X=Object.entries(F).filter(([,ut])=>parseInt(ut,10)),Z=Object.entries(F).filter(([,ut])=>typeof ut=="string"&&!parseInt(ut,10));return{numberKeys:X.map(([ut])=>ut),stringKeys:Z.map(([ut])=>ut)}})(G[0]);c(Ct.stringKeys[0]),h(Ct.numberKeys)}},[G,B]),k.useEffect(()=>{G.length===0&&B&&W.length&&(S==null?void 0:S.length)&&(H({column:W[0]}),ua(S,[W[0]],W,j))},[G,B,W]),k.useEffect(()=>{(S==null?void 0:S.length)&&W.length&&B&&ua(S,[W[0]],W,j)},[S,W,B]);const lt=At=>{if((V==null?void 0:V.column)&&At&&At!=="undefined"){if(W.lastIndexOf(V.column)!==W.length-1){const Ct=W.indexOf(V.column),F=V.column;H({column:W[Ct+1],parentColumn:{column:V.column,value:At}}),ua(S==null?void 0:S.filter(X=>X[F]===At),[W[Ct+1]],W,j)}W.lastIndexOf(V.column)===W.length-1&&(H({column:W[0]}),ua(S,[W[0]],W,j))}else H({column:W[0]}),ua(S,[W[0]],W,j)};return M(Vt,{children:$("div",{className:"w-full h-[87%] relative z-10",children:[$("div",{className:"listHeader",children:[M(St,{variant:"h1",styleClass:"primary",className:"truncate",children:t.name}),$("span",{className:"ml-auto mr-10 relative group cursor-pointer",children:[M(uy,{}),M("span",{className:"bg-black hidden group-hover:inline-block bg-opacity-70 text-white text-xs rounded px-2 py-0.5 absolute top-10 left-1/2 -translate-x-1/2 z-10 text-center w-[100px]",children:t.description||t.name})]}),M(Nt,{className:"fullScreen",type:"button",variant:"secondary",onClick:()=>e({labels:tt,data:{labels:tt,datasets:nt},chartType:s,funnelData:rt,sankeyData:vt,singleValueData:ft,margins:D,legendSettings:P,labelSettings:O,axisSettings:R,enableSaveAs:!0}),children:M(Myt,{})})]}),s&&$("div",{className:"h-full relative w-[95%] mx-auto p-2",children:[!C&&!S.length?M("div",{className:"w-full h-full flex justify-center items-center text-xl",children:"No Data Available"}):null,C&&M("div",{className:"w-full h-full flex justify-center items-center",children:M(bc,{style:{width:"50px",height:"50px",color:"blue"}})}),S!=null&&S.length?$(Vt,{children:[M(Cyt,{data:S,fileName:t.name,className:"absolute right-9 top-3"}),M(lT,{labels:tt,data:{labels:tt,datasets:nt},chartType:s,funnelData:rt,sankeyData:vt,singleValueData:ft,margins:D,legendSettings:P,labelSettings:O,axisSettings:R,enableSaveAs:!0,colors:a,updateGroup:lt,isEnableGroupBy:B})]}):null]})]})})},Pyt=({globalFilters:r,metricItem:t,client:e,param:n})=>{var _;const i={};if(n!=null&&n.values)for(const b in n.values){const S=`${b}_variable`;i[S]=n.values[b]}const[a,o]=k.useState(""),[s,l]=k.useState(""),[u,c]=k.useState([]),{data:f,isLoading:h}=wD({id:t==null?void 0:t.id,clientId:e,filterValues:i,globalFilters:r}),d=(_=f==null?void 0:f.externalMetricQuery)==null?void 0:_.data;k.useEffect(()=>{o(t==null?void 0:t.chartOptions.chartType),c(d!=null?d:[]),l(t==null?void 0:t.chartOptions.singleValue)},[t,d]);const v=u,[p,g]=k.useState(""),m=v!=null&&v.length?v==null?void 0:v.map(b=>b[s]):"",y=m&&parseInt(m[0],10).toString().length;return k.useEffect(()=>{let b="";switch(y){case 4:b=`${m.toString().slice(0,1)}k`;break;case 5:b=`${m.toString().slice(0,2)}k`;break;case 6:b=`${m.toString().slice(0,3)}k`;break;case 7:b=`${m.toString().slice(0,1)}M`;break;case 8:b=`${m.toString().slice(0,2)}M`;break;case 9:b=`${m.toString().slice(0,3)}M`;break;case 10:b=`${m.toString().slice(0,1)}B`;break}g(b)},[m,y]),M(Vt,{children:$("div",{className:"w-full h-[87%] relative",children:[$("div",{className:"listHeader",children:[M(St,{variant:"h1",styleClass:"primary",className:"truncate",children:t.name}),$("span",{className:"ml-auto relative group cursor-pointer",children:[M(uy,{}),M("span",{className:"bg-black hidden group-hover:inline-block bg-opacity-70 text-white text-xs rounded px-2 py-0.5 absolute top-10 left-1/2 -translate-x-1/2 z-10 text-center w-[100px]",children:t.description||t.name})]})]}),a&&M("div",{className:"h-full p-2 flex flex-col items-center justify-center w-[95%] mx-auto",children:h?M(bc,{style:{width:"50px",height:"50px",color:"blue"}}):M(Vt,{children:m.length?M(St,{styleClass:"font-14c",variant:"p",className:"text-5xl",children:y>3?p:m[0]}):"No Data Available"})})]})})},Lyt=Wy.exports.WidthProvider(Wy.exports.Responsive),Iyt=({globalFilters:r,client:t,company:e,isLiveMode:n,params:i,externalDashboardMetrics:a,isMetricListLoading:o})=>{const[s,l]=k.useState(!1),[u,c]=k.useState(),{data:f}=ZG({companyId:e,clientId:t}),h=k.useMemo(()=>f==null?void 0:f.externalDashboardThemes[0],[f==null?void 0:f.externalDashboardThemes[0]]),d=a==null?void 0:a.map(m=>m.externalMetric),v=d==null?void 0:d.filter(m=>!m.isCreatedByClient),p=d==null?void 0:d.filter(m=>m.isCreatedByClient&&m.clientId===t),g=[...v||[],...p||[]].filter(m=>n?m.isLive===n:!0);return M(Vt,{children:g.length?$(Vt,{children:[M("div",{className:"MetricList-container",children:M(Lyt,{layouts:{lg:g.map(({resizeAttributes:m,id:y})=>({i:y,w:m.width,h:m.height,x:m.xAxis,y:m.yAxis,minW:3,minH:6,maxH:15}))},isResizable:!1,isDraggable:!1,isDroppable:!1,rowHeight:30,width:1200,breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},children:g.map(m=>M("div",{className:"MetricList-wrapper",children:m.chartOptions.chartType==="single value"?M(Pyt,{metricItem:m,client:t,param:i==null?void 0:i.find(y=>y.metricId===m.metricId),globalFilters:r}):M(Ayt,{metricItem:m,onMaximize:y=>{c(y),l(!0)},client:t,param:i==null?void 0:i.find(y=>y.metricId===m.metricId),colors:h==null?void 0:h.colors,globalFilters:r})},m.id))})}),M(Q4,{onCancel:()=>l(!1),isShow:s,chart:u})]}):M(Vt,{children:o?M("div",{className:"createMetric-message",children:M(bc,{style:{width:"50px",height:"50px",color:"blue"}})}):M("div",{className:"noMetric-container",children:M("div",{className:"noMetric-wrapper",children:M(St,{variant:"h2",styleClass:"primary",children:"No metrics created yet"})})})})})};var Oyt=st.default.memo(Iyt),xc={"header-container":"_header-container_2cp30_1","btn-container":"_btn-container_2cp30_5","back-btn":"_back-btn_2cp30_9","sql-btn":"_sql-btn_2cp30_13","save-btn":"_save-btn_2cp30_17"};const Eyt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m11 5l-7 7l7 7m-7-7h16"})}),Ryt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:$("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[M("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),M("path",{d:"M17 21v-8H7v8M7 3v5h8"})]})}),kyt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6Z"})}),Nyt=({setShowMetricCreateModal:r,isDisableSaveBtn:t,Heading:e,isDisableSqlBtn:n,setShowSaveMetricModal:i,setShowSqlModal:a})=>$("div",{className:xc["header-container"],children:[$("div",{className:xc["btn-container"],children:[M(Nt,{type:"button",variant:"custom",size:"default",onClick:()=>r(!1),className:xc["back-btn"],children:M(Eyt,{})}),M(St,{variant:"h1",styleClass:"primary",children:e})]}),$("div",{className:xc["btn-container"],children:[$(Nt,{type:"button",variant:"custom",className:xc["sql-btn"],onClick:()=>a(!0),isDisabled:n,children:[M(kyt,{}),"SQL"]}),$(Nt,{type:"submit",variant:"primary",className:xc["save-btn"],isDisabled:t,onClick:()=>i(!0),children:[M(Ryt,{}),"Save to Dashboard"]})]})]});var t3={"create-btn":"_create-btn_fy7jc_1","modal-container":"_modal-container_fy7jc_5","query-modal":"_query-modal_fy7jc_9"},_d={container:"_container_hveoi_1",header:"_header_hveoi_5",wrapper:"_wrapper_hveoi_9","col-container":"_col-container_hveoi_13",column:"_column_hveoi_17"},un={container:"_container_10lve_1",wrapper:"_wrapper_10lve_5",label:"_label_10lve_9",dropdown:"_dropdown_10lve_13",options:"_options_10lve_17",checkedOption:"_checkedOption_10lve_21",option:"_option_10lve_17"},bd=r=>r.type==="checkbox",Sc=r=>r instanceof Date,Xr=r=>r==null;const e3=r=>typeof r=="object";var cr=r=>!Xr(r)&&!Array.isArray(r)&&e3(r)&&!Sc(r),r3=r=>cr(r)&&r.target?bd(r.target)?r.target.checked:r.target.value:r,Byt=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,n3=(r,t)=>r.has(Byt(t)),xd=r=>Array.isArray(r)?r.filter(Boolean):[],Ze=r=>r===void 0,wt=(r,t,e)=>{if(!t||!cr(r))return e;const n=xd(t.split(/[,[\].]+?/)).reduce((i,a)=>Xr(i)?i:i[a],r);return Ze(n)||n===r?Ze(r[t])?e:r[t]:n};const cy={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Oi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ua={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zyt=st.default.createContext(null),uT=()=>st.default.useContext(zyt);var i3=(r,t,e,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in r)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Oi.all&&(t._proxyFormState[o]=!n||Oi.all),e&&(e[o]=!0),r[o]}});return i},ni=r=>cr(r)&&!Object.keys(r).length,a3=(r,t,e,n)=>{e(r);const{name:i,...a}=r;return ni(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Oi.all))},fy=r=>Array.isArray(r)?r:[r],o3=(r,t,e)=>e&&t?r===t:!r||!t||r===t||fy(r).some(n=>n&&(n.startsWith(t)||t.startsWith(n)));function cT(r){const t=st.default.useRef(r);t.current=r,st.default.useEffect(()=>{const e=!r.disabled&&t.current.subject.subscribe({next:t.current.next});return()=>{e&&e.unsubscribe()}},[r.disabled])}function Fyt(r){const t=uT(),{control:e=t.control,disabled:n,name:i,exact:a}=r||{},[o,s]=st.default.useState(e._formState),l=st.default.useRef(!0),u=st.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=st.default.useRef(i);return c.current=i,cT({disabled:n,next:f=>l.current&&o3(c.current,f.name,a)&&a3(f,u.current,e._updateFormState)&&s({...e._formState,...f}),subject:e._subjects.state}),st.default.useEffect(()=>{l.current=!0;const f=e._proxyFormState.isDirty&&e._getDirty();return f!==e._formState.isDirty&&e._subjects.state.next({isDirty:f}),u.current.isValid&&e._updateValid(!0),()=>{l.current=!1}},[e]),i3(o,e,u.current,!1)}var ca=r=>typeof r=="string",s3=(r,t,e,n,i)=>ca(r)?(n&&t.watch.add(r),wt(e,r,i)):Array.isArray(r)?r.map(a=>(n&&t.watch.add(a),wt(e,a))):(n&&(t.watchAll=!0),e),Vyt=r=>{const t=r.constructor&&r.constructor.prototype;return cr(t)&&t.hasOwnProperty("isPrototypeOf")},fT=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function Ko(r){let t;const e=Array.isArray(r);if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(fT&&(r instanceof Blob||r instanceof FileList))&&(e||cr(r)))if(t=e?[]:{},!Array.isArray(r)&&!Vyt(r))t=r;else for(const n in r)t[n]=Ko(r[n]);else return r;return t}function Hyt(r){const t=uT(),{control:e=t.control,name:n,defaultValue:i,disabled:a,exact:o}=r||{},s=st.default.useRef(n);s.current=n,cT({disabled:a,subject:e._subjects.watch,next:c=>{o3(s.current,c.name,o)&&u(Ko(s3(s.current,e._names,c.values||e._formValues,!1,i)))}});const[l,u]=st.default.useState(e._getWatch(n,i));return st.default.useEffect(()=>e._removeUnmounted()),l}function $yt(r){const t=uT(),{name:e,control:n=t.control,shouldUnregister:i}=r,a=n3(n._names.array,e),o=Hyt({control:n,name:e,defaultValue:wt(n._formValues,e,wt(n._defaultValues,e,r.defaultValue)),exact:!0}),s=Fyt({control:n,name:e}),l=st.default.useRef(n.register(e,{...r.rules,value:o}));return st.default.useEffect(()=>{const u=(c,f)=>{const h=wt(n._fields,c);h&&(h._f.mount=f)};return u(e,!0),()=>{const c=n._options.shouldUnregister||i;(a?c&&!n._stateFlags.action:c)?n.unregister(e):u(e,!1)}},[e,n,a,i]),{field:{name:e,value:o,onChange:st.default.useCallback(u=>l.current.onChange({target:{value:r3(u),name:e},type:cy.CHANGE}),[e]),onBlur:st.default.useCallback(()=>l.current.onBlur({target:{value:wt(n._formValues,e),name:e},type:cy.BLUR}),[e,n]),ref:u=>{const c=wt(n._fields,e);c&&u&&(c._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:f=>u.setCustomValidity(f),reportValidity:()=>u.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!wt(s.errors,e)},isDirty:{enumerable:!0,get:()=>!!wt(s.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!wt(s.touchedFields,e)},error:{enumerable:!0,get:()=>wt(s.errors,e)}})}}const Wyt=r=>r.render($yt(r));var Gyt=(r,t,e,n,i)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[n]:i||!0}}:{},hT=r=>/^\w*$/.test(r),l3=r=>xd(r.replace(/["|']|\]/g,"").split(/\.|\[/));function Ne(r,t,e){let n=-1;const i=hT(t)?[t]:l3(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=e;if(n!==o){const u=r[s];l=cr(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}r[s]=l,r=r[s]}return r}const dT=(r,t,e)=>{for(const n of e||Object.keys(r)){const i=wt(r,n);if(i){const{_f:a,...o}=i;if(a&&t(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else cr(o)&&dT(o,t)}}};var u3=r=>({isOnSubmit:!r||r===Oi.onSubmit,isOnBlur:r===Oi.onBlur,isOnChange:r===Oi.onChange,isOnAll:r===Oi.all,isOnTouch:r===Oi.onTouched}),c3=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(n=>r.startsWith(n)&&/^\.\w+/.test(r.slice(n.length)))),Uyt=(r,t,e)=>{const n=xd(wt(r,e));return Ne(n,"root",t[e]),Ne(r,e,n),r},wc=r=>typeof r=="boolean",vT=r=>r.type==="file",Cc=r=>typeof r=="function",hy=r=>{if(!fT)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dy=r=>ca(r)||st.default.isValidElement(r),pT=r=>r.type==="radio",vy=r=>r instanceof RegExp;const f3={value:!1,isValid:!1},h3={value:!0,isValid:!0};var d3=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!Ze(r[0].attributes.value)?Ze(r[0].value)||r[0].value===""?h3:{value:r[0].value,isValid:!0}:h3:f3}return f3};const v3={isValid:!1,value:null};var p3=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,v3):v3;function g3(r,t,e="validate"){if(dy(r)||Array.isArray(r)&&r.every(dy)||wc(r)&&!r)return{type:e,message:dy(r)?r:"",ref:t}}var Tc=r=>cr(r)&&!vy(r)?r:{value:r,message:""},m3=async(r,t,e,n,i)=>{const{ref:a,refs:o,required:s,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:d,name:v,valueAsNumber:p,mount:g,disabled:m}=r._f,y=wt(t,v);if(!g||m)return{};const _=o?o[0]:a,b=P=>{n&&_.reportValidity&&(_.setCustomValidity(wc(P)?"":P||""),_.reportValidity())},S={},x=pT(a),w=bd(a),C=x||w,T=(p||vT(a))&&Ze(a.value)&&Ze(y)||hy(a)&&a.value===""||y===""||Array.isArray(y)&&!y.length,D=Gyt.bind(null,v,e,S),A=(P,I,O,E=Ua.maxLength,R=Ua.minLength)=>{const z=P?I:O;S[v]={type:P?E:R,message:z,ref:a,...D(P?E:R,z)}};if(i?!Array.isArray(y)||!y.length:s&&(!C&&(T||Xr(y))||wc(y)&&!y||w&&!d3(o).isValid||x&&!p3(o).isValid)){const{value:P,message:I}=dy(s)?{value:!!s,message:s}:Tc(s);if(P&&(S[v]={type:Ua.required,message:I,ref:_,...D(Ua.required,I)},!e))return b(I),S}if(!T&&(!Xr(c)||!Xr(f))){let P,I;const O=Tc(f),E=Tc(c);if(!Xr(y)&&!isNaN(y)){const R=a.valueAsNumber||y&&+y;Xr(O.value)||(P=R>O.value),Xr(E.value)||(I=R<E.value)}else{const R=a.valueAsDate||new Date(y),z=W=>new Date(new Date().toDateString()+" "+W),B=a.type=="time",Y=a.type=="week";ca(O.value)&&y&&(P=B?z(y)>z(O.value):Y?y>O.value:R>new Date(O.value)),ca(E.value)&&y&&(I=B?z(y)<z(E.value):Y?y<E.value:R<new Date(E.value))}if((P||I)&&(A(!!P,O.message,E.message,Ua.max,Ua.min),!e))return b(S[v].message),S}if((l||u)&&!T&&(ca(y)||i&&Array.isArray(y))){const P=Tc(l),I=Tc(u),O=!Xr(P.value)&&y.length>P.value,E=!Xr(I.value)&&y.length<I.value;if((O||E)&&(A(O,P.message,I.message),!e))return b(S[v].message),S}if(h&&!T&&ca(y)){const{value:P,message:I}=Tc(h);if(vy(P)&&!y.match(P)&&(S[v]={type:Ua.pattern,message:I,ref:a,...D(Ua.pattern,I)},!e))return b(I),S}if(d){if(Cc(d)){const P=await d(y,t),I=g3(P,_);if(I&&(S[v]={...I,...D(Ua.validate,I.message)},!e))return b(I.message),S}else if(cr(d)){let P={};for(const I in d){if(!ni(P)&&!e)break;const O=g3(await d[I](y,t),_,I);O&&(P={...O,...D(I,O.message)},b(O.message),e&&(S[v]=P))}if(!ni(P)&&(S[v]={ref:_,...P},!e))return S}}return b(!0),S};function Yyt(r,t){const e=t.slice(0,-1).length;let n=0;for(;n<e;)r=Ze(r)?n++:r[t[n++]];return r}function qyt(r){for(const t in r)if(!Ze(r[t]))return!1;return!0}function Nr(r,t){const e=Array.isArray(t)?t:hT(t)?[t]:l3(t),n=e.length===1?r:Yyt(r,e),i=e.length-1,a=e[i];return n&&delete n[a],i!==0&&(cr(n)&&ni(n)||Array.isArray(n)&&qyt(n))&&Nr(r,e.slice(0,-1)),r}function gT(){let r=[];return{get observers(){return r},next:i=>{for(const a of r)a.next(i)},subscribe:i=>(r.push(i),{unsubscribe:()=>{r=r.filter(a=>a!==i)}}),unsubscribe:()=>{r=[]}}}var py=r=>Xr(r)||!e3(r);function kl(r,t){if(py(r)||py(t))return r===t;if(Sc(r)&&Sc(t))return r.getTime()===t.getTime();const e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(const i of e){const a=r[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(Sc(a)&&Sc(o)||cr(a)&&cr(o)||Array.isArray(a)&&Array.isArray(o)?!kl(a,o):a!==o)return!1}}return!0}var y3=r=>r.type==="select-multiple",jyt=r=>pT(r)||bd(r),mT=r=>hy(r)&&r.isConnected,_3=r=>{for(const t in r)if(Cc(r[t]))return!0;return!1};function gy(r,t={}){const e=Array.isArray(r);if(cr(r)||e)for(const n in r)Array.isArray(r[n])||cr(r[n])&&!_3(r[n])?(t[n]=Array.isArray(r[n])?[]:{},gy(r[n],t[n])):Xr(r[n])||(t[n]=!0);return t}function b3(r,t,e){const n=Array.isArray(r);if(cr(r)||n)for(const i in r)Array.isArray(r[i])||cr(r[i])&&!_3(r[i])?Ze(t)||py(e[i])?e[i]=Array.isArray(r[i])?gy(r[i],[]):{...gy(r[i])}:b3(r[i],Xr(t)?{}:t[i],e[i]):kl(r[i],t[i])?delete e[i]:e[i]=!0;return e}var yT=(r,t)=>b3(r,t,gy(t)),x3=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:n})=>Ze(r)?r:t?r===""?NaN:r&&+r:e&&ca(r)?new Date(r):n?n(r):r;function _T(r){const t=r.ref;if(!(r.refs?r.refs.every(e=>e.disabled):t.disabled))return vT(t)?t.files:pT(t)?p3(r.refs).value:y3(t)?[...t.selectedOptions].map(({value:e})=>e):bd(t)?d3(r.refs).value:x3(Ze(t.value)?r.ref.value:t.value,r)}var Xyt=(r,t,e,n)=>{const i={};for(const a of r){const o=wt(t,a);o&&Ne(i,a,o._f)}return{criteriaMode:e,names:[...r],fields:i,shouldUseNativeValidation:n}},Sd=r=>Ze(r)?r:vy(r)?r.source:cr(r)?vy(r.value)?r.value.source:r.value:r,Zyt=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function S3(r,t,e){const n=wt(r,e);if(n||hT(e))return{error:n,name:e};const i=e.split(".");for(;i.length;){const a=i.join("."),o=wt(t,a),s=wt(r,a);if(o&&!Array.isArray(o)&&e!==a)return{name:e};if(s&&s.type)return{name:a,error:s};i.pop()}return{name:e}}var Kyt=(r,t,e,n,i)=>i.isOnAll?!1:!e&&i.isOnTouch?!(t||r):(e?n.isOnBlur:i.isOnBlur)?!r:(e?n.isOnChange:i.isOnChange)?r:!0,Qyt=(r,t)=>!xd(wt(r,t)).length&&Nr(r,t);const Jyt={mode:Oi.onSubmit,reValidateMode:Oi.onChange,shouldFocusError:!0};function t0t(r={},t){let e={...Jyt,...r};const n=r.resetOptions&&r.resetOptions.keepDirtyValues;let i={submitCount:0,isDirty:!1,isLoading:!0,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},a={},o=cr(e.defaultValues)?Ko(e.defaultValues)||{}:{},s=e.shouldUnregister?{}:Ko(o),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,f=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={watch:gT(),array:gT(),state:gT()},v=u3(e.mode),p=u3(e.reValidateMode),g=e.criteriaMode===Oi.all,m=F=>X=>{clearTimeout(f),f=window.setTimeout(F,X)},y=async F=>{if(h.isValid||F){const X=e.resolver?ni((await T()).errors):await A(a,!0);X!==i.isValid&&(i.isValid=X,d.state.next({isValid:X}))}},_=F=>h.isValidating&&d.state.next({isValidating:F}),b=(F,X=[],Z,ut,ht=!0,ot=!0)=>{if(ut&&Z){if(l.action=!0,ot&&Array.isArray(wt(a,F))){const gt=Z(wt(a,F),ut.argA,ut.argB);ht&&Ne(a,F,gt)}if(ot&&Array.isArray(wt(i.errors,F))){const gt=Z(wt(i.errors,F),ut.argA,ut.argB);ht&&Ne(i.errors,F,gt),Qyt(i.errors,F)}if(h.touchedFields&&ot&&Array.isArray(wt(i.touchedFields,F))){const gt=Z(wt(i.touchedFields,F),ut.argA,ut.argB);ht&&Ne(i.touchedFields,F,gt)}h.dirtyFields&&(i.dirtyFields=yT(o,s)),d.state.next({name:F,isDirty:I(F,X),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Ne(s,F,X)},S=(F,X)=>{Ne(i.errors,F,X),d.state.next({errors:i.errors})},x=(F,X,Z,ut)=>{const ht=wt(a,F);if(ht){const ot=wt(s,F,Ze(Z)?wt(o,F):Z);Ze(ot)||ut&&ut.defaultChecked||X?Ne(s,F,X?ot:_T(ht._f)):R(F,ot),l.mount&&y()}},w=(F,X,Z,ut,ht)=>{let ot=!1,gt=!1;const ve={name:F};if(!Z||ut){h.isDirty&&(gt=i.isDirty,i.isDirty=ve.isDirty=I(),ot=gt!==ve.isDirty);const Zt=kl(wt(o,F),X);gt=wt(i.dirtyFields,F),Zt?Nr(i.dirtyFields,F):Ne(i.dirtyFields,F,!0),ve.dirtyFields=i.dirtyFields,ot=ot||h.dirtyFields&>!==!Zt}if(Z){const Zt=wt(i.touchedFields,F);Zt||(Ne(i.touchedFields,F,Z),ve.touchedFields=i.touchedFields,ot=ot||h.touchedFields&&Zt!==Z)}return ot&&ht&&d.state.next(ve),ot?ve:{}},C=(F,X,Z,ut)=>{const ht=wt(i.errors,F),ot=h.isValid&&wc(X)&&i.isValid!==X;if(r.delayError&&Z?(c=m(()=>S(F,Z)),c(r.delayError)):(clearTimeout(f),c=null,Z?Ne(i.errors,F,Z):Nr(i.errors,F)),(Z?!kl(ht,Z):ht)||!ni(ut)||ot){const gt={...ut,...ot&&wc(X)?{isValid:X}:{},errors:i.errors,name:F};i={...i,...gt},d.state.next(gt)}_(!1)},T=async F=>await e.resolver(s,e.context,Xyt(F||u.mount,a,e.criteriaMode,e.shouldUseNativeValidation)),D=async F=>{const{errors:X}=await T();if(F)for(const Z of F){const ut=wt(X,Z);ut?Ne(i.errors,Z,ut):Nr(i.errors,Z)}else i.errors=X;return X},A=async(F,X,Z={valid:!0})=>{for(const ut in F){const ht=F[ut];if(ht){const{_f:ot,...gt}=ht;if(ot){const ve=u.array.has(ot.name),Zt=await m3(ht,s,g,e.shouldUseNativeValidation,ve);if(Zt[ot.name]&&(Z.valid=!1,X))break;!X&&(wt(Zt,ot.name)?ve?Uyt(i.errors,Zt,ot.name):Ne(i.errors,ot.name,Zt[ot.name]):Nr(i.errors,ot.name))}gt&&await A(gt,X,Z)}}return Z.valid},P=()=>{for(const F of u.unMount){const X=wt(a,F);X&&(X._f.refs?X._f.refs.every(Z=>!mT(Z)):!mT(X._f.ref))&&tt(F)}u.unMount=new Set},I=(F,X)=>(F&&X&&Ne(s,F,X),!kl(et(),o)),O=(F,X,Z)=>s3(F,u,{...l.mount?s:Ze(X)?o:ca(F)?{[F]:X}:X},Z,X),E=F=>xd(wt(l.mount?s:o,F,r.shouldUnregister?wt(o,F,[]):[])),R=(F,X,Z={})=>{const ut=wt(a,F);let ht=X;if(ut){const ot=ut._f;ot&&(!ot.disabled&&Ne(s,F,x3(X,ot)),ht=hy(ot.ref)&&Xr(X)?"":X,y3(ot.ref)?[...ot.ref.options].forEach(gt=>gt.selected=ht.includes(gt.value)):ot.refs?bd(ot.ref)?ot.refs.length>1?ot.refs.forEach(gt=>(!gt.defaultChecked||!gt.disabled)&&(gt.checked=Array.isArray(ht)?!!ht.find(ve=>ve===gt.value):ht===gt.value)):ot.refs[0]&&(ot.refs[0].checked=!!ht):ot.refs.forEach(gt=>gt.checked=gt.value===ht):vT(ot.ref)?ot.ref.value="":(ot.ref.value=ht,ot.ref.type||d.watch.next({name:F})))}(Z.shouldDirty||Z.shouldTouch)&&w(F,ht,Z.shouldTouch,Z.shouldDirty,!0),Z.shouldValidate&&W(F)},z=(F,X,Z)=>{for(const ut in X){const ht=X[ut],ot=`${F}.${ut}`,gt=wt(a,ot);(u.array.has(F)||!py(ht)||gt&&!gt._f)&&!Sc(ht)?z(ot,ht,Z):R(ot,ht,Z)}},B=(F,X,Z={})=>{const ut=wt(a,F),ht=u.array.has(F),ot=Ko(X);Ne(s,F,ot),ht?(d.array.next({name:F,values:s}),(h.isDirty||h.dirtyFields)&&Z.shouldDirty&&(i.dirtyFields=yT(o,s),d.state.next({name:F,dirtyFields:i.dirtyFields,isDirty:I(F,ot)}))):ut&&!ut._f&&!Xr(ot)?z(F,ot,Z):R(F,ot,Z),c3(F,u)&&d.state.next({}),d.watch.next({name:F}),!l.mount&&t()},Y=async F=>{const X=F.target;let Z=X.name;const ut=wt(a,Z),ht=()=>X.type?_T(ut._f):r3(F);if(ut){let ot,gt;const ve=ht(),Zt=F.type===cy.BLUR||F.type===cy.FOCUS_OUT,ts=!Zyt(ut._f)&&!e.resolver&&!wt(i.errors,Z)&&!ut._f.deps||Kyt(Zt,wt(i.touchedFields,Z),i.isSubmitted,p,v),dn=c3(Z,u,Zt);Ne(s,Z,ve),Zt?(ut._f.onBlur&&ut._f.onBlur(F),c&&c(0)):ut._f.onChange&&ut._f.onChange(F);const Ei=w(Z,ve,Zt,!1),da=!ni(Ei)||dn;if(!Zt&&d.watch.next({name:Z,type:F.type}),ts)return h.isValid&&y(),da&&d.state.next({name:Z,...dn?{}:Ei});if(!Zt&&dn&&d.state.next({}),_(!0),e.resolver){const{errors:Ri}=await T([Z]),es=S3(i.errors,a,Z),Qe=S3(Ri,a,es.name||Z);ot=Qe.error,Z=Qe.name,gt=ni(Ri)}else ot=(await m3(ut,s,g,e.shouldUseNativeValidation))[Z],ot?gt=!1:h.isValid&&(gt=await A(a,!0));ut._f.deps&&W(ut._f.deps),C(Z,gt,ot,Ei)}},W=async(F,X={})=>{let Z,ut;const ht=fy(F);if(_(!0),e.resolver){const ot=await D(Ze(F)?F:ht);Z=ni(ot),ut=F?!ht.some(gt=>wt(ot,gt)):Z}else F?(ut=(await Promise.all(ht.map(async ot=>{const gt=wt(a,ot);return await A(gt&>._f?{[ot]:gt}:gt)}))).every(Boolean),!(!ut&&!i.isValid)&&y()):ut=Z=await A(a);return d.state.next({...!ca(F)||h.isValid&&Z!==i.isValid?{}:{name:F},...e.resolver||!F?{isValid:Z}:{},errors:i.errors,isValidating:!1}),X.shouldFocus&&!ut&&dT(a,ot=>ot&&wt(i.errors,ot),F?ht:u.mount),ut},et=F=>{const X={...o,...l.mount?s:{}};return Ze(F)?X:ca(F)?wt(X,F):F.map(Z=>wt(X,Z))},V=(F,X)=>({invalid:!!wt((X||i).errors,F),isDirty:!!wt((X||i).dirtyFields,F),isTouched:!!wt((X||i).touchedFields,F),error:wt((X||i).errors,F)}),H=F=>{F?fy(F).forEach(X=>Nr(i.errors,X)):i.errors={},d.state.next({errors:i.errors})},G=(F,X,Z)=>{const ut=(wt(a,F,{_f:{}})._f||{}).ref;Ne(i.errors,F,{...X,ref:ut}),d.state.next({name:F,errors:i.errors,isValid:!1}),Z&&Z.shouldFocus&&ut&&ut.focus&&ut.focus()},j=(F,X)=>Cc(F)?d.watch.subscribe({next:Z=>F(O(void 0,X),Z)}):O(F,X,!0),tt=(F,X={})=>{for(const Z of F?fy(F):u.mount)u.mount.delete(Z),u.array.delete(Z),wt(a,Z)&&(X.keepValue||(Nr(a,Z),Nr(s,Z)),!X.keepError&&Nr(i.errors,Z),!X.keepDirty&&Nr(i.dirtyFields,Z),!X.keepTouched&&Nr(i.touchedFields,Z),!e.shouldUnregister&&!X.keepDefaultValue&&Nr(o,Z));d.watch.next({}),d.state.next({...i,...X.keepDirty?{isDirty:I()}:{}}),!X.keepIsValid&&y()},nt=(F,X={})=>{let Z=wt(a,F);const ut=wc(X.disabled);return Ne(a,F,{...Z||{},_f:{...Z&&Z._f?Z._f:{ref:{name:F}},name:F,mount:!0,...X}}),u.mount.add(F),Z?ut&&Ne(s,F,X.disabled?void 0:wt(s,F,_T(Z._f))):x(F,!0,X.value),{...ut?{disabled:X.disabled}:{},...e.shouldUseNativeValidation?{required:!!X.required,min:Sd(X.min),max:Sd(X.max),minLength:Sd(X.minLength),maxLength:Sd(X.maxLength),pattern:Sd(X.pattern)}:{},name:F,onChange:Y,onBlur:Y,ref:ht=>{if(ht){nt(F,X),Z=wt(a,F);const ot=Ze(ht.value)&&ht.querySelectorAll&&ht.querySelectorAll("input,select,textarea")[0]||ht,gt=jyt(ot),ve=Z._f.refs||[];if(gt?ve.find(Zt=>Zt===ot):ot===Z._f.ref)return;Ne(a,F,{_f:{...Z._f,...gt?{refs:[...ve.filter(mT),ot,...Array.isArray(wt(o,F))?[{}]:[]],ref:{type:ot.type,name:F}}:{ref:ot}}}),x(F,!1,void 0,ot)}else Z=wt(a,F,{}),Z._f&&(Z._f.mount=!1),(e.shouldUnregister||X.shouldUnregister)&&!(n3(u.array,F)&&l.action)&&u.unMount.add(F)}}},rt=()=>e.shouldFocusError&&dT(a,F=>F&&wt(i.errors,F),u.mount),vt=(F,X)=>async Z=>{Z&&(Z.preventDefault&&Z.preventDefault(),Z.persist&&Z.persist());let ut=Ko(s);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:ht,values:ot}=await T();i.errors=ht,ut=ot}else await A(a);ni(i.errors)?(d.state.next({errors:{}}),await F(ut,Z)):(X&&await X({...i.errors},Z),rt()),d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ni(i.errors),submitCount:i.submitCount+1,errors:i.errors})},ft=(F,X={})=>{wt(a,F)&&(Ze(X.defaultValue)?B(F,wt(o,F)):(B(F,X.defaultValue),Ne(o,F,X.defaultValue)),X.keepTouched||Nr(i.touchedFields,F),X.keepDirty||(Nr(i.dirtyFields,F),i.isDirty=X.defaultValue?I(F,wt(o,F)):I()),X.keepError||(Nr(i.errors,F),h.isValid&&y()),d.state.next({...i}))},lt=(F,X={})=>{const Z=F||o,ut=Ko(Z),ht=F&&!ni(F)?ut:o;if(X.keepDefaultValues||(o=Z),!X.keepValues){if(X.keepDirtyValues||n)for(const ot of u.mount)wt(i.dirtyFields,ot)?Ne(ht,ot,wt(s,ot)):B(ot,wt(ht,ot));else{if(fT&&Ze(F))for(const ot of u.mount){const gt=wt(a,ot);if(gt&>._f){const ve=Array.isArray(gt._f.refs)?gt._f.refs[0]:gt._f.ref;if(hy(ve)){const Zt=ve.closest("form");if(Zt){Zt.reset();break}}}}a={}}s=r.shouldUnregister?X.keepDefaultValues?Ko(o):{}:ut,d.array.next({values:ht}),d.watch.next({values:ht})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!h.isValid||!!X.keepIsValid,l.watch=!!r.shouldUnregister,d.state.next({submitCount:X.keepSubmitCount?i.submitCount:0,isDirty:X.keepDirty||X.keepDirtyValues?i.isDirty:!!(X.keepDefaultValues&&!kl(F,o)),isSubmitted:X.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:X.keepDirty||X.keepDirtyValues?i.dirtyFields:X.keepDefaultValues&&F?yT(o,F):{},touchedFields:X.keepTouched?i.touchedFields:{},errors:X.keepErrors?i.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},mt=(F,X)=>lt(Cc(F)?F(s):F,X),At=(F,X={})=>{const Z=wt(a,F),ut=Z&&Z._f;if(ut){const ht=ut.refs?ut.refs[0]:ut.ref;ht.focus&&(ht.focus(),X.shouldSelect&&ht.select())}},Ct=F=>{i={...i,...F}};return Cc(e.defaultValues)&&e.defaultValues().then(F=>{mt(F,e.resetOptions),d.state.next({isLoading:!1})}),{control:{register:nt,unregister:tt,getFieldState:V,_executeSchema:T,_focusError:rt,_getWatch:O,_getDirty:I,_updateValid:y,_removeUnmounted:P,_updateFieldArray:b,_getFieldArray:E,_reset:lt,_updateFormState:Ct,_subjects:d,_proxyFormState:h,get _fields(){return a},get _formValues(){return s},get _stateFlags(){return l},set _stateFlags(F){l=F},get _defaultValues(){return o},get _names(){return u},set _names(F){u=F},get _formState(){return i},set _formState(F){i=F},get _options(){return e},set _options(F){e={...e,...F}}},trigger:W,register:nt,handleSubmit:vt,watch:j,setValue:B,getValues:et,reset:mt,resetField:ft,clearErrors:H,unregister:tt,setError:G,setFocus:At,getFieldState:V}}function bT(r={}){const t=st.default.useRef(),[e,n]=st.default.useState({isDirty:!1,isValidating:!1,isLoading:!0,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Cc(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...t0t(r,()=>n(a=>({...a}))),formState:e});const i=t.current.control;return i._options=r,cT({subject:i._subjects.state,next:a=>{a3(a,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),st.default.useEffect(()=>{i._stateFlags.mount||(i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()}),st.default.useEffect(()=>{r.values&&!kl(r.values,i._defaultValues)&&i._reset(r.values,i._options.resetOptions)},[r.values,i]),st.default.useEffect(()=>{e.submitCount&&i._focusError()},[i,e.submitCount]),t.current.formState=i3(e,i),t.current}var xT={"searchTab-container":"_searchTab-container_10vte_1","searchTab-input":"_searchTab-input_10vte_5"};const my=({setSearchKeyword:r,className:t=""})=>{const{register:e,watch:n}=bT(),i=n("searchKeyword");return k.useEffect(()=>{r(i==null?void 0:i.toLowerCase())},[r,n,i]),M("div",{className:`${xT["searchTab-container"]} ${t}`,children:M("form",{className:xT["searchTab-wrapper"],children:M("input",{placeholder:"Search here...",...e("searchKeyword"),className:xT["searchTab-input"]})})})},ST=({onOutsideClick:r,wrapRef:t})=>{k.useEffect(()=>{const e=n=>{t.current&&!t.current.contains(n.target)&&r()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t,r])},yy=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4Z"})}),e0t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"m10.6 16.2l7.05-7.05l-1.4-1.4l-5.65 5.65l-2.85-2.85l-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Z"})}),wT=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z"})}),r0t=({label:r,labelVariant:t="floating",selectedOption:e,onChange:n,className:i,options:a,isDisabled:o,children:s,Icon:l,isSearchEnabled:u})=>{const[c,f]=k.useState(!1),h=k.useRef(null),[d,v]=k.useState(""),[p,g]=k.useState(20);return ST({wrapRef:h,onOutsideClick:()=>f(!1)}),$("div",{className:ya(un.container,i),ref:h,children:[r?M(St,{variant:"span",styleClass:t==="floating"?"custom":"font-14",className:`${un.label} ${t==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,$(Nt,{type:"button",variant:"custom",isDisabled:o,className:un.wrapper,onClick:()=>f(!c),children:[$(St,{variant:"p",styleClass:"font-14",className:`flex items-center gap-2 ${t==="floating"?"mt-2.5":""}`,children:[l&&M(l,{className:"text-[#182C60] text-lg"}),e.label||"Select An Option"]}),M(yy,{})]}),c&&!o&&$("div",{className:un.dropdown,children:[u&&M(my,{className:"p-2 mb-3",setSearchKeyword:v}),$("div",{className:un.options,children:[(d?a.filter(m=>m.label.toLowerCase().includes(d)):a.slice(0,p)).map(m=>{const y=m.value===e.value;return M(Nt,{type:"button",variant:"custom",className:y?un.checkedOption:un.option,onClick:()=>{n(m),f(!1)},children:m.label},m.key||m.value)}),p<=a.length&&M(Nt,{variant:"secondary",type:"button",onClick:()=>g(m=>m+20),className:"w-full text-blue-700 text-center",children:"Load More"})]}),s]})]})},n0t=st.default.memo(({label:r,labelVariant:t="floating",selectedOptions:e,onChange:n,className:i,options:a,isDisabled:o,children:s,isSearchEnabled:l})=>{const[u,c]=k.useState(!1),f=k.useRef(null),[h,d]=k.useState(""),[v,p]=k.useState(20);return ST({wrapRef:f,onOutsideClick:()=>c(!1)}),$("div",{className:ya(un.container,i),ref:f,children:[r?M(St,{variant:"span",styleClass:t==="floating"?"custom":"font-14",className:`${un.label} ${t==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,$(Nt,{type:"button",variant:"custom",isDisabled:o,className:un.wrapper,onClick:()=>c(!u),children:[M(St,{variant:"p",styleClass:"font-14",className:t==="floating"?"mt-2.5":"",children:"Select 1 or more option"}),M(yy,{})]}),u&&!o&&$("div",{className:un.dropdown,children:[l&&M(my,{className:"p-2 mb-3",setSearchKeyword:d}),$("div",{className:un.options,children:[(h?a.filter(g=>g.label.toLowerCase().includes(h)):a.slice(0,v)).map(g=>{const m=!!e.find(y=>y.value===g.value);return $(Nt,{type:"button",variant:"custom",className:m?un.checkedOption:un.option,onClick:()=>{const y=m?e.filter(_=>_.value!==g.value):[...e,g];n(y)},children:[m?M(e0t,{}):M(wT,{}),g.label]},g.key||g.value)}),v<=a.length&&M(Nt,{variant:"secondary",type:"button",onClick:()=>p(g=>g+20),className:"w-full text-blue-700 text-center",children:"Load More"})]}),s]})]})});var cn=st.default.memo(r0t);const i0t=r=>M("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m13.5 5.5l-2 10m-2-10l-2 10m-1-7h9m-10 4h9"})}),a0t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m0 8v4h8v-4H8m0 6v4h8v-4H8M8 4v4h8V4H8Z"})}),o0t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M9.62 12L12 5.67L14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2Z"})}),s0t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M15 20v-2h3V6h-3V4h5v16ZM4 20V4h5v2H6v12h3v2Z"})}),l0t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M5 22q-.825 0-1.413-.587Q3 20.825 3 20V6q0-.825.587-1.412Q4.175 4 5 4h1V2h2v2h8V2h2v2h1q.825 0 1.413.588Q21 5.175 21 6v14q0 .825-.587 1.413Q19.825 22 19 22Zm0-2h14V10H5v10ZM5 8h14V6H5Zm0 0V6v2Z"})}),u0t=r=>$("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M23 23a7 7 0 1 1 7-7a7.008 7.008 0 0 1-7 7Zm0-12a5 5 0 1 0 5 5a5.005 5.005 0 0 0-5-5Z"}),M("circle",{cx:9,cy:16,r:7,fill:"currentColor"})]}),CT=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],c0t=[{value:"10",label:"10"},{value:"50",label:"50"},{value:"100",label:"100"},{value:"250",label:"250"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"10000",label:"10000"},{value:"50000",label:"50000"}],w3=[{value:"AVG",label:"AVG"},{value:"SUM",label:"SUM"},{value:"COUNT",label:"COUNT"},{value:"COUNT_DISTINCT",label:"COUNT_DISTINCT"},{value:"MAX",label:"MAX"},{value:"MIN",label:"MIN"}],C3=["fixed","real","int","bigint","float","number","integer","int64","float64","double precision","smallint"],T3=["varchar","text","char","text","character(36)","string"],M3=["timestamp_ltz","date","timestamp","timestamp without time zone","timestamp with time zone","datetime"],f0t=["array","text[]"],D3=["boolean","bool"],h0t=({datatype:r})=>C3.includes(r.toLowerCase())?M(i0t,{}):T3.includes(r.toLowerCase())||r.toLowerCase().includes("char")?M(o0t,{}):f0t.includes(r.toLowerCase())?M(s0t,{}):M3.includes(r.toLowerCase())?M(l0t,{}):D3.includes(r.toLowerCase())?M(u0t,{}):M(a0t,{});var d0t=st.default.memo(h0t);const v0t=r=>M("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m17.498 15.498l-.01-10a2 2 0 0 0-2-1.998h-10a2 2 0 0 0-1.995 1.85l-.006.152l.01 10a2 2 0 0 0 2 1.998h10a2 2 0 0 0 1.995-1.85zM7.5 3.5v13.817m10-9.817h-14"})}),p0t=({setselectTable:r,selectTable:t,tableList:e,columnList:n})=>$("div",{className:_d.container,children:[M("div",{className:_d.header,children:M(cn,{onChange:r,selectedOption:t,options:e,Icon:v0t,labelVariant:"static"})}),$("div",{className:_d.wrapper,children:[M(St,{variant:"h1",styleClass:"primary",children:"Columns"}),M("div",{className:_d["col-container"],children:n.map(({name:i,datatype:a})=>$("div",{className:_d.column,children:[M(d0t,{datatype:a}),M(St,{variant:"p",styleClass:"font-14",children:i})]},i))})]})]});var g0t=st.default.memo(p0t);const m0t=({options:r,activeTab:t,setActiveTab:e})=>M("div",{className:"w-full h-12 flex items-end border-b divide-solid",children:r.map(n=>M(Nt,{variant:"custom",type:"button",className:`px-3 py-2 capitalize ${t===n&&"border-b border-blue-700"}`,onClick:()=>e(n),children:n}))}),A3=({message:r=""})=>M(St,{variant:"p",styleClass:"custom",className:"text-xs text-red-500 mt-1",children:r}),Br=({id:r,name:t,value:e,placeholder:n="",label:i,type:a,onBlur:o,onFocus:s,onChange:l,onKeyDown:u,defaultValue:c,register:f,error:h,icon:d,checked:v,isDisabled:p,labelClass:g,inputClass:m,className:y})=>a==="checkbox"?$("div",{className:`flex justify-start items-center ${y!=null?y:""}`,children:[M("input",{type:"checkbox",name:t,className:m,onChange:l,...f,defaultValue:c,checked:v,disabled:p}),i?$("label",{htmlFor:i,className:`p-1 flex gap-2 items-center ml-5 ${g}`,children:[d," ",i]}):null]}):$("div",{className:`inputField-container ${y!=null?y:""}`,children:[i?M("label",{htmlFor:i,className:`label ${g}`,children:i}):null,$("div",{className:"w-full relative",children:[M("input",{id:r,value:e,name:t,type:a,onFocus:s,onBlur:o,onChange:l,onKeyDown:u,className:`input ${m}`,placeholder:n,defaultValue:c,...f,disabled:p}),d]}),h&&M(A3,{message:h.message})]}),P3=typeof window=="undefined"||typeof document=="undefined";let fn=P3?k.useEffect:k.useLayoutEffect;function Ya(r){let t=k.useRef(r);return fn(()=>{t.current=r},[r]),t}function L3(r,t){let[e,n]=k.useState(r),i=Ya(r);return fn(()=>n(i.current),[i,n,...t]),e}function y0t(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))}function Nl(){let r=[],t=[],e={enqueue(n){t.push(n)},addEventListener(n,i,a,o){return n.addEventListener(i,a,o),e.add(()=>n.removeEventListener(i,a,o))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);return e.add(()=>cancelAnimationFrame(i))},nextFrame(...n){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...n))},setTimeout(...n){let i=setTimeout(...n);return e.add(()=>clearTimeout(i))},microTask(...n){let i={current:!0};return y0t(()=>{i.current&&n[0]()}),e.add(()=>{i.current=!1})},add(n){return r.push(n),()=>{let i=r.indexOf(n);if(i>=0){let[a]=r.splice(i,1);a()}}},dispose(){for(let n of r.splice(0))n()},async workQueue(){for(let n of t.splice(0))await n()}};return e}function Bl(){let[r]=k.useState(Nl);return k.useEffect(()=>()=>r.dispose(),[r]),r}let le=function(r){let t=Ya(r);return st.default.useCallback((...e)=>t.current(...e),[t])},TT={serverHandoffComplete:!1};function MT(){let[r,t]=k.useState(TT.serverHandoffComplete);return k.useEffect(()=>{r!==!0&&t(!0)},[r]),k.useEffect(()=>{TT.serverHandoffComplete===!1&&(TT.serverHandoffComplete=!0)},[]),r}var I3;let _0t=0;function O3(){return++_0t}let zl=(I3=st.default.useId)!=null?I3:function(){let r=MT(),[t,e]=st.default.useState(r?O3:null);return fn(()=>{t===null&&e(O3())},[t]),t!=null?""+t:void 0};function fr(r,t,...e){if(r in t){let i=t[r];return typeof i=="function"?i(...e):i}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,fr),n}function E3(r){return P3?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}let R3=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var b0t=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(b0t||{}),x0t=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(x0t||{}),S0t=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(S0t||{}),DT=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(DT||{});function k3(r,t=0){var e;return r===((e=E3(r))==null?void 0:e.body)?!1:fr(t,{[0](){return r.matches(R3)},[1](){let n=r;for(;n!==null;){if(n.matches(R3))return!0;n=n.parentElement}return!1}})}function w0t(r,t=e=>e){return r.slice().sort((e,n)=>{let i=t(e),a=t(n);if(i===null||a===null)return 0;let o=i.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function AT(r,t,e){let n=Ya(t);k.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(r,i,e),()=>document.removeEventListener(r,i,e)},[r,e])}function C0t(r,t,e=!0){let n=k.useRef(!1);k.useEffect(()=>{requestAnimationFrame(()=>{n.current=e})},[e]);function i(o,s){if(!n.current||o.defaultPrevented)return;let l=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(r),u=s(o);if(u!==null&&!!u.getRootNode().contains(u)){for(let c of l){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(u)||o.composed&&o.composedPath().includes(f))return}return!k3(u,DT.Loose)&&u.tabIndex!==-1&&o.preventDefault(),t(o,u)}}let a=k.useRef(null);AT("mousedown",o=>{var s,l;n.current&&(a.current=((l=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:l[0])||o.target)},!0),AT("click",o=>{!a.current||(i(o,()=>a.current),a.current=null)},!0),AT("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function N3(r){var t;if(r.type)return r.type;let e=(t=r.as)!=null?t:"button";if(typeof e=="string"&&e.toLowerCase()==="button")return"button"}function B3(r,t){let[e,n]=k.useState(()=>N3(r));return fn(()=>{n(N3(r))},[r.type,r.as]),fn(()=>{e||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[e,t]),e}let T0t=Symbol();function fa(...r){let t=k.useRef(r);k.useEffect(()=>{t.current=r},[r]);let e=le(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return r.every(n=>n==null||(n==null?void 0:n[T0t]))?void 0:e}function M0t(r){throw new Error("Unexpected object: "+r)}var hn=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(hn||{});function D0t(r,t){let e=t.resolveItems();if(e.length<=0)return null;let n=t.resolveActiveIndex(),i=n!=null?n:-1,a=(()=>{switch(r.focus){case 0:return e.findIndex(o=>!t.resolveDisabled(o));case 1:{let o=e.slice().reverse().findIndex((s,l,u)=>i!==-1&&u.length-l-1>=i?!1:!t.resolveDisabled(s));return o===-1?o:e.length-1-o}case 2:return e.findIndex((o,s)=>s<=i?!1:!t.resolveDisabled(o));case 3:{let o=e.slice().reverse().findIndex(s=>!t.resolveDisabled(s));return o===-1?o:e.length-1-o}case 4:return e.findIndex(o=>t.resolveId(o)===r.id);case 5:return null;default:M0t(r)}})();return a===-1?n:a}var _y=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(_y||{}),qa=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(qa||{});function ii({ourProps:r,theirProps:t,slot:e,defaultTag:n,features:i,visible:a=!0,name:o}){let s=z3(t,r);if(a)return by(s,e,n,o);let l=i!=null?i:0;if(l&2){let{static:u=!1,...c}=s;if(u)return by(c,e,n,o)}if(l&1){let{unmount:u=!0,...c}=s;return fr(u?0:1,{[0](){return null},[1](){return by({...c,hidden:!0,style:{display:"none"}},e,n,o)}})}return by(s,e,n,o)}function by(r,t={},e,n){let{as:i=e,children:a,refName:o="ref",...s}=PT(r,["unmount","static"]),l=r.ref!==void 0?{[o]:r.ref}:{},u=typeof a=="function"?a(t):a;s.className&&typeof s.className=="function"&&(s.className=s.className(t));let c={};if(t){let f=!1,h=[];for(let[d,v]of Object.entries(t))typeof v=="boolean"&&(f=!0),v===!0&&h.push(d);f&&(c["data-headlessui-state"]=h.join(" "))}if(i===k.Fragment&&Object.keys(xy(s)).length>0){if(!k.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(f=>` - ${f}`).join(`
|
|
250
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
|
|
251
|
+
`)].join(`
|
|
252
|
+
`));return k.cloneElement(u,Object.assign({},z3(u.props,xy(PT(s,["ref"]))),c,l,A0t(u.ref,l.ref)))}return k.createElement(i,Object.assign({},PT(s,["ref"]),i!==k.Fragment&&l,i!==k.Fragment&&c),u)}function A0t(...r){return{ref:r.every(t=>t==null)?void 0:t=>{for(let e of r)e!=null&&(typeof e=="function"?e(t):e.current=t)}}}function z3(...r){if(r.length===0)return{};if(r.length===1)return r[0];let t={},e={};for(let n of r)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(e[i]!=null||(e[i]=[]),e[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(e).map(n=>[n,void 0])));for(let n in e)Object.assign(t,{[n](i,...a){let o=e[n];for(let s of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...a)}}});return t}function ai(r){var t;return Object.assign(k.forwardRef(r),{displayName:(t=r.displayName)!=null?t:r.name})}function xy(r){let t=Object.assign({},r);for(let e in t)t[e]===void 0&&delete t[e];return t}function PT(r,t=[]){let e=Object.assign({},r);for(let n of t)n in e&&delete e[n];return e}function F3(r){let t=r.parentElement,e=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(e=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&P0t(e)?!1:n}function P0t(r){if(!r)return!1;let t=r.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function V3(r={},t=null,e=[]){for(let[n,i]of Object.entries(r))$3(e,H3(t,n),i);return e}function H3(r,t){return r?r+"["+t+"]":t}function $3(r,t,e){if(Array.isArray(e))for(let[n,i]of e.entries())$3(r,H3(t,n.toString()),i);else e instanceof Date?r.push([t,e.toISOString()]):typeof e=="boolean"?r.push([t,e?"1":"0"]):typeof e=="string"?r.push([t,e]):typeof e=="number"?r.push([t,`${e}`]):e==null?r.push([t,""]):V3(e,t,r)}function L0t(r){var t;let e=(t=r==null?void 0:r.form)!=null?t:r.closest("form");if(e){for(let n of e.elements)if(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image"){n.click();return}}}let I0t="div";var LT=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(LT||{});let W3=ai(function(r,t){let{features:e=1,...n}=r,i={ref:t,"aria-hidden":(e&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(e&4)===4&&(e&2)!==2&&{display:"none"}}};return ii({ourProps:i,theirProps:n,slot:{},defaultTag:I0t,name:"Hidden"})}),IT=k.createContext(null);IT.displayName="OpenClosedContext";var Qo=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Qo||{});function OT(){return k.useContext(IT)}function G3({value:r,children:t}){return st.default.createElement(IT.Provider,{value:r},t)}var Ke=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(Ke||{});function U3(r,t,e){let[n,i]=k.useState(e),a=r!==void 0,o=k.useRef(a),s=k.useRef(!1),l=k.useRef(!1);return a&&!o.current&&!s.current?(s.current=!0,o.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&o.current&&!l.current&&(l.current=!0,o.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?r:n,le(u=>(a||i(u),t==null?void 0:t(u)))]}function Y3(r){return[r.screenX,r.screenY]}function O0t(){let r=k.useRef([-1,-1]);return{wasMoved(t){let e=Y3(t);return r.current[0]===e[0]&&r.current[1]===e[1]?!1:(r.current=e,!0)},update(t){r.current=Y3(t)}}}function q3(){let r=k.useRef(!1);return fn(()=>(r.current=!0,()=>{r.current=!1}),[]),r}let j3=k.createContext(null);function X3(){let r=k.useContext(j3);if(r===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,X3),t}return r}function E0t(){let[r,t]=k.useState([]);return[r.length>0?r.join(" "):void 0,k.useMemo(()=>function(e){let n=le(a=>(t(o=>[...o,a]),()=>t(o=>{let s=o.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),i=k.useMemo(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return st.default.createElement(j3.Provider,{value:i},e.children)},[t])]}let R0t="p",k0t=ai(function(r,t){let e=zl(),{id:n=`headlessui-description-${e}`,...i}=r,a=X3(),o=fa(t);fn(()=>a.register(n),[n,a.register]);let s={ref:o,...a.props,id:n};return ii({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:R0t,name:a.name||"Description"})});var N0t=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(N0t||{}),B0t=(r=>(r[r.Single=0]="Single",r[r.Multi=1]="Multi",r))(B0t||{}),z0t=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(z0t||{}),F0t=(r=>(r[r.OpenListbox=0]="OpenListbox",r[r.CloseListbox=1]="CloseListbox",r[r.GoToOption=2]="GoToOption",r[r.Search=3]="Search",r[r.ClearSearch=4]="ClearSearch",r[r.RegisterOption=5]="RegisterOption",r[r.UnregisterOption=6]="UnregisterOption",r[r.RegisterLabel=7]="RegisterLabel",r))(F0t||{});function ET(r,t=e=>e){let e=r.activeOptionIndex!==null?r.options[r.activeOptionIndex]:null,n=w0t(t(r.options.slice()),a=>a.dataRef.current.domRef.current),i=e?n.indexOf(e):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let V0t={[1](r){return r.dataRef.current.disabled||r.listboxState===1?r:{...r,activeOptionIndex:null,listboxState:1}},[0](r){if(r.dataRef.current.disabled||r.listboxState===0)return r;let t=r.activeOptionIndex,{isSelected:e}=r.dataRef.current,n=r.options.findIndex(i=>e(i.dataRef.current.value));return n!==-1&&(t=n),{...r,listboxState:0,activeOptionIndex:t}},[2](r,t){var e;if(r.dataRef.current.disabled||r.listboxState===1)return r;let n=ET(r),i=D0t(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:a=>a.id,resolveDisabled:a=>a.dataRef.current.disabled});return{...r,...n,searchQuery:"",activeOptionIndex:i,activationTrigger:(e=t.trigger)!=null?e:1}},[3]:(r,t)=>{if(r.dataRef.current.disabled||r.listboxState===1)return r;let e=r.searchQuery!==""?0:1,n=r.searchQuery+t.value.toLowerCase(),i=(r.activeOptionIndex!==null?r.options.slice(r.activeOptionIndex+e).concat(r.options.slice(0,r.activeOptionIndex+e)):r.options).find(o=>{var s;return!o.dataRef.current.disabled&&((s=o.dataRef.current.textValue)==null?void 0:s.startsWith(n))}),a=i?r.options.indexOf(i):-1;return a===-1||a===r.activeOptionIndex?{...r,searchQuery:n}:{...r,searchQuery:n,activeOptionIndex:a,activationTrigger:1}},[4](r){return r.dataRef.current.disabled||r.listboxState===1||r.searchQuery===""?r:{...r,searchQuery:""}},[5]:(r,t)=>{let e={id:t.id,dataRef:t.dataRef},n=ET(r,i=>[...i,e]);return r.activeOptionIndex===null&&r.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(e)),{...r,...n}},[6]:(r,t)=>{let e=ET(r,n=>{let i=n.findIndex(a=>a.id===t.id);return i!==-1&&n.splice(i,1),n});return{...r,...e,activationTrigger:1}},[7]:(r,t)=>({...r,labelId:t.id})},RT=k.createContext(null);RT.displayName="ListboxActionsContext";function wd(r){let t=k.useContext(RT);if(t===null){let e=new Error(`<${r} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,wd),e}return t}let kT=k.createContext(null);kT.displayName="ListboxDataContext";function Cd(r){let t=k.useContext(kT);if(t===null){let e=new Error(`<${r} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Cd),e}return t}function H0t(r,t){return fr(t.type,V0t,r,t)}let $0t=k.Fragment,W0t=ai(function(r,t){let{value:e,defaultValue:n,name:i,onChange:a,by:o=(H,G)=>H===G,disabled:s=!1,horizontal:l=!1,multiple:u=!1,...c}=r;const f=l?"horizontal":"vertical";let h=fa(t),[d=u?[]:void 0,v]=U3(e,a,n),[p,g]=k.useReducer(H0t,{dataRef:k.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=k.useRef({static:!1,hold:!1}),y=k.useRef(null),_=k.useRef(null),b=k.useRef(null),S=le(typeof o=="string"?(H,G)=>{let j=o;return(H==null?void 0:H[j])===(G==null?void 0:G[j])}:o),x=k.useCallback(H=>fr(w.mode,{[1]:()=>d.some(G=>S(G,H)),[0]:()=>S(d,H)}),[d]),w=k.useMemo(()=>({...p,value:d,disabled:s,mode:u?1:0,orientation:f,compare:S,isSelected:x,optionsPropsRef:m,labelRef:y,buttonRef:_,optionsRef:b}),[d,s,u,p]);fn(()=>{p.dataRef.current=w},[w]),C0t([w.buttonRef,w.optionsRef],(H,G)=>{var j;g({type:1}),k3(G,DT.Loose)||(H.preventDefault(),(j=w.buttonRef.current)==null||j.focus())},w.listboxState===0);let C=k.useMemo(()=>({open:w.listboxState===0,disabled:s,value:d}),[w,s,d]),T=le(H=>{let G=w.options.find(j=>j.id===H);!G||R(G.dataRef.current.value)}),D=le(()=>{if(w.activeOptionIndex!==null){let{dataRef:H,id:G}=w.options[w.activeOptionIndex];R(H.current.value),g({type:2,focus:hn.Specific,id:G})}}),A=le(()=>g({type:0})),P=le(()=>g({type:1})),I=le((H,G,j)=>H===hn.Specific?g({type:2,focus:hn.Specific,id:G,trigger:j}):g({type:2,focus:H,trigger:j})),O=le((H,G)=>(g({type:5,id:H,dataRef:G}),()=>g({type:6,id:H}))),E=le(H=>(g({type:7,id:H}),()=>g({type:7,id:null}))),R=le(H=>fr(w.mode,{[0](){return v==null?void 0:v(H)},[1](){let G=w.value.slice(),j=G.findIndex(tt=>S(tt,H));return j===-1?G.push(H):G.splice(j,1),v==null?void 0:v(G)}})),z=le(H=>g({type:3,value:H})),B=le(()=>g({type:4})),Y=k.useMemo(()=>({onChange:R,registerOption:O,registerLabel:E,goToOption:I,closeListbox:P,openListbox:A,selectActiveOption:D,selectOption:T,search:z,clearSearch:B}),[]),W={ref:h},et=k.useRef(null),V=Bl();return k.useEffect(()=>{!et.current||n!==void 0&&V.addEventListener(et.current,"reset",()=>{R(n)})},[et,R]),st.default.createElement(RT.Provider,{value:Y},st.default.createElement(kT.Provider,{value:w},st.default.createElement(G3,{value:fr(w.listboxState,{[0]:Qo.Open,[1]:Qo.Closed})},i!=null&&d!=null&&V3({[i]:d}).map(([H,G],j)=>st.default.createElement(W3,{features:LT.Hidden,ref:j===0?tt=>{var nt;et.current=(nt=tt==null?void 0:tt.closest("form"))!=null?nt:null}:void 0,...xy({key:H,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:H,value:G})})),ii({ourProps:W,theirProps:c,slot:C,defaultTag:$0t,name:"Listbox"}))))}),G0t="button",U0t=ai(function(r,t){var e;let n=zl(),{id:i=`headlessui-listbox-button-${n}`,...a}=r,o=Cd("Listbox.Button"),s=wd("Listbox.Button"),l=fa(o.buttonRef,t),u=Bl(),c=le(g=>{switch(g.key){case Ke.Space:case Ke.Enter:case Ke.ArrowDown:g.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(hn.First)});break;case Ke.ArrowUp:g.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(hn.Last)});break}}),f=le(g=>{switch(g.key){case Ke.Space:g.preventDefault();break}}),h=le(g=>{if(F3(g.currentTarget))return g.preventDefault();o.listboxState===0?(s.closeListbox(),u.nextFrame(()=>{var m;return(m=o.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})})):(g.preventDefault(),s.openListbox())}),d=L3(()=>{if(o.labelId)return[o.labelId,i].join(" ")},[o.labelId,i]),v=k.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled,value:o.value}),[o]),p={ref:l,id:i,type:B3(r,o.buttonRef),"aria-haspopup":"listbox","aria-controls":(e=o.optionsRef.current)==null?void 0:e.id,"aria-expanded":o.disabled?void 0:o.listboxState===0,"aria-labelledby":d,disabled:o.disabled,onKeyDown:c,onKeyUp:f,onClick:h};return ii({ourProps:p,theirProps:a,slot:v,defaultTag:G0t,name:"Listbox.Button"})}),Y0t="label",q0t=ai(function(r,t){let e=zl(),{id:n=`headlessui-listbox-label-${e}`,...i}=r,a=Cd("Listbox.Label"),o=wd("Listbox.Label"),s=fa(a.labelRef,t);fn(()=>o.registerLabel(n),[n]);let l=le(()=>{var c;return(c=a.buttonRef.current)==null?void 0:c.focus({preventScroll:!0})}),u=k.useMemo(()=>({open:a.listboxState===0,disabled:a.disabled}),[a]);return ii({ourProps:{ref:s,id:n,onClick:l},theirProps:i,slot:u,defaultTag:Y0t,name:"Listbox.Label"})}),j0t="ul",X0t=_y.RenderStrategy|_y.Static,Z0t=ai(function(r,t){var e;let n=zl(),{id:i=`headlessui-listbox-options-${n}`,...a}=r,o=Cd("Listbox.Options"),s=wd("Listbox.Options"),l=fa(o.optionsRef,t),u=Bl(),c=Bl(),f=OT(),h=(()=>f!==null?f===Qo.Open:o.listboxState===0)();k.useEffect(()=>{var m;let y=o.optionsRef.current;!y||o.listboxState===0&&y!==((m=E3(y))==null?void 0:m.activeElement)&&y.focus({preventScroll:!0})},[o.listboxState,o.optionsRef]);let d=le(m=>{switch(c.dispose(),m.key){case Ke.Space:if(o.searchQuery!=="")return m.preventDefault(),m.stopPropagation(),s.search(m.key);case Ke.Enter:if(m.preventDefault(),m.stopPropagation(),o.activeOptionIndex!==null){let{dataRef:y}=o.options[o.activeOptionIndex];s.onChange(y.current.value)}o.mode===0&&(s.closeListbox(),Nl().nextFrame(()=>{var y;return(y=o.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})}));break;case fr(o.orientation,{vertical:Ke.ArrowDown,horizontal:Ke.ArrowRight}):return m.preventDefault(),m.stopPropagation(),s.goToOption(hn.Next);case fr(o.orientation,{vertical:Ke.ArrowUp,horizontal:Ke.ArrowLeft}):return m.preventDefault(),m.stopPropagation(),s.goToOption(hn.Previous);case Ke.Home:case Ke.PageUp:return m.preventDefault(),m.stopPropagation(),s.goToOption(hn.First);case Ke.End:case Ke.PageDown:return m.preventDefault(),m.stopPropagation(),s.goToOption(hn.Last);case Ke.Escape:return m.preventDefault(),m.stopPropagation(),s.closeListbox(),u.nextFrame(()=>{var y;return(y=o.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})});case Ke.Tab:m.preventDefault(),m.stopPropagation();break;default:m.key.length===1&&(s.search(m.key),c.setTimeout(()=>s.clearSearch(),350));break}}),v=L3(()=>{var m,y,_;return(_=(m=o.labelRef.current)==null?void 0:m.id)!=null?_:(y=o.buttonRef.current)==null?void 0:y.id},[o.labelRef.current,o.buttonRef.current]),p=k.useMemo(()=>({open:o.listboxState===0}),[o]),g={"aria-activedescendant":o.activeOptionIndex===null||(e=o.options[o.activeOptionIndex])==null?void 0:e.id,"aria-multiselectable":o.mode===1?!0:void 0,"aria-labelledby":v,"aria-orientation":o.orientation,id:i,onKeyDown:d,role:"listbox",tabIndex:0,ref:l};return ii({ourProps:g,theirProps:a,slot:p,defaultTag:j0t,features:X0t,visible:h,name:"Listbox.Options"})}),K0t="li",Q0t=ai(function(r,t){let e=zl(),{id:n=`headlessui-listbox-option-${e}`,disabled:i=!1,value:a,...o}=r,s=Cd("Listbox.Option"),l=wd("Listbox.Option"),u=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===n:!1,c=s.isSelected(a),f=k.useRef(null),h=Ya({disabled:i,value:a,domRef:f,get textValue(){var S,x;return(x=(S=f.current)==null?void 0:S.textContent)==null?void 0:x.toLowerCase()}}),d=fa(t,f);fn(()=>{if(s.listboxState!==0||!u||s.activationTrigger===0)return;let S=Nl();return S.requestAnimationFrame(()=>{var x,w;(w=(x=f.current)==null?void 0:x.scrollIntoView)==null||w.call(x,{block:"nearest"})}),S.dispose},[f,u,s.listboxState,s.activationTrigger,s.activeOptionIndex]),fn(()=>l.registerOption(n,h),[h,n]);let v=le(S=>{if(i)return S.preventDefault();l.onChange(a),s.mode===0&&(l.closeListbox(),Nl().nextFrame(()=>{var x;return(x=s.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})}))}),p=le(()=>{if(i)return l.goToOption(hn.Nothing);l.goToOption(hn.Specific,n)}),g=O0t(),m=le(S=>g.update(S)),y=le(S=>{!g.wasMoved(S)||i||u||l.goToOption(hn.Specific,n,0)}),_=le(S=>{!g.wasMoved(S)||i||!u||l.goToOption(hn.Nothing)}),b=k.useMemo(()=>({active:u,selected:c,disabled:i}),[u,c,i]);return ii({ourProps:{id:n,ref:d,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:v,onFocus:p,onPointerEnter:m,onMouseEnter:m,onPointerMove:y,onMouseMove:y,onPointerLeave:_,onMouseLeave:_},theirProps:o,slot:b,defaultTag:K0t,name:"Listbox.Option"})}),ha=Object.assign(W0t,{Button:U0t,Label:q0t,Options:Z0t,Option:Q0t}),Z3=k.createContext(null);function K3(){let r=k.useContext(Z3);if(r===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,K3),t}return r}function J0t(){let[r,t]=k.useState([]);return[r.length>0?r.join(" "):void 0,k.useMemo(()=>function(e){let n=le(a=>(t(o=>[...o,a]),()=>t(o=>{let s=o.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),i=k.useMemo(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return st.default.createElement(Z3.Provider,{value:i},e.children)},[t])]}let t_t="label",e_t=ai(function(r,t){let e=zl(),{id:n=`headlessui-label-${e}`,passive:i=!1,...a}=r,o=K3(),s=fa(t);fn(()=>o.register(n),[n,o.register]);let l={ref:s,...o.props,id:n};return i&&("onClick"in l&&delete l.onClick,"onClick"in a&&delete a.onClick),ii({ourProps:l,theirProps:a,slot:o.slot||{},defaultTag:t_t,name:o.name||"Label"})}),NT=k.createContext(null);NT.displayName="GroupContext";let r_t=k.Fragment;function n_t(r){let[t,e]=k.useState(null),[n,i]=J0t(),[a,o]=E0t(),s=k.useMemo(()=>({switch:t,setSwitch:e,labelledby:n,describedby:a}),[t,e,n,a]),l={},u=r;return st.default.createElement(o,{name:"Switch.Description"},st.default.createElement(i,{name:"Switch.Label",props:{onClick(){!t||(t.click(),t.focus({preventScroll:!0}))}}},st.default.createElement(NT.Provider,{value:s},ii({ourProps:l,theirProps:u,defaultTag:r_t,name:"Switch.Group"}))))}let i_t="button",a_t=ai(function(r,t){let e=zl(),{id:n=`headlessui-switch-${e}`,checked:i,defaultChecked:a=!1,onChange:o,name:s,value:l,...u}=r,c=k.useContext(NT),f=k.useRef(null),h=fa(f,t,c===null?null:c.setSwitch),[d,v]=U3(i,o,a),p=le(()=>v==null?void 0:v(!d)),g=le(x=>{if(F3(x.currentTarget))return x.preventDefault();x.preventDefault(),p()}),m=le(x=>{x.key===Ke.Space?(x.preventDefault(),p()):x.key===Ke.Enter&&L0t(x.currentTarget)}),y=le(x=>x.preventDefault()),_=k.useMemo(()=>({checked:d}),[d]),b={id:n,ref:h,role:"switch",type:B3(r,f),tabIndex:0,"aria-checked":d,"aria-labelledby":c==null?void 0:c.labelledby,"aria-describedby":c==null?void 0:c.describedby,onClick:g,onKeyUp:m,onKeyPress:y},S=Bl();return k.useEffect(()=>{var x;let w=(x=f.current)==null?void 0:x.closest("form");!w||a!==void 0&&S.addEventListener(w,"reset",()=>{v(a)})},[f,v]),st.default.createElement(st.default.Fragment,null,s!=null&&d&&st.default.createElement(W3,{features:LT.Hidden,...xy({as:"input",type:"checkbox",hidden:!0,readOnly:!0,checked:d,name:s,value:l})}),ii({ourProps:b,theirProps:u,slot:_,defaultTag:i_t,name:"Switch"}))}),Sy=Object.assign(a_t,{Group:n_t,Label:e_t,Description:k0t});function o_t(r){let t={called:!1};return(...e)=>{if(!t.called)return t.called=!0,r(...e)}}function BT(r,...t){r&&t.length>0&&r.classList.add(...t)}function zT(r,...t){r&&t.length>0&&r.classList.remove(...t)}function s_t(r,t){let e=Nl();if(!r)return e.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(r),[a,o]=[n,i].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,c)=>c-u);return l});if(a+o!==0){let s=e.addEventListener(r,"transitionend",l=>{l.target===l.currentTarget&&(t(),s())})}else t();return e.add(()=>t()),e.dispose}function l_t(r,t,e,n){let i=e?"enter":"leave",a=Nl(),o=n!==void 0?o_t(n):()=>{};i==="enter"&&(r.removeAttribute("hidden"),r.style.display="");let s=fr(i,{enter:()=>t.enter,leave:()=>t.leave}),l=fr(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=fr(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return zT(r,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),BT(r,...s,...u),a.nextFrame(()=>{zT(r,...u),BT(r,...l),s_t(r,()=>(zT(r,...s),BT(r,...t.entered),o()))}),a.dispose}function u_t({container:r,direction:t,classes:e,onStart:n,onStop:i}){let a=q3(),o=Bl(),s=Ya(t);fn(()=>{let l=Nl();o.add(l.dispose);let u=r.current;if(!!u&&s.current!=="idle"&&!!a.current)return l.dispose(),n.current(s.current),l.add(l_t(u,e.current,s.current==="enter",()=>{l.dispose(),i.current(s.current)})),l.dispose},[t])}function c_t(...r){return r.filter(Boolean).join(" ")}function Fl(r=""){return r.split(" ").filter(t=>t.trim().length>1)}let wy=k.createContext(null);wy.displayName="TransitionContext";var f_t=(r=>(r.Visible="visible",r.Hidden="hidden",r))(f_t||{});function h_t(){let r=k.useContext(wy);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}function d_t(){let r=k.useContext(Cy);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}let Cy=k.createContext(null);Cy.displayName="NestingContext";function Ty(r){return"children"in r?Ty(r.children):r.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Q3(r,t){let e=Ya(r),n=k.useRef([]),i=q3(),a=Bl(),o=le((d,v=qa.Hidden)=>{let p=n.current.findIndex(({el:g})=>g===d);p!==-1&&(fr(v,{[qa.Unmount](){n.current.splice(p,1)},[qa.Hidden](){n.current[p].state="hidden"}}),a.microTask(()=>{var g;!Ty(n)&&i.current&&((g=e.current)==null||g.call(e))}))}),s=le(d=>{let v=n.current.find(({el:p})=>p===d);return v?v.state!=="visible"&&(v.state="visible"):n.current.push({el:d,state:"visible"}),()=>o(d,qa.Unmount)}),l=k.useRef([]),u=k.useRef(Promise.resolve()),c=k.useRef({enter:[],leave:[],idle:[]}),f=le((d,v,p)=>{l.current.splice(0),t&&(t.chains.current[v]=t.chains.current[v].filter(([g])=>g!==d)),t==null||t.chains.current[v].push([d,new Promise(g=>{l.current.push(g)})]),t==null||t.chains.current[v].push([d,new Promise(g=>{Promise.all(c.current[v].map(([m,y])=>y)).then(()=>g())})]),v==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>p(v)):p(v)}),h=le((d,v,p)=>{Promise.all(c.current[v].splice(0).map(([g,m])=>m)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>p(v))});return k.useMemo(()=>({children:n,register:s,unregister:o,onStart:f,onStop:h,wait:u,chains:c}),[s,o,n,f,h,c,u])}function v_t(){}let p_t=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function J3(r){var t;let e={};for(let n of p_t)e[n]=(t=r[n])!=null?t:v_t;return e}function g_t(r){let t=k.useRef(J3(r));return k.useEffect(()=>{t.current=J3(r)},[r]),t}let m_t="div",tH=_y.RenderStrategy,eH=ai(function(r,t){let{beforeEnter:e,afterEnter:n,beforeLeave:i,afterLeave:a,enter:o,enterFrom:s,enterTo:l,entered:u,leave:c,leaveFrom:f,leaveTo:h,...d}=r,v=k.useRef(null),p=fa(v,t),g=d.unmount?qa.Unmount:qa.Hidden,{show:m,appear:y,initial:_}=h_t(),[b,S]=k.useState(m?"visible":"hidden"),x=d_t(),{register:w,unregister:C}=x,T=k.useRef(null);k.useEffect(()=>w(v),[w,v]),k.useEffect(()=>{if(g===qa.Hidden&&!!v.current){if(m&&b!=="visible"){S("visible");return}return fr(b,{hidden:()=>C(v),visible:()=>w(v)})}},[b,v,w,C,m,g]);let D=Ya({enter:Fl(o),enterFrom:Fl(s),enterTo:Fl(l),entered:Fl(u),leave:Fl(c),leaveFrom:Fl(f),leaveTo:Fl(h)}),A=g_t({beforeEnter:e,afterEnter:n,beforeLeave:i,afterLeave:a}),P=MT();k.useEffect(()=>{if(P&&b==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,b,P]);let I=_&&!y,O=(()=>!P||I||T.current===m?"idle":m?"enter":"leave")(),E=le(W=>fr(W,{enter:()=>A.current.beforeEnter(),leave:()=>A.current.beforeLeave(),idle:()=>{}})),R=le(W=>fr(W,{enter:()=>A.current.afterEnter(),leave:()=>A.current.afterLeave(),idle:()=>{}})),z=Q3(()=>{S("hidden"),C(v)},x);u_t({container:v,classes:D,direction:O,onStart:Ya(W=>{z.onStart(v,W,E)}),onStop:Ya(W=>{z.onStop(v,W,R),W==="leave"&&!Ty(z)&&(S("hidden"),C(v))})}),k.useEffect(()=>{!I||(g===qa.Hidden?T.current=null:T.current=m)},[m,I,b]);let B=d,Y={ref:p};return y&&m&&(typeof window=="undefined"||typeof document=="undefined")&&(B={...B,className:c_t(d.className,...D.current.enter,...D.current.enterFrom)}),st.default.createElement(Cy.Provider,{value:z},st.default.createElement(G3,{value:fr(b,{visible:Qo.Open,hidden:Qo.Closed})},ii({ourProps:Y,theirProps:B,defaultTag:m_t,features:tH,visible:b==="visible",name:"Transition.Child"})))}),FT=ai(function(r,t){let{show:e,appear:n=!1,unmount:i,...a}=r,o=k.useRef(null),s=fa(o,t);MT();let l=OT();if(e===void 0&&l!==null&&(e=fr(l,{[Qo.Open]:!0,[Qo.Closed]:!1})),![!0,!1].includes(e))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=k.useState(e?"visible":"hidden"),f=Q3(()=>{c("hidden")}),[h,d]=k.useState(!0),v=k.useRef([e]);fn(()=>{h!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),d(!1))},[v,e]);let p=k.useMemo(()=>({show:e,appear:n,initial:h}),[e,n,h]);k.useEffect(()=>{if(e)c("visible");else if(!Ty(f))c("hidden");else{let m=o.current;if(!m)return;let y=m.getBoundingClientRect();y.x===0&&y.y===0&&y.width===0&&y.height===0&&c("hidden")}},[e,f]);let g={unmount:i};return st.default.createElement(Cy.Provider,{value:f},st.default.createElement(wy.Provider,{value:p},ii({ourProps:{...g,as:k.Fragment,children:st.default.createElement(eH,{ref:s,...g,...a})},theirProps:{},defaultTag:k.Fragment,features:tH,visible:u==="visible",name:"Transition"})))}),y_t=ai(function(r,t){let e=k.useContext(wy)!==null,n=OT()!==null;return st.default.createElement(st.default.Fragment,null,!e&&n?st.default.createElement(FT,{ref:t,...r}):st.default.createElement(eH,{ref:t,...r}))}),VT=Object.assign(FT,{Child:y_t,Root:FT});var Jo={"listBox-label":"_listBox-label_1aclf_1","listBoxButton-container":"_listBoxButton-container_1aclf_5",listBoxButton:"_listBoxButton_1aclf_5","listBox-option":"_listBox-option_1aclf_13"};const __t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z"})}),My=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42Z"})}),b_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"m10 13.6l5.9-5.9q.275-.275.7-.275q.425 0 .7.275q.275.275.275.7q0 .425-.275.7l-6.6 6.6q-.3.3-.7.3q-.4 0-.7-.3l-2.6-2.6q-.275-.275-.275-.7q0-.425.275-.7q.275-.275.7-.275q.425 0 .7.275Z"})}),Zr=({label:r,options:t,onChange:e,value:n,defaultValue:i,children:a,placeHolder:o,className:s="",isSearchEnabled:l})=>{const[u,c]=k.useState(""),[f,h]=k.useState(20),d=n||i?t==null?void 0:t.find(v=>v.value===n||v.value===i):{label:o||"Select an option"};return M(ha,{value:n,onChange:e,children:({open:v})=>$(Vt,{children:[r?M(ha.Label,{className:Jo["listBox-label"],children:r}):null,$("div",{className:`-mt-1 relative ${s}`,children:[$(ha.Button,{className:Jo["listBoxButton-container"],children:[M("span",{className:"block truncate text-[#182C60]",children:d==null?void 0:d.label}),M("span",{className:Jo.listBoxButton,children:M(My,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),M(VT,{show:v,as:k.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M(ha.Options,{className:Jo["listBox-option"],children:$(Vt,{children:[l&&M(my,{setSearchKeyword:c}),t!=null&&t.length?(u?t.filter(p=>p.value.toLowerCase().includes(u.toLowerCase())):t.slice(0,f)).map(p=>M(ha.Option,{className:({active:g})=>ya(g?"text-white bg-indigo-600":"text-gray-900","select-none relative py-2 pl-8 pr-4 cursor-pointer"),value:p.value,children:({selected:g,active:m})=>$(Vt,{children:[M("span",{className:ya(g?"font-semibold":"font-normal","block truncate"),children:p.label}),g?M("span",{className:ya(m?"text-white":"text-indigo-600","absolute inset-y-0 left-0 flex items-center pl-1.5"),children:M(__t,{className:"h-5 w-5","aria-hidden":"true"})}):null]})},p.value)):M("div",{className:"relative select-none py-2 px-4 text-gray-700",children:"Not Available."}),t&&f<=t.length&&M(Nt,{variant:"secondary",type:"button",onClick:()=>h(f+30),className:"w-full text-blue-700 text-center",children:"Load More"}),a]})})})]})]})})},x_t=({control:r,name:t,options:e,label:n,defaultValue:i})=>M(Wyt,{control:r,name:t,render:({field:{onChange:a,value:o}})=>M(Zr,{onChange:a,options:e,value:o,label:n,defaultValue:i})}),HT=({options:r,defaultValue:t,value:e,onChange:n,label:i,name:a,className:o,children:s,placeHolder:l,onClick:u,isSearchEnabled:c})=>{const[f,h]=k.useState(""),[d,v]=k.useState(20);return $(Vt,{children:[$(ha,{value:e,onChange:n,defaultValue:t,multiple:!0,name:a,children:[i?M(ha.Label,{className:Jo["listBox-label"],children:i}):null,$("div",{className:"relative",children:[$(ha.Button,{className:`${Jo["listBoxButton-container"]} ${o!=null?o:""}`,onClick:u,children:[M("span",{className:"block truncate text-[#182C60]",children:l||"Choose charts from list"}),M("span",{className:Jo.listBoxButton,children:M(My,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),M(VT,{as:"div",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:"relative",children:$(ha.Options,{className:Jo["listBox-option"],children:[c&&M(my,{setSearchKeyword:h}),r.length===0?M("div",{className:"relative select-none py-2 px-4 text-gray-700",children:"Not Available."}):(f?r.filter(p=>p.value.toLowerCase().includes(f.toLowerCase())):r.slice(0,d)).map(p=>M(ha.Option,{className:({selected:g})=>`relative cursor-pointer select-none py-2 pl-10 pr-4 ${g?"bg-[#F4F6FF]":""}`,value:p.value,children:({selected:g})=>$(Vt,{children:[M("span",{className:`block truncate ${g?"text-[#5865F6]":"font-normal"}`,children:p.label}),M("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3",children:g?M("div",{className:"w-5 h-5 border-2 divide-solid rounded-md flex justify-center items-center bg-blue-600 mr-2",children:M(b_t,{color:"white"})}):M("div",{className:"w-5 h-5 border-2 divide-solid rounded-md mr-2"})})]})},p.value)),d<=r.length&&M(Nt,{variant:"secondary",type:"button",onClick:()=>v(d+30),className:"w-full text-blue-700 text-center",children:"Load More"}),s]})})]})]}),e!=null&&e.length?M("div",{className:"mt-2 flex flex-row flex-wrap",children:e.map(p=>{var g;return M(St,{styleClass:"font-14c",variant:"p",className:"py-1 px-2 mr-1 inline bg-[#F4F6FC] rounded text-xs mb-1",children:(g=r.find(m=>m.value===p))==null?void 0:g.label})})}):null]})},rH=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"M20 20L4 4m16 0L4 20"})}),S_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M16 15c4.009-.065 7-3.033 7-7c0-3.012-.997-2.015-2-1c-.991.98-3 3-3 3l-4-4s2.02-2.009 3-3c1.015-1.003 1.015-2-1-2c-3.967 0-6.947 2.991-7 7c.042.976 0 3 0 3c-1.885 1.897-4.34 4.353-6 6c-2.932 2.944 1.056 6.932 4 4c1.65-1.662 4.113-4.125 6-6c0 0 2.024-.042 3 0Z"})}),w_t=({setMargins:r,margins:t,legendSettings:e,setLegendSettings:n,labelSettings:i,setLabelSettings:a,setConfigureShow:o,axisSettings:s,setAxisSettings:l,chartType:u,setChartType:c})=>{const f=["margins","legend","series"],[h,d]=k.useState("margins");return $("div",{className:"w-full h-full border divide-solid overflow-hidden",children:[$("div",{className:" flex flex-row w-full h-10 border-b divide-solid bg-slate-200 items-center px-4 relative",children:[$(St,{styleClass:"font-14c",variant:"h1",className:"flex flex-row gap-2",children:[M(S_t,{}),"Chart Configure"]}),M("div",{className:"absolute right-6 cursor-pointer",children:M(rH,{onClick:()=>o(!1)})})]}),M(m0t,{options:f,activeTab:h,setActiveTab:d}),$("form",{className:"p-5 overflow-y-auto h-[300px]",children:[h==="margins"&&$("div",{className:"flex items-center gap-1 flex-wrap",children:[M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Top",onChange:v=>r(p=>({...p,marginTop:parseInt(v.target.value,10)})),defaultValue:t.marginTop})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Bottom",onChange:v=>r(p=>({...p,marginBottom:parseInt(v.target.value,10)})),defaultValue:t.marginBottom})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Left",defaultValue:t.marginLeft,onChange:v=>r(p=>({...p,marginLeft:parseInt(v.target.value,10)}))})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Right",defaultValue:t.marginRight,onChange:v=>r(p=>({...p,marginRight:parseInt(v.target.value,10)}))})})]}),h==="legend"&&$("div",{className:"flex flex-col gap-5 h-full overflow-y-auto",children:[M(Br,{type:"checkbox",label:"Show Legend",checked:e.show,onChange:v=>n(p=>({...p,show:v.target.checked}))}),$("div",{children:[M(St,{variant:"h1",styleClass:"primary",children:"Position"}),$("div",{className:"flex items-center gap-1 flex-wrap",children:[M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Top",defaultValue:e.top,onChange:v=>n(p=>({...p,top:parseInt(v.target.value,10)}))})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Bottom",defaultValue:e.bottom,onChange:v=>n(p=>({...p,bottom:parseInt(v.target.value,10)}))})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Left",defaultValue:e.left,onChange:v=>n(p=>({...p,left:parseInt(v.target.value,10)}))})}),M("div",{className:"w-[45%]",children:M(Br,{type:"number",label:"Right",defaultValue:e.right,onChange:v=>n(p=>({...p,right:parseInt(v.target.value,10)}))})})]})]}),$("div",{className:"flex flex-col gap-5",children:[M(St,{variant:"h1",styleClass:"primary",children:"Appearance"}),M("div",{className:"w-40",children:M(Zr,{value:e.position,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:v=>n(p=>({...p,position:v}))})})]})]}),h==="series"&&$("div",{className:"flex gap-4 flex-wrap",children:[$("div",{className:"flex flex-col gap-3",children:[M(St,{variant:"h1",styleClass:"primary",children:"Chart Type"}),M("div",{className:"w-40",children:M(Zr,{value:u==="bar"||u==="line"||u==="area"?u:"",options:[{label:"Bar",value:"bar"},{label:"Line",value:"line"},{label:"Area",value:"area"}],onChange:v=>c(v)})})]}),$("div",{className:"flex flex-col gap-3",children:[M(St,{variant:"h1",styleClass:"primary",children:"Value labels"}),M("div",{className:"w-28",children:M(Zr,{value:i.position,options:[{label:"Hidden",value:"hidden"},{label:"Top",value:"top"},{label:"Bottom",value:"bottom"},{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Inside",value:"inside"}],onChange:v=>a(v==="hidden"?p=>({...p,show:!1,position:v}):p=>({...p,show:!0,position:v}))})})]}),$("div",{className:"flex flex-col gap-3",children:[M(St,{variant:"h1",styleClass:"primary",children:"Axis"}),M("div",{className:"w-40",children:M(Zr,{value:s.axis,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:v=>l(p=>({...p,axis:v}))})})]})]})]})]})},$T=({value:r,options:t,control:e})=>{const[n,i]=k.useState("");return M(x_t,{control:e,label:"",options:t,onChange:i,name:n||r})},WT=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:$("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[M("path",{strokeLinecap:"round",d:"M12 8v4m0 0v4m0-4h4m-4 0H8"}),M("circle",{cx:12,cy:12,r:10})]})}),C_t=({data:r,setXAxis:t,xAxis:e,setYAxisList:n,chartType:i,setStep:a,setMeasure:o,step:s,measure:l,setSankeyValues:u,setSettingsShow:c,singleValue:f,setSingleValue:h})=>{const d=r?Object.keys(r[0]).map(E=>({value:E,label:E})):[];d.push({value:"NONE",label:"NONE"});const[v,p]=k.useState([d==null?void 0:d[0]]),[g,m]=k.useState(""),[y,_]=k.useState(""),[b,S]=k.useState(""),[x,w]=k.useState(1),[C,T]=k.useState("show"),D=()=>{if(x<(d==null?void 0:d.length)){const E=[...v,d[x]];p(E),x===d.length-1&&T("hidden")}w(x+1)},{handleSubmit:A,control:P}=bT(),I=E=>{const R=Object.values(E);n(R.filter(z=>z!==void 0&&z!=="NONE")),c(!1)},O=()=>{u([g,y,b])};return i===p8?$("div",{className:"py-3",children:[$("div",{className:"mb-3",children:[M(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:"Source"}),M(Zr,{label:"",options:d,onChange:m,value:g})]}),$("div",{className:"mb-3",children:[M(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:"Target"}),M(Zr,{label:"",options:d,onChange:_,value:y})]}),$("div",{children:[M(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:"Value"}),M(Zr,{label:"",options:d,onChange:S,value:b})]}),M(Nt,{type:"submit",variant:"primary",size:"default",className:"mt-4 w-full h-8",onClick:()=>{O(),c(!1)},children:"Done"})]}):i===MD?M(Vt,{children:!!(i===MD||DD)&&$("div",{className:"py-3",children:[M(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:"Dimension"}),M(Zr,{label:"",options:d,onChange:t,value:e}),M(St,{styleClass:"font-14",className:"pt-3",variant:"h4",children:"Measure"}),M("div",{className:"flex flex-row items-center relative",children:M(WT,{className:`w-4 h-4 absolute right-1 bottom-1 ${C}`,onClick:()=>D()})}),$("form",{onSubmit:A(I),className:"mt-2 flex flex-col gap-2",children:[v.map(E=>M($T,{value:E.value,options:d,control:P},E.value)),M(Nt,{type:"submit",variant:"primary",size:"default",className:"mt-4 w-full h-8",children:"Done"})]})]})}):i===DD?$(Vt,{children:["(",$("div",{className:"py-3",children:[M(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:"Dimension"}),M(Zr,{label:"",options:d,onChange:t,value:e}),M(St,{styleClass:"font-14",className:"pt-3",variant:"h4",children:"Measure"}),M("div",{className:"flex flex-row items-center relative",children:M(WT,{className:`w-4 h-4 absolute right-1 bottom-1 ${C}`,onClick:()=>D()})}),$("form",{onSubmit:A(I),className:"mt-2 flex flex-col gap-2",children:[v.map(E=>M($T,{value:E.value,options:d,control:P},E.value)),M(Nt,{type:"submit",variant:"primary",size:"default",className:"mt-4 w-full h-8",children:"Done"})]})]}),")"]}):i==="single value"?$(Vt,{children:[M(St,{styleClass:"font-14",className:"mb-2 mt-3",variant:"h4",children:"Measure"}),M(Zr,{label:"",options:d,onChange:h,value:f}),M(Nt,{type:"button",variant:"primary",size:"default",className:"mt-4 w-full h-8",onClick:()=>c(!1),children:"Done"})]}):M(Vt,{children:$("div",{className:"py-3",children:[i!=="gauge"&&i!==g8&&i!=="table"&&$(Vt,{children:[$(St,{styleClass:"font-14",className:"mb-2",variant:"h4",children:[i!=="funnel"&&i!=="row"&&"X-axis",i==="funnel"&&"Step",i==="row"&&"Y-axis"]}),i==="funnel"?M(Zr,{label:"",options:d,onChange:a,value:s}):M(Zr,{label:"",options:d,onChange:t,value:e})]}),$("div",{className:i!=="gauge"?"flex flex-row items-center pt-3 relative":"flex flex-row items-center relative",children:[$(St,{styleClass:"font-14",variant:"h1",className:"mb-2",children:[i!=="funnel"&&i!=="gauge"&&i!=="row"&&i!=="boxplot"&&i!=="table"&&"Y-axis",(i==="funnel"||i==="gauge"||i==="boxplot"||i==="table")&&"Measure",i==="row"&&"X-axis"]}),i!=="funnel"&&i!=="gauge"&&M(WT,{className:`w-4 h-4 absolute right-1 bottom-2 ${C}`,onClick:()=>D()})]}),$("form",{onSubmit:A(I),className:"flex flex-col gap-2",children:[i==="funnel"||i==="gauge"?M(Zr,{label:"",options:d,onChange:o,value:l}):v.map(E=>M($T,{value:E.value,options:d,control:P},E.value)),M(Nt,{type:"submit",variant:"primary",size:"default",className:"mt-4 w-full h-8",children:"Done"})]})]})})};var T_t=k.memo(C_t);const M_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"m3.5 18.5l6-6l4 4L22 6.92L20.59 5.5l-7.09 8l-4-4L2 17l1.5 1.5Z"})}),D_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M3 22V8h4v14H3m7 0V2h4v20h-4m7 0v-8h4v8h-4Z"})}),A_t=r=>$("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M4 21h17v-2H5V3H3v17a1 1 0 0 0 1 1z"}),M("circle",{cx:10,cy:8,r:2,fill:"currentColor"}),M("circle",{cx:18,cy:12,r:2,fill:"currentColor"}),M("circle",{cx:11.5,cy:13.5,r:1.5,fill:"currentColor"}),M("circle",{cx:16.5,cy:6.5,r:1.5,fill:"currentColor"})]}),P_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M4 22H2V2h2v20Zm11-1H5v-3h10v3Zm3-5H5v-3h13v3Zm3-5H5V8h16v3Zm-8-5H5V3h8v3Z"})}),L_t=r=>M("svg",{viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z"})}),I_t=r=>$("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M27 28V16h-8v12h-4V12H7v16H4V2H2v26a2 2 0 0 0 2 2h26v-2Zm-14 0H9V14h4Zm12 0h-4V18h4Z"}),M("path",{fill:"currentColor",d:"M22.786 14a1.988 1.988 0 0 1-1.18-.387L11.205 5.987L8.242 10L6.637 8.806l2.982-4a1.998 1.998 0 0 1 2.749-.446L22.789 12l3.604-4.86L28 8.33l-3.604 4.862a2.001 2.001 0 0 1-1.61.808Z"})]}),O_t=r=>M("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M7.5 1.018a7 7 0 0 0-4.79 11.566L7.5 7.793V1.018zm1 0V7.5h6.482A7.001 7.001 0 0 0 8.5 1.018zM14.982 8.5H8.207l-4.79 4.79A7 7 0 0 0 14.982 8.5zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"})}),E_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M12.051 21.949a10 10 0 0 1-1-19.949v4.04a5.994 5.994 0 1 0 6.91 6.909H22a10.015 10.015 0 0 1-9.95 9Zm9.95-11h-4.04a5.993 5.993 0 0 0-4.91-4.909V2a10.022 10.022 0 0 1 8.95 8.948v.001Z"})}),R_t=r=>M("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"})}),k_t=r=>$("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M28 28V18h-2v10h-4V4h-2v24H10V14H8v14H4V2H2v26a2.002 2.002 0 0 0 2 2h26v-2Z"}),M("path",{fill:"currentColor",d:"M14 4h2v14h-2z"})]}),N_t=r=>$("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"}),M("path",{fill:"currentColor",d:"M10 16a2 2 0 1 1-2 2a2 2 0 0 1 2-2m0-2a4 4 0 1 0 4 4a4 4 0 0 0-4-4zm11-8a4 4 0 1 1-4 4a4 4 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6zm3.5 17a1.5 1.5 0 1 1-1.5 1.5a1.5 1.5 0 0 1 1.5-1.5m0-2a3.5 3.5 0 1 0 3.5 3.5a3.5 3.5 0 0 0-3.5-3.5z"})]}),B_t=r=>M("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M22 10V6H10v6H4V2H2v26a2.002 2.002 0 0 0 2 2h26V10Zm-10 4V8h8v4h8v10h-6v-6H12v6H4v-8ZM4 28v-4h10v-6h6v6h8v4Z"})}),z_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M3 4h1v9h3V7h5v4h4v4h4v6H3V4m13 12v4h3v-4h-3m-4-4v8h3v-8h-3M8 8v12h3V8H8m-4 6v6h3v-6H4Z"})}),F_t=r=>M("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M8.127 13.6c-.689 1.197-.225 2.18.732 2.732c.956.553 2.041.465 2.732-.732c.689-1.195 5.047-11.865 4.668-12.084c-.379-.219-7.442 8.888-8.132 10.084zM10 6c.438 0 .864.037 1.281.109c.438-.549.928-1.154 1.405-1.728A9.664 9.664 0 0 0 10 4C4.393 4 0 8.729 0 14.766c0 .371.016.742.049 1.103c.049.551.54.955 1.084.908c.551-.051.957-.535.908-1.086A10.462 10.462 0 0 1 2 14.766C2 9.85 5.514 6 10 6zm7.219 1.25c-.279.75-.574 1.514-.834 2.174C17.4 10.894 18 12.738 18 14.766c0 .316-.015.635-.043.943a1.001 1.001 0 0 0 1.992.182c.033-.37.051-.748.051-1.125c0-2.954-1.053-5.59-2.781-7.516z"})}),V_t=r=>M("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M30 2H2v14h6.111a7.036 7.036 0 0 1 3.13.74L15.764 19l-4.522 2.26a7.036 7.036 0 0 1-3.13.74H2v8h7.223a9.045 9.045 0 0 0 4.025-.95l8.622-4.31A7.036 7.036 0 0 1 25 24h5V14h-5a7.036 7.036 0 0 1-3.13-.74L15.348 10H30ZM8 4h16v4H8ZM4 4h2v10H4Zm0 20h2v4H4Zm16.975-1.05l-8.622 4.31a7.036 7.036 0 0 1-3.13.74H8v-4h.111a9.045 9.045 0 0 0 4.025-.95L18 20.118l1.864.932a9.045 9.045 0 0 0 4.025.95H24v.058a9.052 9.052 0 0 0-3.025.892ZM28 22h-2v-6h2ZM12.354 10.74l8.621 4.31a9.052 9.052 0 0 0 3.025.89V20h-.111a7.036 7.036 0 0 1-3.13-.74l-8.622-4.31A9.045 9.045 0 0 0 8.11 14H8v-4h1.223a7.036 7.036 0 0 1 3.13.74ZM28 8h-2V4h2Z"})}),H_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M22 21H2V3h2v16h2v-2h4v2h2v-3h4v3h2v-2h4v4m-4-7h4v2h-4v-2m-6-8h4v3h-4V6m4 9h-4v-5h4v5M6 10h4v2H6v-2m4 6H6v-3h4v3Z"})}),$_t=r=>M("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169c.676 0 1.174.44 1.174 1.106c0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179c.01.707-.55 1.216-1.421 1.21c-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918c1.478 0 2.642-.839 2.62-2.144c-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678c-.026-1.053-.933-1.855-2.359-1.845c-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944c.703 0 1.206.435 1.206 1.07c.005.64-.504 1.106-1.2 1.106h-.75v.96Z"})}),W_t=r=>$("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[M("path",{fill:"currentColor",d:"M22 6V4H12v2h4v2h-4v12h4v2h-4v2h10v-2h-4v-2h4V8h-4V6Zm-8 12v-3h6v3Zm6-5h-6v-3h6Z"}),M("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"})]}),G_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M8 16h5v-5H8v5Zm0-7h12V4H8Zm7 7h5v-5h-5Zm-7 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Z"})}),U_t=({setChartType:r})=>M("div",{className:"w-full h-auto flex gap-2 flex-wrap",children:[{name:"Line",icon:M_t},{name:"Bar",icon:D_t},{name:"Combo",icon:I_t},{name:"Scatter",icon:A_t},{name:"Row",icon:P_t},{name:"Area",icon:L_t},{name:"Pie",icon:O_t},{name:"Waterfall",icon:k_t},{name:"Funnel",icon:R_t},{name:"Bubble",icon:N_t},{name:"Doughnut",icon:E_t},{name:"Stepped",icon:B_t},{name:"Histogram",icon:z_t},{name:"Gauge",icon:F_t},{name:"Sankey",icon:V_t},{name:"Stack",icon:H_t},{name:"Single value",icon:$_t},{name:"BoxPlot",icon:W_t},{name:"Table",icon:G_t}].map(e=>$("div",{className:"flex flex-col w-[58px]",children:[M(Nt,{type:"button",variant:"custom",className:"flex justify-center items-center w-full border border-solid p-2",onClick:()=>{r(e.name.toLowerCase())},children:M(e.icon,{style:{color:"blue",width:"20px",height:"20px"}})},e.name),M(St,{variant:"p",styleClass:"tertiary",className:"text-xs text-center text-black",children:e.name})]},e.name))}),Y_t=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M7 3H5v6h2V3m12 0h-2v10h2V3M3 13h2v8h2v-8h2v-2H3v2m12-6h-2V3h-2v4H9v2h6V7m-4 14h2V11h-2v10m4-6v2h2v4h2v-4h2v-2h-6Z"})}),q_t=({chartType:r,setChartType:t,data:e,setXAxis:n,setYAxisList:i,xAxis:a,setMeasure:o,setStep:s,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:d})=>{const[v,p]=k.useState(!0),[g,m]=k.useState(!0);return $("div",{className:"chartButtonContainer",children:[$("div",{className:"chartButton-header",children:[$(St,{styleClass:"font-14c",variant:"h1",className:"flex flex-row",children:[M(Y_t,{}),"Chart Settings"]}),M("div",{className:"absolute right-6 cursor-pointer",children:M(rH,{onClick:()=>d(!1)})})]}),$("div",{className:"chartButtons",children:[$("div",{className:"button border divide-solid p-2 flex flex-col gap-5",children:[$(Nt,{type:"button",className:"propertyButton",variant:"secondary",onClick:()=>p(y=>!y),children:["Chart Types",M(My,{})]}),v&&M(U_t,{setChartType:t})]}),r&&$("div",{className:"button",children:[$(Nt,{type:"button",variant:"secondary",className:"propertyButton",onClick:()=>m(y=>!y),children:["Chart Properties",M(My,{})]}),g&&M(T_t,{data:e,setXAxis:n,xAxis:a,setYAxisList:i,chartType:r,setStep:s,setMeasure:o,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:d})]})]})]})},nH=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z"})}),j_t=r=>M("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M11.5 4a.5.5 0 0 0 .5.5h1.75a.75.75 0 0 1 0 1.5H12a2 2 0 0 1-2-2V2.25a.75.75 0 0 1 1.5 0V4Zm0 8a.5.5 0 0 1 .5-.5h1.75a.75.75 0 0 0 0-1.5H12a2 2 0 0 0-2 2v1.75a.75.75 0 0 0 1.5 0V12ZM4 11.5a.5.5 0 0 1 .5.5v1.75a.75.75 0 0 0 1.5 0V12a2 2 0 0 0-2-2H2.25a.75.75 0 0 0 0 1.5H4ZM4.5 4a.5.5 0 0 1-.5.5H2.25a.75.75 0 0 0 0 1.5H4a2 2 0 0 0 2-2V2.25a.75.75 0 0 0-1.5 0V4Z"})}),X_t=({labels:r,datasets:t,funnelData:e,chartType:n,setChartType:i,data:a,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:d,sankeyData:v,singleValue:p,setSingleValue:g,singleValueData:m,setMargins:y,margins:_,legendSettings:b,setLegendSettings:S,labelSettings:x,setLabelSettings:w,axisSettings:C,setAxisSettings:T,updateGroup:D,isLoading:A,isEnableGroupBy:P})=>{const[I,O]=k.useState(!1),[E,R]=k.useState(!1),[z,B]=k.useState(!1);return $("div",{className:"chartTab-container",children:[!(a!=null&&a.length)&&A&&M("div",{className:"loader-container",children:M(bc,{style:{width:"50px",height:"50px",color:"blue"}})}),!(a!=null&&a.length)&&!A&&$("div",{className:"metricChartEmpty",children:[M("div",{className:"w-14 h-14 mb-4",children:M(nH,{className:"w-full h-full text-[#ABB2FA]"})}),M("div",{className:"message",children:M(St,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),M("div",{className:"chartButton",children:M(St,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(a!=null&&a.length)&&!A&&$("div",{className:"metricChart",children:[M(St,{styleClass:"primary",variant:"p",className:"",children:"Preview"}),$("div",{className:"chartTab-wrapper",children:[$("div",{className:"chartTab-wrapper-head",children:[M(St,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),$("div",{className:"flex items-center gap-5",children:[M(Nt,{type:"button",variant:"custom",className:r!=null&&r.length?"sqlfullQuery":"noQuery",onClick:r!=null&&r.length?()=>B(!0):void 0,children:M(j_t,{})}),M(Nt,{type:"button",variant:"custom",className:"text-blue-600",onClick:()=>{R(!1),O(!I)},children:"Chart Settings"}),M(Nt,{type:"button",variant:"custom",className:"text-blue-600",onClick:()=>{O(!1),R(!E)},children:"Chart Configure"})]})]}),r!=null&&r.length?$("div",{className:"p-5 w-full h-[300px] relative",children:[I&&M("div",{className:"absolute right-0 -top-10 bg-white z-10 overflow-y-auto w-[326px] h-[410px] shadow-xl",children:M(q_t,{chartType:n,setChartType:i,data:a,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:d,singleValue:p,setSingleValue:g,setSettingsShow:O})}),E&&M("div",{className:"absolute right-0 -top-10 bg-white z-10 w-[340px] h-[410px] shadow-xl",children:M(w_t,{setMargins:y,margins:_,legendSettings:b,setLegendSettings:S,labelSettings:x,setLabelSettings:w,setConfigureShow:R,axisSettings:C,setAxisSettings:T,chartType:n,setChartType:i})}),M(lT,{labels:r,data:{labels:r,datasets:t},chartType:n,funnelData:e,sankeyData:v,singleValueData:m,margins:_,legendSettings:b,labelSettings:x,axisSettings:C,updateGroup:D,isEnableGroupBy:P,enableSaveAs:!0})]}):$("div",{className:"metricChartEmpty",children:[M("div",{className:"w-14 h-14 mb-4",children:M(nH,{className:"w-full h-full text-[#ABB2FA]"})}),M("div",{className:"message",children:M(St,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),M("div",{className:"chartButton",children:M(St,{styleClass:"font-14a",variant:"p",children:"Click on chart settings to select charts and chart properties"})})]})]})]}),M(Q4,{isShow:z,onCancel:()=>B(!1),chart:{labels:r,data:{labels:r,datasets:t},chartType:n,funnelData:e,sankeyData:v,singleValueData:m,margins:_,legendSettings:b,labelSettings:x,axisSettings:C,enableSaveAs:!0}})]})};var iH={container:"_container_danmp_1",wrapper:"_wrapper_danmp_5"};const Z_t=({data:r,isError:t})=>$("div",{className:"w-full h-full max-h-[300px] overflow-auto",children:[!!(r!=null&&r.length)&&!t&&$("table",{className:"table",children:[M("thead",{className:"tableHead",children:M("tr",{children:Object.keys(r[0]).map(e=>M("th",{className:"w-64 px-3",scope:"col",children:M(St,{styleClass:"font-14c",variant:"h1",children:e})},e))})}),M("tbody",{children:r==null?void 0:r.map((e,n)=>M("tr",{children:Object.keys(r[0]).map((i,a)=>M("td",{className:"text-center",children:M(St,{styleClass:"font-14",variant:"p",children:JSON.stringify(e[i])})},a))},n))})]}),!(r!=null&&r.length)&&!t&&M("div",{className:"w-full flex items-center justify-center rounded-md divide-solid border",children:"Table is empty"}),t&&M("div",{className:"w-full flex items-center justify-center rounded-md divide-solid border text-red-600",children:r.message})]}),K_t=({previewTableDataList:r})=>M("div",{className:iH.container,children:M("div",{className:iH.wrapper,children:r==null?void 0:r.map(t=>$("div",{className:" h-auto flex flex-col gap-5",children:[M(St,{variant:"h1",styleClass:"primary",className:"",children:t.name}),M("div",{className:"w-full h-full",children:M(Z_t,{data:t.data,isError:t.isError})})]},t.name))})});var Dy={container:"_container_tlrte_1",header:"_header_tlrte_5","text-container":"_text-container_tlrte_9","btn-container":"_btn-container_tlrte_13"};const Q_t=r=>M("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",d:"M.5 4.5h14m-10-4v14m-3-14h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1Z"})}),J_t=({data:r,isLoading:t,error:e})=>M("div",{className:"h-full relative flex",children:$("div",{className:"w-full h-full flex flex-col gap-5",children:[M("div",{className:"w-full h-[4%]",children:M(St,{styleClass:"font-14c",variant:"h1",className:"text-base",children:"Preview"})}),$("div",{className:"w-[100%] max-h-[300px] border divide-solid rounded-lg overflow-auto",children:[t&&!(r!=null&&r.length)&&M("div",{className:"table-loader-container",children:M(bc,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!t&&$("table",{className:"w-full",children:[M("thead",{children:M("tr",{className:"sticky top-0 bg-[#EAEEFC] h-10",children:Object.keys(r[0]).map(n=>M("th",{className:"w-64 px-4",scope:"col",children:M(St,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),M("tbody",{children:r.map((n,i)=>M("tr",{className:"h-14",children:Object.keys(r[0]).map((a,o)=>M("td",{className:"px-4 text-center",children:M(St,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[a])})},o))},i))})]}),!(r!=null&&r.length)&&!t&&!e.length&&$("div",{className:"w-full h-[280px] flex flex-col items-center justify-center p-5",children:[M(Q_t,{className:"text-[#ABB2FA] mb-3",width:"60px",height:"60px"}),M(St,{styleClass:"font-14b",variant:"p",children:"No data available to preview"}),M(St,{styleClass:"font-14a",variant:"p",children:"Run your query to preview data"})]}),e&&M("div",{className:"flex items-center justify-center h-[300px] w-full",children:M(St,{styleClass:"primary",className:"text-red-600",variant:"p",children:e})})]})]})}),tbt=({outpuTableData:r,outputError:t,isOutputLoading:e,previewTableDataList:n})=>{const[i,a]=k.useState(mv);return $("div",{className:Dy.container,children:[$("div",{className:Dy.header,children:[$("div",{className:Dy["text-container"],children:[M(St,{styleClass:"font-14c",variant:"h1",children:"Tables"}),M(St,{styleClass:"font-14",variant:"p",children:"Preview your selected table & output table values"})]}),$("div",{className:Dy["btn-container"],children:[M(Nt,{type:"button",variant:"custom",className:`px-3 text-center h-full flex items-center py-1 ${i===k0&&"border-b-2 bg-gray-200"}`,onClick:()=>a(k0),children:"Input Table"}),M(Nt,{type:"button",variant:"custom",className:`px-3 text-center h-full flex items-center py-1 ${i===mv&&"border-b-2 bg-gray-200"}`,onClick:()=>a(mv),children:"Output Table"})]})]}),i===k0&&M(K_t,{previewTableDataList:n}),i===mv&&M("div",{className:"w-full h-full p-5 overflow-hidden",children:M(J_t,{data:r,isLoading:e,error:t})})]})};var GT={"main-container":"_main-container_xnm0g_1","outputTab-header":"_outputTab-header_xnm0g_5",wrapper:"_wrapper_xnm0g_9",searchCommand:"_searchCommand_xnm0g_12"};const ebt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M7 21V7h14v14Zm2-10h10V9H9Zm4 4h2v-2h-2Zm0 4h2v-2h-2Zm-4-4h2v-2H9Zm8 0h2v-2h-2Zm-8 4h2v-2H9Zm8 0h2v-2h-2ZM3 17V3h14v3h-2V5H5v10h1v2Z"})}),rbt=r=>M("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.7l50.3-50.4a8.1 8.1 0 0 1 11.4 0l26.3 26.4L188.7 72H168a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V83.3l-66.3 66.4a8.1 8.1 0 0 1-11.4 0L96 123.3l-56 56V200h184a8 8 0 0 1 8 8Z"})}),nbt=({setAxisSettings:r,axisSettings:t,chartType:e,data:n,datasets:i,error:a,funnelData:o,isLoading:s,labelSettings:l,labels:u,legendSettings:c,margins:f,measure:h,previewTableDataList:d,sankeyData:v,setChartType:p,setLabelSettings:g,setLegendSettings:m,setMargins:y,setMeasure:_,setSankeyValues:b,setSingleValue:S,setStep:x,setXAxis:w,setYAxisList:C,singleValue:T,singleValueData:D,step:A,xAxis:P,isEnableGroupBy:I,updateGroup:O})=>{const[E,R]=k.useState(gv);return $("div",{className:GT["main-container"],children:[$("div",{className:GT["outputTab-header"],children:[$(Nt,{type:"button",variant:"custom",className:`px-8 text-center h-full flex items-center gap-2 ${E===gv&&"border-b-2 border-blue-600 bg-[#5865F6]/[10%] text-[#5865F6] rounded-t"}`,onClick:()=>R(gv),children:[M(ebt,{})," Tables"]}),$(Nt,{type:"button",variant:"custom",className:`px-3 text-center h-full flex items-center gap-2 ${E===R0&&"border-b-2 border-blue-600 bg-[#5865F6]/[10%] text-[#5865F6] rounded-t"}`,onClick:()=>R(R0),children:[M(rbt,{}),"Visualizations"]})]}),$("div",{className:GT.wrapper,children:[E===gv&&M(tbt,{outpuTableData:n,isOutputLoading:s,outputError:a,previewTableDataList:d}),E===R0&&M(X_t,{labels:u,funnelData:o,chartType:e,datasets:i,data:n,setChartType:p,setXAxis:w,setYAxisList:C,xAxis:P,setMeasure:_,setStep:x,step:A,measure:h,setSankeyValues:b,sankeyData:v,singleValue:T,setSingleValue:S,singleValueData:D,setMargins:y,margins:f,legendSettings:c,setLegendSettings:m,labelSettings:l,setLabelSettings:g,axisSettings:t,setAxisSettings:r,updateGroup:O,isEnableGroupBy:I,isLoading:s})]})]})};var Se={"form-container":"_form-container_1qsi5_1","field-container":"_field-container_1qsi5_5","field-label":"_field-label_1qsi5_9","field-wrapper":"_field-wrapper_1qsi5_13","field-inner-container":"_field-inner-container_1qsi5_17","field-value":"_field-value_1qsi5_21","field-add-btn":"_field-add-btn_1qsi5_25","field-value-container":"_field-value-container_1qsi5_29","field-prompt":"_field-prompt_1qsi5_33",group:"_group_1qsi5_1"},ibt={center:"_center_62eu0_1",top:"_top_62eu0_9",bottom:"_bottom_62eu0_17",left:"_left_62eu0_25",right:"_right_62eu0_33","left-top-end":"_left-top-end_62eu0_41","right-top-end":"_right-top-end_62eu0_49","left-bottom-end":"_left-bottom-end_62eu0_57","right-bottom-end":"_right-bottom-end_62eu0_65","top-left":"_top-left_62eu0_73","top-right":"_top-right_62eu0_81","bottom-left":"_bottom-left_62eu0_89","bottom-right":"_bottom-right_62eu0_97","left-top":"_left-top_62eu0_41","left-bottom":"_left-bottom_62eu0_57","right-top":"_right-top_62eu0_49","right-bottom":"_right-bottom_62eu0_65"};const abt=({className:r="",menuClass:t="",menuContainerClass:e="",buttonClass:n="",children:i,button:a,position:o="bottom",isDisabled:s})=>{const[l,u]=k.useState(!1),c=k.useRef(null);return ST({wrapRef:c,onOutsideClick:()=>u(!1)}),M(Vt,{children:$("div",{className:`relative ${r}`,ref:c,children:[M(Nt,{className:`${n} ${l?"opacity-60":""} outline-none`,type:"button",variant:"custom",onClick:()=>!s&&u(f=>!f),children:a}),s?null:M("div",{className:`absolute z-50 ${ibt[o]} ${e}`,children:M(VT,{as:"div",className:`shadow-bs-4 bg-white w-full rounded ring-1 ring-black ring-opacity-5 ${t}`,show:l,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:i})})]})})};var aH=st.default.memo(abt);const obt=[{label:"Last Week",value:"Last Week"},{label:"This Week",value:"This Week"},{label:"Last Month",value:"Last Month"},{label:"This Month",value:"This Month"},{label:"Last Year",value:"Last Year"},{label:"This Year",value:"This Year"},{label:"Yesterday",value:"Yesterday"},{label:"Today",value:"Today"},{label:"Custom",value:"Custom"}],sbt=({isShowlabel:r,timeGrainValue:t="",setTimeGrainValue:e,register:n,className:i="",isDisabled:a})=>{const[o,s]=k.useState({value:t,from:"",to:""});return k.useEffect(()=>{o.value&&o.value!=="Custom"?e(o.value):o.from&&o.to&&e(`${o.from} - ${o.to}`)},[e,o]),M(Vt,{children:M(aH,{className:i,buttonClass:"w-full",isDisabled:a,menuClass:"p-3",menuContainerClass:"w-full",button:M(Br,{label:r?"Time Grain":"",labelClass:"not-italic font-medium text-sm leading-[1.125rem] text-blue-h7 capitalize",inputClass:"cursor-pointer",type:"text",defaultValue:t,placeholder:"time range",register:n==null?void 0:n("timeGrain"),value:t,onChange:({target:{value:l}})=>s(u=>({...u,value:l})),isDisabled:!0,icon:M("span",{className:"absolute right-2 top-1.5 text-lg text-gray-300 flex justify-center items-center active:opacity-80 p-1 rounded-full",children:M(yy,{})})}),children:$("div",{className:"w-full p-2",children:[M(Zr,{options:obt,defaultValue:o.value,label:"Select Time Range",value:o.value,onChange:l=>{s(u=>({...u,value:l})),e("")}}),o.value==="Custom"?$(Vt,{children:[M(Br,{label:"From Date",type:"date",onChange:({target:{value:l}})=>s(u=>({...u,from:l}))}),M(Br,{label:"To Date",type:"date",onChange:({target:{value:l}})=>s(u=>({...u,to:l}))})]}):null]})})})},Td=r=>M("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687L4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z",clipRule:"evenodd"})}),Ay=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:$("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[M("circle",{cx:12,cy:12,r:10}),M("path",{d:"M12 8v8m-4-4h8"})]})}),lbt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10h-2a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8V2m6.78 1a.69.69 0 0 0-.48.2l-1.22 1.21l2.5 2.5L20.8 5.7c.26-.26.26-.7 0-.95L19.25 3.2c-.13-.13-.3-.2-.47-.2m-2.41 2.12L9 12.5V15h2.5l7.37-7.38l-2.5-2.5Z"})}),UT=()=>{const{mutate:r,isLoading:t,error:e}=$G(),{mutate:n}=VG();return{generateDatasetMetric:r,isGeneratingDataset:t,generateError:e,fetchColumnValues:n}},ubt=({timeGrainValue:r,isTimeStamp:t,col:e,database:n})=>{if(n===AD.Redshift||n.toUpperCase()==="POSTGRES"||n===AD.Snowflake||n==="Bigquery"){if(r==="Today")return t?`date_trunc('day', ${e}) = date_trunc('day', CURRENT_TIMESTAMP)`:`${e} = CURRENT_DATE`;if(r==="Last Week")return t?`extract(week from ${e}) = case when extract(week from current_date) = 1 then 4 else extract(week from current_date) - 1 end
|
|
253
|
+
AND extract(year from ${e}) = case when extract(week from current_date) = 1 and extract(month from current_date) = 1 then extract(year from current_date) -1 else extract(year from current_date) end
|
|
254
|
+
AND extract(month from ${e}) = case when extract(week from current_date) = 1 then case when extract(week from current_date) - 1 = 0 then 12 else extract(week from current_date) - 1 end else extract(month from current_date) end
|
|
255
|
+
`:`extract(week from ${e}) = case when extract(week from current_date) = 1 then 4 else extract(week from current_date) - 1 end
|
|
256
|
+
AND extract(year from ${e}) = case when extract(week from current_date) = 1 and extract(month from current_date) = 1 then extract(year from current_date) -1 else extract(year from current_date) end
|
|
257
|
+
AND extract(month from ${e}) = case when extract(week from current_date) = 1 then case when extract(week from current_date) - 1 = 0 then 12 else extract(week from current_date) - 1 end else extract(month from current_date) end
|
|
258
|
+
`;if(r==="This Week")return t?`extract(week from ${e}) = extract(week from current_date)
|
|
259
|
+
AND extract(year from ${e}) = extract(year from current_date) AND extract(month from ${e}) = extract(month from current_date)`:`extract(week from ${e}) = extract(week from current_date)
|
|
260
|
+
AND extract(year from ${e}) = extract(year from current_date) AND extract(month from ${e}) = extract(month from current_date)`;if(r==="Yesterday")return t?`date_trunc('day', ${e}) = date_trunc('day', CURRENT_TIMESTAMP - INTERVAL '1 day')`:`${e} = CURRENT_DATE - INTERVAL '1 day'`;if(r==="This Year")return t?`extract(year from ${e}) = extract(year from current_date)`:`extract(year from ${e}) = extract(year from current_date)`;if(r==="Last Year")return t?`extract(year from ${e}) = extract(year from current_date) - 1`:`extract(year from ${e}) = extract(year from current_date) - 1`;if(r==="Last Month")return t?`extract(month from ${e}) = case when extract(month from current_date) = 1 then 12 else extract(month from current_date) - 1 end AND extract(year from ${e}) = case when extract(month from current_date) = 1 then extract(year from current_date) - 1 else extract(year from current_date) end`:`extract(month from ${e}) = case when extract(month from current_date) = 1 then 12 else extract(month from current_date) - 1 end AND extract(year from ${e}) = case when extract(month from current_date) = 1 then extract(year from current_date) - 1 else extract(year from current_date) end`;if(r==="This Month")return t?`extract(month from ${e}) = extract(month from current_date) AND extract(year from ${e}) = extract(year from current_date)`:`extract(month from ${e}) = extract(month from current_date) AND extract(year from ${e}) = extract(year from current_date)`;const s=r.split(" - ")[0],l=r.split(" - ")[1];return t?`${e} BETWEEN '${s} 00:00:00' AND '${l} 23:59:59'`:`${e} BETWEEN '${s}' AND '${l}'`}if(r==="Today")return t?`DATE(${e}) = CURDATE()`:`${e} = CURDATE()`;if(r==="Last Week")return t?`WEEK(${e}) =
|
|
261
|
+
CASE
|
|
262
|
+
WHEN WEEK(${e}) = 1 THEN 4
|
|
263
|
+
ELSE WEEK(CURRENT_DATE) - 1
|
|
264
|
+
END
|
|
265
|
+
AND
|
|
266
|
+
MONTH(${e}) =
|
|
267
|
+
CASE
|
|
268
|
+
WHEN WEEK(CURRENT_DATE) = 1
|
|
269
|
+
THEN
|
|
270
|
+
CASE
|
|
271
|
+
WHEN MONTH(CURRENT_DATE) -1 = 0 THEN 12
|
|
272
|
+
ELSE MONTH(CURRENT_DATE) -1
|
|
273
|
+
END
|
|
274
|
+
ELSE MONTH(CURRENT_DATE)
|
|
275
|
+
END
|
|
276
|
+
AND YEAR(${e}) = CASE WHEN MONTH(CURRENT_DATE) = 1 AND WEEK(CURRENT_DATE) = 1 THEN YEAR(CURRENT_DATE) - 1
|
|
277
|
+
ELSE YEAR(CURRENT_DATE) END`:`WEEK(${e}) =
|
|
278
|
+
CASE
|
|
279
|
+
WHEN WEEK(${e}) = 1 THEN 4
|
|
280
|
+
ELSE WEEK(CURRENT_DATE) - 1
|
|
281
|
+
END
|
|
282
|
+
AND
|
|
283
|
+
MONTH(${e}) =
|
|
284
|
+
CASE
|
|
285
|
+
WHEN WEEK(CURRENT_DATE) = 1
|
|
286
|
+
THEN
|
|
287
|
+
CASE
|
|
288
|
+
WHEN MONTH(CURRENT_DATE) -1 = 0 THEN 12
|
|
289
|
+
ELSE MONTH(CURRENT_DATE) -1
|
|
290
|
+
END
|
|
291
|
+
ELSE MONTH(CURRENT_DATE)
|
|
292
|
+
END
|
|
293
|
+
AND YEAR(${e}) = CASE WHEN MONTH(CURRENT_DATE) = 1 AND WEEK(CURRENT_DATE) = 1 THEN YEAR(CURRENT_DATE) - 1
|
|
294
|
+
ELSE YEAR(CURRENT_DATE) END`;if(r==="This Week")return t?`WEEK(${e}) = WEEK(CURRENT_DATE)
|
|
295
|
+
AND
|
|
296
|
+
MONTH(${e}) = MONTH(CURRENT_DATE)
|
|
297
|
+
AND
|
|
298
|
+
YEAR(${e}) = YEAR(CURRENT_DATE)`:`WEEK(${e}) = WEEK(CURRENT_DATE)
|
|
299
|
+
AND
|
|
300
|
+
MONTH(${e}) = MONTH(CURRENT_DATE)
|
|
301
|
+
AND
|
|
302
|
+
YEAR(${e}) = YEAR(CURRENT_DATE)`;if(r==="Yesterday")return t?`DATE(${e}) = CURDATE() - INTERVAL 1 DAY`:`${e} = DATE(NOW() - INTERVAL 1 DAY)`;if(r==="This Year")return t?`YEAR(${e}) = YEAR(NOW())`:`YEAR(${e}) = YEAR(NOW())`;if(r==="Last Year")return t?`YEAR(${e}) = YEAR(NOW()) - 1`:`YEAR(${e}) = YEAR(NOW()) - 1`;if(r==="Last Month")return t?`MONTH(${e}) =
|
|
303
|
+
CASE
|
|
304
|
+
WHEN MONTH(NOW()) = 1 THEN 12
|
|
305
|
+
ELSE MONTH(NOW()) -1
|
|
306
|
+
END
|
|
307
|
+
AND
|
|
308
|
+
YEAR(${e}) =
|
|
309
|
+
CASE
|
|
310
|
+
WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
|
|
311
|
+
ELSE YEAR(NOW())
|
|
312
|
+
END`:`MONTH(${e}) =
|
|
313
|
+
CASE
|
|
314
|
+
WHEN MONTH(NOW()) = 1 THEN 12
|
|
315
|
+
ELSE MONTH(NOW()) -1
|
|
316
|
+
END
|
|
317
|
+
AND
|
|
318
|
+
YEAR(${e}) =
|
|
319
|
+
CASE
|
|
320
|
+
WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
|
|
321
|
+
ELSE YEAR(NOW())
|
|
322
|
+
END`;if(r==="This Month")return t?`MONTH(${e}) = MONTH(NOW()) AND YEAR(${e}) = YEAR(NOW())`:`MONTH(${e}) = MONTH(NOW()) AND YEAR(${e}) = YEAR(NOW())`;const i=r.split(" - ")[0],a=r.split(" - ")[1];return t?`${e} BETWEEN '${i} 00:00:00' AND '${a} 23:59:59'`:`${e} BETWEEN '${i}' AND '${a}'`},oH=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm5.6-5.225q.2 0 .375-.062q.175-.063.325-.213l5.675-5.675q.275-.275.275-.675t-.3-.7q-.275-.275-.7-.275q-.425 0-.7.275L10.6 13.4l-2.175-2.175q-.275-.275-.675-.275t-.7.3q-.275.275-.275.7q0 .425.275.7L9.9 15.5q.15.15.325.213q.175.062.375.062Z"})}),cbt=({children:r,className:t})=>M("section",{className:`flex items-center justify-end gap-5 w-full py-3 px-5 bg-white border-t border-slate-300 font-semibold text-lg ${t}`,children:r});var Md=st.default.memo(cbt);const fbt=({dateTimeColumnList:r,columnList:t,database:e,companyId:n,tableName:i,setData:a,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c})=>{const[f,h]=k.useState([]),[d,v]=k.useState(""),[p,g]=k.useState({value:"",label:""}),[m,y]=k.useState([]),[_,b]=k.useState([]),[S,x]=k.useState(""),[w,C]=k.useState(""),[T,D]=k.useState([]),[A,P]=k.useState([]),[I,O]=k.useState(!1),[E,R]=k.useState(!1),[z,B]=k.useState(!1),[Y,W]=k.useState(!1),[et,V]=k.useState(!1),[H,G]=k.useState(!1),[j,tt]=k.useState([]),[nt,rt]=k.useState(""),[vt,ft]=k.useState({value:"",label:""}),[lt,mt]=k.useState({value:"",label:""}),[At,Ct]=k.useState({value:"",label:""}),[F,X]=k.useState({value:"10",label:"10"}),[Z,ut]=k.useState({value:"",label:""}),[ht,ot]=k.useState({value:"",label:""}),[gt,ve]=k.useState({value:"",label:""}),[Zt,ts]=k.useState({value:"",label:""}),[dn,Ei]=k.useState({value:"",label:""});k.useEffect(()=>{t.length&&(D([]),h([]),ft(t[0]),y([]),mt(t[0]),ut(t[0]),x(""),Ct(t[0]),b([]),V(!1),G(!1),v(""),C(""))},[t]),k.useEffect(()=>{r.length?g({value:r[0].name,label:r[0].name}):g({value:"",label:""})},[r]);const{generateDatasetMetric:da,isGeneratingDataset:Ri,generateError:es,fetchColumnValues:Qe}=UT();k.useEffect(()=>{Z.value&&(P([]),Ei({value:"",label:""}),Qe({companyId:n,tableName:i,columnName:Z.value},{onSuccess(Pt){var hr;const Le=(hr=Pt.fetchColumnData)==null?void 0:hr.data;if(Le!=null&&Le.length){const oi=Le.map(Kr=>({value:(Kr==null?void 0:Kr.value)||"",label:(Kr==null?void 0:Kr.label)||""}));tt(oi)}}}))},[Z]);const Mc=!f.length&&!m.length,Vl=!r.length,Dd=!p.value,rs=!!f.length,ee=!!m.length,we=e==="Bigquery",or=e==="MySql",Tn=e==="MongoDB",Mn=Zt.value==="IS NULL"||Zt.value==="IS NOT NULL",zr=Zt.value==="IN"||Zt.value==="NOT IN",YT=Mn?!0:zr?!!A.length:!!dn.value,qT=m.length?!1:!gt.value;return k.useEffect(()=>{var Pt;if(d&&p.value&&r.length){const Le=(Pt=r.find(va=>va.name===p.value))==null?void 0:Pt.datatype,hr=(Le==null?void 0:Le.toLowerCase())!=="date",oi=p.value,Kr=ubt({timeGrainValue:d,isTimeStamp:hr,col:we||or?oi:Tn?`\`${oi}\``:`"${oi}"`,database:e});C(Kr)}},[d,p]),k.useEffect(()=>{m.length&&(V(!1),D([]),x(""))},[m]),k.useEffect(()=>{Mn&&Ei({value:"",label:""})},[Zt]),k.useEffect(()=>{u&&c(T)},[T,u]),$("div",{className:Se["form-container"],children:[!Vl&&$("div",{className:Se["field-container"],children:[M(St,{variant:"h1",styleClass:"custom",className:Se["field-label"],children:"Time Filter"}),M("div",{className:Se["field-wrapper"],children:$("div",{className:Se["field-inner-container"],children:[M(cn,{onChange:g,selectedOption:p,options:r.map(({name:Pt})=>({value:Pt,label:Pt})),isDisabled:Vl,labelVariant:"static",label:"Time Column"}),M(sbt,{setTimeGrainValue:v,timeGrainValue:d,isShowlabel:!0,isDisabled:Dd}),d&&$(Nt,{type:"button",variant:"custom",className:Se["field-value"],onClick:()=>v(""),children:[d," ",M(Td,{})]})]})})]}),!ee&&$("div",{className:Se["field-container"],children:[$(St,{variant:"h1",styleClass:"custom",className:Se["field-label"],children:["Metric Creation",$("span",{className:"group cursor-pointer",children:[M(uy,{}),M("span",{className:"bg-black hidden group-hover:inline-block bg-opacity-70 text-white text-xs rounded px-2 py-0.5 absolute top-4 left-1/2 -translate-x-1/2 z-50 text-center w-[250px] lowercase",children:"configure metric columns"})]})]}),M("div",{className:Se["field-wrapper"],children:$("div",{className:Se["field-inner-container"],children:[M(St,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),$(Nt,{type:"button",variant:"secondary",className:Se["field-add-btn"],onClick:()=>{O(!0),rt("")},isDisabled:ee,children:[M(Ay,{})," Add Aggregate Column"]}),M("div",{className:Se["field-value-container"],children:f.map(Pt=>$(Nt,{type:"button",variant:"custom",className:Se["field-value"],onClick:()=>h(Le=>Le.filter(hr=>hr.as!==Pt.as)),children:[Pt.as," ",M(Td,{})]},Pt.as))}),$(Zo,{headerTitle:vt.value&&ht.value?`${ht.value}(${vt.value})`:"Create metric",isOpen:I,onClose:()=>O(!1),children:[$("div",{className:"w-80 flex flex-col gap-4 p-5",children:[M(cn,{onChange:ft,selectedOption:vt,options:t,labelVariant:"static",label:"Columns"}),M(cn,{onChange:ot,selectedOption:ht,options:w3,labelVariant:"static",label:"Aggregate"}),M(Br,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Pt=>rt(Pt.target.value)})]}),M(Md,{children:M(Nt,{type:"button",variant:"primary",size:"small",className:"disabled:cursor-not-allowed",isDisabled:!ht.value||!vt.value,onClick:()=>{h(Pt=>[...Pt,{value:`${ht.value}(${we?`${vt.value}`:Tn?`\`${vt.value}\``:`"${vt.value}"`})`,as:we?nt||"_result":nt||`${ht.value}(${vt.value})`}]),O(!1)},children:"Save"})})]}),M(St,{variant:"p",styleClass:"font-14",children:"Group By"}),M(HT,{options:t,onChange:D,value:T,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!rs&&$("div",{className:Se["field-container"],children:[$(St,{variant:"h1",styleClass:"custom",className:Se["field-label"],children:["Columns",$("span",{className:"group cursor-pointer",children:[M(uy,{}),M("span",{className:"bg-black hidden group-hover:inline-block bg-opacity-70 text-white text-xs rounded px-2 py-0.5 absolute top-4 left-1/2 -translate-x-1/2 z-50 text-center w-[250px] lowercase",children:"select columns for raw records query"})]})]}),M("div",{className:Se["field-wrapper"],children:$("div",{className:Se["field-inner-container"],children:[M(St,{variant:"p",styleClass:"font-14",children:"Select Columns"}),$(Nt,{type:"button",variant:"secondary",className:Se["field-add-btn"],onClick:()=>{R(!0),rt("")},isDisabled:rs,children:[M(Ay,{})," Add Column"]}),M("div",{className:Se["field-value-container"],children:m.map(Pt=>$(Nt,{type:"button",variant:"custom",className:Se["field-value"],onClick:()=>y(Le=>Le.filter(hr=>hr.as!==Pt.as)),children:[Pt.as," ",M(Td,{})]},Pt.as))}),$(Zo,{headerTitle:lt.value?`${lt.value}`:"Select Column",isOpen:E,onClose:()=>R(!1),children:[$("div",{className:"w-80 flex flex-col gap-4 p-5",children:[M(cn,{onChange:mt,selectedOption:lt,options:t,labelVariant:"static",label:"Columns"}),M(Br,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Pt=>rt(Pt.target.value)})]}),M(Md,{children:M(Nt,{type:"button",variant:"primary",size:"small",className:"disabled:cursor-not-allowed",isDisabled:!lt.value,onClick:()=>{m.find(Pt=>Pt.as===nt)||y(Pt=>[...Pt,{value:`${lt.value}`,as:nt||`${lt.value}`}]),R(!1)},children:"Save"})})]})]})})]}),$("div",{className:Se["field-container"],children:[M(St,{variant:"h1",styleClass:"custom",className:Se["field-label"],children:"category filters"}),M("div",{className:Se["field-wrapper"],children:$("div",{className:Se["field-inner-container"],children:[M(St,{variant:"p",styleClass:"font-14",children:"Filter by"}),$(Nt,{type:"button",variant:"secondary",className:Se["field-add-btn"],onClick:()=>W(!0),children:[M(Ay,{})," Add Filter Category"]}),M("div",{className:Se["field-value-container"],children:_.map(Pt=>$(Nt,{type:"button",variant:"custom",className:Se["field-value"],onClick:()=>b(Le=>Le.filter(hr=>hr!==Pt)),children:[Pt," ",M(Td,{})]},Pt))}),$(Zo,{headerTitle:Z.value&&Zt.value?`${Z.value} ${Zt.value} ${zr?`(${A.map(Pt=>`'${Pt}'`).join(", ")})`:`${dn.value?`'${dn.value}'`:""}`}`:"Add Filter",isOpen:Y,onClose:()=>W(!1),children:[$("div",{className:"w-96 flex flex-col gap-4 p-5",children:[M(cn,{onChange:ut,selectedOption:Z,options:t,labelVariant:"static",label:"Column"}),M(cn,{onChange:ts,selectedOption:Zt,options:CT,labelVariant:"static",label:"Operator"}),zr?$("div",{className:"h-8 w-full flex flex-col gap-2",children:[M(St,{variant:"p",styleClass:"font-14",children:"Filter Value"}),M(HT,{options:j,onChange:P,value:A,name:"Filters",placeHolder:"Select Multiple Filters"})]}):M(cn,{onChange:Ei,selectedOption:dn,options:j,isDisabled:Mn,labelVariant:"static",label:"Filter Value"})]}),M(Md,{children:M(Nt,{type:"button",variant:"primary",size:"small",isDisabled:!Z.value||!Zt.value||!YT,className:"disabled:cursor-not-allowed",onClick:()=>{b(Pt=>[...Pt,`${we||or?`${Z.value}`:Tn?`\`${Z.value}\``:`"${Z.value}"`} ${Zt.value} ${zr?`(${A.map(Le=>`'${Le}'`).join(", ")})`:`${dn.value?`'${dn.value}'`:""}`}`]),W(!1)},children:"Save"})})]}),M(St,{variant:"p",styleClass:"font-14",children:"Sort By"}),$(Nt,{type:"button",variant:"secondary",className:Se["field-add-btn"],onClick:()=>B(!0),children:[S?M(lbt,{}):M(Ay,{})," ",S?"Edit":"Add"," Sort Category"]}),S&&$(Nt,{type:"button",variant:"custom",className:Se["field-value"],onClick:()=>x(""),children:[S," ",M(Td,{})]}),$(Zo,{headerTitle:m.length?At.value?`${At.value}`:"Create sort":At.value&>.value?`${gt.value}(${At.value})`:"Create sort",isOpen:z,onClose:()=>B(!1),children:[$("div",{className:"w-80 flex flex-col gap-4 p-5",children:[M(cn,{onChange:Ct,selectedOption:At,options:t,labelVariant:"static",label:"Column"}),!m.length&&M(cn,{onChange:ve,selectedOption:gt,options:w3,labelVariant:"static",label:"Aggregate"})]}),M(Md,{children:M(Nt,{type:"button",variant:"primary",size:"small",isDisabled:!At.value||qT,className:"disabled:cursor-not-allowed",onClick:()=>{m.length?x(`${we||or?`${At.value}`:`${At.value}`}`):x(`${gt.value}(${we||or?`${At.value}`:Tn?`\`${At.value}\``:`"${At.value}"`})`),B(!1)},children:"Save"})})]})]})})]}),M(cn,{onChange:X,options:c0t,selectedOption:F,labelVariant:"static",label:"Row Limit"}),!m.length&&!!r.length&&$(St,{styleClass:"font-14",variant:"p",className:"w-full flex flex-row items-center gap-2",children:[M(Nt,{type:"button",variant:"custom",onClick:()=>V(Pt=>!Pt),isDisabled:!p.value||!!m.length,children:et?M(oH,{className:"text-blue-700"}):M(wT,{})}),"Include Time"]}),$(St,{styleClass:"font-14",variant:"p",className:"w-full flex flex-row items-center gap-2",children:[M(Nt,{type:"button",variant:"custom",onClick:()=>G(Pt=>!Pt),children:H?M(oH,{className:"text-blue-700"}):M(wT,{})}),"Sort Descending"]}),M(Nt,{type:"button",variant:"primary",className:"p-2 mt-2 disabled:cursor-not-allowed",isDisabled:Ri||Mc,onClick:()=>{o(""),s(!0),a([]),l(""),Ri&&s(!0),da({companyId:n,userInputs:{columns:m.map(Pt=>we||or?`${Pt.value} AS ${Pt.as} `:Tn?`\`${Pt.value}\` AS "${Pt.as}"`:`"${Pt.value}" AS "${Pt.as}"`),dimensions:we||or?T:Tn?T.map(Pt=>`\`${Pt}\``):T.map(Pt=>`"${Pt}"`),metrics:f.map(Pt=>we||or?`${Pt.value} AS ${Pt.as}`:`${Pt.value} AS "${Pt.as}"`),sort:S,isSortDescending:H,filters:_,tableName:i,rowLimit:F.value,timeFilter:{filter:w,column:we||or?p.value:Tn?`\`${p.value}\``:`"${p.value}"`,isInclude:et}}},{onSuccess(Pt){var Kr,va,Ly;const Le=(Kr=Pt.generateDatasetMetrics)==null?void 0:Kr.error,hr=(va=Pt.generateDatasetMetrics)==null?void 0:va.result,oi=(Ly=Pt.generateDatasetMetrics)==null?void 0:Ly.query;(Le||es)&&(o(Le.message||v8),s(!1),a([]),l("")),hr&&oi&&(o(""),s(!1),a(Array.isArray(hr)?hr:[]),l(oi))}})},children:"Generate"})]})};var hbt=st.default.memo(fbt),sH={container:"_container_1co98_1",header:"_header_1co98_5"};const dbt=({dateTimeColumnList:r,columnList:t,database:e,companyId:n,tableName:i,setData:a,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f})=>$("div",{className:sH.container,children:[$("div",{className:sH.header,children:["Data",c&&$(Nt,{type:"button",variant:"custom",onClick:()=>c(!u),className:`${u&&"text-blue-700"} text-sm`,children:[u?"Disable":"Enable"," Drill down"]})]}),M(hbt,{dateTimeColumnList:r,columnList:t,database:e,companyId:n,tableName:i,setData:a,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f})]});var vbt=st.default.memo(dbt);const pbt=({id:r,label:t,placeholder:e,rows:n,cols:i,resizable:a=!0,register:o,error:s,defaultValue:l,value:u,onFocus:c,onBlur:f,className:h})=>$("div",{className:h,children:[M("label",{htmlFor:r,className:"label",children:t}),M("textarea",{id:r,name:r,rows:n,cols:i,placeholder:e,className:ya("textarea",`${a?null:"resizable"}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&M(A3,{message:s.message})]}),gbt=({enabled:r,onChange:t,label:e,className:n,placeholder:i,labelClassName:a,defaultEnabled:o})=>$(Sy.Group,{as:"span",className:`flex flex-col w-36 ${n}`,children:[e?M(Sy.Description,{className:a,children:e}):null,$("div",{className:"flex justify-center items-center",children:[M(Sy,{checked:r,onChange:t,className:`${r?"bg-blue-h4":"bg-gray-400"} relative inline-flex h-6 w-9 items-center rounded-full`,defaultChecked:o,children:M("span",{className:`${r?"translate-x-4":"translate-x-1"} inline-block h-4 w-4 transform rounded-full bg-white transition`})}),M(Sy.Label,{className:`ml-2 font-semibold cursor-pointer ${r?"text-blue-h4":"text-gray-400"}`,children:i})]})]});var mbt=st.default.memo(gbt);const ybt=({onSubmit:r,defaultValues:t,onCancel:e,isEmbedded:n,dashboardIds:i,onDashboardChange:a,companyId:o})=>{var p,g;const{register:s,handleSubmit:l}=bT(),[u,c]=k.useState((p=t==null?void 0:t.isLive)!=null?p:!1),f=l(m=>{r({...m,isLive:u})}),{data:h}=t8({companyId:o}),d=h==null?void 0:h.externalDashboards,v=(g=d==null?void 0:d.filter(m=>m.id===i[0]).map(m=>({value:m.id,label:m.name})))!=null?g:[];return $("form",{className:"bg-white w-[500px] rounded-lg m-auto",onSubmit:f,children:[$("div",{className:"p-5",children:[M("div",{className:"mt-2",children:M(HT,{label:"Dashboards",options:v,name:"dashboards",value:i,onChange:a})}),M(Br,{name:"name",type:"text",placeholder:"What is the name of metric?",label:"Metric Name",register:s("name",{required:!0}),defaultValue:t==null?void 0:t.name}),M(Br,{name:"name",type:"text",placeholder:"Unique Id to identify metric",label:"Metric ID",register:s("metricId",{required:!0,disabled:!!(t!=null&&t.metricId)}),defaultValue:t==null?void 0:t.metricId}),M(pbt,{className:"mt-2",id:"desc",placeholder:"What is the name of metric?",label:"Description",rows:5,register:s("description"),defaultValue:t==null?void 0:t.description}),!n&&M(mbt,{className:"mt-2",labelClassName:"mb-2 text-sm",enabled:u,onChange:c,label:"Publish Type",placeholder:u?"LIVE MODE":"TEST MODE",defaultEnabled:t==null?void 0:t.isLive})]}),$(Md,{children:[M(Nt,{type:"reset",variant:"secondary",className:"p-2 min-w-[60px] border flex justify-center items-center bg-gray-100",onClick:e,size:"default",children:"Cancel"}),M(Nt,{type:"submit",variant:"primary",size:"small",className:"disabled:cursor-not-allowed disabled:opacity-50",isDisabled:!v.length||!i.length,children:"Save"})]})]})};var _bt=st.default.memo(ybt);const bbt=({xAxis:r,yAxisList:t,chartType:e,step:n,measure:i,sankeyValues:a,singleValue:o,margins:s,legendSettings:l,labelSettings:u,axisSettings:c})=>e===Be.funnel?{xAxis:"",yAxisList:[],chartType:e,step:n,measure:i,sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c}:e===Be.gauge?{xAxis:"",yAxisList:[],chartType:e,step:"",measure:i,sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c}:e===Be.singleValue?{xAxis:"",yAxisList:[],chartType:e,step:"",measure:"",sankeyValues:[],singleValue:o,margins:s,legendSettings:l,labelSettings:u,axisSettings:c}:e===Be.sankey?{xAxis:"",yAxisList:[],chartType:e,step:"",measure:"",sankeyValues:a,singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c}:{xAxis:r,yAxisList:t,chartType:e,step:"",measure:"",sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c},xbt=({companyIntegrationId:r,selectedColumns:t,query:e,metricQuery:n,integrationName:i,outputColumns:a,xAxis:o,yAxisList:s,chartType:l,step:u,measure:c,sankeyValues:f,singleValue:h,margins:d,legendSettings:v,labelSettings:p,axisSettings:g,setError:m,clientId:y,companyId:_,mode:b,timeGrain:S,dashboardIds:x,isEnableGroupBy:w,groupBy:C,selectedGroupBy:T})=>{const D=zG();return{createExternalMetric:P=>{D.mutate({companyId:_,companyIntegrationId:r,description:P.description,inputFields:t,metricId:P.metricId,name:P.name,query:e,metricQuery:n,integrationName:i,outputColumns:a,createdBy:"external user",isLive:b||P.isLive,chartOptions:bbt({xAxis:o,yAxisList:s,chartType:l,step:u,measure:c,sankeyValues:f,singleValue:h,margins:d,legendSettings:v,labelSettings:p,axisSettings:g}),clientId:y||null,isCreatedByClient:!!y,timeGrain:S||null,externalDashboardIds:x.map(I=>({externalDashboardId:I})),isEnableGroupBy:w,groupBy:C!=null?C:{},selectedGroupBy:T},{onSuccess:I=>{var O;(O=I.insert_externalMetrics_one)!=null&&O.id&&window.location.reload()},onError:()=>{m&&m("metric id already exists")}})}}},Sbt=({clientId:r,companyId:t,mode:e,externalDashboardId:n})=>{var rs;const[i,a]=k.useState(!1),[o,s]=k.useState(""),[l,u]=k.useState(),[c,f]=k.useState([]),[h,d]=k.useState(""),[v,p]=k.useState(!1),[g,m]=k.useState([]),[y,_]=k.useState(),[b,S]=k.useState(!1),[x,w]=k.useState(!1),[C,T]=k.useState(!1),[D,A]=k.useState({value:"",label:""});k.useEffect(()=>{g.length&&_({column:g[0]})},[g]);const{data:P}=YG({companyId:t},{enabled:!!t}),I=k.useMemo(()=>{var ee;return((ee=P==null?void 0:P.companySubsetTables[0])==null?void 0:ee.tableList)||[]},[P==null?void 0:P.companySubsetTables]),O=k.useMemo(()=>(I==null?void 0:I.map(ee=>({value:ee.tableName,label:ee.tableName})))||[],[I]),E=k.useMemo(()=>I==null?void 0:I.find(ee=>ee.tableName===D.value),[D.value,I]),R=k.useMemo(()=>{var ee;return((ee=E==null?void 0:E.columns)==null?void 0:ee.map(({name:we})=>({value:we,label:we})))||[]},[E]);k.useEffect(()=>{O!=null&&O.length&&A(O[0])},[O]);const z=k.useMemo(()=>{var ee;return((ee=E==null?void 0:E.columns)==null?void 0:ee.filter(({datatype:we})=>M3.includes(we.toLowerCase())))||[]},[E]),[B,Y]=k.useState(),[W,et]=k.useState("bar"),[V,H]=k.useState(),[G,j]=k.useState(),[tt,nt]=k.useState(),[rt,vt]=k.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[ft,lt]=k.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[mt,At]=k.useState({axis:"left",show:!1,position:"hidden"}),[Ct,F]=k.useState({axis:"left"}),[X]=k.useState(),[Z,ut]=k.useState(),[ht,ot]=k.useState(),[gt,ve]=k.useState(),[Zt,ts]=k.useState(),{datasets:dn,funnelData:Ei,labels:da,sankeyData:Ri,singleValueData:es}=J4({data:v?c:l,measure:gt,sankeyValues:tt,singleValue:ht,step:G,xAxis:V,yAxisList:Z});k.useEffect(()=>{if(c.length&&v){const we=(or=>{const Tn=Object.entries(or).filter(([,zr])=>parseInt(zr,10)),Mn=Object.entries(or).filter(([,zr])=>typeof zr=="string"&&!parseInt(zr,10));return{numberKeys:Tn.map(([zr])=>zr),stringKeys:Mn.map(([zr])=>zr)}})(c[0]);H(we.stringKeys[0]),ut(we.numberKeys),j(we.stringKeys[0]),ve(we.numberKeys[0])}},[c]),k.useEffect(()=>{if((l==null?void 0:l.length)&&!v){const ee=Object.keys(l[0]);H(ee[0]),ut(ee.slice(1))}},[l,v]);const{data:Qe}=GG({companyId:t});k.useEffect(()=>{const ee=Qe==null?void 0:Qe.companyIntegrations[0];ee&&Y({id:ee.id,name:ee.name})},[Qe]);const{createExternalMetric:Mc}=xbt({query:h,xAxis:V,chartType:W,yAxisList:Z,step:G,measure:gt,sankeyValues:tt,singleValue:ht,companyIntegrationId:B==null?void 0:B.id,integrationName:B==null?void 0:B.name,margins:rt,legendSettings:ft,labelSettings:mt,axisSettings:Ct,metricQuery:X,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:t,mode:e,dashboardIds:[n],isEnableGroupBy:v,groupBy:y,selectedGroupBy:g}),{mutate:Vl}=i8();k.useEffect(()=>{D.value&&Vl({companyId:t,tableName:D.value,limit:10},{onSuccess(ee){var or;const we=(or=ee.previewTable)==null?void 0:or.data;ts(we?[we]:void 0)}})},[D]),k.useEffect(()=>{(l==null?void 0:l.length)&&g.length&&ua(l,[g[0].split(".")[2]],g,f)},[l]);const Dd=ee=>{if((y==null?void 0:y.column)&&ee&&ee!=="undefined"){if(g.lastIndexOf(y.column)!==g.length-1){const we=g.indexOf(y.column),or=y.column.split(".")[2];_({column:g[we+1],parentColumn:{column:y.column,value:ee}}),ua(l==null?void 0:l.filter(Tn=>Tn[or]===ee),[g[we+1].split(".")[2]],g,f)}g.lastIndexOf(y.column)===g.length-1&&(_({column:g[0]}),ua(l,[g[0].split(".")[2]],g,f))}else _({column:g[0]}),ua(l,[g[0].split(".")[2]],g,f)};return k.useEffect(()=>{c.length===0&&v&&g.length&&(l==null?void 0:l.length)&&(_({column:g[0]}),ua(l,[g[0].split(".")[2]],g,f))},[c,v,g]),$(Vt,{children:[M(Nt,{type:"button",variant:"primary",size:"large",onClick:()=>S(!0),children:"Create Metric"}),M(Zo,{headerTitle:"Create Metric",isOpen:b,onClose:()=>S(!1),customHeader:M(Nyt,{Heading:"Create Metric",setShowMetricCreateModal:S,isDisableSqlBtn:!h,isDisableSaveBtn:!(gt!=null&>.length)&&!((rs=Z==null?void 0:Z.filter(ee=>ee))!=null&&rs.length)&&!ht,setShowSqlModal:w,setShowSaveMetricModal:T}),children:$("div",{className:t3["modal-container"],children:[M(g0t,{setselectTable:A,selectTable:D,tableList:O,columnList:(E==null?void 0:E.columns)||[]}),M(vbt,{dateTimeColumnList:z,columnList:R,database:(B==null?void 0:B.name)||"",companyId:t,tableName:D.value,setData:u,setError:s,setQuery:d,setLoading:a,isEnableGroupBy:v,setEnableGroupBy:p,setSelectedGroupBy:m}),M(nbt,{data:v?c:l,error:o,isLoading:i,labels:da,funnelData:Ei,chartType:W,datasets:dn,setChartType:et,setXAxis:H,setYAxisList:ut,xAxis:V,setMeasure:ve,setStep:j,step:G,measure:gt,setSankeyValues:nt,sankeyData:Ri,previewTableDataList:Zt,singleValue:ht,setSingleValue:ot,singleValueData:es,setMargins:vt,margins:rt,legendSettings:ft,setLegendSettings:lt,labelSettings:mt,setLabelSettings:At,axisSettings:Ct,setAxisSettings:F,updateGroup:Dd,isEnableGroupBy:v})]})}),M(Zo,{headerTitle:"Generated Query",isOpen:x,onClose:()=>w(!1),children:M("div",{className:t3["query-modal"],children:h})}),M(Zo,{isOpen:C,onClose:()=>T(!1),headerTitle:"Save To Dashboard",children:M(_bt,{onCancel:()=>T(!1),onSubmit:Mc,dashboardIds:[n],onDashboardChange:()=>{},companyId:t,isEmbedded:!0})})]})},wbt=r=>{var p,g;const{data:t,isLoading:e}=r8({id:r},{enabled:!!r}),n=t==null?void 0:t.guestTokens_by_pk,i=n!=null&&n.params?JSON.parse(n.params):{},a=(p=i.dashboard)==null?void 0:p.id,o=n==null?void 0:n.companyId,s=n==null?void 0:n.clientId,l=(g=i==null?void 0:i.dashboard)==null?void 0:g.isLive,u=i==null?void 0:i.rlsSettings,{data:c,isLoading:f}=jG({where:{externalDashboard:{externalDashboardId:{_eq:a}}}},{enabled:!!a}),{data:h,isLoading:d}=QG({externalDashboardId:a}),v=c==null?void 0:c.externalDashboardMetrics;return{isLoading:e||f||d,data:{clientId:s,companyId:o,mode:l,externalDashboardMetrics:v,externalDashboard:h==null?void 0:h.externalDashboards[0],rlsSettings:u}}};var cxt="";const Cbt=r=>C3.includes(r.toLowerCase())?"number":T3.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":D3.includes(r.toLowerCase())?"boolean":"text",Tbt=({companyId:r,filter:t,onChange:e,selectedOption:n,autoSelected:i=!0,...a})=>{const[o,s]=k.useState([]),{fetchColumnValues:l}=UT();return k.useEffect(()=>{l({companyId:r,tableName:t.tableName,columnName:t.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[t.tableName,t.columnName,r]),k.useEffect(()=>{o.length&&o[0]&&i&&e(o[0])},[o.length,o[0],i,t.columnName]),M(cn,{onChange:e,selectedOption:t.defaultValue?{label:t.defaultValue,value:t.defaultValue}:n,isDisabled:!!t.defaultValue,options:o,label:t.columnName,...a})},Mbt=st.default.memo(({filter:r,companyId:t,autoSelected:e,onChange:n,selectedOptions:i,...a})=>{const[o,s]=k.useState([]),{fetchColumnValues:l}=UT();return k.useEffect(()=>{l({companyId:t,tableName:r.tableName,columnName:r.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[r.tableName,r.columnName,t]),k.useEffect(()=>{o.length&&o[0]&&e&&n([o[0]])},[o.length,o[0],e,r.columnName]),M(n0t,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:i,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...a})});var Dbt=st.default.memo(Tbt);const lH=r=>["IN","NOT IN"].includes(r),Py=r=>["IS NULL","IS NOT NULL"].includes(r),Abt=({filter:r,onChange:t,isResetted:e,companyId:n,tableName:i})=>{const[a,o]=k.useState({value:"",label:""}),[s,l]=k.useState({value:"",label:""}),[u,c]=k.useState([]),f=k.useMemo(()=>Cbt(r.dataType),[r.dataType]);return k.useEffect(()=>{!a.value||s.value!==""&&u.length||t({column:r.name,operator:a.value,value:Py(a.value)?null:s.value||u.map(h=>h.value)})},[a,s.value,u]),k.useEffect(()=>{!e||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[e]),M(Vt,{children:$(aH,{buttonClass:"flex border rounded-md px-2 py-1.5 items-center justify-between w-44",menuClass:"p-3 w-60",position:"bottom-left",menuContainerClass:"w-full",button:$(Vt,{children:[M("span",{className:"truncate",children:r.name}),M("span",{className:"text-lg text-gray-400",children:M(yy,{})})]}),children:[M(St,{variant:"p",styleClass:"font-14",className:"mb-3",children:r.name}),M(cn,{label:"Operator",labelVariant:"static",selectedOption:a,onChange:h=>o(h),options:CT}),a.value&&!Py(a.value)?M(Vt,{children:f==="boolean"?M(cn,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:"mt-3"}):M(Vt,{children:lH(a.value)?M(Mbt,{selectedOptions:u,onChange:c,filter:{tableName:i,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:"mt-3",autoSelected:!1}):M(Dbt,{selectedOption:s,onChange:l,filter:{tableName:i,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:"mt-3",autoSelected:!1})})}):null]})})};var Pbt=st.default.memo(Abt);const Lbt=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M20 8c-1.403-2.96-4.463-5-8-5a9 9 0 1 0 0 18a9 9 0 0 0 9-9m0-9v6h-6"})}),uH=r=>M("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M7 6h10l-5.01 6.3L7 6zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"})}),Ibt=r=>M("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:M("path",{fill:"currentColor",d:"M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"})}),Obt=r=>lH(r.operator)?r.value.map(t=>["true","false"].includes(t)?t==="true":!Number.isNaN(t)&&Number(t)?Number(t):`'${t}'`):Py(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,Ebt=({filters:r,onApply:t,companyId:e})=>{const[n,i]=k.useState([]);return M(Vt,{children:$("div",{className:"border rounded m-2.5 mb-5 p-5",children:[$("form",{className:"flex gap-5 items-center flex-wrap",onSubmit:s=>{s.preventDefault();const l=n.map(u=>{const c={column:u.column,operator:u.operator},f=Obt({operator:u.operator,value:u.value});return f!=null&&Object.assign(c,{...c,value:f}),c});t({tableName:r[0].tableName,filters:l})},onReset:()=>{i([]),t({tableName:"",filters:[]})},children:[M(St,{variant:"p",styleClass:"font-18",className:"font-semibold mr-5",children:"Filters:"}),r[0].columns.map(s=>M(Pbt,{tableName:r[0].tableName,filter:s,isResetted:!n.find(l=>l.column===s.name),onChange:l=>i(u=>{const c=u.findIndex(h=>h.column===l.column);if(c===-1)return[...u,l];const f=[...u];return f[c]=l,f}),companyId:e},s.name)),$(Nt,{type:"submit",variant:"outlined",className:"ml-auto p-2.5 flex justify-center items-center gap-2 hover:bg-slate-100 active:bg-transparent",children:[M(uH,{})," Apply Filters"]}),$(Nt,{type:"reset",variant:"secondary",className:"text-blue-h4 active:bg-transparent flex justify-center items-center gap-2 p-2 rounded-lg px-2.5",children:[M(Lbt,{})," Reset Filters"]})]}),n.length?M("ul",{className:"flex flex-wrap gap-2 mb-2 mt-5",children:n.map(s=>{var l;return $("li",{className:"bg-slate-100 rounded-full font-semibold py-2 px-5 mr-2 flex items-center justify-evenly gap-1",children:[s.column,M("span",{className:"font-extralight",children:((l=CT.find(u=>u.value===s.operator))==null?void 0:l.label)||""}),Py(s.operator)?null:M(Vt,{children:Array.isArray(s.value)?`[${s.value.map(u=>u).join(",")}]`:s.value}),M(Nt,{type:"button",variant:"custom",className:"ml-1 text-xl p-1",onClick:()=>i(u=>u.filter(c=>c.column!==s.column)),children:M(Ibt,{})})]},s.column)})}):null]})})};var Rbt=st.default.memo(Ebt);const kbt=new VH,Nbt=st.default.memo(({token:r})=>{var s,l;const{data:t,isLoading:e}=wbt(r),[n,i]=k.useState(!1),[a,o]=k.useState({tableName:"",filters:[]});return M(Vt,{children:$("div",{className:"embedDashboard-container",children:[((s=t.externalDashboard)==null?void 0:s.id)&&!e&&$(Vt,{children:[$("div",{className:"embedDashboard-header",children:[t.externalDashboard.filters.length?M(Nt,{type:"button",variant:"custom",className:"p-2 border rounded-md text-xl hover:bg-slate-100 active:bg-transparent mr-5",onClick:()=>i(u=>!u),children:M(uH,{color:"#182C60"})}):null,M(Sbt,{clientId:t.clientId,companyId:t.companyId,mode:t.mode,externalDashboardId:t.externalDashboard.id})]}),$("div",{className:"embedDashboard-wrapper",children:[t.externalDashboard.filters.length&&n?M(Rbt,{companyId:t.companyId,filters:t.externalDashboard.filters,onApply:u=>o(u)}):null,M(Oyt,{client:t.clientId,company:t.companyId,isLiveMode:t.mode,params:Array.isArray(t.rlsSettings)?t.rlsSettings:[],externalDashboardMetrics:t.externalDashboardMetrics,isMetricListLoading:e,globalFilters:a})]})]}),e&&M("div",{className:"alt-container",children:M(bc,{style:{width:"50px",height:"50px",color:"blue"}})}),!e&&!((l=t.externalDashboard)!=null&&l.id)&&M("div",{className:"alt-container",children:"Invalid token or Dashboard id"})]})})}),Bbt=st.default.memo(({token:r})=>M(YH,{client:kbt,children:M(Nbt,{token:r})}));Za.Dashboard=Bbt,Object.defineProperties(Za,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|