diff --git a/hook/usePagination.js b/packageA/hook/usePagination.js similarity index 96% rename from hook/usePagination.js rename to packageA/hook/usePagination.js index 1c1cda8..3f66b54 100644 --- a/hook/usePagination.js +++ b/packageA/hook/usePagination.js @@ -1,173 +1,174 @@ -import { - ref, - reactive, - watch, - isRef, - nextTick -} from 'vue' - -export function usePagination( - requestFn, - transformFn, - options = {} -) { - const list = ref([]) - const loading = ref(false) - const error = ref(false) - const finished = ref(false) - const firstLoading = ref(true) - const empty = ref(false) - - const { - pageSize = 10, - search = {}, - autoWatchSearch = false, - debounceTime = 300, - autoFetch = false, - - // 字段映射 - dataKey = 'rows', - totalKey = 'total', - - // 分页字段名映射 - pageField = 'current', - sizeField = 'pageSize', - - onBeforeRequest, - onAfterRequest - } = options - - const pageState = reactive({ - page: 1, - pageSize: isRef(pageSize) ? pageSize.value : pageSize, - total: 0, - maxPage: 1, - search: isRef(search) ? search.value : search - }) - - let debounceTimer = null - - const fetchData = async (type = 'refresh') => { - if (loading.value) return Promise.resolve() - console.log(type) - loading.value = true - error.value = false - - if (typeof onBeforeRequest === 'function') { - try { - onBeforeRequest(type, pageState) - } catch (err) { - console.warn('onBeforeRequest 执行异常:', err) - } - } - - if (type === 'refresh') { - pageState.page = 1 - finished.value = false - if (list.value.length === 0) { - firstLoading.value = true - } - } else if (type === 'loadMore') { - if (pageState.page >= pageState.maxPage) { - loading.value = false - finished.value = true - return Promise.resolve('no more') - } - pageState.page += 1 - } - - const params = { - ...pageState.search, - [pageField]: pageState.page, - [sizeField]: pageState.pageSize, - } - - try { - const res = await requestFn(params) - - const rawData = res[dataKey] - const total = res[totalKey] || 99999999 - console.log(total, rawData) - const data = typeof transformFn === 'function' ? transformFn(rawData) : rawData - - if (type === 'refresh') { - list.value = data - } else { - list.value.push(...data) - } - - pageState.total = total - pageState.maxPage = Math.ceil(total / pageState.pageSize) - - finished.value = list.value.length >= total - empty.value = list.value.length === 0 - } catch (err) { - console.error('分页请求失败:', err) - error.value = true - } finally { - loading.value = false - firstLoading.value = false - - if (typeof onAfterRequest === 'function') { - try { - onAfterRequest(type, pageState, { - error: error.value - }) - } catch (err) { - console.warn('onAfterRequest 执行异常:', err) - } - } - } - } - - const refresh = () => fetchData('refresh') - const loadMore = () => fetchData('loadMore') - - const resetPagination = () => { - list.value = [] - pageState.page = 1 - pageState.total = 0 - pageState.maxPage = 1 - finished.value = false - error.value = false - firstLoading.value = true - empty.value = false - } - - if (autoWatchSearch && isRef(search)) { - watch(search, (newVal) => { - pageState.search = newVal - clearTimeout(debounceTimer) - debounceTimer = setTimeout(() => { - refresh() - }, debounceTime) - }, { - deep: true - }) - } - - watch(pageSize, (newVal) => { - pageState.pageSize = newVal - }, { - deep: true - }) - - if (autoFetch) { - nextTick(() => { - refresh() - }) - } - - return { - list, - loading, - error, - finished, - firstLoading, - empty, - pageState, - refresh, - loadMore, - resetPagination - } -} \ No newline at end of file +import { + ref, + reactive, + watch, + isRef, + nextTick +} from 'vue' + +export function usePagination( + requestFn, + transformFn, + options = {} +) { + const list = ref([]) + const loading = ref(false) + const error = ref(false) + const finished = ref(false) + const firstLoading = ref(true) + const empty = ref(false) + + const { + pageSize = 10, + search = {}, + autoWatchSearch = false, + debounceTime = 300, + autoFetch = false, + + // 字段映射 + dataKey = 'rows', + totalKey = 'total', + + // 分页字段名映射 + pageField = 'current', + sizeField = 'pageSize', + + onBeforeRequest, + onAfterRequest + } = options + + const pageState = reactive({ + page: 1, + pageSize: isRef(pageSize) ? pageSize.value : pageSize, + total: 0, + maxPage: 1, + search: isRef(search) ? search.value : search + }) + + let debounceTimer = null + + const fetchData = async (type = 'refresh') => { + if (loading.value) return Promise.resolve() + console.log(type) + loading.value = true + error.value = false + + if (typeof onBeforeRequest === 'function') { + try { + onBeforeRequest(type, pageState) + } catch (err) { + console.warn('onBeforeRequest 执行异常:', err) + } + } + + if (type === 'refresh') { + pageState.page = 1 + finished.value = false + if (list.value.length === 0) { + firstLoading.value = true + } + } else if (type === 'loadMore') { + if (pageState.page >= pageState.maxPage) { + loading.value = false + finished.value = true + return Promise.resolve('no more') + } + pageState.page += 1 + } + + const params = { + ...pageState.search, + [pageField]: pageState.page, + [sizeField]: pageState.pageSize, + } + + try { + const res = await requestFn(params) + + const rawData = res[dataKey] + const total = res[totalKey] || 99999999 + console.log(total, rawData) + const data = typeof transformFn === 'function' ? transformFn(rawData) : rawData + + if (type === 'refresh') { + list.value = data + } else { + list.value.push(...data) + } + + pageState.total = total + pageState.maxPage = Math.ceil(total / pageState.pageSize) + + finished.value = list.value.length >= total + empty.value = list.value.length === 0 + } catch (err) { + console.error('分页请求失败:', err) + error.value = true + } finally { + loading.value = false + firstLoading.value = false + + if (typeof onAfterRequest === 'function') { + try { + onAfterRequest(type, pageState, { + error: error.value + }) + } catch (err) { + console.warn('onAfterRequest 执行异常:', err) + } + } + } + } + + const refresh = () => fetchData('refresh') + const loadMore = () => fetchData('loadMore') + + const resetPagination = () => { + list.value = [] + pageState.page = 1 + pageState.total = 0 + pageState.maxPage = 1 + finished.value = false + error.value = false + firstLoading.value = true + empty.value = false + } + + if (autoWatchSearch && isRef(search)) { + watch(search, (newVal) => { + pageState.search = newVal + clearTimeout(debounceTimer) + debounceTimer = setTimeout(() => { + refresh() + }, debounceTime) + }, { + deep: true + }) + } + + watch(pageSize, (newVal) => { + pageState.pageSize = newVal + }, { + deep: true + }) + + if (autoFetch) { + nextTick(() => { + refresh() + }) + } + + return { + list, + loading, + error, + finished, + firstLoading, + empty, + pageState, + refresh, + loadMore, + resetPagination + } +} + diff --git a/packageA/pages/moreJobs/moreJobs.vue b/packageA/pages/moreJobs/moreJobs.vue index 94f96e9..a63a82d 100644 --- a/packageA/pages/moreJobs/moreJobs.vue +++ b/packageA/pages/moreJobs/moreJobs.vue @@ -13,7 +13,7 @@ import useUserStore from '@/stores/useUserStore'; const { $api, navTo, navBack, vacanciesTo } = inject('globalFunction'); import { storeToRefs } from 'pinia'; import useLocationStore from '@/stores/useLocationStore'; -import { usePagination } from '@/hook/usePagination'; +import { usePagination } from '@/packageA/hook/usePagination'; import { jobMoreMap } from '@/utils/markdownParser'; const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore()); const loadmoreRef = ref(null); diff --git a/packageCa/apiCa/job.js b/packageCa/apiCa/job.js index a6ab871..d0565b9 100644 --- a/packageCa/apiCa/job.js +++ b/packageCa/apiCa/job.js @@ -1,4 +1,4 @@ -import request from '@/utilCa/request.js' +import request from '@/packageCa/utilCa/request.js' const api = {} // 获取职业大类 中类 diff --git a/packageCa/apiCa/studentProfile.js b/packageCa/apiCa/studentProfile.js index 5928534..9656885 100644 --- a/packageCa/apiCa/studentProfile.js +++ b/packageCa/apiCa/studentProfile.js @@ -1,4 +1,4 @@ -import request from '@/utilCa/request.js' +import request from '@/packageCa/utilCa/request.js' const api = {} // 获取生涯罗盘 diff --git a/packageCa/apiCa/testManage.js b/packageCa/apiCa/testManage.js index 089eae9..b872e70 100644 --- a/packageCa/apiCa/testManage.js +++ b/packageCa/apiCa/testManage.js @@ -1,4 +1,4 @@ -import request from '@/utilCa/request.js' +import request from '@/packageCa/utilCa/request.js' const api = {} diff --git a/packageCa/apiCa/user.js b/packageCa/apiCa/user.js index fdd793e..210677f 100644 --- a/packageCa/apiCa/user.js +++ b/packageCa/apiCa/user.js @@ -1,4 +1,4 @@ -import request from '@/utilCa/request.js' +import request from '@/packageCa/utilCa/request.js' const api = {} diff --git a/packageCa/testReport/generalCareerTestReport.vue b/packageCa/testReport/generalCareerTestReport.vue index 664fa53..0da039a 100644 --- a/packageCa/testReport/generalCareerTestReport.vue +++ b/packageCa/testReport/generalCareerTestReport.vue @@ -75,7 +75,7 @@ import contrastBox from "@/packageCa/testReport/components/contrastBox.vue" import api from "@/packageCa/apiCa/testManage.js"; import theme from '@/uni_modules/lime-echart/static/walden.json'; - const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js'); + const echarts = require('../../utilCa/echarts.min.js'); // import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'; // // 注册主题 // echarts.registerTheme('theme', theme); diff --git a/packageCa/testReport/interestTestReport.vue b/packageCa/testReport/interestTestReport.vue index ebf0430..d494f26 100644 --- a/packageCa/testReport/interestTestReport.vue +++ b/packageCa/testReport/interestTestReport.vue @@ -245,7 +245,7 @@ import contrastBox from "@/packageCa/testReport/components/contrastBox.vue" import api from "@/packageCa/apiCa/testManage.js"; import theme from '@/uni_modules/lime-echart/static/walden.json'; - const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js'); + const echarts = require('../../utilCa/echarts.min.js'); // import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'; // // 注册主题 // echarts.registerTheme('theme', theme); diff --git a/packageCa/testReport/multipleAbilityTestReport.vue b/packageCa/testReport/multipleAbilityTestReport.vue index c57e057..88301ed 100644 --- a/packageCa/testReport/multipleAbilityTestReport.vue +++ b/packageCa/testReport/multipleAbilityTestReport.vue @@ -115,7 +115,7 @@ import api from "@/packageCa/apiCa/testManage.js" import wayData from "./multipleAbilityData.json"; import theme from '@/uni_modules/lime-echart/static/walden.json'; - const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js'); + const echarts = require('../../utilCa/echarts.min.js'); // import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'; // // 注册主题 // echarts.registerTheme('theme', theme); diff --git a/packageCa/testReport/personalTestReport.vue b/packageCa/testReport/personalTestReport.vue index 99e1bfb..79a5655 100644 --- a/packageCa/testReport/personalTestReport.vue +++ b/packageCa/testReport/personalTestReport.vue @@ -402,7 +402,7 @@ import opts from "./chartOpts.js" import api from "@/packageCa/apiCa/testManage.js"; import theme from '@/uni_modules/lime-echart/static/walden.json'; - const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js'); + const echarts = require('../../utilCa/echarts.min.js'); // import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'; // // 注册主题 // echarts.registerTheme('theme', theme); diff --git a/packageCa/testReport/workValuesTestReport.vue b/packageCa/testReport/workValuesTestReport.vue index 6924830..18afa6f 100644 --- a/packageCa/testReport/workValuesTestReport.vue +++ b/packageCa/testReport/workValuesTestReport.vue @@ -43,7 +43,7 @@ import contrastBox from "@/packageCa/testReport/components/contrastBox.vue" import api from "@/packageCa/apiCa/testManage.js"; import theme from '@/uni_modules/lime-echart/static/walden.json'; - const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js'); + const echarts = require('../../utilCa/echarts.min.js'); // import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'; // // 注册主题 // echarts.registerTheme('theme', theme); diff --git a/utilCa/config.js b/packageCa/utilCa/config.js similarity index 99% rename from utilCa/config.js rename to packageCa/utilCa/config.js index 299c8ae..286a7ea 100644 --- a/utilCa/config.js +++ b/packageCa/utilCa/config.js @@ -36,4 +36,5 @@ export { baseUrl7, baseUrl8, filestore_site -} \ No newline at end of file +} + diff --git a/packageCa/utilCa/echarts.min.js b/packageCa/utilCa/echarts.min.js new file mode 100644 index 0000000..6d74754 --- /dev/null +++ b/packageCa/utilCa/echarts.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var c=function(t,e){return(c=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},w=new function(){this.browser=new p,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?w.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(w.node=!0,w.svgSupported=!0):(J=navigator.userAgent,ie=(Vt=w).browser,ot=J.match(/Firefox\/([\d.]+)/),I=J.match(/MSIE\s([\d.]+)/)||J.match(/Trident\/.+?rv:(([\d.]+))/),Q=J.match(/Edge?\/([\d.]+)/),J=/micromessenger/i.test(J),ot&&(ie.firefox=!0,ie.version=ot[1]),I&&(ie.ie=!0,ie.version=I[1]),Q&&(ie.edge=!0,ie.version=Q[1],ie.newEdge=18<+Q[1].split(".")[0]),J&&(ie.weChat=!0),Vt.svgSupported="undefined"!=typeof SVGRect,Vt.touchEventsSupported="ontouchstart"in window&&!ie.ie&&!ie.edge,Vt.pointerEventsSupported="onpointerdown"in window&&(ie.edge||ie.ie&&11<=+ie.version),Vt.domSupported="undefined"!=typeof document,ot=document.documentElement.style,Vt.transform3dSupported=(ie.ie&&"transition"in ot||ie.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in ot)&&!("OTransition"in ot),Vt.transformSupported=Vt.transform3dSupported||ie.ie&&9<=+ie.version);var K="12px sans-serif";var m,v,_=function(t){var e={};if("undefined"!=typeof JSON)for(var n=0;n>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),1}}function fe(t){return"CANVAS"===t.nodeName.toUpperCase()}var ge=/([&<>"'])/g,ye={"&":"&","<":"<",">":">",'"':""","'":"'"};function me(t){return null==t?"":(t+"").replace(ge,function(t,e){return ye[e]})}var ve=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_e=[],xe=w.browser.firefox&&+w.browser.version.split(".")[0]<39;function be(t,e,n,i){return n=n||{},i?we(t,e,n):xe&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):we(t,e,n),n}function we(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(fe(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,void(n.zrY=e-i.top);if(de(_e,t,r,e))return n.zrX=_e[0],void(n.zrY=_e[1])}n.zrX=n.zrY=0}function Se(t){return t||window.event}function Me(t,e,n){var i;return null==(e=Se(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&be(t,i,e,n):(be(t,e,e,n),i=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Ze.prototype.clone=function(){return new Ze(this.x,this.y,this.width,this.height)},Ze.prototype.copy=function(t){Ze.copy(this,t)},Ze.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ze.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ze.prototype.isZero=function(){return 0===this.width||0===this.height},Ze.create=function(t){return new Ze(t.x,t.y,t.width,t.height)},Ze.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ze.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}W(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){on.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=ln(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function gn(k,L){var P,O,R=hn,N=0,E=[];function e(t){var e=P[t],n=O[t],i=P[t+1],r=O[t+1],t=(O[t]=n+r,t===N-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),N--,fn(k[i],k,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(r=dn(k[e+n-1],k,i,r,r-1,L)))if(n<=r){var o=e,a=n,t=i,s=r,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((o=cn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),di(t,e),e):void ui(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(ui(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),di(t,e),e):void ui(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?ui(e,+a[0],+a[1],+a[2],1):ui(e,0,0,0,1);s=ai(a.pop());case"rgb":return 3<=a.length?(ui(e,oi(a[0]),oi(a[1]),oi(a[2]),3===a.length?s:ai(a[3])),di(t,e),e):void ui(e,0,0,0,1);case"hsla":return 4!==a.length?void ui(e,0,0,0,1):(a[3]=ai(a[3]),gi(a,e),di(t,e),e);case"hsl":return 3!==a.length?void ui(e,0,0,0,1):(gi(a,e),di(t,e),e);default:return}}ui(e,0,0,0,1)}}function gi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ai(t[1]),r=ai(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return ui(e=e||[],ii(255*si(r,i,n+1/3)),ii(255*si(r,i,n)),ii(255*si(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function yi(t,e){var n=fi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);g++);g=f(g-1,h-2)}i=u[g+1],n=u[g]}n&&i&&(this._lastFr=g,this._lastFrP=e,d=i.percent-n.percent,r=0==d?1:f((e-n.percent)/d,1),i.easingFunc&&(r=i.easingFunc(r)),f=a?this._additiveValue:p?Ri:t[c],(Oi(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(r<1?n:i).rawValue:Oi(l)?(1===l?Ci:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},Zr.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},Zr.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},Zr.prototype.refreshHover=function(){this._needsRefreshHover=!0},Zr.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},Zr.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},Zr.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},Zr.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},Zr.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},Zr.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},Zr.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},Zr.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},Zr.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},Zr.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},Zr.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;el&&(l=s[h],u=h);++o[u],s[u]=0,++a}return z(o,function(t){return t/i})}function so(t){var e=2*Math.PI;return(t%e+e)%e}function lo(t){return-1e-4=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=fa(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(Na.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},r.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Na.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Na.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,r,o){return this._drawPendingPt(),Ka[0]=i,Ka[1]=r,Qa(Ka,o),this.addData(Na.A,t,e,n,n,i=Ka[0],(r=Ka[1])-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Ua(r)*n+t,this._yi=Xa(r)*n+e,this},r.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Na.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Na.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||!ja||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Ya(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),r=g,o=_);break;case Na.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],b=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=En(t,n,r,a,f),f=En(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,b,10),r=x,o=b;break;case Na.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Wn(t,n,r,p),p=Wn(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case Na.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=I+M;c+=1,d&&(a=Ua(M)*w+x,s=Xa(M)*S+b),f=Ha(w,S)*Wa(Za,Math.abs(I)),r=Ua(T)*w+x,o=Xa(T)*S+b;break;case Na.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case Na.Z:var C=a-r,y=s-o;f=Math.sqrt(C*C+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},r.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,E=this._ux,B=this._uy,z=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;g=ls[i=0]+t&&a<=ls[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,I,r);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case os.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(ts(c,p,S,p,e,i,r)||ts(S,p,S,M,e,i,r)||ts(S,M,c,M,e,i,r)||ts(c,M,c,p,e,i,r))return!0}else l=(l+=rs(S,p,S,M,i,r))+rs(c,M,c,p,i,r);break;case os.Z:if(n){if(ts(u,h,c,p,e,i,r))return!0}else l+=rs(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uMath.abs(i[1])?0e)return t[i];return t[n-1]}var bd,wd="\0_ec_inner",Sd=(u(Md,bd=Gc),Md.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Gc(i),this._locale=new Gc(r),this._optionManager=o},Md.prototype.setOption=function(t,e,n){e=Cd(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Md.prototype.resetOption=function(t,e){return this._resetOption(t,Cd(e))},Md.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):yd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&W(n,function(t){i=!0,this._mergeOption(t,e)},this),i},Md.prototype.mergeOption=function(t){this._mergeOption(t,null)},Md.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=R(),p=t&&t.replaceMergeMainTypeMap;sd(this).datasetMap=R(),W(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?y(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){var a,t=function(t,e,n){return(e=(e=dd.get(e))&&e(t))?n.concat(e):n}(this,o,xo(i[o])),e=h.get(o),n=e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll",e=Mo(e,t,n),s=(ko(e,o,g),r[o]=null,h.set(o,null),c.set(o,0),[]),l=[],u=0;W(e,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=V({componentIndex:e},t.keyInfo),V(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&fd(this)},this),this._seriesIndices||fd(this)},Md.prototype.getOption=function(){var a=y(this.option);return W(a,function(t,e){if(g.hasClass(e)){for(var n=xo(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!Do(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[wd],a},Md.prototype.getTheme=function(){return this._theme},Md.prototype.getLocaleModel=function(){return this._locale},Md.prototype.setUpdatePayload=function(t){this._payload=t},Md.prototype.getUpdatePayload=function(){return this._payload},Md.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=z(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();lt[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(fg(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();rthis.getShallow("animationThreshold")?!1:t)},o.prototype.restoreData=function(){this.dataTask.dirty()},o.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return vd.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},o.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},o.prototype.getProgressive=function(){return this.get("progressive")},o.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},o.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},o.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ng(e,n){W(Nt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,D(Eg,n))})}function Eg(t,e){t=Bg(t);return t&&t.setOutputEnd((e||this).count()),e}function Bg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}st(kg,zc),st(kg,vd),Xo(kg,g);Fg.prototype.init=function(t,e){},Fg.prototype.render=function(t,e,n,i){},Fg.prototype.dispose=function(t,e){},Fg.prototype.updateView=function(t,e,n,i){},Fg.prototype.updateLayout=function(t,e,n,i){},Fg.prototype.updateVisual=function(t,e,n,i){},Fg.prototype.toggleBlurSeries=function(t,e,n){},Fg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var zg=Fg;function Fg(){this.group=new Wr,this.uid=Uc("viewComponent")}function Vg(){var o=Po();return function(t){var e=o(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}}Uo(zg),jo(zg);var Gg=Po(),Wg=Vg(),Hg=(Ug.prototype.init=function(t,e){},Ug.prototype.render=function(t,e,n,i){},Ug.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Yg(t,i,"emphasis")},Ug.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Yg(t,i,"normal")},Ug.prototype.remove=function(t,e){this.group.removeAll()},Ug.prototype.dispose=function(t,e){},Ug.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Ug.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Ug.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ug.prototype.eachRendered=function(t){pc(this.group,t)},Ug.markUpdateMethod=function(t,e){Gg(t).updateMethod=e},Ug.protoInitialize=void(Ug.prototype.type="chart"),Ug);function Ug(){this.group=new Wr,this.uid=Uc("viewChart"),this.renderTask=Pf({plan:qg,reset:Zg}),this.renderTask.context={view:this}}function Xg(t,e,n){t&&Xl(t)&&("emphasis"===e?Cl:Al)(t,n)}function Yg(e,t,n){var i,r=Lo(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Qs[t])&&$s<=32?Qs[t]=$s++:i):null;null!=r?W(xo(r),function(t){Xg(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){Xg(t,n,o)})}function qg(t){return Wg(t.model)}function Zg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&Gg(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),jg[o]}Uo(Hg),jo(Hg);var jg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Kg="\0__throttleOriginMethod",$g="\0__throttleRate",Qg="\0__throttleType";function Jg(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},ly.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},ly.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},ly.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=R();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},ly.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;W(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});It(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},ly.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},ly.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},ly.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},ly.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}W(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},ly.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},ly.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},ly.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},ly.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=R(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Pf({plan:dy,reset:fy,count:my}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},ly.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Pf({reset:uy}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=R(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Pf({reset:hy,onDirty:py})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}It(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,W(n.getSeries(),c)),h&&o.dirty()},ly.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},ly.wrapStageHandler=function(t,e){return(t=C(t)?{overallReset:t,seriesType:function(t){vy=null;try{t(_y,xy)}catch(t){}return vy}(t)}:t).uid=Uc("stageHandler"),e&&(t.visualType=e),t};var sy=ly;function ly(t,e,n,i){this._stageTaskMap=R(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function uy(t){t.overallReset(t.ecModel,t.api,t.payload)}function hy(t){return t.overallProgress&&cy}function cy(){this.agent.dirty(),this.getDownstream().dirty()}function py(){this.agent&&this.agent.dirty()}function dy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function fy(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=xo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Os({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),W(p,function(t){t=new Ms({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},s.prototype.convertToPixel=function(t,e){return Gm(this,"convertToPixel",t,e)},s.prototype.convertFromPixel=function(t,e){return Gm(this,"convertFromPixel",t,e)},s.prototype.containPixel=function(t,i){var r;if(!this._disposed)return W(Ro(this._model,t),function(t,n){0<=n.indexOf("Models")&&W(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},s.prototype.getVisual=function(t,e){var t=Ro(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null==t)return Dy(n,e);var i=n,r=t,o=e;switch(o){case"color":return i.getItemVisual(r,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(r,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(r,o)}},s.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},s.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},s.prototype._initEvents=function(){var t,n,i,s=this;W(l0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&Py(o,function(t){var e,t=A(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=V({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),W(h0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),W(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Ly("map","selectchanged",n,e,t),Ly("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Ly("map","selected",n,e,t),Ly("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Ly("map","unselected",n,e,t),Ly("pie","unselected",n,e,t))})},s.prototype.isDisposed=function(){return this._disposed},s.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},s.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&zo(this.getDom(),x0,""),e=(t=this)._api,n=t._model,W(t._componentsViews,function(t){t.dispose(n,e)}),W(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete y0[t.id])},s.prototype.resize=function(t){if(!this[Tm])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[Cm]&&(null==n&&(n=this[Cm].silent),e=!0,this[Cm]=null),this[Tm]=!0;try{e&&Bm(this),Vm.update.call(this,{type:"resize",animation:V({duration:0},t&&t.animation)})}catch(t){throw this[Tm]=!1,t}this[Tm]=!1,Um.call(this,n),Xm.call(this,n)}}},s.prototype.showLoading=function(t,e){this._disposed?this.id:(P(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),g0[t]&&(t=g0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},s.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},s.prototype.makeActionFromEvent=function(t){var e=V({},t);return e.type=h0[t.type],e},s.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(P(e)||(e={silent:!!e}),u0[t.type]&&this._model&&(this[Tm]?this._pendingActions.push(t):(n=e.silent,Hm.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&w.browser.weChat&&this._throttledZrFlush(),Um.call(this,n),Xm.call(this,n))))},s.prototype.updateLabelLayout=function(){Mm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},s.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},s.internalField=(Bm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),zm(t,!0),zm(t,!1),e.plan()},zm=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!w.node&&!w.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),Mm.trigger("series:afterupdate",t,e,n)},Jm=function(t){t[Am]=!0,t.getZr().wakeUp()},t0=function(t){t[Am]&&(t.getZr().storage.traverse(function(t){Eh(t)||r0(t)}),t[Am]=!1)},$m=function(n){return u(t,e=Ad),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Cl(t,e),Jm(n)},t.prototype.leaveEmphasis=function(t,e){Al(t,e),Jm(n)},t.prototype.enterBlur=function(t){Dl(t),Jm(n)},t.prototype.leaveBlur=function(t){kl(t),Jm(n)},t.prototype.enterSelect=function(t){Ll(t),Jm(n)},t.prototype.leaveSelect=function(t){Pl(t),Jm(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(Qm=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},wv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},wv.prototype.getExtent=function(){return this._extent.slice()},wv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},wv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},wv.prototype.isBlank=function(){return this._isBlank},wv.prototype.setBlank=function(t){this._isBlank=t};var bv=wv;function wv(t){this._setting=t||{},this._extent=[1/0,-1/0]}jo(bv);var Sv=0,Mv=(Iv.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&z(e,Tv);return new Iv({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},Iv.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Iv.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return U(t)||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t):null==(n=(e=this._getOrCreateMap()).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n)):n=NaN),n):t},Iv.prototype._getOrCreateMap=function(){return this._map||(this._map=R(this.categories))},Iv);function Iv(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Sv}function Tv(t){return P(t)&&null!=t.value?t.value:t+""}function Cv(t){return"interval"===t.type||"log"===t.type}function Av(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=fo(o/e,!0),e=(null!=n&&oi[1]&&(i[0]=i[1]),r}function Dv(t){var e=Math.pow(10,po(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,eo(t*e)}function kv(t){return io(t)+2}function Lv(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Pv(t,e){return t>=e[0]&&t<=e[1]}function Ov(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Rv(t,e){return t*(e[1]-e[0])+e[0]}u(Bv,Nv=bv),Bv.prototype.parse=function(t){return null==t?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},Bv.prototype.contain=function(t){return Pv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Bv.prototype.normalize=function(t){return Ov(t=this._getTickNumber(this.parse(t)),this._extent)},Bv.prototype.scale=function(t){return t=Math.round(Rv(t,this._extent)),this.getRawOrdinalNumber(t)},Bv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},Bv.prototype.getMinorTicks=function(t){},Bv.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},Bv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Bv.prototype.calcNiceTicks=function(){},Bv.prototype.calcNiceExtent=function(){},Bv.type="ordinal";var Nv,Ev=Bv;function Bv(t){var t=Nv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new Mv({}))&&(e=new Mv({categories:z(e,function(t){return P(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}bv.registerClass(Ev);var zv,Fv=eo,Vv=(u(Gv,zv=bv),Gv.prototype.parse=function(t){return t},Gv.prototype.contain=function(t){return Pv(t,this._extent)},Gv.prototype.normalize=function(t){return Ov(t,this._extent)},Gv.prototype.scale=function(t){return Rv(t,this._extent)},Gv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Gv.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Gv.prototype.getInterval=function(){return this._interval},Gv.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=kv(t)},Gv.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:Fv(s+e,r)}:{value:n[1]})}return o},Gv.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&d<=M[1]&&a++)}u=(M[1]-M[0])/w;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),n_.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l);i.push([(r=s+=r)/n,(o=l+=o)/n])}return i}function K_(t,o){var e,n,r;return z(ht((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),W(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=j_(i,n,r);break;case"Polygon":case"MultiLineString":Z_(i,n,r);break;case"MultiPolygon":W(i,function(t,e){return Z_(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""},normalizeCssArray:Ap,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t},truncateText:oa}),Ay=Object.freeze({__proto__:null,bind:pt,clone:y,curry:D,defaults:B,each:W,extend:V,filter:ht,indexOf:G,inherits:at,isArray:F,isFunction:C,isObject:P,isString:U,map:z,merge:d,reduce:ut}),$_=Po();function Q_(t){return"category"===t.type?(r=(e=t).getLabelModel(),o=t1(e,r),!r.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:o.labelCategoryInterval}:o):(r=(n=t).scale.getTicks(),i=S_(n),{labels:z(r,function(t,e){return{level:t.level,formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,r,o}function J_(t,e){var n,i,r,o,a,s;return"category"===t.type?(e=e,o=e1(n=t,"ticks"),a=T_(e),(s=n1(o,a))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=C(a)?o1(n,a,!0):"auto"===a?(s=t1(n,n.getLabelModel()),r=s.labelCategoryInterval,z(s.labels,function(t){return t.tickValue})):r1(n,r=a,!0),i1(o,a,{ticks:i,tickCategoryInterval:r}))):{ticks:z(t.scale.getTicks(),function(t){return t.value})}}function t1(t,e){var n,i=e1(t,"labels"),e=T_(e),r=n1(i,e);return r||i1(i,e,{labels:C(e)?o1(t,e):r1(t,n="auto"===e?null!=(i=$_(r=t).autoInterval)?i:$_(r).autoInterval=r.calculateCategoryInterval():e),labelCategoryInterval:n})}function e1(t,e){return $_(t)[e]||($_(t)[e]=[])}function n1(t,e){for(var n=0;nl[1],h(n[0].coord,l[0])&&(t?n[0].coord=l[0]:n.shift()),t&&h(l[0],n[0].coord)&&n.unshift({coord:l[0]}),h(l[1],i.coord)&&(t?i.coord=l[1]:n.pop()),t)&&h(i.coord,l[1])&&n.push({coord:l[1]}),u},s1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),z(this.scale.getMinorTicks(t=0=u}}for(var o,a=this.__startIndex;ar[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},K1.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?0<=r.height?"bottom":"top":0<=r.width?"right":"left"),h=vc(i),l=(mc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:_x(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),t.getTextContent()),u=(s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if(X(i))t.setTextConfig({rotation:i});else if(F(e))t.setTextConfig({rotation:0});else{var r,i=t.shape,o=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(o+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=s;break;case"startAngle":case"insideStartAngle":r=o;break;case"endAngle":case"insideEndAngle":r=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-r;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,zx(a),i.get(["label","rotate"]))),Tc(l,h,o.getRawValue(n),function(t){return xx(e,t)}),i.getModel(["emphasis"]));Vl(t,u.get("focus"),u.get("blurScope"),u.get("disabled")),Hl(t,i),null!=(s=r).startAngle&&null!=s.endAngle&&s.startAngle===s.endAngle&&(t.style.fill="none",t.style.stroke="none",W(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var Vx,Gx=function(){},Wx=(u(Hx,Vx=j),Hx.prototype.getDefaultShape=function(){return new Gx},Hx.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:_i((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e))return r=e.mapDimension(a.dim),o={},W(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function Ab(t){for(var e,n,i=t.length/2;0l?x:_,(g=Math.abs(d.label.y-l))>=f.maxY&&(m=d.label.x-s-d.len2*h,y=u+d.len,m=Math.abs(m)t.unconstrainedWidth)?null:s,i.setStyle("width",l)),u=i.getBoundingRect(),r.width=u.width,e=(i.style.margin||0)+2.1,r.height=u.height+e,r.y-=(r.height-a)/2)}function Xb(t){return"center"===t.position}function Yb(t){var S,M,I=t.getData(),T=[],C=!1,A=(t.get("minShowLabelAngle")||0)*Wb,e=I.getLayout("viewRect"),D=I.getLayout("r"),k=e.width,L=e.x,n=e.y,e=e.height;function P(t){t.ignore=!0}if(I.each(function(t){var e,n,i,r,o,a,s,l,u,h,c=I.getItemGraphicEl(t),p=c.shape,d=c.getTextContent(),f=c.getTextGuideLine(),t=I.getItemModel(t),g=t.getModel("label"),y=g.get("position")||t.get(["emphasis","label","position"]),m=g.get("distanceToLabelLine"),v=g.get("alignTo"),_=Z(g.get("edgeDistance"),k),x=g.get("bleedMargin"),t=t.getModel("labelLine"),b=Z(t.get("length"),k),w=Z(t.get("length2"),k);Math.abs(p.endAngle-p.startAngle)=e.r0},Qb.type="pie";var Kb,$b=Qb;function Qb(){var t=null!==Kb&&Kb.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function Jb(t,e,n){e=F(e)?{coordDimensions:e}:V({encodeDefine:t.getEncode()},e);var i=t.getSource(),e=dv(i,e).dimensions,e=new pv(e,t);return e.initData(i,n),e}ew.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},ew.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},ew.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},ew.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var tw=ew;function ew(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var nw,iw=Po(),rw=(u(ow,nw=kg),ow.prototype.init=function(t){nw.prototype.init.apply(this,arguments),this.legendVisualProvider=new tw(pt(this.getData,this),pt(this.getRawData,this)),this._defaultLabelLine(t)},ow.prototype.mergeOption=function(){nw.prototype.mergeOption.apply(this,arguments)},ow.prototype.getInitialData=function(){return Jb(this,{coordDimensions:["value"],encodeDefaulter:D(ud,this)})},ow.prototype.getDataParams=function(t){var e,n=this.getData(),i=iw(n),r=i.seats,i=(r||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),r=i.seats=ao(e,n.hostModel.get("percentPrecision"))),nw.prototype.getDataParams.call(this,t));return i.percent=r[t]||0,i.$vars.push("percent"),i},ow.prototype._defaultLabelLine=function(t){bo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},ow.type="series.pie",ow.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},ow);function ow(){return null!==nw&&nw.apply(this,arguments)||this}O_(function(t){t.registerChartView($b),t.registerSeriesModel(rw),ky("pie",t.registerAction),t.registerLayout(D(Vb,"pie")),t.registerProcessor(Gb("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),e=n.get(e,t);return!(X(e)&&!isNaN(e)&&e<0)})}})});u(lw,aw=kg),lw.prototype.getInitialData=function(t,e){return xv(null,this,{useEncodeDefaulter:!0})},lw.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},lw.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},lw.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},lw.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},lw.type="series.scatter",lw.dependencies=["grid","polar","geo","singleAxis","calendar"],lw.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"}};var aw,sw=lw;function lw(){var t=null!==aw&&aw.apply(this,arguments)||this;return t.type=lw.type,t.hasSymbolVisual=!0,t}var uw,hw=function(){},cw=(u(pw,uw=j),pw.prototype.getDefaultShape=function(){return new hw},pw.prototype.reset=function(){this.notClear=!1,this._off=0},pw.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,e=t.getContext?t.getContext():t,s=e&&r[0]<4,l=this.softClipShape;if(s)this._ctx=e;else{for(this._ctx=null,n=this._off;ne[1]&&e.reverse(),e},Ew.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Ew.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Rw,Nw=Ew;function Ew(t,e,n,i,r){t=Rw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function Bw(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,r={},o=i.getAxesOnZeroOf()[0],a=i.position,s=o?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(o&&(h=o.toGlobalCoord(o.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),r.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],r.rotation=Math.PI/2*("x"===i?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],r.labelOffset=o?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),bt(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection),e.get(["axisLabel","rotate"]));return r.labelRotate="top"===s?-h:h,r.z2=1,r}function zw(t){return"cartesian2d"===t.get("coordinateSystem")}function Fw(i){var r={xAxisModel:null,yAxisModel:null};return W(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Eo).models[0];r[e]=n}),r}var Vw=Math.log;function Gw(t,e,n){var i=Vv.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),e=x_(t,e),s=e.extent,l=e.fixMin,e=e.fixMax,u=("log"===t.type&&(u=Vw(t.base),s=[Vw(s[0])/u,Vw(s[1])/u]),t.setExtent(s[0],s[1]),t.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:e}),i.getExtent.call(t)),h=(l&&(s[0]=u[0]),e&&(s[1]=u[1]),i.getInterval.call(t)),c=s[0],p=s[1];if(l&&e)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=Dv(h),c=s[1]-h*a;else{u=(h=ah[1]?-1:1,o=["start"===c?h[0]-o*u:"end"===c?h[1]+o*u:(h[0]+h[1])/2,Jw(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*qw/180),Jw(c)?a=Zw.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var r,n=so(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=lo(n-qw/2)?(r=i?"bottom":"top","center"):lo(n-1.5*qw)?(r=i?"top":"bottom","center"):(r="middle",n<1.5*qw&&qw/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)=t&&(0===e?0:i[e-1][0])Math.PI/2&&(c+=Math.PI):"tangential"===h?c=-I-Math.PI/2:X(h)&&(c=h*Math.PI/180),0===c?d.add(new zs({style:_c(x,{text:a,x:l,y:u,verticalAlign:R<-.8?"top":.8n||!!e&&(o=iS(t).seriesDataCount,e=r.getExtent(),Math.abs(e[0]-e[1])/o>n)):!0===i)},cM.prototype.makeElOption=function(t,e,n,i,r){},cM.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;r&&(r=lM(t).pointerEl=new dc[r.type](uM(e.pointer)),t.add(r))},cM.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=lM(t).labelEl=new zs(uM(e.label)),t.add(e),dM(e,i))},cM.prototype.updatePointerEl=function(t,e,n){t=lM(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},cM.prototype.updateLabelEl=function(t,e,n,i){t=lM(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),dM(t,i))},cM.prototype._renderHandle=function(t){var e,n,i,r,o,a;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status"),r.get("show")&&a&&"hide"!==a?(this._handle||(o=!0,i=this._handle=lc(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ie(t.event)},onmousedown:hM(this._onHandleDragMove,this,0,0),drift:hM(this._onHandleDragMove,this),ondragend:hM(this._onHandleDragEnd,this)}),n.add(i)),gM(i,e,!1),i.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=r.get("size"))||(a=[a,a]),i.scaleX=a[0]/2,i.scaleY=a[1]/2,function(t,e,n,i){var r=t[e];if(r){var o=r[Kg]||r,a=r[Qg];if(r[$g]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Jg(o,n,"debounce"===i))[Kg]=o,r[Qg]=i,r[$g]=n}}}(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)):(i&&n.remove(i),this._handle=null))},cM.prototype._moveHandleToValue=function(t,e){pM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},cM.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(fM(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(fM(t)),lM(n).lastProp=null,this._doDispatchAxisPointer())},cM.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},cM.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},cM.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),(n=(e=this)[t="_doDispatchAxisPointer"])&&n[Kg]&&(n.clear&&n.clear(),e[t]=n[Kg])},cM.prototype.doClear=function(){},cM.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},cM);function cM(){this._dragging=!1,this.animationThreshold=15}function pM(t,e,n,i){!function n(i,t){{var r;return P(i)&&P(t)?(r=!0,W(t,function(t,e){r=r&&n(i[e],t)}),!!r):i===t}}(lM(n).lastProp,i)&&(lM(n).lastProp=i,e?Rh(n,i,t):(n.stopAnimation(),n.attr(i)))}function dM(t,e){t[e.get(["label","show"])?"show":"hide"]()}function fM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function gM(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function yM(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function mM(t,e,n,i,r){var o=function(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),r=r.formatter;{var a;r&&(a={value:M_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},W(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&a.seriesData.push(e)}),U(r)?o=r.replace("{value}",o):C(r)&&(o=r(a)))}return o}(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=Ap(n.get("padding")||0),s=n.getFont(),l=Mr(o,s),u=r.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=r.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),r.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),r=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),r[0]=Math.min(r[0]+c,i)-c,r[1]=Math.min(r[1]+h,l)-h,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:_c(n,{text:o,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function vM(t,e,n){var i=ke();return Ne(i,i,n.rotation),Re(i,i,n.position),ic([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function _M(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function xM(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}u(SM,bM=Dh),SM.prototype.makeElOption=function(t,e,n,i,r){var o,a=n.axis,s=("angle"===a.dim&&(this.animationThreshold=Math.PI/18),a.polar),l=s.getOtherAxis(a).getExtent(),u=a.dataToCoord(e),h=i.get("type"),a=(h&&"none"!==h&&(o=yM(i),(h=IM[h](a,s,u,l)).style=o,t.graphicKey=h.type,t.pointer=h),i.get(["label","margin"]));mM(t,n,i,r,function(t,e,n,i){var r,o,a=e.axis,t=a.dataToCoord(t),s=(l=(l=n.getAngleAxis().getExtent()[0])/180*Math.PI,n.getRadiusAxis().getExtent());{var l;s="radius"===a.dim?(a=ke(),Ne(a,a,l),Re(a,a,[n.cx,n.cy]),r=ic([t,-i],a),a=e.getModel("axisLabel").get("rotate")||0,e=Zw.innerTextLayout(l,a*Math.PI/180,-1),o=e.textAlign,e.textVerticalAlign):(l=s[1],r=n.coordToPoint([l+i,t]),a=n.cx,e=n.cy,o=Math.abs(r[0]-a)/l<.3?"center":r[0]>a?"left":"right",Math.abs(r[1]-e)/l<.3?"middle":r[1]>e?"top":"bottom")}return{position:r,align:o,verticalAlign:s}}(e,n,s,a))};var bM,wM=SM;function SM(){return null!==bM&&bM.apply(this,arguments)||this}var MM,IM={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:_M(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:xM(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:xM(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},TM=(u(CM,MM=Dh),CM.prototype.makeElOption=function(t,e,n,i,r){var o,a=n.axis,s=a.grid,l=i.get("type"),u=AM(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0)),a=(l&&"none"!==l&&(o=yM(i),(l=DM[l](a,h,u)).style=o,t.graphicKey=l.type,t.pointer=l),Bw(s.model,n));h=e,u=t,o=a,l=n,s=i,e=r,t=Zw.innerTextLayout(o.rotation,0,o.labelDirection),o.labelMargin=s.get(["label","margin"]),mM(u,l,s,e,{position:vM(l.axis,h,o),align:t.textAlign,verticalAlign:t.textVerticalAlign})},CM.prototype.getHandleTransform=function(t,e,n){var i=Bw(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),vM(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},CM.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,r=n.grid,o=n.getGlobalExtent(!0),r=AM(r,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(o[1],a[n]),a[n]=Math.max(o[0],a[n]),(r[1]+r[0])/2),o=[e,e];o[n]=a[n];return{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:o,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}},CM);function CM(){return null!==MM&&MM.apply(this,arguments)||this}function AM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var DM={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:_M([e,n[0]],[e,n[1]],kM(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,r],i=kM(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function kM(t){return"x"===t.dim?0:1}u(OM,LM=g),OM.type="axisPointer",OM.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};var LM,PM=OM;function OM(){var t=null!==LM&&LM.apply(this,arguments)||this;return t.type=OM.type,t}var RM=Po(),NM=W;function EM(t,e,n){var i,c,p;function r(t,h){c.on(t,function(e){n=p;var n,i,r={dispatchAction:o,pendings:i={showTip:[],hideTip:[]}};function o(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=o,n.dispatchAction(t))}NM(RM(c).records,function(t){t&&h(t,e,r.dispatchAction)});var t,a=r.pendings,s=p,l=a.showTip.length,u=a.hideTip.length;l?t=a.showTip[l-1]:u&&(t=a.hideTip[u-1]),t&&(t.dispatchAction=null,s.dispatchAction(t))})}w.node||(i=e.getZr(),RM(i).records||(RM(i).records={}),p=e,RM(c=i).initialized||(RM(c).initialized=!0,r("click",D(zM,"click")),r("mousemove",D(zM,"mousemove")),r("globalout",BM)),(RM(i).records[t]||(RM(i).records[t]={})).handler=n)}function BM(t,e,n){t.handler("leave",null,n)}function zM(t,e,n,i){e.handler(t,n,i)}function FM(t,e){w.node||(e=e.getZr(),(RM(e).records||{})[t]&&(RM(e).records[t]=null))}u(WM,VM=zg),WM.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";EM("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},WM.prototype.remove=function(t,e){FM("axisPointer",e)},WM.prototype.dispose=function(t,e){FM("axisPointer",e)},WM.type="axisPointer";var VM,GM=WM;function WM(){var t=null!==VM&&VM.apply(this,arguments)||this;return t.type=WM.type,t}var HM=Po();function UM(t,e,n){var i,o,a,r,s,l,u,h,c,p,d,f,g,y,m,v,_,x,b,w,S,M=t.currTrigger,I=[t.x,t.y],T=t,C=t.dispatchAction||pt(n.dispatchAction,n),A=e.getComponent("axisPointer").coordSysAxesInfo;if(A)return jM(I)&&(h={seriesIndex:T.seriesIndex,dataIndex:T.dataIndex},e=e,m=[],v=h.seriesIndex,I=(null==v||!(e=e.getSeriesByIndex(v))||null==(v=Lo(i=e.getData(),h))||v<0||F(v)?{point:[]}:(_=i.getItemGraphicEl(v),y=e.coordinateSystem,e.getTooltipPosition?m=e.getTooltipPosition(v)||[]:y&&y.dataToPoint?m=h.isStacked?(e=y.getBaseAxis(),h=y.getOtherAxis(e).dim,e=e.dim,h="x"===h||"radius"===h?1:0,e=i.mapDimension(e),(f=[])[h]=i.get(e,v),f[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),v),y.dataToPoint(f)||[]):y.dataToPoint(i.getValues(z(y.dimensions,function(t){return i.mapDimension(t)}),v))||[]:_&&((e=_.getBoundingRect().clone()).applyTransform(_.transform),m=[e.x+e.width/2,e.y+e.height/2]),{point:m,el:_})).point),o=jM(I),a=T.axesInfo,r=A.axesInfo,s="leave"===M||jM(I),l={},h={list:[],map:{}},c={showPointer:D(YM,u={}),showTooltip:D(qM,h)},W(A.coordSysMap,function(t,e){var r=o||t.containPoint(I);W(A.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!r||a&&!i||null!=(i=null!=(i=i&&i.value)||o?i:n.pointToData(I))&&XM(t,i,c,!1,l)})}),p={},W(r,function(n,t){var i=n.linkGroup;i&&!u[t]&&W(i.axesInfo,function(t,e){var e=u[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,ZM(t),ZM(n)))),p[n.key]=e)})}),W(p,function(t,e){XM(r[e],t,c,!0,l)}),d=u,f=r,g=l.axesInfo=[],W(f,function(t,e){var n=t.axisPointerModel.option,e=d[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&g.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),y=h,v=t,e=C,jM(m=I)||!y.list.length?e({type:"hideTip"}):(_=((y.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:m[0],y:m[1],tooltipOption:v.tooltipOption,position:v.position,dataIndexInside:_.dataIndexInside,dataIndex:_.dataIndex,seriesIndex:_.seriesIndex,dataByCoordSys:y.list})),T=r,t=(M=n).getZr(),C="axisPointerLastHighlights",x=HM(t)[C]||{},b=HM(t)[C]={},W(T,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&W(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;b[e]=t})}),w=[],S=[],W(x,function(t,e){b[e]||S.push(t)}),W(b,function(t,e){x[e]||w.push(t)}),S.length&&M.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:S}),w.length&&M.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:w}),l}function XM(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(a=e,s=t.axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,W(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var r=e.getAxisTooltipData(i,a,s),o=r.dataIndices,r=r.nestestValue;else{if(!(o=e.getData().indicesOfNearest(i[0],a,"category"===s.type?.5:null)).length)return;r=e.getData().get(i[0],o[0])}null!=r&&isFinite(r)&&(i=a-r,(n=Math.abs(i))<=c)&&((ne[1]&&e.reverse(),t.getExtent()),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var t=t-this.cx,e=e-this.cy,t=t*t+e*e-1e-4,e=this.r,n=this.r0;return t<=e*e&&n*n<=t}}},mI.prototype.convertToPixel=function(t,e,n){return vI(e)===this?this.dataToPoint(n):null},mI.prototype.convertFromPixel=function(t,e,n){return vI(e)===this?this.pointToData(n):null},mI);function mI(t){this.dimensions=gI,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new uI,this._angleAxis=new dI,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}function vI(t){var e=t.seriesModel,t=t.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function _I(t,e){var n,i=this,r=i.getAngleAxis(),o=i.getRadiusAxis();r.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(W(A_(e=t.getData(),"radius"),function(t){o.scale.unionExtentFromData(e,t)}),W(A_(e,"angle"),function(t){r.scale.unionExtentFromData(e,t)}))}),b_(r.scale,r.model),b_(o.scale,o.model),"category"!==r.type||r.onBand||(t=r.getExtent(),n=360/r.scale.count(),r.inverse?t[1]+=n:t[1]-=n,r.setExtent(t[0],t[1]))}function xI(t,e){var n,i;t.type=e.get("type"),t.scale=w_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse=t.inverse!==e.get("clockwise"),n=e.get("startAngle"),i=null!=(i=e.get("endAngle"))?i:n+(t.inverse?-360:360),t.setExtent(n,i)),(e.axis=t).model=e}var bI={dimensions:gI,create:function(t,s){var l=[];return t.eachComponent("polar",function(t,e){var n,e=new yI(e+""),i=(e.update=_I,e.getRadiusAxis()),r=e.getAngleAxis(),o=t.findAxisModel("radiusAxis"),a=t.findAxisModel("angleAxis");xI(i,o),xI(r,a),i=e,o=s,a=(r=t).get("center"),n=o.getWidth(),o=o.getHeight(),i.cx=Z(a[0],n),i.cy=Z(a[1],o),a=i.getRadiusAxis(),i=Math.min(n,o)/2,null==(n=r.get("radius"))?n=[0,"100%"]:F(n)||(n=[0,n]),o=[Z(n[0],i),Z(n[1],i)],a.inverse?a.setExtent(o[1],o[0]):a.setExtent(o[0],o[1]),l.push(e),(t.coordinateSystem=e).model=t}),t.eachSeries(function(t){var e;"polar"===t.get("coordinateSystem")&&(e=t.getReferringComponents("polar",Eo).models[0],t.coordinateSystem=e.coordinateSystem)}),l}},wI=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function SI(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),t=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:t[0],y2:t[1]}}function MI(t){return t.getRadiusAxis().inverse?0:1}function II(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}u(AI,TI=lS),AI.prototype.render=function(e,t){var n,i,r,o,a,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),II(s=z(n.getViewLabels(),function(t){t=y(t);var e=n.scale,e="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(e),t})),II(o),W(wI,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||kI[t](this.group,e,i,o,a,r,s)},this))},AI.type="angleAxis";var TI,CI=AI;function AI(){var t=null!==TI&&TI.apply(this,arguments)||this;return t.type=AI.type,t.axisPointerClass="PolarAxisPointer",t}var DI,kI={axisLine:function(t,e,n,i,r,o){var e=e.getModel(["axisLine","lineStyle"]),a=n.getAngleAxis(),s=Math.PI/180,l=a.getExtent(),u=MI(n),h=u?0:1,c=360===Math.abs(l[1]-l[0])?"Circle":"Arc",c=0===o[h]?new dc[c]({shape:{cx:n.cx,cy:n.cy,r:o[u],startAngle:-l[0]*s,endAngle:-l[1]*s,clockwise:a.inverse},style:e.getLineStyle(),z2:1,silent:!0}):new Fu({shape:{cx:n.cx,cy:n.cy,r:o[u],r0:o[h]},style:e.getLineStyle(),z2:1,silent:!0});c.style.fill=null,t.add(c)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[MI(n)],o=z(i,function(t){return new Ju({shape:SI(n,[l,l+s],t.coord)})});t.add(Qh(o,{style:B(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[MI(n)],h=[],c=0;ca?"left":"right",r=Math.abs(o[1]-s)/r<.3?"middle":o[1]>s?"top":"bottom",i=(p&&p[i]&&P(s=p[i])&&s.textStyle&&(n=new Gc(s.textStyle,d,d.ecModel)),new zs({silent:Zw.isLabelSilent(u),style:_c(n,{x:o[0],y:o[1],fill:n.getTextColor()||u.get(["axisLine","lineStyle","color"]),text:t.formattedLabel,align:a,verticalAlign:r})}));l.add(i),g&&((s=Zw.makeAxisEventDataBase(u)).targetType="axisLabel",s.value=t.rawLabel,A(i).eventData=s)},this)},splitLine:function(t,e,n,i,r,o){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;hn[r],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=O(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[r]-p[r]:e[i]+=p[r]+g),s[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[r]=(d?n:c)[r],f[o]=Math.max(c[o],p[o]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[r],d?((e={x:0,y:0})[r]=Math.max(n[r]-p[r]-g,0),e[o]=f[o],u.setClipPath(new Os({shape:e})),u.__rectSize=e[r]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Rh(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},bT.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},bT.prototype._updatePageInfoView=function(n,i){var r=this._controllerGroup,t=(W(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=r.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),r.childOfName("pageText")),e=n.get("pageFormatter"),o=i.pageIndex,o=null!=o?o+1:0,a=i.pageCount;t&&e&&t.setStyle("text",U(e)?e.replace("{current}",null==o?"":o+"").replace("{total}",null==a?"":a+""):e({current:o,total:a}))},bT.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,r=vT[t],o=_T[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,p=n,d=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+i}},bT.prototype._findTargetItemIndex=function(n){var i,r;return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==r&&null!=t&&(r=e),t===n&&(i=e)}),null!=i?i:r):0},bT.type="legend.scroll",bT);function bT(){var t=null!==yT&&yT.apply(this,arguments)||this;return t.type=bT.type,t.newlineDisabled=!0,t._currentIndex=0,t}function wT(t,e){if(t)for(var n=F(t)?t:[t],i=0;ih[0]?s:r)[0]:o[0]=(a[0]>h[0]?r:s)[0],"y0"===n[1]?o[1]=(a[1]>h[1]?s:r)[1]:o[1]=(a[1]>h[1]?r:s)[1],i.getMarkerPosition(o,n,!0)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),vx(c,"cartesian2d")&&(r=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),LC(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):LC(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(d)||(h[0]=d),isNaN(p)||(h[1]=p)):h=[d,p],h}var NC,EC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],BC=(u(zC,NC=Pc),zC.prototype.updateTransform=function(t,e,r){e.eachSeries(function(n){var i,t=TT.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=z(EC,function(t){return RC(i,e,t,n,r)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},zC.prototype.renderSeries=function(a,r,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new Wr}),h=(this.group.add(i.group),this.markKeep(i),function(t,n,e){var i,r;{var o;i=t?(o=z(t&&t.dimensions,function(t){var e=n.getData();return V(V({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),r=z(["x0","y0","x1","y1"],function(t,e){return{name:t,type:o[e%2].type}}),new pv(r,e)):new pv(r=[{name:"value",type:"float"}],e)}e=z(e.get("data"),D(DC,n,t,e));t&&(e=ht(e,D(OC,t)));t=t?function(t,e,n,i){return Uf(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return Uf(t.value,r[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,r));r.setData(h),h.each(function(e){var t=z(EC,function(t){return RC(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))],r=(no(n),no(i),!(r[0]>n[1]||r[1]i[1]||o[1]":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},_2=(x2.prototype.evaluate=function(t){var e=typeof t;return U(e)?this._condVal.test(t):!!X(e)&&this._condVal.test(t+"")},x2);function x2(t){null==(this._condVal=U(t)?new RegExp(t):_t(t)?t:null)&&f("")}w2.prototype.evaluate=function(){return this.value};var b2=w2;function w2(){}M2.prototype.evaluate=function(){for(var t=this.children,e=0;e { } }) } -export default request \ No newline at end of file +export default request + diff --git a/pages/index/components/index-two.vue b/pages/index/components/index-two.vue index a95dbea..68a0782 100644 --- a/pages/index/components/index-two.vue +++ b/pages/index/components/index-two.vue @@ -72,7 +72,7 @@