¶Ô±ÈÐÂÎļþ |
| | |
| | | <script> |
| | | export default { |
| | | onLaunch () { |
| | | // å 载系ç»ä¿¡æ¯ |
| | | this.$store.dispatch('SystemInfo') |
| | | }, |
| | | onShow () { |
| | | }, |
| | | onHide () { |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/uni_modules/uview-ui/index.scss"; |
| | | @import "@/static/style.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // è·åéªè¯ç |
| | | export const image = () => request.get('/captchaImage', null, { custom: { auth: false, loading: false } }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // è·åæä½æ¥å¿ |
| | | export const operLog = (params) => request.get('/monitor/operlog/list', params) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // ç¨æ·ç»å½(è´¦å·+å¯ç +éªè¯ç ) |
| | | export const login = (params) => request.post('/login', params, { custom: { auth: false } }) |
| | | |
| | | // ç¨æ·éåº |
| | | export const logout = () => request.get('/logout') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // è·åç¨æ·ä¿¡æ¯ |
| | | export const getInfo = () => request.get('/getInfo') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // è·åéç¥å
¬åå表 |
| | | export const noticeList = (params) => request.get('/system/notice/list', params) |
| | | |
| | | // è·åéç¥å
¬å详æ
ä¿¡æ¯ |
| | | export const noticeById = (id) => request.get('/system/notice/' + id) |
| | | |
| | | // æ°å¢éç¥å
¬å详æ
ä¿¡æ¯ |
| | | export const noticeAdd = (params) => request.post('/system/notice', params) |
| | | |
| | | // ä¿®æ¹éç¥å
¬å详æ
ä¿¡æ¯ |
| | | export const noticeModify = (params) => request.put('/system/notice', params) |
| | | |
| | | // å é¤éç¥å
¬å详æ
ä¿¡æ¯ |
| | | export const noticeDelete = (id) => request.delete('/system/notice/' + id) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/config/request.js'; |
| | | |
| | | // è·åç¨æ·å表 |
| | | export const userList = (params) => request.get('/system/user/list', params) |
| | | |
| | | // è·åç¨æ·ä¿¡æ¯ |
| | | export const userById = (id) => request.get('/system/user/' + id) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="float-button"> |
| | | <u-button :type="type" :icon="icon" :shape="shape" :disabled="disabled" :size="size" @click="$emit('click')"></u-button> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | // æé®çé¢ç½®æ ·å¼ï¼infoï¼primaryï¼errorï¼warningï¼success |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.button.type |
| | | }, |
| | | // 徿 |
| | | icon: { |
| | | type: String |
| | | }, |
| | | // æé®å°ºå¯¸ï¼largeï¼normalï¼smallï¼mini |
| | | size: { |
| | | type: String, |
| | | default: 'large' |
| | | }, |
| | | // æé®å½¢ç¶ï¼circleï¼ä¸¤è¾¹ä¸ºååï¼ï¼squareï¼å¸¦åè§ï¼ |
| | | shape: { |
| | | type: String, |
| | | default: 'circle' |
| | | }, |
| | | // æé®æ¯å¦é空 |
| | | plain: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.plain |
| | | }, |
| | | // æ¯å¦ç¦æ¢ç¶æ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.disabled |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .float-button { |
| | | bottom: 100px; |
| | | right: 20px; |
| | | width: 52px; |
| | | height: 52px; |
| | | position: fixed; |
| | | z-index: 10; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-gap :height="height" :bgColor="bgColor"></u-gap> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | height: { |
| | | type: [String, Number], |
| | | default: 16 |
| | | }, |
| | | bgColor: { |
| | | type: String, |
| | | default: '#f4f4f5' |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <block v-if="isShow()"> |
| | | <view v-if="hideBtn" class="u-navbar" :style="{ backgroundColor: bgColor, textAlign: 'center' }"> |
| | | <view |
| | | class="u-navbar__placeholder" |
| | | v-if="fixed" |
| | | :style="{ |
| | | height: $u.addUnit($u.getPx(height) + $u.sys().statusBarHeight,'px'), |
| | | }" |
| | | ></view> |
| | | <view :class="[fixed && 'u-navbar--fixed']"> |
| | | <u-status-bar v-if="safeAreaInsetTop" :bgColor="bgColor"></u-status-bar> |
| | | <view class="u-navbar__content" :class="[border && 'u-border-bottom']" :style="{ height: contentHeight, backgroundColor: bgColor }"> |
| | | <view class="u-navbar__content__left" hover-class="u-navbar__content__left--hover" hover-start-time="150" style="position: relative;"> |
| | | <text class="u-line-1 u-navbar__content__title" :style="[{ height: contentHeight, lineHeight: contentHeight, margin: '0 auto' }, $u.addStyle(titleStyle)]"> |
| | | {{ title }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-navbar v-else :title="title" :autoBack="true" :placeholder="true" :bgColor="bgColor"></u-navbar> |
| | | </block> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Navbar èªå®ä¹å¯¼èªæ |
| | | * @property {Boolean} h5Show æ¯å¦å¨h5模å¼ä¸æ¾ç¤º ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} hideBtn æ¯å¦éèè¿åæé® ï¼é»è®¤ false ï¼ |
| | | */ |
| | | export default { |
| | | mixins: [props], |
| | | props: { |
| | | h5Show: Boolean, |
| | | hideBtn: Boolean, |
| | | back: Boolean, |
| | | home: Boolean |
| | | }, |
| | | data () { |
| | | return { |
| | | systemInfo : this.$store.getters.getSystemInfo, |
| | | statusBarHeight: uni.$u.addUnit(uni.$u.getPx(this.height) + uni.$u.sys().statusBarHeight, 'px'), |
| | | contentHeight: uni.$u.addUnit(this.height) |
| | | } |
| | | }, |
| | | methods: { |
| | | isShow () { |
| | | if (this.systemInfo.uniPlatform == 'web') { |
| | | return this.h5Show |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .u-navbar { |
| | | |
| | | &--fixed { |
| | | position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | z-index: 11; |
| | | } |
| | | |
| | | &__content { |
| | | @include flex(row); |
| | | align-items: center; |
| | | height: 44px; |
| | | background-color: #9acafc; |
| | | position: relative; |
| | | justify-content: center; |
| | | |
| | | &__left, |
| | | &__right { |
| | | padding: 0 13px; |
| | | position: absolute; |
| | | top: 0; |
| | | bottom: 0; |
| | | @include flex(row); |
| | | align-items: center; |
| | | } |
| | | |
| | | &__left { |
| | | left: 0; |
| | | |
| | | &--hover { |
| | | opacity: 0.7; |
| | | } |
| | | |
| | | &__text { |
| | | font-size: 15px; |
| | | margin-left: 3px; |
| | | } |
| | | } |
| | | |
| | | &__title { |
| | | text-align: center; |
| | | font-size: 16px; |
| | | color: $u-main-color; |
| | | } |
| | | |
| | | &__right { |
| | | right: 0; |
| | | |
| | | &__text { |
| | | font-size: 15px; |
| | | margin-left: 3px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¼å¯é¡¶é¨å®å
¨åºéé
|
| | | safeAreaInsetTop: { |
| | | type: Boolean, |
| | | default: uni.$u.props.navbar.safeAreaInsetTop |
| | | }, |
| | | // åºå®å¨é¡¶é¨æ¶ï¼æ¯å¦çæä¸ä¸ªçé«å
ç´ ï¼ä»¥é²æ¢å¡é· |
| | | placeholder: { |
| | | type: Boolean, |
| | | default: uni.$u.props.navbar.placeholder |
| | | }, |
| | | // æ¯å¦åºå®å¨é¡¶é¨ |
| | | fixed: { |
| | | type: Boolean, |
| | | default: uni.$u.props.navbar.fixed |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºä¸è¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.navbar.border |
| | | }, |
| | | // 左边ç徿 |
| | | leftIcon: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.leftIcon |
| | | }, |
| | | // 左边çæç¤ºæå |
| | | leftText: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.leftText |
| | | }, |
| | | // å·¦å³çæç¤ºæå |
| | | rightText: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.rightText |
| | | }, |
| | | // å³è¾¹ç徿 |
| | | rightIcon: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.rightIcon |
| | | }, |
| | | // æ é¢ |
| | | title: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.navbar.title |
| | | }, |
| | | // èæ¯é¢è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.bgColor |
| | | }, |
| | | // æ é¢ç宽度 |
| | | titleWidth: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.navbar.titleWidth |
| | | }, |
| | | // å¯¼èªæ é«åº¦ |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.navbar.height |
| | | }, |
| | | // 左侧è¿å徿 çå¤§å° |
| | | leftIconSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.navbar.leftIconSize |
| | | }, |
| | | // 左侧è¿å徿 çé¢è² |
| | | leftIconColor: { |
| | | type: String, |
| | | default: uni.$u.props.navbar.leftIconColor |
| | | }, |
| | | // ç¹å»å·¦ä¾§åºå(è¿å徿 )ï¼æ¯å¦èªå¨è¿åä¸ä¸é¡µ |
| | | autoBack: { |
| | | type: Boolean, |
| | | default: uni.$u.props.navbar.autoBack |
| | | }, |
| | | // æ é¢çæ ·å¼ï¼å¯¹è±¡æå符串 |
| | | titleStyle: { |
| | | type: [String, Object], |
| | | default: uni.$u.props.navbar.titleStyle |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template xlang="wxml"> |
| | | <view class="tki-tree"> |
| | | <view class="tki-tree-mask" :class="{'show':showTree}" @tap="_cancel"></view> |
| | | <view class="tki-tree-cnt" :class="{'show':showTree}"> |
| | | <view class="tki-tree-bar"> |
| | | <view class="tki-tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel">åæ¶</view> |
| | | <view class="tki-tree-bar-title" :style="{'color':titleColor}">{{title}}</view> |
| | | <view class="tki-tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm">ç¡®å®</view> |
| | | </view> |
| | | <view class="tki-tree-view"> |
| | | <scroll-view class="tki-tree-view-sc" :scroll-y="true"> |
| | | <block v-for="(item, index) in treeList" :key="index"> |
| | | <view class="tki-tree-item" :style="[{ |
| | | paddingLeft: item.rank*15 + 'px', |
| | | zIndex: item.rank*-1 +50 |
| | | }]" |
| | | :class="{ |
| | | border: border === true, |
| | | show: item.show, |
| | | last: item.lastRank, |
| | | showchild: item.showChild, |
| | | open: item.open, |
| | | }"> |
| | | <view class="tki-tree-label" @tap.stop="_treeItemTap(item, index)"> |
| | | <image class="tki-tree-icon" :src="item.lastRank ? lastIcon : item.showChild ? currentIcon : defaultIcon"></image> |
| | | {{item.name}} |
| | | </view> |
| | | <view class="tki-tree-check" @tap.stop="_treeItemSelect(item, index)" v-if="selectParent?true:item.lastRank"> |
| | | <view class="tki-tree-check-yes" v-if="item.checked" :class="{'radio':!multiple}" :style="{'border-color':confirmColor}"> |
| | | <view class="tki-tree-check-yes-b" :style="{'background-color':confirmColor}"></view> |
| | | </view> |
| | | <view class="tki-tree-check-no" v-else :class="{'radio':!multiple}" :style="{'border-color':confirmColor}"></view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "tki-tree", |
| | | props: { |
| | | lazy: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | range: { |
| | | type: Array, |
| | | default: function() { |
| | | return [] |
| | | } |
| | | }, |
| | | idKey: { |
| | | type: String, |
| | | default: 'id' |
| | | }, |
| | | rangeKey: { |
| | | type: String, |
| | | default: 'label' |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | multiple: { // æ¯å¦å¯ä»¥å¤é |
| | | type: Boolean, |
| | | default: false |
| | | // default: true |
| | | }, |
| | | selectParent: { //æ¯å¦å¯ä»¥éç¶çº§ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | foldAll: { //æå æ¶å
³éææå·²ç»æå¼çåéï¼å次æå¼æ¶éè¦ä¸çº§ä¸çº§æå¼ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | confirmColor: { // ç¡®å®æé®é¢è² |
| | | type: String, |
| | | default: '' // #07bb07 |
| | | }, |
| | | cancelColor: { // åæ¶æé®é¢è² |
| | | type: String, |
| | | default: '' // #757575 |
| | | }, |
| | | titleColor: { // æ é¢é¢è² |
| | | type: String, |
| | | default: '' // #757575 |
| | | }, |
| | | currentIcon: { // å±å¼æ¶åçic |
| | | type: String, |
| | | default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ0QTM0MzQ1Q0RBMTFFOUE0MjY4NzI1Njc1RjI1ODIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ0QTM0MzU1Q0RBMTFFOUE0MjY4NzI1Njc1RjI1ODIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDRBMzQzMjVDREExMUU5QTQyNjg3MjU2NzVGMjU4MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDRBMzQzMzVDREExMUU5QTQyNjg3MjU2NzVGMjU4MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PidwepsAAAK0SURBVHja7JxbTsJAFIYHww7ciStgCeoGvGxAiOsgURegoL5720AXYLiIr0aJviq3Zx3PhIEnKG3ndtr+f3KixrSUj/ZjzjClIqUUiFm2gAAQAREQEUAEREAERAQQAREQAREBREAEREBEEqa67h9RFDWllDv0awWYlqlQHmu1WjMRRMoV1QFttA12y3xRtdNczq8EsE4/f8FumX2q77ROvNXk8UGMEKdUz6tYJHljaZAbuyUH+UR1to5BEohTuqwPCeS4pAA/qY6o/kyHOAMCeRK3owJnj+rH1jjxhqpVsstaebCz6TmnHWyXyY+xHjSBWBY/bvSgadtXBj9u9KCN3rnIfkzkQVsTEEX0Y2IP2oKo/HhMICcFAThUcwVZNGU6FdbX/XURzkbVF4+ybGhjPrFdgP66QdXNurGtSdk6Xdb9nAJ8oDo3OQlsQZzkdPw41ONBo6vI5scDefRjZg+6gpg3Pxp50CXEvPjR2IOuIXL3oxUPuobI3Y9WPOgDIlc/WvOgL4iL/vqFCcD7LH0xB4hj7cfQ/fWH9qCT+FhG0tN+DBk1PzjOM0SVllixcsBT1AvYc/kAPhc0hRg/3uvxoCgKRN9+dOrBUBB9+9GpB0NC9OVH5x4MDdG1H714kANEV3705kEOEBf9dcPi/lQnsuvLg1wgSu3Ha0v7Uh4MMgUXeuG71H407a+VBy9CPQkOdw+MtB+nGbd/D+FBbhBNxo9SjwcngJjNj0E9yBFiFj8G9SBXiGn8GNyDnCEm8SMLD3KHGOdHNh7kDjHOj2w8mAeIi/5arX+c6b/fxHz9oADEdGdjR/fXCw/OOB5oVfCOgnepz8IB14PMw03jCmTE+QBx5z0gAmKSqK9OUF+hcAeIhu/QYr4Qie8rjW83hhMBERARQAREQAREBBABERCLnH8BBgA+TQI7U4t53AAAAABJRU5ErkJggg==' |
| | | }, |
| | | defaultIcon: { // æå æ¶åçic |
| | | type: String, |
| | | default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAACE0lEQVR4Xu3c200DMRCF4XEltJAOkEugA+ggpUAHoQMqiFMCdEAJUMEiS4mEELlIO7bPOeN9i6K1rG/952myyea1WiCtXmEuYBPR4RBMxInoIOCwhOtJLKVszWyXc/5y2BvNEq6I+/3+kFK6M7OHnPM7jcLKjbZAvD/uaZtzflm5P4rbWyJWgDcze1LPuzVihfxUz7sH4ilJ2bx7Isrm3RtRMu8RiHJ5j0SUyXs0okTeCIj0eSMh0uaNhkiZNyIiXd7IiDR5oyNS5M2ACJ83EyJs3myIkHkzIsLlzYwIkzc7IkTeCojD81ZCHJa3GuKQvBURu+etjNgtb3XELnlHQGyedyTEZnlHQ2ySd0RE97wjI7rlHR3RJe+JeIrbLOecD6ePpZQ6W1kn2epo4MUrPOKyLN8ppYq1+y1VStncOjIdGnFZlo+U0uOtWOeOY2TE12Ouq//pEA7xXL7XfvcufR8K0Svfv6CREN3yDYfYIt9QiK3yjYTYLF95xB75SiP2ylcZsVu+cogj8pVCHJWvEuKwfOkREfKlRkTJlxkRJl86RMR8qRBR82VChM0XHpEhX2hElnyREWnyhUNkzBcKkTVfJETafIcjKuQ7FFEl35GIMvl2R1TMtyuiar49EWXzbY5oZpv/hibXTF2h3+s60FRKeT6+3TjMS3nrA3ZFRD8xrfY3ER1kJ+JEdBBwWGKeRAfEH1wS5WFZSDB/AAAAAElFTkSuQmCC' |
| | | }, |
| | | lastIcon: { // 没æåéçic |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | border: { // æ¯å¦æåå²çº¿ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | showTree: false, |
| | | treeList: [], |
| | | selectIndex: -1, |
| | | returnedItem: [] ,//å®ä¹ä¸ä¸ªç©ºæ°ç» |
| | | pids: [], |
| | | ancestorsIds: [], |
| | | childNums: [], |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | _show() { |
| | | this.showTree = true |
| | | }, |
| | | _hide() { |
| | | this.showTree = false |
| | | }, |
| | | _cancel() { |
| | | this._hide() |
| | | this.$emit("cancel", ''); |
| | | }, |
| | | _confirm() { |
| | | // å¤çæéæ°æ® |
| | | let rt = [], |
| | | obj = {}; |
| | | this.treeList.forEach((v, i) => { |
| | | if (this.treeList[i].checked) { |
| | | rt.push(this.treeList[i].id) |
| | | } |
| | | }) |
| | | this._hide() |
| | | this.$emit("confirm", rt); |
| | | }, |
| | | //æå¹³åæ ç»æ |
| | | _renderTreeList(list = [], rank = 0, parentId = [], parents = []) { |
| | | list.forEach(item => { |
| | | this.treeList.push({ |
| | | id: item[this.idKey], |
| | | name: item[this.rangeKey], |
| | | source: item, |
| | | parentId, // ç¶çº§idæ°ç» |
| | | parents, // ç¶çº§idæ°ç» |
| | | rank, // å±çº§ |
| | | showChild: false, //å级æ¯å¦æ¾ç¤º |
| | | open: false, //æ¯å¦æå¼ |
| | | show: rank === 0, // èªèº«æ¯å¦æ¾ç¤º |
| | | hideArr: [], |
| | | orChecked: item.checked ? item.checked : false, |
| | | checked: item.checked ? item.checked : false, |
| | | childNum: 0 |
| | | }) |
| | | |
| | | if (Array.isArray(item.children) && item.children.length > 0) { |
| | | // console.log(item) |
| | | let parentid = [...parentId], |
| | | parentArr = [...parents]; |
| | | delete parentArr.children |
| | | parentid.push(item[this.idKey]); |
| | | parentArr.push({ |
| | | [this.idKey]: item[this.idKey], |
| | | [this.rangeKey]: item[this.rangeKey] |
| | | }) |
| | | // lazy |
| | | if(!this.lazy) { |
| | | this._renderTreeList(item.children, rank + 1, parentid, parentArr) |
| | | } |
| | | } else { |
| | | this.treeList[this.treeList.length - 1].lastRank = true; |
| | | } |
| | | }) |
| | | }, |
| | | // å¤çé»è®¤éæ© |
| | | _defaultSelect() { |
| | | this.treeList.forEach((v, i) => { |
| | | if (v.checked) { |
| | | this.treeList.forEach((v2, i2) => { |
| | | if (v.parentId.toString().indexOf(v2.parentId.toString()) >= 0) { |
| | | v2.show = true |
| | | if (v.parentId.includes(v2.id)) { |
| | | v2.showChild = true; |
| | | v2.open = true; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getOwn(id, arr){ |
| | | //å©ç¨foreach循ç¯éå |
| | | arr.forEach((item) => { |
| | | //夿éå½ç»ææ¡ä»¶ |
| | | if(item[this.idKey] == id) |
| | | { |
| | | // å卿°æ®å°ç©ºæ°ç» |
| | | this.returnedItem = item |
| | | } |
| | | else if(item.children != null) //夿chlidrenæ¯å¦ææ°æ® |
| | | { |
| | | //éå½è°ç¨ |
| | | this.getOwn(id, item.children); |
| | | } |
| | | }) |
| | | return this.returnedItem |
| | | }, |
| | | setShow (id, arr, isShow) { |
| | | arr.forEach((item, index) => { |
| | | if(item.parentId.includes(id)) { |
| | | this.treeList[index].showChild = isShow |
| | | this.treeList[index].show = isShow |
| | | } else if (item.children !== undefined) { |
| | | this.setShow(id, item.children, isShow) |
| | | } |
| | | }) |
| | | }, |
| | | // ç¹å» |
| | | _treeItemTap(item, index) { |
| | | // console.log(item) |
| | | if (item.lastRank === true) { |
| | | //ç¹å»æåä¸çº§æ¶è§¦åäºä»¶ |
| | | this.treeList[index].checked = !this.treeList[index].checked |
| | | this._fixMultiple(index) |
| | | return; |
| | | } |
| | | let id = item.id; |
| | | item.showChild = !item.showChild; |
| | | // qingqian |
| | | if(item.showChild) { |
| | | const range = this.range |
| | | const parentIdArr = item.parentId |
| | | // æ¾å°å½åå
ç´ |
| | | const own = this.getOwn(id, range) |
| | | const checkedChildren = own.children |
| | | // åå
ç´ æå
¥çç´¢å¼ä½ç½® |
| | | const nextIndex = this.treeList.findIndex(itemT => itemT.id === item.id) |
| | | console.log(checkedChildren); |
| | | if(checkedChildren === undefined || checkedChildren.length < 1) { |
| | | return |
| | | } |
| | | // åèç¹æ°é |
| | | this.treeList[index].childNum = checkedChildren.length |
| | | const newRank = item.rank + 1 |
| | | checkedChildren.forEach(itemC => { |
| | | const childObj = { |
| | | id: itemC[this.idKey], |
| | | name: itemC[this.rangeKey], |
| | | source: {}, |
| | | parentId: [item.id], // ç¶çº§idæ°ç» |
| | | parents: [item], // ç¶çº§idæ°ç» |
| | | rank: newRank, // å±çº§ |
| | | showChild: false, //å级æ¯å¦æ¾ç¤º |
| | | open: false, //æ¯å¦æå¼ |
| | | show: 1, // èªèº«æ¯å¦æ¾ç¤º |
| | | hideArr: [], |
| | | orChecked: this.treeList[index].checked, |
| | | checked: this.treeList[index].checked, |
| | | } |
| | | if(!this.treeList.some(itemT => itemT.id === itemC[this.idKey])) { |
| | | this.treeList.splice(nextIndex+1,0,childObj) |
| | | } |
| | | }) |
| | | } |
| | | // å±å¼/éèå级/å级 |
| | | let list = this.treeList |
| | | item.open = item.showChild ? true : !item.open; |
| | | list.forEach((childItem, i) => { |
| | | if (item.showChild === false) { |
| | | //éèææå级 |
| | | if (!childItem.parentId.includes(id)) { |
| | | return; |
| | | } |
| | | //TODO: ä¿®æ¹ |
| | | if (!this.foldAll) { |
| | | if (childItem.lastRank !== true && !childItem.open) { |
| | | childItem.showChild = false; |
| | | this.setShow(childItem.id, this.treeList, false) |
| | | } |
| | | // 为éèçå
容添å ä¸ä¸ªæ è®° |
| | | if (childItem.show) { |
| | | childItem.hideArr[item.rank] = id |
| | | } |
| | | } else { |
| | | if (childItem.lastRank !== true) { |
| | | childItem.showChild = false; |
| | | // ç»§ç»éèå级ççå级 |
| | | this.setShow(childItem.id, this.treeList, false) |
| | | } |
| | | } |
| | | if(childItem.children !== undefined) { |
| | | childItem.children.forEach((childItem1, i1) => { |
| | | if(!childItem1.parentId.includes(childItem.id)) { |
| | | return |
| | | } |
| | | childItem.children[i1].showChild = false |
| | | childItem.children[i1].show = false |
| | | }) |
| | | } |
| | | childItem.show = false; |
| | | } else { |
| | | // æå¼åé |
| | | if (childItem.parentId[childItem.parentId.length - 1] === id) { |
| | | childItem.show = true; |
| | | } |
| | | // æå¼è¢«éèçåé |
| | | if (childItem.parentId.includes(id) && !this.foldAll) { |
| | | // console.log(childItem.hideArr) |
| | | if (childItem.hideArr[item.rank] === id) { |
| | | childItem.show = true; |
| | | if (childItem.open && childItem.showChild) { |
| | | childItem.showChild = true |
| | | } else { |
| | | childItem.showChild = false |
| | | } |
| | | childItem.hideArr[item.rank] = null |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // éè¿ç¶idå¤çå级 |
| | | syncChecked (trees, pid, checked) { |
| | | trees.forEach((item,index) => { |
| | | if(item.parentId.includes(pid)) { |
| | | this.treeList[index].checked = checked |
| | | this.syncChecked(trees, item.id, checked) |
| | | } else if(item.children !== undefined) { |
| | | this.syncChecked(item.children, pid, checked) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åç¶çº§å¾ä¸ææå±çº§çid å¹¶åæ¥ç¶æ |
| | | setAncestors (pids, checked) { |
| | | this.treeList.forEach((item,index) => { |
| | | if(pids.includes(item.id)) { |
| | | if(checked && this.childNums[item.id] !== undefined && item.childNum === this.childNums[item.id]) { |
| | | // å级å
¨é¨éä¸, ç¶çº§æéä¸ |
| | | this.treeList[index].checked = true |
| | | } else { |
| | | this.treeList[index].checked = false |
| | | } |
| | | this.setAncestors(item.parentId, checked) |
| | | } |
| | | }) |
| | | }, |
| | | _treeItemSelect(item, index) { |
| | | this.treeList[index].checked = !this.treeList[index].checked |
| | | // éç¶çº§, å级èªå¨å
¨é |
| | | this.syncChecked(this.treeList, item.id, this.treeList[index].checked) |
| | | |
| | | if(item.rank > 0) { |
| | | item.parentId.forEach((pid, indexP) => { |
| | | const parent = this.treeList.filter(i => i.id === pid) |
| | | const childNum = parent.length > 0 ? parent[0].childNum : 0 |
| | | if(this.childNums[pid] === undefined) { |
| | | this.childNums[pid] = 1 |
| | | } else if(this.childNums[pid] < childNum) { |
| | | this.childNums[pid]++ |
| | | } |
| | | }) |
| | | //åçº§éæ©/éæ»¡/åæ¶éæ©, ç¶çº§å¾ä¸åæ¥ç¶æ |
| | | this.setAncestors(item.parentId, this.treeList[index].checked) |
| | | } |
| | | this._fixMultiple(index) |
| | | }, |
| | | // å¤çåéå¤é |
| | | _fixMultiple(index) { |
| | | if (!this.multiple) { |
| | | // 妿æ¯åé |
| | | this.treeList.forEach((v, i) => { |
| | | if (i != index) { |
| | | this.treeList[i].checked = false |
| | | } else { |
| | | this.treeList[i].checked = true |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // éç½®æ°æ® |
| | | _reTreeList() { |
| | | this.treeList.forEach((v, i) => { |
| | | this.treeList[i].checked = v.orChecked |
| | | }) |
| | | }, |
| | | _initTree(range = this.range){ |
| | | this.treeList = []; |
| | | this._renderTreeList(range); |
| | | this.$nextTick(() => { |
| | | this._defaultSelect(range) |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | range(list) { |
| | | this._initTree(list); |
| | | }, |
| | | multiple() { |
| | | if (this.range.length) { |
| | | this._reTreeList(); |
| | | } |
| | | }, |
| | | selectParent() { |
| | | if (this.range.length) { |
| | | this._reTreeList(); |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this._initTree(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import "./style.css"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .tki-tree-mask { |
| | | position: fixed; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | bottom: 0rpx; |
| | | left: 0rpx; |
| | | z-index: 9998; |
| | | background-color: rgba(0, 0, 0, 0.6); |
| | | opacity: 0; |
| | | transition: all 0.3s ease; |
| | | visibility: hidden; |
| | | } |
| | | .tki-tree-mask.show { |
| | | visibility: visible; |
| | | opacity: 1; |
| | | } |
| | | .tki-tree-cnt { |
| | | position: fixed; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | bottom: 0rpx; |
| | | left: 0rpx; |
| | | z-index: 9999; |
| | | top: 160rpx; |
| | | transition: all 0.3s ease; |
| | | transform: translateY(100%); |
| | | } |
| | | .tki-tree-cnt.show { |
| | | transform: translateY(0); |
| | | } |
| | | .tki-tree-bar { |
| | | background-color: #fff; |
| | | height: 72rpx; |
| | | padding-left: 20rpx; |
| | | padding-right: 20rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | border-bottom-width: 1rpx !important; |
| | | border-bottom-style: solid; |
| | | border-bottom-color: #f5f5f5; |
| | | font-size: 32rpx; |
| | | color: #757575; |
| | | line-height: 1; |
| | | } |
| | | .tki-tree-bar-confirm { |
| | | color: #07bb07; |
| | | } |
| | | .tki-tree-view { |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | bottom: 0rpx; |
| | | left: 0rpx; |
| | | top: 72rpx; |
| | | background-color: #fff; |
| | | padding-top: 20rpx; |
| | | padding-right: 20rpx; |
| | | padding-bottom: 20rpx; |
| | | padding-left: 20rpx; |
| | | } |
| | | .tki-tree-view-sc { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | .tki-tree-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | font-size: 26rpx; |
| | | color: #757575; |
| | | line-height: 1; |
| | | height: 0; |
| | | opacity: 0; |
| | | transition: 0.2s; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | .tki-tree-item.show { |
| | | height: 80rpx; |
| | | opacity: 1; |
| | | } |
| | | .tki-tree-item.showchild:before { |
| | | transform: rotate(90deg); |
| | | } |
| | | .tki-tree-item.last:before { |
| | | opacity: 0; |
| | | } |
| | | .tki-tree-icon { |
| | | width: 26rpx; |
| | | height: 26rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .tki-tree-label { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | line-height: 1.2; |
| | | } |
| | | .tki-tree-check { |
| | | width: 40px; |
| | | height: 40px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .tki-tree-check-yes, |
| | | .tki-tree-check-no { |
| | | width: 20px; |
| | | height: 20px; |
| | | border-top-left-radius: 20%; |
| | | border-top-right-radius: 20%; |
| | | border-bottom-right-radius: 20%; |
| | | border-bottom-left-radius: 20%; |
| | | border-top-width: 1rpx; |
| | | border-left-width: 1rpx; |
| | | border-bottom-width: 1rpx; |
| | | border-right-width: 1rpx; |
| | | border-style: solid; |
| | | border-color: #07bb07; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | } |
| | | .tki-tree-check-yes-b { |
| | | width: 12px; |
| | | height: 12px; |
| | | border-top-left-radius: 20%; |
| | | border-top-right-radius: 20%; |
| | | border-bottom-right-radius: 20%; |
| | | border-bottom-left-radius: 20%; |
| | | background-color: #07bb07; |
| | | } |
| | | .tki-tree-check .radio { |
| | | border-top-left-radius: 50%; |
| | | border-top-right-radius: 50%; |
| | | border-bottom-right-radius: 50%; |
| | | border-bottom-left-radius: 50%; |
| | | } |
| | | .tki-tree-check .radio .tki-tree-check-yes-b { |
| | | border-top-left-radius: 50%; |
| | | border-top-right-radius: 50%; |
| | | border-bottom-right-radius: 50%; |
| | | border-bottom-left-radius: 50%; |
| | | } |
| | | .hover-c { |
| | | opacity: 0.6; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-tabs :activeStyle="activeStyle" :list="tabs" @change="(tab) => $emit('change', tab)"></u-tabs> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | tabs: Array |
| | | }, |
| | | data () { |
| | | return { |
| | | activeStyle: { |
| | | color: '#303133', |
| | | fontSize: '20px', |
| | | fontWeight: 'bold', |
| | | transform: 'scale(1.05)' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const environment = { |
| | | // å¼åç¯å¢é
ç½® |
| | | development: { |
| | | // æ¬å°é¨ç½²çå端 |
| | | // baseURL: 'http://localhost:8080', |
| | | |
| | | // ç´æ¥ä½¿ç¨çº¿ä¸å端 |
| | | baseURL: 'http://vue.ruoyi.vip/prod-api' |
| | | }, |
| | | // ç产ç¯å¢é
ç½® |
| | | production: { |
| | | baseURL: 'http://vue.ruoyi.vip/prod-api' // å叿¶éè¦ä¿®æ¹ä¸ºå端å®é
å°å |
| | | } |
| | | } |
| | | |
| | | module.exports = { |
| | | environment: environment[process.env.NODE_ENV] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const { environment } = require('./environment.js') |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import storage from '@/utils/storage'; |
| | | |
| | | // æ¤vmåæ°ä¸ºé¡µé¢çå®ä¾ï¼å¯ä»¥éè¿å®å¼ç¨vuexä¸çåé |
| | | module.exports = (vm) => { |
| | | // åå§å请æ±é
ç½® |
| | | uni.$u.http.setConfig((config) => { |
| | | /* config 为é»è®¤å
¨å±é
ç½®ï¼è¯·æ±å°å夿*/ |
| | | /* #ifdef H5 */ |
| | | if (process.env.NODE_ENV === 'production') { |
| | | config.baseURL = environment.baseURL; /* æ ¹åå */ |
| | | } else { |
| | | // å¼å模å¼å使ç¨ä»£çæ¹å¼ï¼è§vue.config.jsé
ç½® |
| | | config.baseURL = '/'; /* æ ¹åå */ |
| | | } |
| | | /* #endif */ |
| | | /* #ifndef H5 */ |
| | | config.baseURL = environment.baseURL; /* æ ¹åå */ |
| | | /* #endif */ |
| | | return config |
| | | }) |
| | | |
| | | // è¯·æ±æ¦æª |
| | | uni.$u.http.interceptors.request.use((config) => { // å¯ä½¿ç¨async await å弿¥æä½ |
| | | // åå§åè¯·æ±æ¦æªå¨æ¶ï¼ä¼æ§è¡æ¤æ¹æ³ï¼æ¤æ¶data为undefinedï¼èµäºé»è®¤{} |
| | | config.data = config.data || {} |
| | | // æ ¹æ®customåæ°ä¸é
ç½®çæ¯å¦éè¦tokenï¼æ·»å 对åºç请æ±å¤´ |
| | | if(config?.custom?.auth) { |
| | | // å¯ä»¥å¨æ¤éè¿vmå¼ç¨vuexä¸çåéï¼å
·ä½å¼å¨vm.$store.stateä¸ |
| | | config.header.Authorization = 'Bearer ' + storage.get(ACCESS_TOKEN) |
| | | } |
| | | // æ ¹æ®customåæ°ä¸é
ç½®çæ¯å¦éè¦æ¾ç¤ºloading |
| | | if (config?.custom?.loading) { |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask: true |
| | | }) |
| | | } |
| | | return config |
| | | }, config => { // å¯ä½¿ç¨async await å弿¥æä½ |
| | | return Promise.reject(config) |
| | | }) |
| | | |
| | | // ååºæ¦æª |
| | | uni.$u.http.interceptors.response.use((response) => { /* 对ååºæååç¹ä»ä¹ å¯ä½¿ç¨async await å弿¥æä½*/ |
| | | const data = response.data |
| | | |
| | | // å
³éloading |
| | | uni.hideLoading(); |
| | | |
| | | // èªå®ä¹åæ° |
| | | const custom = response.config?.custom |
| | | if (data.code !== 200) { |
| | | // å¦ææ²¡ææ¾å¼å®ä¹customçtoaståæ°ä¸ºfalseçè¯ï¼é»è®¤å¯¹æ¥éè¿è¡toastå¼¹åºæç¤º |
| | | if (custom.toast !== false) { |
| | | uni.$u.toast(data.msg) |
| | | } |
| | | |
| | | // å¤æç¶æç |
| | | switch (data.code) { |
| | | case 401: { |
| | | uni.reLaunch({ url: '/' }) |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦catchè¿åï¼åè¿è¡reject |
| | | if (custom?.catch) { |
| | | return Promise.reject(data) |
| | | } else { |
| | | // å¦åè¿åä¸ä¸ªpendingä¸çpromiseï¼è¯·æ±ä¸ä¼è¿å
¥catchä¸ |
| | | return new Promise(() => { }) |
| | | } |
| | | } |
| | | return data === undefined ? {} : data |
| | | }, (response) => { |
| | | // 对ååºé误åç¹ä»ä¹ ï¼statusCode !== 200ï¼ |
| | | return Promise.reject(response) |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const http = uni.$u.http; |
| | | |
| | | /** |
| | | * æ··å
¥é»è®¤ä¸ªæ§åé
ç½® |
| | | * @param {*} config |
| | | * @returns |
| | | */ |
| | | function mixinCustom (config) { |
| | | config.custom = Object.assign({ |
| | | auth: true, |
| | | toast: true, |
| | | catch: true, |
| | | loading: true |
| | | }, config.custom || {}); |
| | | return config; |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼åget请æ±urlåæ°ï¼å°å¯¹è±¡è§£æä¸ºå符串 |
| | | * @param {*} url |
| | | * @param {*} params |
| | | * @returns |
| | | */ |
| | | function urlFormater (url, params) { |
| | | if (params) { |
| | | let paramList = []; |
| | | for (let key in params) { |
| | | paramList.push(key + '=' + params[key]) |
| | | } |
| | | return url.indexOf('?') > -1 ? (url + '&' + paramList.join('&')) : (url + '?' + paramList.join('&')) |
| | | } |
| | | return url; |
| | | } |
| | | |
| | | const request = { |
| | | // postæäº¤ |
| | | post (url, params, config = {}) { |
| | | config = mixinCustom(config) |
| | | return http.post(url, params, config); |
| | | }, |
| | | // getæäº¤ |
| | | get (url, params, config = {}) { |
| | | config = mixinCustom(config) |
| | | let path = urlFormater(url, params) |
| | | return http.get(path, config); |
| | | }, |
| | | |
| | | // putæäº¤ |
| | | put (url, params, config = {}) { |
| | | config = mixinCustom(config) |
| | | return http.put(url, params, config); |
| | | }, |
| | | |
| | | // deleteæäº¤ |
| | | delete (url, params, config = {}) { |
| | | config = mixinCustom(config) |
| | | return http.delete(url, params, config); |
| | | }, |
| | | |
| | | }; |
| | | |
| | | export default request; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import App from './App' |
| | | import Vue from 'vue' |
| | | import uView from 'uni_modules/uview-ui' |
| | | |
| | | Vue.use(uView) |
| | | |
| | | Vue.config.productionTip = false |
| | | |
| | | App.mpType = 'app' |
| | | |
| | | import store from '@/store'; |
| | | |
| | | const app = new Vue({ |
| | | store, |
| | | ...App |
| | | }) |
| | | |
| | | // å¼å
¥è¯·æ±å°è£
ï¼å°appåæ°ä¼ éå°é
ç½®ä¸ |
| | | require('@/config/http.interceptor.js')(app) |
| | | |
| | | app.$mount() |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name" : "è¥ä¾æé管çç³»ç»", |
| | | "appid" : "__UNI__3D0DC28", |
| | | "description" : "", |
| | | "versionName" : "1.0.1", |
| | | "versionCode" : "100", |
| | | "transformPx" : false, |
| | | /* 5+Appç¹æç¸å
³ */ |
| | | "app-plus" : { |
| | | "usingComponents" : true, |
| | | "nvueStyleCompiler" : "uni-app", |
| | | "compilerVersion" : 3, |
| | | "splashscreen" : { |
| | | "alwaysShowBeforeRender" : true, |
| | | "waiting" : true, |
| | | "autoclose" : true, |
| | | "delay" : 0 |
| | | }, |
| | | /* 模åé
ç½® */ |
| | | "modules" : {}, |
| | | /* åºç¨åå¸ä¿¡æ¯ */ |
| | | "distribute" : { |
| | | /* androidæå
é
ç½® */ |
| | | "android" : { |
| | | "permissions" : [ |
| | | "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
| | | "<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CAMERA\"/>", |
| | | "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | ] |
| | | }, |
| | | /* iosæå
é
ç½® */ |
| | | "ios" : {}, |
| | | /* SDKé
ç½® */ |
| | | "sdkConfigs" : {} |
| | | } |
| | | }, |
| | | /* å¿«åºç¨ç¹æç¸å
³ */ |
| | | "quickapp" : {}, |
| | | /* å°ç¨åºç¹æç¸å
³ */ |
| | | "mp-weixin" : { |
| | | "appid" : "", |
| | | "setting" : { |
| | | "urlCheck" : false |
| | | }, |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-alipay" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-baidu" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-toutiao" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | }, |
| | | "vueVersion" : "2", |
| | | /* h5ä¸è½é
ç½®devServer屿§,éè¦é
ç½®å¯ä¿®æ¹vue.config.jsæä»¶ */ |
| | | "h5" : { |
| | | "template" : "template.h5.html" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "pages": [ //pagesæ°ç»ä¸ç¬¬ä¸é¡¹è¡¨ç¤ºåºç¨å¯å¨é¡µï¼åèï¼https://uniapp.dcloud.io/collocation/pages |
| | | { |
| | | "path": "pages/login/index", |
| | | "style": { |
| | | "navigationBarTitleText": "ç»å½", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationBarTitleText": "é¦é¡µ", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥ä½å°", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/user/list", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¨æ·ç®¡ç", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/user/edit", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¨æ·è¯¦æ
", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/notice/list", |
| | | "style": { |
| | | "navigationBarTitleText": "éç¥å
Œ", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/notice/manage", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¬å管ç", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/notice/detail", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¬å详æ
", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work/notice/edit", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¬å详æ
", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/center/index", |
| | | "style": { |
| | | "navigationBarTitleText": "æç", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/center/profile", |
| | | "style": { |
| | | "navigationBarTitleText": "ä¸ªäººèµæ", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/center/log", |
| | | "style": { |
| | | "navigationBarTitleText": "æä½æ¥å¿", |
| | | "navigationStyle": "custom" |
| | | } |
| | | } |
| | | ], |
| | | "tabBar": { |
| | | "color": "#909399", |
| | | "selectedColor": "#000000", |
| | | "borderStyle": "black", |
| | | "backgroundColor": "#ffffff", |
| | | "list": [{ |
| | | "pagePath": "pages/index/index", |
| | | "iconPath": "static/img/tabbar/home.png", |
| | | "selectedIconPath": "static/img/tabbar/home_art.png", |
| | | "text": "é¦é¡µ" |
| | | }, { |
| | | "pagePath": "pages/work/index", |
| | | "iconPath": "static/img/tabbar/center.png", |
| | | "selectedIconPath": "static/img/tabbar/center_art.png", |
| | | "text": "å·¥ä½å°" |
| | | }, { |
| | | "pagePath": "pages/center/index", |
| | | "iconPath": "static/img/tabbar/user.png", |
| | | "selectedIconPath": "static/img/tabbar/user_art.png", |
| | | "text": "æç" |
| | | }] |
| | | }, |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "uni-app", |
| | | "navigationBarBackgroundColor": "#F8F8F8", |
| | | "backgroundColor": "#F8F8F8", |
| | | "app-plus": { |
| | | "softinputMode": "adjustResize" |
| | | } |
| | | }, |
| | | "easycom": { |
| | | "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <Navbar :hideBtn="true" bgColor="#f3f4f6"></Navbar> |
| | | <view class="profile-top"> |
| | | <view class="user-info"> |
| | | <view> |
| | | <view class="user-info--name">{{ user.nickName }}</view> |
| | | <text class="user-info--account">{{ user.email || user.phonenumber || user.userName }}</text> |
| | | </view> |
| | | <view> |
| | | <u-avatar src="/static/img/avatar.png" size="120rpx"></u-avatar> |
| | | </view> |
| | | </view> |
| | | <view style="padding: 40rpx 40rpx 0 40rpx;"> |
| | | <view class="profile-rule"> |
| | | <u-row> |
| | | <u-col span="8"> |
| | | <view style="color: white; font-size: 20px;">{{ user.dept ? user.dept.deptName : 'æªç¥é¨é¨' }}</view> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <u-button icon="question-circle" text="é®é¢åé¦" style="height: 36px;"></u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="padding: 40rpx; background-color: #fff;"> |
| | | <u-grid> |
| | | <u-grid-item @click="navigateTo('/pages/center/profile')"> |
| | | <u-icon name="account-fill" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">ä¸ªäººèµæ</text> |
| | | </u-grid-item> |
| | | <u-grid-item @click="resetPassword = true"> |
| | | <u-icon name="lock-fill" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">ä¿®æ¹å¯ç </text> |
| | | </u-grid-item> |
| | | <u-grid-item @click="navigateTo('/pages/center/log')"> |
| | | <u-icon name="coupon-fill" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">æä½æ¥å¿</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | |
| | | <view style="padding: 40rpx; margin-top: 300rpx;"> |
| | | <u-row gutter="32"> |
| | | <u-col span="6"> |
| | | <u-button icon="phone" text="èç³»æä»¬" plain></u-button> |
| | | </u-col> |
| | | <u-col span="6"> |
| | | <u-button icon="reload" text="éåº" type="error" @click="logout"></u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | |
| | | <Password :show="resetPassword" @close="resetPassword = false"></Password> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import Password from './password.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | Password, |
| | | }, |
| | | data () { |
| | | return { |
| | | user: {}, |
| | | resetPassword: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.getInfo() |
| | | }, |
| | | methods: { |
| | | getInfo () { |
| | | const app = this |
| | | app.$store.dispatch('Info').then(res => { |
| | | app.user = res.user |
| | | }) |
| | | }, |
| | | navigateTo (url) { |
| | | uni.navigateTo({ url: url }) |
| | | }, |
| | | logout () { |
| | | const app = this |
| | | app.$store.dispatch('Logout').then(res => { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .profile-top { |
| | | background-color: #f3f4f6; |
| | | padding-top: 50rpx; |
| | | } |
| | | |
| | | .profile-rule { |
| | | height: 140rpx; |
| | | line-height: 140rpx; |
| | | padding: 0px 40rpx; |
| | | background-color: $u-main-color; |
| | | border-radius: 16px 16px 0 0; |
| | | box-shadow: 0px 16px 26px rgba(0, 0, 0, .8); |
| | | } |
| | | .btn-text { |
| | | font-size: 28rpx; |
| | | color: #606266; |
| | | } |
| | | |
| | | .user-info { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 40rpx; |
| | | max-width: 100%; |
| | | color: #303133; |
| | | |
| | | &--name { |
| | | font-size: 56rpx; |
| | | font-weight: bold; |
| | | width: 100% |
| | | } |
| | | |
| | | &--account { |
| | | font-size: 26rpx; |
| | | color: #909399; |
| | | } |
| | | |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view style="padding: 40rpx;"> |
| | | <view> |
| | | <u-search placeholder="请è¾å
¥æ¥è¯¢å
容" v-model="params.title" height="60rpx" @search="searchData" @custom="searchData"></u-search> |
| | | </view> |
| | | <view> |
| | | <u-list v-if="logList.length > 0" @scrolltolower="scrolltolower"> |
| | | <u-list-item v-for="(item, index) in logList" :key="index" class="log-item"> |
| | | <view><text style="color: #606266;">æä½å
容ï¼</text><text>{{item.title}}</text></view> |
| | | <view><text style="color: #606266;">请æ±å°åï¼</text><text>{{item.operUrl}}</text></view> |
| | | <view><text style="color: #606266;">æä½å°åï¼</text><text>{{item.operLocation}}</text></view> |
| | | <view><text style="color: #606266;">æä½æ¶é´ï¼</text><text>{{item.operTime}}</text></view> |
| | | </u-list-item> |
| | | </u-list> |
| | | <u-empty v-else></u-empty> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as LogApi from '@/api/center/log' |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | params: { |
| | | pageNum: 0, |
| | | pageSize: 10, |
| | | title: '' |
| | | }, |
| | | logList: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | // å è½½æ¥å¿åè¡¨æ°æ® |
| | | loadData () { |
| | | const app = this |
| | | // é¦å
è·åå½åç»å½è´¦å·ä¿¡æ¯ |
| | | app.$store.dispatch('Info').then(res => { |
| | | app.params.pageNum += 1 |
| | | if (res.user) { |
| | | // åªæ¥è¯¢å½åç¨æ·çæä½æ¥å¿ |
| | | app.params.operName = res.user.userName |
| | | } |
| | | LogApi.operLog(app.params).then(res => { |
| | | app.logList = app.logList.concat(res.rows); |
| | | }) |
| | | }) |
| | | }, |
| | | // æ¥è¯¢æé®å¨ä½ |
| | | searchData () { |
| | | this.params.pageNum = 0 |
| | | this.logList = [] |
| | | this.loadData(); |
| | | }, |
| | | // æ»å¨å页å è½½æ°æ® |
| | | scrolltolower () { |
| | | this.loadData(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .log-item { |
| | | padding: 20rpx 0; |
| | | border-bottom: 0.5px solid #ccc; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-modal :show="show" title="ä¿®æ¹å¯ç " showCancelButton @confirm="confirm" @cancel="cancel"> |
| | | <view class="slot-content"> |
| | | <u--form :model="pwd" ref="uForm" labelWidth="160rpx" labelAlign="left"> |
| | | <u-form-item label="åå¯ç " prop="origiPwd" class="u-border-bottom"> |
| | | <u--input v-model="pwd.origiPwd" type="password" placeholder="请è¾å
¥åå¯ç " border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="æ°å¯ç " prop="newPwd" class="u-border-bottom"> |
| | | <u--input v-model="pwd.newPwd" type="password" placeholder="请è¾å
¥æ°å¯ç " border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="确认å¯ç " prop="confirmPwd" class="u-border-bottom"> |
| | | <u--input v-model="pwd.confirmPwd" type="password" placeholder="请è¾å
¥ç¡®è®¤å¯ç " border="none"></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | | </u-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | show: Boolean |
| | | }, |
| | | data () { |
| | | return { |
| | | pwd: { |
| | | origiPwd: '', |
| | | newPwd: '', |
| | | confirmPwd: '' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | confirm () { |
| | | this.$emit('close') |
| | | }, |
| | | cancel () { |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <Navbar :hideBtn="false" bgColor="#f3f4f6"></Navbar> |
| | | <view style="background-color: #2b85e4; padding: 40rpx;"> |
| | | <view style="width: 140rpx; height: 140rpx; border: 1px solid #fff; border-radius: 50%; margin: 0 auto;"> |
| | | <u-avatar src="/static/img/avatar.png" size="120rpx" style="margin: 10rpx;"></u-avatar> |
| | | </view> |
| | | </view> |
| | | <view style="padding: 40rpx;"> |
| | | <u--form :model="userInfo" ref="uForm" labelWidth="160rpx" labelAlign="left"> |
| | | <u-form-item label="å§å" prop="nickName" class="u-border-bottom"> |
| | | <u--input |
| | | placeholder="请è¾å
¥å
容" |
| | | border="none" |
| | | v-model="userInfo.nickName" |
| | | ></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="æ§å«" prop="sex" class="u-border-bottom"> |
| | | <u-radio-group v-model="userInfo.sex" size="36rpx"> |
| | | <u-radio shape="circle" label="ç·" name="1" labelSize="32rpx"></u-radio> |
| | | <u-radio shape="circle" label="女" name="2" labelSize="32rpx" style="margin-left: 36rpx;"></u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="ææºå·ç " prop="phonenumber" class="u-border-bottom"> |
| | | <u--input |
| | | placeholder="请è¾å
¥å
容" |
| | | border="none" |
| | | v-model="userInfo.phonenumber" |
| | | ></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="é®ç®±" prop="email" class="u-border-bottom"> |
| | | <u--input |
| | | placeholder="请è¾å
¥å
容" |
| | | border="none" |
| | | v-model="userInfo.email" |
| | | ></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | | <view style="padding: 40rpx;"> |
| | | <u-row gutter="32"> |
| | | <u-col span="6"> |
| | | <u-button icon="arrow-left" text="è¿å" plain @click="goBack()"></u-button> |
| | | </u-col> |
| | | <u-col span="6"> |
| | | <u-button icon="checkmark-circle" text="ä¿å" type="primary"></u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | }, |
| | | data () { |
| | | return { |
| | | userInfo: { |
| | | nickName: 'è¥ä¾', |
| | | sex: '1', |
| | | email: 'fastbuild@163.com', |
| | | phonenumber: '18888888888' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | goBack () { |
| | | uni.navigateBack({ delta: 1}); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="sass" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="index-content"> |
| | | <Navbar :hideBtn="true" title="é¦é¡µ" bgColor="#fff" :h5Show="false" :fixed="false"></Navbar> |
| | | <view class="index-block"> |
| | | <view class="index-block-title">è¿è¡ç»è®¡</view> |
| | | <u-row gutter="16"> |
| | | <u-col span="4"> |
| | | <view class="item-tj item-tj-frist"> |
| | | <view style="padding: 16rpx; height: 100%; position: relative;"> |
| | | <view style="display: flex; color: white;"> |
| | | <u-icon name="photo" color="#fff"></u-icon> |
| | | <text>å¨çº¿äººæ°</text> |
| | | </view> |
| | | <view style="position: absolute; bottom: 48rpx; right: 16rpx;"> |
| | | <u-count-to :startVal="0" :endVal="149" :duration="1500" color="#fff" separator=","></u-count-to> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <view class="item-tj item-tj-second"> |
| | | <view style="padding: 16rpx; height: 100%; position: relative;"> |
| | | <view style="display: flex; color: white;"> |
| | | <u-icon name="photo" color="#fff"></u-icon> |
| | | <text>仿¥æ°å¢</text> |
| | | </view> |
| | | <view style="position: absolute; bottom: 48rpx; right: 16rpx;"> |
| | | <u-count-to :startVal="1" :endVal="2349" :duration="1500" color="#fff" separator=","></u-count-to> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <view class="item-tj item-tj-thrid"> |
| | | <view style="padding: 16rpx; height: 100%; position: relative;"> |
| | | <view style="display: flex; color: white;"> |
| | | <u-icon name="photo" color="#fff"></u-icon> |
| | | <text>æ»äººæ°</text> |
| | | </view> |
| | | <view style="position: absolute; bottom: 48rpx; right: 16rpx;"> |
| | | <u-count-to :startVal="1" :endVal="1249350" :duration="1500" color="#fff" separator=","></u-count-to> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="index-block"> |
| | | <view class="index-block-title">è¿7天访é®éç»è®¡</view> |
| | | <view> |
| | | <qiun-data-charts type="line" canvasId="finance_a" :canvas2d="isCanvas2d" :resshow="delayload" |
| | | :opts="{xAxis:{itemCount:12,disableGrid:true},yAxis:{disableGrid:true,data:[{disabled:true}]}}" |
| | | :chartData="historyData" /> |
| | | </view> |
| | | <view class="index-block-title">访é®éç»è®¡</view> |
| | | <view> |
| | | <qiun-data-charts type="bar" canvasId="finance_b" :canvas2d="isCanvas2d" :resshow="delayload" |
| | | :opts="{xAxis:{disabled: true,disableGrid:true},extra:{bar:{barBorderCircle:true,width:20}},legend:{show:false}}" |
| | | :chartData="historyData" /> |
| | | </view> |
| | | </view> |
| | | <view class="index-block"> |
| | | <view class="index-block-title">æ°æ®æ»è§</view> |
| | | <view class="detail_list"> |
| | | <view v-for="(item,index) in detail_list" :key="index" class="detail_item"> |
| | | <view> |
| | | <view class="font-middle">{{item.date}}</view> |
| | | <view class="font-small">{{item.time}}</view> |
| | | </view> |
| | | <view class="icon"><li :class="['iconfont',item.type == 'income'?'icon-income':'icon-expend']"></li></view> |
| | | <view class="right_content"> |
| | | <view class="money">{{item.type == 'income'?'+':'-'}}{{item.money}}</view> |
| | | <view class="text-gray font-middle">{{item.desc}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | |
| | | let _now = new Date(); |
| | | let now_time = {}; |
| | | now_time.year = _now.getFullYear() |
| | | now_time.month = _now.getMonth() + 1 |
| | | now_time.day = _now.getDay() |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | }, |
| | | data () { |
| | | return { |
| | | isCanvas2d: true, |
| | | delayload: false, |
| | | historyData: { |
| | | "categories": [ |
| | | "1æ", |
| | | "2æ", |
| | | "2æ", |
| | | "4æ", |
| | | "5æ" |
| | | ], |
| | | "series": [ |
| | | { |
| | | "name": "æ¶å
¥æ
åµ", |
| | | "data": [1601,1840.5,1900,1760,1500.85], |
| | | "type": "line", |
| | | "style": "curve", |
| | | "color": "#4ECDB6", |
| | | "unit":"" |
| | | } |
| | | ], |
| | | "yAxis":[ |
| | | {"calibration":true,"position":"left","title":"åä½/å
","titleFontSize":12,"unit":"","tofix":0,"min":0,"disableGrid":true} |
| | | ] |
| | | }, |
| | | detail_list:[ |
| | | {date:now_time.month + "-01",time:"11:01","type":"extend",money:"10.00",desc:"é¶è¡å¡è½¬åº"}, |
| | | {date:now_time.month + "-01",time:"13:45","type":"income",money:"18.00",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | {date:now_time.month + "-02",time:"06:21","type":"extend",money:"123.45",desc:"ä¿¡ç¨å¡è½¬åº"}, |
| | | {date:now_time.month + "-03",time:"07:38","type":"income",money:"23.00",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | {date:now_time.month + "-08",time:"16:28","type":"extend",money:"23.56",desc:"ä¿¡ç¨å¡è½¬åº"}, |
| | | {date:now_time.month + "-09",time:"15:25","type":"income",money:"850.12",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | {date:now_time.month + "-09",time:"18:52","type":"income",money:"1.88",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | {date:now_time.month + "-11",time:"21:12","type":"extend",money:"220.21",desc:"é¶è¡å¡è½¬åº"}, |
| | | {date:now_time.month + "-12",time:"13:08","type":"income",money:"32.28",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | {date:now_time.month + "-12",time:"12:41","type":"extend",money:"122.12",desc:"ä¿¡ç¨å¡è½¬åº"}, |
| | | {date:now_time.month + "-13",time:"17:21","type":"income",money:"10.00",desc:"é¶è¡å¡æ¶å
¥"}, |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .index-content { |
| | | background-color: #f3f4f6; |
| | | min-height: 100vh; |
| | | } |
| | | .index-block { |
| | | padding: 40rpx; |
| | | background-color: #fff; |
| | | } |
| | | .index-block-title { |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | padding: 0 0 40rpx 0; |
| | | } |
| | | .item-tj { |
| | | width: 100%; |
| | | height: 160rpx; |
| | | border-radius: 16rpx; |
| | | |
| | | &-frist { |
| | | background-color: rgba($color: #2979ff, $alpha: 0.8); |
| | | // background-image: url('/static/img/bg/qb.png'); |
| | | } |
| | | |
| | | &-second { |
| | | background-color: rgba($color: #303133, $alpha: 0.8); |
| | | // background-image: url('/static/img/bg/qb.png'); |
| | | } |
| | | |
| | | &-thrid { |
| | | background-color: rgba($color: #19be6b, $alpha: 0.8); |
| | | // background-image: url('/static/img/bg/qb.png'); |
| | | } |
| | | } |
| | | .detail_list{ |
| | | height: 700rpx; |
| | | overflow: auto; |
| | | color: #9E9E9E; |
| | | .detail_item{ |
| | | display: flex; |
| | | margin: 20rpx 0; |
| | | align-items: center; |
| | | .icon{ |
| | | width: 30%; |
| | | text-align: center; |
| | | li{ |
| | | font-size: 80rpx; |
| | | } |
| | | } |
| | | .right_content{ |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | .icon-income{ |
| | | color:#4AABF9; |
| | | } |
| | | .icon-expend{ |
| | | color: #E45521; |
| | | } |
| | | .money{ |
| | | color: #000; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .t-login { |
| | | width: 650rpx; |
| | | margin: 0 auto; |
| | | font-size: 28rpx; |
| | | color: #000; |
| | | } |
| | | |
| | | /deep/ .login-form-item .u-input { |
| | | padding: 0 10px 0 62px; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | margin-bottom: 26px; |
| | | background: #f8f7fc; |
| | | border: 1px solid #e9e9e9; |
| | | font-size: 14px; |
| | | border-radius: 26px; |
| | | } |
| | | |
| | | .t-captcha { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-evenly; |
| | | } |
| | | .t-captcha-img { |
| | | margin-left: 16px; |
| | | width: 102px; |
| | | height: 44px; |
| | | } |
| | | .img-a { |
| | | position: absolute; |
| | | width: 100%; |
| | | top: -150rpx; |
| | | right: 0; |
| | | z-index: -999; |
| | | } |
| | | .img-b { |
| | | position: absolute; |
| | | width: 50%; |
| | | bottom: 0; |
| | | left: -50rpx; |
| | | z-index: -999; |
| | | } |
| | | |
| | | .t-login button { |
| | | font-size: 28rpx; |
| | | background: #5677fc; |
| | | color: #fff; |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | border-radius: 50rpx; |
| | | box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2); |
| | | } |
| | | |
| | | .t-login .t-b { |
| | | text-align: left; |
| | | font-size: 56rpx; |
| | | color: #000; |
| | | padding: 300rpx 0 20rpx 0; |
| | | font-weight: bold; |
| | | } |
| | | .t-login .t-b2 { |
| | | text-align: left; |
| | | font-size: 32rpx; |
| | | color: #aaaaaa; |
| | | padding: 0rpx 0 60rpx 0; |
| | | } |
| | | |
| | | .t-login .uni-input-placeholder { |
| | | color: #000 !important; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- èè²ç®æ´ç»å½é¡µé¢ --> |
| | | <template> |
| | | <view class="t-login"> |
| | | <!-- 页é¢è£
饰å¾ç --> |
| | | <image class="img-a" src="/static/img/b-1.png"></image> |
| | | <image class="img-b" src="/static/img/b-2.png"></image> |
| | | <!-- æ é¢ --> |
| | | <view class="t-b">{{ title }}</view> |
| | | <view class="t-b2">{{ subTitle }}</view> |
| | | <form class="cl"> |
| | | <!-- ç»å½è´¦å· --> |
| | | <view class="login-form-item"> |
| | | <u-input v-model="username" placeholder="请è¾å
¥ç»å½ç¨æ·å" maxlength="30"> |
| | | <u-icon slot="prefix" name="account" size="35px"></u-icon> |
| | | </u-input> |
| | | </view> |
| | | <!-- ç»å½å¯ç --> |
| | | <view class="login-form-item"> |
| | | <u-input v-model="password" type="password" placeholder="请è¾å
¥ç»å½å¯ç " maxlength="16"> |
| | | <u-icon slot="prefix" name="lock" size="35px"></u-icon> |
| | | </u-input> |
| | | </view> |
| | | <!-- å¾å½¢éªè¯ç --> |
| | | <view class="login-form-item t-captcha"> |
| | | <u-input v-model="captchaCode" type="number" placeholder="请è¾å
¥éªè¯ç " maxlength="4"> |
| | | <u-icon slot="prefix" name="fingerprint" size="35px"></u-icon> |
| | | </u-input> |
| | | <image :src="captcha" @click="getCaptcha" class="t-captcha-img"></image> |
| | | </view> |
| | | <button @tap="login()">ç» å½</button> |
| | | </form> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import * as CaptchaApi from '@/api/captcha' |
| | | import { isEmpty } from '@/utils/verify.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | title: 'è¥ä¾æé管çç³»ç»', |
| | | subTitle: '欢è¿åæ¥ï¼å¼å§å·¥ä½å§ï¼', |
| | | // å¾å½¢éªè¯ç ä¿¡æ¯ |
| | | captcha: null, |
| | | // ç»å½è´¦å· |
| | | username: 'admin', |
| | | // å¯ç |
| | | password: 'admin123', |
| | | // å¾å½¢éªè¯ç |
| | | captchaCode: '', |
| | | uuid: '' |
| | | }; |
| | | }, |
| | | created() { |
| | | // è·åå¾å½¢éªè¯ç |
| | | this.getCaptcha() |
| | | }, |
| | | methods: { |
| | | // è·åå¾å½¢éªè¯ç |
| | | getCaptcha() { |
| | | const app = this |
| | | CaptchaApi.image().then(result => { |
| | | app.captcha = 'data:image/gif;base64,' + result.img |
| | | app.uuid = result.uuid |
| | | }) |
| | | }, |
| | | // éªè¯è¡¨åå
容 |
| | | validItem() { |
| | | const app = this |
| | | if (isEmpty(app.username)) { |
| | | uni.$u.toast('请è¾å
¥ç»å½ç¨æ·å') |
| | | return false |
| | | } |
| | | if (isEmpty(app.password)) { |
| | | uni.$u.toast('请è¾å
¥ç»å½å¯ç ') |
| | | return false |
| | | } |
| | | if (isEmpty(app.captchaCode)) { |
| | | uni.$u.toast('请è¾å
¥éªè¯ç ') |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | // 确认ç»å½ |
| | | login() { |
| | | const app = this |
| | | let valid = app.validItem(); |
| | | if (valid) { |
| | | app.isLoading = true |
| | | app.$store.dispatch('Login', { |
| | | username: app.username, |
| | | password: app.password, |
| | | code: app.captchaCode, |
| | | uuid: app.uuid |
| | | }).then(result => { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index', |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | app.captchaCode = '' |
| | | app.getCaptcha() |
| | | }) |
| | | .finally(() => app.isLoading = false) |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | @import 'index.scss'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <Navbar title="å·¥ä½å°" bgColor="#fff" :hideBtn="true" :h5Show="false"></Navbar> |
| | | <view class="mobile-item-container"> |
| | | <view style="font-size: 40rpx; font-weight: bold; padding: 0 0 40rpx 0;">å¾
å¤ç</view> |
| | | <u-grid col="3"> |
| | | <u-grid-item @click="navigateTo('/pages/work/notice/list')"> |
| | | <view style="position: relative;"> |
| | | <u-icon name="chat" color="#2979ff" size="60rpx"></u-icon> |
| | | <u-badge style="position: absolute; top: -5rpx; right: -10rpx;" type="error" numberType="overflow" max="99" v-model="todo.notice"></u-badge> |
| | | </view> |
| | | <text class="btn-text">éç¥å
Œ</text> |
| | | </u-grid-item> |
| | | <u-grid-item> |
| | | <view style="position: relative;"> |
| | | <u-icon name="list-dot" color="#2979ff" size="60rpx"></u-icon> |
| | | <u-badge style="position: absolute; top: -5rpx; right: -10rpx;" type="error" numberType="overflow" max="99" v-model="todo.task"></u-badge> |
| | | </view> |
| | | <text class="btn-text">å¾
åä»»å¡</text> |
| | | </u-grid-item> |
| | | <u-grid-item> |
| | | <view style="position: relative;"> |
| | | <u-icon name="warning" color="#2979ff" size="60rpx"></u-icon> |
| | | <u-badge style="position: absolute; top: -5rpx; right: -10rpx;" type="error" numberType="overflow" max="99" v-model="todo.error"></u-badge> |
| | | </view> |
| | | <text class="btn-text">å¼å¸¸ä¿¡æ¯</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | <Gap /> |
| | | <view class="mobile-item-container"> |
| | | <view style="font-size: 40rpx; font-weight: bold; padding: 0 0 40rpx 0;">ç»è®¡æ¥è¡¨</view> |
| | | <u-grid col="3"> |
| | | <u-grid-item> |
| | | <u-icon name="star" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">访é®éç»è®¡</text> |
| | | </u-grid-item> |
| | | <u-grid-item> |
| | | <u-icon name="share-square" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">å享ç»è®¡</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | <Gap /> |
| | | <view style="padding: 40rpx; background-color: #fff; margin-top: 40rpx; min-height: 600rpx;"> |
| | | <u-tabs |
| | | :activeStyle="{ |
| | | color: '#303133', |
| | | fontSize: '40rpx', |
| | | fontWeight: 'bold', |
| | | transform: 'scale(1.05)' |
| | | }" |
| | | :inactiveStyle="{ |
| | | color: '#606266', |
| | | fontSize: '36rpx', |
| | | transform: 'scale(1)' |
| | | }" |
| | | :list="tabs" |
| | | @change="tabChange"> |
| | | </u-tabs> |
| | | <view v-if="activeKey == 'work'" style="padding: 40rpx 0;"> |
| | | <u-grid col="3"> |
| | | <u-grid-item @click="navigateTo('/pages/work/notice/manage')"> |
| | | <u-icon name="edit-pen" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">å
¬å管ç</text> |
| | | </u-grid-item> |
| | | <u-grid-item @click="navigateTo('/pages/work/user/list')"> |
| | | <u-icon name="plus-people-fill" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">ç¨æ·ç®¡ç</text> |
| | | </u-grid-item> |
| | | <u-grid-item> |
| | | <u-icon name="tags" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">é¨é¨ç®¡ç</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | <u-grid col="3" style="margin-top: 40rpx;"> |
| | | <u-grid-item> |
| | | <u-icon name="bookmark" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">å²ä½ç®¡ç</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | <view v-if="activeKey == 'plugin'" style="padding: 40rpx 0;"> |
| | | <u-grid col="3"> |
| | | <u-grid-item> |
| | | <u-icon name="order" color="#2979ff" size="60rpx"></u-icon> |
| | | <text class="btn-text">è¡¨åæ ·ä¾</text> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import Gap from '@/components/gap/Gap' |
| | | |
| | | export default { |
| | | components: { |
| | | Gap, |
| | | Navbar, |
| | | }, |
| | | data () { |
| | | return { |
| | | activeKey: 'work', |
| | | tabs: [{ |
| | | name: 'æ¥å¸¸å·¥ä½', |
| | | key: 'work' |
| | | }, { |
| | | name: 'æä»¶', |
| | | key: 'plugin' |
| | | }], |
| | | todo: { |
| | | notice: 2, |
| | | task: 5, |
| | | error: 1 |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | tabChange (item) { |
| | | this.activeKey = item.key; |
| | | }, |
| | | navigateTo (url) { |
| | | uni.navigateTo({ url: url }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar title="å
¬å详æ
" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <view style="font-size: 40rpx; font-weight: bold;">{{notice.noticeTitle}}</view> |
| | | <view style="display: flex; font-size: 12px; color: #909399;"> |
| | | <u-icon name="clock" size="12"></u-icon> |
| | | <text>{{notice.createTime}}</text> |
| | | <u-icon name="account" size="12"></u-icon> |
| | | <text>{{notice.remark}}</text> |
| | | </view> |
| | | <view style="margin-top: 40rpx;"> |
| | | <u-parse :content="notice.noticeContent"></u-parse> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as NoticeApi from '@/api/work/notice' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | }, |
| | | data () { |
| | | return { |
| | | noticeId: undefined, |
| | | notice: {} |
| | | } |
| | | }, |
| | | onLoad (params) { |
| | | this.noticeId = params.id |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | loadData () { |
| | | const app = this |
| | | NoticeApi.noticeById(this.noticeId).then(res => { |
| | | app.notice = res.data |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar :title="noticeId ? 'ä¿®æ¹å
¬å' : 'æ°å¢å
Œ'" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <u--form ref="noticeForm" :model="notice" :rules="rules" labelPosition="left"> |
| | | <u-form-item label="æ é¢" prop="noticeTitle" borderBottom> |
| | | <u--textarea v-model="notice.noticeTitle" placeholder="请è¾å
¥æ é¢" :count="false" :maxlength="30" :autoHeight="true" confirmType="done"></u--textarea> |
| | | </u-form-item> |
| | | <u-form-item label="ç±»å" prop="noticeType" borderBottom @click="actionShow = true;"> |
| | | <u--input v-model="noticeTypeName" disabled disabledColor="#ffffff" placeholder="è¯·éæ©ç±»å" border="none"></u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="ç¶æ" prop="status" borderBottom> |
| | | <u-radio-group v-model="notice.status"> |
| | | <u-radio shape="circle" label="æ£å¸¸" name="0" checked></u-radio> |
| | | <u-radio shape="circle" label="å
³é" name="1"></u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="æ£æ" prop="noticeContent"> |
| | | <u--textarea v-model="notice.noticeContent" placeholder="请è¾å
¥æ é¢" :count="true" :maxlength="600" confirmType="done"></u--textarea> |
| | | </u-form-item> |
| | | </u--form> |
| | | <u-action-sheet :actions="actions" :title="actionTitle" :show="actionShow" @close="actionShow = false" @select="actionSelect"></u-action-sheet> |
| | | <u-row :gutter="16" style="margin-top: 36px;"> |
| | | <u-col :span="6"> |
| | | <u-button v-if="noticeId" type="error" text="å é¤" @click="del"></u-button> |
| | | <u-button v-else icon="arrow-left" text="è¿å" plain @click="goBack()"></u-button> |
| | | </u-col> |
| | | <u-col :span="6"> |
| | | <u-button type="primary" text="æäº¤" @click="submit"></u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as NoticeApi from '@/api/work/notice' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | }, |
| | | data () { |
| | | return { |
| | | noticeId: undefined, |
| | | notice: { |
| | | noticeTitle: '', |
| | | status: '0', |
| | | noticeContent: '' |
| | | }, |
| | | actionShow: false, |
| | | actions: [{ |
| | | name: 'éç¥', |
| | | value: '1' |
| | | }, { |
| | | name: 'å
Œ', |
| | | value: '2' |
| | | }], |
| | | actionTitle: '', |
| | | noticeTypeName: null, |
| | | rules: { |
| | | noticeTitle: [ { required: true, message: '请è¾å
¥å
¬åæ é¢', trigger: ['blur', 'change'] } ], |
| | | noticeType: [ { required: true, message: 'è¯·éæ©å
¬åç±»å', trigger: ['blur', 'change'] } ], |
| | | status: [ { required: true, message: 'è¯·éæ©å
¬åç¶æ', trigger: ['blur', 'change'] } ], |
| | | noticeContent: [ { required: true, message: '请è¾å
¥å
¬åæ£æ', trigger: ['blur', 'change'] } ], |
| | | } |
| | | } |
| | | }, |
| | | onLoad (params) { |
| | | this.noticeId = params.id |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | loadData () { |
| | | if (this.noticeId) { |
| | | const app = this |
| | | NoticeApi.noticeById(this.noticeId).then(res => { |
| | | app.notice = res.data |
| | | }) |
| | | } |
| | | }, |
| | | del () { |
| | | NoticeApi.noticeDelete(this.noticeId).then(res => { |
| | | uni.showToast({ title: 'ä¿åæåï¼' }) |
| | | }) |
| | | }, |
| | | submit () { |
| | | this.$refs.noticeForm.validate().then(res => { |
| | | if (this.noticeId) { |
| | | NoticeApi.noticeModify(this.notice).then(res => { |
| | | uni.showToast({ title: 'æäº¤æåï¼' }) |
| | | }) |
| | | } else { |
| | | NoticeApi.noticeAdd(this.notice).then(res => { |
| | | uni.showToast({ title: 'æäº¤æåï¼' }) |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | actionSelect (item) { |
| | | this.noticeTypeName = item.name; |
| | | this.notice.noticeType = item.value; |
| | | this.$refs.noticeForm.validateField('noticeType'); |
| | | }, |
| | | goBack () { |
| | | uni.navigateBack({ delta: 1}); |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar title="éç¥å
Œ" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <u-tabs :activeStyle="activeStyle" :list="tabs" @change="tabChange"></u-tabs> |
| | | <!-- æªè¯» --> |
| | | <view v-if="activeKey == 'unread'"> |
| | | <view style="padding: 16px 0 10px;"> |
| | | <view class="notice-item-tips"> |
| | | <text>éç¥</text> |
| | | <u-tag text="1" size="mini" type="primary" style="margin: 0 8px;"></u-tag> |
| | | <text>æ¡ï¼å
Œ</text> |
| | | <u-tag text="1" size="mini" type="success" style="margin: 0 8px;"></u-tag> |
| | | <text>æ¡ï¼å
± 2 æ¡ã</text> |
| | | </view> |
| | | </view> |
| | | <Record :list="list" @click="toDetail"></Record> |
| | | </view> |
| | | <!-- 已读 --> |
| | | <view v-if="activeKey == 'read'"> |
| | | <view style="padding: 16px 0 10px;"> |
| | | <u-search :show-action="true" actionText="æç´¢" :animation="true" shape="square" height="40px"></u-search> |
| | | </view> |
| | | <Record :list="[]" @click="toDetail"></Record> |
| | | </view> |
| | | <!-- å
¨é¨ --> |
| | | <view v-if="activeKey == 'all'"> |
| | | <view style="padding: 16px 0 10px;"> |
| | | <u-search :show-action="true" actionText="æç´¢" :animation="true" shape="square" height="40px"></u-search> |
| | | </view> |
| | | <Record :list="list" @click="toDetail"></Record> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as NoticeApi from '@/api/work/notice' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import Record from './record' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | Record, |
| | | }, |
| | | data () { |
| | | return { |
| | | activeKey: 'unread', |
| | | tabs: [{ |
| | | name: 'æªè¯»', |
| | | key: 'unread', |
| | | badge: { |
| | | value: 2, |
| | | } |
| | | }, { |
| | | name: '已读', |
| | | key: 'read' |
| | | }, { |
| | | name: 'å
¨é¨', |
| | | key: 'all' |
| | | }], |
| | | params: { |
| | | pageNum: 0, |
| | | pageSize: 10 |
| | | }, |
| | | list: [], |
| | | activeStyle: { |
| | | color: '#303133', |
| | | fontSize: '20px', |
| | | fontWeight: 'bold', |
| | | transform: 'scale(1.05)' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | // å è½½éç¥å
¬åæ°æ® |
| | | loadData () { |
| | | const app = this |
| | | this.params.pageNum += 1; |
| | | NoticeApi.noticeList(this.params).then(res => { |
| | | app.list = res.rows; |
| | | }) |
| | | }, |
| | | tabChange (item) { |
| | | this.activeKey = item.key; |
| | | this.params.pageNum = 0; |
| | | this.loadData(); |
| | | }, |
| | | // æ»å¨å页å è½½æ°æ® |
| | | scrolltolower () { |
| | | this.loadData(); |
| | | }, |
| | | toDetail (notice) { |
| | | uni.navigateTo({ url: '/pages/work/notice/detail?id=' + notice.noticeId }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .notice-item-tips { |
| | | border-radius: 8px; |
| | | background-color: #f4f4f5; |
| | | padding: 9px 16px; |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar title="å
¬å管ç" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <Tabs :tabs="tabs" @change="tabChange" style="margin-bottom: 16px;"></Tabs> |
| | | <Record v-if="activeKey == 'draft'" :list="list" @click="navigateTo"></Record> |
| | | <Record v-if="activeKey == 'published'" :list="list" @click="navigateTo"></Record> |
| | | <FloatButton type="primary" icon="plus" @click="navigateTo"></FloatButton> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as NoticeApi from '@/api/work/notice' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import FloatButton from '@/components/button/FloatButton' |
| | | import Tabs from '@/components/tabs/Tabs' |
| | | import Record from './record' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | FloatButton, |
| | | Tabs, |
| | | Record, |
| | | }, |
| | | data () { |
| | | return { |
| | | activeKey: 'draft', |
| | | tabs: [{ |
| | | name: 'è稿', |
| | | key: 'draft', |
| | | }, { |
| | | name: 'å·²åå¸', |
| | | key: 'published' |
| | | }], |
| | | params: { |
| | | pageNum: 0, |
| | | pageSize: 10 |
| | | }, |
| | | list: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | // å è½½éç¥å
¬åæ°æ® |
| | | loadData () { |
| | | const app = this |
| | | this.params.pageNum += 1; |
| | | NoticeApi.noticeList(this.params).then(res => { |
| | | app.list = res.rows; |
| | | }) |
| | | }, |
| | | // æ»å¨å页å è½½æ°æ® |
| | | scrolltolower () { |
| | | this.loadData(); |
| | | }, |
| | | tabChange (tab) { |
| | | this.activeKey = tab.key; |
| | | this.params.pageNum = 0; |
| | | this.loadData(); |
| | | }, |
| | | navigateTo (notice) { |
| | | if (notice) { |
| | | uni.navigateTo({ url: '/pages/work/notice/edit?id=' + notice.noticeId }) |
| | | } else { |
| | | uni.navigateTo({ url: '/pages/work/notice/edit' }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .list-item { |
| | | padding: 20rpx 0; |
| | | border-bottom: 0.5px solid #ccc; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view v-if="list && list.length > 0"> |
| | | <u-cell v-for="(item, index) in list" :key="index" :isLink="true" :border="true" @click="$emit('click', item)"> |
| | | <u-avatar slot="icon" :bg-color="item.noticeType == 2 ? '#2979ff' : '#19be6b'" :text="item.noticeType == 2 ? 'å
¬' : 'é'" shape="square"></u-avatar> |
| | | <view slot="title" class="notice-record-title">{{item.noticeTitle}}</view> |
| | | <view slot="label" class="notice-record-desc"> |
| | | <view style="display: flex;"> |
| | | <u-icon name="clock" size="12"></u-icon> |
| | | <text>{{item.createTime}}</text> |
| | | </view> |
| | | <view style="display: flex; margin-left: 16px;"> |
| | | <u-icon name="account" size="12"></u-icon> |
| | | <text>{{item.remark}}</text> |
| | | </view> |
| | | </view> |
| | | </u-cell> |
| | | <!-- <u-loadmore :status="status" /> --> |
| | | </view> |
| | | <u-empty v-else></u-empty> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | list: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | status: String |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | /deep/.u-cell__body { |
| | | padding: 8px 0 !important; |
| | | } |
| | | .notice-record { |
| | | display: flex; |
| | | padding: 16px 0; |
| | | |
| | | &-content { |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | &-title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | &-title .read { |
| | | color: #ccc; |
| | | } |
| | | |
| | | &-desc { |
| | | padding: 4px 0; |
| | | font-size: 12px; |
| | | color: #909399; |
| | | display: flex; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar :title="userId ? 'ä¿®æ¹ç¨æ·' : 'æ°å¢ç¨æ·'" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <u--form ref="form" :model="userInfo" :rules="rules" labelPosition="left" labelWidth="80"> |
| | | <u-form-item label="ç¨æ·æµç§°" prop="nickName" borderBottom> |
| | | <u-input v-model="userInfo.nickName" placeholder="请è¾å
¥ç¨æ·æµç§°" :maxlength="30" border="none"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="å½å±é¨é¨" prop="deptId" borderBottom @click="actionShow = true;"> |
| | | <u--input v-model="noticeTypeName" disabled disabledColor="#ffffff" placeholder="è¯·éæ©ç±»å" border="none"></u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="ç¶æ" prop="status" borderBottom> |
| | | <u-radio-group v-model="userInfo.status"> |
| | | <u-radio shape="circle" label="æ£å¸¸" name="0" checked></u-radio> |
| | | <u-radio shape="circle" label="å
³é" name="1"></u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="æ£æ" prop="noticeContent"> |
| | | <u--textarea v-model="userInfo.noticeContent" placeholder="请è¾å
¥æ é¢" :count="true" :maxlength="600" confirmType="done"></u--textarea> |
| | | </u-form-item> |
| | | </u--form> |
| | | <u-action-sheet title="é¨é¨éæ©" :show="actionShow" @close="actionShow = false"> |
| | | <qian-tree ref="tkitree" confirmColor="#4e8af7" /> |
| | | </u-action-sheet> |
| | | <u-row :gutter="16" style="margin-top: 36px;"> |
| | | <u-col :span="6"> |
| | | <u-button v-if="userId" type="error" text="å é¤" @click="del"></u-button> |
| | | <u-button v-else icon="arrow-left" text="è¿å" plain @click="goBack()"></u-button> |
| | | </u-col> |
| | | <u-col :span="6"> |
| | | <u-button type="primary" text="æäº¤" @click="submit"></u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as UserManageApi from '@/api/work/userManage' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import qianTree from "@/components/qian-tree/qian-tree.vue" |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | qianTree |
| | | }, |
| | | data () { |
| | | return { |
| | | userId: undefined, |
| | | userInfo: { |
| | | noticeTitle: '', |
| | | status: '0', |
| | | noticeContent: '' |
| | | }, |
| | | actionShow: false, |
| | | actions: [{ |
| | | name: 'éç¥', |
| | | value: '1' |
| | | }, { |
| | | name: 'å
Œ', |
| | | value: '2' |
| | | }], |
| | | actionTitle: '', |
| | | noticeTypeName: null, |
| | | rules: { |
| | | noticeTitle: [ { required: true, message: '请è¾å
¥å
¬åæ é¢', trigger: ['blur', 'change'] } ], |
| | | noticeType: [ { required: true, message: 'è¯·éæ©å
¬åç±»å', trigger: ['blur', 'change'] } ], |
| | | status: [ { required: true, message: 'è¯·éæ©å
¬åç¶æ', trigger: ['blur', 'change'] } ], |
| | | noticeContent: [ { required: true, message: '请è¾å
¥å
¬åæ£æ', trigger: ['blur', 'change'] } ], |
| | | } |
| | | } |
| | | }, |
| | | onLoad (params) { |
| | | this.userId = params.id |
| | | this.loadData() |
| | | }, |
| | | methods: { |
| | | loadData () { |
| | | if (this.userId) { |
| | | const app = this |
| | | UserManageApi.userById(this.userId).then(res => { |
| | | app.userInfo = res.data |
| | | }) |
| | | } |
| | | }, |
| | | del () { |
| | | NoticeApi.noticeDelete(this.userId).then(res => { |
| | | uni.showToast({ title: 'ä¿åæåï¼' }) |
| | | }) |
| | | }, |
| | | submit () { |
| | | this.$refs.noticeForm.validate().then(res => { |
| | | if (this.userId) { |
| | | NoticeApi.noticeModify(this.notice).then(res => { |
| | | uni.showToast({ title: 'æäº¤æåï¼' }) |
| | | }) |
| | | } else { |
| | | NoticeApi.noticeAdd(this.notice).then(res => { |
| | | uni.showToast({ title: 'æäº¤æåï¼' }) |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | actionSelect (item) { |
| | | this.noticeTypeName = item.name; |
| | | this.userInfo.noticeType = item.value; |
| | | this.$refs.noticeForm.validateField('noticeType'); |
| | | }, |
| | | goBack () { |
| | | uni.navigateBack({ delta: 1}); |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="mobile-item-container"> |
| | | <Navbar title="ç¨æ·ç®¡ç" bgColor="#fff" :h5Show="false"></Navbar> |
| | | <view style="padding: 16px 0 10px;"> |
| | | <u-search :show-action="true" actionText="æç´¢" :animation="true" height="40px"></u-search> |
| | | </view> |
| | | <view v-if="list && list.length > 0"> |
| | | <u-cell v-for="(item, index) in list" :key="index" :isLink="true" :border="true" @click="navigateTo(item)"> |
| | | <u-avatar slot="icon" v-if="item.avatar" :src="item.avatar"></u-avatar> |
| | | <u-avatar slot="icon" v-else :text="item.remark.substring(0, 1)" randomBgColor></u-avatar> |
| | | <view slot="title"> |
| | | <view style="display: flex; padding: 8px 0;"> |
| | | <text style="font-size: 18px; font-weight: bold;">{{item.remark}}</text> |
| | | <u-tag :text="item.delFlag == 0 ? 'å¯ç¨' : 'åç¨'" :type="item.delFlag == 0 ? 'primary' : 'error'" shape="circle" size="mini" style="margin-left: 8px;"></u-tag> |
| | | </view> |
| | | <view style="display: flex; justify-content:space-between;"> |
| | | <text>é¨é¨ï¼{{item.dept.deptName}}</text> |
| | | <text>çµè¯ï¼{{item.phonenumber}}</text> |
| | | </view> |
| | | <view> |
| | | <text>é®ä»¶ï¼{{item.email}}</text> |
| | | </view> |
| | | </view> |
| | | <view slot="label"> |
| | | </view> |
| | | </u-cell> |
| | | <!-- <u-loadmore :status="status" /> --> |
| | | </view> |
| | | <u-empty v-else></u-empty> |
| | | <FloatButton type="primary" icon="plus" @click="navigateTo"></FloatButton> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as UserManageApi from '@/api/work/userManage' |
| | | import Navbar from '@/components/navbar/Navbar' |
| | | import FloatButton from '@/components/button/FloatButton' |
| | | |
| | | export default { |
| | | components: { |
| | | Navbar, |
| | | FloatButton |
| | | }, |
| | | data () { |
| | | return { |
| | | params: { |
| | | pageNum: 0, |
| | | pageSize: 10 |
| | | }, |
| | | list: [] |
| | | } |
| | | }, |
| | | onLoad () { |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | // å è½½ç¨æ·åè¡¨æ°æ® |
| | | loadData () { |
| | | const app = this |
| | | this.params.pageNum += 1; |
| | | UserManageApi.userList(this.params).then(res => { |
| | | app.list = res.rows; |
| | | }) |
| | | }, |
| | | navigateTo (user) { |
| | | if (user) { |
| | | uni.navigateTo({ url: '/pages/work/user/edit?id=' + user.userId }) |
| | | } else { |
| | | uni.navigateTo({ url: '/pages/work/user/edit' }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* èªå®ä¹æ ·å¼ */ |
| | | .mobile-item-container { |
| | | padding: 16px; |
| | | background-color: #fff; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue' |
| | | import Vuex from 'vuex' |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | | const files = require.context("./modules", false, /\.js$/); |
| | | let modules = { |
| | | state: {}, |
| | | mutations: {}, |
| | | actions: {}, |
| | | getters: {} |
| | | }; |
| | | |
| | | files.keys().forEach((key) => { |
| | | Object.assign(modules.state, files(key)["state"] || {}); |
| | | Object.assign(modules.mutations, files(key)["mutations"] || {}); |
| | | Object.assign(modules.actions, files(key)["actions"] || {}); |
| | | Object.assign(modules.getters, files(key)["getters"] || {}); |
| | | }); |
| | | const store = new Vuex.Store(modules); |
| | | export default store; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import storage from '@/utils/storage' |
| | | |
| | | export const state = { |
| | | systemInfo: null |
| | | } |
| | | |
| | | export const mutations = { |
| | | SET_SYSTEM_INFO: (state, value) => { |
| | | state.systemInfo = value |
| | | }, |
| | | } |
| | | |
| | | export const actions = { |
| | | // è·åç¨æ·ç»ç«¯ç³»ç»ä¿¡æ¯ |
| | | SystemInfo ({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | if (state.info) { |
| | | resolve(res) |
| | | } else { |
| | | uni.getSystemInfo({ |
| | | success (res) { |
| | | commit('SET_SYSTEM_INFO', res) |
| | | // ä¿¡æ¯åå
¥ç¼åï¼æææ1å¤©ï¼ |
| | | storage.set('SYSTEM_INFO', res, 86400); |
| | | resolve(res) |
| | | }, |
| | | fail (err) { |
| | | reject(err) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | |
| | | export const getters = { |
| | | |
| | | getSystemInfo (state) { |
| | | if (state.systemInfo) { |
| | | return state.systemInfo |
| | | } else if (storage.get('SYSTEM_INFO')) { |
| | | return JSON.parse(storage.get('SYSTEM_INFO')) |
| | | } |
| | | return {} |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import storage from '@/utils/storage' |
| | | import * as LoginApi from '@/api/login' |
| | | import * as UserApi from '@/api/user' |
| | | |
| | | // ç»éæååæ§è¡ |
| | | const loginSuccess = (commit, { token }) => { |
| | | // è¿ææ¶é´30天 |
| | | const expiryTime = 30 * 86400 |
| | | // ä¿åtokneåuserIdå°ç¼å |
| | | storage.set(ACCESS_TOKEN, token, expiryTime) |
| | | // è®°å½å°storeå
¨å±åé |
| | | commit('SET_TOKEN', token) |
| | | } |
| | | |
| | | export const state = { |
| | | // ç¨æ·è®¤è¯token |
| | | token: '', |
| | | // ç¨æ·ä¿¡æ¯ |
| | | userInfo: null |
| | | } |
| | | |
| | | export const mutations = { |
| | | SET_TOKEN: (state, value) => { |
| | | state.token = value |
| | | }, |
| | | SET_USER: (state, value) => { |
| | | state.userInfo = value |
| | | }, |
| | | } |
| | | |
| | | export const actions = { |
| | | |
| | | // ç¨æ·ç»å½(æ®éç»å½: è¾å
¥è´¦å·ãå¯ç åéªè¯ç ) |
| | | Login({ commit }, data) { |
| | | return new Promise((resolve, reject) => { |
| | | LoginApi.login(data, { custom: { catch: true } }).then(response => { |
| | | const result = response; |
| | | loginSuccess(commit, result) |
| | | resolve(response) |
| | | }).catch(reject) |
| | | }) |
| | | }, |
| | | |
| | | // ç¨æ·ä¿¡æ¯ |
| | | Info({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | if (state.userInfo) { |
| | | return resolve(state.userInfo) |
| | | } |
| | | UserApi.getInfo().then(response => { |
| | | const result = response; |
| | | commit('SET_USER', result) |
| | | resolve(response) |
| | | }).catch(reject) |
| | | }) |
| | | }, |
| | | |
| | | // éåºç»å½ |
| | | Logout({ commit }, data) { |
| | | return new Promise((resolve, reject) => { |
| | | LoginApi.logout(data, { custom: { catch: true } }).then(response => { |
| | | storage.remove(ACCESS_TOKEN) |
| | | commit('SET_TOKEN', '') |
| | | resolve(response) |
| | | }).catch(reject) |
| | | }) |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const ACCESS_TOKEN = 'AccessToken' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh-CN"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <title> |
| | | <%= htmlWebpackPlugin.options.title %> |
| | | </title> |
| | | <!-- Open Graph data --> |
| | | <!-- <meta property="og:title" content="Title Here" /> --> |
| | | <!-- <meta property="og:url" content="http://www.example.com/" /> --> |
| | | <!-- <meta property="og:image" content="http://example.com/image.jpg" /> --> |
| | | <!-- <meta property="og:description" content="Description Here" /> --> |
| | | <script> |
| | | var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) |
| | | document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />') |
| | | </script> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" /> |
| | | </head> |
| | | <body> |
| | | <noscript> |
| | | <strong>Please enable JavaScript to continue.</strong> |
| | | </noscript> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | <script> |
| | | var _hmt = _hmt || []; |
| | | (function() { |
| | | var hm = document.createElement("script"); |
| | | hm.src = "https://hm.baidu.com/hm.js?8ae2d12e41f0fe8b183e2e97b5c8e3df"; |
| | | var s = document.getElementsByTagName("script")[0]; |
| | | s.parentNode.insertBefore(hm, s); |
| | | })(); |
| | | </script> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * è¿éæ¯uni-appå
ç½®çå¸¸ç¨æ ·å¼åé |
| | | * |
| | | * uni-app 宿¹æ©å±æä»¶åæä»¶å¸åºï¼https://ext.dcloud.net.cnï¼ä¸å¾å¤ä¸æ¹æä»¶å使ç¨äºè¿äºæ ·å¼åé |
| | | * å¦æä½ æ¯æä»¶å¼åè
ï¼å»ºè®®ä½ 使ç¨scssé¢å¤çï¼å¹¶å¨æä»¶ä»£ç ä¸ç´æ¥ä½¿ç¨è¿äºåéï¼æ é import è¿ä¸ªæä»¶ï¼ï¼æ¹ä¾¿ç¨æ·éè¿æç§¯æ¨çæ¹å¼å¼åæ´ä½é£æ ¼ä¸è´çApp |
| | | * |
| | | */ |
| | | @import '@/uni_modules/uview-ui/theme.scss'; |
| | | /** |
| | | * å¦æä½ æ¯Appå¼åè
ï¼æä»¶ä½¿ç¨è
ï¼ï¼ä½ å¯ä»¥éè¿ä¿®æ¹è¿äºå鿥å®å¶èªå·±çæä»¶ä¸»é¢ï¼å®ç°èªå®ä¹ä¸»é¢åè½ |
| | | * |
| | | * å¦æä½ ç项ç®åæ ·ä½¿ç¨äºscssé¢å¤çï¼ä½ ä¹å¯ä»¥ç´æ¥å¨ä½ ç scss 代ç ä¸ä½¿ç¨å¦ä¸åéï¼åæ¶æ é import è¿ä¸ªæä»¶ |
| | | */ |
| | | |
| | | /* é¢è²åé */ |
| | | |
| | | /* è¡ä¸ºç¸å
³é¢è² */ |
| | | $uni-color-primary: #007aff; |
| | | $uni-color-success: #4cd964; |
| | | $uni-color-warning: #f0ad4e; |
| | | $uni-color-error: #dd524d; |
| | | |
| | | /* æååºæ¬é¢è² */ |
| | | $uni-text-color:#333;//åºæ¬è² |
| | | $uni-text-color-inverse:#fff;//åè² |
| | | $uni-text-color-grey:#999;//è¾
å©ç°è²ï¼å¦å è½½æ´å¤çæç¤ºä¿¡æ¯ |
| | | $uni-text-color-placeholder: #808080; |
| | | $uni-text-color-disable:#c0c0c0; |
| | | |
| | | /* èæ¯é¢è² */ |
| | | $uni-bg-color:#ffffff; |
| | | $uni-bg-color-grey:#f8f8f8; |
| | | $uni-bg-color-hover:#f1f1f1;//ç¹å»ç¶æé¢è² |
| | | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//é®ç½©é¢è² |
| | | |
| | | /* è¾¹æ¡é¢è² */ |
| | | $uni-border-color:#c8c7cc; |
| | | |
| | | /* 尺寸åé */ |
| | | |
| | | /* æå尺寸 */ |
| | | $uni-font-size-sm:12px; |
| | | $uni-font-size-base:14px; |
| | | $uni-font-size-lg:16; |
| | | |
| | | /* å¾ç尺寸 */ |
| | | $uni-img-size-sm:20px; |
| | | $uni-img-size-base:26px; |
| | | $uni-img-size-lg:40px; |
| | | |
| | | /* Border Radius */ |
| | | $uni-border-radius-sm: 2px; |
| | | $uni-border-radius-base: 3px; |
| | | $uni-border-radius-lg: 6px; |
| | | $uni-border-radius-circle: 50%; |
| | | |
| | | /* æ°´å¹³é´è· */ |
| | | $uni-spacing-row-sm: 5px; |
| | | $uni-spacing-row-base: 10px; |
| | | $uni-spacing-row-lg: 15px; |
| | | |
| | | /* åç´é´è· */ |
| | | $uni-spacing-col-sm: 4px; |
| | | $uni-spacing-col-base: 8px; |
| | | $uni-spacing-col-lg: 12px; |
| | | |
| | | /* éæåº¦ */ |
| | | $uni-opacity-disabled: 0.3; // ç»ä»¶ç¦ç¨æçéæåº¦ |
| | | |
| | | /* æç« åºæ¯ç¸å
³ */ |
| | | $uni-color-title: #2C405A; // æç« æ é¢é¢è² |
| | | $uni-font-size-title:20px; |
| | | $uni-color-subtitle: #555555; // äºçº§æ é¢é¢è² |
| | | $uni-font-size-subtitle:26px; |
| | | $uni-color-paragraph: #3F536E; // æç« 段è½é¢è² |
| | | $uni-font-size-paragraph:15px; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ## 2.4.3-20220505ï¼2022-05-05ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å¼å¯canvas2dåå°seriesèµå¼ä¸ºç©ºæ°ç»æ¾ç¤ºå è½½å¾æ æ¶ï¼å次èµå¼åç»å¸éªå¨çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å级hbxææ°çåEChartsçhighlightæ¹æ³æ¥éçbug |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.gridEvalï¼æ°æ®ç¹ä½ç½æ ¼æ½å¸ï¼é»è®¤1 |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.axisLabelï¼ æ¯å¦æ¾ç¤ºå»åº¦ç¹å¼ï¼é»è®¤false |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.axisLabelTofixï¼å»åº¦ç¹å¼å°æ°ä½æ°ï¼é»è®¤0 |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.labelPointShowï¼æ¯å¦æ¾ç¤ºæ«ç«¯å»åº¦åç¹ï¼é»è®¤false |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.labelPointRadiusï¼å»åº¦åç¹çåå¾ï¼é»è®¤3 |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.labelPointColorï¼å»åº¦åç¹çé¢è²ï¼é»è®¤#cccccc |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.linearTypeï¼æ¸åè²ç±»åï¼å¯éå¼"none"å
³éæ¸å,"custom"å¼å¯æ¸å |
| | | - uCharts.js é·è¾¾å¾æ°å¢åæ°opts.extra.radar.customColorï¼èªå®ä¹æ¸åé¢è²ï¼æ°ç»ç±»å对åºseriesçæ°ç»é¿åº¦ä»¥å¹é
ä¸åseriesé¢è²çä¸åé
è²æ¹æ¡ï¼ä¾å¦["#FA7D8D", "#EB88E2"] |
| | | - uCharts.js é·è¾¾å¾ä¼åæ¯æseries.textColorãseries.textSize屿§ |
| | | - uCharts.js æ±ç¶å¾ä¸æ¸©åº¦è®¡å¼å¾æ ï¼ä¼åæ¯æå
¨åè§ç±»åï¼ä¿®å¤è¾¹æ¡æç¼éçbugï¼è¯¦è§å®ç½ãæ¼ç¤ºãä¸ç温度计å¾è¡¨ |
| | | - uCharts.js æ±ç¶å¾æ°å¢åæ°opts.extra.column.activeWidthï¼å½åç¹å»æ±ç¶å¾çèæ¯å®½åº¦ï¼é»è®¤ä¸ä¸ªåå
æ ¼åä½ |
| | | - uCharts.js æ··åå¾å¢å opts.extra.mix.area.gradient åºå徿¯å¦å¼å¯æ¸åè² |
| | | - uCharts.js æ··åå¾å¢å opts.extra.mix.area.opacity åºåå¾éæåº¦ï¼é»è®¤0.2 |
| | | - uCharts.js 饼å¾ãåç¯å¾ãç«ç°å¾ãæ¼æå¾ï¼å¢å opts.series[0].data[i].labelTextï¼èªå®ä¹æ ç¾æåï¼é¿å
formatteræ ¼å¼åçç¹çï¼è¯¦è§å®ç½ãæ¼ç¤ºãä¸çé¥¼å¾ |
| | | - uCharts.js 饼å¾ãåç¯å¾ãç«ç°å¾ãæ¼æå¾ï¼å¢å opts.series[0].data[i].labelShowï¼èªå®ä¹æ¯å¦æ¾ç¤ºæä¸ä¸ªæç¤ºæ ç¾ï¼é¿å
å 饼å¾ç±»å«å¤ªå¤å¯¼è´æ ç¾é夿è
å±
å¤å¯¼è´å¾å½¢åå½¢çé®é¢ï¼è¯¦è§å®ç½ãæ¼ç¤ºãä¸çé¥¼å¾ |
| | | - uCharts.js å¢å opts.series[i].legendText/opts.series[0].data[i].legendTextï¼ä¸series.nameå级ï¼èªå®ä¹å¾ä¾æ¾ç¤ºæåçæ¹æ³ |
| | | - uCharts.js ä¼åXè½´ãYè½´formatteræ ¼å¼åæ¹æ³å¢å å½¢åï¼ç»ä¸ä¸ºfromatter:function(value,index,opts){} |
| | | - uCharts.js ä¿®å¤æ¨ªå±æ¨¡å¼ä¸æ æ³ä½¿ç¨åæç¼©æ¾æ¹æ³çbug |
| | | - uCharts.js ä¿®å¤å½åªæä¸æ¡æ°æ®æè
夿¡æ°æ®å¼ç¸ççæ¶åYè½´èªå¨è®¡ç®çæå¤§å¼é误çbug |
| | | - ãå®ç½æ¨¡æ¿ãå¢å å¤é¨èªå®ä¹å¾ä¾ä¸å¾è¡¨äº¤äºçä¾åï¼[ç¹å»è·³è½¬](https://www.ucharts.cn/v2/#/layout/info?id=2) |
| | | |
| | | ## 注æï¼éunimodules çæ¬å¦å æ´æ° hbx è³ 3.4.7 å¯¼è´æ¥éå¦ä¸ï¼è¯·å°ç äºæ´æ°é unimodules çæ¬ç»ä»¶ï¼[ç¹å»è·³è½¬](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6) |
| | | > Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0" |
| | | ## 2.4.2-20220421ï¼2022-04-21ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤HBXå级3.4.6.20220420çæ¬åechartsæ¥éçé®é¢ |
| | | ## 2.4.2-20220420ï¼2022-04-20ï¼ |
| | | ## éè¦ï¼æ¤çæ¬uChartsæ°å¢äºå¾å¤åè½ï¼ä¿®å¤äºè¯¸å¤å·²ç¥é®é¢ |
| | | - ç§äºå¾è¡¨ç»ä»¶ æ°å¢onzoomå¼å¯åæç¼©æ¾åè½ï¼ä»
uChartsï¼ï¼åæéè¦ç´è§åæ 系类å¾è¡¨ç±»åï¼å¹¶ä¸ontouch为trueãopts.enableScroll为trueï¼è¯¦è§å®ä¾é¡¹ç®Kçº¿å¾ |
| | | - ç§äºå¾è¡¨ç»ä»¶ æ°å¢optsWatchæ¯å¦çå¬optsååï¼å
³éoptsWatchåï¼å¨æä¿®æ¹optsä¸ä¼è§¦åå¾è¡¨éç» |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å¼å¯canvas2dåè½åï¼å¨ææ´æ°æ°æ®åç»å¸éªå¨çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ å»é¤directory屿§ï¼æ¹ä¸ºèªå¨è·åecharts.min.jsè·¯å¾ï¼å级ä¸åå½±åï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ å¢å getImage()æ¹æ³å@getImageäºä»¶ï¼éè¿refè°ç¨getImage()æ¹æ³è·ï¼è§¦å@getImageäºä»¶è·åå½åç»å¸çbase64å¾çæä»¶æµã |
| | | - ç§äºå¾è¡¨ç»ä»¶ æ¯ä»å®ãåèè·³å¨ãé£ä¹¦ãå¿«æå°ç¨åºæ¯æå¼å¯canvas2då屿¸²æè®¾ç½®ã |
| | | - ç§äºå¾è¡¨ç»ä»¶ æ°å¢å ãéuniCloudãçæ¬ç»ä»¶ï¼é¿å
æäºä¸éè¦uniCloudç使ç¨ç»ä»¶åå¸è³å°ç¨åºéè¦æäº¤éç§å£°æé®é¢ï¼è¯·å°ç äº[ãéuniCloudçæ¬ã](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)ï¼ænpm[ãéuniCloudçæ¬ã](https://www.npmjs.com/package/@qiun/uni-ucharts)ä¸è½½ä½¿ç¨ã |
| | | - uCharts.js æ°å¢dobuleZoomåæç¼©æ¾åè½ |
| | | - uCharts.js æ°å¢å±±å³°å¾type="mount"ï¼æ°æ®æ ¼å¼ä¸ºé¥¼å¾ç±»æ ¼å¼ï¼ä¸éè¦ä¼ å
¥categoriesï¼å
·ä½è¯¦è§æ°çå®ç½å¨çº¿æ¼ç¤º |
| | | - uCharts.js ä¿®å¤æçº¿å¾å½æ°æ®ä¸åå¨nullæ¶tooltipæ¥éçbug |
| | | - uCharts.js ä¿®å¤é¥¼å¾ç±»å½ç»å¸æ¯è¾å°æ¶èªå¨è®¡ç®çå徿¯è´æ°æ¥éçbug |
| | | - uCharts.js ç»ä¸åå¾è¡¨ç±»åçseries.formatteræ ¼å¼åæ¹æ³çå½¢å为(val, index, series, opts)ï¼æ¹ä¾¿æ ¼å¼åæ¶ææ´å¤åæ°å¯ç¨ |
| | | - uCharts.js æ 记线åè½å¢å labelTextèªå®ä¹æ¾ç¤ºæåï¼å¢å labelAlignæ ç¾æ¾ç¤ºä½ç½®ï¼å·¦ä¾§æå³ä¾§ï¼ï¼å¢å æ ç¾æ¾ç¤ºä½ç½®å¾®è°labelOffsetXãlabelOffsetY |
| | | - uCharts.js ä¿®å¤æ¡ç¶å¾å½æ°å¼å¾å°æ¶å¼å¯åè§åæ ·å¼é误çbug |
| | | - uCharts.js ä¿®å¤Xè½´å¼å¯disabledåï¼Xè½´ä»å ç¨ç©ºé´çbug |
| | | - uCharts.js ä¿®å¤Xè½´å¼å¯æ»å¨æ¡å¹¶ä¸å¼å¯rotateLabelåï¼Xè½´æå䏿»å¨æ¡éå çbug |
| | | - uCharts.js å¢å Xè½´rotateAngleæåæè½¬èªå®ä¹è§åº¦ï¼åå¼èå´(-90è³90) |
| | | - uCharts.js ä¿®å¤å°å¾æåæ ç¾å±çº§æ¾ç¤ºä¸æ£ç¡®çbug |
| | | - uCharts.js ä¿®å¤é¥¼å¾ãåç¯å¾ãç«ç°å¾å½æ°æ®å
¨é¨ä¸º0çæ¶å䏿¾ç¤ºæ°æ®æ ç¾çbug |
| | | - uCharts.js ä¿®å¤å½opts.paddingä¸è¾¹è·ä¸º0æ¶ï¼Yè½´é¡¶é¨å»åº¦æ ç¾ä½ç½®ä¸æ£ç¡®çbug |
| | | |
| | | ## å¦å¤æä»¬è¿å¼åäºå大åçå°ç¨åºç»ä»¶ï¼å·²åå¸è³ç äºånpm |
| | | [https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts) |
| | | [https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun) |
| | | |
| | | ## 对äºåçuChartsææ¡£æä»¬å·²ä¸çº¿æ°ç宿¹ç½ç«ï¼è¯¦æ
ç¹å»ä¸é¢é¾æ¥è¿å
¥å®ç½ |
| | | [https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/) |
| | | ## 2.3.7-20220122ï¼2022-01-22ï¼ |
| | | ## éè¦ï¼ä½¿ç¨vue3ç¼è¯ï¼è¯·ä½¿ç¨cli模å¼å¹¶åçº§è³ææ°ä¾èµï¼HbuilderXç¼è¯éè¦ä½¿ç¨3.3.8以ä¸çæ¬ |
| | | - uCharts.js ä¿®å¤uni-appå¹³å°ç»ä»¶æ¨¡å¼ä½¿ç¨vue3ç¼è¯å°å°ç¨åºæ¥éçbugã |
| | | ## 2.3.7-20220118ï¼2022-01-18ï¼ |
| | | ## 注æï¼ä½¿ç¨vue3çåææ¯éè¦3.3.8.20220114-alphaçæ¬çHBuilderï¼ |
| | | ## 2.3.67-20220118ï¼2022-01-18ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ç»ä»¶åæ¥æ¯ævue3ï¼å
¨ç«¯ç¼è¯ä¼æäºé®é¢ï¼å
·ä½è¯¦è§ä¸é¢ä¿®æ¹ï¼ |
| | | 1. å°ç¨åºç«¯è¿è¡æ¶ï¼å¨uni_modulesæä»¶å¤¹çqiun-data-charts.jsä¸æç´¢ new uni_modules_qiunDataCharts_js_sdk_uCharts_uCharts.uChartsï¼å°.uCharts廿ã |
| | | 2. å°ç¨åºç«¯åè¡æ¶ï¼å¨uni_modulesæä»¶å¤¹çqiun-data-charts.jsä¸æç´¢ new e.uChartsï¼å°.uCharts廿ï¼å为 new eã |
| | | 3. 妿è§å¾ä¸è¿°æ¥éª¤æ¯è¾éº»ç¦ï¼å¦ææ¨ç项ç®åªç¼è¯å°å°ç¨åºç«¯ï¼å¯ä»¥ä¿®æ¹u-charts.jsæåä¸è¡å¯¼åºæ¹å¼ï¼å° export default uCharts;åæ´ä¸º export default { uCharts: uCharts }; è¿æ ·åæ´åï¼H5åApp端çrenderjs伿é®é¢ï¼è¯·å¼åè
èªè¡éæ©ãï¼æ¤é®é¢éç»ä»¶é®é¢ï¼è¯·çå¾
DC宿¹ä¿®å¤Vue3çå°ç¨åºç«¯ï¼ |
| | | ## 2.3.6-20220111ï¼2022-01-11ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®æ¹ç»ä»¶ props 屿§ä¸ç background é»è®¤å¼ä¸º rgba(0,0,0,0) |
| | | ## 2.3.6-20211201ï¼2021-12-01ï¼ |
| | | - uCharts.js ä¿®å¤baræ¡ç¶å¾å¼å¯åè§æ¨¡å¼æ¶ï¼å¼å¾å°æ¶åè§æ¸²æé误çbug |
| | | ## 2.3.5-20211014ï¼2021-10-15ï¼ |
| | | - uCharts.js å¢å vue3çç¼è¯æ¯æï¼ä»
åçuChartsï¼qiun-data-chartsç»ä»¶åç»ä¼æ¯æï¼è¯·å
³æ³¨æ´æ°ï¼ |
| | | ## 2.3.4-20211012ï¼2021-10-12ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤ mac os x ç³»ç» mouseover äºä»¶ä¸¢å¤±ç bug |
| | | ## 2.3.3-20210706ï¼2021-07-06ï¼ |
| | | - uCharts.js å¢å é·è¾¾å¾å¼å¯æ°æ®ç¹å¼ï¼opts.dataLabelï¼çæ¾ç¤º |
| | | ## 2.3.2-20210627ï¼2021-06-27ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤tooltipCustomä¸ªå«æ
åµä¸ä¼ å¼ä¸æ£ç¡®æ¥éTypeError: Cannot read property 'name' of undefinedçbug |
| | | ## 2.3.1-20210616ï¼2021-06-16ï¼ |
| | | - uCharts.js ä¿®å¤åè§æ±ç¶å¾ä½¿ç¨4è§åè§æ¶ï¼å½æ°å¼è¿å¤§æ¶ä¸æ£ç¡®çbug |
| | | ## 2.3.0-20210612ï¼2021-06-12ï¼ |
| | | - uCharts.js ãéè¦ãuChartså¢å nvueå
¼å®¹ï¼å¯å¨nvue项ç®ä¸ä½¿ç¨gcanvasç»ä»¶æ¸²æuChartsï¼[详è§ç äºuCharts-demo-nvue](https://gitee.com/uCharts/uCharts) |
| | | - ç§äºå¾è¡¨ç»ä»¶ å¢å tapLegend屿§ï¼æ¯å¦å¼å¯å¾ä¾ç¹å»äº¤äºäºä»¶ |
| | | - ç§äºå¾è¡¨ç»ä»¶ getIndexäºä»¶ä¸å¢å è¿åuChartså®ä¾ä¸çoptsåæ°ï¼ä»¥ä¾¿å¨é¡µé¢ä¸è°ç¨åæ° |
| | | - 示ä¾é¡¹ç® pages/other/other.vueå¢å app端èªå®ä¹tooltipçæ¹æ³ï¼è¯¦è§showOptsTooltipæ¹æ³ |
| | | ## 2.2.1-20210603ï¼2021-06-03ï¼ |
| | | - uCharts.js ä¿®å¤é¥¼å¾ãåç¯å¾ãç«ç°å¾ï¼å½èµ·å§è§åº¦ä¸ä¸º0æ¶ï¼tooltipä½ç½®ä¸åç¡®çbug |
| | | - uCharts.js å¢å æ¸©åº¦è®¡å¼æ±ç¶å¾å¼å¯é¡¶é¨ååå½¢çé
ç½® |
| | | ## 2.2.0-20210529ï¼2021-05-29ï¼ |
| | | - uCharts.js å¢å æ¡ç¶å¾type="bar" |
| | | - 示ä¾é¡¹ç® pages/ucharts/ucharts.vueå¢å æ¡ç¶å¾çdemo |
| | | ## 2.1.7-20210524ï¼2021-05-24ï¼ |
| | | - uCharts.js ä¿®å¤å¤§æ°æ®é模å¼ä¸æ²çº¿å¾ä¸å¹³æ»çbug |
| | | ## 2.1.6-20210523ï¼2021-05-23ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å°ç¨åºç«¯å¼å¯æ»å¨æ¡æ´æ°æ°æ®åæ»å¨æ¡ä½ç½®ä¸ç¬¦å颿çbug |
| | | ## 2.1.5-2021051702ï¼2021-05-17ï¼ |
| | | - uCharts.js ä¿®å¤èªå®ä¹Yè½´minåmaxå¼ä¸º0æ¶ä¸è½æ£ç¡®æ¾ç¤ºçbug |
| | | ## 2.1.5-20210517ï¼2021-05-17ï¼ |
| | | - uCharts.js ä¿®å¤Yè½´èªå®ä¹minåmaxæ¶ï¼æªææå®çæå¤§å¼æå°å¼æ¾ç¤ºåæ è½´å»åº¦çbug |
| | | ## 2.1.4-20210516ï¼2021-05-16ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¼åonWindowResizeé²ææ¹æ³ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤APP端uChartsæ´æ°æ°æ®æ¶ï¼æ¸
空seriesæ¾ç¤ºloading徿 ååæ¾ç¤ºå¾è¡¨ï¼å¾è¡¨æå¨çbug |
| | | - uCharts.js ä¿®å¤å¼å¯canvas2dåï¼xè½´ãyè½´ãseriesèªå®ä¹åä½å¤§å°æªææ¯ä¾ç¼©æ¾çbug |
| | | - 示ä¾é¡¹ç® ä¿®å¤format-e.vueæ¼åé误导è´app端使ç¨uCharts渲æå¾è¡¨ |
| | | ## 2.1.3-20210513ï¼2021-05-13ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®æ¹uChartsåæ´chartDataæ°æ®ä¸ºupdateDataæ¹æ³ï¼æ¯æå¸¦æ»å¨æ¡çæ°æ®å¨ææç¹ |
| | | - ç§äºå¾è¡¨ç»ä»¶ å¢å onWindowResizeé²ææ¹æ³ fix by ã©èªè¨ï¼å¦å°è¬æææµå¹´ã¥ |
| | | - ç§äºå¾è¡¨ç»ä»¶ H5æè
APPåæ´chartDataæ°æ®æ¾ç¤ºloadingå¾è¡¨æ¶ï¼åæ°æ®éªç°çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ propså¢å errorReloadç¦ç¨é误ç¹å»éæ°å è½½çæ¹æ³ |
| | | - uCharts.js å¢å tooltipæ¾ç¤ºcategoryï¼x轴对åºç¹ä½ï¼æ é¢çåè½ï¼opts.extra.tooltip.showCategoryï¼é»è®¤ä¸ºfalse |
| | | - uCharts.js ä¿®å¤mixæ··åå¾åªææ±ç¶å¾æ¶ï¼tooltipçåå²çº¿æ¾ç¤ºä½ç½®ä¸æ£ç¡®çbug |
| | | - uCharts.js ä¿®å¤å¼å¯æ»å¨æ¡ï¼å¾è¡¨å¨æå¨ä¸å¨ææç¹ï¼æ»å¨æ¡ä½ç½®ä¸æ£ç¡®çbug |
| | | - uCharts.js ä¿®å¤é¥¼å¾ç±»æ°æ®æ ¼å¼ä¸ºechartsæ°æ®æ ¼å¼ï¼series为空æ°ç»æ¥éçbug |
| | | - 示ä¾é¡¹ç® ä¿®æ¹uCharts.jsæ´æ°å°v2.1.2çæ¬åï¼@getIndexæ¹æ³è·åç´¢å¼å¼åæ´ä¸ºe.currentIndex.index |
| | | - 示ä¾é¡¹ç® pages/updata/updata.vueå¢å æ»å¨æ¡æå¨æ´æ°ï¼æ°æ®å¨ææç¹ï¼çdemo |
| | | - 示ä¾é¡¹ç® pages/other/other.vueå¢å errorReloadç¦ç¨é误ç¹å»éæ°å è½½çdemo |
| | | ## 2.1.2-20210509ï¼2021-05-09ï¼ |
| | | ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤APP端åå§åæ¶å°±ä¼ å
¥chartDataælacaldata䏿¾ç¤ºå¾è¡¨çbug |
| | | ## 2.1.1-20210509ï¼2021-05-09ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ åæ´EChartsçeoptsé
ç½®å¨renderjså
æ§è¡ï¼æ¯æå¨config-echarts.jsé
ç½®æä»¶å
åfunctioné
ç½®ã |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤APP端æ¥éProp being mutated: "onmouse"é误çbugã |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤APP端æ¥éError: Not Foundï¼Page[6][-1,27] at view.umd.min.js:1çbugã |
| | | ## 2.1.0-20210507ï¼2021-05-07ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤åå§åæ¶å°±ææ°æ®æè
æ°æ®æ´æ°çæ¶åloadingå è½½å¨ç»éªå¨çbug |
| | | - uCharts.js ä¿®å¤xè½´formatæ¹æ³categories为åç¬¦ä¸²ç±»åæ¶è¿åNaNçbug |
| | | - uCharts.js ä¿®å¤series.textColorãlegend.fontColoræªæ§è¡å
¨å±é»è®¤é¢è²çbug |
| | | ## 2.1.0-20210506ï¼2021-05-06ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤æä¸ªå«æ
åµä¸æ¥éitem.properties undefinedçbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤æä¸ªå«æ
åµä¸å
³éå è½½å¨ç»reshowä¸èµ·ä½ç¨ï¼æ æ³æ¾ç¤ºå¾è¡¨çbug |
| | | - 示ä¾é¡¹ç® pages/ucharts/ucharts.vue å¢å æ¶é´è½´æçº¿å¾ï¼type="tline"ï¼ãæ¶é´è½´åºåå¾ï¼type="tarea"ï¼ãæ£ç¹å¾ï¼type="scatter"ï¼ãæ°æ³¡å¾demoï¼type="bubble"ï¼ãåä¸è§å½¢æ¼æå¾ï¼opts.extra.funnel.type="triangle"ï¼ãéåå¡å½¢æ¼æå¾ï¼opts.extra.funnel.type="pyramid"ï¼ |
| | | - 示ä¾é¡¹ç® pages/format-u/format-u.vue å¢å Xè½´formatæ ¼å¼åç¤ºä¾ |
| | | - uCharts.js å级è³v2.1.0çæ¬ |
| | | - uCharts.js ä¿®å¤ ç«ç°å¾é¢ç§¯æ¨¡å¼ç¹å»tooltipä½ç½®ä¸æ£ç¡®çbug |
| | | - uCharts.js ä¿®å¤ ç«ç°å¾ç¹å»å¾ä¾ï¼åªå©ä¸ä¸ªç±»å«æ¾ç¤ºç©ºç½çbug |
| | | - uCharts.js ä¿®å¤ é¥¼å¾ç±»å¾ç¹å»å¾ä¾ï¼å
¶ä»å¾è¡¨tooltipä½ç½®æäºæ
åµä¸ä¸åçbug |
| | | - uCharts.js ä¿®å¤ x轴为ç¢éè½´ï¼æ¶é´è½´ï¼æ
åµä¸ï¼ç¹å»tooltipä½ç½®ä¸æ£ç¡®çbug |
| | | - uCharts.js ä¿®å¤ è¯äºå¾è·åç¹å»ç´¢å¼å¶å°ä¸åçbug |
| | | - uCharts.js å¢å ç´è§åæ ç³»å¾è¡¨Xè½´formatæ ¼å¼åæ¹æ³ï¼åçuCharts.jsç¨æ³è¯·ä½¿ç¨formatterï¼ |
| | | - uCharts.js å¢å æ¼æå¾æ©å±é
ç½®ï¼åä¸è§å½¢ï¼opts.extra.funnel.type="triangle"ï¼ï¼éåå¡å½¢ï¼opts.extra.funnel.type="pyramid"ï¼ |
| | | - uCharts.js å¢å æ£ç¹å¾ï¼opts.type="scatter"ï¼ãæ°æ³¡å¾ï¼opts.type="bubble"ï¼ |
| | | - åæè®¡å å®åæ£ç¹å¾ãæ°æ³¡å¾ï¼å¢å markPointsæ è®°ç¹ï¼å¢å æ¨ªåæ¡ç¶å¾ã |
| | | ## 2.0.0-20210502ï¼2021-05-02ï¼ |
| | | - uCharts.js ä¿®å¤è¯äºå¾è·åç¹å»ç´¢å¼ä¸æ£ç¡®çbug |
| | | ## 2.0.0-20210501ï¼2021-05-01ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤QQå°ç¨åºãç¾åº¦å°ç¨åºå¨å
³éå¨ç»æææ
åµä¸ï¼v-for循ç¯ä½¿ç¨å¾è¡¨ï¼æ¾ç¤ºä¸æ£ç¡®çbug |
| | | ## 2.0.0-20210426ï¼2021-04-26ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤QQå°ç¨åºä¸æ¯æcanvas2dçbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤ééå°ç¨åºæäºæ
åµç¹å»åæ 计ç®é误çbug |
| | | - uCharts.js å¢å extra.column.categoryGap åæ°ï¼æ±ç¶å¾ç±»æ¯ä¸ªcategoryç¹ä½ï¼Xè½´ç¹ï¼æ±åç»ä¹é´çé´è· |
| | | - uCharts.js å¢å yAxis.data[i].titleOffsetY åæ°ï¼æ é¢çºµååç§»è·ç¦»ï¼è´æ°ä¸ºåä¸åç§»ï¼æ£æ°åä¸åç§» |
| | | - uCharts.js å¢å yAxis.data[i].titleOffsetX åæ°ï¼æ 颿¨ªååç§»è·ç¦»ï¼è´æ°ä¸ºåå·¦åç§»ï¼æ£æ°åå³åç§» |
| | | - uCharts.js å¢å extra.gauge.labelOffset åæ°ï¼ä»ªè¡¨çæ ç¾æåå¾å便å®è·ç¦»ï¼é»è®¤13px |
| | | ## 2.0.0-20210422-2ï¼2021-04-22ï¼ |
| | | ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤ formatterAssign æªå¤æ args[key] == null çæ
åµå¯¼è´æ 溢åºç bug |
| | | ## 2.0.0-20210422ï¼2021-04-22ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤H5ãAPPãæ¯ä»å®å°ç¨åºã微信å°ç¨åºcanvas2d模å¼ä¸æ¨ªå±æ¨¡å¼çbug |
| | | ## 2.0.0-20210421ï¼2021-04-21ï¼ |
| | | - uCharts.js ä¿®å¤å¤è¡å¾ä¾çæ
åµä¸ï¼å¾ä¾å¨ä¸æ¹æè
䏿¹æ¶ï¼å¾ä¾float为左侧æè
å³ä¾§æ¶ï¼ç¬¬äºè¡å以åçå¾ä¾å¯¹é½æ¹å¼ä¸æ£ç¡®çbug |
| | | ## 2.0.0-20210420ï¼2021-04-20ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å¾®ä¿¡å°ç¨åºå¼å¯canvas2d模å¼åï¼windowsç微信å°ç¨åºä¸æ¯æcanvas2d模å¼çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®æ¹éuni_modulesçæ¬ä¸ºv2.0çæ¬qiun-data-chartsç»ä»¶ |
| | | ## 2.0.0-20210419ï¼2021-04-19ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ç»¿è²ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½¿ç¨ï¼ç¤ºä¾é¡¹ç®è¯·ç¹å»å³ä¾§èè²æé®ã使ç¨HBuilderX导å
¥ç¤ºä¾é¡¹ç®ãã |
| | | ## 忬¡ä½¿ç¨å¦ææç¤ºæªæ³¨å<qiun-data-charts>ç»ä»¶ï¼è¯·éå¯HBuilderXï¼å¦ä»ä¸å¥½ç¨ï¼è¯·éå¯çµèï¼ |
| | | ## 妿æ¯cli项ç®ï¼è¯·å°è¯æ¸
çnode_modulesï¼éæ°installï¼è¿ä¸è¡å°±å é¤é¡¹ç®ï¼åéæ°installã |
| | | ## æ¤é®é¢å·²äºDCloud宿¹ç¡®è®¤ï¼HBuilderXä¸ä¸ªçæ¬ä¼ä¿®å¤ã |
| | | ## å
¶ä»å¾è¡¨ä¸æ¾ç¤ºé®é¢è¯¦è§[常è§é®é¢é项å¡](https://demo.ucharts.cn) |
| | | ## <font color=#FF0000> æ°æè¯·å
宿´é
è¯»å¸®å©ææ¡£å常è§é®é¢3éï¼å³ä¾§èè²æé®ç¤ºä¾é¡¹ç®è¯·ç2éï¼ </font> |
| | | ## [DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## [å¾è¡¨ç»ä»¶å¨é¡¹ç®ä¸çåºç¨åè§ UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - uCharts.js ä¿®å¤æ··åå¾ä¸æ±ç¶å¾åç¬è®¾ç½®é¢è²ä¸çæçbug |
| | | - uCharts.js ä¿®å¤å¤Yè½´åç¬è®¾ç½®fontSizeæ¶ï¼å¼å¯canvas2dåï¼æªå¯¹åºæ¾å¤§åä½çbug |
| | | ## 2.0.0-20210418ï¼2021-04-18ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ å¢å directoryé
ç½®ï¼ä¿®å¤H5端history模å¼ä¸å¦æåå¸å°äºçº§ç®å½æ æ³æ£ç¡®å è½½echarts.min.jsçbug |
| | | ## 2.0.0-20210416ï¼2021-04-16ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ç»¿è²ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½¿ç¨ï¼ç¤ºä¾é¡¹ç®è¯·ç¹å»å³ä¾§èè²æé®ã使ç¨HBuilderX导å
¥ç¤ºä¾é¡¹ç®ãã |
| | | ## 忬¡ä½¿ç¨å¦ææç¤ºæªæ³¨å<qiun-data-charts>ç»ä»¶ï¼è¯·éå¯HBuilderXï¼å¦ä»ä¸å¥½ç¨ï¼è¯·éå¯çµèï¼ |
| | | ## 妿æ¯cli项ç®ï¼è¯·å°è¯æ¸
çnode_modulesï¼éæ°installï¼è¿ä¸è¡å°±å é¤é¡¹ç®ï¼åéæ°installã |
| | | ## æ¤é®é¢å·²äºDCloud宿¹ç¡®è®¤ï¼HBuilderXä¸ä¸ªçæ¬ä¼ä¿®å¤ã |
| | | ## å
¶ä»å¾è¡¨ä¸æ¾ç¤ºé®é¢è¯¦è§[常è§é®é¢é项å¡](https://demo.ucharts.cn) |
| | | ## <font color=#FF0000> æ°æè¯·å
宿´é
è¯»å¸®å©ææ¡£å常è§é®é¢3éï¼å³ä¾§èè²æé®ç¤ºä¾é¡¹ç®è¯·ç2éï¼ </font> |
| | | ## [DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## [å¾è¡¨ç»ä»¶å¨é¡¹ç®ä¸çåºç¨åè§ UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤APP端æäºæ
åµä¸æ¥é`Not Found Page`çbugï¼fix by é«çº§bugå¼åææ¯å |
| | | - 示ä¾é¡¹ç® ä¿®å¤APP端v-forå¾ªç¯æäºæ
åµä¸æ¥é`Not Found Page`çbugï¼fix by é«çº§bugå¼åææ¯å |
| | | - uCharts.js ä¿®å¤éç´è§åæ ç³»tooltipæç¤ºçªå³ä¾§è¶
åºæªåæ¢æ¹åæ¾ç¤ºçbug |
| | | ## 2.0.0-20210415ï¼2021-04-15ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤H5端åå¸å°äºçº§ç®å½ä¸echartsæ æ³å è½½çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤æäºæ
åµä¸echarts.off('finished')ç§»é¤çå¬äºä»¶æ¥éçbug |
| | | ## 2.0.0-20210414ï¼2021-04-14ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ç»¿è²ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½¿ç¨ï¼ç¤ºä¾é¡¹ç®è¯·ç¹å»å³ä¾§èè²æé®ã使ç¨HBuilderX导å
¥ç¤ºä¾é¡¹ç®ãã |
| | | ## 忬¡ä½¿ç¨å¦ææç¤ºæªæ³¨å<qiun-data-charts>ç»ä»¶ï¼è¯·éå¯HBuilderXï¼å¦ä»ä¸å¥½ç¨ï¼è¯·éå¯çµèï¼ |
| | | ## 妿æ¯cli项ç®ï¼è¯·å°è¯æ¸
çnode_modulesï¼éæ°installï¼è¿ä¸è¡å°±å é¤é¡¹ç®ï¼åéæ°installã |
| | | ## æ¤é®é¢å·²äºDCloud宿¹ç¡®è®¤ï¼HBuilderXä¸ä¸ªçæ¬ä¼ä¿®å¤ã |
| | | ## å
¶ä»å¾è¡¨ä¸æ¾ç¤ºé®é¢è¯¦è§[常è§é®é¢é项å¡](https://demo.ucharts.cn) |
| | | ## <font color=#FF0000> æ°æè¯·å
宿´é
è¯»å¸®å©ææ¡£å常è§é®é¢3éï¼å³ä¾§èè²æé®ç¤ºä¾é¡¹ç®è¯·ç2éï¼ </font> |
| | | ## [DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## [å¾è¡¨ç»ä»¶å¨é¡¹ç®ä¸çåºç¨åè§ UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤H5端å¨cli项ç®ä¸EChartså¼ç¨å°åé误çbug |
| | | - 示ä¾é¡¹ç® å¢å EChartsçformatterç¨æ³ç示ä¾(详è§ç¤ºä¾é¡¹ç®format-e.vue) |
| | | - uCharts.js å¢å åç¯å¾ä¸å¿èæ¯è²çé
ç½®extra.ring.centerColor |
| | | - uCharts.js ä¿®å¤å¾®ä¿¡å°ç¨åºå®å端æ±ç¶å¾å¼å¯éæè²åæ¾ç¤ºä¸æ£ç¡®çbug |
| | | ## 2.0.0-20210413ï¼2021-04-13ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤ç¾åº¦å°ç¨åºå¤ä¸ªå¾è¡¨çæºæªè½æ£ç¡®è·åæ ¹å
ç´ dom尺寸çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤ç¾åº¦å°ç¨åºæ¨ªå±æ¨¡å¼æ¹å䏿£ç¡®çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®æ¹ontouchæ¶ï¼@getTouchStart@getTouchMove@getTouchEndçè§¦åæ¡ä»¶ |
| | | - uCharts.js ä¿®å¤é¥¼å¾ç±»æ°æ®æ ¼å¼series屿§ä¸çæçbug |
| | | - uCharts.js å¢å æ¶åºåºåå¾ è¯¦è§ç¤ºä¾é¡¹ç®ä¸ucharts.vue |
| | | ## 2.0.0-20210412-2ï¼2021-04-12ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ç»¿è²ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½¿ç¨ï¼ç¤ºä¾é¡¹ç®è¯·ç¹å»å³ä¾§èè²æé®ã使ç¨HBuilderX导å
¥ç¤ºä¾é¡¹ç®ãã |
| | | ## 忬¡ä½¿ç¨å¦ææç¤ºæªæ³¨å<qiun-data-charts>ç»ä»¶ï¼è¯·éå¯HBuilderXãå¦ä»ä¸å¥½ç¨ï¼è¯·éå¯çµèï¼æ¤é®é¢å·²äºDCloud宿¹ç¡®è®¤ï¼HBuilderXä¸ä¸ªçæ¬ä¼ä¿®å¤ã |
| | | ## [DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## [å¾è¡¨ç»ä»¶å¨uniCloudAdminä¸çåºç¨ UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤uChartså¨APPç«¯æ¨ªå±æ¨¡å¼ä¸ä¸è½æ£ç¡®æ¸²æçbug |
| | | - 示ä¾é¡¹ç® å¢å EChartsæ±ç¶å¾æ¸åè²ãåè§æ±ç¶å¾ãæ¨ªåæ±ç¶å¾ï¼æ¡ç¶å¾ï¼çç¤ºä¾ |
| | | ## 2.0.0-20210412ï¼2021-04-12ï¼ |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤createdä¸å¤æecharts导è´APPç«¯æ æ³è¯å«ï¼æ¹åmountedä¸å¤æechartsåå§å |
| | | - uCharts.js ä¿®å¤2d模å¼ä¸series.textOffsetæªä¹åç´ æ¯çbug |
| | | ## 2.0.0-20210411ï¼2021-04-11ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ç»¿è²ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½¿ç¨ï¼ç¤ºä¾é¡¹ç®è¯·ç¹å»å³ä¾§èè²æé®ã使ç¨HBuilderX导å
¥ç¤ºä¾é¡¹ç®ãã |
| | | ## 忬¡ä½¿ç¨å¦ææç¤ºæªæ³¨å<qiun-data-charts>ç»ä»¶ï¼è¯·éå¯HBuilderXï¼å¹¶æ¸
空å°ç¨åºå¼åè
å·¥å
·ç¼åã |
| | | ## [DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## [å¾è¡¨ç»ä»¶å¨uniCloudAdminä¸çåºç¨ UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - uCharts.js æçº¿å¾åºåå¾å¢å connectNullsæç¹ç»è¿çåè½ï¼è¯¦è§ç¤ºä¾é¡¹ç®ä¸ucharts.vue |
| | | - ç§äºå¾è¡¨ç»ä»¶ åæ´åå§åæ¹æ³ä¸ºcreatedï¼åæ´type2dé»è®¤å¼ä¸ºtrueï¼ä¼å2d模å¼ä¸ç»ä»¶åå§åådomè·åä¸å°çbug |
| | | - ç§äºå¾è¡¨ç»ä»¶ ä¿®å¤å·¦å³å¸å±æ¶ï¼å³ä¾§å¾è¡¨ç¹å»åæ é误çbugï¼ä¿®å¤tooltipæ±ç¶å¾èªå®ä¹é¢è²æ¾ç¤ºobjectçbug |
| | | ## 2.0.0-20210410ï¼2021-04-10ï¼ |
| | | - ä¿®å¤å·¦å³å¸å±æ¶ï¼å³ä¾§å¾è¡¨ç¹å»åæ é误çbugï¼ä¿®å¤æ±ç¶å¾èªå®ä¹é¢è²tooltipæ¾ç¤ºobjectçbug |
| | | - å¢å æ è®°çº¿åæ±ç¶å¾èªå®ä¹é¢è²çdemo |
| | | ## 2.0.0-20210409ï¼2021-04-08ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½éªï¼DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼[https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## å¾è¡¨ç»ä»¶å¨uniCloudAdminä¸çåºç¨ [UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | - uCharts.js ä¿®å¤ééå°ç¨åºç¾åº¦å°ç¨åºmeasureTextä¸åç¡®çbugï¼ä¿®å¤2d模å¼ä¸é¥¼å¾ç±»activeRadiusä¸ºææ¯ä¾æ¾å¤§çbug |
| | | - ä¿®å¤ç»ä»¶å¨æ¯ä»å®å°ç¨åºç«¯ç¹å»ä½ç½®ä¸åç¡®çbug |
| | | ## 2.0.0-20210408ï¼2021-04-07ï¼ |
| | | - ä¿®å¤ç»ä»¶å¨æ¯ä»å®å°ç¨åºç«¯ä¸è½æ¾ç¤ºçbugï¼ç®åæ¯ä»å®å°ç¨ä¸è½ç¹å»äº¤äºï¼åç»ä¿®å¤ï¼ |
| | | - uCharts.js ä¿®å¤é«åå±ä¸æ±ç¶å¾ç±»ï¼åå¼§è¿åº¦æ¡ èªå®ä¹å®½åº¦ä¸è½ææ¯ä¾æ¾å¤§çbug |
| | | ## 2.0.0-20210407ï¼2021-04-06ï¼ |
| | | ## v1.0çæ¬å·²åæ´ï¼å»ºè®®è½¬uni_modulesçæ¬ç»ä»¶æ¹å¼è°ç¨ï¼ç¹å»å³ä¾§ã使ç¨HBuilderX导å
¥æä»¶ãå³å¯ä½éªï¼DEMOæ¼ç¤ºåå¨çº¿çæå·¥å
·ï¼v2.0ææ¡£ï¼[https://demo.ucharts.cn](https://demo.ucharts.cn) |
| | | ## å¢å éè¿tofixåunitå¿«éæ ¼å¼åyè½´çdemo add by `howcode` |
| | | ## å¢å å¾è¡¨ç»ä»¶å¨uniCloudAdminä¸çåºç¨ [UReportæ°æ®æ¥è¡¨](https://ext.dcloud.net.cn/plugin?id=4651) |
| | | ## 2.0.0-20210406ï¼2021-04-05ï¼ |
| | | # ç§äºå¾è¡¨ç»ä»¶+uCharts v2.0çæ¬åæ¥ä¸çº¿ï¼ä½¿ç¨æ¹æ³è¯¦è§https://demo.ucharts.cn帮å©é¡µ |
| | | ## 2.0.0ï¼2021-04-05ï¼ |
| | | # ç§äºå¾è¡¨ç»ä»¶+uCharts v2.0çæ¬åæ¥ä¸çº¿ï¼ä½¿ç¨æ¹æ³è¯¦è§https://demo.ucharts.cn帮å©é¡µ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * qiun-data-charts ç§äºé«æ§è½è·¨å
¨ç«¯å¾è¡¨ç»ä»¶ |
| | | * Copyright (c) 2021 QIUN® ç§äº https://www.ucharts.cn All rights reserved. |
| | | * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
| | | * å¤å¶ä½¿ç¨è¯·ä¿çæ¬æ®µæ³¨éï¼æè°¢æ¯æå¼æºï¼ |
| | | * 为æ¹ä¾¿æ´å¤å¼åè
使ç¨ï¼å¦ææ´å¥½ç建议请æäº¤ç äº Pull Requests ï¼ |
| | | * |
| | | * uChartsÂ®å®æ¹ç½ç« |
| | | * https://www.uCharts.cn |
| | | * |
| | | * 弿ºå°å: |
| | | * https://gitee.com/uCharts/uCharts |
| | | * |
| | | * uni-appæä»¶å¸åºå°åï¼ |
| | | * http://ext.dcloud.net.cn/plugin?id=271 |
| | | * |
| | | --> |
| | | <template> |
| | | <view class="chartsview" :id="'ChartBoxId'+cid"> |
| | | <view v-if="mixinDatacomLoading"> |
| | | <!-- èªå®ä¹å è½½ç¶æï¼è¯·æ¹è¿é --> |
| | | <qiun-loading :loadingType="loadingType" /> |
| | | </view> |
| | | <view v-if="mixinDatacomErrorMessage && errorShow" @tap="reloading"> |
| | | <!-- èªå®ä¹é误æç¤ºï¼è¯·æ¹è¿é --> |
| | | <qiun-error :errorMessage="errorMessage" /> |
| | | </view> |
| | | <!-- APPåH5éç¨renderjs渲æå¾è¡¨ --> |
| | | <!-- #ifdef APP-VUE || H5 --> |
| | | <block v-if="echarts"> |
| | | <view |
| | | :style="{ background: background }" |
| | | style="width: 100%;height: 100%;" |
| | | :data-directory="directory" |
| | | :id="'EC'+cid" |
| | | :prop="echartsOpts" |
| | | :change:prop="rdcharts.ecinit" |
| | | :resize="echartsResize" |
| | | :change:resize="rdcharts.ecresize" |
| | | v-show="showchart" |
| | | /> |
| | | </block> |
| | | <block v-else> |
| | | <view |
| | | v-on:tap="rdcharts.tap" |
| | | v-on:mousemove="rdcharts.mouseMove" |
| | | v-on:mousedown="rdcharts.mouseDown" |
| | | v-on:mouseup="rdcharts.mouseUp" |
| | | v-on:touchstart="rdcharts.touchStart" |
| | | v-on:touchmove="rdcharts.touchMove" |
| | | v-on:touchend="rdcharts.touchEnd" |
| | | :id="'UC'+cid" |
| | | :prop="uchartsOpts" |
| | | :change:prop="rdcharts.ucinit" |
| | | > |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | :disable-scroll="disableScroll" |
| | | @error="_error" |
| | | v-show="showchart" |
| | | /> |
| | | </view> |
| | | </block> |
| | | <!-- #endif --> |
| | | <!-- æ¯ä»å®å°ç¨åº --> |
| | | <!-- #ifdef MP-ALIPAY --> |
| | | <block v-if="ontouch"> |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :width="cWidth * pixel" |
| | | :height="cHeight * pixel" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | :disable-scroll="disScroll" |
| | | @tap="_tap" |
| | | @touchstart="_touchStart" |
| | | @touchmove="_touchMove" |
| | | @touchend="_touchEnd" |
| | | @error="_error" |
| | | v-show="showchart" |
| | | /> |
| | | </block> |
| | | <block v-if="!ontouch"> |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :width="cWidth * pixel" |
| | | :height="cHeight * pixel" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | :disable-scroll="disScroll" |
| | | @tap="_tap" |
| | | @error="_error" |
| | | v-show="showchart" |
| | | /> |
| | | </block> |
| | | <!-- #endif --> |
| | | <!-- å
¶ä»å°ç¨åºéè¿vue渲æå¾è¡¨ --> |
| | | <!-- #ifdef MP-360 || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-WEIXIN || MP-KUAISHOU || MP-LARK || MP-JD --> |
| | | <block v-if="type2d"> |
| | | <view v-if="ontouch" @tap="_tap"> |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | type="2d" |
| | | :disable-scroll="disScroll" |
| | | @touchstart="_touchStart" |
| | | @touchmove="_touchMove" |
| | | @touchend="_touchEnd" |
| | | @error="_error" |
| | | v-show="showchart" |
| | | /> |
| | | </view> |
| | | <view v-if="!ontouch" @tap="_tap"> |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | type="2d" |
| | | :disable-scroll="disScroll" |
| | | @error="_error" |
| | | v-show="showchart" |
| | | /> |
| | | </view> |
| | | </block> |
| | | <block v-if="!type2d"> |
| | | <view v-if="ontouch" @tap="_tap"> |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | @touchstart="_touchStart" |
| | | @touchmove="_touchMove" |
| | | @touchend="_touchEnd" |
| | | :disable-scroll="disScroll" |
| | | @error="_error" |
| | | v-if="showchart" |
| | | /> |
| | | </view> |
| | | <view v-if="!ontouch" > |
| | | <canvas |
| | | :id="cid" |
| | | :canvasId="cid" |
| | | :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" |
| | | :disable-scroll="disScroll" |
| | | @tap="_tap" |
| | | @error="_error" |
| | | v-if="showchart" |
| | | /> |
| | | </view> |
| | | </block> |
| | | <!-- #endif --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import uCharts from '../../js_sdk/u-charts/u-charts.js'; |
| | | import cfu from '../../js_sdk/u-charts/config-ucharts.js'; |
| | | // #ifdef APP-VUE || H5 |
| | | import cfe from '../../js_sdk/u-charts/config-echarts.js'; |
| | | // #endif |
| | | |
| | | function deepCloneAssign(origin = {}, ...args) { |
| | | for (let i in args) { |
| | | for (let key in args[i]) { |
| | | if (args[i].hasOwnProperty(key)) { |
| | | origin[key] = args[i][key] && typeof args[i][key] === 'object' ? deepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key]; |
| | | } |
| | | } |
| | | } |
| | | return origin; |
| | | } |
| | | |
| | | function formatterAssign(args,formatter) { |
| | | for (let key in args) { |
| | | if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){ |
| | | formatterAssign(args[key],formatter) |
| | | }else if(key === 'format' && typeof args[key] === 'string'){ |
| | | args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined; |
| | | } |
| | | } |
| | | return args; |
| | | } |
| | | |
| | | // æ¶é´è½¬æ¢å½æ°ï¼ä¸ºäºå¹é
uniClinetDB读ååºçæ¶é´ä¸categoriesä¸å |
| | | function getFormatDate(date) { |
| | | var seperator = "-"; |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var strDate = date.getDate(); |
| | | if (month >= 1 && month <= 9) { |
| | | month = "0" + month; |
| | | } |
| | | if (strDate >= 0 && strDate <= 9) { |
| | | strDate = "0" + strDate; |
| | | } |
| | | var currentdate = year + seperator + month + seperator + strDate; |
| | | return currentdate; |
| | | } |
| | | |
| | | var lastMoveTime = null; |
| | | /** |
| | | * 鲿 |
| | | * |
| | | * @param { Function } fn è¦æ§è¡çæ¹æ³ |
| | | * @param { Number } wait 鲿å¤å°æ¯«ç§ |
| | | * |
| | | * å¨ vue ä¸ä½¿ç¨ï¼æ³¨æï¼ä¸è½ä½¿ç¨ç®å¤´å½æ°ï¼å¦åthisæåä¸å¯¹ï¼å¹¶ä¸ä¸è½å次å°è£
å¦ï¼ |
| | | * move(){ // é误è°ç¨æ¹å¼ |
| | | * debounce(function () { |
| | | * console.log(this.title); |
| | | * }, 1000)}ï¼; |
| | | * åºè¯¥ç´æ¥ä½¿ç¨ï¼// æ£ç¡®è°ç¨æ¹å¼ |
| | | * move: debounce(function () { |
| | | * console.log(this.title); |
| | | * }, 1000) |
| | | */ |
| | | function debounce(fn, wait) { |
| | | let timer = false; |
| | | return function() { |
| | | clearTimeout(timer); |
| | | timer && clearTimeout(timer); |
| | | timer = setTimeout(() => { |
| | | timer = false; |
| | | fn.apply(this, arguments); // æåæ°ä¼ è¿å» |
| | | }, wait); |
| | | }; |
| | | } |
| | | |
| | | export default { |
| | | name: 'qiun-data-charts', |
| | | mixins: [uniCloud.mixinDatacom], |
| | | props: { |
| | | type: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | canvasId: { |
| | | type: String, |
| | | default: 'uchartsid' |
| | | }, |
| | | canvas2d: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | background: { |
| | | type: String, |
| | | default: 'rgba(0,0,0,0)' |
| | | }, |
| | | animation: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | chartData: { |
| | | type: Object, |
| | | default() { |
| | | return { |
| | | categories: [], |
| | | series: [] |
| | | }; |
| | | } |
| | | }, |
| | | opts: { |
| | | type: Object, |
| | | default() { |
| | | return {}; |
| | | } |
| | | }, |
| | | eopts: { |
| | | type: Object, |
| | | default() { |
| | | return {}; |
| | | } |
| | | }, |
| | | loadingType: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | errorShow: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | errorReload: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | errorMessage: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | inScrollView: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | reshow: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | reload: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | disableScroll: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | optsWatch: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | onzoom: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | ontap: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | ontouch: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | onmouse: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | onmovetip: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | echartsH5: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | echartsApp: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | tooltipShow: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | tooltipFormat: { |
| | | type: String, |
| | | default: undefined |
| | | }, |
| | | tooltipCustom: { |
| | | type: Object, |
| | | default: undefined |
| | | }, |
| | | startDate: { |
| | | type: String, |
| | | default: undefined |
| | | }, |
| | | endDate: { |
| | | type: String, |
| | | default: undefined |
| | | }, |
| | | textEnum: { |
| | | type: Array, |
| | | default () { |
| | | return [] |
| | | } |
| | | }, |
| | | groupEnum: { |
| | | type: Array, |
| | | default () { |
| | | return [] |
| | | } |
| | | }, |
| | | pageScrollTop: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | directory: { |
| | | type: String, |
| | | default: '/' |
| | | }, |
| | | tapLegend: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | menus: { |
| | | type: Array, |
| | | default () { |
| | | return [] |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | cid: 'uchartsid', |
| | | inWx: false, |
| | | inAli: false, |
| | | inTt: false, |
| | | inBd: false, |
| | | inH5: false, |
| | | inApp: false, |
| | | inWin: false, |
| | | type2d: true, |
| | | disScroll: false, |
| | | openmouse: false, |
| | | pixel: 1, |
| | | cWidth: 375, |
| | | cHeight: 250, |
| | | showchart: false, |
| | | echarts: false, |
| | | echartsResize:false, |
| | | uchartsOpts: {}, |
| | | echartsOpts: {}, |
| | | drawData:{}, |
| | | lastDrawTime:null, |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.cid = this.canvasId |
| | | if (this.canvasId == 'uchartsid' || this.canvasId == '') { |
| | | let t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' |
| | | let len = t.length |
| | | let id = '' |
| | | for (let i = 0; i < 32; i++) { |
| | | id += t.charAt(Math.floor(Math.random() * len)) |
| | | } |
| | | this.cid = id |
| | | } |
| | | const systemInfo = uni.getSystemInfoSync() |
| | | if(systemInfo.platform === 'windows' || systemInfo.platform === 'mac'){ |
| | | this.inWin = true; |
| | | } |
| | | // #ifdef MP-WEIXIN |
| | | this.inWx = true; |
| | | if (this.canvas2d === false || systemInfo.platform === 'windows' || systemInfo.platform === 'mac') { |
| | | this.type2d = false; |
| | | }else{ |
| | | this.type2d = true; |
| | | this.pixel = systemInfo.pixelRatio; |
| | | } |
| | | // #endif |
| | | //é微信å°ç¨åºç«¯å¼ºå¶å
³écanvas2dæ¨¡å¼ |
| | | // #ifndef MP-WEIXIN |
| | | this.type2d = false; |
| | | // #endif |
| | | // #ifdef MP-TOUTIAO || MP-LARK || MP-ALIPAY |
| | | this.type2d = this.canvas2d; |
| | | // #endif |
| | | // #ifdef MP-ALIPAY |
| | | this.inAli = true; |
| | | this.pixel = systemInfo.pixelRatio; |
| | | // #endif |
| | | // #ifdef MP-BAIDU |
| | | this.inBd = true; |
| | | // #endif |
| | | // #ifdef MP-TOUTIAO |
| | | this.inTt = true; |
| | | // #endif |
| | | this.disScroll = this.disableScroll; |
| | | }, |
| | | mounted() { |
| | | // #ifdef APP-VUE |
| | | this.inApp = true; |
| | | if (this.echartsApp === true) { |
| | | this.echarts = true; |
| | | this.openmouse = false; |
| | | } |
| | | // #endif |
| | | // #ifdef APP-NVUE |
| | | this.inApp = true; |
| | | this.mixinDatacomLoading = false |
| | | this.mixinDatacomErrorMessage = "æä¸æ¯æNVUE" |
| | | // #endif |
| | | // #ifdef H5 |
| | | this.inH5 = true; |
| | | if(this.inWin === true){ |
| | | this.openmouse = this.onmouse; |
| | | } |
| | | if (this.echartsH5 === true) { |
| | | this.echarts = true; |
| | | } |
| | | // #endif |
| | | this.$nextTick(()=>{ |
| | | this.beforeInit(); |
| | | }) |
| | | // #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || APP-VUE |
| | | const time = this.inH5 ? 500 : 200; |
| | | const _this = this; |
| | | uni.onWindowResize( |
| | | debounce(function(res) { |
| | | if (_this.mixinDatacomLoading == true) { |
| | | return; |
| | | } |
| | | let errmsg = _this.mixinDatacomErrorMessage; |
| | | if (errmsg !== null && errmsg !== 'null' && errmsg !== '') { |
| | | return; |
| | | } |
| | | if (_this.echarts) { |
| | | _this.echartsResize = !_this.echartsResize; |
| | | } else { |
| | | _this.resizeHandler(); |
| | | } |
| | | }, time) |
| | | ); |
| | | // #endif |
| | | }, |
| | | destroyed(){ |
| | | if(this.echarts === true){ |
| | | delete cfe.option[this.cid] |
| | | delete cfe.instance[this.cid] |
| | | }else{ |
| | | delete cfu.option[this.cid] |
| | | delete cfu.instance[this.cid] |
| | | } |
| | | // #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO |
| | | uni.offWindowResize(()=>{}) |
| | | // #endif |
| | | }, |
| | | watch: { |
| | | chartDataProps: { |
| | | handler(val, oldval) { |
| | | if (typeof val === 'object') { |
| | | if (JSON.stringify(val) !== JSON.stringify(oldval)) { |
| | | this._clearChart(); |
| | | if (val.series && val.series.length > 0) { |
| | | this.beforeInit(); |
| | | }else{ |
| | | this.mixinDatacomLoading = true; |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | } |
| | | } |
| | | } else { |
| | | this.mixinDatacomLoading = false; |
| | | this._clearChart(); |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = 'åæ°é误ï¼chartDataæ°æ®ç±»åé误'; |
| | | } |
| | | }, |
| | | immediate: false, |
| | | deep: true |
| | | }, |
| | | localdata:{ |
| | | handler(val, oldval) { |
| | | if (JSON.stringify(val) !== JSON.stringify(oldval)) { |
| | | if (val.length > 0) { |
| | | this.beforeInit(); |
| | | }else{ |
| | | this.mixinDatacomLoading = true; |
| | | this._clearChart(); |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | } |
| | | } |
| | | }, |
| | | immediate: false, |
| | | deep: true |
| | | }, |
| | | optsProps: { |
| | | handler(val, oldval) { |
| | | if (typeof val === 'object') { |
| | | if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch == true) { |
| | | this.checkData(this.drawData); |
| | | } |
| | | } else { |
| | | this.mixinDatacomLoading = false; |
| | | this._clearChart(); |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = 'åæ°é误ï¼optsæ°æ®ç±»åé误'; |
| | | } |
| | | }, |
| | | immediate: false, |
| | | deep: true |
| | | }, |
| | | eoptsProps: { |
| | | handler(val, oldval) { |
| | | if (typeof val === 'object') { |
| | | if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === true) { |
| | | this.checkData(this.drawData); |
| | | } |
| | | } else { |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = 'åæ°é误ï¼eoptsæ°æ®ç±»åé误'; |
| | | } |
| | | }, |
| | | immediate: false, |
| | | deep: true |
| | | }, |
| | | reshow(val, oldval) { |
| | | if (val === true && this.mixinDatacomLoading === false) { |
| | | setTimeout(() => { |
| | | this.mixinDatacomErrorMessage = null; |
| | | this.echartsResize = !this.echartsResize; |
| | | this.checkData(this.drawData); |
| | | }, 200); |
| | | } |
| | | }, |
| | | reload(val, oldval) { |
| | | if (val === true) { |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | this.reloading(); |
| | | } |
| | | }, |
| | | mixinDatacomErrorMessage(val, oldval) { |
| | | if (val) { |
| | | this.emitMsg({name: 'error', params: {type:"error", errorShow: this.errorShow, msg: val, id: this.cid}}); |
| | | if(this.errorShow){ |
| | | console.log('[ç§äºå¾è¡¨ç»ä»¶]' + val); |
| | | } |
| | | } |
| | | }, |
| | | errorMessage(val, oldval) { |
| | | if (val && this.errorShow && val !== null && val !== 'null' && val !== '') { |
| | | this.showchart = false; |
| | | this.mixinDatacomLoading = false; |
| | | this.mixinDatacomErrorMessage = val; |
| | | } else { |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | this.reloading(); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | optsProps() { |
| | | return JSON.parse(JSON.stringify(this.opts)); |
| | | }, |
| | | eoptsProps() { |
| | | return JSON.parse(JSON.stringify(this.eopts)); |
| | | }, |
| | | chartDataProps() { |
| | | return JSON.parse(JSON.stringify(this.chartData)); |
| | | }, |
| | | }, |
| | | methods: { |
| | | beforeInit(){ |
| | | this.mixinDatacomErrorMessage = null; |
| | | if (typeof this.chartData === 'object' && this.chartData != null && this.chartData.series !== undefined && this.chartData.series.length > 0) { |
| | | //æ·è´ä¸ä¸chartDataï¼ä¸ºäºoptsåæ´åç»ä¸æ°æ®æ¥æº |
| | | this.drawData = deepCloneAssign({}, this.chartData); |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = true; |
| | | this.checkData(this.chartData); |
| | | }else if(this.localdata.length>0){ |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = true; |
| | | this.localdataInit(this.localdata); |
| | | }else if(this.collection !== ''){ |
| | | this.mixinDatacomLoading = false; |
| | | this.getCloudData(); |
| | | }else{ |
| | | this.mixinDatacomLoading = true; |
| | | } |
| | | }, |
| | | localdataInit(resdata){ |
| | | //æ¿æ¢enumç±»å为æ£ç¡®çæè¿° |
| | | if(this.groupEnum.length>0){ |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | for (let j = 0; j < this.groupEnum.length; j++) { |
| | | if(resdata[i].group === this.groupEnum[j].value){ |
| | | resdata[i].group = this.groupEnum[j].text |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(this.textEnum.length>0){ |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | for (let j = 0; j < this.textEnum.length; j++) { |
| | | if(resdata[i].text === this.textEnum[j].value){ |
| | | resdata[i].text = this.textEnum[j].text |
| | | } |
| | | } |
| | | } |
| | | } |
| | | let needCategories = false; |
| | | let tmpData = {categories:[], series:[]} |
| | | let tmpcategories = [] |
| | | let tmpseries = []; |
| | | //æ¼æ¥categories |
| | | if(this.echarts === true){ |
| | | needCategories = cfe.categories.includes(this.type) |
| | | }else{ |
| | | needCategories = cfu.categories.includes(this.type) |
| | | } |
| | | if(needCategories === true){ |
| | | //妿propsä¸çchartData带æcategoriesï¼åä¼å
使ç¨chartDataçcategories |
| | | if(this.chartData && this.chartData.categories && this.chartData.categories.length>0){ |
| | | tmpcategories = this.chartData.categories |
| | | }else{ |
| | | //å¦ææ¯æ¥æç±»åçæ°æ®ï¼ä¸ç®¡æ¯æ¬å°æ°æ®è¿æ¯äºæ°æ®ï¼é½æèµ·æ¢æ¥æèªå¨æ¼æ¥categories |
| | | if(this.startDate && this.endDate){ |
| | | let idate = new Date(this.startDate) |
| | | let edate = new Date(this.endDate) |
| | | while (idate <= edate) { |
| | | tmpcategories.push(getFormatDate(idate)) |
| | | idate = idate.setDate(idate.getDate() + 1) |
| | | idate = new Date(idate) |
| | | } |
| | | //å¦åä»ç»æä¸å»éå¹¶æ¼æ¥categories |
| | | }else{ |
| | | let tempckey = {}; |
| | | resdata.map(function(item, index) { |
| | | if (item.text != undefined && !tempckey[item.text]) { |
| | | tmpcategories.push(item.text) |
| | | tempckey[item.text] = true |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | tmpData.categories = tmpcategories |
| | | } |
| | | //æ¼æ¥series |
| | | let tempskey = {}; |
| | | resdata.map(function(item, index) { |
| | | if (item.group != undefined && !tempskey[item.group]) { |
| | | tmpseries.push({ name: item.group, data: [] }); |
| | | tempskey[item.group] = true; |
| | | } |
| | | }); |
| | | //å¦ææ²¡æè·åå°åç»åç§°(å¯è½æ¯å¸¦categoriesçæ°æ®ï¼ä¹å¯è½æ¯ä¸å¸¦ç饼å¾ç±») |
| | | if (tmpseries.length == 0) { |
| | | tmpseries = [{ name: 'é»è®¤åç»', data: [] }]; |
| | | //妿æ¯éè¦categoriesçå¾è¡¨ç±»å |
| | | if(needCategories === true){ |
| | | for (let j = 0; j < tmpcategories.length; j++) { |
| | | let seriesdata = 0; |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | if (resdata[i].text == tmpcategories[j]) { |
| | | seriesdata = resdata[i].value; |
| | | } |
| | | } |
| | | tmpseries[0].data.push(seriesdata); |
| | | } |
| | | //妿æ¯é¥¼å¾ç±»çå¾è¡¨ç±»å |
| | | }else{ |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | tmpseries[0].data.push({"name": resdata[i].text,"value": resdata[i].value}); |
| | | } |
| | | } |
| | | //妿æåç»å |
| | | } else { |
| | | for (let k = 0; k < tmpseries.length; k++) { |
| | | //妿æcategories |
| | | if (tmpcategories.length > 0) { |
| | | for (let j = 0; j < tmpcategories.length; j++) { |
| | | let seriesdata = 0; |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | if (tmpseries[k].name == resdata[i].group && resdata[i].text == tmpcategories[j]) { |
| | | seriesdata = resdata[i].value; |
| | | } |
| | | } |
| | | tmpseries[k].data.push(seriesdata); |
| | | } |
| | | //å¦æä¼ äºgroupèæ²¡æä¼ textï¼å³æ²¡æcategoriesï¼æ£å¸¸æ
åµä¸è¿ç§æ°æ®æ¯ä¸ç¬¦åæ°æ®è¦æ±è§èçï¼ |
| | | } else { |
| | | for (let i = 0; i < resdata.length; i++) { |
| | | if (tmpseries[k].name == resdata[i].group) { |
| | | tmpseries[k].data.push(resdata[i].value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | tmpData.series = tmpseries |
| | | //æ·è´ä¸ä¸chartDataï¼ä¸ºäºoptsåæ´åç»ä¸æ°æ®æ¥æº |
| | | this.drawData = deepCloneAssign({}, tmpData); |
| | | this.checkData(tmpData) |
| | | }, |
| | | reloading() { |
| | | if(this.errorReload === false){ |
| | | return; |
| | | } |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | if (this.collection !== '') { |
| | | this.mixinDatacomLoading = false; |
| | | this.onMixinDatacomPropsChange(true); |
| | | } else { |
| | | this.beforeInit(); |
| | | } |
| | | }, |
| | | checkData(anyData) { |
| | | let cid = this.cid |
| | | //å¤ä½optsæeopts |
| | | if(this.echarts === true){ |
| | | cfe.option[cid] = deepCloneAssign({}, this.eopts); |
| | | cfe.option[cid].id = cid; |
| | | cfe.option[cid].type = this.type; |
| | | }else{ |
| | | if (this.type && cfu.type.includes(this.type)) { |
| | | cfu.option[cid] = deepCloneAssign({}, cfu[this.type], this.opts); |
| | | cfu.option[cid].canvasId = cid; |
| | | } else { |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = 'åæ°é误ï¼propsåæ°ä¸typeç±»å䏿£ç¡®'; |
| | | } |
| | | } |
| | | //æè½½categoriesåseries |
| | | let newData = deepCloneAssign({}, anyData); |
| | | if (newData.series !== undefined && newData.series.length > 0) { |
| | | this.mixinDatacomErrorMessage = null; |
| | | if (this.echarts === true) { |
| | | cfe.option[cid].chartData = newData; |
| | | this.$nextTick(()=>{ |
| | | this.init() |
| | | }) |
| | | }else{ |
| | | cfu.option[cid].categories = newData.categories; |
| | | cfu.option[cid].series = newData.series; |
| | | this.$nextTick(()=>{ |
| | | this.init() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | resizeHandler() { |
| | | //渲æé²æ |
| | | let currTime = Date.now(); |
| | | let lastDrawTime = this.lastDrawTime?this.lastDrawTime:currTime-3000; |
| | | let duration = currTime - lastDrawTime; |
| | | if (duration < 1000) return; |
| | | let chartdom = uni |
| | | .createSelectorQuery() |
| | | // #ifndef MP-ALIPAY |
| | | .in(this) |
| | | // #endif |
| | | .select('#ChartBoxId'+this.cid) |
| | | .boundingClientRect(data => { |
| | | this.showchart = true; |
| | | if (data.width > 0 && data.height > 0) { |
| | | if (data.width !== this.cWidth || data.height !== this.cHeight) { |
| | | this.checkData(this.drawData) |
| | | } |
| | | } |
| | | }) |
| | | .exec(); |
| | | }, |
| | | getCloudData() { |
| | | if (this.mixinDatacomLoading == true) { |
| | | return; |
| | | } |
| | | this.mixinDatacomLoading = true; |
| | | this.mixinDatacomGet() |
| | | .then(res => { |
| | | this.mixinDatacomResData = res.result.data; |
| | | this.localdataInit(this.mixinDatacomResData); |
| | | }) |
| | | .catch(err => { |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = '请æ±é误ï¼' + err; |
| | | }); |
| | | }, |
| | | onMixinDatacomPropsChange(needReset, changed) { |
| | | if (needReset == true && this.collection !== '') { |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = null; |
| | | this._clearChart(); |
| | | this.getCloudData(); |
| | | } |
| | | }, |
| | | _clearChart() { |
| | | let cid = this.cid |
| | | if (this.echrts !== true && cfu.option[cid] && cfu.option[cid].context) { |
| | | const ctx = cfu.option[cid].context; |
| | | if(typeof ctx === "object" && !cfu.option[cid].update){ |
| | | ctx.clearRect(0, 0, this.cWidth, this.cHeight); |
| | | ctx.draw(); |
| | | } |
| | | } |
| | | }, |
| | | init() { |
| | | let cid = this.cid |
| | | let chartdom = uni |
| | | .createSelectorQuery() |
| | | // #ifndef MP-ALIPAY |
| | | .in(this) |
| | | // #endif |
| | | .select('#ChartBoxId'+cid) |
| | | .boundingClientRect(data => { |
| | | if (data.width > 0 && data.height > 0) { |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = true; |
| | | this.lastDrawTime = Date.now(); |
| | | this.cWidth = data.width; |
| | | this.cHeight = data.height; |
| | | if(this.echarts !== true){ |
| | | cfu.option[cid].background = this.background == 'rgba(0,0,0,0)' ? '#FFFFFF' : this.background; |
| | | cfu.option[cid].canvas2d = this.type2d; |
| | | cfu.option[cid].pixelRatio = this.pixel; |
| | | cfu.option[cid].animation = this.animation; |
| | | cfu.option[cid].width = data.width * this.pixel; |
| | | cfu.option[cid].height = data.height * this.pixel; |
| | | cfu.option[cid].onzoom = this.onzoom; |
| | | cfu.option[cid].ontap = this.ontap; |
| | | cfu.option[cid].ontouch = this.ontouch; |
| | | cfu.option[cid].onmouse = this.openmouse; |
| | | cfu.option[cid].onmovetip = this.onmovetip; |
| | | cfu.option[cid].tooltipShow = this.tooltipShow; |
| | | cfu.option[cid].tooltipFormat = this.tooltipFormat; |
| | | cfu.option[cid].tooltipCustom = this.tooltipCustom; |
| | | cfu.option[cid].inScrollView = this.inScrollView; |
| | | cfu.option[cid].lastDrawTime = this.lastDrawTime; |
| | | cfu.option[cid].tapLegend = this.tapLegend; |
| | | } |
| | | //妿æ¯H5æè
App端ï¼éç¨renderjs渲æå¾è¡¨ |
| | | if (this.inH5 || this.inApp) { |
| | | if (this.echarts == true) { |
| | | cfe.option[cid].ontap = this.ontap; |
| | | cfe.option[cid].onmouse = this.openmouse; |
| | | cfe.option[cid].tooltipShow = this.tooltipShow; |
| | | cfe.option[cid].tooltipFormat = this.tooltipFormat; |
| | | cfe.option[cid].tooltipCustom = this.tooltipCustom; |
| | | cfe.option[cid].lastDrawTime = this.lastDrawTime; |
| | | this.echartsOpts = deepCloneAssign({}, cfe.option[cid]); |
| | | } else { |
| | | cfu.option[cid].rotateLock = cfu.option[cid].rotate; |
| | | this.uchartsOpts = deepCloneAssign({}, cfu.option[cid]); |
| | | } |
| | | //妿æ¯å°ç¨åºç«¯ï¼éç¨uCharts渲æ |
| | | } else { |
| | | cfu.option[cid] = formatterAssign(cfu.option[cid],cfu.formatter) |
| | | this.mixinDatacomErrorMessage = null; |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = true; |
| | | this.$nextTick(()=>{ |
| | | if (this.type2d === true) { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query |
| | | .select('#' + cid) |
| | | .fields({ node: true, size: true }) |
| | | .exec(res => { |
| | | if (res[0]) { |
| | | const canvas = res[0].node; |
| | | const ctx = canvas.getContext('2d'); |
| | | cfu.option[cid].context = ctx; |
| | | cfu.option[cid].rotateLock = cfu.option[cid].rotate; |
| | | if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){ |
| | | this._updataUChart(cid) |
| | | }else{ |
| | | canvas.width = data.width * this.pixel; |
| | | canvas.height = data.height * this.pixel; |
| | | canvas._width = data.width * this.pixel; |
| | | canvas._height = data.height * this.pixel; |
| | | setTimeout(()=>{ |
| | | cfu.option[cid].context.restore(); |
| | | cfu.option[cid].context.save(); |
| | | this._newChart(cid) |
| | | },100) |
| | | } |
| | | } else { |
| | | this.showchart = false; |
| | | this.mixinDatacomErrorMessage = 'åæ°é误ï¼å¼å¯2d模å¼åï¼æªè·åå°domèç¹ï¼canvas-id:' + cid; |
| | | } |
| | | }); |
| | | } else { |
| | | if(this.inAli){ |
| | | cfu.option[cid].rotateLock = cfu.option[cid].rotate; |
| | | } |
| | | cfu.option[cid].context = uni.createCanvasContext(cid, this); |
| | | if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){ |
| | | this._updataUChart(cid) |
| | | }else{ |
| | | setTimeout(()=>{ |
| | | cfu.option[cid].context.restore(); |
| | | cfu.option[cid].context.save(); |
| | | this._newChart(cid) |
| | | },100) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.mixinDatacomLoading = false; |
| | | this.showchart = false; |
| | | if (this.reshow == true) { |
| | | this.mixinDatacomErrorMessage = 'å¸å±éè¯¯ï¼æªè·åå°ç¶å
ç´ å®½é«å°ºå¯¸ï¼canvas-id:' + cid; |
| | | } |
| | | } |
| | | }) |
| | | .exec(); |
| | | }, |
| | | saveImage(){ |
| | | uni.canvasToTempFilePath({ |
| | | canvasId: this.cid, |
| | | success: res=>{ |
| | | //#ifdef H5 |
| | | var a = document.createElement("a"); |
| | | a.href = res.tempFilePath; |
| | | a.download = this.cid; |
| | | a.target = '_blank' |
| | | a.click(); |
| | | //#endif |
| | | //#ifndef H5 |
| | | uni.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success: function () { |
| | | uni.showToast({ |
| | | title: 'ä¿åæå', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }); |
| | | //#endif |
| | | } |
| | | },this); |
| | | }, |
| | | getImage(){ |
| | | if(this.type2d == false){ |
| | | uni.canvasToTempFilePath({ |
| | | canvasId: this.cid, |
| | | success: res=>{ |
| | | this.emitMsg({name: 'getImage', params: {type:"getImage", base64: res.tempFilePath}}); |
| | | } |
| | | },this); |
| | | }else{ |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query |
| | | .select('#' + this.cid) |
| | | .fields({ node: true, size: true }) |
| | | .exec(res => { |
| | | if (res[0]) { |
| | | const canvas = res[0].node; |
| | | this.emitMsg({name: 'getImage', params: {type:"getImage", base64: canvas.toDataURL('image/png')}}); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // #ifndef APP-VUE || H5 |
| | | _newChart(cid) { |
| | | if (this.mixinDatacomLoading == true) { |
| | | return; |
| | | } |
| | | this.showchart = true; |
| | | cfu.instance[cid] = new uCharts(cfu.option[cid]); |
| | | cfu.instance[cid].addEventListener('renderComplete', () => { |
| | | this.emitMsg({name: 'complete', params: {type:"complete", complete: true, id: cid}}); |
| | | cfu.instance[cid].delEventListener('renderComplete') |
| | | }); |
| | | cfu.instance[cid].addEventListener('scrollLeft', () => { |
| | | this.emitMsg({name: 'scrollLeft', params: {type:"scrollLeft", scrollLeft: true, id: cid}}); |
| | | }); |
| | | cfu.instance[cid].addEventListener('scrollRight', () => { |
| | | this.emitMsg({name: 'scrollRight', params: {type:"scrollRight", scrollRight: true, id: cid}}); |
| | | }); |
| | | }, |
| | | _updataUChart(cid) { |
| | | cfu.instance[cid].updateData(cfu.option[cid]) |
| | | }, |
| | | _tooltipDefault(item, category, index, opts) { |
| | | if (category) { |
| | | let data = item.data |
| | | if(typeof item.data === "object"){ |
| | | data = item.data.value |
| | | } |
| | | return category + ' ' + item.name + ':' + data; |
| | | } else { |
| | | if (item.properties && item.properties.name) { |
| | | return item.properties.name; |
| | | } else { |
| | | return item.name + ':' + item.data; |
| | | } |
| | | } |
| | | }, |
| | | _showTooltip(e) { |
| | | let cid = this.cid |
| | | let tc = cfu.option[cid].tooltipCustom |
| | | if (tc && tc !== undefined && tc !== null) { |
| | | let offset = undefined; |
| | | if (tc.x >= 0 && tc.y >= 0) { |
| | | offset = { x: tc.x, y: tc.y + 10 }; |
| | | } |
| | | cfu.instance[cid].showToolTip(e, { |
| | | index: tc.index, |
| | | offset: offset, |
| | | textList: tc.textList, |
| | | formatter: (item, category, index, opts) => { |
| | | if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) { |
| | | return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts); |
| | | } else { |
| | | return this._tooltipDefault(item, category, index, opts); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | cfu.instance[cid].showToolTip(e, { |
| | | formatter: (item, category, index, opts) => { |
| | | if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) { |
| | | return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts); |
| | | } else { |
| | | return this._tooltipDefault(item, category, index, opts); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | _tap(e,move) { |
| | | let cid = this.cid |
| | | let currentIndex = null; |
| | | let legendIndex = null; |
| | | if (this.inScrollView === true || this.inAli) { |
| | | let chartdom = uni |
| | | .createSelectorQuery() |
| | | // #ifndef MP-ALIPAY |
| | | .in(this) |
| | | .select('#ChartBoxId'+cid) |
| | | // #endif |
| | | // #ifdef MP-ALIPAY |
| | | .select('#'+this.cid) |
| | | // #endif |
| | | .boundingClientRect(data => { |
| | | e.changedTouches=[]; |
| | | if (this.inAli) { |
| | | e.changedTouches.unshift({ x: e.detail.clientX - data.left, y: e.detail.clientY - data.top}); |
| | | }else{ |
| | | e.changedTouches.unshift({ x: e.detail.x - data.left, y: e.detail.y - data.top - this.pageScrollTop}); |
| | | } |
| | | if(move){ |
| | | if (this.tooltipShow === true) { |
| | | this._showTooltip(e); |
| | | } |
| | | }else{ |
| | | currentIndex = cfu.instance[cid].getCurrentDataIndex(e); |
| | | legendIndex = cfu.instance[cid].getLegendDataIndex(e); |
| | | if(this.tapLegend === true){ |
| | | cfu.instance[cid].touchLegend(e); |
| | | } |
| | | if (this.tooltipShow === true) { |
| | | this._showTooltip(e); |
| | | } |
| | | this.emitMsg({name: 'getIndex', params: { type:"getIndex", event:{ x: e.detail.x - data.left, y: e.detail.y - data.top }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}}); |
| | | } |
| | | }) |
| | | .exec(); |
| | | } else { |
| | | if(move){ |
| | | if (this.tooltipShow === true) { |
| | | this._showTooltip(e); |
| | | } |
| | | }else{ |
| | | e.changedTouches=[]; |
| | | e.changedTouches.unshift({ x: e.detail.x - e.currentTarget.offsetLeft, y: e.detail.y - e.currentTarget.offsetTop }); |
| | | currentIndex = cfu.instance[cid].getCurrentDataIndex(e); |
| | | legendIndex = cfu.instance[cid].getLegendDataIndex(e); |
| | | if(this.tapLegend === true){ |
| | | cfu.instance[cid].touchLegend(e); |
| | | } |
| | | if (this.tooltipShow === true) { |
| | | this._showTooltip(e); |
| | | } |
| | | this.emitMsg({name: 'getIndex', params: {type:"getIndex", event:{ x: e.detail.x, y: e.detail.y - e.currentTarget.offsetTop }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}}); |
| | | } |
| | | } |
| | | }, |
| | | _touchStart(e) { |
| | | let cid = this.cid |
| | | lastMoveTime=Date.now(); |
| | | if(cfu.option[cid].enableScroll === true && e.touches.length == 1){ |
| | | cfu.instance[cid].scrollStart(e); |
| | | } |
| | | this.emitMsg({name:'getTouchStart', params:{type:"touchStart", event:e.changedTouches[0], id:cid}}); |
| | | }, |
| | | _touchMove(e) { |
| | | let cid = this.cid |
| | | let currMoveTime = Date.now(); |
| | | let duration = currMoveTime - lastMoveTime; |
| | | let touchMoveLimit = cfu.option[cid].touchMoveLimit || 24; |
| | | if (duration < Math.floor(1000 / touchMoveLimit)) return;//æ¯ç§60帧 |
| | | lastMoveTime = currMoveTime; |
| | | if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){ |
| | | cfu.instance[cid].scroll(e); |
| | | } |
| | | if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){ |
| | | this._tap(e,true) |
| | | } |
| | | if(this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e.changedTouches.length == 2){ |
| | | cfu.instance[cid].dobuleZoom(e); |
| | | } |
| | | this.emitMsg({name: 'getTouchMove', params: {type:"touchMove", event:e.changedTouches[0], id: cid}}); |
| | | }, |
| | | _touchEnd(e) { |
| | | let cid = this.cid |
| | | if(cfu.option[cid].enableScroll === true && e.touches.length == 0){ |
| | | cfu.instance[cid].scrollEnd(e); |
| | | } |
| | | this.emitMsg({name:'getTouchEnd', params:{type:"touchEnd", event:e.changedTouches[0], id:cid}}); |
| | | if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){ |
| | | this._tap(e,true) |
| | | } |
| | | }, |
| | | // #endif |
| | | _error(e) { |
| | | this.mixinDatacomErrorMessage = e.detail.errMsg; |
| | | }, |
| | | emitMsg(msg) { |
| | | this.$emit(msg.name, msg.params); |
| | | }, |
| | | getRenderType() { |
| | | //鲿¢å¦æå¼å¯echartsä¸ç¶å
ç´ ä¸ºv-ifçæ
åµrenderjsçå¬ä¸å°propååçé®é¢ |
| | | if(this.echarts===true && this.mixinDatacomLoading===false){ |
| | | this.beforeInit() |
| | | } |
| | | }, |
| | | toJSON(){ |
| | | return this |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <!-- #ifdef APP-VUE || H5 --> |
| | | <script module="rdcharts" lang="renderjs"> |
| | | import uChartsRD from '../../js_sdk/u-charts/u-charts.js'; |
| | | import cfu from '../../js_sdk/u-charts/config-ucharts.js'; |
| | | import cfe from '../../js_sdk/u-charts/config-echarts.js'; |
| | | |
| | | var that = {}; |
| | | var rootdom = null; |
| | | |
| | | function rddeepCloneAssign(origin = {}, ...args) { |
| | | for (let i in args) { |
| | | for (let key in args[i]) { |
| | | if (args[i].hasOwnProperty(key)) { |
| | | origin[key] = args[i][key] && typeof args[i][key] === 'object' ? rddeepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key]; |
| | | } |
| | | } |
| | | } |
| | | return origin; |
| | | } |
| | | |
| | | function rdformatterAssign(args,formatter) { |
| | | for (let key in args) { |
| | | if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){ |
| | | rdformatterAssign(args[key],formatter) |
| | | }else if(key === 'format' && typeof args[key] === 'string'){ |
| | | args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined; |
| | | } |
| | | } |
| | | return args; |
| | | } |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | rid:null |
| | | } |
| | | }, |
| | | mounted() { |
| | | rootdom = {top:0,left:0} |
| | | // #ifdef H5 |
| | | let dm = document.querySelectorAll('uni-main')[0] |
| | | if(dm === undefined){ |
| | | dm = document.querySelectorAll('uni-page-wrapper')[0] |
| | | } |
| | | rootdom = {top:dm.offsetTop,left:dm.offsetLeft} |
| | | // #endif |
| | | setTimeout(()=>{ |
| | | if(this.rid === null){ |
| | | this.$ownerInstance && this.$ownerInstance.callMethod('getRenderType') |
| | | } |
| | | },200) |
| | | }, |
| | | destroyed(){ |
| | | delete cfu.option[this.rid] |
| | | delete cfu.instance[this.rid] |
| | | delete cfe.option[this.rid] |
| | | delete cfe.instance[this.rid] |
| | | }, |
| | | methods: { |
| | | //==============以䏿¯EChartsçæ¹æ³==================== |
| | | ecinit(newVal, oldVal, owner, instance){ |
| | | let cid = JSON.stringify(newVal.id) |
| | | this.rid = cid |
| | | that[cid] = this.$ownerInstance || instance |
| | | let eopts = JSON.parse(JSON.stringify(newVal)) |
| | | let type = eopts.type; |
| | | //è½½å
¥å¹¶è¦çé»è®¤é
ç½® |
| | | if (type && cfe.type.includes(type)) { |
| | | cfe.option[cid] = rddeepCloneAssign({}, cfe[type], eopts); |
| | | }else{ |
| | | cfe.option[cid] = rddeepCloneAssign({}, eopts); |
| | | } |
| | | let newData = eopts.chartData; |
| | | if(newData){ |
| | | //æè½½categoriesåseries |
| | | if(cfe.option[cid].xAxis && cfe.option[cid].xAxis.type && cfe.option[cid].xAxis.type === 'category'){ |
| | | cfe.option[cid].xAxis.data = newData.categories |
| | | } |
| | | if(cfe.option[cid].yAxis && cfe.option[cid].yAxis.type && cfe.option[cid].yAxis.type === 'category'){ |
| | | cfe.option[cid].yAxis.data = newData.categories |
| | | } |
| | | cfe.option[cid].series = [] |
| | | for (var i = 0; i < newData.series.length; i++) { |
| | | cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate : {} |
| | | let Template = rddeepCloneAssign({},cfe.option[cid].seriesTemplate,newData.series[i]) |
| | | cfe.option[cid].series.push(Template) |
| | | } |
| | | } |
| | | |
| | | if (typeof window.echarts === 'object') { |
| | | this.newEChart() |
| | | }else{ |
| | | const script = document.createElement('script') |
| | | // #ifdef APP-VUE |
| | | script.src = './uni_modules/qiun-data-charts/static/app-plus/echarts.min.js' |
| | | // #endif |
| | | // #ifdef H5 |
| | | const { origin, pathname } = window.location |
| | | const rooturl = origin + pathname |
| | | script.src = rooturl + 'uni_modules/qiun-data-charts/static/h5/echarts.min.js' |
| | | // #endif |
| | | script.onload = this.newEChart |
| | | document.head.appendChild(script) |
| | | } |
| | | }, |
| | | ecresize(newVal, oldVal, owner, instance){ |
| | | if(cfe.instance[this.rid]){ |
| | | cfe.instance[this.rid].resize() |
| | | } |
| | | }, |
| | | newEChart(){ |
| | | let cid = this.rid |
| | | if(cfe.instance[cid] === undefined){ |
| | | cfe.instance[cid] = echarts.init(that[cid].$el.children[0]) |
| | | //ontapå¼å¯åæè§¦åclickäºä»¶ |
| | | if(cfe.option[cid].ontap === true){ |
| | | cfe.instance[cid].on('click', resdata => { |
| | | let event = JSON.parse(JSON.stringify({ |
| | | x:resdata.event.offsetX,y:resdata.event.offsetY |
| | | })) |
| | | that[cid].callMethod('emitMsg',{name:"getIndex", params:{type:"getIndex", event:event, currentIndex:resdata.dataIndex, value:resdata.data, seriesName: resdata.seriesName,id:cid}}) |
| | | }) |
| | | // å¢å EChartsçhighlightæ¶æ¯ï¼å®ç°æä¸ç§»å¨è¿åç´¢å¼åè½ãadd by onefish åå»ºäº 2021-12-11 09:50 |
| | | cfe.instance[cid].on('highlight', resdata => { |
| | | that[cid].callMethod('emitMsg',{name:"getHighlight", params:{type:"highlight", res:resdata, id:cid}}) |
| | | }) |
| | | } |
| | | this.updataEChart(cid,cfe.option[cid]) |
| | | }else{ |
| | | this.updataEChart(cid,cfe.option[cid]) |
| | | } |
| | | }, |
| | | updataEChart(cid,option){ |
| | | //æ¿æ¢optionå
format屿§ä¸ºformatterçé¢å®ä¹æ¹æ³ |
| | | option = rdformatterAssign(option,cfe.formatter) |
| | | if(option.tooltip){ |
| | | option.tooltip.show = option.tooltipShow?true:false; |
| | | option.tooltip.position = this.tooltipPosition() |
| | | //tooltipFormatæ¹æ³ï¼æ¿æ¢ç»ä»¶çtooltipFormat为config-echarts.jså
对åºçæ¹æ³ |
| | | if (typeof option.tooltipFormat === 'string' && cfe.formatter[option.tooltipFormat]) { |
| | | option.tooltip.formatter = option.tooltip.formatter ? option.tooltip.formatter : cfe.formatter[option.tooltipFormat] |
| | | } |
| | | } |
| | | // é¢è²æ¸åæ·»å çæ¹æ³ |
| | | if (option.series) { |
| | | for (let i in option.series) { |
| | | let linearGradient = option.series[i].linearGradient |
| | | if (linearGradient) { |
| | | option.series[i].color = new echarts.graphic.LinearGradient(linearGradient[0],linearGradient[1],linearGradient[2],linearGradient[3],linearGradient[4]) |
| | | } |
| | | } |
| | | } |
| | | cfe.instance[cid].setOption(option, option.notMerge) |
| | | cfe.instance[cid].on('finished', function(){ |
| | | that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid}}) |
| | | if(cfe.instance[cid]){ |
| | | cfe.instance[cid].off('finished') |
| | | } |
| | | }) |
| | | }, |
| | | tooltipPosition(){ |
| | | return (point, params, dom, rect, size) => { |
| | | let x = point[0] |
| | | let y = point[1] |
| | | let viewWidth = size.viewSize[0] |
| | | let viewHeight = size.viewSize[1] |
| | | let boxWidth = size.contentSize[0] |
| | | let boxHeight = size.contentSize[1] |
| | | let posX = x + 30 |
| | | let posY = y + 30 |
| | | if (posX + boxWidth > viewWidth) { |
| | | posX = x - boxWidth - 30 |
| | | } |
| | | if (posY + boxHeight > viewHeight) { |
| | | posY = y - boxHeight - 30 |
| | | } |
| | | return [posX, posY] |
| | | } |
| | | }, |
| | | //==============以䏿¯uChartsçæ¹æ³==================== |
| | | ucinit(newVal, oldVal, owner, instance){ |
| | | if(JSON.stringify(newVal) == JSON.stringify(oldVal)){ |
| | | return; |
| | | } |
| | | if(!newVal.canvasId){ |
| | | return; |
| | | } |
| | | let cid = JSON.parse(JSON.stringify(newVal.canvasId)) |
| | | this.rid = cid |
| | | that[cid] = this.$ownerInstance || instance |
| | | cfu.option[cid] = JSON.parse(JSON.stringify(newVal)) |
| | | cfu.option[cid] = rdformatterAssign(cfu.option[cid],cfu.formatter) |
| | | let canvasdom = document.getElementById(cid) |
| | | if(canvasdom && canvasdom.children[0]){ |
| | | cfu.option[cid].context = canvasdom.children[0].getContext("2d") |
| | | if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){ |
| | | this.updataUChart() |
| | | }else{ |
| | | setTimeout(()=>{ |
| | | cfu.option[cid].context.restore(); |
| | | cfu.option[cid].context.save(); |
| | | this.newUChart() |
| | | },100) |
| | | } |
| | | } |
| | | }, |
| | | newUChart() { |
| | | let cid = this.rid |
| | | cfu.instance[cid] = new uChartsRD(cfu.option[cid]) |
| | | cfu.instance[cid].addEventListener('renderComplete', () => { |
| | | that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid}}) |
| | | cfu.instance[cid].delEventListener('renderComplete') |
| | | }); |
| | | cfu.instance[cid].addEventListener('scrollLeft', () => { |
| | | that[cid].callMethod('emitMsg',{name:"scrollLeft",params:{type:"scrollLeft",scrollLeft:true,id:cid}}) |
| | | }); |
| | | cfu.instance[cid].addEventListener('scrollRight', () => { |
| | | that[cid].callMethod('emitMsg',{name:"scrollRight",params:{type:"scrollRight",scrollRight:true,id:cid}}) |
| | | }); |
| | | }, |
| | | updataUChart() { |
| | | let cid = this.rid |
| | | cfu.instance[cid].updateData(cfu.option[cid]) |
| | | }, |
| | | tooltipDefault(item, category, index, opts) { |
| | | if (category) { |
| | | let data = item.data |
| | | if(typeof item.data === "object"){ |
| | | data = item.data.value |
| | | } |
| | | return category + ' ' + item.name + ':' + data; |
| | | } else { |
| | | if (item.properties && item.properties.name) { |
| | | return item.properties.name ; |
| | | } else { |
| | | return item.name + ':' + item.data; |
| | | } |
| | | } |
| | | }, |
| | | showTooltip(e,cid) { |
| | | let tc = cfu.option[cid].tooltipCustom |
| | | if (tc && tc !== undefined && tc !== null) { |
| | | let offset = undefined; |
| | | if (tc.x >= 0 && tc.y >= 0) { |
| | | offset = { x: tc.x, y: tc.y + 10 }; |
| | | } |
| | | cfu.instance[cid].showToolTip(e, { |
| | | index: tc.index, |
| | | offset: offset, |
| | | textList: tc.textList, |
| | | formatter: (item, category, index, opts) => { |
| | | if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) { |
| | | return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts); |
| | | } else { |
| | | return this.tooltipDefault(item, category, index, opts); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | cfu.instance[cid].showToolTip(e, { |
| | | formatter: (item, category, index, opts) => { |
| | | if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) { |
| | | return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts); |
| | | } else { |
| | | return this.tooltipDefault(item, category, index, opts); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | tap(e) { |
| | | let cid = this.rid |
| | | let ontap = cfu.option[cid].ontap |
| | | let tooltipShow = cfu.option[cid].tooltipShow |
| | | let tapLegend = cfu.option[cid].tapLegend |
| | | if(ontap == false) return; |
| | | let currentIndex=null |
| | | let legendIndex=null |
| | | let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect() |
| | | let tmpe = {} |
| | | if(e.detail.x){//tapæè
clickçäºä»¶ |
| | | tmpe = { x: e.detail.x - rchartdom.left, y:e.detail.y - rchartdom.top + rootdom.top} |
| | | }else{//mouseçäºä»¶ |
| | | tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top} |
| | | } |
| | | e.changedTouches = []; |
| | | e.changedTouches.unshift(tmpe) |
| | | currentIndex=cfu.instance[cid].getCurrentDataIndex(e) |
| | | legendIndex=cfu.instance[cid].getLegendDataIndex(e) |
| | | if(tapLegend === true){ |
| | | cfu.instance[cid].touchLegend(e); |
| | | } |
| | | if(tooltipShow==true){ |
| | | this.showTooltip(e,cid) |
| | | } |
| | | that[cid].callMethod('emitMsg',{name:"getIndex",params:{type:"getIndex",event:tmpe,currentIndex:currentIndex,legendIndex:legendIndex,id:cid, opts: cfu.instance[cid].opts}}) |
| | | }, |
| | | touchStart(e) { |
| | | let cid = this.rid |
| | | let ontouch = cfu.option[cid].ontouch |
| | | if(ontouch == false) return; |
| | | if(cfu.option[cid].enableScroll === true && e.touches.length == 1){ |
| | | cfu.instance[cid].scrollStart(e); |
| | | } |
| | | that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"touchStart",event:e.changedTouches[0],id:cid}}) |
| | | }, |
| | | touchMove(e) { |
| | | let cid = this.rid |
| | | let ontouch = cfu.option[cid].ontouch |
| | | if(ontouch == false) return; |
| | | if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){ |
| | | cfu.instance[cid].scroll(e); |
| | | } |
| | | if(cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid].onmovetip === true){ |
| | | let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect() |
| | | let tmpe = { x: e.changedTouches[0].clientX - rchartdom.left, y:e.changedTouches[0].clientY - rchartdom.top + rootdom.top} |
| | | e.changedTouches.unshift(tmpe) |
| | | if(cfu.option[cid].tooltipShow === true){ |
| | | this.showTooltip(e,cid) |
| | | } |
| | | } |
| | | if(ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e.changedTouches.length == 2){ |
| | | cfu.instance[cid].dobuleZoom(e); |
| | | } |
| | | that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"touchMove",event:e.changedTouches[0],id:cid}}) |
| | | }, |
| | | touchEnd(e) { |
| | | let cid = this.rid |
| | | let ontouch = cfu.option[cid].ontouch |
| | | if(ontouch == false) return; |
| | | if(cfu.option[cid].enableScroll === true && e.touches.length == 0){ |
| | | cfu.instance[cid].scrollEnd(e); |
| | | } |
| | | that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"touchEnd",event:e.changedTouches[0],id:cid}}) |
| | | }, |
| | | mouseDown(e) { |
| | | let cid = this.rid |
| | | let onmouse = cfu.option[cid].onmouse |
| | | if(onmouse == false) return; |
| | | let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect() |
| | | let tmpe = {} |
| | | tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top} |
| | | e.changedTouches = []; |
| | | e.changedTouches.unshift(tmpe) |
| | | cfu.instance[cid].scrollStart(e) |
| | | cfu.option[cid].mousedown=true; |
| | | that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"mouseDown",event:tmpe,id:cid}}) |
| | | }, |
| | | mouseMove(e) { |
| | | let cid = this.rid |
| | | let onmouse = cfu.option[cid].onmouse |
| | | let tooltipShow = cfu.option[cid].tooltipShow |
| | | if(onmouse == false) return; |
| | | let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect() |
| | | let tmpe = {} |
| | | tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top} |
| | | e.changedTouches = []; |
| | | e.changedTouches.unshift(tmpe) |
| | | if(cfu.option[cid].mousedown){ |
| | | cfu.instance[cid].scroll(e) |
| | | that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"mouseMove",event:tmpe,id:cid}}) |
| | | }else if(cfu.instance[cid]){ |
| | | if(tooltipShow==true){ |
| | | this.showTooltip(e,cid) |
| | | } |
| | | } |
| | | }, |
| | | mouseUp(e) { |
| | | let cid = this.rid |
| | | let onmouse = cfu.option[cid].onmouse |
| | | if(onmouse == false) return; |
| | | let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect() |
| | | let tmpe = {} |
| | | tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top} |
| | | e.changedTouches = []; |
| | | e.changedTouches.unshift(tmpe) |
| | | cfu.instance[cid].scrollEnd(e) |
| | | cfu.option[cid].mousedown=false; |
| | | that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"mouseUp",event:tmpe,id:cid}}) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <!-- #endif --> |
| | | |
| | | <style scoped> |
| | | .chartsview { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex: 1; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="chartsview"> |
| | | <view class="charts-error"></view> |
| | | <view class="charts-font">{{errorMessage==null?'请ç¹å»éè¯':errorMessage}}</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'qiun-error', |
| | | props: { |
| | | errorMessage: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .chartsview { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | flex: 1; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .charts-font{ |
| | | font-size: 14px; |
| | | color: #CCCCCC; |
| | | margin-top: 10px; |
| | | } |
| | | .charts-error{ |
| | | width: 128px; |
| | | height: 128px; |
| | | background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAUz0lEQVR4Xu1de3Bc1X3+zmp3jYVWfkPAgCWwY8zLEglNQCSW0yT9o2SQaDKdNulUykwfM+k09p+J3ImYIPJXi9yZzDSZZiwyaZuZBCwnNG1DMogEmUAAy7xs/MAyNhCMjWWtsK1deU/n23OvtLu6j3Pv3t29d71nxjOSde455/5+3/m9z7kCjRY4BR7eK7fkcmhrasLT37hbTAY+QYADigDHagwFYGhc7gZwHMAUgG4hMPzNe8RoWInTAECAnHl4r+yREt0DXWIbhx3cJ5fHP8TYjntFR4DTBDqUIwBmMrJDCtyPHDoQw0Q8jkeXinCLtECp43Gwh56R22IxTBbu+KFxOTbQJbo9DlW17rYASGdlNySeKl2JADpbkmKiait0mWhoXHZkmzE52CkocmvavvOsbMvl8MhAl+jlQrg2CQzu6BI9NV2Yw+T2AJiVo+DuL2kSeLQ1KfrC8kLcYbkYBv/pbjEWhjUNjUvSpk9KSAicm2tGXxjAaUcbewBkJAm6xeLBp1PJ2os06ttcDl8H0CEEaGnvGegSg2EAQZTW4B0AEntSS2ov0mhgJc5jmwT6IDEWi2E0zNZ2WEFhC4CZjCRxH7GwAfpbkmIkLC9EFQBg20BXeOySsNBGZx2OXkB6Vg5CgAbMZgD7BTDSkhTDOgM3+kSDAr7iANNz8n4hQRdxojUu9kTjVRurtKKAJwBIKZfPZPOuYWFgY6wlgV4hau+GNVjsnQKeAJDOSIp/Wt6lbSKeQG8jSOSdAbV+wisA7FxDSGAqBmwNS5DIiGIucyNwKiGedutTz3/3BgCb4JBJoGqDIJ2VW4REmxRog0S3lGgT/NlfY3RzCgJjQmJSCkxeDuDwBgCb8HAhvQkCIdCbSgQfmSPDmWGDzHsm1UqwjBEUAMbqERCeAEBGz2RknwR2uW0yAZQdL6DR+WEW90syXLmjtW8So0Jg9MoE9tSD4esZANUAAd1M5NAjGOULaaOkAzCKGEaj7Ar7AoBHEGxrSYqdOnxMZ+W3ZA59ZehxnWkC7yMlJkUMIy1x7IyaVPANAAMEHTlgTACO1rYERlqTot+J8nbp58C5VcEBDftnOEpAKAsAgYPAPgNZQbYFP3QeCAybJ/Bg2CVC2QDwCoJUAtudiJKuExCQLoZbPKirAoOHovuIThVByuXii2jE/C9I2TaXBYsfmThyahMtCWy1A4ERbj7rvvRI9aCa3F7pINm3n5XdXgtjFgHAYCQrW4v8bBo6MYFep5cwmEefuSwQpDNSRoq9+osdrqRaGBqXMhfDVi8gWASAdEbuswuyGCKNSLatBygXBHUqAQohMmHESAKrqzSro4TIS2yOq10dVQQAuyKQUoC7BXnIxHQWwwL4ay/qIM/8DHaFJuijv7M99QzaNmAx6hzQFsvhKSmxvakJo7oHUooA4MUA0wHBTDYfQnVUB6bFnLc1JHqiFgPwxPnSzhKjLUn0B+UpsDoqFkOfLvO5HN8AMN5lOJUU2+2IMD0ne0QOtCcq0k7OANe1VGToag7qaBRXeiFFAJjOyBENsV20Jqcgj2FQHgvyJWYvAQfPAJuvAv7198ADm4DMHJBKAmuag5ypemPpGNiVWk2pDcCDDDQCPTU7EOgmjrxMRgA8dgBYmwJOXwBuWgH87m3gz26OLgDy6q9G9RSLvIAymFZUGsaCjJzE7qB1+vvngXRGQebG5QB/P30eaF2iQBHllk8wxdDfGq/eYVLLQJBfEOQNOpk3/Bg86hbA8iAZwt2/a78asX8zsKRJ/fzYQeDttFIHUbcJqi0JnM4FaOX9g2Sw7lgHTgPTs0DHRxTjT5wDtqzTfTr8/aoJArfTwX055P1519q6apGV4v8/XlU6nzv/vo8CvzwK3L0W2LS6Wquo/DzVAoFrMiivyzVSvpUnycIMVAUU///2kgIC9b+pDqq5jirMVXEX0RUAfMkwgoDrMoFQBUbUcoqxVFJsrdQCtAAQZhBUijChGlfiwdSSypx81gaAAQLLA6OhIlaNF2MGqriMm1cFqJoEtlai0lobAIzqZbPYF7RrV2N+BT79L99c8Eh+dzI474RGYSqB9qDyBuaLawMgnZE8Exjau24C56TPAZ8+vsD0594GPrHW50DWjwVuD2gBwDgm/q1AX6VOB/v5YeDWNerlXnsf+MKGYF/ULQvrdTZXAFQioeN1kVHqTxuAgSo2xiWCdk+DVgWuAEjPyt31XqARJYAZa92ZSqq7CMttjgCoh1r9cgkU1ueDuq7PEQDTs/JY0Nm8sBI0gusKxCCMZDIogsyqzJIDiA3YAqCx+yvDs4BHLVsKBFoPEPDLNYbToUCZUsASAFHY/SfTCxWtq5qBK4ziEB2a1VmfsqTAIgBUupLXL/Evshj0NNCaBM7NAr89sTDSp64HOj/id+ToP1eOR7AYAD4qg6tBwufeARhabV8BfPJaFWxZEgeSMWDTmstaApD8vuMCRQAI47Gs37wFrG4GrksBR882mG212VhW3rpEtPvZiL6OhvmZyOszFPm7D6qqX+76L6xfGIH/l7mkVMGNKy773Z8njIyh1081cfHBkJAEfgqZv2kV8Cmj4HP/H4ADZ1RBqNmYbfvEtV7hVX/9/X7HYR4AYUr6PPmmYjSZ/7kblRT47yOK8Uyu8DxA6xXqHADVw2XsARQhuSWBFV7rBeYBoHsyuNJ7582zwBNHgNVLgb+8TTH/8YOq/o+7ffPVCwynpAiC+W+cUfOcnwOuvlIdO4ti86MG5gGQdrkFtFoE2fUykJ4F+u4AknHgx6+pnf/ZduCW1QD9f3oDPA/A5tcFpA3x8ingxXcVuPJ61Dgt27MRuKG1Wm8c6DyevYE8AMJk/f/nq8BNK5VeN10/k8mvnwZ+ZRw1pfjnYdCOq1VZuJd2/Bzwv0cXGL9hpdr1PGNIgMUF8Oe3AquWehk1FH0nUknR6WUleQCENe37vZeUFOi/AyhUDbQL/JwE5q4ngI4YNxBxl7NiZ5kBoCePAb9/R4mBq64EejcGX9DhhTl++sYTaPdya7sCgPoySM1LvujzM8Dzd3cuMNy08ikZeBqYqoE7njv1t28p3c3f/+hapSLs2jszAI1Luo40JMn4j64s7v3PzympQNeSgLtnLfDxiHkYXkvGFAA0r2Yjsf3sPF0km/r/H+9aEP8P8ORPEhh5ecErIPNpGLJxF7/3oWLcfesV80rboQ+UyDf7f3HTYuPx+XeAX00Ct68BPn0D8O8TasyvbgZakrpvEIp+nuyAPACmM/KsW7k3b+N4/ABA5lSq8cIH0/o39f9f3KoYQYab0uDnR4BjZ4Gv3LYAgB+9qiQB+xe2X0+q4kw22hL8V9roTXz3BTXP1z6mVAJzDfxHqUIDNELN02f9hI7/T6v7zSklbml8MfFCXzzoRp1Pv57n/Wj5M/RrJnn2/QG4rlVJIPM4+DfvWVjB9/YpFfFJIzBEZv7iMHAirUT+59qBO2zcu7zuf1ftfrOKtxAUVElBF3cGTTtzPBaNtiaFhRy0nlHoGIDc/a+fUlez0Dq/ZY26kiXoRoCR0G5WvRkoMnf0/xwFXnwPiAFINgE3LAOmLwKnjPEoKejfW7Xj0+q0Mef92seLVQNLvF95H/iTm4CNJfZC0O8e5HheAkJCNwBkHsv++zuDXKq/sSgd/uu1xf47gfnWOR5mVeNe1Qx8adOClW8l+n8woQzDL9682Cik7fDTg8D1KaD3Zn9rrdRTlHA0mmmvLJJOHopERFg8AK+EIgiomo6dAy7OKdXwNx3AiRngRy8DOQl0XgN8Zp19tJDMJZMLRX/pOh7eqwhMNRCmZtpkVreiePEECADLj0SH6WWd1kIgPP6G2sVty4Av36pE/+43gDMX1K6+b8NiEJhGHqXEV263Bwm9AY731Q6gJVF7qnDnT7ynbCS6zDx8QpXJgNi8JPBwmljouoC1f3X7FdDHH30DmMsBG1YosU+m0Vg8exG4pkV5B2begCFg5htIMCf7gDOadsCXbgGusbEjqkkbMp+iv7QR5POG+eUGADL/rWmgSQBzEui4CvjT9cBUBnjikPqbCYJzF4EfGBdNMW5g5xmYBKY3cOgMsGEVcClXTVY7z+WkArxUCIkoFIA6keLXx4DXTiuDb2ubihdkcsCnDZ+fDPzZIRX+pYvJRBPF6GfbVPRQt124FE4AULJZBOe0YwFUAZG9mv2Fd4G9J4tdOEb0fnNCVQxtuQHoug4gCH5yADgxrdjtZPRZeQqvnFISgEmiMDV6ZjbueP0DgBm9PYes9Tizhr84mr98Ol9Qwps66OszZOyF+WS2GSQKiw2gCcD6BkBMABT9DNLY6XFKgicnVWCIuQR6BMwb0Ojz0hhipg3x5dsilR6ubwA0xwGCgDvaLsJHJtPPP/yBKvQg862SQG5gYByArZI5ELc1+Pi7PgCmM5JfuArNRZBuL0uGMkdg5dsXPktwcPfS4PMq9s1xzDAxS9KZlYxQ0wdAlOIAFOPU5Wxm1s6KKfTzqbvLYT7HNWMANCZZixihVp8AYHSPlrxdWpcMMiN8/Pmua1QW0E+LajbQeNf6A4BZ1MGw5z98bDFLybAnDqvYPptOkMcJGBGuB+BraReFRCYU/OPXgVMfWjOW+p4Gn1nu5RbedZMIHOe7L6pevJa+EqlvtzWU9XdPoeCQ1AM6vbCp+0t3P3c96wJZzMHG6l4WdJR7VuCR54ELc6q4xEu0sCymBfiwp2ygbj1AgOvzPBQjcU8dL9bpNPQops1dT7sgCGYxScSxGURa2+rubXh+mWo84KkeICu7IcFbQEPb6Pqx6mdpXBV9HvlgoRiktLS7nJcw9X4ipuIM9CJWXqHSxVFqXkrDRZgOhdgROZsDvv8ScMnMWgiV9uWOXxfACR6qErp8BJpVY7KF2UW3UrUwgEQC51qTQrtiU1UFz8pJIRDqj67MzAGPva5EPsO7zPkHwXyO98NX1IeomE4myFgnQHAxysiQMkPBLIZlsWoEmrYLyHfxdC6g1i/PxfJkD9O/bOWIf/OaGep7Nur8eEwBoNCFpHQw6wb/9s7yDcwq0FDbBVwAQAQ8gULCUVSPn1y4J4BlX+uWqfIv85iXFaHN4g7uaJ4INr84wtLzrAReeFs99Ve3Fx8O/ZfnVd3hXdeqbxOFuXnxAOYBENaLoZwITWnA3ct6APN0L/tTbFOEXxFXP3OnT11UI5HxhY2HPnjYhCqFpeY8+8BWGGnk89/fB9AOYWPRCXMLYW1eDMB5APCHqBaGEAisDWCI+PDZ4ttDSplEYKxfody79uUKKOapI55J4Glg2gIsJqF6IYAIMvZh/2MGQG5bA3ymLXgI0IATAj3ml0G8VmxLieOtS4SnlYXufoByydoUUwdHeUhkdk6dLqbzwCNndO8KG5nO8DGZblYHs2bwJweLgWQGmFgbyDgBG08OXx+AB1K0IAv/3ctHPP1cExO6G0LKBYDu82Q+q4a52ynSWTlUGEFkKpht+ZJiu4L/T8/g8+1Ac6JY/ejObdcvlRSWRWc8vSUlRt3S9mXdEKJzRrDcFwzL86ynZ7qYzW+tAA3Knx5Qhaa0GcotrHQ706f16T6J0ZYk+r3cE1SEuHRGTgDYHBZGVWIdhcz3WhlcuJ7CdDGDUn/crozJcprbDtYCAeDpY5PFAIiYO+iV2Nz15udcyk0Xc+7CqiPeKPLAxvJAoPO5WOOr7KMugTttEBQBoJ7VQCHzGS9wqiX0AiyCwKxBqBYIjPA9v9LuJK0n4gn0ul0XE5m7gr0wpbSveYqmnDF0nw3qWhm3gI4OCHQkyiIA6NwXoEuMsPSjH8/IX2ausiuiIcjawXJtAXOVgYBAYjKVRKedYWj3vYDQJ4cqy8rwjO4GAq502uWGdyfjsvHFkPDw2n4lAoOphHjQaalOIHACkSUAqF/SWUy6BR6iQLt6WaMERlqTot8rCBheTiTQYWcM2h539BKCrBcih/09dEBAvuWAYW5eMh8x9JnXyBu5hS359xQYa4ljp+N51ygUioSdaUGvjyBIJbDdLdpHKV7YxyqxxNyBIwDq0SMImiE1Gk870GOuz+oEGN1E1xPvUTo6ViNm1GpaTyCwC/O7AoChRwnsq9VbNuZ1pIA2CCy9BIk9rgDg9OmMHAbw9QYzQkkBLRAYkcNRAMoIBPYLoE8LAAYI6j5TGEr26i3KUyFo4ZDaANBMReott9ErUAq41RI4TaYNAA4ShWNkgVI2QoPZVRO5vYItAIbGZYcQWJZZiv2DncIoh8x/XCLSN4u6ESSqfw8UAEPjeaOvj1+kBLCuqQmd37hb8Gfz+0Juueio0jGS6/ZTDGq+6CIJMLhPLk+cx9lYDO1k+kPPyBEhMDnQJQbNh1g4ks1iopErqDhe9scT6JnLYBgC91vN5hbrd1vhIgB851nZlsvhWLYZKyj6DWmAgS6xrXCwhlHoRtry/s4a/1QSHWY4l6FcKbCtcNOxT0ygpyUp6KH5apY2gLHrt1AFCIHOWAwdpgoonKURKvZFc9eHuKtjQHcpY/Mle3NoQw7dsgkTfr4VXDq5rRH48F7Zk8uhrakJo1bMNwdqZA1d+empgx3zPQ3iobMnN9Bu3AYIPFDcoWu1mc+lBAIADsQDpshhpGEY+gNDLZgfCADoNSQvqPLkTSuxfuNq7IwJhODTCv4YUYunsjkc3f8+Bo7M4v8KYy5cixmPKVxXaWymnDWXLQGGxiVjAmaCoZy1XPbPSon9O+4VHSYhaIdJid2lhJESUzvu1f80nBNhywYA3cY5oOhI8uqlaLk+hfWXPUc1CHAijSOnL2CGXePAZKHBzd0PgEG50jZR6pZrTGXZpWwA+J248Vw4KNAAQDj4ULNVBA6Abz8ru8Ul9SVyITCVbUY/DRsjxLxLSmhdYSYEHh3oEiMch2rm0iXssqHSxI57xfZKU/ChZ+QjAOb1c6XnM+g3T4NKzRc4AIbGZR8TSeaCYzH0Ua8ZIeY8QzXbSBEAcvlSZyvwBKYPndb10LjkBQ1a4NV8P51u8zTQ6eynT+AA8LOIxjO1o0ADALWjfShmjhwACgNPoaCgsnWOO+VLwrJOq3VEDgCGLrbMjdeK0EEGZqr9DpEDgFXgqdpEK50vlsPUQJf/nHwt1///89bqDjCPWPAAAAAASUVORK5CYII="); |
| | | background-position: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container loading1"> |
| | | <view class="shape shape1"></view> |
| | | <view class="shape shape2"></view> |
| | | <view class="shape shape3"></view> |
| | | <view class="shape shape4"></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'loading1', |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped="true"> |
| | | .container { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: relative; |
| | | } |
| | | .container.loading1 { |
| | | -webkit-transform: rotate(45deg); |
| | | transform: rotate(45deg); |
| | | } |
| | | |
| | | .container .shape { |
| | | position: absolute; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 1px; |
| | | } |
| | | .container .shape.shape1 { |
| | | left: 0; |
| | | background-color: #1890FF; |
| | | } |
| | | .container .shape.shape2 { |
| | | right: 0; |
| | | background-color: #91CB74; |
| | | } |
| | | .container .shape.shape3 { |
| | | bottom: 0; |
| | | background-color: #FAC858; |
| | | } |
| | | .container .shape.shape4 { |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #EE6666; |
| | | } |
| | | |
| | | .loading1 .shape1 { |
| | | -webkit-animation: animation1shape1 0.5s ease 0s infinite alternate; |
| | | animation: animation1shape1 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation1shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(16px, 16px); |
| | | transform: translate(16px, 16px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation1shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(16px, 16px); |
| | | transform: translate(16px, 16px); |
| | | } |
| | | } |
| | | .loading1 .shape2 { |
| | | -webkit-animation: animation1shape2 0.5s ease 0s infinite alternate; |
| | | animation: animation1shape2 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation1shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-16px, 16px); |
| | | transform: translate(-16px, 16px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation1shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-16px, 16px); |
| | | transform: translate(-16px, 16px); |
| | | } |
| | | } |
| | | .loading1 .shape3 { |
| | | -webkit-animation: animation1shape3 0.5s ease 0s infinite alternate; |
| | | animation: animation1shape3 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation1shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(16px, -16px); |
| | | transform: translate(16px, -16px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation1shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(16px, -16px); |
| | | transform: translate(16px, -16px); |
| | | } |
| | | } |
| | | .loading1 .shape4 { |
| | | -webkit-animation: animation1shape4 0.5s ease 0s infinite alternate; |
| | | animation: animation1shape4 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation1shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-16px, -16px); |
| | | transform: translate(-16px, -16px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation1shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-16px, -16px); |
| | | transform: translate(-16px, -16px); |
| | | } |
| | | } |
| | | |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container loading2"> |
| | | <view class="shape shape1"></view> |
| | | <view class="shape shape2"></view> |
| | | <view class="shape shape3"></view> |
| | | <view class="shape shape4"></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'loading2', |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped="true"> |
| | | .container { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: relative; |
| | | } |
| | | |
| | | .container.loading2 { |
| | | -webkit-transform: rotate(10deg); |
| | | transform: rotate(10deg); |
| | | } |
| | | .container.loading2 .shape { |
| | | border-radius: 5px; |
| | | } |
| | | .container.loading2{ |
| | | -webkit-animation: rotation 1s infinite; |
| | | animation: rotation 1s infinite; |
| | | } |
| | | |
| | | .container .shape { |
| | | position: absolute; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 1px; |
| | | } |
| | | .container .shape.shape1 { |
| | | left: 0; |
| | | background-color: #1890FF; |
| | | } |
| | | .container .shape.shape2 { |
| | | right: 0; |
| | | background-color: #91CB74; |
| | | } |
| | | .container .shape.shape3 { |
| | | bottom: 0; |
| | | background-color: #FAC858; |
| | | } |
| | | .container .shape.shape4 { |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #EE6666; |
| | | } |
| | | |
| | | |
| | | .loading2 .shape1 { |
| | | -webkit-animation: animation2shape1 0.5s ease 0s infinite alternate; |
| | | animation: animation2shape1 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation2shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(20px, 20px); |
| | | transform: translate(20px, 20px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation2shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(20px, 20px); |
| | | transform: translate(20px, 20px); |
| | | } |
| | | } |
| | | .loading2 .shape2 { |
| | | -webkit-animation: animation2shape2 0.5s ease 0s infinite alternate; |
| | | animation: animation2shape2 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation2shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-20px, 20px); |
| | | transform: translate(-20px, 20px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation2shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-20px, 20px); |
| | | transform: translate(-20px, 20px); |
| | | } |
| | | } |
| | | .loading2 .shape3 { |
| | | -webkit-animation: animation2shape3 0.5s ease 0s infinite alternate; |
| | | animation: animation2shape3 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation2shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(20px, -20px); |
| | | transform: translate(20px, -20px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation2shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(20px, -20px); |
| | | transform: translate(20px, -20px); |
| | | } |
| | | } |
| | | .loading2 .shape4 { |
| | | -webkit-animation: animation2shape4 0.5s ease 0s infinite alternate; |
| | | animation: animation2shape4 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation2shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-20px, -20px); |
| | | transform: translate(-20px, -20px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation2shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-20px, -20px); |
| | | transform: translate(-20px, -20px); |
| | | } |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container loading3"> |
| | | <view class="shape shape1"></view> |
| | | <view class="shape shape2"></view> |
| | | <view class="shape shape3"></view> |
| | | <view class="shape shape4"></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'loading3', |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped="true"> |
| | | .container { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: relative; |
| | | } |
| | | |
| | | .container.loading3 { |
| | | -webkit-animation: rotation 1s infinite; |
| | | animation: rotation 1s infinite; |
| | | } |
| | | .container.loading3 .shape1 { |
| | | border-top-left-radius: 10px; |
| | | } |
| | | .container.loading3 .shape2 { |
| | | border-top-right-radius: 10px; |
| | | } |
| | | .container.loading3 .shape3 { |
| | | border-bottom-left-radius: 10px; |
| | | } |
| | | .container.loading3 .shape4 { |
| | | border-bottom-right-radius: 10px; |
| | | } |
| | | |
| | | .container .shape { |
| | | position: absolute; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 1px; |
| | | } |
| | | .container .shape.shape1 { |
| | | left: 0; |
| | | background-color: #1890FF; |
| | | } |
| | | .container .shape.shape2 { |
| | | right: 0; |
| | | background-color: #91CB74; |
| | | } |
| | | .container .shape.shape3 { |
| | | bottom: 0; |
| | | background-color: #FAC858; |
| | | } |
| | | .container .shape.shape4 { |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #EE6666; |
| | | } |
| | | |
| | | .loading3 .shape1 { |
| | | -webkit-animation: animation3shape1 0.5s ease 0s infinite alternate; |
| | | animation: animation3shape1 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation3shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(5px, 5px); |
| | | transform: translate(5px, 5px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation3shape1 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(5px, 5px); |
| | | transform: translate(5px, 5px); |
| | | } |
| | | } |
| | | .loading3 .shape2 { |
| | | -webkit-animation: animation3shape2 0.5s ease 0s infinite alternate; |
| | | animation: animation3shape2 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation3shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-5px, 5px); |
| | | transform: translate(-5px, 5px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation3shape2 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-5px, 5px); |
| | | transform: translate(-5px, 5px); |
| | | } |
| | | } |
| | | .loading3 .shape3 { |
| | | -webkit-animation: animation3shape3 0.5s ease 0s infinite alternate; |
| | | animation: animation3shape3 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation3shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(5px, -5px); |
| | | transform: translate(5px, -5px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation3shape3 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(5px, -5px); |
| | | transform: translate(5px, -5px); |
| | | } |
| | | } |
| | | .loading3 .shape4 { |
| | | -webkit-animation: animation3shape4 0.5s ease 0s infinite alternate; |
| | | animation: animation3shape4 0.5s ease 0s infinite alternate; |
| | | } |
| | | |
| | | @-webkit-keyframes animation3shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-5px, -5px); |
| | | transform: translate(-5px, -5px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation3shape4 { |
| | | from { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | to { |
| | | -webkit-transform: translate(-5px, -5px); |
| | | transform: translate(-5px, -5px); |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container loading5"> |
| | | <view class="shape shape1"></view> |
| | | <view class="shape shape2"></view> |
| | | <view class="shape shape3"></view> |
| | | <view class="shape shape4"></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'loading5', |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped="true"> |
| | | .container { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: relative; |
| | | } |
| | | |
| | | .container.loading5 .shape { |
| | | width: 15px; |
| | | height: 15px; |
| | | } |
| | | |
| | | .container .shape { |
| | | position: absolute; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 1px; |
| | | } |
| | | .container .shape.shape1 { |
| | | left: 0; |
| | | background-color: #1890FF; |
| | | } |
| | | .container .shape.shape2 { |
| | | right: 0; |
| | | background-color: #91CB74; |
| | | } |
| | | .container .shape.shape3 { |
| | | bottom: 0; |
| | | background-color: #FAC858; |
| | | } |
| | | .container .shape.shape4 { |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #EE6666; |
| | | } |
| | | |
| | | .loading5 .shape1 { |
| | | animation: animation5shape1 2s ease 0s infinite reverse; |
| | | } |
| | | |
| | | @-webkit-keyframes animation5shape1 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, 15px); |
| | | transform: translate(0, 15px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(15px, 15px); |
| | | transform: translate(15px, 15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(15px, 0); |
| | | transform: translate(15px, 0); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation5shape1 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, 15px); |
| | | transform: translate(0, 15px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(15px, 15px); |
| | | transform: translate(15px, 15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(15px, 0); |
| | | transform: translate(15px, 0); |
| | | } |
| | | } |
| | | .loading5 .shape2 { |
| | | animation: animation5shape2 2s ease 0s infinite reverse; |
| | | } |
| | | |
| | | @-webkit-keyframes animation5shape2 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(-15px, 0); |
| | | transform: translate(-15px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-15px, 15px); |
| | | transform: translate(-15px, 15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, 15px); |
| | | transform: translate(0, 15px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation5shape2 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(-15px, 0); |
| | | transform: translate(-15px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-15px, 15px); |
| | | transform: translate(-15px, 15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, 15px); |
| | | transform: translate(0, 15px); |
| | | } |
| | | } |
| | | .loading5 .shape3 { |
| | | animation: animation5shape3 2s ease 0s infinite reverse; |
| | | } |
| | | |
| | | @-webkit-keyframes animation5shape3 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(15px, 0); |
| | | transform: translate(15px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(15px, -15px); |
| | | transform: translate(15px, -15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, -15px); |
| | | transform: translate(0, -15px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation5shape3 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(15px, 0); |
| | | transform: translate(15px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(15px, -15px); |
| | | transform: translate(15px, -15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, -15px); |
| | | transform: translate(0, -15px); |
| | | } |
| | | } |
| | | .loading5 .shape4 { |
| | | animation: animation5shape4 2s ease 0s infinite reverse; |
| | | } |
| | | |
| | | @-webkit-keyframes animation5shape4 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, -15px); |
| | | transform: translate(0, -15px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-15px, -15px); |
| | | transform: translate(-15px, -15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(-15px, 0); |
| | | transform: translate(-15px, 0); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation5shape4 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, -15px); |
| | | transform: translate(0, -15px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-15px, -15px); |
| | | transform: translate(-15px, -15px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(-15px, 0); |
| | | transform: translate(-15px, 0); |
| | | } |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="container loading6"> |
| | | <view class="shape shape1"></view> |
| | | <view class="shape shape2"></view> |
| | | <view class="shape shape3"></view> |
| | | <view class="shape shape4"></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'loading6', |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped="true"> |
| | | .container { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: relative; |
| | | } |
| | | |
| | | .container.loading6 { |
| | | -webkit-animation: rotation 1s infinite; |
| | | animation: rotation 1s infinite; |
| | | } |
| | | .container.loading6 .shape { |
| | | width: 12px; |
| | | height: 12px; |
| | | border-radius: 2px; |
| | | } |
| | | .container .shape { |
| | | position: absolute; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 1px; |
| | | } |
| | | .container .shape.shape1 { |
| | | left: 0; |
| | | background-color: #1890FF; |
| | | } |
| | | .container .shape.shape2 { |
| | | right: 0; |
| | | background-color: #91CB74; |
| | | } |
| | | .container .shape.shape3 { |
| | | bottom: 0; |
| | | background-color: #FAC858; |
| | | } |
| | | .container .shape.shape4 { |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #EE6666; |
| | | } |
| | | |
| | | |
| | | .loading6 .shape1 { |
| | | -webkit-animation: animation6shape1 2s linear 0s infinite normal; |
| | | animation: animation6shape1 2s linear 0s infinite normal; |
| | | } |
| | | |
| | | @-webkit-keyframes animation6shape1 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, 18px); |
| | | transform: translate(0, 18px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(18px, 18px); |
| | | transform: translate(18px, 18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(18px, 0); |
| | | transform: translate(18px, 0); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation6shape1 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, 18px); |
| | | transform: translate(0, 18px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(18px, 18px); |
| | | transform: translate(18px, 18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(18px, 0); |
| | | transform: translate(18px, 0); |
| | | } |
| | | } |
| | | .loading6 .shape2 { |
| | | -webkit-animation: animation6shape2 2s linear 0s infinite normal; |
| | | animation: animation6shape2 2s linear 0s infinite normal; |
| | | } |
| | | |
| | | @-webkit-keyframes animation6shape2 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(-18px, 0); |
| | | transform: translate(-18px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-18px, 18px); |
| | | transform: translate(-18px, 18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, 18px); |
| | | transform: translate(0, 18px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation6shape2 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(-18px, 0); |
| | | transform: translate(-18px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-18px, 18px); |
| | | transform: translate(-18px, 18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, 18px); |
| | | transform: translate(0, 18px); |
| | | } |
| | | } |
| | | .loading6 .shape3 { |
| | | -webkit-animation: animation6shape3 2s linear 0s infinite normal; |
| | | animation: animation6shape3 2s linear 0s infinite normal; |
| | | } |
| | | |
| | | @-webkit-keyframes animation6shape3 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(18px, 0); |
| | | transform: translate(18px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(18px, -18px); |
| | | transform: translate(18px, -18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, -18px); |
| | | transform: translate(0, -18px); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation6shape3 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(18px, 0); |
| | | transform: translate(18px, 0); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(18px, -18px); |
| | | transform: translate(18px, -18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(0, -18px); |
| | | transform: translate(0, -18px); |
| | | } |
| | | } |
| | | .loading6 .shape4 { |
| | | -webkit-animation: animation6shape4 2s linear 0s infinite normal; |
| | | animation: animation6shape4 2s linear 0s infinite normal; |
| | | } |
| | | |
| | | @-webkit-keyframes animation6shape4 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, -18px); |
| | | transform: translate(0, -18px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-18px, -18px); |
| | | transform: translate(-18px, -18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(-18px, 0); |
| | | transform: translate(-18px, 0); |
| | | } |
| | | } |
| | | |
| | | @keyframes animation6shape4 { |
| | | 0% { |
| | | -webkit-transform: translate(0, 0); |
| | | transform: translate(0, 0); |
| | | } |
| | | 25% { |
| | | -webkit-transform: translate(0, -18px); |
| | | transform: translate(0, -18px); |
| | | } |
| | | 50% { |
| | | -webkit-transform: translate(-18px, -18px); |
| | | transform: translate(-18px, -18px); |
| | | } |
| | | 75% { |
| | | -webkit-transform: translate(-18px, 0); |
| | | transform: translate(-18px, 0); |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <Loading1 v-if="loadingType==1"/> |
| | | <Loading2 v-if="loadingType==2"/> |
| | | <Loading3 v-if="loadingType==3"/> |
| | | <Loading4 v-if="loadingType==4"/> |
| | | <Loading5 v-if="loadingType==5"/> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Loading1 from "./loading1.vue"; |
| | | import Loading2 from "./loading2.vue"; |
| | | import Loading3 from "./loading3.vue"; |
| | | import Loading4 from "./loading4.vue"; |
| | | import Loading5 from "./loading5.vue"; |
| | | export default { |
| | | components:{Loading1,Loading2,Loading3,Loading4,Loading5}, |
| | | name: 'qiun-loading', |
| | | props: { |
| | | loadingType: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * uCharts® |
| | | * 髿§è½è·¨å¹³å°å¾è¡¨åºï¼æ¯æH5ãAPPãå°ç¨åºï¼å¾®ä¿¡/æ¯ä»å®/ç¾åº¦/头æ¡/QQ/360ï¼ãVueãTaroçæ¯æcanvasçæ¡æ¶å¹³å° |
| | | * Copyright (c) 2021 QIUN®ç§äº https://www.ucharts.cn All rights reserved. |
| | | * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
| | | * å¤å¶ä½¿ç¨è¯·ä¿çæ¬æ®µæ³¨éï¼æè°¢æ¯æå¼æºï¼ |
| | | * |
| | | * uChartsÂ®å®æ¹ç½ç« |
| | | * https://www.uCharts.cn |
| | | * |
| | | * 弿ºå°å: |
| | | * https://gitee.com/uCharts/uCharts |
| | | * |
| | | * uni-appæä»¶å¸åºå°åï¼ |
| | | * http://ext.dcloud.net.cn/plugin?id=271 |
| | | * |
| | | */ |
| | | |
| | | // éç¨é
置项 |
| | | |
| | | // 主é¢é¢è²é
ç½®ï¼å¦æ¯ä¸ªå¾è¡¨ç±»åéè¦ä¸å主é¢ï¼è¯·å¨å¯¹åºå¾è¡¨ç±»å䏿´æ¹color屿§ |
| | | const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc']; |
| | | |
| | | const cfe = { |
| | | //demotype为èªå®ä¹å¾è¡¨ç±»å |
| | | "type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"], |
| | | //å¢å èªå®ä¹å¾è¡¨ç±»åï¼å¦æéè¦categoriesï¼è¯·å¨è¿éå å
¥æ¨çå¾è¡¨ç±»åä¾å¦æåç"demotype" |
| | | "categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"], |
| | | //instance为å®ä¾åéæ¿è½½å±æ§ï¼option为eoptsæ¿è½½å±æ§ï¼ä¸è¦å é¤ |
| | | "instance": {}, |
| | | "option": {}, |
| | | //ä¸é¢æ¯èªå®ä¹formaté
ç½®ï¼å é¤H5端å¤çå
¶ä»ç«¯æ æ³éè¿propsä¼ é彿°ï¼åªè½éè¿æ¤å±æ§å¯¹åºä¸æ çæ¹å¼æ¥æ¿æ¢ |
| | | "formatter":{ |
| | | "tooltipDemo1":function(res){ |
| | | let result = '' |
| | | for (let i in res) { |
| | | if (i == 0) { |
| | | result += res[i].axisValueLabel + 'å¹´éå®é¢' |
| | | } |
| | | let value = '--' |
| | | if (res[i].data !== null) { |
| | | value = res[i].data |
| | | } |
| | | // #ifdef H5 |
| | | result += '\n' + res[i].seriesName + 'ï¼' + value + ' ä¸å
' |
| | | // #endif |
| | | |
| | | // #ifdef APP-PLUS |
| | | result += '<br/>' + res[i].marker + res[i].seriesName + 'ï¼' + value + ' ä¸å
' |
| | | // #endif |
| | | } |
| | | return result; |
| | | }, |
| | | legendFormat:function(name){ |
| | | return "èªå®ä¹å¾ä¾+"+name; |
| | | }, |
| | | yAxisFormatDemo:function (value, index) { |
| | | return value + 'å
'; |
| | | }, |
| | | seriesFormatDemo:function(res){ |
| | | return res.name + 'å¹´' + res.value + 'å
'; |
| | | } |
| | | }, |
| | | //è¿éæ¼ç¤ºäºèªå®ä¹æ¨çå¾è¡¨ç±»åçoptionï¼å¯ä»¥éæå½åï¼ä¹åå¨ç»ä»¶ä¸ type="demotype" åï¼ç»ä»¶ä¼è°ç¨è¿ä¸ªè±æ¬å·éçoptionï¼å¦æç»ä»¶ä¸è¿åå¨eoptsåæ°ï¼ä¼å°demotypeä¸eoptsä¸optionå并忏²æå¾è¡¨ã |
| | | "demotype":{ |
| | | "color": color, |
| | | //å¨è¿éå¡«åechartsçoptionå³å¯ |
| | | |
| | | }, |
| | | //ä¸é¢æ¯èªå®ä¹é
ç½®ï¼è¯·æ·»å é¡¹ç®æéçéç¨é
ç½® |
| | | "column": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'axis' |
| | | }, |
| | | "grid": { |
| | | "top": 30, |
| | | "bottom": 50, |
| | | "right": 15, |
| | | "left": 40 |
| | | }, |
| | | "legend": { |
| | | "bottom": 'left', |
| | | }, |
| | | "toolbox": { |
| | | "show": false, |
| | | }, |
| | | "xAxis": { |
| | | "type": 'category', |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | "boundaryGap": true, |
| | | "data": [] |
| | | }, |
| | | "yAxis": { |
| | | "type": 'value', |
| | | "axisTick": { |
| | | "show": false, |
| | | }, |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'bar', |
| | | "data": [], |
| | | "barwidth": 20, |
| | | "label": { |
| | | "show": true, |
| | | "color": "#666666", |
| | | "position": 'top', |
| | | }, |
| | | }, |
| | | }, |
| | | "line": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'axis' |
| | | }, |
| | | "grid": { |
| | | "top": 30, |
| | | "bottom": 50, |
| | | "right": 15, |
| | | "left": 40 |
| | | }, |
| | | "legend": { |
| | | "bottom": 'left', |
| | | }, |
| | | "toolbox": { |
| | | "show": false, |
| | | }, |
| | | "xAxis": { |
| | | "type": 'category', |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | "boundaryGap": true, |
| | | "data": [] |
| | | }, |
| | | "yAxis": { |
| | | "type": 'value', |
| | | "axisTick": { |
| | | "show": false, |
| | | }, |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'line', |
| | | "data": [], |
| | | "barwidth": 20, |
| | | "label": { |
| | | "show": true, |
| | | "color": "#666666", |
| | | "position": 'top', |
| | | }, |
| | | }, |
| | | }, |
| | | "area": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'axis' |
| | | }, |
| | | "grid": { |
| | | "top": 30, |
| | | "bottom": 50, |
| | | "right": 15, |
| | | "left": 40 |
| | | }, |
| | | "legend": { |
| | | "bottom": 'left', |
| | | }, |
| | | "toolbox": { |
| | | "show": false, |
| | | }, |
| | | "xAxis": { |
| | | "type": 'category', |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | "boundaryGap": true, |
| | | "data": [] |
| | | }, |
| | | "yAxis": { |
| | | "type": 'value', |
| | | "axisTick": { |
| | | "show": false, |
| | | }, |
| | | "axisLabel": { |
| | | "color": '#666666' |
| | | }, |
| | | "axisLine": { |
| | | "lineStyle": { |
| | | "color": '#CCCCCC' |
| | | } |
| | | }, |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'line', |
| | | "data": [], |
| | | "areaStyle": {}, |
| | | "label": { |
| | | "show": true, |
| | | "color": "#666666", |
| | | "position": 'top', |
| | | }, |
| | | }, |
| | | }, |
| | | "pie": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'item' |
| | | }, |
| | | "grid": { |
| | | "top": 40, |
| | | "bottom": 30, |
| | | "right": 15, |
| | | "left": 15 |
| | | }, |
| | | "legend": { |
| | | "bottom": 'left', |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'pie', |
| | | "data": [], |
| | | "radius": '50%', |
| | | "label": { |
| | | "show": true, |
| | | "color": "#666666", |
| | | "position": 'top', |
| | | }, |
| | | }, |
| | | }, |
| | | "ring": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'item' |
| | | }, |
| | | "grid": { |
| | | "top": 40, |
| | | "bottom": 30, |
| | | "right": 15, |
| | | "left": 15 |
| | | }, |
| | | "legend": { |
| | | "bottom": 'left', |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'pie', |
| | | "data": [], |
| | | "radius": ['40%', '70%'], |
| | | "avoidLabelOverlap": false, |
| | | "label": { |
| | | "show": true, |
| | | "color": "#666666", |
| | | "position": 'top', |
| | | }, |
| | | "labelLine": { |
| | | "show": true |
| | | }, |
| | | }, |
| | | }, |
| | | "rose": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'item' |
| | | }, |
| | | "legend": { |
| | | "top": 'bottom' |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'pie', |
| | | "data": [], |
| | | "radius": "55%", |
| | | "center": ['50%', '50%'], |
| | | "roseType": 'area', |
| | | }, |
| | | }, |
| | | "funnel": { |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "tooltip": { |
| | | "trigger": 'item', |
| | | "formatter": "{b} : {c}%" |
| | | }, |
| | | "legend": { |
| | | "top": 'bottom' |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'funnel', |
| | | "left": '10%', |
| | | "top": 60, |
| | | "bottom": 60, |
| | | "width": '80%', |
| | | "min": 0, |
| | | "max": 100, |
| | | "minSize": '0%', |
| | | "maxSize": '100%', |
| | | "sort": 'descending', |
| | | "gap": 2, |
| | | "label": { |
| | | "show": true, |
| | | "position": 'inside' |
| | | }, |
| | | "labelLine": { |
| | | "length": 10, |
| | | "lineStyle": { |
| | | "width": 1, |
| | | "type": 'solid' |
| | | } |
| | | }, |
| | | "itemStyle": { |
| | | "bordercolor": '#fff', |
| | | "borderwidth": 1 |
| | | }, |
| | | "emphasis": { |
| | | "label": { |
| | | "fontSize": 20 |
| | | } |
| | | }, |
| | | "data": [], |
| | | }, |
| | | }, |
| | | "gauge": { |
| | | "color": color, |
| | | "tooltip": { |
| | | "formatter": '{a} <br/>{b} : {c}%' |
| | | }, |
| | | "seriesTemplate": { |
| | | "name": 'ä¸å¡ææ ', |
| | | "type": 'gauge', |
| | | "detail": {"formatter": '{value}%'}, |
| | | "data": [{"value": 50, "name": '宿ç'}] |
| | | }, |
| | | }, |
| | | "candle": { |
| | | "xAxis": { |
| | | "data": [] |
| | | }, |
| | | "yAxis": {}, |
| | | "color": color, |
| | | "title": { |
| | | "text": '' |
| | | }, |
| | | "dataZoom": [{ |
| | | "type": 'inside', |
| | | "xAxisIndex": [0, 1], |
| | | "start": 10, |
| | | "end": 100 |
| | | }, |
| | | { |
| | | "show": true, |
| | | "xAxisIndex": [0, 1], |
| | | "type": 'slider', |
| | | "bottom": 10, |
| | | "start": 10, |
| | | "end": 100 |
| | | } |
| | | ], |
| | | "seriesTemplate": { |
| | | "name": '', |
| | | "type": 'k', |
| | | "data": [], |
| | | }, |
| | | } |
| | | } |
| | | |
| | | export default cfe; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * uCharts® |
| | | * 髿§è½è·¨å¹³å°å¾è¡¨åºï¼æ¯æH5ãAPPãå°ç¨åºï¼å¾®ä¿¡/æ¯ä»å®/ç¾åº¦/头æ¡/QQ/360ï¼ãVueãTaroçæ¯æcanvasçæ¡æ¶å¹³å° |
| | | * Copyright (c) 2021 QIUN®ç§äº https://www.ucharts.cn All rights reserved. |
| | | * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
| | | * å¤å¶ä½¿ç¨è¯·ä¿çæ¬æ®µæ³¨éï¼æè°¢æ¯æå¼æºï¼ |
| | | * |
| | | * uChartsÂ®å®æ¹ç½ç« |
| | | * https://www.uCharts.cn |
| | | * |
| | | * 弿ºå°å: |
| | | * https://gitee.com/uCharts/uCharts |
| | | * |
| | | * uni-appæä»¶å¸åºå°åï¼ |
| | | * http://ext.dcloud.net.cn/plugin?id=271 |
| | | * |
| | | */ |
| | | |
| | | // 主é¢é¢è²é
ç½®ï¼å¦æ¯ä¸ªå¾è¡¨ç±»åéè¦ä¸å主é¢ï¼è¯·å¨å¯¹åºå¾è¡¨ç±»å䏿´æ¹color屿§ |
| | | const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc']; |
| | | |
| | | //äºä»¶è½¬æ¢å½æ°ï¼ä¸»è¦ç¨ä½æ ¼å¼åx轴为æ¶é´è½´ï¼æ ¹æ®éæ±èªè¡ä¿®æ¹ |
| | | const formatDateTime = (timeStamp, returnType)=>{ |
| | | var date = new Date(); |
| | | date.setTime(timeStamp * 1000); |
| | | var y = date.getFullYear(); |
| | | var m = date.getMonth() + 1; |
| | | m = m < 10 ? ('0' + m) : m; |
| | | var d = date.getDate(); |
| | | d = d < 10 ? ('0' + d) : d; |
| | | var h = date.getHours(); |
| | | h = h < 10 ? ('0' + h) : h; |
| | | var minute = date.getMinutes(); |
| | | var second = date.getSeconds(); |
| | | minute = minute < 10 ? ('0' + minute) : minute; |
| | | second = second < 10 ? ('0' + second) : second; |
| | | if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;} |
| | | if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;} |
| | | if(returnType == 'h:m'){return h +':' + minute;} |
| | | if(returnType == 'h:m:s'){return h +':' + minute +':' + second;} |
| | | return [y, m, d, h, minute, second]; |
| | | } |
| | | |
| | | const cfu = { |
| | | //demotype为èªå®ä¹å¾è¡¨ç±»åï¼ä¸è¬ä¸éè¦èªå®ä¹å¾è¡¨ç±»åï¼åªéè¦æ¹æ ¹èç¹ä¸å¯¹åºçç±»åå³å¯ |
| | | "type":["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"], |
| | | "range":["饼ç¶å¾","åç¯å¾","ç«ç°å¾","è¯äºå¾","æ¼æå¾","å°å¾","åå¼§è¿åº¦æ¡","æçº¿å¾","æ±ç¶å¾","山峰å¾","æ¡ç¶å¾","åºåå¾","é·è¾¾å¾","仪表ç","K线å¾","æ··åå¾","æ¶é´è½´æçº¿","æ¶é´è½´åºå","æ£ç¹å¾","æ°æ³¡å¾","èªå®ä¹ç±»å"], |
| | | //å¢å èªå®ä¹å¾è¡¨ç±»åï¼å¦æéè¦categoriesï¼è¯·å¨è¿éå å
¥æ¨çå¾è¡¨ç±»åï¼ä¾å¦æåç"demotype" |
| | | //èªå®ä¹ç±»åæ¶éè¦æ³¨æ"tline","tarea","scatter","bubble"çæ¶é´è½´ï¼ç¢éxè½´ï¼ç±»å¾è¡¨ï¼æ²¡æcategoriesï¼ä¸éè¦å å
¥categories |
| | | "categories":["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"], |
| | | //instance为å®ä¾åéæ¿è½½å±æ§ï¼ä¸è¦å é¤ |
| | | "instance":{}, |
| | | //option为optsåeoptsæ¿è½½å±æ§ï¼ä¸è¦å é¤ |
| | | "option":{}, |
| | | //ä¸é¢æ¯èªå®ä¹formaté
ç½®ï¼å é¤H5端å¤çå
¶ä»ç«¯æ æ³éè¿propsä¼ é彿°ï¼åªè½éè¿æ¤å±æ§å¯¹åºä¸æ çæ¹å¼æ¥æ¿æ¢ |
| | | "formatter":{ |
| | | "yAxisDemo1":function(val, index, opts){return val+'å
'}, |
| | | "yAxisDemo2":function(val, index, opts){return val.toFixed(2)}, |
| | | "xAxisDemo1":function(val, index, opts){return val+'å¹´';}, |
| | | "xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')}, |
| | | "seriesDemo1":function(val, index, series, opts){return val+'å
'}, |
| | | "tooltipDemo1":function(item, category, index, opts){ |
| | | if(index==0){ |
| | | return 'é便ç¨'+item.data+'å¹´' |
| | | }else{ |
| | | return 'å
¶ä»ææ²¡æ¹'+item.data+'天' |
| | | } |
| | | }, |
| | | "pieDemo":function(val, index, series, opts){ |
| | | if(index !== undefined){ |
| | | return series[index].name+'ï¼'+series[index].data+'å
' |
| | | } |
| | | }, |
| | | }, |
| | | //è¿éæ¼ç¤ºäºèªå®ä¹æ¨çå¾è¡¨ç±»åçoptionï¼å¯ä»¥éæå½åï¼ä¹åå¨ç»ä»¶ä¸ type="demotype" åï¼ç»ä»¶ä¼è°ç¨è¿ä¸ªè±æ¬å·éçoptionï¼å¦æç»ä»¶ä¸è¿åå¨optsåæ°ï¼ä¼å°demotypeä¸optsä¸optionå并忏²æå¾è¡¨ã |
| | | "demotype":{ |
| | | //æè¿éææ²çº¿å¾å½åäºèªå®ä¹å¾è¡¨ç±»åï¼æ¨å¯ä»¥æ ¹æ®éè¦éææå®ç±»åæé
ç½® |
| | | "type": "line", |
| | | "color": color, |
| | | "padding": [15,10,0,15], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "gridType": "dash", |
| | | "dashLength": 2, |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "line": { |
| | | "type": "curve", |
| | | "width": 2 |
| | | }, |
| | | } |
| | | }, |
| | | //ä¸é¢æ¯èªå®ä¹é
ç½®ï¼è¯·æ·»å é¡¹ç®æéçéç¨é
ç½® |
| | | "pie":{ |
| | | "type": "pie", |
| | | "color": color, |
| | | "padding": [5,5,5,5], |
| | | "extra": { |
| | | "pie": { |
| | | "activeOpacity": 0.5, |
| | | "activeRadius": 10, |
| | | "offsetAngle": 0, |
| | | "labelWidth": 15, |
| | | "border": true, |
| | | "borderWidth": 3, |
| | | "borderColor": "#FFFFFF" |
| | | }, |
| | | } |
| | | }, |
| | | "ring":{ |
| | | "type": "ring", |
| | | "color": color, |
| | | "padding": [5,5,5,5], |
| | | "rotate": false, |
| | | "dataLabel": true, |
| | | "legend": { |
| | | "show": true, |
| | | "position": "right", |
| | | "lineHeight": 25, |
| | | }, |
| | | "title": { |
| | | "name": "æ¶çç", |
| | | "fontSize": 15, |
| | | "color": "#666666" |
| | | }, |
| | | "subtitle": { |
| | | "name": "70%", |
| | | "fontSize": 25, |
| | | "color": "#7cb5ec" |
| | | }, |
| | | "extra": { |
| | | "ring": { |
| | | "ringWidth":30, |
| | | "activeOpacity": 0.5, |
| | | "activeRadius": 10, |
| | | "offsetAngle": 0, |
| | | "labelWidth": 15, |
| | | "border": true, |
| | | "borderWidth": 3, |
| | | "borderColor": "#FFFFFF" |
| | | }, |
| | | }, |
| | | }, |
| | | "rose":{ |
| | | "type": "rose", |
| | | "color": color, |
| | | "padding": [5,5,5,5], |
| | | "legend": { |
| | | "show": true, |
| | | "position": "left", |
| | | "lineHeight": 25, |
| | | }, |
| | | "extra": { |
| | | "rose": { |
| | | "type": "area", |
| | | "minRadius": 50, |
| | | "activeOpacity": 0.5, |
| | | "activeRadius": 10, |
| | | "offsetAngle": 0, |
| | | "labelWidth": 15, |
| | | "border": false, |
| | | "borderWidth": 2, |
| | | "borderColor": "#FFFFFF" |
| | | }, |
| | | } |
| | | }, |
| | | "word":{ |
| | | "type": "word", |
| | | "color": color, |
| | | "extra": { |
| | | "word": { |
| | | "type": "normal", |
| | | "autoColors": false |
| | | } |
| | | } |
| | | }, |
| | | "funnel":{ |
| | | "type": "funnel", |
| | | "color": color, |
| | | "padding": [15,15,0,15], |
| | | "extra": { |
| | | "funnel": { |
| | | "activeOpacity": 0.3, |
| | | "activeWidth": 10, |
| | | "border": true, |
| | | "borderWidth": 2, |
| | | "borderColor": "#FFFFFF", |
| | | "fillOpacity": 1, |
| | | "labelAlign": "right" |
| | | }, |
| | | } |
| | | }, |
| | | "map":{ |
| | | "type": "map", |
| | | "color": color, |
| | | "padding": [0,0,0,0], |
| | | "dataLabel": true, |
| | | "extra": { |
| | | "map": { |
| | | "border": true, |
| | | "borderWidth": 1, |
| | | "borderColor": "#666666", |
| | | "fillOpacity": 0.6, |
| | | "activeBorderColor": "#F04864", |
| | | "activeFillColor": "#FACC14", |
| | | "activeFillOpacity": 1 |
| | | }, |
| | | } |
| | | }, |
| | | "arcbar":{ |
| | | "type": "arcbar", |
| | | "color": color, |
| | | "title": { |
| | | "name": "ç¾åæ¯", |
| | | "fontSize": 25, |
| | | "color": "#00FF00" |
| | | }, |
| | | "subtitle": { |
| | | "name": "é»è®¤æ é¢", |
| | | "fontSize": 15, |
| | | "color": "#666666" |
| | | }, |
| | | "extra": { |
| | | "arcbar": { |
| | | "type": "default", |
| | | "width": 12, |
| | | "backgroundColor": "#E9E9E9", |
| | | "startAngle": 0.75, |
| | | "endAngle": 0.25, |
| | | "gap": 2 |
| | | } |
| | | } |
| | | }, |
| | | "line":{ |
| | | "type": "line", |
| | | "color": color, |
| | | "padding": [15,10,0,15], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "gridType": "dash", |
| | | "dashLength": 2, |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "line": { |
| | | "type": "straight", |
| | | "width": 2 |
| | | }, |
| | | } |
| | | }, |
| | | "tline":{ |
| | | "type": "line", |
| | | "color": color, |
| | | "padding": [15,10,0,15], |
| | | "xAxis": { |
| | | "disableGrid": false, |
| | | "boundaryGap":"justify", |
| | | }, |
| | | "yAxis": { |
| | | "gridType": "dash", |
| | | "dashLength": 2, |
| | | "data":[ |
| | | { |
| | | "min":0, |
| | | "max":80 |
| | | } |
| | | ] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "line": { |
| | | "type": "curve", |
| | | "width": 2 |
| | | }, |
| | | } |
| | | }, |
| | | "tarea":{ |
| | | "type": "area", |
| | | "color": color, |
| | | "padding": [15,10,0,15], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | "boundaryGap":"justify", |
| | | }, |
| | | "yAxis": { |
| | | "gridType": "dash", |
| | | "dashLength": 2, |
| | | "data":[ |
| | | { |
| | | "min":0, |
| | | "max":80 |
| | | } |
| | | ] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "area": { |
| | | "type": "curve", |
| | | "opacity": 0.2, |
| | | "addLine": true, |
| | | "width": 2, |
| | | "gradient": true |
| | | }, |
| | | } |
| | | }, |
| | | "column":{ |
| | | "type": "column", |
| | | "color": color, |
| | | "padding": [15,15,0,5], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "data":[{"min":0}] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "column": { |
| | | "type": "group", |
| | | "width": 30, |
| | | "activeBgColor": "#000000", |
| | | "activeBgOpacity": 0.08 |
| | | }, |
| | | } |
| | | }, |
| | | "mount":{ |
| | | "type": "mount", |
| | | "color": color, |
| | | "padding": [15,15,0,5], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "data":[{"min":0}] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "mount": { |
| | | "type": "mount", |
| | | "widthRatio": 1.5, |
| | | }, |
| | | } |
| | | }, |
| | | "bar":{ |
| | | "type": "bar", |
| | | "color": color, |
| | | "padding": [15,30,0,5], |
| | | "xAxis": { |
| | | "boundaryGap":"justify", |
| | | "disableGrid":false, |
| | | "min":0, |
| | | "axisLine":false |
| | | }, |
| | | "yAxis": { |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "bar": { |
| | | "type": "group", |
| | | "width": 30, |
| | | "meterBorde": 1, |
| | | "meterFillColor": "#FFFFFF", |
| | | "activeBgColor": "#000000", |
| | | "activeBgOpacity": 0.08 |
| | | }, |
| | | } |
| | | }, |
| | | "area":{ |
| | | "type": "area", |
| | | "color": color, |
| | | "padding": [15,15,0,15], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "gridType": "dash", |
| | | "dashLength": 2, |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "area": { |
| | | "type": "straight", |
| | | "opacity": 0.2, |
| | | "addLine": true, |
| | | "width": 2, |
| | | "gradient": false |
| | | }, |
| | | } |
| | | }, |
| | | "radar":{ |
| | | "type": "radar", |
| | | "color": color, |
| | | "padding": [5,5,5,5], |
| | | "dataLabel": false, |
| | | "legend": { |
| | | "show": true, |
| | | "position": "right", |
| | | "lineHeight": 25, |
| | | }, |
| | | "extra": { |
| | | "radar": { |
| | | "gridType": "radar", |
| | | "gridColor": "#CCCCCC", |
| | | "gridCount": 3, |
| | | "opacity": 0.2, |
| | | "max": 200 |
| | | }, |
| | | } |
| | | }, |
| | | "gauge":{ |
| | | "type": "gauge", |
| | | "color": color, |
| | | "title": { |
| | | "name": "66Km/H", |
| | | "fontSize": 25, |
| | | "color": "#2fc25b", |
| | | "offsetY": 50 |
| | | }, |
| | | "subtitle": { |
| | | "name": "宿¶é度", |
| | | "fontSize": 15, |
| | | "color": "#1890ff", |
| | | "offsetY": -50 |
| | | }, |
| | | "extra": { |
| | | "gauge": { |
| | | "type": "default", |
| | | "width": 30, |
| | | "labelColor": "#666666", |
| | | "startAngle": 0.75, |
| | | "endAngle": 0.25, |
| | | "startNumber": 0, |
| | | "endNumber": 100, |
| | | "labelFormat": "", |
| | | "splitLine": { |
| | | "fixRadius": 0, |
| | | "splitNumber": 10, |
| | | "width": 30, |
| | | "color": "#FFFFFF", |
| | | "childNumber": 5, |
| | | "childWidth": 12 |
| | | }, |
| | | "pointer": { |
| | | "width": 24, |
| | | "color": "auto" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "candle":{ |
| | | "type": "candle", |
| | | "color": color, |
| | | "padding": [15,15,0,15], |
| | | "enableScroll": true, |
| | | "enableMarkLine": true, |
| | | "dataLabel": false, |
| | | "xAxis": { |
| | | "labelCount": 4, |
| | | "itemCount": 40, |
| | | "disableGrid": true, |
| | | "gridColor": "#CCCCCC", |
| | | "gridType": "solid", |
| | | "dashLength": 4, |
| | | "scrollShow": true, |
| | | "scrollAlign": "left", |
| | | "scrollColor": "#A6A6A6", |
| | | "scrollBackgroundColor": "#EFEBEF" |
| | | }, |
| | | "yAxis": { |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "candle": { |
| | | "color": { |
| | | "upLine": "#f04864", |
| | | "upFill": "#f04864", |
| | | "downLine": "#2fc25b", |
| | | "downFill": "#2fc25b" |
| | | }, |
| | | "average": { |
| | | "show": true, |
| | | "name": ["MA5","MA10","MA30"], |
| | | "day": [5,10,20], |
| | | "color": ["#1890ff","#2fc25b","#facc14"] |
| | | } |
| | | }, |
| | | "markLine": { |
| | | "type": "dash", |
| | | "dashLength": 5, |
| | | "data": [ |
| | | { |
| | | "value": 2150, |
| | | "lineColor": "#f04864", |
| | | "showLabel": true |
| | | }, |
| | | { |
| | | "value": 2350, |
| | | "lineColor": "#f04864", |
| | | "showLabel": true |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | "mix":{ |
| | | "type": "mix", |
| | | "color": color, |
| | | "padding": [15,15,0,15], |
| | | "xAxis": { |
| | | "disableGrid": true, |
| | | }, |
| | | "yAxis": { |
| | | "disabled": false, |
| | | "disableGrid": false, |
| | | "splitNumber": 5, |
| | | "gridType": "dash", |
| | | "dashLength": 4, |
| | | "gridColor": "#CCCCCC", |
| | | "padding": 10, |
| | | "showTitle": true, |
| | | "data": [] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "mix": { |
| | | "column": { |
| | | "width": 20 |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | "scatter":{ |
| | | "type": "scatter", |
| | | "color":color, |
| | | "padding":[15,15,0,15], |
| | | "dataLabel":false, |
| | | "xAxis": { |
| | | "disableGrid": false, |
| | | "gridType":"dash", |
| | | "splitNumber":5, |
| | | "boundaryGap":"justify", |
| | | "min":0 |
| | | }, |
| | | "yAxis": { |
| | | "disableGrid": false, |
| | | "gridType":"dash", |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "scatter": { |
| | | }, |
| | | } |
| | | }, |
| | | "bubble":{ |
| | | "type": "bubble", |
| | | "color":color, |
| | | "padding":[15,15,0,15], |
| | | "xAxis": { |
| | | "disableGrid": false, |
| | | "gridType":"dash", |
| | | "splitNumber":5, |
| | | "boundaryGap":"justify", |
| | | "min":0, |
| | | "max":250 |
| | | }, |
| | | "yAxis": { |
| | | "disableGrid": false, |
| | | "gridType":"dash", |
| | | "data":[{ |
| | | "min":0, |
| | | "max":150 |
| | | }] |
| | | }, |
| | | "legend": { |
| | | }, |
| | | "extra": { |
| | | "bubble": { |
| | | "border":2, |
| | | "opacity": 0.5, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | |
| | | export default cfu; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # uCharts JSSDK说æ |
| | | 1ãå¦ä¸ä½¿ç¨uChartsç»ä»¶ï¼å¯ç´æ¥å¼ç¨u-charts.jsï¼æå
ç¼è¯åä¼`èªå¨å缩`ï¼å缩åä½ç§¯çº¦ä¸º`120kb`ã |
| | | 2ã妿120kbçä½ç§¯ä»éå缩ï¼è¯·æå°uChartså®ç½éè¿å¨çº¿å®å¶éæ©æ¨éè¦çå¾è¡¨ã |
| | | 3ãconfig-ucharts.js为uChartsç»ä»¶çç¨æ·é
ç½®æä»¶ï¼å级å请`èªè¡å¤ä»½config-ucharts.js`æä»¶ï¼ä»¥å
被强å¶è¦çã |
| | | 4ãconfig-echarts.js为EChartsç»ä»¶çç¨æ·é
ç½®æä»¶ï¼å级å请`èªè¡å¤ä»½config-echarts.js`æä»¶ï¼ä»¥å
被强å¶è¦çã |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * uCharts (R) |
| | | * 髿§è½è·¨å¹³å°å¾è¡¨åºï¼æ¯æH5ãAPPãå°ç¨åºï¼å¾®ä¿¡/æ¯ä»å®/ç¾åº¦/头æ¡/QQ/360/å¿«æï¼ãVueãTaroçæ¯æcanvasçæ¡æ¶å¹³å° |
| | | * Copyright (C) 2021 QIUN (R) ç§äº https://www.ucharts.cn All rights reserved. |
| | | * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
| | | * å¤å¶ä½¿ç¨è¯·ä¿çæ¬æ®µæ³¨éï¼æè°¢æ¯æå¼æºï¼ |
| | | * |
| | | * uCharts (R) 宿¹ç½ç« |
| | | * https://www.uCharts.cn |
| | | * |
| | | * 弿ºå°å: |
| | | * https://gitee.com/uCharts/uCharts |
| | | * |
| | | * uni-appæä»¶å¸åºå°åï¼ |
| | | * http://ext.dcloud.net.cn/plugin?id=271 |
| | | * |
| | | */ |
| | | "use strict";var config={version:"v2.4.3-20220505",yAxisWidth:15,xAxisHeight:22,xAxisTextPadding:3,padding:[10,10,10,10],pixelRatio:1,rotate:false,fontSize:13,fontColor:"#666666",dataPointShape:["circle","circle","circle","circle"],color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],linearColor:["#0EE2F8","#2BDCA8","#FA7D8D","#EB88E2","#2AE3A0","#0EE2F8","#EB88E2","#6773E3","#F78A85"],pieChartLinePadding:15,pieChartTextPadding:5,titleFontSize:20,subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarLabelTextMargin:13};var assign=function(e,...t){if(e==null){throw new TypeError("[uCharts] Cannot convert undefined or null to object")}if(!t||t.length<=0){return e}function i(e,a){for(let t in a){e[t]=e[t]&&e[t].toString()==="[object Object]"?i(e[t],a[t]):e[t]=a[t]}return e}t.forEach(t=>{e=i(e,t)});return e};var util={toFixed:function t(e,a){a=a||2;if(this.isFloat(e)){e=e.toFixed(a)}return e},isFloat:function t(e){return e%1!==0},approximatelyEqual:function t(e,a){return Math.abs(e-a)<1e-10},isSameSign:function t(e,a){return Math.abs(e)===e&&Math.abs(a)===a||Math.abs(e)!==e&&Math.abs(a)!==a},isSameXCoordinateArea:function t(e,a){return this.isSameSign(e.x,a.x)},isCollision:function t(e,a){e.end={};e.end.x=e.start.x+e.width;e.end.y=e.start.y-e.height;a.end={};a.end.x=a.start.x+a.width;a.end.y=a.start.y-a.height;var i=a.start.x>e.end.x||a.end.x<e.start.x||a.end.y>e.start.y||a.start.y<e.end.y;return!i}};function getH5Offset(t){t.mp={changedTouches:[]};t.mp.changedTouches.push({x:t.offsetX,y:t.offsetY});return t}function hexToRgb(t,e){var a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;var i=t.replace(a,function(t,e,a,i){return e+e+a+a+i+i});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);var o=parseInt(r[1],16);var n=parseInt(r[2],16);var l=parseInt(r[3],16);return"rgba("+o+","+n+","+l+","+e+")"}function findRange(t,e,a){if(isNaN(t)){throw new Error("[uCharts] seriesæ°æ®é为Numberæ ¼å¼")}a=a||10;e=e?e:"upper";var i=1;while(a<1){a*=10;i*=10}if(e==="upper"){t=Math.ceil(t*i)}else{t=Math.floor(t*i)}while(t%a!==0){if(e==="upper"){if(t==t+1){break}t++}else{t--}}return t/i}function calCandleMA(o,t,e,n){let a=[];for(let r=0;r<o.length;r++){let i={data:[],name:t[r],color:e[r]};for(let a=0,t=n.length;a<t;a++){if(a<o[r]){i.data.push(null);continue}let e=0;for(let t=0;t<o[r];t++){e+=n[a-t][1]}i.data.push(+(e/o[r]).toFixed(3))}a.push(i)}return a}function calValidDistance(t,e,a,i,r){var o=r.width-r.area[1]-r.area[3];var n=a.eachSpacing*(r.chartData.xAxisData.xAxisPoints.length-1);if(r.type=="mount"&&r.extra&&r.extra.mount&&r.extra.mount.widthRatio&&r.extra.mount.widthRatio>1){if(r.extra.mount.widthRatio>2)r.extra.mount.widthRatio=2;n+=(r.extra.mount.widthRatio-1)*a.eachSpacing}var l=e;if(e>=0){l=0;t.uevent.trigger("scrollLeft");t.scrollOption.position="left";r.xAxis.scrollPosition="left"}else if(Math.abs(e)>=n-o){l=o-n;t.uevent.trigger("scrollRight");t.scrollOption.position="right";r.xAxis.scrollPosition="right"}else{t.scrollOption.position=e;r.xAxis.scrollPosition=e}return l}function isInAngleRange(t,e,a){function i(t){while(t<0){t+=2*Math.PI}while(t>2*Math.PI){t-=2*Math.PI}return t}t=i(t);e=i(e);a=i(a);if(e>a){a+=2*Math.PI;if(t<e){t+=2*Math.PI}}return t>=e&&t<=a}function createCurveControlPoints(t,e){function a(t,e){if(t[e-1]&&t[e+1]){return t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y)}else{return false}}function c(t,e){if(t[e-1]&&t[e+1]){return t[e].x>=Math.max(t[e-1].x,t[e+1].x)||t[e].x<=Math.min(t[e-1].x,t[e+1].x)}else{return false}}var i=.2;var r=.2;var o=null;var n=null;var l=null;var s=null;if(e<1){o=t[0].x+(t[1].x-t[0].x)*i;n=t[0].y+(t[1].y-t[0].y)*i}else{o=t[e].x+(t[e+1].x-t[e-1].x)*i;n=t[e].y+(t[e+1].y-t[e-1].y)*i}if(e>t.length-3){var h=t.length-1;l=t[h].x-(t[h].x-t[h-1].x)*r;s=t[h].y-(t[h].y-t[h-1].y)*r}else{l=t[e+1].x-(t[e+2].x-t[e].x)*r;s=t[e+1].y-(t[e+2].y-t[e].y)*r}if(a(t,e+1)){s=t[e+1].y}if(a(t,e)){n=t[e].y}if(c(t,e+1)){l=t[e+1].x}if(c(t,e)){o=t[e].x}if(n>=Math.max(t[e].y,t[e+1].y)||n<=Math.min(t[e].y,t[e+1].y)){n=t[e].y}if(s>=Math.max(t[e].y,t[e+1].y)||s<=Math.min(t[e].y,t[e+1].y)){s=t[e+1].y}if(o>=Math.max(t[e].x,t[e+1].x)||o<=Math.min(t[e].x,t[e+1].x)){o=t[e].x}if(l>=Math.max(t[e].x,t[e+1].x)||l<=Math.min(t[e].x,t[e+1].x)){l=t[e+1].x}return{ctrA:{x:o,y:n},ctrB:{x:l,y:s}}}function convertCoordinateOrigin(t,e,a){return{x:a.x+t,y:a.y-e}}function avoidCollision(t,e){if(e){while(util.isCollision(t,e)){if(t.start.x>0){t.start.y--}else if(t.start.x<0){t.start.y++}else{if(t.start.y>0){t.start.y++}else{t.start.y--}}}}return t}function fixPieSeries(e,a,t){let i=[];if(e.length>0&&e[0].data.constructor.toString().indexOf("Array")>-1){a._pieSeries_=e;let t=e[0].data;for(var r=0;r<t.length;r++){t[r].formatter=e[0].formatter;t[r].data=t[r].value;i.push(t[r])}a.series=i}else{i=e}return i}function fillSeries(e,a,i){var r=0;for(var o=0;o<e.length;o++){let t=e[o];if(!t.color){t.color=i.color[r];r=(r+1)%i.color.length}if(!t.linearIndex){t.linearIndex=o}if(!t.index){t.index=0}if(!t.type){t.type=a.type}if(typeof t.show=="undefined"){t.show=true}if(!t.type){t.type=a.type}if(!t.pointShape){t.pointShape="circle"}if(!t.legendShape){switch(t.type){case"line":t.legendShape="line";break;case"column":case"bar":t.legendShape="rect";break;case"area":case"mount":t.legendShape="triangle";break;default:t.legendShape="circle"}}}return e}function fillCustomColor(t,e,a,i){var r=e||[];if(t=="custom"&&r.length==0){r=i.linearColor}if(t=="custom"&&r.length<a.length){let t=a.length-r.length;for(var o=0;o<t;o++){r.push(i.linearColor[(o+1)%i.linearColor.length])}}return r}function getDataRange(t,e){var a=0;var i=e-t;if(i>=1e4){a=1e3}else if(i>=1e3){a=100}else if(i>=100){a=10}else if(i>=10){a=5}else if(i>=1){a=1}else if(i>=.1){a=.1}else if(i>=.01){a=.01}else if(i>=.001){a=.001}else if(i>=1e-4){a=1e-4}else if(i>=1e-5){a=1e-5}else{a=1e-6}return{minRange:findRange(t,"lower",a),maxRange:findRange(e,"upper",a)}}function measureText(a,t,e){var i=0;a=String(a);e=false;if(e!==false&&e!==undefined&&e.setFontSize&&e.measureText){e.setFontSize(t);return e.measureText(a).width}else{var a=a.split("");for(let e=0;e<a.length;e++){let t=a[e];if(/[a-zA-Z]/.test(t)){i+=7}else if(/[0-9]/.test(t)){i+=5.5}else if(/\./.test(t)){i+=2.7}else if(/-/.test(t)){i+=3.25}else if(/:/.test(t)){i+=2.5}else if(/[\u4e00-\u9fa5]/.test(t)){i+=10}else if(/\(|\)/.test(t)){i+=3.73}else if(/\s/.test(t)){i+=2.5}else if(/%/.test(t)){i+=8}else{i+=10}}return i*t/10}}function dataCombine(t){return t.reduce(function(t,e){return(t.data?t.data:t).concat(e.data)},[])}function dataCombineStack(t,e){var a=new Array(e);for(var i=0;i<a.length;i++){a[i]=0}for(var r=0;r<t.length;r++){for(var i=0;i<a.length;i++){a[i]+=t[r].data[i]}}return t.reduce(function(t,e){return(t.data?t.data:t).concat(e.data).concat(a)},[])}function getTouches(t,e,a){let i,r;if(t.clientX){if(e.rotate){r=e.height-t.clientX*e.pix;i=(t.pageY-a.currentTarget.offsetTop-e.height/e.pix/2*(e.pix-1))*e.pix}else{i=t.clientX*e.pix;r=(t.pageY-a.currentTarget.offsetTop-e.height/e.pix/2*(e.pix-1))*e.pix}}else{if(e.rotate){r=e.height-t.x*e.pix;i=t.y*e.pix}else{i=t.x*e.pix;r=t.y*e.pix}}return{x:i,y:r}}function getSeriesDataItem(e,i,a){var r=[];var o=[];var n=i.constructor.toString().indexOf("Array")>-1;if(n){let t=filterSeries(e);for(var l=0;l<a.length;l++){o.push(t[a[l]])}}else{o=e}for(let t=0;t<o.length;t++){let e=o[t];let a=-1;if(n){a=i[t]}else{a=i}if(e.data[a]!==null&&typeof e.data[a]!=="undefined"&&e.show){let t={};t.color=e.color;t.type=e.type;t.style=e.style;t.pointShape=e.pointShape;t.disableLegend=e.disableLegend;t.name=e.name;t.show=e.show;t.data=e.formatter?e.formatter(e.data[a]):e.data[a];r.push(t)}}return r}function getMaxTextListLength(t,e,a){var i=t.map(function(t){return measureText(t,e,a)});return Math.max.apply(null,i)}function getRadarCoordinateSeries(t){var e=2*Math.PI/t;var a=[];for(var i=0;i<t;i++){a.push(e*i)}return a.map(function(t){return-1*t+Math.PI/2})}function getToolTipData(t,a,i,r,o){var n=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};var l=a.chartData.calPoints?a.chartData.calPoints:[];let s={};if(r.length>0){let e=[];for(let t=0;t<r.length;t++){e.push(l[r[t]])}s=e[0][i[0]]}else{for(let t=0;t<l.length;t++){if(l[t][i]){s=l[t][i];break}}}var e=t.map(function(t){let e=null;if(a.categories&&a.categories.length>0){e=o[i]}return{text:n.formatter?n.formatter(t,e,i,a):t.name+": "+t.data,color:t.color}});var h={x:Math.round(s.x),y:Math.round(s.y)};return{textList:e,offset:h}}function getMixToolTipData(t,e,a,i){var r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var o=e.chartData.xAxisPoints[a]+e.chartData.eachSpacing/2;var n=t.map(function(t){return{text:r.formatter?r.formatter(t,i[a],a,e):t.name+": "+t.data,color:t.color,disableLegend:t.disableLegend?true:false}});n=n.filter(function(t){if(t.disableLegend!==true){return t}});var l={x:Math.round(o),y:0};return{textList:n,offset:l}}function getCandleToolTipData(o,e,r,n,d,t){var x=arguments.length>6&&arguments[6]!==undefined?arguments[6]:{};var a=r.chartData.calPoints;let l=t.color.upFill;let s=t.color.downFill;let h=[l,l,s,l];var c=[];e.map(function(t){if(n==0){if(t.data[1]-t.data[0]<0){h[1]=s}else{h[1]=l}}else{if(t.data[0]<o[n-1][1]){h[0]=s}if(t.data[1]<t.data[0]){h[1]=s}if(t.data[2]>o[n-1][1]){h[2]=l}if(t.data[3]<o[n-1][1]){h[3]=s}}let e={text:"å¼çï¼"+t.data[0],color:h[0]};let a={text:"æ¶çï¼"+t.data[1],color:h[1]};let i={text:"æä½ï¼"+t.data[2],color:h[2]};let r={text:"æé«ï¼"+t.data[3],color:h[3]};c.push(e,a,i,r)});var i=[];var f={x:0,y:0};for(let e=0;e<a.length;e++){let t=a[e];if(typeof t[n]!=="undefined"&&t[n]!==null){i.push(t[n])}}f.x=Math.round(i[0][0].x);return{textList:c,offset:f}}function filterSeries(e){let a=[];for(let t=0;t<e.length;t++){if(e[t].show==true){a.push(e[t])}}return a}function findCurrentIndex(o,n,e,t){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var l={index:-1,group:[]};var i=e.chartData.eachSpacing/2;let r=[];if(n&&n.length>0){if(!e.categories){i=0}else{for(let t=1;t<e.chartData.xAxisPoints.length;t++){r.push(e.chartData.xAxisPoints[t]-i)}if((e.type=="line"||e.type=="area")&&e.xAxis.boundaryGap=="justify"){r=e.chartData.xAxisPoints}}if(isInExactChartArea(o,e,t)){if(!e.categories){let a=Array(n.length);for(let e=0;e<n.length;e++){a[e]=Array(n[e].length);for(let t=0;t<n[e].length;t++){a[e][t]=Math.abs(n[e][t].x-o.x)}}let e=Array(a.length);let i=Array(a.length);for(let t=0;t<a.length;t++){e[t]=Math.min.apply(null,a[t]);i[t]=a[t].indexOf(e[t])}let r=Math.min.apply(null,e);l.index=[];for(let t=0;t<e.length;t++){if(e[t]==r){l.group.push(t);l.index.push(i[t])}}}else{r.forEach(function(t,e){if(o.x+a+i>t){l.index=e}})}}}return l}function findBarChartCurrentIndex(a,t,e,i){var r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var o={index:-1,group:[]};var n=e.chartData.eachSpacing/2;let l=e.chartData.yAxisPoints;if(t&&t.length>0){if(isInExactChartArea(a,e,i)){l.forEach(function(t,e){if(a.y+r+n>t){o.index=e}})}}return o}function findLegendIndex(o,t,e){let n=-1;let l=0;if(isInExactLegendArea(o,t.area)){let i=t.points;let r=-1;for(let t=0,e=i.length;t<e;t++){let a=i[t];for(let e=0;e<a.length;e++){r+=1;let t=a[e]["area"];if(t&&o.x>t[0]-l&&o.x<t[2]+l&&o.y>t[1]-l&&o.y<t[3]+l){n=r;break}}}return n}return n}function isInExactLegendArea(t,e){return t.x>e.start.x&&t.x<e.end.x&&t.y>e.start.y&&t.y<e.end.y}function isInExactChartArea(t,e,a){return t.x<=e.width-e.area[1]+10&&t.x>=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function findRadarChartCurrentIndex(t,e,a){var r=2*Math.PI/a;var o=-1;if(isInExactPieChartArea(t,e.center,e.radius)){var n=function t(e){if(e<0){e+=2*Math.PI}if(e>2*Math.PI){e-=2*Math.PI}return e};var l=Math.atan2(e.center.y-t.y,t.x-e.center.x);l=-1*l;if(l<0){l+=2*Math.PI}var i=e.angleList.map(function(t){t=n(-1*t);return t});i.forEach(function(t,e){var a=n(t-r/2);var i=n(t+r/2);if(i<a){i+=2*Math.PI}if(l>=a&&l<=i||l+2*Math.PI>=a&&l+2*Math.PI<=i){o=e}})}return o}function findFunnelChartCurrentIndex(t,e){var a=-1;for(var i=0,r=e.series.length;i<r;i++){var o=e.series[i];if(t.x>o.funnelArea[0]&&t.x<o.funnelArea[2]&&t.y>o.funnelArea[1]&&t.y<o.funnelArea[3]){a=i;break}}return a}function findWordChartCurrentIndex(t,e){var a=-1;for(var i=0,r=e.length;i<r;i++){var o=e[i];if(t.x>o.area[0]&&t.x<o.area[2]&&t.y>o.area[1]&&t.y<o.area[3]){a=i;break}}return a}function findMapChartCurrentIndex(t,e){var a=-1;var i=e.chartData.mapData;var r=e.series;var o=pointToCoordinate(t.y,t.x,i.bounds,i.scale,i.xoffset,i.yoffset);var n=[o.x,o.y];for(var l=0,s=r.length;l<s;l++){var h=r[l].geometry.coordinates;if(isPoiWithinPoly(n,h,e.chartData.mapData.mercator)){a=l;break}}return a}function findRoseChartCurrentIndex(t,e,a){var i=-1;var r=getRoseDataPoints(a._series_,a.extra.rose.type,e.radius,e.radius);if(e&&e.center&&isInExactPieChartArea(t,e.center,e.radius)){var o=Math.atan2(e.center.y-t.y,t.x-e.center.x);o=-o;if(a.extra.rose&&a.extra.rose.offsetAngle){o=o-a.extra.rose.offsetAngle*Math.PI/180}for(var n=0,l=r.length;n<l;n++){if(isInAngleRange(o,r[n]._start_,r[n]._start_+r[n]._rose_proportion_*2*Math.PI)){i=n;break}}}return i}function findPieChartCurrentIndex(t,e,a){var i=-1;var r=getPieDataPoints(e.series);if(e&&e.center&&isInExactPieChartArea(t,e.center,e.radius)){var o=Math.atan2(e.center.y-t.y,t.x-e.center.x);o=-o;if(a.extra.pie&&a.extra.pie.offsetAngle){o=o-a.extra.pie.offsetAngle*Math.PI/180}if(a.extra.ring&&a.extra.ring.offsetAngle){o=o-a.extra.ring.offsetAngle*Math.PI/180}for(var n=0,l=r.length;n<l;n++){if(isInAngleRange(o,r[n]._start_,r[n]._start_+r[n]._proportion_*2*Math.PI)){i=n;break}}}return i}function isInExactPieChartArea(t,e,a){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(a,2)}function splitPoints(t,a){var i=[];var r=[];t.forEach(function(t,e){if(a.connectNulls){if(t!==null){r.push(t)}}else{if(t!==null){r.push(t)}else{if(r.length){i.push(r)}r=[]}}});if(r.length){i.push(r)}return i}function calLegendData(l,s,e,t,h){let c={area:{start:{x:0,y:0},end:{x:0,y:0},width:0,height:0,wholeWidth:0,wholeHeight:0},points:[],widthArr:[],heightArr:[]};if(s.legend.show===false){t.legendData=c;return c}let d=s.legend.padding*s.pix;let x=s.legend.margin*s.pix;let f=s.legend.fontSize?s.legend.fontSize*s.pix:e.fontSize;let p=15*s.pix;let u=5*s.pix;let g=Math.max(s.legend.lineHeight*s.pix,f);if(s.legend.position=="top"||s.legend.position=="bottom"){let i=[];let r=0;let o=[];let n=[];for(let a=0;a<l.length;a++){let t=l[a];const y=t.legendText?t.legendText:t.name;let e=p+u+measureText(y||"undefined",f,h)+s.legend.itemGap*s.pix;if(r+e>s.width-s.area[1]-s.area[3]){i.push(n);o.push(r-s.legend.itemGap*s.pix);r=e;n=[t]}else{r+=e;n.push(t)}}if(n.length){i.push(n);o.push(r-s.legend.itemGap*s.pix);c.widthArr=o;let t=Math.max.apply(null,o);switch(s.legend.float){case"left":c.area.start.x=s.area[3];c.area.end.x=s.area[3]+t+2*d;break;case"right":c.area.start.x=s.width-s.area[1]-t-2*d;c.area.end.x=s.width-s.area[1];break;default:c.area.start.x=(s.width-t)/2-d;c.area.end.x=(s.width+t)/2+d}c.area.width=t+2*d;c.area.wholeWidth=t+2*d;c.area.height=i.length*g+2*d;c.area.wholeHeight=i.length*g+2*d+2*x;c.points=i}}else{let t=l.length;let e=s.height-s.area[0]-s.area[2]-2*x-2*d;let a=Math.min(Math.floor(e/g),t);c.area.height=a*g+d*2;c.area.wholeHeight=a*g+d*2;switch(s.legend.float){case"top":c.area.start.y=s.area[0]+x;c.area.end.y=s.area[0]+x+c.area.height;break;case"bottom":c.area.start.y=s.height-s.area[2]-x-c.area.height;c.area.end.y=s.height-s.area[2]-x;break;default:c.area.start.y=(s.height-c.area.height)/2;c.area.end.y=(s.height+c.area.height)/2}let i=t%a===0?t/a:Math.floor(t/a+1);let r=[];for(let e=0;e<i;e++){let t=l.slice(e*a,e*a+a);r.push(t)}c.points=r;if(r.length){for(let t=0;t<r.length;t++){let a=r[t];let i=0;for(let e=0;e<a.length;e++){let t=p+u+measureText(a[e].name||"undefined",f,h)+s.legend.itemGap*s.pix;if(t>i){i=t}}c.widthArr.push(i);c.heightArr.push(a.length*g+d*2)}let e=0;for(let t=0;t<c.widthArr.length;t++){e+=c.widthArr[t]}c.area.width=e-s.legend.itemGap*s.pix+2*d;c.area.wholeWidth=c.area.width+d}}switch(s.legend.position){case"top":c.area.start.y=s.area[0]+x;c.area.end.y=s.area[0]+x+c.area.height;break;case"bottom":c.area.start.y=s.height-s.area[2]-c.area.height-x;c.area.end.y=s.height-s.area[2]-x;break;case"left":c.area.start.x=s.area[3];c.area.end.x=s.area[3]+c.area.width;break;case"right":c.area.start.x=s.width-s.area[1]-c.area.width;c.area.end.x=s.width-s.area[1];break}t.legendData=c;return c}function calCategoriesData(t,i,e,a,r){var o={angle:0,xAxisHeight:e.xAxisHeight};var n=i.xAxis.fontSize*i.pix||e.fontSize;var l=t.map(function(t,e){var a=i.xAxis.formatter?i.xAxis.formatter(t,e,i):t;return measureText(String(a),n,r)});var s=Math.max.apply(this,l);if(i.xAxis.rotateLabel==true){o.angle=i.xAxis.rotateAngle*Math.PI/180;let t=2*e.xAxisTextPadding+Math.abs(s*Math.sin(o.angle));t=t<n+2*e.xAxisTextPadding?t+2*e.xAxisTextPadding:t;if(i.enableScroll==true&&i.xAxis.scrollShow==true){t+=12*i.pix}o.xAxisHeight=t}if(i.xAxis.disabled){o.xAxisHeight=0}return o}function getXAxisTextList(t,e,h,c){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:-1;var i;if(c=="stack"){i=dataCombineStack(t,e.categories.length)}else{i=dataCombine(t)}var r=[];i=i.filter(function(t){if(typeof t==="object"&&t!==null){if(t.constructor.toString().indexOf("Array")>-1){return t!==null}else{return t.value!==null}}else{return t!==null}});i.map(function(t){if(typeof t==="object"){if(t.constructor.toString().indexOf("Array")>-1){if(e.type=="candle"){t.map(function(t){r.push(t)})}else{r.push(t[0])}}else{r.push(t.value)}}else{r.push(t)}});var o=0;var n=0;if(r.length>0){o=Math.min.apply(this,r);n=Math.max.apply(this,r)}if(a>-1){if(typeof e.xAxis.data[a].min==="number"){o=Math.min(e.xAxis.data[a].min,o)}if(typeof e.xAxis.data[a].max==="number"){n=Math.max(e.xAxis.data[a].max,n)}}else{if(typeof e.xAxis.min==="number"){o=Math.min(e.xAxis.min,o)}if(typeof e.xAxis.max==="number"){n=Math.max(e.xAxis.max,n)}}if(o===n){var d=n||10;n+=d}var l=o;var x=n;var f=[];var p=(x-l)/e.xAxis.splitNumber;for(var s=0;s<=e.xAxis.splitNumber;s++){f.push(l+p*s)}return f}function calXAxisData(t,e,a,i){var r=assign({},{type:""},e.extra.bar);var o={angle:0,xAxisHeight:a.xAxisHeight};o.ranges=getXAxisTextList(t,e,a,r.type);o.rangesFormat=o.ranges.map(function(t){t=util.toFixed(t,2);return t});var n=o.ranges.map(function(t){t=util.toFixed(t,2);return t});o=Object.assign(o,getXAxisPoints(n,e,a));var l=o.eachSpacing;var s=n.map(function(t){return measureText(t,e.xAxis.fontSize*e.pix||a.fontSize,i)});var h=Math.max.apply(this,s);if(h+2*a.xAxisTextPadding>l){o.angle=45*Math.PI/180;o.xAxisHeight=2*a.xAxisTextPadding+h*Math.sin(o.angle)}if(e.xAxis.disabled===true){o.xAxisHeight=0}return o}function getRadarDataPoints(r,o,n,a,t){var l=arguments.length>5&&arguments[5]!==undefined?arguments[5]:1;var e=t.extra.radar||{};e.max=e.max||0;var s=Math.max(e.max,Math.max.apply(null,dataCombine(a)));var h=[];for(let e=0;e<a.length;e++){let t=a[e];let i={};i.color=t.color;i.legendShape=t.legendShape;i.pointShape=t.pointShape;i.data=[];t.data.forEach(function(t,e){let a={};a.angle=r[e];a.proportion=t/s;a.value=t;a.position=convertCoordinateOrigin(n*a.proportion*l*Math.cos(a.angle),n*a.proportion*l*Math.sin(a.angle),o);i.data.push(a)});h.push(i)}return h}function getPieDataPoints(a,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var o=0;var n=0;for(let e=0;e<a.length;e++){let t=a[e];t.data=t.data===null?0:t.data;o+=t.data}for(let e=0;e<a.length;e++){let t=a[e];t.data=t.data===null?0:t.data;if(o===0){t._proportion_=1/a.length*r}else{t._proportion_=t.data/o*r}t._radius_=i}for(let e=0;e<a.length;e++){let t=a[e];t._start_=n;n+=2*t._proportion_*Math.PI}return a}function getFunnelDataPoints(e,a,i,r){var o=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;e=e.sort(function(t,e){return parseInt(e.data)-parseInt(t.data)});for(let t=0;t<e.length;t++){if(i=="funnel"){e[t].radius=e[t].data/e[0].data*a*o}else{e[t].radius=r*(e.length-t)/(r*e.length)*a*o}e[t]._proportion_=e[t].data/e[0].data}if(i!=="pyramid"){e.reverse()}return e}function getRoseDataPoints(a,i,r,o){var n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var l=0;var s=0;var h=[];for(let e=0;e<a.length;e++){let t=a[e];t.data=t.data===null?0:t.data;l+=t.data;h.push(t.data)}var c=Math.min.apply(null,h);var d=Math.max.apply(null,h);var x=o-r;for(let e=0;e<a.length;e++){let t=a[e];t.data=t.data===null?0:t.data;if(l===0){t._proportion_=1/a.length*n;t._rose_proportion_=1/a.length*n}else{t._proportion_=t.data/l*n;if(i=="area"){t._rose_proportion_=1/a.length*n}else{t._rose_proportion_=t.data/l*n}}t._radius_=r+x*((t.data-c)/(d-c))||o}for(let e=0;e<a.length;e++){let t=a[e];t._start_=s;s+=2*t._rose_proportion_*Math.PI}return a}function getArcbarDataPoints(i,r){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;if(o==1){o=.999999}for(let a=0;a<i.length;a++){let t=i[a];t.data=t.data===null?0:t.data;let e;if(r.type=="circle"){e=2}else{if(r.endAngle<r.startAngle){e=2+r.endAngle-r.startAngle}else{e=r.startAngle-r.endAngle}}t._proportion_=e*t.data*o+r.startAngle;if(t._proportion_>=2){t._proportion_=t._proportion_%2}}return i}function getGaugeArcbarDataPoints(i,r){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;if(o==1){o=.999999}for(let a=0;a<i.length;a++){let t=i[a];t.data=t.data===null?0:t.data;let e;if(r.type=="circle"){e=2}else{if(r.endAngle<r.startAngle){e=2+r.endAngle-r.startAngle}else{e=r.startAngle-r.endAngle}}t._proportion_=e*t.data*o+r.startAngle;if(t._proportion_>=2){t._proportion_=t._proportion_%2}}return i}function getGaugeAxisPoints(e,a,t){let i=a-t+1;let r=a;for(let t=0;t<e.length;t++){e[t].value=e[t].value===null?0:e[t].value;e[t]._startAngle_=r;e[t]._endAngle_=i*e[t].value+a;if(e[t]._endAngle_>=2){e[t]._endAngle_=e[t]._endAngle_%2}r=e[t]._endAngle_}return e}function getGaugeDataPoints(i,r,o){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:1;for(let a=0;a<i.length;a++){let e=i[a];e.data=e.data===null?0:e.data;if(o.pointer.color=="auto"){for(let t=0;t<r.length;t++){if(e.data<=r[t].value){e.color=r[t].color;break}}}else{e.color=o.pointer.color}let t=o.startAngle-o.endAngle+1;e._endAngle_=t*e.data+o.startAngle;e._oldAngle_=o.oldAngle;if(o.oldAngle<o.endAngle){e._oldAngle_+=2}if(e.data>=o.oldData){e._proportion_=(e._endAngle_-e._oldAngle_)*n+o.oldAngle}else{e._proportion_=e._oldAngle_-(e._oldAngle_-e._endAngle_)*n}if(e._proportion_>=2){e._proportion_=e._proportion_%2}}return i}function getPieTextMaxLength(i,r,o,n){i=getPieDataPoints(i);let l=0;for(let a=0;a<i.length;a++){let t=i[a];let e=t.formatter?t.formatter(+t._proportion_.toFixed(2)):util.toFixed(t._proportion_*100)+"%";l=Math.max(l,measureText(e,t.textSize*n.pix||r.fontSize,o))}return l}function fixColumeData(t,i,r,o,e,n){return t.map(function(t){if(t===null){return null}var e=0;var a=0;if(n.type=="mix"){e=n.extra.mix.column.seriesGap*n.pix||0;a=n.extra.mix.column.categoryGap*n.pix||0}else{e=n.extra.column.seriesGap*n.pix||0;a=n.extra.column.categoryGap*n.pix||0}e=Math.min(e,i/r);a=Math.min(a,i/r);t.width=Math.ceil((i-2*a-e*(r-1))/r);if(n.extra.mix&&n.extra.mix.column.width&&+n.extra.mix.column.width>0){t.width=Math.min(t.width,+n.extra.mix.column.width*n.pix)}if(n.extra.column&&n.extra.column.width&&+n.extra.column.width>0){t.width=Math.min(t.width,+n.extra.column.width*n.pix)}if(t.width<=0){t.width=1}t.x+=(o+.5-r/2)*(t.width+e);return t})}function fixBarData(t,i,r,o,e,n){return t.map(function(t){if(t===null){return null}var e=0;var a=0;e=n.extra.bar.seriesGap*n.pix||0;a=n.extra.bar.categoryGap*n.pix||0;e=Math.min(e,i/r);a=Math.min(a,i/r);t.width=Math.ceil((i-2*a-e*(r-1))/r);if(n.extra.bar&&n.extra.bar.width&&+n.extra.bar.width>0){t.width=Math.min(t.width,+n.extra.bar.width*n.pix)}if(t.width<=0){t.width=1}t.y+=(o+.5-r/2)*(t.width+e);return t})}function fixColumeMeterData(t,e,a,i,r,o,n){var l=o.extra.column.categoryGap*o.pix||0;return t.map(function(t){if(t===null){return null}t.width=e-2*l;if(o.extra.column&&o.extra.column.width&&+o.extra.column.width>0){t.width=Math.min(t.width,+o.extra.column.width*o.pix)}if(i>0){t.width-=n}return t})}function fixColumeStackData(t,a,e,i,r,o,n){var l=o.extra.column.categoryGap*o.pix||0;return t.map(function(t,e){if(t===null){return null}t.width=Math.ceil(a-2*l);if(o.extra.column&&o.extra.column.width&&+o.extra.column.width>0){t.width=Math.min(t.width,+o.extra.column.width*o.pix)}if(t.width<=0){t.width=1}return t})}function fixBarStackData(t,a,e,i,r,o,n){var l=o.extra.bar.categoryGap*o.pix||0;return t.map(function(t,e){if(t===null){return null}t.width=Math.ceil(a-2*l);if(o.extra.bar&&o.extra.bar.width&&+o.extra.bar.width>0){t.width=Math.min(t.width,+o.extra.bar.width*o.pix)}if(t.width<=0){t.width=1}return t})}function getXAxisPoints(t,e,h){var a=e.width-e.area[1]-e.area[3];var i=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;if((e.type=="line"||e.type=="area"||e.type=="scatter"||e.type=="bubble"||e.type=="bar")&&i>1&&e.xAxis.boundaryGap=="justify"){i-=1}var r=0;if(e.type=="mount"&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1){if(e.extra.mount.widthRatio>2)e.extra.mount.widthRatio=2;r=e.extra.mount.widthRatio-1;i+=r}var o=a/i;var n=[];var l=e.area[3];var s=e.width-e.area[1];t.forEach(function(t,e){n.push(l+r/2*o+e*o)});if(e.xAxis.boundaryGap!=="justify"){if(e.enableScroll===true){n.push(l+r*o+t.length*o)}else{n.push(s)}}return{xAxisPoints:n,startX:l,endX:s,eachSpacing:o}}function getCandleDataPoints(t,l,s,h,c,d,a){var x=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var e=[];var f=d.height-d.area[0]-d.area[2];t.forEach(function(t,o){if(t===null){e.push(null)}else{var n=[];t.forEach(function(t,e){var a={};a.x=h[o]+Math.round(c/2);var i=t.value||t;var r=f*(i-l)/(s-l);r*=x;a.y=d.height-Math.round(r)-d.area[2];n.push(a)});e.push(n)}});return e}function getDataPoints(t,a,n,l,s,h,e){var c=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var d="center";if(h.type=="line"||h.type=="area"||h.type=="scatter"||h.type=="bubble"){d=h.xAxis.boundaryGap}var x=[];var f=h.height-h.area[0]-h.area[2];var p=h.width-h.area[1]-h.area[3];t.forEach(function(i,t){if(i===null){x.push(null)}else{var r={};r.color=i.color;r.x=l[t];var o=i;if(typeof i==="object"&&i!==null){if(i.constructor.toString().indexOf("Array")>-1){let t,e,a;t=[].concat(h.chartData.xAxisData.ranges);e=t.shift();a=t.pop();o=i[1];r.x=h.area[3]+p*(i[0]-e)/(a-e);if(h.type=="bubble"){r.r=i[2];r.t=i[3]}}else{o=i.value}}if(d=="center"){r.x+=s/2}var e=f*(o-a)/(n-a);e*=c;r.y=h.height-e-h.area[2];x.push(r)}});return x}function getMountDataPoints(t,o,n,l,s,h,e){var c=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var d=[];var x=h.height-h.area[0]-h.area[2];var a=h.width-h.area[1]-h.area[3];var f=s*e.widthRatio;t.forEach(function(t,e){if(t===null){d.push(null)}else{var a={};a.color=t.color;a.x=l[e];a.x+=s/2;var i=t.data;var r=x*(i-o)/(n-o);r*=c;a.y=h.height-r-h.area[2];a.value=i;a.width=f;d.push(a)}});return d}function getBarDataPoints(t,o,n,l,e,s,a){var h=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var c=[];var i=s.height-s.area[0]-s.area[2];var d=s.width-s.area[1]-s.area[3];t.forEach(function(t,e){if(t===null){c.push(null)}else{var a={};a.color=t.color;a.y=l[e];var i=t;if(typeof t==="object"&&t!==null){i=t.value}var r=d*(i-o)/(n-o);r*=h;a.height=r;a.value=i;a.x=r+s.area[3];c.push(a)}});return c}function getStackDataPoints(t,s,h,c,u,d,e,x,y){var f=arguments.length>9&&arguments[9]!==undefined?arguments[9]:1;var p=[];var g=d.height-d.area[0]-d.area[2];t.forEach(function(t,e){if(t===null){p.push(null)}else{var a={};a.color=t.color;a.x=c[e]+Math.round(u/2);if(x>0){var i=0;for(let t=0;t<=x;t++){i+=y[t].data[e]}var r=i-t;var o=g*(i-s)/(h-s);var n=g*(r-s)/(h-s)}else{var i=t;var o=g*(i-s)/(h-s);var n=0}var l=n;o*=f;l*=f;a.y=d.height-Math.round(o)-d.area[2];a.y0=d.height-Math.round(l)-d.area[2];p.push(a)}});return p}function getBarStackDataPoints(t,s,h,c,e,d,a,x,u){var f=arguments.length>9&&arguments[9]!==undefined?arguments[9]:1;var p=[];var g=d.width-d.area[1]-d.area[3];t.forEach(function(t,e){if(t===null){p.push(null)}else{var a={};a.color=t.color;a.y=c[e];if(x>0){var i=0;for(let t=0;t<=x;t++){i+=u[t].data[e]}var r=i-t;var o=g*(i-s)/(h-s);var n=g*(r-s)/(h-s)}else{var i=t;var o=g*(i-s)/(h-s);var n=0}var l=n;o*=f;l*=f;a.height=o-l;a.x=d.area[3]+o;a.x0=d.area[3]+l;p.push(a)}});return p}function getYAxisTextList(t,e,h,c,a){var d=arguments.length>5&&arguments[5]!==undefined?arguments[5]:-1;var i;if(c=="stack"){i=dataCombineStack(t,e.categories.length)}else{i=dataCombine(t)}var r=[];i=i.filter(function(t){if(typeof t==="object"&&t!==null){if(t.constructor.toString().indexOf("Array")>-1){return t!==null}else{return t.value!==null}}else{return t!==null}});i.map(function(t){if(typeof t==="object"){if(t.constructor.toString().indexOf("Array")>-1){if(e.type=="candle"){t.map(function(t){r.push(t)})}else{r.push(t[1])}}else{r.push(t.value)}}else{r.push(t)}});var o=a.min||0;var n=a.max||0;if(r.length>0){o=Math.min.apply(this,r);n=Math.max.apply(this,r)}if(o===n){if(n==0){n=10}else{o=0}}var l=getDataRange(o,n);var x=a.min===undefined||a.min===null?l.minRange:a.min;var f=a.max===undefined||a.max===null?l.maxRange:a.max;var p=[];var g=(f-x)/e.yAxis.splitNumber;for(var s=0;s<=e.yAxis.splitNumber;s++){p.push(x+g*s)}return p.reverse()}function calYAxisData(a,o,e,n){var l=assign({},{type:""},o.extra.column);var t=o.yAxis.data.length;var s=new Array(t);if(t>0){for(let e=0;e<t;e++){s[e]=[];for(let t=0;t<a.length;t++){if(a[t].index==e){s[e].push(a[t])}}}var h=new Array(t);var c=new Array(t);var d=new Array(t);for(let r=0;r<t;r++){let i=o.yAxis.data[r];if(o.yAxis.disabled==true){i.disabled=true}if(i.type==="categories"){if(!i.formatter){i.formatter=(t,e,a)=>{return t+(i.unit||"")}}i.categories=i.categories||o.categories;h[r]=i.categories}else{if(!i.formatter){i.formatter=(t,e,a)=>{return t.toFixed(i.tofix)+(i.unit||"")}}h[r]=getYAxisTextList(s[r],o,e,l.type,i,r)}let a=i.fontSize*o.pix||e.fontSize;d[r]={position:i.position?i.position:"left",width:0};c[r]=h[r].map(function(t,e){t=i.formatter(t,e,o);d[r].width=Math.max(d[r].width,measureText(t,a,n)+5);return t});let t=i.calibration?4*o.pix:0;d[r].width+=t+3*o.pix;if(i.disabled===true){d[r].width=0}}}else{var h=new Array(1);var c=new Array(1);var d=new Array(1);if(o.type==="bar"){h[0]=o.categories;if(!o.yAxis.formatter){o.yAxis.formatter=(t,e,a)=>{return t+(a.yAxis.unit||"")}}}else{if(!o.yAxis.formatter){o.yAxis.formatter=(t,e,a)=>{return t.toFixed(a.yAxis.tofix)+(a.yAxis.unit||"")}}h[0]=getYAxisTextList(a,o,e,l.type,{})}d[0]={position:"left",width:0};var i=o.yAxis.fontSize*o.pix||e.fontSize;c[0]=h[0].map(function(t,e){t=o.yAxis.formatter(t,e,o);d[0].width=Math.max(d[0].width,measureText(t,i,n)+5);return t});d[0].width+=3*o.pix;if(o.yAxis.disabled===true){d[0]={position:"left",width:0};o.yAxis.data[0]={disabled:true}}else{o.yAxis.data[0]={disabled:false,position:"left",max:o.yAxis.max,min:o.yAxis.min,formatter:o.yAxis.formatter};if(o.type==="bar"){o.yAxis.data[0].categories=o.categories;o.yAxis.data[0].type="categories"}}}return{rangesFormat:c,ranges:h,yAxisWidth:d}}function calTooltipYAxisData(r,t,o,e,a){let n=[].concat(o.chartData.yAxisData.ranges);let l=o.height-o.area[0]-o.area[2];let s=o.area[0];let h=[];for(let i=0;i<n.length;i++){let t=n[i].shift();let e=n[i].pop();let a=t-(t-e)*(r-s)/l;a=o.yAxis.data[i].formatter?o.yAxis.data[i].formatter(a):a.toFixed(0);h.push(String(a))}return h}function calMarkLineData(i,r){let o,n;let l=r.height-r.area[0]-r.area[2];for(let a=0;a<i.length;a++){i[a].yAxisIndex=i[a].yAxisIndex?i[a].yAxisIndex:0;let t=[].concat(r.chartData.yAxisData.ranges[i[a].yAxisIndex]);o=t.pop();n=t.shift();let e=l*(i[a].value-o)/(n-o);i[a].y=r.height-Math.round(e)-r.area[2]}return i}function contextRotate(t,e){if(e.rotateLock!==true){t.translate(e.height,0);t.rotate(90*Math.PI/180)}else if(e._rotate_!==true){t.translate(e.height,0);t.rotate(90*Math.PI/180);e._rotate_=true}}function drawPointShape(t,e,a,i,r){i.beginPath();if(r.dataPointShapeType=="hollow"){i.setStrokeStyle(e);i.setFillStyle(r.background);i.setLineWidth(2*r.pix)}else{i.setStrokeStyle("#ffffff");i.setFillStyle(e);i.setLineWidth(1*r.pix)}if(a==="diamond"){t.forEach(function(t,e){if(t!==null){i.moveTo(t.x,t.y-4.5);i.lineTo(t.x-4.5,t.y);i.lineTo(t.x,t.y+4.5);i.lineTo(t.x+4.5,t.y);i.lineTo(t.x,t.y-4.5)}})}else if(a==="circle"){t.forEach(function(t,e){if(t!==null){i.moveTo(t.x+2.5*r.pix,t.y);i.arc(t.x,t.y,3*r.pix,0,2*Math.PI,false)}})}else if(a==="square"){t.forEach(function(t,e){if(t!==null){i.moveTo(t.x-3.5,t.y-3.5);i.rect(t.x-3.5,t.y-3.5,7,7)}})}else if(a==="triangle"){t.forEach(function(t,e){if(t!==null){i.moveTo(t.x,t.y-4.5);i.lineTo(t.x-4.5,t.y+4.5);i.lineTo(t.x+4.5,t.y+4.5);i.lineTo(t.x,t.y-4.5)}})}else if(a==="triangle"){return}i.closePath();i.fill();i.stroke()}function drawRingTitle(t,e,a,i){var r=t.title.fontSize||e.titleFontSize;var o=t.subtitle.fontSize||e.subtitleFontSize;var n=t.title.name||"";var l=t.subtitle.name||"";var c=t.title.color||t.fontColor;var d=t.subtitle.color||t.fontColor;var x=n?r:0;var f=l?o:0;var s=5;if(l){var p=measureText(l,o*t.pix,a);var g=i.x-p/2+(t.subtitle.offsetX||0)*t.pix;var h=i.y+o*t.pix/2+(t.subtitle.offsetY||0)*t.pix;if(n){h+=(x*t.pix+s)/2}a.beginPath();a.setFontSize(o*t.pix);a.setFillStyle(d);a.fillText(l,g,h);a.closePath();a.stroke()}if(n){var u=measureText(n,r*t.pix,a);var y=i.x-u/2+(t.title.offsetX||0);var v=i.y+r*t.pix/2+(t.title.offsetY||0)*t.pix;if(l){v-=(f*t.pix+s)/2}a.beginPath();a.setFontSize(r*t.pix);a.setFillStyle(c);a.fillText(n,y,v);a.closePath();a.stroke()}}function drawPointText(t,o,n,l,s){var h=o.data;var c=o.textOffset?o.textOffset:0;t.forEach(function(t,e){if(t!==null){l.beginPath();var a=o.textSize?o.textSize*s.pix:n.fontSize;l.setFontSize(a);l.setFillStyle(o.textColor||s.fontColor);var i=h[e];if(typeof h[e]==="object"&&h[e]!==null){if(h[e].constructor.toString().indexOf("Array")>-1){i=h[e][1]}else{i=h[e].value}}var r=o.formatter?o.formatter(i,e,o,s):i;l.setTextAlign("center");l.fillText(String(r),t.x,t.y-4+c*s.pix);l.closePath();l.stroke();l.setTextAlign("left")}})}function drawMountPointText(t,o,n,l,s){var e=o.data;var h=o.textOffset?o.textOffset:0;t.forEach(function(t,e){if(t!==null){l.beginPath();var a=o[e].textSize?o[e].textSize*s.pix:n.fontSize;l.setFontSize(a);l.setFillStyle(o[e].textColor||s.fontColor);var i=t.value;var r=o[e].formatter?o[e].formatter(i,e,o,s):i;l.setTextAlign("center");l.fillText(String(r),t.x,t.y-4+h*s.pix);l.closePath();l.stroke();l.setTextAlign("left")}})}function drawBarPointText(t,o,n,l,s){var h=o.data;var e=o.textOffset?o.textOffset:0;t.forEach(function(t,e){if(t!==null){l.beginPath();var a=o.textSize?o.textSize*s.pix:n.fontSize;l.setFontSize(a);l.setFillStyle(o.textColor||s.fontColor);var i=h[e];if(typeof h[e]==="object"&&h[e]!==null){i=h[e].value}var r=o.formatter?o.formatter(i,e,o,s):i;l.setTextAlign("left");l.fillText(String(r),t.x+4*s.pix,t.y+a/2-3);l.closePath();l.stroke()}})}function drawGaugeLabel(e,a,i,r,o,n){a-=e.width/2+e.labelOffset*r.pix;a=a<10?10:a;let t=e.startAngle-e.endAngle+1;let d=t/e.splitLine.splitNumber;let x=e.endNumber-e.startNumber;let f=x/e.splitLine.splitNumber;let l=e.startAngle;let s=e.startNumber;for(let t=0;t<e.splitLine.splitNumber+1;t++){var h={x:a*Math.cos(l*Math.PI),y:a*Math.sin(l*Math.PI)};var c=e.formatter?e.formatter(s,t,r):s;h.x+=i.x-measureText(c,o.fontSize,n)/2;h.y+=i.y;var p=h.x;var g=h.y;n.beginPath();n.setFontSize(o.fontSize);n.setFillStyle(e.labelColor||r.fontColor);n.fillText(c,p,g+o.fontSize/2);n.closePath();n.stroke();l+=d;if(l>=2){l=l%2}s+=f}}function drawRadarLabel(t,s,h,c,d,x){var f=c.extra.radar||{};t.forEach(function(t,e){if(f.labelPointShow===true&&c.categories[e]!==""){var a={x:s*Math.cos(t),y:s*Math.sin(t)};var i=convertCoordinateOrigin(a.x,a.y,h);x.setFillStyle(f.labelPointColor);x.beginPath();x.arc(i.x,i.y,f.labelPointRadius*c.pix,0,2*Math.PI,false);x.closePath();x.fill()}var r={x:(s+d.radarLabelTextMargin*c.pix)*Math.cos(t),y:(s+d.radarLabelTextMargin*c.pix)*Math.sin(t)};var o=convertCoordinateOrigin(r.x,r.y,h);var n=o.x;var l=o.y;if(util.approximatelyEqual(r.x,0)){n-=measureText(c.categories[e]||"",d.fontSize,x)/2}else if(r.x<0){n-=measureText(c.categories[e]||"",d.fontSize,x)}x.beginPath();x.setFontSize(d.fontSize);x.setFillStyle(f.labelColor||c.fontColor);x.fillText(c.categories[e]||"",n,l+d.fontSize/2);x.closePath();x.stroke()})}function drawPieText(n,d,x,f,t,l){var p=x.pieChartLinePadding;var g=[];var u=null;var y=n.map(function(t,e){var a=t.formatter?t.formatter(t,e,n,d):util.toFixed(t._proportion_.toFixed(4)*100)+"%";a=t.labelText?t.labelText:a;var i=2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2);if(t._rose_proportion_){i=2*Math.PI-(t._start_+2*Math.PI*t._rose_proportion_/2)}var r=t.color;var o=t._radius_;return{arc:i,text:a,color:r,radius:o,textColor:t.textColor,textSize:t.textSize,labelShow:t.labelShow}});for(let c=0;c<y.length;c++){let t=y[c];let e=Math.cos(t.arc)*(t.radius+p);let a=Math.sin(t.arc)*(t.radius+p);let i=Math.cos(t.arc)*t.radius;let r=Math.sin(t.arc)*t.radius;let o=e>=0?e+x.pieChartTextPadding:e-x.pieChartTextPadding;let n=a;let l=measureText(t.text,t.textSize*d.pix||x.fontSize,f);let s=n;if(u&&util.isSameXCoordinateArea(u.start,{x:o})){if(o>0){s=Math.min(n,u.start.y)}else if(e<0){s=Math.max(n,u.start.y)}else{if(n>0){s=Math.max(n,u.start.y)}else{s=Math.min(n,u.start.y)}}}if(o<0){o-=l}let h={lineStart:{x:i,y:r},lineEnd:{x:e,y:a},start:{x:o,y:s},width:l,height:x.fontSize,text:t.text,color:t.color,textColor:t.textColor,textSize:t.textSize};u=avoidCollision(h,u);g.push(u)}for(let n=0;n<g.length;n++){if(y[n].labelShow===false){continue}let t=g[n];let e=convertCoordinateOrigin(t.lineStart.x,t.lineStart.y,l);let a=convertCoordinateOrigin(t.lineEnd.x,t.lineEnd.y,l);let i=convertCoordinateOrigin(t.start.x,t.start.y,l);f.setLineWidth(1*d.pix);f.setFontSize(t.textSize*d.pix||x.fontSize);f.beginPath();f.setStrokeStyle(t.color);f.setFillStyle(t.color);f.moveTo(e.x,e.y);let r=t.start.x<0?i.x+t.width:i.x;let o=t.start.x<0?i.x-5:i.x+5;f.quadraticCurveTo(a.x,a.y,r,i.y);f.moveTo(e.x,e.y);f.stroke();f.closePath();f.beginPath();f.moveTo(i.x+t.width,i.y);f.arc(r,i.y,2*d.pix,0,2*Math.PI);f.closePath();f.fill();f.beginPath();f.setFontSize(t.textSize*d.pix||x.fontSize);f.setFillStyle(t.textColor||d.fontColor);f.fillText(t.text,o,i.y+3);f.closePath();f.stroke();f.closePath()}}function drawToolTipSplitLine(r,o,n,l){var s=o.extra.tooltip||{};s.gridType=s.gridType==undefined?"solid":s.gridType;s.dashLength=s.dashLength==undefined?4:s.dashLength;var t=o.area[0];var h=o.height-o.area[2];if(s.gridType=="dash"){l.setLineDash([s.dashLength,s.dashLength])}l.setStrokeStyle(s.gridColor||"#cccccc");l.setLineWidth(1*o.pix);l.beginPath();l.moveTo(r,t);l.lineTo(r,h);l.stroke();l.setLineDash([]);if(s.xAxisLabel){let t=o.categories[o.tooltip.index];l.setFontSize(n.fontSize);let e=measureText(t,n.fontSize,l);let a=r-.5*e;let i=h;l.beginPath();l.setFillStyle(hexToRgb(s.labelBgColor||n.toolTipBackground,s.labelBgOpacity||n.toolTipOpacity));l.setStrokeStyle(s.labelBgColor||n.toolTipBackground);l.setLineWidth(1*o.pix);l.rect(a-n.toolTipPadding,i,e+2*n.toolTipPadding,n.fontSize+2*n.toolTipPadding);l.closePath();l.stroke();l.fill();l.beginPath();l.setFontSize(n.fontSize);l.setFillStyle(s.labelFontColor||o.fontColor);l.fillText(String(t),a,i+n.toolTipPadding+n.fontSize);l.closePath();l.stroke()}}function drawMarkLine(s,h,c){let e=assign({},{type:"solid",dashLength:4,data:[]},s.extra.markLine);let a=s.area[3];let i=s.width-s.area[1];let r=calMarkLineData(e.data,s);for(let t=0;t<r.length;t++){let l=assign({},{lineColor:"#DE4A42",showLabel:false,labelFontColor:"#666666",labelBgColor:"#DFE8FF",labelBgOpacity:.8,labelAlign:"left",labelOffsetX:0,labelOffsetY:0},r[t]);if(e.type=="dash"){c.setLineDash([e.dashLength,e.dashLength])}c.setStrokeStyle(l.lineColor);c.setLineWidth(1*s.pix);c.beginPath();c.moveTo(a,l.y);c.lineTo(i,l.y);c.stroke();c.setLineDash([]);if(l.showLabel){let t=l.labelText?l.labelText:l.value;c.setFontSize(h.fontSize);let e=measureText(t,h.fontSize,c);let a=e+h.toolTipPadding*2;let i=l.labelAlign=="left"?s.area[3]-a:s.width-s.area[1];i+=l.labelOffsetX;let r=l.y-.5*h.fontSize-h.toolTipPadding;r+=l.labelOffsetY;let o=i+h.toolTipPadding;let n=l.y;c.setFillStyle(hexToRgb(l.labelBgColor,l.labelBgOpacity));c.setStrokeStyle(l.labelBgColor);c.setLineWidth(1*s.pix);c.beginPath();c.rect(i,r,a,h.fontSize+2*h.toolTipPadding);c.closePath();c.stroke();c.fill();c.setFontSize(h.fontSize);c.setTextAlign("left");c.setFillStyle(l.labelFontColor);c.fillText(String(t),o,r+h.fontSize+h.toolTipPadding/2);c.stroke();c.setTextAlign("left")}}}function drawToolTipHorizentalLine(d,x,f,t,e){var p=assign({},{gridType:"solid",dashLength:4},d.extra.tooltip);var a=d.area[3];var i=d.width-d.area[1];if(p.gridType=="dash"){f.setLineDash([p.dashLength,p.dashLength])}f.setStrokeStyle(p.gridColor||"#cccccc");f.setLineWidth(1*d.pix);f.beginPath();f.moveTo(a,d.tooltip.offset.y);f.lineTo(i,d.tooltip.offset.y);f.stroke();f.setLineDash([]);if(p.yAxisLabel){let l=calTooltipYAxisData(d.tooltip.offset.y,d.series,d,x,t);let s=d.chartData.yAxisData.yAxisWidth;let h=d.area[3];let c=d.width-d.area[1];for(let n=0;n<l.length;n++){f.setFontSize(x.fontSize);let t=measureText(l[n],x.fontSize,f);let e,a,i;if(s[n].position=="left"){e=h-s[n].width;a=Math.max(e,e+t+x.toolTipPadding*2)}else{e=c;a=Math.max(e+s[n].width,e+t+x.toolTipPadding*2)}i=a-e;let r=e+(i-t)/2;let o=d.tooltip.offset.y;f.beginPath();f.setFillStyle(hexToRgb(p.labelBgColor||x.toolTipBackground,p.labelBgOpacity||x.toolTipOpacity));f.setStrokeStyle(p.labelBgColor||x.toolTipBackground);f.setLineWidth(1*d.pix);f.rect(e,o-.5*x.fontSize-x.toolTipPadding,i,x.fontSize+2*x.toolTipPadding);f.closePath();f.stroke();f.fill();f.beginPath();f.setFontSize(x.fontSize);f.setFillStyle(p.labelFontColor||d.fontColor);f.fillText(l[n],r,o+.5*x.fontSize);f.closePath();f.stroke();if(s[n].position=="left"){h-=s[n].width+d.yAxis.padding*d.pix}else{c+=s[n].width+d.yAxis.padding*d.pix}}}}function drawToolTipSplitArea(t,e,a,i,r){var o=assign({},{activeBgColor:"#000000",activeBgOpacity:.08,activeWidth:r},e.extra.column);o.activeWidth=o.activeWidth>r?r:o.activeWidth;var n=e.area[0];var l=e.height-e.area[2];i.beginPath();i.setFillStyle(hexToRgb(o.activeBgColor,o.activeBgOpacity));i.rect(t-o.activeWidth/2,n,o.activeWidth,l-n);i.closePath();i.fill();i.setFillStyle("#FFFFFF")}function drawBarToolTipSplitArea(t,e,a,i,r){var o=assign({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.bar);var n=e.area[3];var l=e.width-e.area[1];i.beginPath();i.setFillStyle(hexToRgb(o.activeBgColor,o.activeBgOpacity));i.rect(n,t-r/2,l-n,r);i.closePath();i.fill();i.setFillStyle("#FFFFFF")}function drawToolTip(t,r,e,o,n,c,d){var l=assign({},{showBox:true,showArrow:true,showCategory:false,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,fontColor:"#FFFFFF",splitLine:true},e.extra.tooltip);if(l.showCategory==true&&e.categories){t.unshift({text:e.categories[e.tooltip.index],color:null})}var x=4*e.pix;var f=5*e.pix;var s=l.showArrow?8*e.pix:0;var p=false;if(e.type=="line"||e.type=="mount"||e.type=="area"||e.type=="candle"||e.type=="mix"){if(l.splitLine==true){drawToolTipSplitLine(e.tooltip.offset.x,e,o,n)}}r=assign({x:0,y:0},r);r.y-=8*e.pix;var g=t.map(function(t){return measureText(t.text,o.fontSize,n)});var h=x+f+4*o.toolTipPadding+Math.max.apply(null,g);var a=2*o.toolTipPadding+t.length*o.toolTipLineHeight;if(l.showBox==false){return}if(r.x-Math.abs(e._scrollDistance_||0)+s+h>e.width){p=true}if(a+r.y>e.height){r.y=e.height-a}n.beginPath();n.setFillStyle(hexToRgb(l.bgColor||o.toolTipBackground,l.bgOpacity||o.toolTipOpacity));n.setLineWidth(l.borderWidth*e.pix);n.setStrokeStyle(hexToRgb(l.borderColor,l.borderOpacity));var i=l.borderRadius;if(p){if(l.showArrow){n.moveTo(r.x,r.y+10*e.pix);n.lineTo(r.x-s,r.y+10*e.pix+5*e.pix)}n.arc(r.x-s-i,r.y+a-i,i,0,Math.PI/2,false);n.arc(r.x-s-Math.round(h)+i,r.y+a-i,i,Math.PI/2,Math.PI,false);n.arc(r.x-s-Math.round(h)+i,r.y+i,i,-Math.PI,-Math.PI/2,false);n.arc(r.x-s-i,r.y+i,i,-Math.PI/2,0,false);if(l.showArrow){n.lineTo(r.x-s,r.y+10*e.pix-5*e.pix);n.lineTo(r.x,r.y+10*e.pix)}}else{if(l.showArrow){n.moveTo(r.x,r.y+10*e.pix);n.lineTo(r.x+s,r.y+10*e.pix-5*e.pix)}n.arc(r.x+s+i,r.y+i,i,-Math.PI,-Math.PI/2,false);n.arc(r.x+s+Math.round(h)-i,r.y+i,i,-Math.PI/2,0,false);n.arc(r.x+s+Math.round(h)-i,r.y+a-i,i,0,Math.PI/2,false);n.arc(r.x+s+i,r.y+a-i,i,Math.PI/2,Math.PI,false);if(l.showArrow){n.lineTo(r.x+s,r.y+10*e.pix+5*e.pix);n.lineTo(r.x,r.y+10*e.pix)}}n.closePath();n.fill();if(l.borderWidth>0){n.stroke()}t.forEach(function(t,e){if(t.color!==null){n.beginPath();n.setFillStyle(t.color);var a=r.x+s+2*o.toolTipPadding;var i=r.y+(o.toolTipLineHeight-o.fontSize)/2+o.toolTipLineHeight*e+o.toolTipPadding+1;if(p){a=r.x-h-s+2*o.toolTipPadding}n.fillRect(a,i,x,o.fontSize);n.closePath()}});t.forEach(function(t,e){var a=r.x+s+2*o.toolTipPadding+x+f;if(p){a=r.x-h-s+2*o.toolTipPadding+ +x+f}var i=r.y+(o.toolTipLineHeight-o.fontSize)/2+o.toolTipLineHeight*e+o.toolTipPadding;n.beginPath();n.setFontSize(o.fontSize);n.setFillStyle(l.fontColor);n.fillText(t.text,a,i+o.fontSize);n.closePath();n.stroke()})}function drawColumnDataPoints(y,v,m,T){let b=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let t=v.chartData.xAxisData,P=t.xAxisPoints,w=t.eachSpacing;let S=assign({},{type:"group",width:w/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:false,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},v.extra.column);let A=[];T.save();let C=-2;let D=P.length+2;if(v._scrollDistance_&&v._scrollDistance_!==0&&v.enableScroll===true){T.translate(v._scrollDistance_,0);C=Math.floor(-v._scrollDistance_/w)-2;D=C+v.xAxis.itemCount+4}if(v.tooltip&&v.tooltip.textList&&v.tooltip.textList.length&&b===1){drawToolTipSplitArea(v.tooltip.offset.x,v,m,T,w)}S.customColor=fillCustomColor(S.linearType,S.customColor,y,m);y.forEach(function(a,i){let t,o,x;t=[].concat(v.chartData.yAxisData.ranges[a.index]);o=t.pop();x=t.shift();var f=a.data;switch(S.type){case"group":var r=getDataPoints(f,o,x,P,w,v,m,b);var p=getStackDataPoints(f,o,x,P,w,v,m,i,y,b);A.push(p);r=fixColumeData(r,w,y.length,i,m,v);for(let t=0;t<r.length;t++){let o=r[t];if(o!==null&&t>C&&t<D){var n=o.x-o.width/2;var l=v.height-o.y-v.area[2];T.beginPath();var s=o.color||a.color;var g=o.color||a.color;if(S.linearType!=="none"){var e=T.createLinearGradient(n,o.y,n,v.height-v.area[2]);if(S.linearType=="opacity"){e.addColorStop(0,hexToRgb(s,S.linearOpacity));e.addColorStop(1,hexToRgb(s,1))}else{e.addColorStop(0,hexToRgb(S.customColor[a.linearIndex],S.linearOpacity));e.addColorStop(S.colorStop,hexToRgb(S.customColor[a.linearIndex],S.linearOpacity));e.addColorStop(1,hexToRgb(s,1))}s=e}if(S.barBorderRadius&&S.barBorderRadius.length===4||S.barBorderCircle===true){const h=n;const c=o.y;const d=o.width;const l=v.height-v.area[2]-o.y;if(S.barBorderCircle){S.barBorderRadius=[d/2,d/2,0,0]}let[t,e,a,i]=S.barBorderRadius;let r=Math.min(d/2,l/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);T.arc(h+d-e,c+e,e,-Math.PI/2,0);T.arc(h+d-a,c+l-a,a,0,Math.PI/2);T.arc(h+i,c+l-i,i,Math.PI/2,Math.PI)}else{T.moveTo(n,o.y);T.lineTo(n+o.width,o.y);T.lineTo(n+o.width,v.height-v.area[2]);T.lineTo(n,v.height-v.area[2]);T.lineTo(n,o.y);T.setLineWidth(1);T.setStrokeStyle(g)}T.setFillStyle(s);T.closePath();T.fill()}};break;case"stack":var r=getStackDataPoints(f,o,x,P,w,v,m,i,y,b);A.push(r);r=fixColumeStackData(r,w,y.length,i,m,v,y);for(let e=0;e<r.length;e++){let t=r[e];if(t!==null&&e>C&&e<D){T.beginPath();var s=t.color||a.color;var n=t.x-t.width/2+1;var l=v.height-t.y-v.area[2];var u=v.height-t.y0-v.area[2];if(i>0){l-=u}T.setFillStyle(s);T.moveTo(n,t.y);T.fillRect(n,t.y,t.width,l);T.closePath();T.fill()}};break;case"meter":var r=getDataPoints(f,o,x,P,w,v,m,b);A.push(r);r=fixColumeMeterData(r,w,y.length,i,m,v,S.meterBorder);for(let t=0;t<r.length;t++){let o=r[t];if(o!==null&&t>C&&t<D){T.beginPath();if(i==0&&S.meterBorder>0){T.setStrokeStyle(a.color);T.setLineWidth(S.meterBorder*v.pix)}if(i==0){T.setFillStyle(S.meterFillColor)}else{T.setFillStyle(o.color||a.color)}var n=o.x-o.width/2;var l=v.height-o.y-v.area[2];if(S.barBorderRadius&&S.barBorderRadius.length===4||S.barBorderCircle===true){const h=n;const c=o.y;const d=o.width;const l=v.height-v.area[2]-o.y;if(S.barBorderCircle){S.barBorderRadius=[d/2,d/2,0,0]}let[t,e,a,i]=S.barBorderRadius;let r=Math.min(d/2,l/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);T.arc(h+d-e,c+e,e,-Math.PI/2,0);T.arc(h+d-a,c+l-a,a,0,Math.PI/2);T.arc(h+i,c+l-i,i,Math.PI/2,Math.PI);T.fill()}else{T.moveTo(n,o.y);T.lineTo(n+o.width,o.y);T.lineTo(n+o.width,v.height-v.area[2]);T.lineTo(n,v.height-v.area[2]);T.lineTo(n,o.y);T.fill()}if(i==0&&S.meterBorder>0){T.closePath();T.stroke()}}}break}});if(v.dataLabel!==false&&b===1){y.forEach(function(t,e){let a,i,r;a=[].concat(v.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;switch(S.type){case"group":var n=getDataPoints(o,i,r,P,w,v,m,b);n=fixColumeData(n,w,y.length,e,m,v);drawPointText(n,t,m,T,v);break;case"stack":var n=getStackDataPoints(o,i,r,P,w,v,m,e,y,b);drawPointText(n,t,m,T,v);break;case"meter":var n=getDataPoints(o,i,r,P,w,v,m,b);drawPointText(n,t,m,T,v);break}})}T.restore();return{xAxisPoints:P,calPoints:A,eachSpacing:w}}function drawMountDataPoints(i,n,o,l){let f=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let t=n.chartData.xAxisData,p=t.xAxisPoints,r=t.eachSpacing;let s=assign({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:false,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},n.extra.mount);s.widthRatio=s.widthRatio<=0?0:s.widthRatio;s.widthRatio=s.widthRatio>=2?2:s.widthRatio;let e=[];l.save();let a=-2;let g=p.length+2;if(n._scrollDistance_&&n._scrollDistance_!==0&&n.enableScroll===true){l.translate(n._scrollDistance_,0);a=Math.floor(-n._scrollDistance_/r)-2;g=a+n.xAxis.itemCount+4}s.customColor=fillCustomColor(s.linearType,s.customColor,i,o);let u,y,v;u=[].concat(n.chartData.yAxisData.ranges[0]);y=u.pop();v=u.shift();var h=getMountDataPoints(i,y,v,p,r,n,s,f);switch(s.type){case"bar":for(let t=0;t<h.length;t++){let o=h[t];if(o!==null&&t>a&&t<g){var c=o.x-r*s.widthRatio/2;var m=n.height-o.y-n.area[2];l.beginPath();var d=o.color||i[t].color;var T=o.color||i[t].color;if(s.linearType!=="none"){var x=l.createLinearGradient(c,o.y,c,n.height-n.area[2]);if(s.linearType=="opacity"){x.addColorStop(0,hexToRgb(d,s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}else{x.addColorStop(0,hexToRgb(s.customColor[i[t].linearIndex],s.linearOpacity));x.addColorStop(s.colorStop,hexToRgb(s.customColor[i[t].linearIndex],s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}d=x}if(s.barBorderRadius&&s.barBorderRadius.length===4||s.barBorderCircle===true){const b=c;const P=o.y;const w=o.width;const m=n.height-n.area[2]-o.y-s.borderWidth*n.pix/2;if(s.barBorderCircle){s.barBorderRadius=[w/2,w/2,0,0]}let[t,e,a,i]=s.barBorderRadius;let r=Math.min(w/2,m/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;l.arc(b+t,P+t,t,-Math.PI,-Math.PI/2);l.arc(b+w-e,P+e,e,-Math.PI/2,0);l.arc(b+w-a,P+m-a,a,0,Math.PI/2);l.arc(b+i,P+m-i,i,Math.PI/2,Math.PI)}else{l.moveTo(c,o.y);l.lineTo(c+o.width,o.y);l.lineTo(c+o.width,n.height-n.area[2]);l.lineTo(c,n.height-n.area[2]);l.lineTo(c,o.y)}l.setStrokeStyle(T);l.setFillStyle(d);if(s.borderWidth>0){l.setLineWidth(s.borderWidth*n.pix);l.closePath();l.stroke()}l.fill()}};break;case"triangle":for(let e=0;e<h.length;e++){let t=h[e];if(t!==null&&e>a&&e<g){var c=t.x-r*s.widthRatio/2;var m=n.height-t.y-n.area[2];l.beginPath();var d=t.color||i[e].color;var T=t.color||i[e].color;if(s.linearType!=="none"){var x=l.createLinearGradient(c,t.y,c,n.height-n.area[2]);if(s.linearType=="opacity"){x.addColorStop(0,hexToRgb(d,s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}else{x.addColorStop(0,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(s.colorStop,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}d=x}l.moveTo(c,n.height-n.area[2]);l.lineTo(t.x,t.y);l.lineTo(c+t.width,n.height-n.area[2]);l.setStrokeStyle(T);l.setFillStyle(d);if(s.borderWidth>0){l.setLineWidth(s.borderWidth*n.pix);l.stroke()}l.fill()}};break;case"mount":for(let e=0;e<h.length;e++){let t=h[e];if(t!==null&&e>a&&e<g){var c=t.x-r*s.widthRatio/2;var m=n.height-t.y-n.area[2];l.beginPath();var d=t.color||i[e].color;var T=t.color||i[e].color;if(s.linearType!=="none"){var x=l.createLinearGradient(c,t.y,c,n.height-n.area[2]);if(s.linearType=="opacity"){x.addColorStop(0,hexToRgb(d,s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}else{x.addColorStop(0,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(s.colorStop,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}d=x}l.moveTo(c,n.height-n.area[2]);l.bezierCurveTo(t.x-t.width/4,n.height-n.area[2],t.x-t.width/4,t.y,t.x,t.y);l.bezierCurveTo(t.x+t.width/4,t.y,t.x+t.width/4,n.height-n.area[2],c+t.width,n.height-n.area[2]);l.setStrokeStyle(T);l.setFillStyle(d);if(s.borderWidth>0){l.setLineWidth(s.borderWidth*n.pix);l.stroke()}l.fill()}};break;case"sharp":for(let e=0;e<h.length;e++){let t=h[e];if(t!==null&&e>a&&e<g){var c=t.x-r*s.widthRatio/2;var m=n.height-t.y-n.area[2];l.beginPath();var d=t.color||i[e].color;var T=t.color||i[e].color;if(s.linearType!=="none"){var x=l.createLinearGradient(c,t.y,c,n.height-n.area[2]);if(s.linearType=="opacity"){x.addColorStop(0,hexToRgb(d,s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}else{x.addColorStop(0,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(s.colorStop,hexToRgb(s.customColor[i[e].linearIndex],s.linearOpacity));x.addColorStop(1,hexToRgb(d,1))}d=x}l.moveTo(c,n.height-n.area[2]);l.quadraticCurveTo(t.x-0,n.height-n.area[2]-m/4,t.x,t.y);l.quadraticCurveTo(t.x+0,n.height-n.area[2]-m/4,c+t.width,n.height-n.area[2]);l.setStrokeStyle(T);l.setFillStyle(d);if(s.borderWidth>0){l.setLineWidth(s.borderWidth*n.pix);l.stroke()}l.fill()}};break}if(n.dataLabel!==false&&f===1){let t,e,a;t=[].concat(n.chartData.yAxisData.ranges[0]);e=t.pop();a=t.shift();var h=getMountDataPoints(i,e,a,p,r,n,s,f);drawMountPointText(h,i,o,l,n)}l.restore();return{xAxisPoints:p,calPoints:h,eachSpacing:r}}function drawBarDataPoints(y,v,m,T){let b=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let P=[];let w=(v.height-v.area[0]-v.area[2])/v.categories.length;for(let t=0;t<v.categories.length;t++){P.push(v.area[0]+w/2+w*t)}let S=assign({},{type:"group",width:w/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:false,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},v.extra.bar);let A=[];T.save();let C=-2;let D=P.length+2;if(v.tooltip&&v.tooltip.textList&&v.tooltip.textList.length&&b===1){drawBarToolTipSplitArea(v.tooltip.offset.y,v,m,T,w)}S.customColor=fillCustomColor(S.linearType,S.customColor,y,m);y.forEach(function(a,t){let o,e,d;o=[].concat(v.chartData.xAxisData.ranges);d=o.pop();e=o.shift();var x=a.data;switch(S.type){case"group":var i=getBarDataPoints(x,e,d,P,w,v,m,b);var f=getBarStackDataPoints(x,e,d,P,w,v,m,t,y,b);A.push(f);i=fixBarData(i,w,y.length,t,m,v);for(let t=0;t<i.length;t++){let o=i[t];if(o!==null&&t>C&&t<D){var n=v.area[3];var r=o.y-o.width/2;var p=o.height;T.beginPath();var l=o.color||a.color;var g=o.color||a.color;if(S.linearType!=="none"){var s=T.createLinearGradient(n,o.y,o.x,o.y);if(S.linearType=="opacity"){s.addColorStop(0,hexToRgb(l,S.linearOpacity));s.addColorStop(1,hexToRgb(l,1))}else{s.addColorStop(0,hexToRgb(S.customColor[a.linearIndex],S.linearOpacity));s.addColorStop(S.colorStop,hexToRgb(S.customColor[a.linearIndex],S.linearOpacity));s.addColorStop(1,hexToRgb(l,1))}l=s}if(S.barBorderRadius&&S.barBorderRadius.length===4||S.barBorderCircle===true){const u=n;const h=o.width;const c=o.y-o.width/2;const p=o.height;if(S.barBorderCircle){S.barBorderRadius=[h/2,h/2,0,0]}let[t,e,a,i]=S.barBorderRadius;let r=Math.min(h/2,p/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(u+i,c+i,i,-Math.PI,-Math.PI/2);T.arc(o.x-t,c+t,t,-Math.PI/2,0);T.arc(o.x-e,c+h-e,e,0,Math.PI/2);T.arc(u+a,c+h-a,a,Math.PI/2,Math.PI)}else{T.moveTo(n,r);T.lineTo(o.x,r);T.lineTo(o.x,r+o.width);T.lineTo(n,r+o.width);T.lineTo(n,r);T.setLineWidth(1);T.setStrokeStyle(g)}T.setFillStyle(l);T.closePath();T.fill()}};break;case"stack":var i=getBarStackDataPoints(x,e,d,P,w,v,m,t,y,b);A.push(i);i=fixBarStackData(i,w,y.length,t,m,v,y);for(let e=0;e<i.length;e++){let t=i[e];if(t!==null&&e>C&&e<D){T.beginPath();var l=t.color||a.color;var n=t.x0;T.setFillStyle(l);T.moveTo(n,t.y-t.width/2);T.fillRect(n,t.y-t.width/2,t.height,t.width);T.closePath();T.fill()}};break}});if(v.dataLabel!==false&&b===1){y.forEach(function(t,e){let a,i,r;a=[].concat(v.chartData.xAxisData.ranges);r=a.pop();i=a.shift();var o=t.data;switch(S.type){case"group":var n=getBarDataPoints(o,i,r,P,w,v,m,b);n=fixBarData(n,w,y.length,e,m,v);drawBarPointText(n,t,m,T,v);break;case"stack":var n=getBarStackDataPoints(o,i,r,P,w,v,m,e,y,b);drawBarPointText(n,t,m,T,v);break}})}return{yAxisPoints:P,calPoints:A,eachSpacing:w}}function drawCandleDataPoints(e,t,h,c,d){var u=arguments.length>5&&arguments[5]!==undefined?arguments[5]:1;var s=assign({},{color:{},average:{}},h.extra.candle);s.color=assign({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},s.color);s.average=assign({},{show:false,name:[],day:[],color:c.color},s.average);h.extra.candle=s;let a=h.chartData.xAxisData,x=a.xAxisPoints,f=a.eachSpacing;let y=[];d.save();let p=-2;let v=x.length+2;let g=0;let m=h.width+f;if(h._scrollDistance_&&h._scrollDistance_!==0&&h.enableScroll===true){d.translate(h._scrollDistance_,0);p=Math.floor(-h._scrollDistance_/f)-2;v=p+h.xAxis.itemCount+4;g=-h._scrollDistance_-f*2+h.area[3];m=g+(h.xAxis.itemCount+4)*f}if(s.average.show||t){t.forEach(function(e,t){let a,i,r;a=[].concat(h.chartData.yAxisData.ranges[e.index]);i=a.pop();r=a.shift();var o=e.data;var n=getDataPoints(o,i,r,x,f,h,c,u);var l=splitPoints(n,e);for(let t=0;t<l.length;t++){let i=l[t];d.beginPath();d.setStrokeStyle(e.color);d.setLineWidth(1);if(i.length===1){d.moveTo(i[0].x,i[0].y);d.arc(i[0].x,i[0].y,1,0,2*Math.PI)}else{d.moveTo(i[0].x,i[0].y);let a=0;for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>g){d.moveTo(t.x,t.y);a=1}if(e>0&&t.x>g&&t.x<m){var s=createCurveControlPoints(i,e-1);d.bezierCurveTo(s.ctrA.x,s.ctrA.y,s.ctrB.x,s.ctrB.y,t.x,t.y)}}d.moveTo(i[0].x,i[0].y)}d.closePath();d.stroke()}})}e.forEach(function(t,e){let a,i,r;a=[].concat(h.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getCandleDataPoints(o,i,r,x,f,h,c,u);y.push(n);var l=splitPoints(n,t);for(let e=0;e<l[0].length;e++){if(e>p&&e<v){let t=l[0][e];d.beginPath();if(o[e][1]-o[e][0]>0){d.setStrokeStyle(s.color.upLine);d.setFillStyle(s.color.upFill);d.setLineWidth(1*h.pix);d.moveTo(t[3].x,t[3].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[1].x-f/4,t[1].y);d.lineTo(t[0].x-f/4,t[0].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[2].x,t[2].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[0].x+f/4,t[0].y);d.lineTo(t[1].x+f/4,t[1].y);d.lineTo(t[1].x,t[1].y);d.moveTo(t[3].x,t[3].y)}else{d.setStrokeStyle(s.color.downLine);d.setFillStyle(s.color.downFill);d.setLineWidth(1*h.pix);d.moveTo(t[3].x,t[3].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[0].x-f/4,t[0].y);d.lineTo(t[1].x-f/4,t[1].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[2].x,t[2].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[1].x+f/4,t[1].y);d.lineTo(t[0].x+f/4,t[0].y);d.lineTo(t[0].x,t[0].y);d.moveTo(t[3].x,t[3].y)}d.closePath();d.fill();d.stroke()}}});d.restore();return{xAxisPoints:x,calPoints:y,eachSpacing:f}}function drawAreaDataPoints(t,s,h,c){var d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var x=assign({},{type:"straight",opacity:.2,addLine:false,width:2,gradient:false},s.extra.area);let e=s.chartData.xAxisData,y=e.xAxisPoints,f=e.eachSpacing;let p=s.height-s.area[2];let v=[];c.save();let g=0;let u=s.width+f;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);g=-s._scrollDistance_-f*2+s.area[3];u=g+(s.xAxis.itemCount+4)*f}t.forEach(function(e,t){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[e.index]);i=a.pop();r=a.shift();let o=e.data;let n=getDataPoints(o,i,r,y,f,s,h,d);v.push(n);let l=splitPoints(n,e);for(let t=0;t<l.length;t++){let r=l[t];c.beginPath();c.setStrokeStyle(hexToRgb(e.color,x.opacity));if(x.gradient){let t=c.createLinearGradient(0,s.area[0],0,s.height-s.area[2]);t.addColorStop("0",hexToRgb(e.color,x.opacity));t.addColorStop("1.0",hexToRgb("#FFFFFF",.1));c.setFillStyle(t)}else{c.setFillStyle(hexToRgb(e.color,x.opacity))}c.setLineWidth(x.width*s.pix);if(r.length>1){let t=r[0];let e=r[r.length-1];c.moveTo(t.x,t.y);let i=0;if(x.type==="curve"){for(let a=0;a<r.length;a++){let e=r[a];if(i==0&&e.x>g){c.moveTo(e.x,e.y);i=1}if(a>0&&e.x>g&&e.x<u){let t=createCurveControlPoints(r,a-1);c.bezierCurveTo(t.ctrA.x,t.ctrA.y,t.ctrB.x,t.ctrB.y,e.x,e.y)}}}if(x.type==="straight"){for(let e=0;e<r.length;e++){let t=r[e];if(i==0&&t.x>g){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,t.y)}}}if(x.type==="step"){for(let e=0;e<r.length;e++){let t=r[e];if(i==0&&t.x>g){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,r[e-1].y);c.lineTo(t.x,t.y)}}}c.lineTo(e.x,p);c.lineTo(t.x,p);c.lineTo(t.x,t.y)}else{let t=r[0];c.moveTo(t.x-f/2,t.y);c.lineTo(t.x+f/2,t.y);c.lineTo(t.x+f/2,p);c.lineTo(t.x-f/2,p);c.moveTo(t.x-f/2,t.y)}c.closePath();c.fill();if(x.addLine){if(e.lineType=="dash"){let t=e.dashLength?e.dashLength:8;t*=s.pix;c.setLineDash([t,t])}c.beginPath();c.setStrokeStyle(e.color);c.setLineWidth(x.width*s.pix);if(r.length===1){c.moveTo(r[0].x,r[0].y);c.arc(r[0].x,r[0].y,1,0,2*Math.PI)}else{c.moveTo(r[0].x,r[0].y);let i=0;if(x.type==="curve"){for(let a=0;a<r.length;a++){let e=r[a];if(i==0&&e.x>g){c.moveTo(e.x,e.y);i=1}if(a>0&&e.x>g&&e.x<u){let t=createCurveControlPoints(r,a-1);c.bezierCurveTo(t.ctrA.x,t.ctrA.y,t.ctrB.x,t.ctrB.y,e.x,e.y)}}}if(x.type==="straight"){for(let e=0;e<r.length;e++){let t=r[e];if(i==0&&t.x>g){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,t.y)}}}if(x.type==="step"){for(let e=0;e<r.length;e++){let t=r[e];if(i==0&&t.x>g){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,r[e-1].y);c.lineTo(t.x,t.y)}}}c.moveTo(r[0].x,r[0].y)}c.stroke();c.setLineDash([])}}if(s.dataPointShape!==false){drawPointShape(n,e.color,e.pointShape,c,s)}});if(s.dataLabel!==false&&d===1){t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,y,f,s,h,d);drawPointText(n,t,h,c,s)})}c.restore();return{xAxisPoints:y,calPoints:v,eachSpacing:f}}function drawScatterDataPoints(t,s,h,c){var d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var i=assign({},{type:"circle"},s.extra.scatter);let e=s.chartData.xAxisData,x=e.xAxisPoints,f=e.eachSpacing;var r=[];c.save();let a=0;let o=s.width+f;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);a=-s._scrollDistance_-f*2+s.area[3];o=a+(s.xAxis.itemCount+4)*f}t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,x,f,s,h,d);c.beginPath();c.setStrokeStyle(t.color);c.setFillStyle(t.color);c.setLineWidth(1*s.pix);var l=t.pointShape;if(l==="diamond"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x,t.y-4.5);c.lineTo(t.x-4.5,t.y);c.lineTo(t.x,t.y+4.5);c.lineTo(t.x+4.5,t.y);c.lineTo(t.x,t.y-4.5)}})}else if(l==="circle"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x+2.5*s.pix,t.y);c.arc(t.x,t.y,3*s.pix,0,2*Math.PI,false)}})}else if(l==="square"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x-3.5,t.y-3.5);c.rect(t.x-3.5,t.y-3.5,7,7)}})}else if(l==="triangle"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x,t.y-4.5);c.lineTo(t.x-4.5,t.y+4.5);c.lineTo(t.x+4.5,t.y+4.5);c.lineTo(t.x,t.y-4.5)}})}else if(l==="triangle"){return}c.closePath();c.fill();c.stroke()});if(s.dataLabel!==false&&d===1){t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,x,f,s,h,d);drawPointText(n,t,h,c,s)})}c.restore();return{xAxisPoints:x,calPoints:r,eachSpacing:f}}function drawBubbleDataPoints(l,s,h,c){var d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var x=assign({},{opacity:1,border:2},s.extra.bubble);let t=s.chartData.xAxisData,f=t.xAxisPoints,p=t.eachSpacing;var e=[];c.save();let a=0;let i=s.width+p;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);a=-s._scrollDistance_-p*2+s.area[3];i=a+(s.xAxis.itemCount+4)*p}l.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,f,p,s,h,d);c.beginPath();c.setStrokeStyle(t.color);c.setLineWidth(x.border*s.pix);c.setFillStyle(hexToRgb(t.color,x.opacity));n.forEach(function(t,e){c.moveTo(t.x+t.r,t.y);c.arc(t.x,t.y,t.r*s.pix,0,2*Math.PI,false)});c.closePath();c.fill();c.stroke();if(s.dataLabel!==false&&d===1){n.forEach(function(t,e){c.beginPath();var a=l.textSize*s.pix||h.fontSize;c.setFontSize(a);c.setFillStyle(l.textColor||"#FFFFFF");c.setTextAlign("center");c.fillText(String(t.t),t.x,t.y+a/2);c.closePath();c.stroke();c.setTextAlign("left")})}});c.restore();return{xAxisPoints:f,calPoints:e,eachSpacing:p}}function drawLineDataPoints(t,s,h,c){var d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var x=assign({},{type:"straight",width:2},s.extra.line);x.width*=s.pix;let e=s.chartData.xAxisData,f=e.xAxisPoints,p=e.eachSpacing;var y=[];c.save();let g=0;let u=s.width+p;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);g=-s._scrollDistance_-p*2+s.area[3];u=g+(s.xAxis.itemCount+4)*p}t.forEach(function(e,t){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[e.index]);i=a.pop();r=a.shift();var o=e.data;var n=getDataPoints(o,i,r,f,p,s,h,d);y.push(n);var l=splitPoints(n,e);if(e.lineType=="dash"){let t=e.dashLength?e.dashLength:8;t*=s.pix;c.setLineDash([t,t])}c.beginPath();c.setStrokeStyle(e.color);c.setLineWidth(x.width);l.forEach(function(i,t){if(i.length===1){c.moveTo(i[0].x,i[0].y);c.arc(i[0].x,i[0].y,1,0,2*Math.PI)}else{c.moveTo(i[0].x,i[0].y);let a=0;if(x.type==="curve"){for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>g){c.moveTo(t.x,t.y);a=1}if(e>0&&t.x>g&&t.x<u){var r=createCurveControlPoints(i,e-1);c.bezierCurveTo(r.ctrA.x,r.ctrA.y,r.ctrB.x,r.ctrB.y,t.x,t.y)}}}if(x.type==="straight"){for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>g){c.moveTo(t.x,t.y);a=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,t.y)}}}if(x.type==="step"){for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>g){c.moveTo(t.x,t.y);a=1}if(e>0&&t.x>g&&t.x<u){c.lineTo(t.x,i[e-1].y);c.lineTo(t.x,t.y)}}}c.moveTo(i[0].x,i[0].y)}});c.stroke();c.setLineDash([]);if(s.dataPointShape!==false){drawPointShape(n,e.color,e.pointShape,c,s)}});if(s.dataLabel!==false&&d===1){t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,f,p,s,h,d);drawPointText(n,t,h,c,s)})}c.restore();return{xAxisPoints:f,calPoints:y,eachSpacing:p}}function drawMixDataPoints(t,v,m,T){let D=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let e=v.chartData.xAxisData,b=e.xAxisPoints,P=e.eachSpacing;let w=assign({},{width:P/2,barBorderCircle:false,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},v.extra.mix.column);let S=assign({},{opacity:.2,gradient:false},v.extra.mix.area);let M=v.height-v.area[2];let L=[];var _=0;var F=0;t.forEach(function(t,e){if(t.type=="column"){F+=1}});T.save();let k=-2;let R=b.length+2;let A=0;let C=v.width+P;if(v._scrollDistance_&&v._scrollDistance_!==0&&v.enableScroll===true){T.translate(v._scrollDistance_,0);k=Math.floor(-v._scrollDistance_/P)-2;R=k+v.xAxis.itemCount+4;A=-v._scrollDistance_-P*2+v.area[3];C=A+(v.xAxis.itemCount+4)*P}w.customColor=fillCustomColor(w.linearType,w.customColor,t,m);t.forEach(function(n,t){let o,x,f;o=[].concat(v.chartData.yAxisData.ranges[n.index]);x=o.pop();f=o.shift();var p=n.data;var a=getDataPoints(p,x,f,b,P,v,m,D);L.push(a);if(n.type=="column"){a=fixColumeData(a,P,F,_,m,v);for(let t=0;t<a.length;t++){let o=a[t];if(o!==null&&t>k&&t<R){var l=o.x-o.width/2;var s=v.height-o.y-v.area[2];T.beginPath();var e=o.color||n.color;var g=o.color||n.color;if(w.linearType!=="none"){var i=T.createLinearGradient(l,o.y,l,v.height-v.area[2]);if(w.linearType=="opacity"){i.addColorStop(0,hexToRgb(e,w.linearOpacity));i.addColorStop(1,hexToRgb(e,1))}else{i.addColorStop(0,hexToRgb(w.customColor[n.linearIndex],w.linearOpacity));i.addColorStop(w.colorStop,hexToRgb(w.customColor[n.linearIndex],w.linearOpacity));i.addColorStop(1,hexToRgb(e,1))}e=i}if(w.barBorderRadius&&w.barBorderRadius.length===4||w.barBorderCircle){const h=l;const c=o.y;const d=o.width;const s=v.height-v.area[2]-o.y;if(w.barBorderCircle){w.barBorderRadius=[d/2,d/2,0,0]}let[t,e,a,i]=w.barBorderRadius;let r=Math.min(d/2,s/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);T.arc(h+d-e,c+e,e,-Math.PI/2,0);T.arc(h+d-a,c+s-a,a,0,Math.PI/2);T.arc(h+i,c+s-i,i,Math.PI/2,Math.PI)}else{T.moveTo(l,o.y);T.lineTo(l+o.width,o.y);T.lineTo(l+o.width,v.height-v.area[2]);T.lineTo(l,v.height-v.area[2]);T.lineTo(l,o.y);T.setLineWidth(1);T.setStrokeStyle(g)}T.setFillStyle(e);T.closePath();T.fill()}}_+=1}if(n.type=="area"){let e=splitPoints(a,n);for(let t=0;t<e.length;t++){let i=e[t];T.beginPath();T.setStrokeStyle(n.color);T.setStrokeStyle(hexToRgb(n.color,S.opacity));if(S.gradient){let t=T.createLinearGradient(0,v.area[0],0,v.height-v.area[2]);t.addColorStop("0",hexToRgb(n.color,S.opacity));t.addColorStop("1.0",hexToRgb("#FFFFFF",.1));T.setFillStyle(t)}else{T.setFillStyle(hexToRgb(n.color,S.opacity))}T.setLineWidth(2*v.pix);if(i.length>1){var r=i[0];let t=i[i.length-1];T.moveTo(r.x,r.y);let a=0;if(n.style==="curve"){for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>A){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>A&&t.x<C){var u=createCurveControlPoints(i,e-1);T.bezierCurveTo(u.ctrA.x,u.ctrA.y,u.ctrB.x,u.ctrB.y,t.x,t.y)}}}else{for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>A){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>A&&t.x<C){T.lineTo(t.x,t.y)}}}T.lineTo(t.x,M);T.lineTo(r.x,M);T.lineTo(r.x,r.y)}else{let t=i[0];T.moveTo(t.x-P/2,t.y);T.lineTo(t.x+P/2,t.y);T.lineTo(t.x+P/2,M);T.lineTo(t.x-P/2,M);T.moveTo(t.x-P/2,t.y)}T.closePath();T.fill()}}if(n.type=="line"){var y=splitPoints(a,n);y.forEach(function(i,t){if(n.lineType=="dash"){let t=n.dashLength?n.dashLength:8;t*=v.pix;T.setLineDash([t,t])}T.beginPath();T.setStrokeStyle(n.color);T.setLineWidth(2*v.pix);if(i.length===1){T.moveTo(i[0].x,i[0].y);T.arc(i[0].x,i[0].y,1,0,2*Math.PI)}else{T.moveTo(i[0].x,i[0].y);let a=0;if(n.style=="curve"){for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>A){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>A&&t.x<C){var r=createCurveControlPoints(i,e-1);T.bezierCurveTo(r.ctrA.x,r.ctrA.y,r.ctrB.x,r.ctrB.y,t.x,t.y)}}}else{for(let e=0;e<i.length;e++){let t=i[e];if(a==0&&t.x>A){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>A&&t.x<C){T.lineTo(t.x,t.y)}}}T.moveTo(i[0].x,i[0].y)}T.stroke();T.setLineDash([])})}if(n.type=="point"){n.addPoint=true}if(n.addPoint==true&&n.type!=="column"){drawPointShape(a,n.color,n.pointShape,T,v)}});if(v.dataLabel!==false&&D===1){var _=0;t.forEach(function(t,e){let a,i,r;a=[].concat(v.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,b,P,v,m,D);if(t.type!=="column"){drawPointText(n,t,m,T,v)}else{n=fixColumeData(n,P,F,_,m,v);drawPointText(n,t,m,T,v);_+=1}})}T.restore();return{xAxisPoints:b,calPoints:L,eachSpacing:P}}function drawToolTipBridge(t,e,a,i,r,o){var n=t.extra.tooltip||{};if(n.horizentalLine&&t.tooltip&&i===1&&(t.type=="line"||t.type=="area"||t.type=="column"||t.type=="mount"||t.type=="candle"||t.type=="mix")){drawToolTipHorizentalLine(t,e,a,r,o)}a.save();if(t._scrollDistance_&&t._scrollDistance_!==0&&t.enableScroll===true){a.translate(t._scrollDistance_,0)}if(t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&i===1){drawToolTip(t.tooltip.textList,t.tooltip.offset,t,e,a,r,o)}a.restore()}function drawXAxis(r,l,s,h){let t=l.chartData.xAxisData,c=t.xAxisPoints,e=t.startX,a=t.endX,d=t.eachSpacing;var p="center";if(l.type=="bar"||l.type=="line"||l.type=="area"||l.type=="scatter"||l.type=="bubble"){p=l.xAxis.boundaryGap}var x=l.height-l.area[2];var i=l.area[0];if(l.enableScroll&&l.xAxis.scrollShow){var o=l.height-l.area[2]+s.xAxisHeight;var n=a-e;var g=d*(c.length-1);if(l.type=="mount"&&l.extra&&l.extra.mount&&l.extra.mount.widthRatio&&l.extra.mount.widthRatio>1){if(l.extra.mount.widthRatio>2)l.extra.mount.widthRatio=2;g+=(l.extra.mount.widthRatio-1)*d}var u=n*n/g;var y=0;if(l._scrollDistance_){y=-l._scrollDistance_*n/g}h.beginPath();h.setLineCap("round");h.setLineWidth(6*l.pix);h.setStrokeStyle(l.xAxis.scrollBackgroundColor||"#EFEBEF");h.moveTo(e,o);h.lineTo(a,o);h.stroke();h.closePath();h.beginPath();h.setLineCap("round");h.setLineWidth(6*l.pix);h.setStrokeStyle(l.xAxis.scrollColor||"#A6A6A6");h.moveTo(e+y,o);h.lineTo(e+y+u,o);h.stroke();h.closePath();h.setLineCap("butt")}h.save();if(l._scrollDistance_&&l._scrollDistance_!==0){h.translate(l._scrollDistance_,0)}if(l.xAxis.calibration===true){h.setStrokeStyle(l.xAxis.gridColor||"#cccccc");h.setLineCap("butt");h.setLineWidth(1*l.pix);c.forEach(function(t,e){if(e>0){h.beginPath();h.moveTo(t-d/2,x);h.lineTo(t-d/2,x+3*l.pix);h.closePath();h.stroke()}})}if(l.xAxis.disableGrid!==true){h.setStrokeStyle(l.xAxis.gridColor||"#cccccc");h.setLineCap("butt");h.setLineWidth(1*l.pix);if(l.xAxis.gridType=="dash"){h.setLineDash([l.xAxis.dashLength*l.pix,l.xAxis.dashLength*l.pix])}l.xAxis.gridEval=l.xAxis.gridEval||1;c.forEach(function(t,e){if(e%l.xAxis.gridEval==0){h.beginPath();h.moveTo(t,x);h.lineTo(t,i);h.stroke()}});h.setLineDash([])}if(l.xAxis.disabled!==true){let t=r.length;if(l.xAxis.labelCount){if(l.xAxis.itemCount){t=Math.ceil(r.length/l.xAxis.itemCount*l.xAxis.labelCount)}else{t=l.xAxis.labelCount}t-=1}let e=Math.ceil(r.length/t);let a=[];let i=r.length;for(let t=0;t<i;t++){if(t%e!==0){a.push("")}else{a.push(r[t])}}a[i-1]=r[i-1];var f=l.xAxis.fontSize*l.pix||s.fontSize;if(s._xAxisTextAngle_===0){a.forEach(function(t,e){var a=l.xAxis.formatter?l.xAxis.formatter(t,e,l):t;var i=-measureText(String(a),f,h)/2;if(p=="center"){i+=d/2}var r=0;if(l.xAxis.scrollShow){r=6*l.pix}h.beginPath();h.setFontSize(f);h.setFillStyle(l.xAxis.fontColor||l.fontColor);h.fillText(String(a),c[e]+i,x+f+(s.xAxisHeight-r-f)/2);h.closePath();h.stroke()})}else{a.forEach(function(t,e){var a=l.xAxis.formatter?l.xAxis.formatter(t):t;h.save();h.beginPath();h.setFontSize(f);h.setFillStyle(l.xAxis.fontColor||l.fontColor);var i=measureText(String(a),f,h);var r=c[e];if(p=="center"){r=c[e]+d/2}var o=0;if(l.xAxis.scrollShow){o=6*l.pix}var n=x+6*l.pix+f-f*Math.abs(Math.sin(s._xAxisTextAngle_));if(l.xAxis.rotateAngle<0){r-=f/2;i=0}else{r+=f/2;i=-i}h.translate(r,n);h.rotate(-1*s._xAxisTextAngle_);h.fillText(String(a),i,0);h.closePath();h.stroke();h.restore()})}}h.restore();if(l.xAxis.axisLine){h.beginPath();h.setStrokeStyle(l.xAxis.axisLineColor);h.setLineWidth(1*l.pix);h.moveTo(e,l.height-l.area[2]);h.lineTo(a,l.height-l.area[2]);h.stroke()}}function drawYAxisGrid(c,e,d,a){if(e.yAxis.disableGrid===true){return}let t=e.height-e.area[0]-e.area[2];let i=t/e.yAxis.splitNumber;let r=e.area[3];let o=e.chartData.xAxisData.xAxisPoints,n=e.chartData.xAxisData.eachSpacing;let l=n*(o.length-1);if(e.type=="mount"&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1){if(e.extra.mount.widthRatio>2)e.extra.mount.widthRatio=2;l+=(e.extra.mount.widthRatio-1)*n}let x=r+l;let s=[];let h=1;if(e.xAxis.axisLine===false){h=0}for(let t=h;t<e.yAxis.splitNumber+1;t++){s.push(e.height-e.area[2]-i*t)}a.save();if(e._scrollDistance_&&e._scrollDistance_!==0){a.translate(e._scrollDistance_,0)}if(e.yAxis.gridType=="dash"){a.setLineDash([e.yAxis.dashLength*e.pix,e.yAxis.dashLength*e.pix])}a.setStrokeStyle(e.yAxis.gridColor);a.setLineWidth(1*e.pix);s.forEach(function(t,e){a.beginPath();a.moveTo(r,t);a.lineTo(x,t);a.stroke()});a.setLineDash([]);a.restore()}function drawYAxis(e,h,a,c){if(h.yAxis.disabled===true){return}var i=h.height-h.area[0]-h.area[2];var r=i/h.yAxis.splitNumber;var o=h.area[3];var n=h.width-h.area[1];var l=h.height-h.area[2];var t=l+a.xAxisHeight;if(h.xAxis.scrollShow){t-=3*h.pix}if(h.xAxis.rotateLabel){t=h.height-h.area[2]+h.fontSize*h.pix/2}c.beginPath();c.setFillStyle(h.background);if(h.enableScroll==true&&h.xAxis.scrollPosition&&h.xAxis.scrollPosition!=="left"){c.fillRect(0,0,o,t)}if(h.enableScroll==true&&h.xAxis.scrollPosition&&h.xAxis.scrollPosition!=="right"){c.fillRect(n,0,h.width,t)}c.closePath();c.stroke();let d=h.area[3];let x=h.width-h.area[1];let f=h.area[3]+(h.width-h.area[1]-h.area[3])/2;if(h.yAxis.data){for(let e=0;e<h.yAxis.data.length;e++){let s=h.yAxis.data[e];var p=[];if(s.type==="categories"){for(let t=0;t<=s.categories.length;t++){p.push(h.area[0]+i/s.categories.length/2+i/s.categories.length*t)}}else{for(let t=0;t<=h.yAxis.splitNumber;t++){p.push(h.area[0]+r*t)}}if(s.disabled!==true){let t=h.chartData.yAxisData.rangesFormat[e];let o=s.fontSize?s.fontSize*h.pix:a.fontSize;let n=h.chartData.yAxisData.yAxisWidth[e];let l=s.textAlign||"right";t.forEach(function(t,e){var a=p[e];c.beginPath();c.setFontSize(o);c.setLineWidth(1*h.pix);c.setStrokeStyle(s.axisLineColor||"#cccccc");c.setFillStyle(s.fontColor||h.fontColor);let i=0;let r=4*h.pix;if(n.position=="left"){if(s.calibration==true){c.moveTo(d,a);c.lineTo(d-3*h.pix,a);r+=3*h.pix}switch(l){case"left":c.setTextAlign("left");i=d-n.width;break;case"right":c.setTextAlign("right");i=d-r;break;default:c.setTextAlign("center");i=d-n.width/2}c.fillText(String(t),i,a+o/2-3*h.pix)}else if(n.position=="right"){if(s.calibration==true){c.moveTo(x,a);c.lineTo(x+3*h.pix,a);r+=3*h.pix}switch(l){case"left":c.setTextAlign("left");i=x+r;break;case"right":c.setTextAlign("right");i=x+n.width;break;default:c.setTextAlign("center");i=x+n.width/2}c.fillText(String(t),i,a+o/2-3*h.pix)}else if(n.position=="center"){if(s.calibration==true){c.moveTo(f,a);c.lineTo(f-3*h.pix,a);r+=3*h.pix}switch(l){case"left":c.setTextAlign("left");i=f-n.width;break;case"right":c.setTextAlign("right");i=f-r;break;default:c.setTextAlign("center");i=f-n.width/2}c.fillText(String(t),i,a+o/2-3*h.pix)}c.closePath();c.stroke();c.setTextAlign("left")});if(s.axisLine!==false){c.beginPath();c.setStrokeStyle(s.axisLineColor||"#cccccc");c.setLineWidth(1*h.pix);if(n.position=="left"){c.moveTo(d,h.height-h.area[2]);c.lineTo(d,h.area[0])}else if(n.position=="right"){c.moveTo(x,h.height-h.area[2]);c.lineTo(x,h.area[0])}else if(n.position=="center"){c.moveTo(f,h.height-h.area[2]);c.lineTo(f,h.area[0])}c.stroke()}if(h.yAxis.showTitle){let t=s.titleFontSize*h.pix||a.fontSize;let e=s.title;c.beginPath();c.setFontSize(t);c.setFillStyle(s.titleFontColor||h.fontColor);if(n.position=="left"){c.fillText(e,d-measureText(e,t,c)/2+(s.titleOffsetX||0),h.area[0]-(10-(s.titleOffsetY||0))*h.pix)}else if(n.position=="right"){c.fillText(e,x-measureText(e,t,c)/2+(s.titleOffsetX||0),h.area[0]-(10-(s.titleOffsetY||0))*h.pix)}else if(n.position=="center"){c.fillText(e,f-measureText(e,t,c)/2+(s.titleOffsetX||0),h.area[0]-(10-(s.titleOffsetY||0))*h.pix)}c.closePath();c.stroke()}if(n.position=="left"){d-=n.width+h.yAxis.padding*h.pix}else{x+=n.width+h.yAxis.padding*h.pix}}}}}function drawLegend(t,l,y,s,e){if(l.legend.show===false){return}let h=e.legendData;let a=h.points;let c=h.area;let d=l.legend.padding*l.pix;let x=l.legend.fontSize*l.pix;let f=15*l.pix;let p=5*l.pix;let g=l.legend.itemGap*l.pix;let u=Math.max(l.legend.lineHeight*l.pix,x);s.beginPath();s.setLineWidth(l.legend.borderWidth*l.pix);s.setStrokeStyle(l.legend.borderColor);s.setFillStyle(l.legend.backgroundColor);s.moveTo(c.start.x,c.start.y);s.rect(c.start.x,c.start.y,c.width,c.height);s.closePath();s.fill();s.stroke();a.forEach(function(i,t){let e=0;let a=0;e=h.widthArr[t];a=h.heightArr[t];let r=0;let o=0;if(l.legend.position=="top"||l.legend.position=="bottom"){switch(l.legend.float){case"left":r=c.start.x+d;break;case"right":r=c.start.x+c.width-e;break;default:r=c.start.x+(c.width-e)/2}o=c.start.y+d+t*u}else{if(t==0){e=0}else{e=h.widthArr[t-1]}r=c.start.x+d+e;o=c.start.y+d+(c.height-a)/2}s.setFontSize(y.fontSize);for(let a=0;a<i.length;a++){let t=i[a];t.area=[0,0,0,0];t.area[0]=r;t.area[1]=o;t.area[3]=o+u;s.beginPath();s.setLineWidth(1*l.pix);s.setStrokeStyle(t.show?t.color:l.legend.hiddenColor);s.setFillStyle(t.show?t.color:l.legend.hiddenColor);switch(t.legendShape){case"line":s.moveTo(r,o+.5*u-2*l.pix);s.fillRect(r,o+.5*u-2*l.pix,15*l.pix,4*l.pix);break;case"triangle":s.moveTo(r+7.5*l.pix,o+.5*u-5*l.pix);s.lineTo(r+2.5*l.pix,o+.5*u+5*l.pix);s.lineTo(r+12.5*l.pix,o+.5*u+5*l.pix);s.lineTo(r+7.5*l.pix,o+.5*u-5*l.pix);break;case"diamond":s.moveTo(r+7.5*l.pix,o+.5*u-5*l.pix);s.lineTo(r+2.5*l.pix,o+.5*u);s.lineTo(r+7.5*l.pix,o+.5*u+5*l.pix);s.lineTo(r+12.5*l.pix,o+.5*u);s.lineTo(r+7.5*l.pix,o+.5*u-5*l.pix);break;case"circle":s.moveTo(r+7.5*l.pix,o+.5*u);s.arc(r+7.5*l.pix,o+.5*u,5*l.pix,0,2*Math.PI);break;case"rect":s.moveTo(r,o+.5*u-5*l.pix);s.fillRect(r,o+.5*u-5*l.pix,15*l.pix,10*l.pix);break;case"square":s.moveTo(r+5*l.pix,o+.5*u-5*l.pix);s.fillRect(r+5*l.pix,o+.5*u-5*l.pix,10*l.pix,10*l.pix);break;case"none":break;default:s.moveTo(r,o+.5*u-5*l.pix);s.fillRect(r,o+.5*u-5*l.pix,15*l.pix,10*l.pix)}s.closePath();s.fill();s.stroke();r+=f+p;let e=.5*u+.5*x-2;const n=t.legendText?t.legendText:t.name;s.beginPath();s.setFontSize(x);s.setFillStyle(t.show?l.legend.fontColor:l.legend.hiddenColor);s.fillText(n,r,o+e);s.closePath();s.stroke();if(l.legend.position=="top"||l.legend.position=="bottom"){r+=measureText(n,x,s)+g;t.area[2]=r}else{t.area[2]=r+measureText(n,x,s)+g;r-=f+p;o+=u}}})}function drawPieDataPoints(t,r,e,o){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var n=assign({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:false,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},r.type=="pie"?r.extra.pie:r.extra.ring);var l={x:r.area[3]+(r.width-r.area[1]-r.area[3])/2,y:r.area[0]+(r.height-r.area[0]-r.area[2])/2};if(e.pieChartLinePadding==0){e.pieChartLinePadding=n.activeRadius*r.pix}var i=Math.min((r.width-r.area[1]-r.area[3])/2-e.pieChartLinePadding-e.pieChartTextPadding-e._pieTextMaxLength_,(r.height-r.area[0]-r.area[2])/2-e.pieChartLinePadding-e.pieChartTextPadding);i=i<10?10:i;if(n.customRadius>0){i=n.customRadius*r.pix}t=getPieDataPoints(t,i,a);var h=n.activeRadius*r.pix;n.customColor=fillCustomColor(n.linearType,n.customColor,t,e);t=t.map(function(t){t._start_+=n.offsetAngle*Math.PI/180;return t});t.forEach(function(t,e){if(r.tooltip){if(r.tooltip.index==e){o.beginPath();o.setFillStyle(hexToRgb(t.color,n.activeOpacity||.5));o.moveTo(l.x,l.y);o.arc(l.x,l.y,t._radius_+h,t._start_,t._start_+2*t._proportion_*Math.PI);o.closePath();o.fill()}}o.beginPath();o.setLineWidth(n.borderWidth*r.pix);o.lineJoin="round";o.setStrokeStyle(n.borderColor);var a=t.color;if(n.linearType=="custom"){var i;if(o.createCircularGradient){i=o.createCircularGradient(l.x,l.y,t._radius_)}else{i=o.createRadialGradient(l.x,l.y,0,l.x,l.y,t._radius_)}i.addColorStop(0,hexToRgb(n.customColor[t.linearIndex],1));i.addColorStop(1,hexToRgb(t.color,1));a=i}o.setFillStyle(a);o.moveTo(l.x,l.y);o.arc(l.x,l.y,t._radius_,t._start_,t._start_+2*t._proportion_*Math.PI);o.closePath();o.fill();if(n.border==true){o.stroke()}});if(r.type==="ring"){var s=i*.6;if(typeof n.ringWidth==="number"&&n.ringWidth>0){s=Math.max(0,i-n.ringWidth*r.pix)}o.beginPath();o.setFillStyle(n.centerColor);o.moveTo(l.x,l.y);o.arc(l.x,l.y,s,0,2*Math.PI);o.closePath();o.fill()}if(r.dataLabel!==false&&a===1){drawPieText(t,r,e,o,i,l)}if(a===1&&r.type==="ring"){drawRingTitle(r,e,o,l)}return{center:l,radius:i,series:t}}function drawRoseDataPoints(t,r,e,o){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var n=assign({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:false,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},r.extra.rose);if(e.pieChartLinePadding==0){e.pieChartLinePadding=n.activeRadius*r.pix}var l={x:r.area[3]+(r.width-r.area[1]-r.area[3])/2,y:r.area[0]+(r.height-r.area[0]-r.area[2])/2};var i=Math.min((r.width-r.area[1]-r.area[3])/2-e.pieChartLinePadding-e.pieChartTextPadding-e._pieTextMaxLength_,(r.height-r.area[0]-r.area[2])/2-e.pieChartLinePadding-e.pieChartTextPadding);i=i<10?10:i;var s=n.minRadius||i*.5;t=getRoseDataPoints(t,n.type,s,i,a);var h=n.activeRadius*r.pix;n.customColor=fillCustomColor(n.linearType,n.customColor,t,e);t=t.map(function(t){t._start_+=(n.offsetAngle||0)*Math.PI/180;return t});t.forEach(function(t,e){if(r.tooltip){if(r.tooltip.index==e){o.beginPath();o.setFillStyle(hexToRgb(t.color,n.activeOpacity||.5));o.moveTo(l.x,l.y);o.arc(l.x,l.y,h+t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI);o.closePath();o.fill()}}o.beginPath();o.setLineWidth(n.borderWidth*r.pix);o.lineJoin="round";o.setStrokeStyle(n.borderColor);var a=t.color;if(n.linearType=="custom"){var i;if(o.createCircularGradient){i=o.createCircularGradient(l.x,l.y,t._radius_)}else{i=o.createRadialGradient(l.x,l.y,0,l.x,l.y,t._radius_)}i.addColorStop(0,hexToRgb(n.customColor[t.linearIndex],1));i.addColorStop(1,hexToRgb(t.color,1));a=i}o.setFillStyle(a);o.moveTo(l.x,l.y);o.arc(l.x,l.y,t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI);o.closePath();o.fill();if(n.border==true){o.stroke()}});if(r.dataLabel!==false&&a===1){drawPieText(t,r,e,o,i,l)}return{center:l,radius:i,series:t}}function drawArcbarDataPoints(a,i,t,r){var e=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var o=assign({},{startAngle:.75,endAngle:.25,type:"default",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},i.extra.arcbar);a=getArcbarDataPoints(a,o,e);var n;if(o.centerX||o.centerY){n={x:o.centerX?o.centerX:i.width/2,y:o.centerY?o.centerY:i.height/2}}else{n={x:i.width/2,y:i.height/2}}var l;if(o.radius){l=o.radius}else{l=Math.min(n.x,n.y);l-=5*i.pix;l-=o.width/2}l=l<10?10:l;o.customColor=fillCustomColor(o.linearType,o.customColor,a,t);for(let e=0;e<a.length;e++){let t=a[e];r.setLineWidth(o.width*i.pix);r.setStrokeStyle(o.backgroundColor||"#E9E9E9");r.setLineCap(o.lineCap);r.beginPath();if(o.type=="default"){r.arc(n.x,n.y,l-(o.width*i.pix+o.gap*i.pix)*e,o.startAngle*Math.PI,o.endAngle*Math.PI,false)}else{r.arc(n.x,n.y,l-(o.width*i.pix+o.gap*i.pix)*e,0,2*Math.PI,false)}r.stroke();var s=t.color;if(o.linearType=="custom"){var h=r.createLinearGradient(n.x-l,n.y,n.x+l,n.y);h.addColorStop(1,hexToRgb(o.customColor[t.linearIndex],1));h.addColorStop(0,hexToRgb(t.color,1));s=h}r.setLineWidth(o.width*i.pix);r.setStrokeStyle(s);r.setLineCap(o.lineCap);r.beginPath();r.arc(n.x,n.y,l-(o.width*i.pix+o.gap*i.pix)*e,o.startAngle*Math.PI,t._proportion_*Math.PI,false);r.stroke()}drawRingTitle(i,t,r,n);return{center:n,radius:l,series:a}}function drawGaugeDataPoints(n,h,c,t,d){var x=arguments.length>5&&arguments[5]!==undefined?arguments[5]:1;var f=assign({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},c.extra.gauge);if(f.oldAngle==undefined){f.oldAngle=f.startAngle}if(f.oldData==undefined){f.oldData=0}n=getGaugeAxisPoints(n,f.startAngle,f.endAngle);var p={x:c.width/2,y:c.height/2};var g=Math.min(p.x,p.y);g-=5*c.pix;g-=f.width/2;g=g<10?10:g;var u=g-f.width;var y=0;if(f.type=="progress"){var v=g-f.width*3;d.beginPath();let t=d.createLinearGradient(p.x,p.y-v,p.x,p.y+v);t.addColorStop("0",hexToRgb(h[0].color,.3));t.addColorStop("1.0",hexToRgb("#FFFFFF",.1));d.setFillStyle(t);d.arc(p.x,p.y,v,0,2*Math.PI,false);d.fill();d.setLineWidth(f.width);d.setStrokeStyle(hexToRgb(h[0].color,.3));d.setLineCap("round");d.beginPath();d.arc(p.x,p.y,u,f.startAngle*Math.PI,f.endAngle*Math.PI,false);d.stroke();y=f.startAngle-f.endAngle+1;let e=y/f.splitLine.splitNumber;let a=y/f.splitLine.splitNumber/f.splitLine.childNumber;let i=-g-f.width*.5-f.splitLine.fixRadius;let r=-g-f.width-f.splitLine.fixRadius+f.splitLine.width;d.save();d.translate(p.x,p.y);d.rotate((f.startAngle-1)*Math.PI);let o=f.splitLine.splitNumber*f.splitLine.childNumber+1;let n=h[0].data*x;for(let t=0;t<o;t++){d.beginPath();if(n>t/o){d.setStrokeStyle(hexToRgb(h[0].color,1))}else{d.setStrokeStyle(hexToRgb(h[0].color,.3))}d.setLineWidth(3*c.pix);d.moveTo(i,0);d.lineTo(r,0);d.stroke();d.rotate(a*Math.PI)}d.restore();h=getGaugeArcbarDataPoints(h,f,x);d.setLineWidth(f.width);d.setStrokeStyle(h[0].color);d.setLineCap("round");d.beginPath();d.arc(p.x,p.y,u,f.startAngle*Math.PI,h[0]._proportion_*Math.PI,false);d.stroke();let l=g-f.width*2.5;d.save();d.translate(p.x,p.y);d.rotate((h[0]._proportion_-1)*Math.PI);d.beginPath();d.setLineWidth(f.width/3);let s=d.createLinearGradient(0,-l*.6,0,l*.6);s.addColorStop("0",hexToRgb("#FFFFFF",0));s.addColorStop("0.5",hexToRgb(h[0].color,1));s.addColorStop("1.0",hexToRgb("#FFFFFF",0));d.setStrokeStyle(s);d.arc(0,0,l,.85*Math.PI,1.15*Math.PI,false);d.stroke();d.beginPath();d.setLineWidth(1);d.setStrokeStyle(h[0].color);d.setFillStyle(h[0].color);d.moveTo(-l-f.width/3/2,-4);d.lineTo(-l-f.width/3/2-4,0);d.lineTo(-l-f.width/3/2,4);d.lineTo(-l-f.width/3/2,-4);d.stroke();d.fill();d.restore()}else{d.setLineWidth(f.width);d.setLineCap("butt");for(let e=0;e<n.length;e++){let t=n[e];d.beginPath();d.setStrokeStyle(t.color);d.arc(p.x,p.y,g,t._startAngle_*Math.PI,t._endAngle_*Math.PI,false);d.stroke()}d.save();y=f.startAngle-f.endAngle+1;let e=y/f.splitLine.splitNumber;let a=y/f.splitLine.splitNumber/f.splitLine.childNumber;let i=-g-f.width*.5-f.splitLine.fixRadius;let r=-g-f.width*.5-f.splitLine.fixRadius+f.splitLine.width;let o=-g-f.width*.5-f.splitLine.fixRadius+f.splitLine.childWidth;d.translate(p.x,p.y);d.rotate((f.startAngle-1)*Math.PI);for(let t=0;t<f.splitLine.splitNumber+1;t++){d.beginPath();d.setStrokeStyle(f.splitLine.color);d.setLineWidth(2*c.pix);d.moveTo(i,0);d.lineTo(r,0);d.stroke();d.rotate(e*Math.PI)}d.restore();d.save();d.translate(p.x,p.y);d.rotate((f.startAngle-1)*Math.PI);for(let t=0;t<f.splitLine.splitNumber*f.splitLine.childNumber+1;t++){d.beginPath();d.setStrokeStyle(f.splitLine.color);d.setLineWidth(1*c.pix);d.moveTo(i,0);d.lineTo(o,0);d.stroke();d.rotate(a*Math.PI)}d.restore();h=getGaugeDataPoints(h,n,f,x);for(let e=0;e<h.length;e++){let t=h[e];d.save();d.translate(p.x,p.y);d.rotate((t._proportion_-1)*Math.PI);d.beginPath();d.setFillStyle(t.color);d.moveTo(f.pointer.width,0);d.lineTo(0,-f.pointer.width/2);d.lineTo(-u,0);d.lineTo(0,f.pointer.width/2);d.lineTo(f.pointer.width,0);d.closePath();d.fill();d.beginPath();d.setFillStyle("#FFFFFF");d.arc(0,0,f.pointer.width/6,0,2*Math.PI,false);d.fill();d.restore()}if(c.dataLabel!==false){drawGaugeLabel(f,g,p,c,t,d)}}drawRingTitle(c,t,d,p);if(x===1&&c.type==="gauge"){c.extra.gauge.oldAngle=h[0]._proportion_;c.extra.gauge.oldData=h[0].data}return{center:p,radius:g,innerRadius:u,categories:n,totalAngle:y}}function drawRadarDataPoints(o,n,i,l){var t=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var s=assign({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:false,axisLabelTofix:0,labelColor:"#666666",labelPointShow:false,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:false,borderWidth:2,linearType:"none",customColor:[]},n.extra.radar);var a=getRadarCoordinateSeries(n.categories.length);var h={x:n.area[3]+(n.width-n.area[1]-n.area[3])/2,y:n.area[0]+(n.height-n.area[0]-n.area[2])/2};var r=(n.width-n.area[1]-n.area[3])/2;var d=(n.height-n.area[0]-n.area[2])/2;var c=Math.min(r-(getMaxTextListLength(n.categories,i.fontSize,l)+i.radarLabelTextMargin),d-i.radarLabelTextMargin);c-=i.radarLabelTextMargin*n.pix;c=c<10?10:c;l.beginPath();l.setLineWidth(1*n.pix);l.setStrokeStyle(s.gridColor);a.forEach(function(t,e){var a=convertCoordinateOrigin(c*Math.cos(t),c*Math.sin(t),h);l.moveTo(h.x,h.y);if(e%s.gridEval==0){l.lineTo(a.x,a.y)}});l.stroke();l.closePath();var x=function t(i){var r={};l.beginPath();l.setLineWidth(1*n.pix);l.setStrokeStyle(s.gridColor);if(s.gridType=="radar"){a.forEach(function(t,e){var a=convertCoordinateOrigin(c/s.gridCount*i*Math.cos(t),c/s.gridCount*i*Math.sin(t),h);if(e===0){r=a;l.moveTo(a.x,a.y)}else{l.lineTo(a.x,a.y)}});l.lineTo(r.x,r.y)}else{var e=convertCoordinateOrigin(c/s.gridCount*i*Math.cos(1.5),c/s.gridCount*i*Math.sin(1.5),h);l.arc(h.x,h.y,h.y-e.y,0,2*Math.PI,false)}l.stroke();l.closePath()};for(var e=1;e<=s.gridCount;e++){x(e)}s.customColor=fillCustomColor(s.linearType,s.customColor,o,i);var f=getRadarDataPoints(a,h,c,o,n,t);f.forEach(function(t,e){l.beginPath();l.setLineWidth(s.borderWidth*n.pix);l.setStrokeStyle(t.color);var a=hexToRgb(t.color,s.opacity);if(s.linearType=="custom"){var i;if(l.createCircularGradient){i=l.createCircularGradient(h.x,h.y,c)}else{i=l.createRadialGradient(h.x,h.y,0,h.x,h.y,c)}i.addColorStop(0,hexToRgb(s.customColor[o[e].linearIndex],s.opacity));i.addColorStop(1,hexToRgb(t.color,s.opacity));a=i}l.setFillStyle(a);t.data.forEach(function(t,e){if(e===0){l.moveTo(t.position.x,t.position.y)}else{l.lineTo(t.position.x,t.position.y)}});l.closePath();l.fill();if(s.border===true){l.stroke()}l.closePath();if(n.dataPointShape!==false){var r=t.data.map(function(t){return t.position});drawPointShape(r,t.color,t.pointShape,l,n)}});if(s.axisLabel===true){const p=Math.max(s.max,Math.max.apply(null,dataCombine(o)));const g=c/s.gridCount;const u=n.fontSize*n.pix;l.setFontSize(u);l.setFillStyle(n.fontColor);l.setTextAlign("left");for(var e=0;e<s.gridCount+1;e++){let t=e*p/s.gridCount;t=t.toFixed(s.axisLabelTofix);l.fillText(String(t),h.x+3*n.pix,h.y-e*g+u/2)}}drawRadarLabel(a,c,h,n,i,l);if(n.dataLabel!==false&&t===1){f.forEach(function(t,e){l.beginPath();var a=t.textSize*n.pix||i.fontSize;l.setFontSize(a);l.setFillStyle(t.textColor||n.fontColor);t.data.forEach(function(t,e){if(Math.abs(t.position.x-h.x)<2){if(t.position.y<h.y){l.setTextAlign("center");l.fillText(t.value,t.position.x,t.position.y-4)}else{l.setTextAlign("center");l.fillText(t.value,t.position.x,t.position.y+a+2)}}else{if(t.position.x<h.x){l.setTextAlign("right");l.fillText(t.value,t.position.x-4,t.position.y+a/2-2)}else{l.setTextAlign("left");l.fillText(t.value,t.position.x+4,t.position.y+a/2-2)}}});l.closePath();l.stroke()});l.setTextAlign("left")}return{center:h,radius:c,angleList:a}}function lonlat2mercator(t,e){var a=Array(2);var i=t*20037508.34/180;var r=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);r=r*20037508.34/180;a[0]=i;a[1]=r;return a}function mercator2lonlat(t,e){var a=Array(2);var i=t/20037508.34*180;var r=e/20037508.34*180;r=180/Math.PI*(2*Math.atan(Math.exp(r*Math.PI/180))-Math.PI/2);a[0]=i;a[1]=r;return a}function getBoundingBox(t){var e={},a;e.xMin=180;e.xMax=0;e.yMin=90;e.yMax=0;for(var i=0;i<t.length;i++){var r=t[i].geometry.coordinates;for(var o=0;o<r.length;o++){a=r[o];if(a.length==1){a=a[0]}for(var n=0;n<a.length;n++){var l=a[n][0];var s=a[n][1];var h={x:l,y:s};e.xMin=e.xMin<h.x?e.xMin:h.x;e.xMax=e.xMax>h.x?e.xMax:h.x;e.yMin=e.yMin<h.y?e.yMin:h.y;e.yMax=e.yMax>h.y?e.yMax:h.y}}}return e}function coordinateToPoint(t,e,a,i,r,o){return{x:(e-a.xMin)*i+r,y:(a.yMax-t)*i+o}}function pointToCoordinate(t,e,a,i,r,o){return{x:(e-r)/i+a.xMin,y:a.yMax-(t-o)/i}}function isRayIntersectsSegment(t,e,a){if(e[1]==a[1]){return false}if(e[1]>t[1]&&a[1]>t[1]){return false}if(e[1]<t[1]&&a[1]<t[1]){return false}if(e[1]==t[1]&&a[1]>t[1]){return false}if(a[1]==t[1]&&e[1]>t[1]){return false}if(e[0]<t[0]&&a[1]<t[1]){return false}let i=a[0]-(a[0]-e[0])*(a[1]-t[1])/(a[1]-e[1]);if(i<t[0]){return false}else{return true}}function isPoiWithinPoly(r,e,o){let n=0;for(let t=0;t<e.length;t++){let i=e[t][0];if(e.length==1){i=e[t][0]}for(let a=0;a<i.length-1;a++){let t=i[a];let e=i[a+1];if(o){t=lonlat2mercator(i[a][0],i[a][1]);e=lonlat2mercator(i[a+1][0],i[a+1][1])}if(isRayIntersectsSegment(r,t,e)){n+=1}}}if(n%2==1){return true}else{return false}}function drawMapDataPoints(c,a,d,i){var r=assign({},{border:true,mercator:false,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#f04864",activeFillColor:"#facc14",activeFillOpacity:1},a.extra.map);var t,o;var n=c;var l=getBoundingBox(n);if(r.mercator){var x=lonlat2mercator(l.xMax,l.yMax);var f=lonlat2mercator(l.xMin,l.yMin);l.xMax=x[0];l.yMax=x[1];l.xMin=f[0];l.yMin=f[1]}var p=a.width/Math.abs(l.xMax-l.xMin);var g=a.height/Math.abs(l.yMax-l.yMin);var s=p<g?p:g;var u=a.width/2-Math.abs(l.xMax-l.xMin)/2*s;var y=a.height/2-Math.abs(l.yMax-l.yMin)/2*s;for(var h=0;h<n.length;h++){i.beginPath();i.setLineWidth(r.borderWidth*a.pix);i.setStrokeStyle(r.borderColor);i.setFillStyle(hexToRgb(c[h].color,r.fillOpacity));if(a.tooltip){if(a.tooltip.index==h){i.setStrokeStyle(r.activeBorderColor);i.setFillStyle(hexToRgb(r.activeFillColor,r.activeFillOpacity))}}var v=n[h].geometry.coordinates;for(var m=0;m<v.length;m++){t=v[m];if(t.length==1){t=t[0]}for(var e=0;e<t.length;e++){var T=Array(2);if(r.mercator){T=lonlat2mercator(t[e][0],t[e][1])}else{T=t[e]}o=coordinateToPoint(T[1],T[0],l,s,u,y);if(e===0){i.beginPath();i.moveTo(o.x,o.y)}else{i.lineTo(o.x,o.y)}}i.fill();if(r.border==true){i.stroke()}}}if(a.dataLabel==true){for(var h=0;h<n.length;h++){var b=n[h].properties.centroid;if(b){if(r.mercator){b=lonlat2mercator(n[h].properties.centroid[0],n[h].properties.centroid[1])}o=coordinateToPoint(b[1],b[0],l,s,u,y);let t=n[h].textSize*a.pix||d.fontSize;let e=n[h].properties.name;i.beginPath();i.setFontSize(t);i.setFillStyle(n[h].textColor||a.fontColor);i.fillText(e,o.x-measureText(e,t,i)/2,o.y+t/2);i.closePath();i.stroke()}}}a.chartData.mapData={bounds:l,scale:s,xoffset:u,yoffset:y,mercator:r.mercator};drawToolTipBridge(a,d,i,1);i.draw()}function normalInt(t,e,a){a=a==0?1:a;var i=[];for(var r=0;r<a;r++){i[r]=Math.random()}return Math.floor(i.reduce(function(t,e){return t+e})/a*(e-t))+t}function collisionNew(e,a,i,r){var o=false;for(let t=0;t<a.length;t++){if(a[t].area){if(e[3]<a[t].area[1]||e[0]>a[t].area[2]||e[1]>a[t].area[3]||e[2]<a[t].area[0]){if(e[0]<0||e[1]<0||e[2]>i||e[3]>r){o=true;break}else{o=false}}else{o=true;break}}}return o}function getWordCloudPoint(c,t,d){let x=c.series;switch(t){case"normal":for(let l=0;l<x.length;l++){let t=x[l].name;let e=x[l].textSize*c.pix;let a=measureText(t,e,d);let i,r;let o;let n=0;while(true){n++;i=normalInt(-c.width/2,c.width/2,5)-a/2;r=normalInt(-c.height/2,c.height/2,5)+e/2;o=[i-5+c.width/2,r-5-e+c.height/2,i+a+5+c.width/2,r+5+c.height/2];let t=collisionNew(o,x,c.width,c.height);if(!t)break;if(n==1e3){o=[-100,-100,-100,-100];break}}x[l].area=o}break;case"vertical":function f(){if(Math.random()>.7){return true}else{return false}};for(let h=0;h<x.length;h++){let t=x[h].name;let e=x[h].textSize*c.pix;let a=measureText(t,e,d);let i=f();let r,o,n,l;let s=0;while(true){s++;let t;if(i){r=normalInt(-c.width/2,c.width/2,5)-a/2;o=normalInt(-c.height/2,c.height/2,5)+e/2;n=[o-5-a+c.width/2,-r-5+c.height/2,o+5+c.width/2,-r+e+5+c.height/2];l=[c.width-(c.width/2-c.height/2)-(-r+e+5+c.height/2)-5,c.height/2-c.width/2+(o-5-a+c.width/2)-5,c.width-(c.width/2-c.height/2)-(-r+e+5+c.height/2)+e,c.height/2-c.width/2+(o-5-a+c.width/2)+a+5];t=collisionNew(l,x,c.height,c.width)}else{r=normalInt(-c.width/2,c.width/2,5)-a/2;o=normalInt(-c.height/2,c.height/2,5)+e/2;n=[r-5+c.width/2,o-5-e+c.height/2,r+a+5+c.width/2,o+5+c.height/2];t=collisionNew(n,x,c.width,c.height)}if(!t)break;if(s==1e3){n=[-1e3,-1e3,-1e3,-1e3];break}}if(i){x[h].area=l;x[h].areav=n}else{x[h].area=n}x[h].rotate=i};break}return x}function drawWordCloudDataPoints(t,r,e,o){let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let a=assign({},{type:"normal",autoColors:true},r.extra.word);if(!r.chartData.wordCloudData){r.chartData.wordCloudData=getWordCloudPoint(r,a.type,o)}o.beginPath();o.setFillStyle(r.background);o.rect(0,0,r.width,r.height);o.fill();o.save();let l=r.chartData.wordCloudData;o.translate(r.width/2,r.height/2);for(let i=0;i<l.length;i++){o.save();if(l[i].rotate){o.rotate(90*Math.PI/180)}let t=l[i].name;let e=l[i].textSize*r.pix;let a=measureText(t,e,o);o.beginPath();o.setStrokeStyle(l[i].color);o.setFillStyle(l[i].color);o.setFontSize(e);if(l[i].rotate){if(l[i].areav[0]>0){if(r.tooltip){if(r.tooltip.index==i){o.strokeText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}else{o.fillText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}}else{o.fillText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}}}else{if(l[i].area[0]>0){if(r.tooltip){if(r.tooltip.index==i){o.strokeText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}else{o.fillText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}}else{o.fillText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}}}o.stroke();o.restore()}o.restore()}function drawFunnelDataPoints(e,a,t,i){let c=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let r=assign({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:false,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right",linearType:"none",customColor:[]},a.extra.funnel);let o=(a.height-a.area[0]-a.area[2])/e.length;let n={x:a.area[3]+(a.width-a.area[1]-a.area[3])/2,y:a.height-a.area[2]};let l=r.activeWidth*a.pix;let d=Math.min((a.width-a.area[1]-a.area[3])/2-l,(a.height-a.area[0]-a.area[2])/2-l);e=getFunnelDataPoints(e,d,r.type,o,c);i.save();i.translate(n.x,n.y);r.customColor=fillCustomColor(r.linearType,r.customColor,e,t);if(r.type=="pyramid"){for(let t=0;t<e.length;t++){if(t==e.length-1){if(a.tooltip){if(a.tooltip.index==t){i.beginPath();i.setFillStyle(hexToRgb(e[t].color,r.activeOpacity));i.moveTo(-l,-o);i.lineTo(-e[t].radius-l,0);i.lineTo(e[t].radius+l,0);i.lineTo(l,-o);i.lineTo(-l,-o);i.closePath();i.fill()}}e[t].funnelArea=[n.x-e[t].radius,n.y-o*(t+1),n.x+e[t].radius,n.y-o*t];i.beginPath();i.setLineWidth(r.borderWidth*a.pix);i.setStrokeStyle(r.borderColor);var s=hexToRgb(e[t].color,r.fillOpacity);if(r.linearType=="custom"){var h=i.createLinearGradient(e[t].radius,-o,-e[t].radius,-o);h.addColorStop(0,hexToRgb(e[t].color,r.fillOpacity));h.addColorStop(.5,hexToRgb(r.customColor[e[t].linearIndex],r.fillOpacity));h.addColorStop(1,hexToRgb(e[t].color,r.fillOpacity));s=h}i.setFillStyle(s);i.moveTo(0,-o);i.lineTo(-e[t].radius,0);i.lineTo(e[t].radius,0);i.lineTo(0,-o);i.closePath();i.fill();if(r.border==true){i.stroke()}}else{if(a.tooltip){if(a.tooltip.index==t){i.beginPath();i.setFillStyle(hexToRgb(e[t].color,r.activeOpacity));i.moveTo(0,0);i.lineTo(-e[t].radius-l,0);i.lineTo(-e[t+1].radius-l,-o);i.lineTo(e[t+1].radius+l,-o);i.lineTo(e[t].radius+l,0);i.lineTo(0,0);i.closePath();i.fill()}}e[t].funnelArea=[n.x-e[t].radius,n.y-o*(t+1),n.x+e[t].radius,n.y-o*t];i.beginPath();i.setLineWidth(r.borderWidth*a.pix);i.setStrokeStyle(r.borderColor);var s=hexToRgb(e[t].color,r.fillOpacity);if(r.linearType=="custom"){var h=i.createLinearGradient(e[t].radius,-o,-e[t].radius,-o);h.addColorStop(0,hexToRgb(e[t].color,r.fillOpacity));h.addColorStop(.5,hexToRgb(r.customColor[e[t].linearIndex],r.fillOpacity));h.addColorStop(1,hexToRgb(e[t].color,r.fillOpacity));s=h}i.setFillStyle(s);i.moveTo(0,0);i.lineTo(-e[t].radius,0);i.lineTo(-e[t+1].radius,-o);i.lineTo(e[t+1].radius,-o);i.lineTo(e[t].radius,0);i.lineTo(0,0);i.closePath();i.fill();if(r.border==true){i.stroke()}}i.translate(0,-o)}}else{for(let t=0;t<e.length;t++){if(t==0){if(a.tooltip){if(a.tooltip.index==t){i.beginPath();i.setFillStyle(hexToRgb(e[t].color,r.activeOpacity));i.moveTo(-l,0);i.lineTo(-e[t].radius-l,-o);i.lineTo(e[t].radius+l,-o);i.lineTo(l,0);i.lineTo(-l,0);i.closePath();i.fill()}}e[t].funnelArea=[n.x-e[t].radius,n.y-o,n.x+e[t].radius,n.y];i.beginPath();i.setLineWidth(r.borderWidth*a.pix);i.setStrokeStyle(r.borderColor);var s=hexToRgb(e[t].color,r.fillOpacity);if(r.linearType=="custom"){var h=i.createLinearGradient(e[t].radius,-o,-e[t].radius,-o);h.addColorStop(0,hexToRgb(e[t].color,r.fillOpacity));h.addColorStop(.5,hexToRgb(r.customColor[e[t].linearIndex],r.fillOpacity));h.addColorStop(1,hexToRgb(e[t].color,r.fillOpacity));s=h}i.setFillStyle(s);i.moveTo(0,0);i.lineTo(-e[t].radius,-o);i.lineTo(e[t].radius,-o);i.lineTo(0,0);i.closePath();i.fill();if(r.border==true){i.stroke()}}else{if(a.tooltip){if(a.tooltip.index==t){i.beginPath();i.setFillStyle(hexToRgb(e[t].color,r.activeOpacity));i.moveTo(0,0);i.lineTo(-e[t-1].radius-l,0);i.lineTo(-e[t].radius-l,-o);i.lineTo(e[t].radius+l,-o);i.lineTo(e[t-1].radius+l,0);i.lineTo(0,0);i.closePath();i.fill()}}e[t].funnelArea=[n.x-e[t].radius,n.y-o*(t+1),n.x+e[t].radius,n.y-o*t];i.beginPath();i.setLineWidth(r.borderWidth*a.pix);i.setStrokeStyle(r.borderColor);var s=hexToRgb(e[t].color,r.fillOpacity);if(r.linearType=="custom"){var h=i.createLinearGradient(e[t].radius,-o,-e[t].radius,-o);h.addColorStop(0,hexToRgb(e[t].color,r.fillOpacity));h.addColorStop(.5,hexToRgb(r.customColor[e[t].linearIndex],r.fillOpacity));h.addColorStop(1,hexToRgb(e[t].color,r.fillOpacity));s=h}i.setFillStyle(s);i.moveTo(0,0);i.lineTo(-e[t-1].radius,0);i.lineTo(-e[t].radius,-o);i.lineTo(e[t].radius,-o);i.lineTo(e[t-1].radius,0);i.lineTo(0,0);i.closePath();i.fill();if(r.border==true){i.stroke()}}i.translate(0,-o)}}i.restore();if(a.dataLabel!==false&&c===1){drawFunnelText(e,a,i,o,r.labelAlign,l,n)}return{center:n,radius:d,series:e}}function drawFunnelText(l,s,h,c,d,x,f){for(let n=0;n<l.length;n++){let t=l[n];if(t.labelShow===false){continue}let e,a,i,r;let o=t.formatter?t.formatter(t,n,l,s):util.toFixed(t._proportion_*100)+"%";o=t.labelText?t.labelText:o;if(d=="right"){if(s.extra.funnel.type==="pyramid"){if(n==l.length-1){e=(t.funnelArea[2]+f.x)/2}else{e=(t.funnelArea[2]+l[n+1].funnelArea[2])/2}}else{if(n==0){e=(t.funnelArea[2]+f.x)/2}else{e=(t.funnelArea[2]+l[n-1].funnelArea[2])/2}}a=e+x*2;i=t.funnelArea[1]+c/2;r=t.textSize*s.pix||s.fontSize*s.pix;h.setLineWidth(1*s.pix);h.setStrokeStyle(t.color);h.setFillStyle(t.color);h.beginPath();h.moveTo(e,i);h.lineTo(a,i);h.stroke();h.closePath();h.beginPath();h.moveTo(a,i);h.arc(a,i,2*s.pix,0,2*Math.PI);h.closePath();h.fill();h.beginPath();h.setFontSize(r);h.setFillStyle(t.textColor||s.fontColor);h.fillText(o,a+5,i+r/2-2);h.closePath();h.stroke();h.closePath()}else{if(s.extra.funnel.type==="pyramid"){if(n==l.length-1){e=(t.funnelArea[0]+f.x)/2}else{e=(t.funnelArea[0]+l[n+1].funnelArea[0])/2}}else{if(n==0){e=(t.funnelArea[0]+f.x)/2}else{e=(t.funnelArea[0]+l[n-1].funnelArea[0])/2}}a=e-x*2;i=t.funnelArea[1]+c/2;r=t.textSize*s.pix||s.fontSize*s.pix;h.setLineWidth(1*s.pix);h.setStrokeStyle(t.color);h.setFillStyle(t.color);h.beginPath();h.moveTo(e,i);h.lineTo(a,i);h.stroke();h.closePath();h.beginPath();h.moveTo(a,i);h.arc(a,i,2,0,2*Math.PI);h.closePath();h.fill();h.beginPath();h.setFontSize(r);h.setFillStyle(t.textColor||s.fontColor);h.fillText(o,a-5-measureText(o,r,h),i+r/2-2);h.closePath();h.stroke();h.closePath()}}}function drawCanvas(t,e){e.draw()}var Timing={easeIn:function t(e){return Math.pow(e,3)},easeOut:function t(e){return Math.pow(e-1,3)+1},easeInOut:function t(e){if((e/=.5)<1){return.5*Math.pow(e,3)}else{return.5*(Math.pow(e-2,3)+2)}},linear:function t(e){return e}};function Animation(r){this.isStop=false;r.duration=typeof r.duration==="undefined"?1e3:r.duration;r.timing=r.timing||"easeInOut";var o=17;function t(){if(typeof setTimeout!=="undefined"){return function(e,t){setTimeout(function(){var t=+new Date;e(t)},t)}}else if(typeof requestAnimationFrame!=="undefined"){return requestAnimationFrame}else{return function(t){t(null)}}}var n=t();var l=null;var s=function t(e){if(e===null||this.isStop===true){r.onProcess&&r.onProcess(1);r.onAnimationFinish&&r.onAnimationFinish();return}if(l===null){l=e}if(e-l<r.duration){var a=(e-l)/r.duration;var i=Timing[r.timing];a=i(a);r.onProcess&&r.onProcess(a);n(s,o)}else{r.onProcess&&r.onProcess(1);r.onAnimationFinish&&r.onAnimationFinish()}};s=s.bind(this);n(s,o)}Animation.prototype.stop=function(){this.isStop=true};function drawCharts(t,l,n,s){var h=this;var c=l.series;if(t==="pie"||t==="ring"||t==="mount"||t==="rose"||t==="funnel"){c=fixPieSeries(c,l,n)}var d=l.categories;if(t==="mount"){d=[];for(let t=0;t<c.length;t++){if(c[t].show!==false)d.push(c[t].name)}l.categories=d}c=fillSeries(c,l,n);var e=l.animation?l.duration:0;h.animationInstance&&h.animationInstance.stop();var x=null;if(t=="candle"){let t=assign({},l.extra.candle.average);if(t.show){x=calCandleMA(t.day,t.name,t.color,c[0].data);x=fillSeries(x,l,n);l.seriesMA=x}else if(l.seriesMA){x=l.seriesMA=fillSeries(l.seriesMA,l,n)}else{x=c}}else{x=c}l._series_=c=filterSeries(c);l.area=new Array(4);for(let t=0;t<4;t++){l.area[t]=l.padding[t]*l.pix}var a=calLegendData(x,l,n,l.chartData,s),r=a.area.wholeHeight,o=a.area.wholeWidth;switch(l.legend.position){case"top":l.area[0]+=r;break;case"bottom":l.area[2]+=r;break;case"left":l.area[3]+=o;break;case"right":l.area[1]+=o;break}let f={},i=0;if(l.type==="line"||l.type==="column"||l.type==="mount"||l.type==="area"||l.type==="mix"||l.type==="candle"||l.type==="scatter"||l.type==="bubble"||l.type==="bar"){f=calYAxisData(c,l,n,s);i=f.yAxisWidth;if(l.yAxis.showTitle){let e=0;for(let t=0;t<l.yAxis.data.length;t++){e=Math.max(e,l.yAxis.data[t].titleFontSize?l.yAxis.data[t].titleFontSize*l.pix:n.fontSize)}l.area[0]+=e}let e=0,a=0;for(let t=0;t<i.length;t++){if(i[t].position=="left"){if(a>0){l.area[3]+=i[t].width+l.yAxis.padding*l.pix}else{l.area[3]+=i[t].width}a+=1}else if(i[t].position=="right"){if(e>0){l.area[1]+=i[t].width+l.yAxis.padding*l.pix}else{l.area[1]+=i[t].width}e+=1}}}else{n.yAxisWidth=i}l.chartData.yAxisData=f;if(l.categories&&l.categories.length&&l.type!=="radar"&&l.type!=="gauge"&&l.type!=="bar"){l.chartData.xAxisData=getXAxisPoints(l.categories,l,n);let t=calCategoriesData(l.categories,l,n,l.chartData.xAxisData.eachSpacing,s),e=t.xAxisHeight,a=t.angle;n.xAxisHeight=e;n._xAxisTextAngle_=a;l.area[2]+=e;l.chartData.categoriesData=t}else{if(l.type==="line"||l.type==="area"||l.type==="scatter"||l.type==="bubble"||l.type==="bar"){l.chartData.xAxisData=calXAxisData(c,l,n,s);d=l.chartData.xAxisData.rangesFormat;let t=calCategoriesData(d,l,n,l.chartData.xAxisData.eachSpacing,s),e=t.xAxisHeight,a=t.angle;n.xAxisHeight=e;n._xAxisTextAngle_=a;l.area[2]+=e;l.chartData.categoriesData=t}else{l.chartData.xAxisData={xAxisPoints:[]}}}if(l.enableScroll&&l.xAxis.scrollAlign=="right"&&l._scrollDistance_===undefined){let t=0,e=l.chartData.xAxisData.xAxisPoints,a=l.chartData.xAxisData.startX,i=l.chartData.xAxisData.endX,r=l.chartData.xAxisData.eachSpacing;let o=r*(e.length-1);let n=i-a;t=n-o;h.scrollOption.currentOffset=t;h.scrollOption.startTouchX=t;h.scrollOption.distance=0;h.scrollOption.lastMoveTime=0;l._scrollDistance_=t}if(t==="pie"||t==="ring"||t==="rose"){n._pieTextMaxLength_=l.dataLabel===false?0:getPieTextMaxLength(x,n,s,l)}switch(t){case"word":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function(t){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawWordCloudDataPoints(c,l,n,s,t);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"map":s.clearRect(0,0,l.width,l.height);drawMapDataPoints(c,l,n,s);break;case"funnel":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function(t){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.funnelData=drawFunnelDataPoints(c,l,n,s,t);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,t);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawLineDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawScatterDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawBubbleDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawMixDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawColumnDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawMountDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawXAxis(d,l,n,s);var a=drawBarDataPoints(c,l,n,s,e),i=a.yAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.yAxisPoints=i;l.chartData.xAxisPoints=l.chartData.xAxisData.xAxisPoints;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawAreaDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"ring":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawPieDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"pie":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawPieDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawRoseDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.radarData=drawRadarDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.arcbarData=drawArcbarDataPoints(c,l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.gaugeData=drawGaugeDataPoints(d,c,l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawCandleDataPoints(c,x,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}if(x){drawLegend(x,l,n,s,l.chartData)}else{drawLegend(l.series,l,n,s,l.chartData)}drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break}}function uChartsEvent(){this.events={}}uChartsEvent.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[];this.events[t].push(e)};uChartsEvent.prototype.delEventListener=function(t){this.events[t]=[]};uChartsEvent.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++){e[a]=arguments[a]}var i=e[0];var r=e.slice(1);if(!!this.events[i]){this.events[i].forEach(function(t){try{t.apply(null,r)}catch(t){}})}};var uCharts=function t(a){a.pix=a.pixelRatio?a.pixelRatio:1;a.fontSize=a.fontSize?a.fontSize:13;a.fontColor=a.fontColor?a.fontColor:config.fontColor;if(a.background==""||a.background=="none"){a.background="#FFFFFF"}a.title=assign({},a.title);a.subtitle=assign({},a.subtitle);a.duration=a.duration?a.duration:1e3;a.yAxis=assign({},{data:[],showTitle:false,disabled:false,disableGrid:false,splitNumber:5,gridType:"solid",dashLength:4*a.pix,gridColor:"#cccccc",padding:10,fontColor:"#666666"},a.yAxis);a.xAxis=assign({},{rotateLabel:false,rotateAngle:45,disabled:false,disableGrid:false,splitNumber:5,calibration:false,gridType:"solid",dashLength:4,scrollAlign:"left",boundaryGap:"center",axisLine:true,axisLineColor:"#cccccc"},a.xAxis);a.xAxis.scrollPosition=a.xAxis.scrollAlign;a.legend=assign({},{show:true,position:"bottom",float:"center",backgroundColor:"rgba(0,0,0,0)",borderColor:"rgba(0,0,0,0)",borderWidth:0,padding:5,margin:5,itemGap:10,fontSize:a.fontSize,lineHeight:a.fontSize,fontColor:a.fontColor,formatter:{},hiddenColor:"#CECECE"},a.legend);a.extra=assign({},a.extra);a.rotate=a.rotate?true:false;a.animation=a.animation?true:false;a.rotate=a.rotate?true:false;a.canvas2d=a.canvas2d?true:false;let e=assign({},config);e.color=a.color?a.color:e.color;if(a.type=="pie"){e.pieChartLinePadding=a.dataLabel===false?0:a.extra.pie.labelWidth*a.pix||e.pieChartLinePadding*a.pix}if(a.type=="ring"){e.pieChartLinePadding=a.dataLabel===false?0:a.extra.ring.labelWidth*a.pix||e.pieChartLinePadding*a.pix}if(a.type=="rose"){e.pieChartLinePadding=a.dataLabel===false?0:a.extra.rose.labelWidth*a.pix||e.pieChartLinePadding*a.pix}e.pieChartTextPadding=a.dataLabel===false?0:e.pieChartTextPadding*a.pix;e.rotate=a.rotate;if(a.rotate){let t=a.width;let e=a.height;a.width=e;a.height=t}a.padding=a.padding?a.padding:e.padding;e.yAxisWidth=config.yAxisWidth*a.pix;e.xAxisHeight=config.xAxisHeight*a.pix;if(a.enableScroll&&a.xAxis.scrollShow){e.xAxisHeight+=6*a.pix}e.fontSize=a.fontSize*a.pix;e.titleFontSize=config.titleFontSize*a.pix;e.subtitleFontSize=config.subtitleFontSize*a.pix;e.toolTipPadding=config.toolTipPadding*a.pix;e.toolTipLineHeight=config.toolTipLineHeight*a.pix;if(!a.context){throw new Error("[uCharts] æªè·åå°contextï¼æ³¨æï¼v2.0çæ¬åï¼éè¦èªè¡è·åcanvasçç»å¾ä¸ä¸æå¹¶ä¼ å
¥opts.contextï¼")}this.context=a.context;if(!this.context.setTextAlign){this.context.setStrokeStyle=function(t){return this.strokeStyle=t};this.context.setLineWidth=function(t){return this.lineWidth=t};this.context.setLineCap=function(t){return this.lineCap=t};this.context.setFontSize=function(t){return this.font=t+"px sans-serif"};this.context.setFillStyle=function(t){return this.fillStyle=t};this.context.setTextAlign=function(t){return this.textAlign=t};this.context.draw=function(){}}if(!this.context.setLineDash){this.context.setLineDash=function(t){}}a.chartData={};this.uevent=new uChartsEvent;this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};this.opts=a;this.config=e;drawCharts.call(this,a.type,a,e,this.context)};uCharts.prototype.updateData=function(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.opts=assign({},this.opts,t);this.opts.updateData=true;let c=t.scrollPosition||"current";switch(c){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0;this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":let t=calYAxisData(this.opts.series,this.opts,this.config,this.context),e=t.yAxisWidth;this.config.yAxisWidth=e;let a=0;let i=getXAxisPoints(this.opts.categories,this.opts,this.config),r=i.xAxisPoints,o=i.startX,n=i.endX,l=i.eachSpacing;let s=l*(r.length-1);let h=n-o;a=h-s;this.scrollOption={currentOffset:a,startTouchX:a,distance:0,lastMoveTime:0};this.opts._scrollDistance_=a;break}drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)};uCharts.prototype.zoom=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.opts.xAxis.itemCount;if(this.opts.enableScroll!==true){console.log("[uCharts] 请å¯ç¨æ»å¨æ¡å使ç¨");return}let e=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=false;this.opts.xAxis.itemCount=t.itemCount;let a=calYAxisData(this.opts.series,this.opts,this.config,this.context),i=a.yAxisWidth;this.config.yAxisWidth=i;let r=0;let o=getXAxisPoints(this.opts.categories,this.opts,this.config),h=o.xAxisPoints,c=o.startX,d=o.endX,n=o.eachSpacing;let x=n*e;let l=d-c;let s=l-n*(h.length-1);r=l/2-x;if(r>0){r=0}if(r<s){r=s}this.scrollOption={currentOffset:r,startTouchX:0,distance:0,lastMoveTime:0};calValidDistance(this,r,this.opts.chartData,this.config,this.opts);this.opts._scrollDistance_=r;drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)};uCharts.prototype.dobuleZoom=function(t){if(this.opts.enableScroll!==true){console.log("[uCharts] 请å¯ç¨æ»å¨æ¡å使ç¨");return}const a=t.changedTouches;if(a.length<2){return}for(var e=0;e<a.length;e++){a[e].x=a[e].x?a[e].x:a[e].clientX;a[e].y=a[e].y?a[e].y:a[e].clientY}const i=[getTouches(a[0],this.opts,t),getTouches(a[1],this.opts,t)];const c=Math.abs(i[0].x-i[1].x);if(!this.scrollOption.moveCount){let t={changedTouches:[{x:a[0].x,y:this.opts.area[0]/this.opts.pix+2}]};let e={changedTouches:[{x:a[1].x,y:this.opts.area[0]/this.opts.pix+2}]};if(this.opts.rotate){t={changedTouches:[{x:this.opts.height/this.opts.pix-this.opts.area[0]/this.opts.pix-2,y:a[0].y}]};e={changedTouches:[{x:this.opts.height/this.opts.pix-this.opts.area[0]/this.opts.pix-2,y:a[1].y}]}}const s=this.getCurrentDataIndex(t).index;const h=this.getCurrentDataIndex(e).index;const v=Math.abs(s-h);this.scrollOption.moveCount=v;this.scrollOption.moveCurrent1=Math.min(s,h);this.scrollOption.moveCurrent2=Math.max(s,h);return}let d=c/this.scrollOption.moveCount;let r=(this.opts.width-this.opts.area[1]-this.opts.area[3])/d;r=r<=2?2:r;r=r>=this.opts.categories.length?this.opts.categories.length:r;this.opts.animation=false;this.opts.xAxis.itemCount=r;let o=0;let n=getXAxisPoints(this.opts.categories,this.opts,this.config),x=n.xAxisPoints,f=n.startX,p=n.endX,l=n.eachSpacing;let g=l*this.scrollOption.moveCurrent1;let u=p-f;let y=u-l*(x.length-1);o=-g+Math.min(i[0].x,i[1].x)-this.opts.area[3]-l;if(o>0){o=0}if(o<y){o=y}this.scrollOption.currentOffset=o;this.scrollOption.startTouchX=0;this.scrollOption.distance=0;calValidDistance(this,o,this.opts.chartData,this.config,this.opts);this.opts._scrollDistance_=o;drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)};uCharts.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()};uCharts.prototype.addEventListener=function(t,e){this.uevent.addEventListener(t,e)};uCharts.prototype.delEventListener=function(t){this.uevent.delEventListener(t)};uCharts.prototype.getCurrentDataIndex=function(e){var a=null;if(e.changedTouches){a=e.changedTouches[0]}else{a=e.mp.changedTouches[0]}if(a){let t=getTouches(a,this.opts,e);if(this.opts.type==="pie"||this.opts.type==="ring"){return findPieChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.pieData,this.opts)}else if(this.opts.type==="rose"){return findRoseChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.pieData,this.opts)}else if(this.opts.type==="radar"){return findRadarChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.radarData,this.opts.categories.length)}else if(this.opts.type==="funnel"){return findFunnelChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.funnelData)}else if(this.opts.type==="map"){return findMapChartCurrentIndex({x:t.x,y:t.y},this.opts)}else if(this.opts.type==="word"){return findWordChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.wordCloudData)}else if(this.opts.type==="bar"){return findBarChartCurrentIndex({x:t.x,y:t.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}else{return findCurrentIndex({x:t.x,y:t.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}}return-1};uCharts.prototype.getLegendDataIndex=function(e){var a=null;if(e.changedTouches){a=e.changedTouches[0]}else{a=e.mp.changedTouches[0]}if(a){let t=getTouches(a,this.opts,e);return findLegendIndex({x:t.x,y:t.y},this.opts.chartData.legendData)}return-1};uCharts.prototype.touchLegend=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=null;if(t.changedTouches){a=t.changedTouches[0]}else{a=t.mp.changedTouches[0]}if(a){var i=getTouches(a,this.opts,t);var r=this.getLegendDataIndex(t);if(r>=0){if(this.opts.type=="candle"){this.opts.seriesMA[r].show=!this.opts.seriesMA[r].show}else{this.opts.series[r].show=!this.opts.series[r].show}this.opts.animation=e.animation?true:false;this.opts._scrollDistance_=this.scrollOption.currentOffset;drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)}}};uCharts.prototype.showToolTip=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=null;if(t.changedTouches){c=t.changedTouches[0]}else{c=t.mp.changedTouches[0]}if(!c){console.log("[uCharts] æªè·åå°eventåæ ä¿¡æ¯")}var a=getTouches(c,this.opts,t);var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});if(this.opts.type==="line"||this.opts.type==="area"||this.opts.type==="column"||this.opts.type==="scatter"||this.opts.type==="bubble"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1||o.length>0){var n=getSeriesDataItem(this.opts.series,o,r.group);if(n.length!==0){var l=getToolTipData(n,this.opts,o,r.group,this.opts.categories,e),s=l.textList,h=l.offset;h.y=a.y;i.tooltip={textList:e.textList!==undefined?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="mount"){var o=e.index==undefined?this.getCurrentDataIndex(t).index:e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},i._series_[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,i):n.name+": "+n.data,color:n.color}];var h={x:i.chartData.calPoints[o].x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="bar"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1||o.length>0){var n=getSeriesDataItem(this.opts.series,o,r.group);if(n.length!==0){var l=getToolTipData(n,this.opts,o,r.group,this.opts.categories,e),s=l.textList,h=l.offset;h.x=a.x;i.tooltip={textList:e.textList!==undefined?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="mix"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1){var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var x=getMixToolTipData(n,this.opts,o,this.opts.categories,e),s=x.textList,h=x.offset;h.y=a.y;i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="candle"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1){var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var l=getCandleToolTipData(this.opts.series[0].data,n,this.opts,o,this.opts.categories,this.opts.extra.candle,e),s=l.textList,h=l.offset;h.y=a.y;i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="pie"||this.opts.type==="ring"||this.opts.type==="rose"||this.opts.type==="funnel"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},i._series_[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,i):n.name+": "+n.data,color:n.color}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="map"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},this.opts.series[o]);n.name=n.properties.name;var s=[{text:e.formatter?e.formatter(n,undefined,o,this.opts):n.name,color:n.color}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}i.updateData=false;drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="word"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},this.opts.series[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,this.opts):n.name,color:n.color}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}i.updateData=false;drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="radar"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var s=n.map(t=>{return{text:e.formatter?e.formatter(t,this.opts.categories[o],o,this.opts):t.name+": "+t.data,color:t.color}});var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}};uCharts.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};let e=assign({},this.opts,{_scrollDistance_:t,animation:false});drawCharts.call(this,this.opts.type,e,this.config,this.context)};uCharts.prototype.scrollStart=function(t){var e=null;if(t.changedTouches){e=t.changedTouches[0]}else{e=t.mp.changedTouches[0]}var a=getTouches(e,this.opts,t);if(e&&this.opts.enableScroll===true){this.scrollOption.startTouchX=a.x}};uCharts.prototype.scroll=function(t){if(this.scrollOption.lastMoveTime===0){this.scrollOption.lastMoveTime=Date.now()}let e=this.opts.touchMoveLimit||60;let a=Date.now();let i=a-this.scrollOption.lastMoveTime;if(i<Math.floor(1e3/e))return;if(this.scrollOption.startTouchX==0)return;this.scrollOption.lastMoveTime=a;var r=null;if(t.changedTouches){r=t.changedTouches[0]}else{r=t.mp.changedTouches[0]}if(r&&this.opts.enableScroll===true){var o=getTouches(r,this.opts,t);var n;n=o.x-this.scrollOption.startTouchX;var l=this.scrollOption.currentOffset;var s=calValidDistance(this,l+n,this.opts.chartData,this.config,this.opts);this.scrollOption.distance=n=s-l;var h=assign({},this.opts,{_scrollDistance_:l+n,animation:false});this.opts=h;drawCharts.call(this,h.type,h,this.config,this.context);return l+n}};uCharts.prototype.scrollEnd=function(t){if(this.opts.enableScroll===true){var e=this.scrollOption,a=e.currentOffset,i=e.distance;this.scrollOption.currentOffset=a+i;this.scrollOption.distance=0;this.scrollOption.moveCount=0}};export default uCharts; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "id": "qiun-data-charts", |
| | | "displayName": "ç§äº ucharts echarts 髿§è½è·¨å
¨ç«¯å¾è¡¨ç»ä»¶", |
| | | "version": "2.4.3-20220505", |
| | | "description": "uCharts æ°å¢åæç¼©æ¾ãæ°å¢å±±å³°å¾ï¼æ¯æH5åAPPç¨ ucharts echarts 渲æå¾è¡¨ï¼uniappå¯è§åé¦éç»ä»¶", |
| | | "keywords": [ |
| | | "ucharts", |
| | | "echarts", |
| | | "f2", |
| | | "å¾è¡¨", |
| | | "å¯è§å" |
| | | ], |
| | | "repository": "https://gitee.com/uCharts/uCharts", |
| | | "engines": { |
| | | "HBuilderX": "^3.3.8" |
| | | }, |
| | | "dcloudext": { |
| | | "category": [ |
| | | "å端ç»ä»¶", |
| | | "éç¨ç»ä»¶" |
| | | ], |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "474119" |
| | | }, |
| | | "declaration": { |
| | | "ads": "æ ", |
| | | "data": "æä»¶ä¸éé任使°æ®", |
| | | "permissions": "æ " |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/~qiun" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信æµè§å¨(Android)": "y", |
| | | "QQæµè§å¨(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "å°ç¨åº": { |
| | | "微信": "y", |
| | | "é¿é": "y", |
| | | "ç¾åº¦": "y", |
| | | "åèè·³å¨": "y", |
| | | "QQ": "y" |
| | | }, |
| | | "å¿«åºç¨": { |
| | | "å为": "y", |
| | | "èç": "y" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | |
| | | ## <font color='red'>åç»uCharts使ç¨è
çä¸å°ä¿¡</font> |
| | | <font color='red'> |
| | | 亲ç±çç¨æ·ï¼ |
| | | |
| | | - ç±äºæè¿ä¸çº¿çå®ç½ä¸å®è¡äºé¨åæ¶è´¹ä½éªï¼æ¶å°äºè®¸å¤ç¨æ·ç使ç¨åé¦ï¼å¤§è´åé¦çé®é¢é½æååä¸ç头ï¼ä¸ºä½æ°å®ç½çå¨çº¿å·¥å
·ä¹è¦æ¶è´¹ï¼å¯¹äºè¿ä»¶äºï¼æä»¬æ·±è¡¨ææãç±äºæ°å®ç½æ¬èº«æªæä¾ææ¯ææ¡£ï¼ä½¿å¾ç¨æ·è¯¯ä»¥ä¸ºæä»¬å¯¹ææ¡£å®è¡äºæ¶è´¹ãç»æä»¬è¿å¤æ´æ¹ï¼æ°å®ç½ç®åå·²ç»å°ææ¯ææ¡£å¼æ¾åºæ¥ä¾å¤§å®¶é
读使ç¨ï¼å¹¶å
费对å¤å¼æ¾äºãæ¼ç¤ºãä¸çæ¥çå
¨ç«¯å
¨å¹³å°ç代ç çåè½ï¼ä¸ºæ¤å次åæåå½±åçç¨æ·ä»¬è´ä»¥è¯æ³çææã |
| | | |
| | | - å
¶æ¬¡ï¼æä»¬é¡»æ¾æ¸
å ç¹ï¼å¦ä¸ï¼ |
| | | 1. uChartsçæä»¶æ¬èº«éµå¾ªå¼æºååï¼å¹¶ä¸æ¶è´¹ï¼ç¨æ·å¯èªè¡å°DCloudå¸åºä¸Giteeç äºä¸è·åæºç |
| | | 2. uChartsçææ¯ææ¡£æ°¸ä¹
å¯¹ç¨æ·å¼æ¾ |
| | | 3. æ¶è´¹å
容ä»
é对åçå·¥å
·ãç»ä»¶å·¥å
·ãå®å¶åè½ä»¥å模æ¿å¸åºçé¨åæ¶è´¹æ¨¡æ¿ |
| | | |
| | | - uCharts为ä»ä¹å®è¡æ¶è´¹ååï¼ |
| | | 1. æå¡å¨çè´¹ç¨æ¯æ |
| | | 2. å¢éçè¿è¥æ¯åºï¼æ£å¦ä½ æè§ï¼æä»¬ç群éæå¤§éçç¨æ·å¨è¯·æå¾è¡¨é
ç½®ä¸åé¦é®é¢ï¼ç¾¤éçæ¯ä¸ä½ç®¡çåé½å¨è±è´¹ä¸å°ç²¾åå¨ç§¯æè§£å³ç¨æ·çé®é¢ï¼ç¶èéå°å·¨å¤§çå¨è¯¢éæ¶ï¼æä»¬æ æ³åæ¶ãç²¾åè§£çåå¤ï¼å æ¤ï¼æä»¬æ¨åºäºä¼åä¼å
æå¡ |
| | | 3. ä¸å
¶è¯´æ¨¡æ¿å¸åºæ¯æ¶è´¹ï¼åä¸å¦è¯´ç»éçç¨æ·æä¾äºåé ä»·å¼çæºä¼ï¼ç¨æ·æ¢å¯ä»¥å¨ä¸é¢å叿¨¡æ¿èµåè´¹ç¨ï¼éå°å¿å¨ç模æ¿ä¹è½å
è´¹/ä»è´¹ä½¿ç¨ |
| | | |
| | | - æ¶è´¹ä¸æ¯ç®çï¼æ£å¦ä½ 们æè§ï¼ç¨æ·å¯ä»¥ç³è¯·æä¸º[ãå¼åè
ã](https://www.ucharts.cn/v2/#/agreement/developer)ï¼å¼åè
ä¸éå¶ä»»ä½å®ç½åè½ï¼å¹¶äº«æå®æ¹æå¯¼ãå¼åãæ¹é uChartsçæåï¼å¹¶ä¸æ´»å¨æé´ãè¿è¿è¶
级ä¼åè´¹ç¨ãï¼æä»¬æ³è¯´çæ¯ï¼æä»¬æ°çå®ç½ä¸çº¿æ¨å¨å¸ææ´å¤çç¨æ·å å
¥å°å¼åè
çéä¼ï¼æä»¬å
±åå»ç»´æ¤uChartsï¼ |
| | | |
| | | æä»¬ç¸ä¿¡ï¼ææä¹ç«å¯ä»¥çåï¼ |
| | | |
| | | uChartsææ¯å¢é |
| | | |
| | | 2022.4.23 |
| | | |
| | | </font> |
| | | |
| | | |
| | |  |
| | | |
| | | |
| | | [](https://gitee.com/uCharts/uCharts/stargazers) |
| | | [](https://gitee.com/uCharts/uCharts/members) |
| | | [](https://www.apache.org/licenses/LICENSE-2.0.html) |
| | | [](https://www.npmjs.com/~qiun) |
| | | |
| | | |
| | | ## uChartsç®ä» |
| | | |
| | | `uCharts`æ¯ä¸æ¬¾åºäº`canvas API`å¼åçéç¨äºææå端åºç¨çå¾è¡¨åºï¼å¼åè
ç¼åä¸å¥ä»£ç ï¼å¯è¿è¡å° WebãiOSãAndroidï¼åºäº uni-app / taro ï¼ã以ååç§å°ç¨åºï¼å¾®ä¿¡/æ¯ä»å®/ç¾åº¦/头æ¡/é£ä¹¦/QQ/å¿«æ/éé/æ·å®ï¼ãå¿«åºç¨çæ´å¤æ¯æ canvas API çå¹³å°ã |
| | | |
| | | ## 宿¹ç½ç« |
| | | |
| | | ## [https://www.ucharts.cn](https://www.ucharts.cn) |
| | | |
| | | ## å¿«éä½éª |
| | | |
| | | ä¸å¥ä»£ç ç¼å°å¤ä¸ªå¹³å°ï¼ä¾æ¬¡æ«æäºç»´ç ï¼äº²èªä½éªuChartså¾è¡¨è·¨å¹³å°ææï¼å
¶ä»å¹³å°è¯·èªè¡ç¼è¯ã |
| | | |
| | |  |
| | | |
| | | ## è´å¼åè
|
| | | |
| | | æè°¢åä½å¼åè
`åå¹´`æ¥å¯¹ç§äºåuChartsçæ¯æï¼uChartsçè¿æ¥ç¦»ä¸å¼åä½å¼åè
çé¼å±ä¸è´¡ç®ã为æ´å¥½ç帮å©åä½å¼åè
使ç¨å¾è¡¨å·¥å
·ï¼æä»¬æ¨åºäºæ°çå®ç½ï¼å¢å äºå¨çº¿å®å¶ãé®ç社åºãå¨çº¿é
ç½®çä¸äºå¢å¼æå¡ï¼ä¸ºç¡®ä¿æ¨è½æ´å¥½çåºç¨å¾è¡¨ç»ä»¶ï¼å»ºè®®æ¨å
`ä»ç»é
读æ¬é¡µæå`以å`常è§é®é¢`ï¼è䏿¯ä¸è½½ä¸æ¥`ç´æ¥ä½¿ç¨`ãå¦ä»ç¶ä¸è½è§£å³ï¼è¯·å°`å®ç½ç¤¾åº`æå¼éä¼ååå å
¥`ä¸å±VIPä¼å群`æé®å°ä¼å¾å¿«å¾å°åçã |
| | | |
| | | ## ç¤¾ç¾¤æ¯æ |
| | | |
| | | uCharts宿¹æ¥æ4个2000人çQQ群åä¸å±VIPä¼åç¾¤æ¯æï¼åºå¤§çç¨æ·éè¯ææä»¬ä¸ç´å¨åªåï¼è¯·å使¾å¿ä½¿ç¨ï¼uChartsç弿ºå¾è¡¨ç»ä»¶çå¼åï¼å¢éä»åºäºå¤§éçæ¶é´ä¸ç²¾åï¼ç»è¿åæ¥çèéªï¼ä¸ä¼ææ¯è¾ææ¾çbugï¼è¯·å使¾å¿ä½¿ç¨ãå¦ææ¨ææ´å¥½çæ³æ³ï¼å¯ä»¥å¨`ç äºæäº¤Pull Requests`以叮婿´å¤å¼åè
宿鿱ï¼å次æè°¢åä½å¯¹uChartsçé¼å±ä¸æ¯æï¼ |
| | | |
| | | #### 宿¹äº¤æµç¾¤ |
| | | - 交æµç¾¤1ï¼371774600ï¼å·²æ»¡ï¼ |
| | | - 交æµç¾¤2ï¼619841586ï¼å·²æ»¡ï¼ |
| | | - 交æµç¾¤3ï¼955340127ï¼å·²æ»¡ï¼ |
| | | - 交æµç¾¤4ï¼641669795 |
| | | - å£ä»¤`uniapp` |
| | | |
| | | #### ä¸å±VIPä¼å群 |
| | | - å¼éä¼åå详è§ãè´¦å·è¯¦æ
ã页é¢ä¸é¡¶é¨çæ»å¨éç¥ |
| | | - å£ä»¤`æ¨çç¨æ·ID` |
| | | |
| | | ## çæä¿¡æ¯ |
| | | |
| | | uChartså§ç»åæå¼æºï¼éµå¾ª [Apache Licence 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) 弿ºåè®®ï¼æå³çæ¨æ 鿝ä»ä»»ä½è´¹ç¨ï¼å³å¯å°uChartsåºç¨å°æ¨ç产åä¸ã |
| | | |
| | | 注æï¼è¿å¹¶ä¸æå³çæ¨å¯ä»¥å°uChartsåºç¨å°éæ³çé¢åï¼æ¯å¦æ¶åèµåï¼æ´åçæ¹é¢ãå¦å æ¤äº§ççº çº·ææ³å¾é®é¢ï¼uChartsç¸å
³æ¹åç§äºç§æä¸æ¿æ
ä»»ä½è´£ä»»ã |
| | | |
| | | ## åä½ä¼ä¼´ |
| | | |
| | | [](https://www.diygw.com/) |
| | | [](https://gitee.com/howcode/has-chat) |
| | | [](https://www.uviewui.com/) |
| | | [](https://ext.dcloud.net.cn/plugin?id=7088) |
| | | [](https://ext.dcloud.net.cn/publisher?id=202) |
| | | [](https://www.firstui.cn/) |
| | | [](https://ext.dcloud.net.cn/plugin?id=5169) |
| | | [](https://www.graceui.com/) |
| | | |
| | | |
| | | ## æ´æ°è®°å½ |
| | | |
| | | 详è§å®ç½æåä¸è¯´æï¼[ç¹å»æ¤å¤æ¥ç](https://www.ucharts.cn/v2/#/guide/index?id=100) |
| | | |
| | | |
| | | ## ç¸å
³é¾æ¥ |
| | | - [uChartså®ç½](https://www.ucharts.cn) |
| | | - [DCloudæä»¶å¸åºå°å](https://ext.dcloud.net.cn/plugin?id=271) |
| | | - [uChartsç äºå¼æºæç®¡å°å](https://gitee.com/uCharts/uCharts) [](https://gitee.com/uCharts/uCharts/stargazers) |
| | | - [uCharts npm弿ºå°å](https://www.ucharts.cn) |
| | | - [EChartså®ç½](https://echarts.apache.org/zh/index.html) |
| | | - [EChartsé
ç½®æå](https://echarts.apache.org/zh/option.html) |
| | | - [å¾è¡¨ç»ä»¶å¨é¡¹ç®ä¸çåºç¨ ReportPlusæ°æ®æ¥è¡¨](https://www.ucharts.cn/v2/#/layout/info?id=1) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | /* |
| | | * Licensed to the Apache Software Foundation (ASF) under one |
| | | * or more contributor license agreements. See the NOTICE file |
| | | * distributed with this work for additional information |
| | | * regarding copyright ownership. The ASF licenses this file |
| | | * to you under the Apache License, Version 2.0 (the |
| | | * "License"); you may not use this file except in compliance |
| | | * with the License. You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, |
| | | * software distributed under the License is distributed on an |
| | | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | * KIND, either express or implied. See the License for the |
| | | * specific language governing permissions and limitations |
| | | * under the License. |
| | | * çæ¬ä¸º4.2.1ï¼ä¿®æ¹ä¸å¤æºç ï¼this.el.hide() æ¹ä¸º this.el?this.el.hide():true |
| | | */ |
| | | |
| | | |
| | | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(nw=null),ew[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Y_.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o<a;o++)e[o]=i(t[o])}}else if(j_[n]){if(!O(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var o=0,a=t.length;o<a;o++)e[o]=i(t[o])}}}else if(!X_[n]&&!O(t)&&!M(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function n(t,e,o){if(!w(e)||!w(t))return o?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var r=t[a],s=e[a];!w(s)||!w(r)||y(s)||y(r)||M(s)||M(r)||b(s)||b(r)||O(s)||O(r)?!o&&a in t||(t[a]=i(e[a],!0)):n(r,s,o)}return t}function o(t,e){for(var i=t[0],o=1,a=t.length;o<a;o++)i=n(i,t[o],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function r(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return nw||(nw=iw().getContext("2d")),nw}function l(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var o in n)t.prototype[o]=n[o];t.prototype.constructor=t,t.superClass=e}function h(t,e,i){r(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function c(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function d(t,e,i){if(t&&e)if(t.forEach&&t.forEach===K_)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function f(t,e,i){if(t&&e){if(t.map&&t.map===Q_)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===tw)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function g(t,e,i){if(t&&e){if(t.filter&&t.filter===$_)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function m(t,e){var i=J_.call(arguments,2);return function(){return t.apply(e,i.concat(J_.call(arguments)))}}function v(t){var e=J_.call(arguments,1);return function(){return t.apply(this,e.concat(J_.call(arguments)))}}function y(t){return"[object Array]"===Y_.call(t)}function x(t){return"function"==typeof t}function _(t){return"[object String]"===Y_.call(t)}function w(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function b(t){return!!X_[Y_.call(t)]}function S(t){return!!j_[Y_.call(t)]}function M(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t){return t!==t}function T(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function A(t,e){return null!=t?t:e}function D(t,e,i){return null!=t?t:null!=e?e:i}function C(){return Function.call.apply(J_,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function k(t,e){if(!t)throw new Error(e)}function P(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function N(t){t[ow]=!0}function O(t){return t[ow]}function E(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=y(t);this.data={};var n=this;t instanceof E?t.each(e):t&&d(t,e)}function R(t){return new E(t)}function z(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function B(){}function V(t,e){var i=new rw(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function G(t,e){return t[0]=e[0],t[1]=e[1],t}function F(t){var e=new rw(2);return e[0]=t[0],e[1]=t[1],e}function W(t,e,i){return t[0]=e,t[1]=i,t}function H(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Z(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function U(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function X(t){return Math.sqrt(j(t))}function j(t){return t[0]*t[0]+t[1]*t[1]}function Y(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function q(t,e){var i=X(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function K(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function $(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function J(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function Q(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function tt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function et(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function it(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function nt(t,e){return{target:t,topTarget:e&&e.topTarget}}function ot(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function at(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=ot(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}function rt(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function st(t,e,i,n){return i=i||{},n||!U_.canvasSupported?lt(t,e,i):U_.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):lt(t,e,i),i}function lt(t,e,i){var n=rt(t);i.zrX=e.clientX-n.left,i.zrY=e.clientY-n.top}function ut(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&st(t,o,e,i)}else st(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ht(t,e,i){pw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ct(t,e,i){pw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function dt(t){return 2===t.which||3===t.which}function ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function pt(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function gt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:mt}}function mt(t){mw(this.event)}function vt(){}function yt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||xw}return!1}function xt(){var t=new bw(6);return _t(t),t}function _t(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function bt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function St(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Mt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function It(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function Tt(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function At(t){var e=xt();return wt(e,t),e}function Dt(t){return t>Iw||t<-Iw}function Ct(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Lt(t){return(t=Math.round(t))<0?0:t>255?255:t}function kt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Pt(t){return t<0?0:t>1?1:t}function Nt(t){return Lt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ot(t){return Pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Et(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Rt(t,e,i){return t+(e-t)*i}function zt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Vt(t,e){Vw&&Bt(Vw,e),Vw=Bw.put(t,Vw||e.slice())}function Gt(t,e){if(t){e=e||[];var i=Bw.get(t);if(i)return Bt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in zw)return Bt(e,zw[n]),Vt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void zt(e,0,0,0,1);l=Ot(s.pop());case"rgb":return 3!==s.length?void zt(e,0,0,0,1):(zt(e,Nt(s[0]),Nt(s[1]),Nt(s[2]),l),Vt(t,e),e);case"hsla":return 4!==s.length?void zt(e,0,0,0,1):(s[3]=Ot(s[3]),Ft(s,e),Vt(t,e),e);case"hsl":return 3!==s.length?void zt(e,0,0,0,1):(Ft(s,e),Vt(t,e),e);default:return}}zt(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(zt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Vt(t,e),e):void zt(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(zt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Vt(t,e),e):void zt(e,0,0,0,1)}}}}function Ft(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ot(t[1]),o=Ot(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],zt(e,Lt(255*Et(r,a,i+1/3)),Lt(255*Et(r,a,i)),Lt(255*Et(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Wt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Ht(t,e){var i=Gt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return qt(i,4===i.length?"rgba":"rgb")}}function Zt(t){var e=Gt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ut(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Lt(Rt(r[0],s[0],l)),i[1]=Lt(Rt(r[1],s[1],l)),i[2]=Lt(Rt(r[2],s[2],l)),i[3]=Pt(Rt(r[3],s[3],l)),i}}function Xt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Gt(e[o]),s=Gt(e[a]),l=n-o,u=qt([Lt(Rt(r[0],s[0],l)),Lt(Rt(r[1],s[1],l)),Lt(Rt(r[2],s[2],l)),Pt(Rt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function jt(t,e,i,n){if(t=Gt(t))return t=Wt(t),null!=e&&(t[0]=kt(e)),null!=i&&(t[1]=Ot(i)),null!=n&&(t[2]=Ot(n)),qt(Ft(t),"rgba")}function Yt(t,e){if((t=Gt(t))&&null!=e)return t[3]=Pt(e),qt(t,"rgba")}function qt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Kt(t,e){return t[e]}function $t(t,e,i){t[e]=i}function Jt(t,e,i){return(e-t)*i+t}function Qt(t,e,i){return i>.5?e:t}function te(t,e,i,n,o){var a=t.length;if(1===o)for(s=0;s<a;s++)n[s]=Jt(t[s],e[s],i);else for(var r=a&&t[0].length,s=0;s<a;s++)for(var l=0;l<r;l++)n[s][l]=Jt(t[s][l],e[s][l],i)}function ee(t,e,i){var n=t.length,o=e.length;if(n!==o)if(n>o)t.length=o;else for(r=n;r<o;r++)t.push(1===i?e[r]:Hw.call(e[r]));for(var a=t[0]&&t[0].length,r=0;r<t.length;r++)if(1===i)isNaN(t[r])&&(t[r]=e[r]);else for(var s=0;s<a;s++)isNaN(t[r][s])&&(t[r][s]=e[r][s])}function ie(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(a=0;a<n;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;a<n;a++)for(var r=0;r<o;r++)if(t[a][r]!==e[a][r])return!1;return!0}function ne(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(c=0;c<u;c++)s[c]=oe(t[c],e[c],i[c],n[c],o,a,r);else for(var h=t[0].length,c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=oe(t[c][d],e[c][d],i[c][d],n[c][d],o,a,r)}function oe(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ae(t){if(c(t)){var e=t.length;if(c(t[0])){for(var i=[],n=0;n<e;n++)i.push(Hw.call(t[n]));return i}return Hw.call(t)}return t}function re(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function se(t){var e=t[t.length-1].value;return c(e&&e[0])?2:1}function le(t,e,i,n,o,a){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,d=c(n[0].value),f=!1,p=!1,g=d?se(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<u;_++){m.push(n[_].time/h);var w=n[_].value;if(d&&ie(w,y,g)||!d&&w===y||(x=!1),y=w,"string"==typeof w){var b=Gt(w);b?(w=b,f=!0):p=!0}v.push(w)}if(a||!x){for(var S=v[u-1],_=0;_<u-1;_++)d?ee(v[_],S,g):!isNaN(v[_])||isNaN(S)||p||f||(v[_]=S);d&&ee(r(t._target,o),S,g);var M,I,T,A,D,C,L=0,k=0;if(f)var P=[0,0,0,0];var N=new Ct({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=M=Math.min(L+1,u-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;i<u&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ne(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=ne(T,A,D,C,I,I*I,I*I*I,P,1),a=re(P);else{if(p)return Qt(A,D,I);a=oe(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)te(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)te(v[i],v[i+1],I,P,1),a=re(P);else{if(p)return Qt(v[i],v[i+1],I);a=Jt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function ue(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),he(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h<l.length;h++)l[h].done(function(){--u||a&&a()}).start(o,r)}function he(t,e,i,n,o,a,r){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?w(n[u])&&!c(n[u])?he(t,e?e+"."+u:u,i[u],n[u],o,a,r):(r?(s[u]=i[u],ce(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||r||ce(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function ce(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function de(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function fe(t){for(var e=0;t>=eb;)e|=1&t,t>>=1;return t+e}function pe(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;ge(t,e,o)}else for(;o<i&&n(t[o],t[o-1])>=0;)o++;return o-e}function ge(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}function me(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=a+1;var u=n-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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ve(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l<s&&a(t,e[i+o+l])>0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ye(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&a(t,e[i+o+l])>=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function xe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ye(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ve(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r<n;r++)u[r]=t[i+r];var l=0,h=o,c=i;if(t[c++]=t[h++],0!=--a)if(1!==n){for(var d,f,p,g=s;;){d=0,f=0,p=!1;do{if(e(t[h],u[l])<0){if(t[c++]=t[h++],f++,d=0,0==--a){p=!0;break}}else if(t[c++]=u[l++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=ye(t[h],u,l,n,0,e))){for(r=0;r<d;r++)t[c+r]=u[l+r];if(c+=d,l+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--a){p=!0;break}if(0!==(f=ve(u[l],t,h,a,0,e))){for(r=0;r<f;r++)t[c+r]=t[h+r];if(c+=f,h+=f,0===(a-=f)){p=!0;break}}if(t[c++]=u[l++],1==--n){p=!0;break}g--}while(d>=ib||f>=ib);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r<a;r++)t[c+r]=t[h+r];t[c+a]=u[l]}else{if(0===n)throw new Error;for(r=0;r<n;r++)t[c+r]=u[l+r]}}else{for(r=0;r<a;r++)t[c+r]=t[h+r];t[c+a]=u[l]}else for(r=0;r<n;r++)t[c+r]=u[l+r]}function o(i,n,o,a){var r=0;for(r=0;r<a;r++)u[r]=t[o+r];var l=i+n-1,h=a-1,c=o+a-1,d=0,f=0;if(t[c--]=t[l--],0!=--n)if(1!==a){for(var p=s;;){var g=0,m=0,v=!1;do{if(e(u[h],t[l])<0){if(t[c--]=t[l--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=u[h--],m++,g=0,1==--a){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!=(g=n-ye(u[h],t,i,n,n-1,e))){for(n-=g,f=(c-=g)+1,d=(l-=g)+1,r=g-1;r>=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ve(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r<m;r++)t[f+r]=u[d+r];if(a<=1){v=!0;break}}if(t[c--]=t[l--],0==--n){v=!0;break}p--}while(g>=ib||m>=ib);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r<a;r++)t[d+r]=u[r]}}else{for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r<a;r++)t[d+r]=u[r]}var a,r,s=ib,l=0,u=[];a=[],r=[],this.mergeRuns=function(){for(;l>1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]<r[t+1]&&t--,i(t)}},this.pushRun=function(t,e){a[l]=t,r[l]=e,l+=1}}function _e(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(o<2)){var a=0;if(o<eb)return a=pe(t,i,n,e),void me(t,i,n,i+a,e);var r=new xe(t,e),s=fe(o);do{if((a=pe(t,i,n,e))<s){var l=o;l>s&&(l=s),me(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function be(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Se(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function Me(){return!1}function Ie(t,e,i){var n=iw(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Te(t){if("string"==typeof t){var e=mb.get(t);return e&&e.image}return t}function Ae(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=mb.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Ce(e=a.image)&&a.pending.push(r):((e=new Image).onload=e.onerror=De,mb.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function De(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Ce(t){return t&&t.width&&t.height}function Le(t,e){var i=t+":"+(e=e||wb);if(vb[i])return vb[i];for(var n=(t+"").split("\n"),o=0,a=0,r=n.length;a<r;a++)o=Math.max(We(n[a],e).width,o);return yb>xb&&(yb=0,vb={}),yb++,vb[i]=o,o}function ke(t,e,i,n,o,a,r,s){return r?Ne(t,e,i,n,o,a,r,s):Pe(t,e,i,n,o,a,s)}function Pe(t,e,i,n,o,a,r){var s=He(t,e,o,a,r),l=Le(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new de(Oe(0,l,i),Ee(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}function Ne(t,e,i,n,o,a,r,s){var l=Ze(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new de(Oe(0,u,i),Ee(0,h,n),u,h)}function Oe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ee(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Re(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function ze(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Be(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=Ve(a[r],o);return a.join("\n")}function Be(t,e,i,n){(n=a({},n)).font=e;var i=A(i,"...");n.maxIterations=A(n.maxIterations,2);var o=n.minChar=A(n.minChar,0);n.cnCharWidth=Le("å½",e);var r=n.ascCharWidth=Le("a",e);n.placeholder=A(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<o&&s>=r;l++)s-=r;var u=Le(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ve(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Le(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ge(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Le(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ge(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function Fe(t){return Le("å½",t)}function We(t,e){return bb.measureText(t,e)}function He(t,e,i,n,o){null!=t&&(t+="");var a=A(n,Fe(e)),r=t?t.split("\n"):[],s=r.length*a,l=s;if(i&&(l+=i[0]+i[2]),t&&o){var u=o.outerHeight,h=o.outerWidth;if(null!=u&&l>u)t="",r=[];else if(null!=h)for(var c=Be(h-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),d=0,f=r.length;d<f;d++)r[d]=Ve(r[d],c)}return{lines:r,height:s,outerHeight:l,lineHeight:a}}function Ze(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=_b.lastIndex=0;null!=(n=_b.exec(t));){var a=n.index;a>o&&Ue(i,t.substring(o,a)),Ue(i,n[2],n[1]),o=_b.lastIndex}o<t.length&&Ue(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(L=0;L<r.length;L++){for(var p=r[L],g=0,m=0,v=0;v<p.tokens.length;v++){var y=(k=p.tokens[v]).styleName&&e.rich[k.styleName]||{},x=k.textPadding=y.textPadding,_=k.font=y.font||e.font,w=k.textHeight=A(y.textHeight,Fe(_));if(x&&(w+=x[0]+x[2]),k.height=w,k.lineHeight=D(y.textLineHeight,e.textLineHeight,w),k.textAlign=y&&y.textAlign||e.textAlign,k.textVerticalAlign=y&&y.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=Le(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Ce(I=Te(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&C<b&&(!S||C<T?(k.text="",k.textWidth=b=0):(k.text=ze(k.text,C-T,_,c.ellipsis,{minChar:c.minChar}),k.textWidth=Le(k.text,_),b=k.textWidth+T))}m+=k.width=b,y&&(g=Math.max(g,k.lineHeight))}p.width=m,p.lineHeight=g,s+=g,l=Math.max(l,m)}i.outerWidth=i.width=A(e.textWidth,l),i.outerHeight=i.height=A(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var L=0;L<u.length;L++){var k=u[L],P=k.percentWidth;k.width=parseInt(P,10)/100*l}return i}function Ue(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}function Xe(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&P(e)||t.textFont||t.font}function je(t,e){var i,n,o,a,r=e.x,s=e.y,l=e.width,u=e.height,h=e.r;l<0&&(r+=l,l=-l),u<0&&(s+=u,u=-u),"number"==typeof h?i=n=o=a=h:h instanceof Array?1===h.length?i=n=o=a=h[0]:2===h.length?(i=o=h[0],n=a=h[1]):3===h.length?(i=h[0],n=a=h[1],o=h[2]):(i=h[0],n=h[1],o=h[2],a=h[3]):i=n=o=a=0;var c;i+n>l&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ye(t){return qe(t),d(t.rich,qe),t}function qe(t){if(t){t.font=Xe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Mb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ib[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function Ke(t,e,i,n,o,a){n.rich?Je(t,e,i,n,o,a):$e(t,e,i,n,o,a)}function $e(t,e,i,n,o,a){var r,s=ii(n),l=!1,u=e.__attrCachedBy===rb.PLAIN_TEXT;a!==sb?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?rb.NONE:rb.PLAIN_TEXT):u&&(e.__attrCachedBy=rb.NONE);var h=n.font||Sb;l&&h===(r.font||Sb)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=He(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ai(g,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ti(e,n,o,x,_);var S=Ee(_,g,b),M=x,I=S;if(s||d){var T=Le(i,c);d&&(T+=d[1]+d[3]);var A=Oe(x,T,w);s&&ni(t,e,n,A,S,T,g),d&&(M=hi(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(B=0;B<Tb.length;B++){var D=Tb[B],C=D[0],L=D[1],k=n[C];l&&k===r[C]||(e[L]=ab(e,L,k||D[2]))}I+=v/2;var P=n.textStrokeWidth,N=l?r.textStrokeWidth:null,O=!l||P!==N,E=!l||O||n.textStroke!==r.textStroke,R=si(n.textStroke,P),z=li(n.textFill);if(R&&(O&&(e.lineWidth=P),E&&(e.strokeStyle=R)),z&&(l&&n.textFill===r.textFill||(e.fillStyle=z)),1===m.length)R&&e.strokeText(m[0],M,I),z&&e.fillText(m[0],M,I);else for(var B=0;B<m.length;B++)R&&e.strokeText(m[B],M,I),z&&e.fillText(m[B],M,I),I+=v}function Je(t,e,i,n,o,a){a!==sb&&(e.__attrCachedBy=rb.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=Ze(i,n)),Qe(t,e,r,n,o)}function Qe(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=ai(s,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ti(e,n,o,h,c);var p=Oe(h,r,d),g=Ee(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;ii(n)&&ni(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)ei(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;C>=0&&"right"===(_=b[C]).textAlign;)ei(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)ei(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function ti(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function ei(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&ii(l)&&ni(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=hi(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ri(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ri(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ri(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ri(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ri(e,"textAlign",s),ri(e,"textBaseline","middle"),ri(e,"font",i.font||Sb);var d=si(l.textStroke||n.textStroke,p),f=li(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ri(e,"lineWidth",p),ri(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ri(e,"fillStyle",f),e.fillText(i.text,r,h))}function ii(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ni(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ri(e,"shadowBlur",i.textBoxShadowBlur||0),ri(e,"shadowColor",i.textBoxShadowColor||"transparent"),ri(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ri(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?je(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ri(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(w(s)){var d=s.image;(d=Ae(d,null,t,oi,s))&&Ce(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ri(e,"lineWidth",l),ri(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function oi(t,e){e.image=t}function ai(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ui(s[0],i.width),o=i.y+ui(s[1],i.height);else{var l=Re(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ri(t,e,i){return t[e]=ab(t,e,i),t[e]}function si(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function hi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function di(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ub(t.style,this),this._rect=null,this.__clipPaths=[]}function fi(t){di.call(this,t)}function pi(t){return parseInt(t,10)}function gi(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function mi(t,e,i){return Cb.copy(t.getBoundingRect()),t.transform&&Cb.applyTransform(t.transform),Lb.width=e,Lb.height=i,!Cb.intersect(Lb)}function vi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}function yi(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function xi(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function _i(t){return"mousewheel"===t&&U_.browser.firefox?"DOMMouseScroll":t}function wi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function bi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Si(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(Ob,function(e){t._handlers[e]=m(zb[e],t)}),d(Rb,function(e){t._handlers[e]=m(zb[e],t)}),d(Nb,function(i){t._handlers[i]=e(zb[i],t)})}function Mi(t){function e(e,i){d(e,function(e){ht(t,_i(e),i._handlers[e])},i)}fw.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},Si(this),U_.pointerEventsSupported?e(Rb,this):(U_.touchEventsSupported&&e(Ob,this),e(Nb,this))}function Ii(t,e){var i=new Wb(H_(),t,e);return Fb[i.id]=i,i}function Ti(t,e){Gb[t]=e}function Ai(t){delete Fb[t]}function Di(t){return t instanceof Array?t:null==t?[]:[t]}function Ci(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Li(t){return!Ub(t)||Xb(t)||t instanceof Date?t:t.value}function ki(t){return Ub(t)&&!(t instanceof Array)}function Pi(t,e){e=(e||[]).slice();var i=f(t||[],function(t,e){return{exist:t}});return Zb(e,function(t,n){if(Ub(t)){for(o=0;o<i.length;o++)if(!i[o].option&&null!=t.id&&i[o].exist.id===t.id+"")return i[o].option=t,void(e[n]=null);for(var o=0;o<i.length;o++){var a=i[o].exist;if(!(i[o].option||null!=a.id&&null!=t.id||null==t.name||Ei(t)||Ei(a)||a.name!==t.name+""))return i[o].option=t,void(e[n]=null)}}}),Zb(e,function(t,e){if(Ub(t)){for(var n=0;n<i.length;n++){var o=i[n].exist;if(!i[n].option&&!Ei(o)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}}),i}function Ni(t){var e=R();Zb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Zb(t,function(t,i){var n=t.option;k(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Zb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ub(o)){if(a.name=null!=o.name?o.name+"":n?n.name:jb+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Oi(t){var e=t.name;return!(!e||!e.indexOf(jb))}function Ei(t){return Ub(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ri(t,e){function i(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Di(t[n].dataIndex),s=i&&i[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function n(t,e){var i=[];for(var o in t)if(t.hasOwnProperty(o)&&null!=t[o])if(e)i.push(+o);else{var a=n(t[o],!0);a.length&&i.push({seriesId:o,dataIndex:a})}return i}var o={},a={};return i(t||[],o),i(e||[],a,o),[n(o),n(a)]}function zi(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Bi(){var t="__\0ec_inner_"+qb+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Vi(t,e,i){if(_(e)){var n={};n[e+"Index"]=0,e=n}var o=i&&i.defaultMainType;!o||Gi(e,o+"Index")||Gi(e,o+"Id")||Gi(e,o+"Name")||(e[o+"Index"]=0);var a={};return Zb(e,function(n,o){var n=e[o];if("dataIndex"!==o&&"dataIndexInside"!==o){var r=o.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],u=(r[2]||"").toLowerCase();if(!(!s||!u||null==n||"index"===u&&"none"===n||i&&i.includeMainTypes&&l(i.includeMainTypes,s)<0)){var h={mainType:s};"index"===u&&"all"===n||(h[u]=n);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[o]=n}),a}function Gi(t,e){return t&&t.hasOwnProperty(e)}function Fi(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Wi(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Hi(t){return"auto"===t?U_.domSupported?"html":"richText":t||"html"}function Zi(t,e){var i=R(),n=[];return d(t,function(t){var o=e(t);(i.get(o)||(n.push(o),i.set(o,[]))).push(t)}),{keys:n,buckets:i}}function Ui(t){var e={main:"",sub:""};return t&&(t=t.split(Kb),e.main=t[0]||"",e.sub=t[1]||""),e}function Xi(t){k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ji(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.superCall=qi,i.superApply=Ki,u(i,this),i.superClass=e,i}}function Yi(t){var e=["__\0is_clz",Jb++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function qi(t,e){var i=C(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Ki(t,e,i){return this.superClass.prototype[e].apply(t,i)}function $i(t,e){function i(t){var e=n[t.main];return e&&e[$b]||((e=n[t.main]={})[$b]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){return e&&(Xi(e),(e=Ui(e)).sub?e.sub!==$b&&(i(e)[e.sub]=t):n[e.main]=t),t},t.getClass=function(t,e,i){var o=n[t];if(o&&o[$b]&&(o=e?o[e]:null),i&&!o)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){t=Ui(t);var e=[],i=n[t.main];return i&&i[$b]?d(i,function(t,i){i!==$b&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=Ui(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=Ui(t);var e=n[t.main];return e&&e[$b]},t.parseClassType=Ui,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t}function Ji(t){return t>-rS&&t<rS}function Qi(t){return t>rS||t<-rS}function tn(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function en(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function nn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ji(h)&&Ji(c))Ji(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(Ji(p)){var g=c/h,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=aS(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-oS(-y,uS):oS(y,uS))+(x=x<0?-oS(-x,uS):oS(x,uS))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*aS(h*h*h)),w=Math.acos(_)/3,b=aS(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),m=(-s+b*(S+lS*Math.sin(w)))/(3*r),I=(-s+b*(S-lS*Math.sin(w)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function on(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ji(r))Qi(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if(Ji(u))o[0]=-a/(2*r);else if(u>0){var h=aS(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function an(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function rn(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;hS[0]=l,hS[1]=u;for(var y=0;y<1;y+=.05)cS[0]=tn(t,i,o,r,y),cS[1]=tn(e,n,a,s,y),(p=hw(hS,cS))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<sS);x++)d=c-m,f=c+m,cS[0]=tn(t,i,o,r,d),cS[1]=tn(e,n,a,s,d),p=hw(cS,hS),d>=0&&p<v?(c=d,v=p):(dS[0]=tn(t,i,o,r,f),dS[1]=tn(e,n,a,s,f),g=hw(dS,hS),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=tn(t,i,o,r,c),h[1]=tn(e,n,a,s,c)),aS(v)}function sn(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ln(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function un(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ji(a))Qi(r)&&(c=-s/r)>=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if(Ji(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=aS(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function hn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function cn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function dn(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;hS[0]=r,hS[1]=s;for(var d=0;d<1;d+=.05)cS[0]=sn(t,i,o,d),cS[1]=sn(e,n,a,d),(m=hw(hS,cS))<c&&(u=d,c=m);c=1/0;for(var f=0;f<32&&!(h<sS);f++){var p=u-h,g=u+h;cS[0]=sn(t,i,o,p),cS[1]=sn(e,n,a,p);var m=hw(cS,hS);if(p>=0&&m<c)u=p,c=m;else{dS[0]=sn(t,i,o,g),dS[1]=sn(e,n,a,g);var v=hw(dS,hS);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=sn(t,i,o,u),l[1]=sn(e,n,a,u)),aS(c)}function fn(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)o=t[n],a=fS(a,o[0]),r=pS(r,o[0]),s=fS(s,o[1]),l=pS(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function pn(t,e,i,n,o,a){o[0]=fS(t,i),o[1]=fS(e,n),a[0]=pS(t,i),a[1]=pS(e,n)}function gn(t,e,i,n,o,a,r,s,l,u){var h,c=on,d=tn,f=c(t,i,o,r,wS);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,o,r,wS[h]);l[0]=fS(p,l[0]),u[0]=pS(p,u[0])}for(f=c(e,n,a,s,bS),h=0;h<f;h++){var g=d(e,n,a,s,bS[h]);l[1]=fS(g,l[1]),u[1]=pS(g,u[1])}l[0]=fS(t,l[0]),u[0]=pS(t,u[0]),l[0]=fS(r,l[0]),u[0]=pS(r,u[0]),l[1]=fS(e,l[1]),u[1]=pS(e,u[1]),l[1]=fS(s,l[1]),u[1]=pS(s,u[1])}function mn(t,e,i,n,o,a,r,s){var l=hn,u=sn,h=pS(fS(l(t,i,o),1),0),c=pS(fS(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c);r[0]=fS(t,o,d),r[1]=fS(e,a,f),s[0]=pS(t,o,d),s[1]=pS(e,a,f)}function vn(t,e,i,n,o,a,r,s,l){var u=tt,h=et,c=Math.abs(o-a);if(c%vS<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(yS[0]=mS(o)*i+t,yS[1]=gS(o)*n+e,xS[0]=mS(a)*i+t,xS[1]=gS(a)*n+e,u(s,yS,xS),h(l,yS,xS),(o%=vS)<0&&(o+=vS),(a%=vS)<0&&(a+=vS),o>a&&!r?a+=vS:o<a&&r&&(o+=vS),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)f>o&&(_S[0]=mS(f)*i+t,_S[1]=gS(f)*n+e,u(s,_S,s),h(l,_S,l))}function yn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||r<e-s&&r<n-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var h=(l=(e-n)/(t-i))*a-r+(u=(t*n-i*e)/(t-i));return h*h/(l*l+1)<=s/2*s/2}function xn(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>n+c&&h>a+c&&h>s+c||h<e-c&&h<n-c&&h<a-c&&h<s-c||u>t+c&&u>i+c&&u>o+c&&u>r+c||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&rn(t,e,i,n,o,a,r,s,u,h,null)<=c/2}function _n(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>i+u&&s>o+u||s<t-u&&s<i-u&&s<o-u)&&dn(t,e,i,n,o,a,s,l,null)<=u/2}function wn(t){return(t%=RS)<0&&(t+=RS),t}function bn(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||h+u<i)return!1;if(Math.abs(n-o)%zS<1e-4)return!0;if(a){var c=n;n=wn(o),o=wn(c)}else n=wn(n),o=wn(o);n>o&&(o+=zS);var d=Math.atan2(l,s);return d<0&&(d+=zS),d>=n&&d<=o||d+zS>=n&&d+zS<=o}function Sn(t,e,i,n,o,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(r=n<e?.5:-.5);var l=s*(i-t)+t;return l===o?1/0:l>o?r:0}function Mn(t,e){return Math.abs(t-e)<GS}function In(){var t=WS[0];WS[0]=WS[1],WS[1]=t}function Tn(t,e,i,n,o,a,r,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var h=nn(e,n,a,s,u,FS);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;g<h;g++){var m=FS[g],v=0===m||1===m?.5:1;tn(t,i,o,r,m)<l||(p<0&&(p=on(e,n,a,s,WS),WS[1]<WS[0]&&p>1&&In(),c=tn(e,n,a,s,WS[0]),p>1&&(d=tn(e,n,a,s,WS[1]))),2===p?m<WS[0]?f+=c<e?v:-v:m<WS[1]?f+=d<c?v:-v:f+=s<d?v:-v:m<WS[0]?f+=c<e?v:-v:f+=s<c?v:-v)}return f}function An(t,e,i,n,o,a,r,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=un(e,n,a,s,FS);if(0===l)return 0;var u=hn(e,n,a);if(u>=0&&u<=1){for(var h=0,c=sn(e,n,a,u),d=0;d<l;d++){f=0===FS[d]||1===FS[d]?.5:1;(p=sn(t,i,o,FS[d]))<r||(FS[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}var f=0===FS[0]||1===FS[0]?.5:1,p=sn(t,i,o,FS[0]);return p<r?0:a<e?f:-f}function Dn(t,e,i,n,o,a,r,s){if((s-=e)>i||s<-i)return 0;u=Math.sqrt(i*i-s*s);FS[0]=-u,FS[1]=u;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%VS<1e-4){n=0,o=VS;p=a?1:-1;return r>=FS[0]+t&&r<=FS[1]+t?p:0}if(a){var u=n;n=wn(o),o=wn(u)}else n=wn(n),o=wn(o);n>o&&(o+=VS);for(var h=0,c=0;c<2;c++){var d=FS[c];if(d+t>r){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=VS+f),(f>=n&&f<=o||f+VS>=n&&f+VS<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function Cn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===BS.M&&h>1&&(i||(a+=Sn(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case BS.M:r=l=t[h++],s=u=t[h++];break;case BS.L:if(i){if(yn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=Sn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.C:if(i){if(xn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Tn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.Q:if(i){if(_n(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=An(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?a+=Sn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(bn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=Dn(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case BS.R:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(yn(l,u,x,u,e,n,o)||yn(x,u,x,_,e,n,o)||yn(x,_,l,_,e,n,o)||yn(l,_,l,u,e,n,o))return!0}else a+=Sn(x,u,x,_,n,o),a+=Sn(l,_,l,u,n,o);break;case BS.Z:if(i){if(yn(r,s,l,u,e,n,o))return!0}else a+=Sn(r,s,l,u,n,o);r=l,s=u}}return i||Mn(s,u)||(a+=Sn(r,s,l,u,n,o)||0),0!==a}function Ln(t,e,i){return Cn(t,0,!1,e,i)}function kn(t,e,i,n){return Cn(t,e,!0,i,n)}function Pn(t){di.call(this,t),this.path=null}function Nn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(tM/180),d=QS(c)*(t-i)/2+JS(c)*(e-n)/2,f=-1*JS(c)*(t-i)/2+QS(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=$S(p),s*=$S(p));var g=(o===a?-1:1)*$S((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+QS(c)*m-JS(c)*v,x=(e+n)/2+JS(c)*m+QS(c)*v,_=nM([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=nM(w,b);iM(w,b)<=-1&&(S=tM),iM(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*tM),1===a&&S<0&&(S+=2*tM),h.addData(u,y,x,r,s,_,S,c,a)}function On(t){if(!t)return new ES;for(var e,i=0,n=0,o=i,a=n,r=new ES,s=ES.CMD,l=t.match(oM),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(aM)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Nn(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Nn(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),i=o,n=a),e=h}return r.toStatic(),r}function En(t,e){var i=On(t);return e=e||{},e.buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){KS(i,t),this.dirty(!0)},e}function Rn(t,e){return new Pn(En(t,e))}function zn(t,e){return Pn.extend(En(t,e))}function Bn(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Vn(t,e,i){var n=e.points,o=e.smooth;if(n&&n.length>=2){if(o&&"spline"!==o){var a=fM(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=dM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Gn(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x1,a=e.x2,r=e.y1,s=e.y2;mM(2*o)===mM(2*a)?t.x1=t.x2=Wn(o,n,!0):(t.x1=o,t.x2=a),mM(2*r)===mM(2*s)?t.y1=t.y2=Wn(r,n,!0):(t.y1=r,t.y2=s)}}function Fn(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x,a=e.y,r=e.width,s=e.height;t.x=Wn(o,n,!0),t.y=Wn(a,n,!0),t.width=Math.max(Wn(o+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(Wn(a+s,n,!1)-t.y,0===s?0:1)}}function Wn(t,e,i){var n=mM(2*t);return(n+mM(e))%2==0?n/2:(n+(i?1:-1))/2}function Hn(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?en:tn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?en:tn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ln:sn)(t.x1,t.cpx1,t.x2,e),(i?ln:sn)(t.y1,t.cpy1,t.y2,e)]}function Zn(t){di.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Un(t){return Pn.extend(t)}function Xn(t,e,i,n){var o=Rn(t,e);return i&&("center"===n&&(i=Yn(i,o.getBoundingRect())),qn(o,i)),o}function jn(t,e,i){var n=new fi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var o={width:t.width,height:t.height};n.setStyle(Yn(e,o))}}});return n}function Yn(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}function qn(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Kn(t){var e=t.shape,i=t.style.lineWidth;return CM(2*e.x1)===CM(2*e.x2)&&(e.x1=e.x2=Jn(e.x1,i,!0)),CM(2*e.y1)===CM(2*e.y2)&&(e.y1=e.y2=Jn(e.y1,i,!0)),t}function $n(t){var e=t.shape,i=t.style.lineWidth,n=e.x,o=e.y,a=e.width,r=e.height;return e.x=Jn(e.x,i,!0),e.y=Jn(e.y,i,!0),e.width=Math.max(Jn(n+a,i,!1)-e.x,0===a?0:1),e.height=Math.max(Jn(o+r,i,!1)-e.y,0===r?0:1),t}function Jn(t,e,i){var n=CM(2*t);return(n+CM(e))%2==0?n/2:(n+(i?1:-1))/2}function Qn(t){return null!=t&&"none"!==t}function to(t){if("string"!=typeof t)return t;var e=EM.get(t);return e||(e=Ht(t,-.1),RM<1e4&&(EM.set(t,e),RM++)),e}function eo(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}function io(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.useHoverLayer;t.__highlighted=i?"layer":"plain";var n=t.__zr;if(n||!i){var o=t,a=t.style;i&&(a=(o=n.addHover(t)).style),bo(a),i||eo(o),a.extendFrom(e),no(a,e,"fill"),no(a,e,"stroke"),wo(a),i||(t.dirty(!1),t.z2+=NM)}}}function no(t,e,i){!Qn(e[i])&&Qn(t[i])&&(t[i]=to(t[i]))}function oo(t){var e=t.__highlighted;if(e)if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removeHover(t);else if(e){var i=t.style,n=t.__cachedNormalStl;n&&(bo(i),t.setStyle(n),wo(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o===NM&&(t.z2=o)}}function ao(t,e){t.isGroup?t.traverse(function(t){!t.isGroup&&e(t)}):e(t)}function ro(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,oo(t),io(t))}function so(t){return t&&t.__isEmphasisEntered}function lo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&ao(this,io)}function uo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&ao(this,oo)}function ho(){this.__isEmphasisEntered=!0,ao(this,io)}function co(){this.__isEmphasisEntered=!1,ao(this,oo)}function fo(t,e,i){t.isGroup?t.traverse(function(t){!t.isGroup&&ro(t,t.hoverStyle||e)}):ro(t,t.hoverStyle||e),po(t,i)}function po(t,e){var i=!1===e;if(t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,!i||t.__hoverStyleTrigger){var n=i?"off":"on";t[n]("mouseover",lo)[n]("mouseout",uo),t[n]("emphasis",ho)[n]("normal",co),t.__hoverStyleTrigger=!i}}function go(t,e,i,n,o,a,r){var s,l=(o=o||PM).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=x(o.defaultText)?o.defaultText(u,o):o.defaultText));var f=c?s:null,p=d?A(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==f&&null==p||(mo(t,i,a,o),mo(e,n,r,o,!0)),t.text=f,e.text=p}function mo(t,e,i,n,o){return vo(t,e,n,o),i&&a(t,i),t}function vo(t,e,i,n){if((i=i||PM).isRectText){var o=e.getShallow("position")||(n?null:"inside");"outside"===o&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=A(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=yo(e);if(u){r={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);xo(r[h]={},c,l,i,n)}}return t.rich=r,xo(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function yo(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||PM).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function xo(t,e,i,n,o,a){i=!o&&i||PM,t.textFill=_o(e.getShallow("color"),n)||i.color,t.textStroke=_o(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=A(e.getShallow("textBorderWidth"),i.textBorderWidth),t.insideRawTextPosition=t.textPosition,o||(a&&(t.insideRollbackOpt=n,wo(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=_o(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=_o(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function _o(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function wo(t){var e=t.insideRollbackOpt;if(e&&null==t.textFill){var i,n=e.useInsideStyle,o=t.insideRawTextPosition,a=e.autoColor;!1!==n&&(!0===n||e.isRectText&&o&&"string"==typeof o&&o.indexOf("inside")>=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function bo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function So(t,e){var i=e||e.getModel("textStyle");return P([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Mo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Io(t,e,i,n,o){Mo(!0,t,e,i,n,o)}function To(t,e,i,n,o){Mo(!1,t,e,i,n,o)}function Ao(t,e){for(var i=_t([]);t&&t!==e;)bt(i,t.getLocalTransform(),i),t=t.parent;return i}function Do(t,e,i){return e&&!c(e)&&(e=Tw.getLocalTransform(e)),i&&(e=Tt([],e)),Q([],t,e)}function Co(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Do(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lo(t,e,i,n){function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Io(t,n,i,t.dataIndex)}}})}}function ko(t,e){return f(t,function(t){var i=t[0];i=LM(i,e.x),i=kM(i,e.x+e.width);var n=t[1];return n=LM(n,e.y),n=kM(n,e.y+e.height),[i,n]})}function Po(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new fi(e)):Xn(t.replace("path://",""),e,i,"center")}function No(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Oo(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function Eo(t,e){var i=HM(t).getParent;return i?i.call(t,e):t.parentModel}function Ro(t){return[t||"",ZM++,Math.random().toFixed(5)].join("_")}function zo(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Bo(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0===o)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(o>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Vo(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?zo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Go(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Fo(t){return t.sort(function(t,e){return t-e}),t}function Wo(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ho(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Zo(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Uo(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,g=u.length;d<g;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Xo(t){var e=2*Math.PI;return(t%e+e)%e}function jo(t){return t>-UM&&t<UM}function Yo(t){if(t instanceof Date)return t;if("string"==typeof t){var e=jM.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function qo(t){return Math.pow(10,Ko(t))}function Ko(t){return Math.floor(Math.log(t)/Math.LN10)}function $o(t,e){var i,n=Ko(t),o=Math.pow(10,n),a=t/o;return i=e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10,t=i*o,n>=-20?+t.toFixed(n<0?-n:0):t}function Jo(t){function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]==(n?-1:1)||!n&&e(t,i,1))}t.sort(function(t,i){return e(t,i,0)?-1:1});for(var i=-1/0,n=1,o=0;o<t.length;){for(var a=t[o].interval,r=t[o].close,s=0;s<2;s++)a[s]<=i&&(a[s]=i,r[s]=s?1:1-n),i=a[s],n=r[s];a[0]===a[1]&&r[0]*r[1]!=1?t.splice(o,1):o++}return t}function Qo(t){return t-parseFloat(t)>=0}function ta(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ea(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function ia(t){return null==t?"":(t+"").replace(KM,function(t,e){return $M[e]})}function na(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=JM[a];t=t.replace(QM(r),QM(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(QM(JM[l],s),i?ia(u):u)}return t}function oa(t,e,i){return d(e,function(e,n){t=t.replace("{"+n+"}",i?ia(e):e)}),t}function aa(t,e){var i=(t=_(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,e=t.extraCssText,o=t.renderMode||"html",a=t.markerId||"X";return i?"html"===o?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ia(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+ia(i)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function ra(t,e){return t+="","0000".substr(0,e-t.length)+t}function sa(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yo(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",ra(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",ra(s,2)).replace("d",s).replace("hh",ra(l,2)).replace("h",l).replace("mm",ra(u,2)).replace("m",u).replace("ss",ra(h,2)).replace("s",h).replace("SSS",ra(c,3))}function la(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ua(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function ha(t,e,i){var n=e.width,o=e.height,a=Vo(t.x,n),r=Vo(t.y,o),s=Vo(t.x2,n),l=Vo(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=qM(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function ca(t,e,i){i=qM(i||0);var n=e.width,o=e.height,a=Vo(t.left,n),r=Vo(t.top,o),s=Vo(t.right,n),l=Vo(t.bottom,o),u=Vo(t.width,n),h=Vo(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/o?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new de(a+i[3],r+i[0],u,h);return p.margin=i,p}function da(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new de(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=ca(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function fa(t,e){return null!=t[oI[e][0]]||null!=t[oI[e][1]]&&null!=t[oI[e][2]]}function pa(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(iI(i,function(e){u[e]=t[e]}),iI(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;c<i.length;c++){var d=i[c];if(!o(r,d)&&o(t,d)){r[d]=t[d];break}}return r}return u}function o(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function r(t,e,i){iI(t,function(t){e[t]=i[t]})}!w(i)&&(i={});var s=i.ignoreSize;!y(s)&&(s=[s,s]);var l=n(oI[0],0),u=n(oI[1],1);r(oI[0],t,l),r(oI[1],t,u)}function ga(t){return ma({},t)}function ma(t,e){return e&&t&&iI(nI,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function va(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}function ya(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},n=fI[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function xa(t){return"category"===t.get("type")}function _a(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===vI?{}:[]),this.sourceFormat=t.sourceFormat||yI,this.seriesLayoutBy=t.seriesLayoutBy||_I,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function wa(t){var e=t.option.source,i=yI;if(S(e))i=xI;else if(y(e)){0===e.length&&(i=gI);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(y(a)){i=gI;break}if(w(a)){i=mI;break}}}}else if(w(e)){for(var r in e)if(e.hasOwnProperty(r)&&c(e[r])){i=vI;break}}else if(null!=e)throw new Error("Invalid data");bI(t).sourceFormat=i}function ba(t){return bI(t).source}function Sa(t){bI(t).datasetMap=R()}function Ma(t){var e=t.option,i=e.data,n=S(i)?xI:pI,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=La(t);if(l){var u=l.option;i=u.source,n=bI(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=Ia(i,n,a,r,s),c=e.encode;!c&&l&&(c=Ca(t,l,i,n,a,h)),bI(t).source=new _a({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function Ia(t,e,i,n,o){if(!t)return{dimensionsDefine:Ta(o)};var a,r,s;if(e===gI)"auto"===n||null==n?Aa(function(t){null!=t&&"-"!==t&&(_(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Aa(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===wI?t.length:t[0]?t[0].length:null;else if(e===mI)o||(o=Da(t),s=!0);else if(e===vI)o||(o=[],s=!0,d(t,function(t,e){o.push(e)}));else if(e===pI){var l=Li(t[0]);a=y(l)&&l.length||1}var u;return s&&d(o,function(t,e){"name"===(w(t)?t.name:t)&&(u=e)}),{startIndex:r,dimensionsDefine:Ta(o),dimensionsDetectCount:a,potentialNameDimIndex:u}}function Ta(t){if(t){var e=R();return f(t,function(t,i){if(null==(t=a({},w(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Aa(t,e,i,n){if(null==n&&(n=1/0),e===wI)for(a=0;a<i.length&&a<n;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;a<o.length&&a<n;a++)t(o[a],a)}function Da(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return d(e,function(t,e){n.push(e)}),n}}function Ca(t,e,i,n,o,a){var r=ya(t),s={},l=[],u=[],h=t.subType,c=R(["pie","map","funnel"]),f=R(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(r&&null!=f.get(h)){var p=t.ecModel,g=bI(p).datasetMap,m=e.uid+"_"+o,v=g.get(m)||g.set(m,{categoryWayDim:1,valueWayDim:0});d(r.coordSysDims,function(t){if(null==r.firstCategoryDimIndex){e=v.valueWayDim++;s[t]=e,u.push(e)}else if(r.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=v.categoryWayDim++;s[t]=e,u.push(e)}})}else if(null!=c.get(h)){for(var y,x=0;x<5&&null==y;x++)Pa(i,n,o,a.dimensionsDefine,a.startIndex,x)||(y=x);if(null!=y){s.value=y;var _=a.potentialNameDimIndex||Math.max(y-1,0);u.push(_),l.push(_)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function La(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function ka(t,e){return Pa(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Pa(t,e,i,n,o,a){function r(t){return(null==t||!isFinite(t)||""===t)&&(!(!_(t)||"-"===t)||void 0)}var s;if(S(t))return!1;var l;if(n&&(l=w(l=n[a])?l.name:l),e===gI)if(i===wI){for(var u=t[a],h=0;h<(u||[]).length&&h<5;h++)if(null!=(s=r(u[o+h])))return s}else for(h=0;h<t.length&&h<5;h++){var c=t[o+h];if(c&&null!=(s=r(c[a])))return s}else if(e===mI){if(!l)return;for(h=0;h<t.length&&h<5;h++)if((d=t[h])&&null!=(s=r(d[l])))return s}else if(e===vI){if(!l)return;if(!(u=t[l])||S(u))return!1;for(h=0;h<u.length&&h<5;h++)if(null!=(s=r(u[h])))return s}else if(e===pI)for(h=0;h<t.length&&h<5;h++){var d=t[h],f=Li(d);if(!y(f))return!1;if(null!=(s=r(f[a])))return s}return!1}function Na(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}function Oa(t,e){var o=t.color&&!t.colorLayer;d(e,function(e,a){"colorLayer"===a&&o||lI.hasClass(a)||("object"==typeof e?t[a]=t[a]?n(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function Ea(t){t=t,this.option={},this.option[SI]=1,this._componentsMap=R({series:[]}),this._seriesIndices,this._seriesIndicesMap,Oa(t,this._theme.option),n(t,hI,!1),this.mergeOption(t)}function Ra(t,e){y(e)||(e=e?[e]:[]);var i={};return d(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function za(t,e,i){return e.type?e.type:i?i.subType:lI.determineSubType(t,e)}function Ba(t,e){t._seriesIndicesMap=R(t._seriesIndices=f(e,function(t){return t.componentIndex})||[])}function Va(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function Ga(t){d(II,function(e){this[e]=m(t[e],t)},this)}function Fa(){this._coordinateSystems=[]}function Wa(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Ha(t,e,i){var n,o,a=[],r=[],s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;AI(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return o||(o=t),o.timeline||(o.timeline=s),AI([o].concat(a).concat(f(r,function(t){return t.option})),function(t){AI(e,function(e){e(t,i)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:r}}function Za(t,e,i){var n={width:e,height:i,aspectratio:e/i},o=!0;return d(t,function(t,e){var i=e.match(kI);if(i&&i[1]&&i[2]){var a=i[1],r=i[2].toLowerCase();Ua(n[r],t,a)||(o=!1)}}),o}function Ua(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e}function Xa(t,e){return t.join(",")===e.join(",")}function ja(t,e){AI(e=e||{},function(e,i){if(null!=e){var n=t[i];if(lI.hasClass(i)){e=Di(e);var o=Pi(n=Di(n),e);t[i]=CI(o,function(t){return t.option&&t.exist?LI(t.exist,t.option,!0):t.exist||t.option})}else t[i]=LI(n,e,!0)}})}function Ya(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=OI.length;i<o;i++){var a=OI[i],r=e.normal,s=e.emphasis;r&&r[a]&&(t[a]=t[a]||{},t[a].normal?n(t[a].normal,r[a]):t[a].normal=r[a],r[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?n(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function qa(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,r(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function Ka(t){qa(t,"itemStyle"),qa(t,"lineStyle"),qa(t,"areaStyle"),qa(t,"label"),qa(t,"labelLine"),qa(t,"upperLabel"),qa(t,"edgeLabel")}function $a(t,e){var i=NI(t)&&t[e],n=NI(i)&&i.textStyle;if(n)for(var o=0,a=Yb.length;o<a;o++){var e=Yb[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Ja(t){t&&(Ka(t),$a(t,"label"),t.emphasis&&$a(t.emphasis,"label"))}function Qa(t){if(NI(t)){Ya(t),Ka(t),$a(t,"label"),$a(t,"upperLabel"),$a(t,"edgeLabel"),t.emphasis&&($a(t.emphasis,"label"),$a(t.emphasis,"upperLabel"),$a(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Ya(e),Ja(e));var i=t.markLine;i&&(Ya(i),Ja(i));var n=t.markArea;n&&Ja(n);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!S(a))for(s=0;s<a.length;s++)Ja(a[s]);d(t.categories,function(t){Ka(t)})}if(o&&!S(o))for(s=0;s<o.length;s++)Ja(o[s]);if((e=t.markPoint)&&e.data)for(var r=e.data,s=0;s<r.length;s++)Ja(r[s]);if((i=t.markLine)&&i.data)for(var l=i.data,s=0;s<l.length;s++)y(l[s])?(Ja(l[s][0]),Ja(l[s][1])):Ja(l[s]);"gauge"===t.type?($a(t,"axisLabel"),$a(t,"title"),$a(t,"detail")):"treemap"===t.type?(qa(t.breadcrumb,"itemStyle"),d(t.levels,function(t){Ka(t)})):"tree"===t.type&&Ka(t.leaves)}}function tr(t){return y(t)?t:t?[t]:[]}function er(t){return(y(t)?t[0]:t)||{}}function ir(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}function nr(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];(n||null==a[e[r]])&&(a[e[r]]=i)}function or(t){d(RI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function ar(t){d(t,function(e,i){var n=[],o=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],r=e.data,s=e.isStackedByIndex,l=r.map(a,function(a,l,u){var h=r.get(e.stackedDimension,u);if(isNaN(h))return o;var c,d;s?d=r.getRawIndex(u):c=r.get(e.stackedByDimension,u);for(var f=NaN,p=i-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function rr(t,e){_a.isInstance(t)||(t=_a.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===xI&&(this._offset=0,this._dimSize=e,this._data=i),a(this,GI[n===gI?n+"_"+t.seriesLayoutBy:n])}function sr(){return this._data.length}function lr(t){return this._data[t]}function ur(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function hr(t,e,i,n){return null!=i?t[i]:t}function cr(t,e,i,n){return dr(t[n],this._dimensionInfos[e])}function dr(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Yo(t)),null==t||""===t?NaN:+t}function fr(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),FI[r](n,e,a,o)}}}function pr(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===pI||n===mI){var o=t.getRawDataItem(e);return n!==pI||w(o)||(o=null),o?o[i]:void 0}}}function gr(t){return new mr(t)}function mr(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function vr(t,e,i,n,o,a){XI.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:XI.next},t.context)}function yr(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var i,n;!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),y(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}function xr(t){var e=t.name;Oi(t)||(t.name=_r(t)||e)}function _r(t){var e=t.getRawData(),i=[];return d(e.mapDimension("seriesName",!0),function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function wr(t){return t.model.getRawData().count()}function br(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Sr}function Sr(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Mr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Ir,e))})}function Ir(t){var e=Tr(t);e&&e.setOutputEnd(this.count())}function Tr(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}function Ar(){this.group=new tb,this.uid=Ro("viewChart"),this.renderTask=gr({plan:Lr,reset:kr}),this.renderTask.context={view:this}}function Dr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)Dr(t.childAt(i),e)}function Cr(t,e,i){var n=zi(t,e);null!=n?d(Di(n),function(e){Dr(t.getItemGraphicEl(e),i)}):t.eachItemGraphicEl(function(t){Dr(t,i)})}function Lr(t){return QI(t.model)}function kr(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&JI(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),eT[l]}function Pr(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}var o,a,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){o=(new Date).getTime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,a=o-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):a>=0?n():c=setTimeout(n,-a),u=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Nr(t,e,i,n){var o=t[e];if(o){var a=o[iT]||o,r=o[oT];if(o[nT]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Pr(a,i,"debounce"===n))[iT]=a,o[oT]=n,o[nT]=i}return o}}function Or(t,e){var i=t[e];i&&i[iT]&&(t[e]=i[iT])}function Er(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=R()}function Rr(t,e,i,n,o){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),hT(h,n);var f=t.getPerformArgs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),hT(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function zr(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,gr({plan:Hr,reset:Zr,count:Xr}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},jr(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,o).each(a);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Br(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,gr({reset:Gr,onDirty:Wr})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,jr(t,e,n)}var r=i.overallTask=i.overallTask||gr({reset:Vr});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||R(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,d(n.getSeries(),a));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Vr(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gr(t,e){return t.overallProgress&&Fr}function Fr(){this.agent.dirty(),this.getDownstream().dirty()}function Wr(){this.agent&&this.agent.dirty()}function Hr(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zr(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Di(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Ur(e)}):cT}function Ur(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a<e.end;a++)o.dataEach(n,a);else o&&o.progress&&o.progress(e,n)}}function Xr(t){return t.data.count()}function jr(t,e,i){var n=e.uid,o=t._pipelineMap.get(n);!o.head&&(o.head=i),o.tail&&o.tail.pipe(i),o.tail=i,i.__idxInPipeline=o.count++,i.__pipeline=o}function Yr(t){dT=null;try{t(fT,pT)}catch(t){}return dT}function qr(t,e){for(var i in e.prototype)t[i]=B}function Kr(t){for(_(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function $r(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Jr(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}function Qr(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),r(e.__inheritedStyle,t.__inheritedStyle))}function ts(t){for(var e=P(t).split(_T),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}function es(t,e,i,n){var o=e.__inheritedStyle||{},r="text"===e.type;if(1===t.nodeType&&(ns(t,e),a(o,os(t)),!n))for(var s in ST)if(ST.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(o[ST[s]]=l)}var u=r?"textFill":"fill",h=r?"textStroke":"stroke";e.style=e.style||new ub;var c=e.style;null!=o.fill&&c.set(u,is(o.fill,i)),null!=o.stroke&&c.set(h,is(o.stroke,i)),d(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&r?"textStrokeWidth":t;null!=o[t]&&c.set(e,parseFloat(o[t]))}),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),d(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=o[t]&&c.set(t,o[t])}),o.lineDash&&(e.style.lineDash=P(o.lineDash).split(_T)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=o}function is(t,e){var i=e&&t&&t.match(MT);return i?e[P(i[1])]:t}function ns(t,e){var i=t.getAttribute("transform");if(i){var n=null,o=[];(i=i.replace(/,/g," ")).replace(IT,function(t,e,i){o.push(e,i)});for(var a=o.length-1;a>0;a-=2){var r=o[a],s=o[a-1];switch(n=n||xt(),s){case"translate":r=P(r).split(_T),St(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=P(r).split(_T),It(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=P(r).split(_T),Mt(n,n,parseFloat(r[0]));break;case"skew":r=P(r).split(_T),console.warn("Skew transform is not supported yet");break;case"matrix":r=P(r).split(_T);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function os(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};TT.lastIndex=0;for(var o;null!=(o=TT.exec(e));)n[o[1]]=o[2];for(var a in ST)ST.hasOwnProperty(a)&&null!=n[a]&&(i[ST[a]]=n[a]);return i}function as(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function rs(t,e){return(new $r).parse(t,e)}function ss(t){return function(e,i,n){e=e&&e.toLowerCase(),fw.prototype[t].call(this,e,i,n)}}function ls(){fw.call(this)}function us(t,e,n){function o(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=JT[e]),this.id,this.group,this._dom=t;var a=this._zr=Ii(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Pr(m(a.flush,a),17),(e=i(e))&&BI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Fa;var r=this._api=As(this);_e($T,o),_e(YT,o),this._scheduler=new Er(this,r,YT,$T),fw.call(this,this._ecEventProcessor=new Ds),this._messageCenter=new ls,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),vs(a,this),N(this)}function hs(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Vi(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}function cs(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),ys(t,"component",e,i),ys(t,"chart",e,i),i.plan()}function ds(t,e,i,n,o){function a(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}var r=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};o&&(l.subType=o);var u=i.excludeSeriesId;null!=u&&(u=R(Di(u))),r&&r.eachComponent(l,function(e){u&&null!=u.get(e.id)||a(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else kT(t._componentsViews.concat(t._chartsViews),a)}function fs(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function ps(t,e){var i=t.type,n=t.escapeConnect,o=XT[i],s=o.actionInfo,l=(s.update||"update").split(":"),u=l.pop();l=null!=l[0]&&OT(l[0]),this[GT]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=f(t.batch,function(e){return e=r(a({},e),t),e.batch=null,e}));var d,p=[],g="highlight"===i||"downplay"===i;kT(h,function(t){d=o.action(t,this._model,this._api),(d=d||a({},t)).type=s.event||d.type,p.push(d),g?ds(this,u,t,"series"):l&&ds(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[FT]?(cs(this),ZT.update.call(this,t),this[FT]=!1):ZT[u].call(this,t)),d=c?{type:s.event||i,escapeConnect:n,batch:p}:p[0],this[GT]=!1,!e&&this._messageCenter.trigger(d.type,d)}function gs(t){for(var e=this._pendingActions;e.length;){var i=e.shift();ps.call(this,i,t)}}function ms(t){!t&&this.trigger("updated")}function vs(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[FT]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function ys(t,e,i,n){function o(t){var e="_ec_"+t.id+"_"+t.type,o=s[e];if(!o){var h=OT(t.type);(o=new(a?qI.getClass(h.main,h.sub):Ar.getClass(h.sub))).init(i,u),s[e]=o,r.push(o),l.add(o.group)}t.__viewId=o.__id=e,o.__alive=!0,o.__model=t,o.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!a&&n.prepareView(o,t,i,u)}for(var a="component"===e,r=a?t._componentsViews:t._chartsViews,s=a?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<r.length;h++)r[h].__alive=!1;a?i.eachComponent(function(t,e){"series"!==t&&o(e)}):i.eachSeries(o);for(h=0;h<r.length;){var c=r[h];c.__alive?h++:(!a&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,u),r.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function xs(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function _s(t,e,i,n){ws(t,e,i,n),kT(t._chartsViews,function(t){t.__alive=!1}),bs(t,e,i,n),kT(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function ws(t,e,i,n,o){kT(o||t._componentsViews,function(t){var o=t.__model;t.render(o,e,i,n),Ts(o,t)})}function bs(t,e,i,n,o){var a,r=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;r.updatePayload(s,n),o&&o.get(e.uid)&&s.dirty(),a|=s.perform(r.getPerformArgs(s)),i.group.silent=!!e.get("silent"),Ts(e,i),Is(e,i)}),r.unfinished|=a,Ms(t._zr,e),sT(t._zr.dom,e)}function Ss(t,e){kT(KT,function(i){i(t,e)})}function Ms(t,e){var i=t.storage,n=0;i.traverse(function(t){t.isGroup||n++}),n>e.get("hoverLayerThreshold")&&!U_.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Is(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function Ts(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function As(t){var e=t._coordSysMgr;return a(new Ga(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Ds(){this.eventInfo}function Cs(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][i]=e}var i="__connectUpdateStatus";kT(jT,function(n,o){t._messageCenter.on(o,function(n){if(eA[t.group]&&0!==t[i]){if(n&&n.escapeConnect)return;var o=t.makeActionFromEvent(n),a=[];kT(tA,function(e){e!==t&&e.group===t.group&&a.push(e)}),e(a,0),kT(a,function(t){1!==t[i]&&t.dispatchAction(o)}),e(a,2)}})})}function Ls(t){eA[t]=!1}function ks(t){return tA[Wi(t,oA)]}function Ps(t,e){JT[t]=e}function Ns(t){qT.push(t)}function Os(t,e){Vs(YT,t,e,RT)}function Es(t,e,i){"function"==typeof e&&(i=e,e="");var n=NT(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,LT(WT.test(n)&&WT.test(e)),XT[n]||(XT[n]={action:i,actionInfo:t}),jT[e]=n}function Rs(t,e){Fa.register(t,e)}function zs(t,e){Vs($T,t,e,zT,"layout")}function Bs(t,e){Vs($T,t,e,BT,"visual")}function Vs(t,e,i,n,o){(PT(e)||NT(e))&&(i=e,e=n);var a=Er.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function Gs(t,e){QT[t]=e}function Fs(t){return lI.extend(t)}function Ws(t){return qI.extend(t)}function Hs(t){return YI.extend(t)}function Zs(t){return Ar.extend(t)}function Us(t){return t}function Xs(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Us,this._newKeyGetter=n||Us,this.context=o}function js(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}function Ys(t){var e={},i=e.encode={},n=R(),o=[],a=[];d(t.dimensions,function(e){var r=t.getDimensionInfo(e),s=r.coordDim;if(s){var l=i[s];i.hasOwnProperty(s)||(l=i[s]=[]),l[r.coordDimIndex]=e,r.isExtraCoord||(n.set(s,1),Ks(r.type)&&(o[0]=e)),r.defaultTooltip&&a.push(e)}sA.each(function(t,e){var n=i[e];i.hasOwnProperty(e)||(n=i[e]=[]);var o=r.otherDims[e];null!=o&&!1!==o&&(n[o]=r.name)})});var r=[],s={};n.each(function(t,e){var n=i[e];s[e]=n[0],r=r.concat(n)}),e.dataDimsOnCoord=r,e.encodeFirstDimNotExtra=s;var l=i.label;l&&l.length&&(o=l.slice());var u=i.tooltip;return u&&u.length?a=u.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,e}function qs(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Ks(t){return!("ordinal"===t||"time"===t)}function $s(t){return t._rawCount>65535?dA:pA}function Js(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Qs(t,e){d(gA.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,d(mA,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function tl(t,e,i,n,o){var a=cA[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function el(t){var e=t._invertedIndicesMap;d(e,function(i,n){var o=t._dimensionInfos[n].ordinalMeta;if(o){i=e[n]=new fA(o.categories.length);for(a=0;a<i.length;a++)i[a]=uA;for(var a=0;a<t._count;a++)i[t.get(n,a)]=a}})}function il(t,e,i){var n;if(null!=e){var o=t._chunkSize,a=Math.floor(i/o),r=i%o,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function nl(t){return t}function ol(t){return t<this._count&&t>=0?this._indices[t]:-1}function al(t,e){var i=t._idList[e];return null==i&&(i=il(t,t._idDimIdx,e)),null==i&&(i=hA+e),i}function rl(t){return y(t)||(t=[t]),t}function sl(t,e){var i=t.dimensions,n=new vA(f(i,t.getDimensionInfo,t),t.hostModel);Qs(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(l(e,s)>=0?(o[s]=ll(a[s]),n._rawExtent[s]=ul(),n._extent[s]=null):o[s]=a[s])}return n}function ll(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=Js(t[i]);return e}function ul(){return[1/0,-1/0]}function hl(t,e,n){function o(t,e,i){null!=sA.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}_a.isInstance(e)||(e=_a.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var s=(n.dimsDef||[]).slice(),l=R(n.encodeDef),u=R(),h=R(),c=[],f=cl(e,t,s,n.dimCount),p=0;p<f;p++){var g=s[p]=a({},w(s[p])?s[p]:{name:s[p]}),m=g.name,v=c[p]={otherDims:{}};null!=m&&null==u.get(m)&&(v.name=v.displayName=m,u.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}l.each(function(t,e){if(1===(t=Di(t).slice()).length&&t[0]<0)l.set(e,!1);else{var i=l.set(e,[]);d(t,function(t,n){_(t)&&(t=u.get(t)),null!=t&&t<f&&(i[n]=t,o(c[t],e,n))})}});var y=0;d(t,function(t,e){var n,t,a,s;if(_(t))n=t,t={};else{n=t.name;var u=t.ordinalMeta;t.ordinalMeta=null,(t=i(t)).ordinalMeta=u,a=t.dimsDef,s=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var h=l.get(n);if(!1!==h){if(!(h=Di(h)).length)for(var f=0;f<(a&&a.length||1);f++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&h.push(y++)}d(h,function(e,i){var l=c[e];if(o(r(l,t),n,i),null==l.name&&a){var u=a[i];!w(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}s&&r(l.otherDims,s)})}});var x=n.generateCoord,b=n.generateCoordCount,S=null!=b;b=x?b||1:0;for(var M=x||"value",I=0;I<f;I++)null==(v=c[I]=c[I]||{}).coordDim&&(v.coordDim=dl(M,h,S),v.coordDimIndex=0,(!x||b<=0)&&(v.isExtraCoord=!0),b--),null==v.name&&(v.name=dl(v.coordDim,u)),null==v.type&&ka(e,I,v.name)&&(v.type="ordinal");return c}function cl(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return d(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}function dl(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function fl(t,e,i){var n,o,a,r,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(d(e,function(t,i){_(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),o||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(o=t))}),!o||s||n||(s=!0),o){a="__\0ecstackresult",r="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=o.coordDim,c=o.type,f=0;d(e,function(t){t.coordDim===h&&f++}),e.push({name:a,coordDim:h,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0}),f++,e.push({name:r,coordDim:r,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function pl(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function gl(t,e){return pl(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ml(t,e,i){i=i||{},_a.isInstance(t)||(t=_a.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=Fa.get(o),r=ya(e);r&&(n=f(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=qs(n)}return e})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=_A(t,{coordDimensions:n,generateCoord:i.generateCoord});r&&d(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=fl(e,u),c=new vA(u,e);c.setCalculationInfo(h);var p=null!=s&&vl(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,p),c}function vl(t){if(t.sourceFormat===pI){var e=yl(t.data||[]);return null!=e&&!y(Li(e))}}function yl(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function xl(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function _l(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function wl(t){return t._map||(t._map=R(t.categories))}function bl(t){return w(t)&&null!=t.value?t.value:t+""}function Sl(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=$o(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&r>n&&(r=o.interval=n);var s=o.intervalPrecision=Ml(r);return Tl(o.niceTickExtent=[MA(Math.ceil(t[0]/r)*r,s),MA(Math.floor(t[1]/r)*r,s)],t),o}function Ml(t){return Ho(t)+2}function Il(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Il(t,0,e),Il(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Al(t,e,i,n){var o=[];if(!t)return o;e[0]<i[0]&&o.push(e[0]);for(var a=i[0];a<=i[1]&&(o.push(a),(a=MA(a+t,n))!==o[o.length-1]);)if(o.length>1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Dl(t){return t.get("stack")||AA+t.seriesIndex}function Cl(t){return t.dim+t.index}function Ll(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(r({bandWidth:n,axisKey:"axis0",stackId:AA+o},t));for(var a=Nl(e),s=[],o=0;o<t.count;o++){var l=a.axis0[AA+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function kl(t,e){var i=[];return e.eachSeriesByType(t,function(t){Rl(t)&&!zl(t)&&i.push(t)}),i}function Pl(t){var e=[];return d(t,function(t){var i=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=n.getExtent(),a="category"===n.type?n.getBandWidth():Math.abs(o[1]-o[0])/i.count(),r=Vo(t.get("barWidth"),a),s=Vo(t.get("barMaxWidth"),a),l=t.get("barGap"),u=t.get("barCategoryGap");e.push({bandWidth:a,barWidth:r,barMaxWidth:s,barGap:l,barCategoryGap:u,axisKey:Cl(n),stackId:Dl(t)})}),Nl(e)}function Nl(t){var e={};d(t,function(t,i){var n=t.axisKey,o=t.bandWidth,a=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=a.stacks;e[n]=a;var s=t.stackId;r[s]||a.autoWidthCount++,r[s]=r[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!r[s].width&&(r[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(r[s].maxWidth=u);var h=t.barGap;null!=h&&(a.gap=h);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var i={};return d(e,function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(n,function(t,e){var i=t.maxWidth;i&&i<u&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;d(n,function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var f=-c/2;d(n,function(t,n){i[e][n]=i[e][n]||{offset:f,width:t.width},f+=t.width*(1+r)})}),i}function Ol(t,e,i){if(t&&e){var n=t[Cl(e)];return null!=n&&null!=i&&(n=n[Dl(i)]),n}}function El(t,e){var i=kl(t,e),n=Pl(i),o={};d(i,function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=Dl(t),s=n[Cl(a)][r],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.get("barMinHeight")||0;o[r]=o[r]||[],e.setLayout({offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=pl(e,d),g=h.isHorizontal(),m=Bl(a,h,p),v=0,y=e.count();v<y;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)){var w=x>=0?"p":"n",b=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),b=o[r][_][w]);var S,M,I,T;if(g)S=b,M=(A=i.dataToPoint([x,_]))[1]+l,I=A[0]-m,T=u,Math.abs(I)<c&&(I=(I<0?-1:1)*c),p&&(o[r][_][w]+=I);else{var A=i.dataToPoint([_,x]);S=A[0]+l,M=b,I=u,T=A[1]-m,Math.abs(T)<c&&(T=(T<=0?-1:1)*c),p&&(o[r][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}}},this)}function Rl(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zl(t){return t.pipelineContext&&t.pipelineContext.large}function Bl(t,e,i){var n,o,a=e.getGlobalExtent();a[0]>a[1]?(n=a[1],o=a[0]):(n=a[0],o=a[1]);var r=e.toGlobalCoord(e.dataToCoord(0));return r<n&&(r=n),r>o&&(r=o),r}function Vl(t,e){return VA(t,BA(e))}function Gl(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Vo(n[0],1),n[1]=Vo(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(r)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var f,p=kl("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=Pl(p),m=Fl(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Fl(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ol(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Wl(t,e){var i=Gl(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Hl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new SA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new TA;default:return(xl.getClass(e)||TA).create(t)}}function Zl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function Ul(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,o){return null!=i&&(o=n-i),e(Xl(t,n),o)}:function(e){return t.scale.getLabel(e)}}function Xl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function jl(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Ul(t),h=1;o>40&&(h=Math.ceil(o/40));for(var c=0;c<o;c+=h){var d=u(n?n[c]:r[0]+c),f=Yl(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}}function Yl(t,e){var i=e*Math.PI/180,n=t.plain(),o=n.width,a=n.height,r=o*Math.cos(i)+a*Math.sin(i),s=o*Math.sin(i)+a*Math.cos(i);return new de(n.x,n.y,r,s)}function ql(t){var e=t.get("interval");return null==e?"auto":e}function Kl(t){return"category"===t.type&&0===ql(t.getLabelModel())}function $l(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Jl(t,e,i,n,o,a,r){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?jn(t.slice(8),new de(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Xn(t.slice(7),{},new de(e,i,n,o),r?"center":"cover"):new JA({shape:{symbolType:t,x:e,y:i,width:n,height:o}}),l.__isEmptyBrush=s,l.setColor=$l,l.setColor(a),l}function Ql(t,e){return Math.abs(t-e)<eD}function tu(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=Sn(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Ql(o[0],s[0])&&Ql(o[1],s[1])||(n+=Sn(o[0],o[1],s[0],s[1],e,i)),0!==n}function eu(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function iu(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=nu(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=nu(h,r[s][u],e)}}return t.UTF8Encoding=!1,t}function nu(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function ou(t){return"category"===t.type?ru(t):uu(t)}function au(t,e){return"category"===t.type?lu(t,e):{ticks:t.scale.getTicks()}}function ru(t){var e=t.getLabelModel(),i=su(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function su(t,e){var i=hu(t,"labels"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;return a=x(n)?vu(t,n):mu(t,r="auto"===n?fu(t):n),du(i,n,{labels:a,labelCategoryInterval:r})}function lu(t,e){var i=hu(t,"ticks"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;if(e.get("show")&&!t.scale.isBlank()||(a=[]),x(n))a=vu(t,n,!0);else if("auto"===n){var s=su(t,t.getLabelModel());r=s.labelCategoryInterval,a=f(s.labels,function(t){return t.tickValue})}else a=mu(t,r=n,!0);return du(i,n,{ticks:a,tickCategoryInterval:r})}function uu(t){var e=t.scale.getTicks(),i=Ul(t);return{labels:f(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function hu(t,e){return nD(t)[e]||(nD(t)[e]=[])}function cu(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function du(t,e,i){return t.push({key:e,value:i}),i}function fu(t){var e=nD(t).autoInterval;return null!=e?e:nD(t).autoInterval=t.calculateCategoryInterval()}function pu(t){var e=gu(t),i=Ul(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),r=o.count();if(a[1]-a[0]<1)return 0;var s=1;r>40&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=ke(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=nD(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-r)<=1&&w>x?x=w:(_.lastTickCount=r,_.lastAutoInterval=x),x}function gu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function mu(t,e,i){function n(t){l.push(i?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Ul(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Kl(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g!==r[1]&&n(r[1]),l}function vu(t,e,i){var n=t.scale,o=Ul(t),a=[];return d(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})}),a}function yu(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function xu(t,e,i,n,o){function a(t,e){return h?t>e:t<e}var r=e.length;if(t.onBand&&!n&&r){var s,l=t.getExtent();if(1===r)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;d(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(o?e[0].coord=l[0]:e.shift()),o&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(o?s.coord=l[1]:e.pop()),o&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function _u(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return fr(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=fr(t,e,i[a]);o.push(r)}return o.join(" ")}}function wu(t,e,i){tb.call(this),this.updateData(t,e,i)}function bu(t){return[t[0]/2,t[1]/2]}function Su(t,e){this.parent.drift(t,e)}function Mu(){!so(this)&&Tu.call(this)}function Iu(){!so(this)&&Au.call(this)}function Tu(){if(!this.incremental&&!this.useHoverLayer){var t=this.__symbolOriginalScale,e=t[1]/t[0];this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut")}}function Au(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Du(t){this.group=new tb,this._symbolCtor=t||wu}function Cu(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function Lu(t){return null==t||w(t)||(t={isIgnore:t}),t||{}}function ku(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Pu(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=Nu(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=f(t.dimensions,function(t){return e.mapDimension(t)}),p=e.getCalculationInfo("stackResultDimension");return(n|=pl(e,d[0]))&&(d[0]=p),(n|=pl(e,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Nu(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]),i}function Ou(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}function Eu(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function Ru(t){return isNaN(t[0])||isNaN(t[1])}function zu(t,e,i,n,o,a,r,s,l,u,h){return"none"!==u&&u?Bu.apply(this,arguments):Vu.apply(this,arguments)}function Bu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;_D(bD,g),bD[m]=g[m]+v,_D(SD,p),SD[m]=p[m]-v,t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Vu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),_D(bD,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&Ru(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Ru(m))_D(SD,p);else{Ru(m)&&!h&&(m=p),U(wD,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=uw(p,y),_=uw(p,m);xD(SD,p,wD,-l*(1-(v=_/(_+x))))}vD(bD,bD,s),yD(bD,bD,r),vD(SD,SD,s),yD(SD,SD,r),t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1]),xD(bD,p,wD,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Gu(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function Fu(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Wu(t){return"number"==typeof t?t:t?.5:0}function Hu(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Zu(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(Ou(i,t,e,o));return n}function Uu(t,e,i,n){var o=Hu(t.getAxis("x")),a=Hu(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),s=Math.min(o[0],o[1]),l=Math.min(a[0],a[1]),u=Math.max(o[0],o[1])-s,h=Math.max(a[0],a[1])-l;if(i)s-=.5,u+=.5,l-=.5,h+=.5;else{var c=n.get("lineStyle.width")||2,d=n.get("clipOverflow")?c/2:Math.max(u,h);r?(l-=d,h+=2*d):(s-=d,u+=2*d)}var f=new yM({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[r?"width":"height"]=0,To(f,{shape:{width:u,height:h}},n)),f}function Xu(t,e,i,n){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;i&&(a[0]-=.5,a[1]+=.5);var l=new hM({shape:{cx:Go(t.cx,1),cy:Go(t.cy,1),r0:Go(a[0],1),r:Go(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,To(l,{shape:{endAngle:-r[1]*s}},n)),l}function ju(t,e,i,n){return"polar"===t.type?Xu(t,e,i,n):Uu(t,e,i,n)}function Yu(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(i){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function qu(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;a>=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=f(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new TM(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function Ku(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!$u(a,e))){var r=e.mapDimension(a.dim),s={};return d(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function $u(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*wu.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function Ju(t){return this._axes[t]}function Qu(t){LD.call(this,t)}function th(t,e){return e.type||(e.data?"category":"value")}function eh(t,e,i){return t.getCoordSysModel()===e}function ih(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function nh(t,e,i,n){function o(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)oh(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&oh(r[h])&&!n[o(r[h])]){a=r[h];break}a&&(n[o(a)]=!0)}}function oh(t){return t&&"category"!==t.type&&"time"!==t.type&&Zl(t)}function ah(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function rh(t,e){return f(VD,function(e){return t.getReferringComponents(e)[0]})}function sh(t){return"cartesian2d"===t.get("coordinateSystem")}function lh(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function uh(t,e,i,n){var o,a,r=Xo(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return jo(r-GD/2)?(a=l?"bottom":"top",o="center"):jo(r-1.5*GD)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*GD&&r>GD/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function hh(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ch(t,e,i){if(!Kl(t.axis)){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(dh(a),dh(u)):fh(a,r)&&(n?(dh(r),dh(h)):(dh(a),dh(u))),!1===o?(dh(s),dh(c)):fh(l,s)&&(o?(dh(l),dh(d)):(dh(s),dh(c)))}}function dh(t){t&&(t.ignore=!0)}function fh(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=_t([]);return Mt(a,a,-t.rotation),n.applyTransform(bt([],a,t.getLocalTransform())),o.applyTransform(bt([],a,e.getLocalTransform())),n.intersect(o)}}function ph(t){return"middle"===t||"center"===t}function gh(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f<l.length;f++){var p=l[f].coord;u[0]=p,u[1]=0,h[0]=p,h[1]=i.tickDirection*s,c&&(Q(u,u,c),Q(h,h,c));var g=new _M(Kn({anid:"tick_"+l[f].tickValue,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:r(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(g),d.push(g)}return d}}function mh(t,e,i){var n=e.axis;if(T(i.axisLabelShow,e.get("axisLabel.show"))&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),r=n.getViewLabels(),s=(T(i.labelRotate,o.get("rotate"))||0)*GD/180,l=HD(i.rotation,s,i.labelDirection),u=e.getCategories(!0),h=[],c=hh(e),f=e.get("triggerEvent");return d(r,function(r,s){var d=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=o;u&&u[d]&&u[d].textStyle&&(m=new No(u[d].textStyle,o,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(d),i.labelOffset+i.labelDirection*a],x=new rM({anid:"label_"+d,position:y,rotation:l.rotation,silent:c,z2:10});mo(x.style,m,{text:p,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?d+"":d,s):v}),f&&(x.eventData=lh(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),h.push(x),t.group.add(x),x.decomposeTransform()}),h}}function vh(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return yh(i,t,e),i.seriesInvolved&&_h(i,t),i}function yh(t,e,i){var n=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),a=o.get("link",!0)||[],r=[];ZD(i.getCoordinateSystems(),function(i){function s(n,s,l){var c=l.model.getModel("axisPointer",o),d=c.get("show");if(d&&("auto"!==d||n||Th(c))){null==s&&(s=c.get("triggerTooltip"));var f=(c=n?xh(l,h,o,e,n,s):c).get("snap"),p=Ah(l.model),g=s||f||"category"===l.type,m=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Th(c),seriesModels:[]};u[p]=m,t.seriesInvolved|=g;var v=wh(a,l);if(null!=v){var y=r[v]||(r[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}if(i.axisPointerEnabled){var l=Ah(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model.getModel("tooltip",n);if(ZD(i.getAxes(),UD(s,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var c="axis"===h.get("trigger"),d="cross"===h.get("axisPointer.type"),f=i.getTooltipAxes(h.get("axisPointer.axis"));(c||d)&&ZD(f.baseAxes,UD(s,!d||"cross",c)),d&&ZD(f.otherAxes,UD(s,"cross",!1))}}})}function xh(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u={};ZD(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=i(l.get(t))}),u.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(u.type="line");var h=u.label||(u.label={});if(null==h.show&&(h.show=!1),"cross"===a){var c=l.get("label.show");if(h.show=null==c||c,!s){var d=u.lineStyle=l.get("crossStyle");d&&r(h,d.textStyle)}}return t.model.getModel("axisPointer",new No(u,n,o))}function _h(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),o=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==o&&!1!==e.get("axisPointer.show",!0)&&ZD(t.coordSysAxesInfo[Ah(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function wh(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(bh(a[n+"AxisId"],i.id)||bh(a[n+"AxisIndex"],i.componentIndex)||bh(a[n+"AxisName"],i.name))return o}}function bh(t,e){return"all"===t||y(t)&&l(t,e)>=0||t===e}function Sh(t){var e=Mh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Th(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}function Mh(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ah(t)]}function Ih(t){var e=Mh(t);return e&&e.axisPointerModel}function Th(t){return!!t.get("handle.show")}function Ah(t){return t.type+"||"+t.id}function Dh(t,e,i,n,o,a){var r=XD.getAxisPointerClass(t.axisPointerClass);if(r){var s=Ih(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):Ch(t,n)}}function Ch(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function Lh(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.getAxesOnZeroOf()[0],s=o.position,l=r?"onZero":s,u=o.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),T(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var v=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-v:v,a.z2=1,a}function kh(t,e,i,n,o,a,r){go(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:_u(o.getData(),a),isRectText:!0,autoColor:n}),Ph(t),Ph(e)}function Ph(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Nh(t,e,i){i.style.text=null,Io(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Oh(t,e,i){i.style.text=null,Io(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Eh(t,e,i,n,o,a,s,l){var u=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(r({fill:u,opacity:h},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var p=s?o.height>0?"bottom":"top":o.width>0?"left":"right";l||kh(t.style,d,n,u,a,i,p),fo(t,d)}function Rh(t,e){var i=t.get(tC)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function zh(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new nC({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__valueIdx:a});e.add(r),Bh(r,t,n)}function Bh(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Vh(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Gh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Gh(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Fh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new hM({z2:2}),a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Wh(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;p<c;p++)(u=t[p].y-h)<0&&function(e,i,n,o){for(var a=e;a<i;a++)if(t[a].y+=n,a>e&&a+1<i&&t[a+1].y>t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p<c;p++)t[p].y>=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function Hh(t,e,i,n,o,a){for(var r=[],s=[],l=0;l<t.length;l++)Zh(t[l])||(t[l].x<e?r.push(t[l]):s.push(t[l]));Wh(s,e,i,n,1,o,a),Wh(r,e,i,n,-1,o,a);for(l=0;l<t.length;l++)if(!Zh(t[l])){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];t[l].x<e?u[2][0]=t[l].x+3:u[2][0]=t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+h}}}function Zh(t){return"center"===t.position}function Uh(){this.group=new tb}function Xh(t,e,i){aD.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function jh(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=f(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new Xh(i,new TA);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}function Yh(t,e){return r({show:e},t)}function qh(t){return y(t)||(t=[+t,+t]),t}function Kh(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}function $h(t,e){var i,n,o=t.svgXML;try{k(null!=(n=(i=o&&rs(o,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new de(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=as(s,e.width,e.height),u=n;(n=new tb).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new yM({shape:e.plain()})),{root:n,boundingRect:e}}function Jh(t){return function(e,i){var n=[];return d(Qh(e),function(o){var a=NC[o.type][t];a&&n.push(a(e,o,i))}),n}}function Qh(t){return DT.retrieveMap(t)||[]}function tc(t,e,i){nc(t)[e]=i}function ec(t,e,i){var n=nc(t);n[e]===i&&(n[e]=null)}function ic(t,e){return!!nc(t)[e]}function nc(t){return t[EC]||(t[EC]={})}function oc(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(ac,this),o=e(rc,this),a=e(sc,this),s=e(lc,this),l=e(uc,this);fw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=r(i(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function ac(t){if(!(dt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function rc(t){if(this._dragging&&dc("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!ic(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&mw(t.event),cc(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function sc(t){dt(t)||(this._dragging=!1)}function lc(t){var e=dc("zoomOnMouseWheel",t,this._opt),i=dc("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=o>3?1.4:o>1?1.2:1.1;hc(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);hc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:r})}}}function uc(t){ic(this._zr,"globalPan")||hc(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function hc(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(mw(n.event),cc(t,e,i,n,o))}function cc(t,e,i,n,o){o.isAvailableBehavior=m(dc,null,i,n),t.trigger(e,o)}function dc(t,e,i){var n=i[t];return!t||n&&(!_(n)||e.event[n+"Key"])}function fc(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function pc(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function gc(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!RC[n.mainType]&&o&&o.model!==i}function mc(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function vc(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),yc(e,i)}}}))}function yc(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function xc(t,e){var i=new tb;this.uid=Ro("ec_map_draw"),this._controller=new oc(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new tb),i.add(this._backgroundGroup=new tb)}function _c(t){var e=this[zC];e&&e.recordVersion===this[BC]&&wc(e,t)}function wc(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(mo({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=NM):(mo(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function bc(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function Sc(){Tw.call(this)}function Mc(t){this.name=t,this.zoomLimit,Tw.call(this),this._roamTransformable=new Sc,this._rawTransformable=new Sc,this._center,this._zoom}function Ic(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function Tc(t,e,i,n){Mc.call(this,t),this.map=e;var o=OC.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function Ac(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function Dc(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;s&&l&&(s=[Vo(s[0],u),Vo(s[1],h)],l=Vo(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));if(d){var f={};c>1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=ca(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Cc(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Lc(t,e){var i={};return d(t,function(t){t.each(t.mapDimension("value"),function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h<u;h++)s=Math.min(s,i[a][h]),l=Math.max(l,i[a][h]),r+=i[a][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?NaN:c})}function kc(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,zc(e,i,t),FC(i,function(i){FC(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,v(Pc,t))})}),e.wrapMethod("cloneShallow",v(Oc,t)),FC(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,v(Nc,t))}),k(i[e.dataType]===e)}function Pc(t,e){if(Rc(this)){var i=a({},this[WC]);i[this.dataType]=e,zc(e,i,t)}else Bc(e,this.dataType,this[HC],t);return e}function Nc(t,e){return t.struct&&t.struct.update(this),e}function Oc(t,e){return FC(e[WC],function(i,n){i!==e&&Bc(i.cloneShallow(),n,e,t)}),e}function Ec(t){var e=this[HC];return null==t||null==e?e:e[WC][t]}function Rc(t){return t[HC]===t}function zc(t,e,i){t[WC]={},FC(e,function(e,n){Bc(e,n,t,i)})}function Bc(t,e,i,n){i[WC][e]=t,t[HC]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Ec}function Vc(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=f(e||[],function(e){return new No(e,t,t.ecModel)}),this.leavesModel=new No(i||{},t,t.ecModel)}function Gc(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Fc(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function Wc(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){jc(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=Yc(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Hc(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Zc(t){return arguments.length?t:Qc}function Uc(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Xc(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jc(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function Yc(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=qc(s),a=Kc(a),s&&a;){o=qc(o),r=Kc(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);d>0&&(Jc($c(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!qc(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Kc(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}return i}function qc(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Kc(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $c(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Jc(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Qc(t,e){return t.parentNode===e.parentNode?1:2}function td(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function ed(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function id(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=ed(l,l.getModel(),a),u=t.tree.root,h=l.parentNode===u?l:l.parentNode||l,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=l.getLayout();s?(i=new wu(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),Io(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===l.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-x.y,p.x-x.x))<0&&(m=2*Math.PI+m),0===l.children.length||0!==l.children.length&&!1===l.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var S=i.__edge;S||(S=i.__edge=new bM({shape:od(a,f,f),style:r({opacity:0,strokeNoScale:!0},a.lineStyle)})),Io(S,{shape:od(a,d,p),style:{opacity:1}},o),n.add(S)}}function nd(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ed(s,s.getModel(),a),u=s.parentNode===l?s:s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;Io(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var h=i.__edge;h&&Io(h,{shape:od(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function od(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Uc(s,u),f=Uc(s,u+(h-u)*t.curvature),p=Uc(l,h+(u-h)*t.curvature),g=Uc(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function ad(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}function rd(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;a>=0;a--)n.push(o[a])}}function sd(t,e){var i=Xc(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=Zc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=Zc());var s=t.getData().tree.root,l=s.children[0];if(l){Fc(s),ad(l,Wc,r),s.hierNode.modifier=-l.hierNode.prelim,rd(l,Hc);var u=l,h=l,c=l;rd(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Uc(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),rd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function ld(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function ud(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function hd(t,e){return l(ud(t),e)>=0}function cd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function dd(t){var e=0;d(t.children,function(t){dd(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function fd(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new No(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function pd(t){this.group=new tb,t.add(this.group)}function gd(t,e,i,n,o,a){var r=[[o?t:t-UC,e],[t+i,e],[t+i,e+n],[o?t:t-UC,e+n]];return!a&&r.splice(2,0,[t+i+UC,e+n/2]),!o&&r.push([t,e+n/2]),r}function md(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&cd(i,e)}}function vd(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o<a;o++){var r=e[o];r.el.animateTo(r.target,r.time,r.delay,r.easing,function(){--n||(e.length=0,i={},t&&t())})}return this}}}function yd(t,e,n,o,r,s,l,u,h,c){function d(t,e){w?!t.invisible&&s.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function f(e,n,o,a,r,s){var u=l.getModel(),h=T(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),u.get("name"));if(!s&&v.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=u.getModel(s?JC:KC),f=u.getModel(s?QC:$C),p=d.getShallow("show");go(e,n,d,f,{defaultText:p?h:null,autoColor:o,isRectText:!0}),s&&(e.textRect=i(s)),e.truncate=p&&d.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function p(t,i,o,a){var s=null!=S&&n[t][S],l=r[t];return s?(n[t][S]=null,g(l,s,t)):w||((s=new i({z:xd(o,a)})).__tmDepth=o,s.__tmStorageName=t,m(l,s,t)),e[t][b]=s}function g(t,e,i){(t[b]={}).old="nodeGroup"===i?e.position.slice():a({},e.shape)}function m(t,e,i){var n=t[b]={},a=l.parentNode;if(a&&(!o||"drillDown"===o.direction)){var s=0,u=0,h=r.background[a.getRawIndex()];!o&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var v=l.getLayout();if(v&&v.isInView){var y=v.width,x=v.height,_=v.borderWidth,w=v.invisible,b=l.getRawIndex(),S=u&&u.getRawIndex(),M=l.viewChildren,I=v.upperHeight,A=M&&M.length,D=l.getModel("itemStyle"),C=l.getModel("emphasis.itemStyle"),L=p("nodeGroup",jC);if(L){if(h.add(L),L.attr("position",[v.x||0,v.y||0]),L.__tmNodeWidth=y,L.__tmNodeHeight=x,v.isAboveViewRoot)return L;var k=p("background",YC,c,eL);if(k&&function(e,i,n){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:y,height:x});var o=l.getVisual("borderColor",!0),a=C.get("borderColor");d(i,function(){var t=oL(D);t.fill=o;var e=nL(C);if(e.fill=a,n){var r=y-2*_;f(t,e,o,r,I,{x:_,y:0,width:r,height:I})}else t.text=e.text=null;i.setStyle(t),fo(i,e)}),e.add(i)}(L,k,A&&v.upperHeight),!A){var P=p("content",YC,c,iL);P&&function(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(y-2*_,0),o=Math.max(x-2*_,0);i.culling=!0,i.setShape({x:_,y:_,width:n,height:o});var a=l.getVisual("color",!0);d(i,function(){var t=oL(D);t.fill=a;var e=nL(C);f(t,e,a,n,o),i.setStyle(t),fo(i,e)}),e.add(i)}(L,P)}return L}}}}function xd(t,e){var i=t*tL+e;return(i-1)/i}function _d(t){var e=t.pieceList;t.hasSpecialVisual=!1,d(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function wd(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(sL(e,function(t,e){n[t]=e}),!y(i)){var o=[];w(i)?sL(i,function(t,e){var i=n[e];o[null!=i?i:uL]=t}):o[uL]=i,i=Ld(t,o)}for(var a=e.length-1;a>=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function bd(t,e){var i=t.visual,n=[];w(i)?sL(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Ld(t,n)}function Sd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Dd([0,1])}}function Md(t){var e=this.option.visual;return e[Math.round(Bo(t,[0,1],[0,e.length-1],!0))]||{}}function Id(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Td(t){var e=this.option.visual;return e[this.option.loop&&t!==uL?t%e.length:t]}function Ad(){return this.option.visual[0]}function Dd(t){return{linear:function(e){return Bo(e,t,this.option.visual,!0)},category:Td,piecewise:function(e,i){var n=Cd.call(this,i);return null==n&&(n=Bo(e,t,this.option.visual,!0)),n},fixed:Ad}}function Cd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[hL.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Ld(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return Gt(t)})),e}function kd(t,e,i){return t?e<=i:e<i}function Pd(t,e,i,n,o,a){var r=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(pL),h=Nd(u,e,i[t.depth],n),c=u.get("borderColor"),f=u.get("borderColorSaturation");null!=f&&(c=Ed(f,l=Od(h))),t.setVisual("borderColor",c);var p=t.viewChildren;if(p&&p.length){var g=zd(t,r,s,u,h,p);d(p,function(t,e){(t.depth>=o.length||t===o[t.depth])&&Pd(t,Vd(r,h,t,e,g,a),i,n,o,a)})}else l=Od(h),t.setVisual("color",l)}}function Nd(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function Od(t){var e=Rd(t,"color");if(e){var i=Rd(t,"colorAlpha"),n=Rd(t,"colorSaturation");return n&&(e=jt(e,null,null,n)),i&&(e=Yt(e,i)),e}}function Ed(t,e){return null!=e?jt(e,null,null,t):null}function Rd(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function zd(t,e,i,n,o,a){if(a&&a.length){var r=Bd(e,"color")||null!=o.color&&"none"!==o.color&&(Bd(e,"colorAlpha")||Bd(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new hL(c);return d.__drColorMappingBy=h,d}}}function Bd(t,e){var i=t.get(e);return fL(i)&&i.length?{name:e,range:i}:null}function Vd(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?n:"id"===u?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}function Gd(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(_L),l=f.get(wL)/2,u=Kd(f),h=Math.max(s,u),c=s-l,d=h-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var p=(o=mL(o-2*c,0))*(a=mL(a-c-d,0)),g=Fd(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=vL(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_<w;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=Ud(x,v,e.squareRatio);S<=y?(_++,y=S):(x.area-=x.pop().getLayout().area,Xd(x,v,m,l,!1),v=vL(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&Xd(x,v,m,l,!0),!i){var M=f.get("childrenVisibleMin");null!=M&&p<M&&(i=!0)}for(var _=0,w=g.length;_<w;_++)Gd(g[_],e,i,n+1)}}}function Fd(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];Hd(r=g(r,function(t){return!t.isRemoved()}),s);var u=Zd(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=Wd(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function Wd(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;l>=0;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*e<a&&(s=l,i-=u)}return"asc"===n?o.splice(0,r-s):o.splice(s,r-s),i}function Hd(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function Zd(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];xL(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function Ud(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),n>o&&(o=n));var l=t.area*t.area,u=e*e*i;return l?mL(u*o/l,l/(u*a)):1/0}function Xd(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=mL(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=mL(y-2*n,0);p[s[r]]=i[s[r]]+vL(n,m/2),p[s[a]]=u+vL(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function jd(t,e,i,n,o){var a=(e||{}).node,r=[n,o];if(!a||a===i)return r;for(var s,l=n*o,u=l*t.option.zoomToNodeRatio;s=a.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=a.getValue();if(0===p)return r;u*=h/p;var g=s.getModel(),m=g.get(_L);(u+=4*m*m+(3*m+Math.max(m,Kd(g)))*Math.pow(u,.5))>XM&&(u=XM),a=s}u<l&&(u=l);var v=Math.pow(u/l,.5);return[n*v,o*v]}function Yd(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;for(var r=[a.width/2,a.height/2],s=o;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function qd(t,e,i,n,o){var a=t.getLayout(),r=i[o],s=r&&r===t;if(!(r&&!s||o===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new de(e.x-a.x,e.y-a.y,e.width,e.height);xL(t.viewChildren||[],function(t){qd(t,l,i,n,o+1)})}}function Kd(t){return t.get(bL)?t.get(SL):0}function $d(t){return"_EC_"+t}function Jd(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Qd(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function tf(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function ef(t){return"_"+t+"Type"}function nf(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){y(a)||(a=[a,a]);var r=Jl(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function of(t){var e=new PL({name:"line"});return af(e.shape,t),e}function af(t,e){var i=e[0],n=e[1],o=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=NaN,t.cpy1=NaN)}function rf(t,e,i){tb.call(this),this._createLine(t,e,i)}function sf(t){this._ctor=t||rf,this.group=new tb}function lf(t,e,i,n){if(df(e.getItemLayout(i))){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function uf(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);df(i.getItemLayout(o))?(r?r.updateData(i,o,a):r=new t._ctor(i,o,a),i.setItemGraphicEl(o,r),t.group.add(r)):t.group.remove(r)}function hf(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function cf(t){return isNaN(t[0])||isNaN(t[1])}function df(t){return!cf(t[0])&&!cf(t[1])}function ff(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1)RL[0]=VL(o[0],a[0],r[0],h),RL[1]=VL(o[1],a[1],r[1],h),(f=FL(GL(RL,e)-l))<s&&(s=f,n=h);for(var c=0;c<32;c++){var d=n+u;zL[0]=VL(o[0],a[0],r[0],n),zL[1]=VL(o[1],a[1],r[1],n),BL[0]=VL(o[0],a[0],r[0],d),BL[1]=VL(o[1],a[1],r[1],d);var f=GL(zL,e)-l;if(FL(f)<.01)break;var p=GL(BL,e)-l;u/=2,f<0?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function pf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function gf(t,e,i){var n=t.getGraphicEl(),o=pf(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if("group"!==t.type){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function mf(t,e){var i=pf(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function vf(t){return t instanceof Array||(t=[t,t]),t}function yf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),xf(i)}}function xf(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=F(t.node1.getLayout()),n=F(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function _f(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([h*Math.cos(a)+l,h*Math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:u}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=F(t.node1.getLayout()),o=F(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setLayout([n,o,e])})}}function wf(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=V(o*(Math.random()-.5)+r[0],a*(Math.random()-.5)+r[1])),u.pp=F(u.p),u.edges=null}var h=.6;return{warmUp:function(){h=.5},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],o=t.length,a=0;a<e.length;a++){var l=e[a],u=l.n1;U(n,(p=l.n2).p,u.p);var c=X(n)-l.d,d=p.w/(u.w+p.w);isNaN(d)&&(d=0),q(n,n),!u.fixed&&XL(u.p,u.p,n,d*c*h),!p.fixed&&XL(p.p,p.p,n,-(1-d)*c*h)}for(a=0;a<o;a++)(v=t[a]).fixed||(U(n,r,v.p),XL(v.p,v.p,n,s*h));for(a=0;a<o;a++)for(var u=t[a],f=a+1;f<o;f++){var p=t[f];U(n,p.p,u.p),0===(c=X(n))&&(W(n,Math.random()-.5,Math.random()-.5),c=1);var g=(u.rep+p.rep)/c/c;!u.fixed&&XL(u.pp,u.pp,n,g),!p.fixed&&XL(p.pp,p.pp,n,-g)}for(var m=[],a=0;a<o;a++){var v=t[a];v.fixed||(U(m,v.p,v.pp),XL(v.p,v.p,m,h),G(v.pp,v.p))}h*=.992,i&&i(t,e,h<.01)}}}function bf(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,ca(n,{width:e.getWidth(),height:e.getHeight()})}function Sf(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:Vo(i[0],e.getWidth()),cy:Vo(i[1],e.getHeight()),r:Vo(t.get("radius"),a/2)}}function Mf(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function If(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new pM,a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Tf(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Af(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?n[t]-n[e]:n[e]-n[t]}),o}function Df(t){t.each(function(e){var i,n,o,a,r=t.getItemModel(e),s=r.getModel("label").get("position"),l=r.getModel("labelLine"),u=t.getItemLayout(e),h=u.points,c="inner"===s||"inside"===s||"center"===s;if(c)i="center",a=[[n=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,o=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4],[n,o]];else{var d,f,p,g=l.get("length");"left"===s?(d=(h[3][0]+h[0][0])/2,f=(h[3][1]+h[0][1])/2,n=(p=d-g)-5,i="right"):(d=(h[1][0]+h[2][0])/2,f=(h[1][1]+h[2][1])/2,n=(p=d+g)+5,i="left");var m=f;a=[[d,f],[p,m]],o=m}u.label={linePoints:a,x:n,y:o,verticalAlign:"middle",textAlign:i,inside:c}})}function Cf(t){if(!t.parallel){var e=!1;d(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function Lf(t){d(Di(t.parallelAxis),function(e){if(w(e)){var i=e.parallelIndex||0,o=Di(t.parallel)[i];o&&o.parallelAxisDefault&&n(e,o.parallelAxisDefault,!1)}})}function kf(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function Pf(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nf(t,e,i){this._axesMap=R(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Of(t,e){return ek(ik(t,e[0]),e[1])}function Ef(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Rf(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(i=o-(r-1-t)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}function zf(t){fw.call(this),this._zr=t,this.group=new tb,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+bk++,this._handlers={},hk(Sk,function(t,e){this._handlers[e]=m(t,this)},this)}function Bf(t,e){var o=t._zr;t._enableGlobalPan||tc(o,yk,t._uid),hk(t._handlers,function(t,e){o.on(e,t)}),t._brushType=e.brushType,t._brushOption=n(i(wk),e,!0)}function Vf(t){var e=t._zr;ec(e,yk,t._uid),hk(t._handlers,function(t,i){e.off(i,t)}),t._brushType=t._brushOption=null}function Gf(t,e){var i=Mk[e.brushType].createCover(t,e);return i.__brushOption=e,Hf(i,e),t.group.add(i),i}function Ff(t,e){var i=Uf(e);return i.endCreating&&(i.endCreating(t,e),Hf(e,e.__brushOption)),e}function Wf(t,e){var i=e.__brushOption;Uf(e).updateCoverShape(t,e,i.range,i)}function Hf(t,e){var i=e.z;null==i&&(i=gk),t.traverse(function(t){t.z=i,t.z2=i})}function Zf(t,e){Uf(e).updateCommon(t,e),Wf(t,e)}function Uf(t){return Mk[t.__brushOption.brushType]}function Xf(t,e,i){var n=t._panels;if(!n)return!0;var o,a=t._transform;return hk(n,function(t){t.isTargetByCursor(e,i,a)&&(o=t)}),o}function jf(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Yf(t){var e=t._covers,i=e.length;return hk(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function qf(t,e){var n=ck(t._covers,function(t){var e=t.__brushOption,n=i(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Kf(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1];return pk(o*o+a*a,.5)>mk}function $f(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Jf(t,e,i,n){var o=new tb;return o.add(new yM({name:"main",style:ip(i),silent:!0,draggable:!0,cursor:"move",drift:uk(t,e,o,"nswe"),ondragend:uk(qf,e,{isEnd:!0})})),hk(n,function(i){o.add(new yM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:uk(t,e,o,i),ondragend:uk(qf,e,{isEnd:!0})}))}),o}function Qf(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=fk(o,vk),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;ep(t,e,"main",r,s,p,g),n.transformable&&(ep(t,e,"w",l,u,a,v),ep(t,e,"e",d,u,a,v),ep(t,e,"n",l,u,m,a),ep(t,e,"s",l,f,m,a),ep(t,e,"nw",l,u,a,a),ep(t,e,"ne",d,u,a,a),ep(t,e,"sw",l,f,a,a),ep(t,e,"se",d,f,a,a))}function tp(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(ip(i)),o.attr({silent:!n,cursor:n?"move":"default"}),hk(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=ap(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?_k[a]+"-resize":null})})}function ep(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(hp(up(t,e,[[n,o],[n+a,o+r]])))}function ip(t){return r({strokeNoScale:!0},t.brushStyle)}function np(t,e,i,n){var o=[dk(t,i),dk(e,n)],a=[fk(t,i),fk(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function op(t){return Ao(t.group)}function ap(t,e){if(e.length>1)return("e"===(n=[ap(t,(e=e.split(""))[0]),ap(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=Co({w:"left",e:"right",n:"top",s:"bottom"}[e],op(t));return i[n]}function rp(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=lp(i,a,r);hk(o.split(""),function(t){var e=xk[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(np(u[0][0],u[1][0],u[0][1],u[1][1])),Zf(i,n),qf(i,{isEnd:!1})}function sp(t,e,i,n,o){var a=e.__brushOption.range,r=lp(t,i,n);hk(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Zf(t,e),qf(t,{isEnd:!1})}function lp(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function up(t,e,n){var o=jf(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function hp(t){var e=dk(t[0][0],t[1][0]),i=dk(t[0][1],t[1][1]);return{x:e,y:i,width:fk(t[0][0],t[1][0])-e,height:fk(t[0][1],t[1][1])-i}}function cp(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Xf(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&Mk[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}function dp(t){var e=t.event;e.preventDefault&&e.preventDefault()}function fp(t,e,i){return t.childOfName("main").contain(e,i)}function pp(t,e,n,o){var a,r=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),Kf(t)||r){if(s&&!r){"single"===l.brushMode&&Yf(t);var u=i(l);u.brushType=gp(u.brushType,s),u.panelId=!0===s?null:s.panelId,r=t._creatingCover=Gf(t,u),t._covers.push(r)}if(r){var h=Mk[gp(t._brushType,s)];r.__brushOption.range=h.getCreatingRange(up(t,r,t._track)),o&&(Ff(t,r),h.updateCommon(t,r)),Wf(t,r),a={isEnd:o}}}else o&&"single"===l.brushMode&&l.removeOnClick&&Xf(t,e,n)&&Yf(t)&&(a={isEnd:o,removeOnClick:!0});return a}function gp(t,e){return"auto"===t?e.defaultBrushType:t}function mp(t){if(this._dragging){dp(t);var e=pp(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&qf(this,e)}}function vp(t){return{createCover:function(e,i){return Jf(uk(rp,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=$f(e);return[dk(i[0][t],i[1][t]),fk(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,o){var a,r=jf(e,i);if(!0!==r&&r.getLinearBrushOtherExtent)a=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),Qf(e,i,l,o)},updateCommon:tp,contain:fp}}function yp(t){return t=wp(t),function(e,i){return ko(e,t)}}function xp(t,e){return t=wp(t),function(i){var n=null!=e?e:i,o=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(o||0)]}}function _p(t,e,i){return t=wp(t),function(n,o,a){return t.contain(o[0],o[1])&&!gc(n,e,i)}}function wp(t){return de.create(t)}function bp(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function Sp(t){var e=t.axis;return f(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Mp(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function Ip(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function Tp(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=R();d(i.dimensions,function(t){var e=Ap(t);n.set(t,e)})}}}function Ap(t){return+t.replace("dim","")}function Dp(t,e,i){var n=t.model,o=t.getRect(),a=new yM({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),To(a,{shape:{width:o.width,height:o.height}},e,i),a}function Cp(t,e,i,n){for(var o=[],a=0;a<i.length;a++){var r=i[a],s=t.get(t.mapDimension(r),e);Np(s,n.getAxis(r).type)||o.push(n.dataToPoint(s,r))}return o}function Lp(t,e,i,n,o){var a=Cp(t,i,n,o),r=new gM({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function kp(t){var e=t.get("smooth",!0);return!0===e&&(e=Dk),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:Dk}}function Pp(t,e,i,n){var o=n.lineStyle;e.hasItemOption&&(o=e.getItemModel(i).getModel("lineStyle").getLineStyle()),t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(i,"color"),a.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}function Np(t,e){return"category"===e?null==t:null==t||isNaN(t)}function Op(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Ep(t,e,i){var n=t.getGraphicEl(),o=Op(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function Rp(t,e){var i=Op(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function zp(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Bp(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Vp(t,e,i,n,o,a,r,s){Fp(t,e,i,o,a,s),Zp(t,e,a,o,n,r,s),eg(t,s)}function Gp(t){d(t,function(t){var e=Qp(t.outEdges,Jp),i=Qp(t.inEdges,Jp),n=Math.max(e,i);t.setLayout({value:n},!0)})}function Fp(t,e,i,n,o,a){for(var r=[],s=[],l=[],u=[],h=0,c=0;c<e.length;c++)r[c]=1;for(c=0;c<t.length;c++)s[c]=t[c].inEdges.length,0===s[c]&&l.push(t[c]);for(;l.length;){for(var d=0;d<l.length;d++){var f=l[d];"vertical"===a?(f.setLayout({y:h},!0),f.setLayout({dy:i},!0)):(f.setLayout({x:h},!0),f.setLayout({dx:i},!0));for(var p=0;p<f.outEdges.length;p++){var g=f.outEdges[p];r[e.indexOf(g)]=0;var m=g.node2;0==--s[t.indexOf(m)]&&u.push(m)}}++h,l=u,u=[]}for(c=0;c<r.length;c++);Wp(t,h,a),Hp(t,"vertical"===a?(o-i)/(h-1):(n-i)/(h-1),a)}function Wp(t,e,i){d(t,function(t){t.outEdges.length||("vertical"===i?t.setLayout({y:e-1},!0):t.setLayout({x:e-1},!0))})}function Hp(t,e,i){d(t,function(t){if("vertical"===i){var n=t.getLayout().y*e;t.setLayout({y:n},!0)}else{var o=t.getLayout().x*e;t.setLayout({x:o},!0)}})}function Zp(t,e,i,n,o,a,r){var s=Up(t,r);Xp(t,s,e,i,n,o,r),jp(s,o,i,n,r);for(var l=1;a>0;a--)Yp(s,l*=.99,r),jp(s,o,i,n,r),tg(s,l,r),jp(s,o,i,n,r)}function Up(t,e){var i=[],n="vertical"===e?"y":"x",o=Zi(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),d(o.keys,function(t){i.push(o.buckets.get(t))}),i}function Xp(t,e,i,n,o,a,r){var s=[];d(e,function(t){var e=t.length,i=0,l=0;d(t,function(t){i+=t.getLayout().value}),l="vertical"===r?(o-(e-1)*a)/i:(n-(e-1)*a)/i,s.push(l)}),s.sort(function(t,e){return t-e});var l=s[0];d(e,function(t){d(t,function(t,e){var i=t.getLayout().value*l;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),d(i,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})}function jp(t,e,i,n,o){d(t,function(t){var a,r,s,l=0,u=t.length;if("vertical"===o){var h;for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),s=0;s<u;s++)(r=l-(a=t[s]).getLayout().x)>0&&(h=a.getLayout().x+r,a.setLayout({x:h},!0)),l=a.getLayout().x+a.getLayout().dx+e;if((r=l-e-n)>0)for(h=a.getLayout().x-r,a.setLayout({x:h},!0),l=h,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().x+a.getLayout().dx+e-l)>0&&(h=a.getLayout().x-r,a.setLayout({x:h},!0)),l=a.getLayout().x}else{var c;for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),s=0;s<u;s++)(r=l-(a=t[s]).getLayout().y)>0&&(c=a.getLayout().y+r,a.setLayout({y:c},!0)),l=a.getLayout().y+a.getLayout().dy+e;if((r=l-e-i)>0)for(c=a.getLayout().y-r,a.setLayout({y:c},!0),l=c,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().y+a.getLayout().dy+e-l)>0&&(c=a.getLayout().y-r,a.setLayout({y:c},!0)),l=a.getLayout().y}})}function Yp(t,e,i){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var n=Qp(t.outEdges,qp,i)/Qp(t.outEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function qp(t,e){return $p(t.node2,e)*t.getValue()}function Kp(t,e){return $p(t.node1,e)*t.getValue()}function $p(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Jp(t){return t.getValue()}function Qp(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function tg(t,e,i){d(t,function(t){d(t,function(t){if(t.inEdges.length){var n=Qp(t.inEdges,Kp,i)/Qp(t.inEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function eg(t,e){d(t,function(t){"vertical"===e?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),d(t,function(t){var e=0,i=0;d(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),d(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function ig(t,e,i,n,o){var a=t.ends,r=new zk({shape:{points:o?og(a,n,t):a}});return ng(t,r,e,i,o),r}function ng(t,e,i,n,o){var a=i.hostModel;(0,zM[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,n);var r=i.getItemModel(n),s=r.getModel(Ek),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,fo(e,r.getModel(Rk).getItemStyle())}function og(t,e,i){return f(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function ag(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),o=l(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)}),e}function rg(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;Vk(o,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}Vk(o,function(t){var e=t.get("boxWidth");y(e)||(e=[e,e]),l.push([Vo(e[0],i)||0,Vo(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;Vk(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function sg(t,e,i){function n(t,i,n){var o=s.get(i,n),a=[];a[u]=t,a[h]=o;var l;return isNaN(t)||isNaN(o)?l=[NaN,NaN]:(l=r.dataToPoint(a))[u]+=e,l}function o(t,e,i){var n=e.slice(),o=e.slice();n[u]+=l,o[u]-=l,i?t.push(n,o):t.push(o,n)}function a(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinateSystem,s=t.getData(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapDimension(c[u]),f=s.mapDimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p<s.count();p++){var g=s.get(d,p),m=n(g,f[2],p),v=n(g,f[0],p),y=n(g,f[1],p),x=n(g,f[3],p),_=n(g,f[4],p),w=[];o(w,y,0),o(w,x,1),w.push(v,y,_,x),a(w,v),a(w,_),a(w,m),s.setItemLayout(p,{initBaseline:m[h],ends:w})}}function lg(t,e,i){var n=t.ends;return new Hk({shape:{points:i?hg(n,t):n},z2:100})}function ug(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(Gk),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(Wk);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,fo(t,o.getModel(Fk).getItemStyle())}function hg(t,e){return f(t,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}function cg(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new Zk({shape:{points:o},__sign:1});e.add(a);var r=new Zk({shape:{points:o},__sign:-1});e.add(r),dg(1,a,t,n),dg(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function dg(t,e,i,n){var o=t>0?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(Gk).getItemStyle(Wk);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function fg(t,e,i,n,o){return i>n?-1:i<n?1:e>0?t.get(o,e-1)<=n?1:-1:1}function pg(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Vo(A(t.get("barMaxWidth"),o),o),r=Vo(A(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Vo(s,o):Math.max(Math.min(o/2,a),r)}function gg(t){return y(t)||(t=[+t,+t]),t}function mg(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function vg(t,e){tb.call(this);var i=new wu(t,e),n=new tb;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function yg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function xg(t,e,i){tb.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function _g(t,e,i){tb.call(this),this._createPolyline(t,e,i)}function wg(t,e,i){xg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function bg(){this.group=new tb}function Sg(t){return t instanceof Array||(t=[t,t]),t}function Mg(){var t=iw();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Ig(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n<o;n++)if((r=e[n].interval)[0]<=t&&t<=r[1]){a=n;break}if(n===o)for(var n=a-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n<o&&i[n]}}function Tg(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function Ag(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Dg(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Cg(i,a,o,n,c),kg(t,e,o,a,r,c.boundingLength,c.pxSign,u,n,c),Pg(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Vo(f[0],d[0]),Vo(f[1],d[1])]),Ng(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function Cg(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[Lg(l,s[0])-u,Lg(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?Lg(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]),o.pxSign=a>0?1:a<0?-1:0}function Lg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function kg(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Vo(f[c.index],d),f[h.index]=Vo(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}function Pg(t,e,i,n,o){var a=t.get(cP)||0;a&&(fP.attr({scale:e.slice(),rotation:i}),fP.updateTransform(),a/=fP.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Ng(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=T(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Vo(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Qo(n),M=S?n:Kg((y+b)/w);w=m+2*(x=(y-M*m)/2/(_?M:M-1)),b=_?0:2*x,S||"fixed"===n||(M=h?Kg((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var I=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?I:"end"===s?u-I:u/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[f.index]=i[f.xy],D[p.index]=i[p.xy];var C=d.barRectShape=a({},i);C[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+I)),C[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[p.xy]=0,L[p.wh]=i[p.wh]}function Og(t){var e=t.symbolPatternSize,i=Jl(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Eg(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,u=e.valueDim,h=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(jg(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c<h?Yg(t,null,o(c),i,n):Yg(t,null,{scale:[0,0]},i,n,function(){a.remove(t)}),Wg(t,i),c++});c<h;c++){var f=Og(i);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=h,a.add(f);var p=o(c);Yg(f,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),f.on("mouseover",function(){jg(t,function(t){t.trigger("emphasis")})}).on("mouseout",function(){jg(t,function(t){t.trigger("normal")})}),Wg(f,i)}}function Rg(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?Yg(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=Og(i),o.add(a),Yg(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),Wg(a,i)}function zg(t,e,i){var n=a({},e.barRectShape),o=t.__pictorialBarRect;o?Yg(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new yM({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function Bg(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,r=a({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(o)Io(o,{shape:r},l,u);else{r[s.wh]=0,o=new yM({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var h={};h[s.wh]=i.clipShape[s.wh],zM[n?"updateProps":"initProps"](o,{shape:h},l,u)}}}function Vg(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Gg,i.isAnimationEnabled=Fg,i}function Gg(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Fg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Wg(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function Hg(t,e,i,n){var o=new tb,a=new tb;return o.add(a),o.__pictorialBundle=a,a.attr("position",i.bundlePosition.slice()),i.symbolRepeat?Eg(o,e,i):Rg(o,e,i),zg(o,i,n),Bg(o,e,i,n),o.__pictorialShapeStr=Xg(t,i),o.__pictorialSymbolMeta=i,o}function Zg(t,e,i){var n=i.animationModel,o=i.dataIndex;Io(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?Eg(t,e,i,!0):Rg(t,e,i,!0),zg(t,i,!0),Bg(t,e,i,!0)}function Ug(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];jg(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),d(a,function(t){Io(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function Xg(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function jg(t,e,i){d(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function Yg(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&zM[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function qg(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,s=a.getModel("itemStyle").getItemStyle(["color"]),l=a.getModel("emphasis.itemStyle").getItemStyle(),u=a.getShallow("cursor");jg(t,function(t){t.setColor(n),t.setStyle(r({fill:n,opacity:i.opacity},s)),fo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;kh(d.style,h,a,n,e.seriesModel,o,c),fo(d,h)}function Kg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function $g(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Jg(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.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]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.z2=1,o}function Qg(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=tm(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,o),i.showTooltip(t,s,u)}else i.showPointer(t,e)}function tm(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return _P(e.seriesModels,function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p<r||f>=0&&s<0)&&(r=p,s=f,o=u,a.length=0),_P(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function em(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function im(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Ah(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function nm(t,e,i){var n=i.axesInfo=[];_P(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function om(t,e,i,n){if(!lm(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function am(t,e,i){var n=i.getZr(),o=bP(n).axisPointerLastHighlights||{},a=bP(n).axisPointerLastHighlights={};_P(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&_P(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function rm(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function sm(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function lm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function um(t,e,i){if(!U_.node){var n=e.getZr();SP(n).records||(SP(n).records={}),hm(n,e),(SP(n).records[t]||(SP(n).records[t]={})).handler=i}}function hm(t,e){function i(i,n){t.on(i,function(i){var o=pm(e);MP(SP(t).records,function(t){t&&n(t,i,o.dispatchAction)}),cm(o.pendings,e)})}SP(t).initialized||(SP(t).initialized=!0,i("click",v(fm,"click")),i("mousemove",v(fm,"mousemove")),i("globalout",dm))}function cm(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function dm(t,e,i){t.handler("leave",null,i)}function fm(t,e,i,n){e.handler(t,i,n)}function pm(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function gm(t,e){if(!U_.node){var i=e.getZr();(SP(i).records||{})[t]&&(SP(i).records[t]=null)}}function mm(){}function vm(t,e,i,n){ym(TP(i).lastProp,n)||(TP(i).lastProp=n,e?Io(i,n,t):(i.stopAnimation(),i.attr(n)))}function ym(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&ym(t[n],e)}),!!i}return t===e}function xm(t,e){t[e.get("label.show")?"show":"hide"]()}function _m(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wm(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function bm(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function Sm(t,e,i,n,o){var a=Im(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=qM(r.get("padding")||0),l=r.getFont(),u=ke(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),Mm(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function Mm(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Im(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Xl(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function Tm(t,e,i){var n=xt();return Mt(n,n,i.rotation),St(n,n,i.position),Do([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Am(t,e,i,n,o,a){var r=FD.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),Sm(e,n,o,a,{position:Tm(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Dm(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Cm(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Lm(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function km(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Pm(t){return"x"===t.dim?0:1}function Nm(t){return t.isHorizontal()?0:1}function Om(t,e){var i=t.getRect();return[i[kP[e]],i[kP[e]]+i[PP[e]]]}function Em(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Rm(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=zm(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;g<p;++g){n=h[g]*c,t.setItemLayout(a[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;m<d;++m)n+=l[m-1][g][1]*c,t.setItemLayout(a[m].indices[g],{layerIndex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function zm(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];u>a&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;a=0;for(var c=0;c<i;++c){var d=n[c]+o[c];d>a&&(a=d)}return r.y0=o,r.max=a,r}function Bm(t){var e=0;d(t.children,function(t){Bm(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Vm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}tb.call(this);var a=new hM({z2:zP});a.seriesIndex=e.seriesIndex;var r=new rM({z2:BP,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Gm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Fm(t)%r]}function Fm(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Wm(t,e,i){return i!==RP.NONE&&(i===RP.SELF?t===e:i===RP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Hm(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}function Zm(t,e){var i=t.children||[];t.children=Um(i,e),i.length&&d(t.children,function(t){Zm(t,e)})}function Um(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Xm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function jm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Ym(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function qm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Km(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=lv(n);(e=Xn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new fi({})).__customImagePath=t.style.image:"text"===i?(e=new rM({})).__customText=t.style.text:e=new(0,zM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function $m(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Jm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Jm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),To(t,{style:{opacity:c}},o,e)}r?t.attr(l):Io(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(ro(t,f),t.__cusHasEmphStl=!p),s&&po(t,!p)}function Jm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Qm(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(UP),f=c.getModel(XP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():YP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(HP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),mo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(ZP).getItemStyle();return mo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Ll(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return So(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:tv(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function tv(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function ev(t,e,i,n,o,a){return(t=iv(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function iv(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&uv(u)&&lv(u)!==t.__customPathData||"image"===l&&hv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Km(i)),$m(t,e,i,n,a,c,r),"group"===l&&nv(t,e,i,n,a),o.add(t),t}}function nv(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)ov({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&iv(t.childAt(h),e,a[h],n,t,o)}}function ov(t){new Xs(t.oldChildren,t.newChildren,av,av,t).add(rv).update(rv).remove(sv).execute()}function av(t,e){var i=t&&t.name;return null!=i?i:jP+e}function rv(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;iv(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function sv(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function lv(t){return t&&(t.pathData||t.d)}function uv(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function hv(t,e){return t&&t.hasOwnProperty(e)}function cv(t,e,i,n){var o=i.type,a=new(0,zM[o.charAt(0).toUpperCase()+o.slice(1)])(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function dv(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){dv(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function fv(t){return t=a({},t),d(["id","parentId","$action","hv","bounding"].concat(nI),function(e){delete t[e]}),t}function pv(t,e){var i;return d(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function gv(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function mv(t,e,i){var o=a({},i),r=t[e],s=i.$action||"merge";"merge"===s?r?(n(r,o,!0),pa(r,o,{ignoreSize:!0}),ma(i,r)):t[e]=o:"replace"===s?t[e]=o:"remove"===s&&r&&(t[e]=null)}function vv(t,e){t&&(t.hv=e.hv=[pv(e,["left","right"]),pv(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function yv(t,e,i){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=t.info)}function xv(t,e,i){var n,o={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name)),d(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o.hasOwnProperty(e)?o[e]=o[e]&&n:o[e]=n}})}),{name:e.name,selected:o}}function _v(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=ca(n,a,o);aI(e.get("orient"),t,e.get("itemGap"),r.width,r.height),da(t,n,a,o)}function wv(t,e){var i=qM(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new yM({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}function bv(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Sv(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Mv(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function Iv(t,e,i){var n=[1,1];n[t.getOrient().index]=0,pa(e,i,{type:"box",ignoreSize:n})}function Tv(t){var e="left "+t+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)";return f(lN,function(t){return t+"transition:"+e}).join(";")}function Av(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),rN(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Dv(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),o=t.getModel("textStyle"),a=t.get("padding");return i&&e.push(Tv(i)),n&&(U_.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+Zt(n)),e.push("filter:alpha(opacity=70)"))),rN(["width","color","radius"],function(i){var n="border-"+i,o=sN(n),a=t.get(o);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))}),e.push(Av(o)),null!=a&&e.push("padding:"+qM(a).join("px ")+"px"),e.join(";")+";"}function Cv(t,e){if(U_.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var i=n.handler;ut(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function Lv(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function kv(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(No.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new No(i,e,e.ecModel))}return e}function Pv(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function Nv(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>n?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function Ov(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Ev(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function Rv(t){return"center"===t||"middle"===t}function zv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Bv(t){return t.dim}function Vv(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Bv(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Bv(o)]=s;var u=zv(t);l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=Vo(t.get("barWidth"),r),c=Vo(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");h&&!l[u].width&&(h=Math.min(s.remainedWidth,h),l[u].width=h,s.remainedWidth-=h),c&&(l[u].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(i,function(t,e){var i=t.maxWidth;i&&i<u&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;d(i,function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var f=-c/2;d(i,function(t,i){n[e][i]=n[e][i]||{offset:f,width:t.width},f+=t.width*(1+r)})}),n}function Gv(t,e){aD.call(this,"radius",t,e),this.type="category"}function Fv(t,e){e=e||[0,360],aD.call(this,"angle",t,e),this.type="category"}function Wv(t,e){return e.type||(e.data?"category":"value")}function Hv(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Vo(n[0],o),t.cy=Vo(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=Vo(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}function Zv(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();d(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,gl(e,t))}),d(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,gl(e,t))})}}),Wl(n.scale,n.model),Wl(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function Uv(t,e){if(t.type=e.get("type"),t.scale=Hl(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function Xv(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function jv(t){return t.getRadiusAxis().inverse?0:1}function Yv(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function qv(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Kv(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=xt();Mt(d,d,s),St(d,d,[n.cx,n.cy]),l=Do([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=FD.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function $v(t,e){e.update="updateView",Es(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Jv(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function Qv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function ty(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return MN(e,function(e){var r=a[e]=o();MN(t[e],function(t,o){if(hL.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new hL(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new hL(a))}})}),a}function ey(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&Qv(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&Qv(e[n])?t[n]=i(e[n]):delete t[n]})}function iy(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g<m;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};d(t,function(t){var i=hL.prepareVisualTypes(e[t]);u[t]=i});var h;null==a?i.each(l):i.each([a],l)}function ny(t,e,i,n){var o={};return d(t,function(t){var i=hL.prepareVisualTypes(e[t]);o[t]=i}),{progress:function(t,a){null!=n&&(n=a.getDimension(n));for(var r;null!=(r=t.next());){var s=a.getRawDataItem(r);if(!s||!1!==s.visualMap)for(var l=null!=n?a.get(n,r,!0):r,u=i(l),h=e[u],c=o[u],d=0,f=c.length;d<f;d++){var p=c[d];h[p]&&h[p].applyVisual(l,function(t){return a.getItemVisual(r,t)},function(t,e){a.setItemVisual(r,t,e)})}}}}}function oy(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range;return ay(e[t],o)}},rect:function(n,o,a){if(n){var r=a.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),ay(s[0],r)||ay(s[1],r)||ay(r[0],s)||ay(r[1],s)}}}}function ay(t,e){return e[0]<=t&&t<=e[1]}function ry(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(sy(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function sy(t,e,i,n,o,a,r,s){var l=uy(i-t,o-r,n-e,a-s);if(ly(l))return!1;var u=uy(o-t,o-r,a-e,a-s)/l;if(u<0||u>1)return!1;var h=uy(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function ly(t){return t<=1e-6&&t>=-1e-6}function uy(t,e,i,n){return t*n-e*i}function hy(t,e,i){var n=this._targetInfoList=[],o={},a=dy(e,t);TN(PN,function(t,e){(!i||!i.include||AN(i.include,e)>=0)&&t(a,n,o)})}function cy(t){return t[0]>t[1]&&t.reverse(),t}function dy(t,e){return Vi(t,e,{includeMainTypes:LN})}function fy(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=cy(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function py(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function gy(t,e){var i=my(t),n=my(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function my(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function vy(t,e,i,n,o){if(o){var a=t.getZr();a[VN]||(a[BN]||(a[BN]=yy),Nr(a,BN,i,e)(t,n))}}function yy(t,e){if(!t.isDisposed()){var i=t.getZr();i[VN]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[VN]=!1}}function xy(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function _y(t){var e=t.brushSelector;if(_(e)){var i=[];return d(IN,function(t,n){i[n]=function(i,n,o,a){var r=n.getItemLayout(i);return t[e](r,o,a)}}),i}if(x(e)){var n={};return d(IN,function(t,i){n[i]=e}),n}return e}function wy(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(y(i)?l(i,e)<0:e!==i)}function by(t){var e=t.selectors={};return d(IN[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function Sy(t){return new de(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function My(t,e){return n({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new No(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Iy(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Ty(t,e){HN[t]=e}function Ay(t){return HN[t]}function Dy(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function Cy(t,e,i){this._model=t}function Ly(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}function ky(t,e){var i=t.cellSize;y(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=f([0,1],function(t){return fa(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});pa(t,e,{type:"box",ignoreSize:n})}function Py(t){return l(qN,t)>=0}function Ny(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Oy(t,e,i){var n=[1/0,-1/0];return $N(i,function(t){var i=t.getData();i&&$N(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]),Ey(t,n),n}function Ey(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=a>0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ry(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Zo(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function zy(t){var e=t._minMaxSpan={},i=t._dataZoomModel;$N(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=Bo(a[0]+o,a,[0,100],!0)}})}function By(t){var e={};return tO(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Vy(t,e){var i=t._rangePropMode,n=t.get("rangeMode");tO([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Gy(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Fy(t){return"vertical"===t?"ns-resize":"ew-resize"}function Wy(t,e){var i=Uy(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),jy(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=Xy(t,a),a.dispatchAction=v(Yy,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=qy(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Nr(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Hy(t,e){var i=Uy(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),jy(i)}function Zy(t){return t.type+"\0_"+t.id}function Uy(t){var e=t.getZr();return e[fO]||(e[fO]={})}function Xy(t,e){var i=new oc(t.getZr());return d(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];d(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function jy(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Yy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function qy(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return d(t,function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+a]>i["type_"+e]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ky(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return QL(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function $y(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jy(t,e,i,n){for(var o=e.targetVisuals[n],a=hL.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,function(t){return r[t]},function(t,e){r[t]=e})}return r.color}function Qy(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}function tx(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ca(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function ex(t){return d(t||[],function(e){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function ix(t,e,i,n){return new pM({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){mw(t.event)},ondragend:n})}function nx(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function ox(t,e,i,n){return t?[[0,-RO(e,zO(i,0))],[VO,0],[0,RO(e,zO(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ax(t,e,i){var n=BO/2,o=t.get("hoverLinkDataSize");return o&&(n=OO(o,e,i,!0)/2),n}function rx(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function sx(t){return"vertical"===t?"ns-resize":"ew-resize"}function lx(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function ux(t){Ci(t,"label",["show"])}function hx(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function cx(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function dx(t,e,i,n,o,a){var r=[],s=pl(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=yx(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(n,u);var h=Wo(e.get(n,u));return(h=Math.min(h,20))>=0&&(r[a]=+r[a].toFixed(h)),r}function fx(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!cx(e)&&!y(e.coord)&&o){var a=o.dimensions,r=px(e,n,o,t);if((e=i(e)).type&&YO[e.type]&&r.baseAxis&&r.valueAxis){var s=XO(a,r.baseAxis.dim),l=XO(a,r.valueAxis.dim);e.coord=YO[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)YO[u[h]]&&(u[h]=yx(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function px(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(gx(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function gx(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}function mx(t,e){return!(t&&t.containData&&e.coord&&!hx(e))||t.containData(e.coord)}function vx(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function yx(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)}),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function xx(t,e,i){var n=e.coordinateSystem;t.each(function(o){var a,r=t.getItemModel(o),s=Vo(r.get("x"),i.getWidth()),l=Vo(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),h=t.get(n.dimensions[1],o);a=n.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(o,a)})}function _x(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return r({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new vA(n,i),a=f(i.get("data"),v(fx,e));return t&&(a=g(a,v(mx,t))),o.initData(a,null,t?vx:function(t){return t.value}),o}function bx(t){return!isNaN(t)&&!isFinite(t)}function Sx(t,e,i,n){var o=1-t,a=n.dimensions[t];return bx(e[o])&&bx(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function Mx(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(Sx(1,i,n,t)||Sx(0,i,n,t)))return!0}return mx(t,e[0])&&mx(t,e[1])}function Ix(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Vo(s.get("x"),o.getWidth()),u=Vo(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;bx(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):bx(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function Tx(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return r({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new vA(n,i),a=new vA(n,i),s=new vA([],i),l=f(i.get("data"),v(KO,e,t,i));t&&(l=g(l,v(Mx,t)));var u=t?vx:function(t){return t.value};return o.initData(f(l,function(t){return t[0]}),null,u),a.initData(f(l,function(t){return t[1]}),null,u),s.initData(f(l,function(t){return t[2]})),s.hasItemOption=!0,{from:o,to:a,line:s}}function Ax(t){return!isNaN(t)&&!isFinite(t)}function Dx(t,e,i,n){var o=1-t;return Ax(e[o])&&Ax(i[o])}function Cx(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!Dx(1,i,n,t)&&!Dx(0,i,n,t))||(mx(t,{coord:i,x:e.x0,y:e.y0})||mx(t,{coord:n,x:e.x1,y:e.y1}))}function Lx(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Vo(s.get(i[0]),o.getWidth()),u=Vo(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(h,h),a=r.dataToPoint(h,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);Ax(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):Ax(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function kx(t,e,i){var n,o,a=["x0","y0","x1","y1"];t?(n=f(t&&t.dimensions,function(t){var i=e.getData();return r({name:t},i.getDimensionInfo(i.mapDimension(t))||{})}),o=new vA(f(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):o=new vA(n=[{name:"value",type:"float"}],i);var s=f(i.get("data"),v($O,e,t,i));t&&(s=g(s,v(Cx,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(s,null,l),o.hasItemOption=!0,o}function Px(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),Nx(t),Ox(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Ox(n,"position")||(n.position=t.controlPosition),"none"!==n.position||Ox(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}d(t.data||[],function(t){w(t)&&!y(t)&&(!Ox(t,"value")&&Ox(t,"name")&&(t.value=t.name),Nx(t))})}function Nx(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};d(n,function(t,e){a[e]||Ox(o,e)||(o[e]=t)}),i.label&&!Ox(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function Ox(t,e){return t.hasOwnProperty(e)}function Ex(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function Rx(t,e,n,o){return Xn(t.get(e).replace(/^path:\/\//,""),i(o||{}),new de(n[0],n[1],n[2],n[3]),"center")}function zx(t,e,i,o,a,r){var s=e.get("color");a?(a.setColor(s),i.add(a),r&&r.onUpdate(a)):((a=Jl(t.get("symbol"),-1,-1,2,2,s)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a));var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),o=n({rectHover:!0,z2:100},o,!0);var u=t.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,o.scale=u;var h=t.get("symbolOffset");if(h){var c=o.position=o.position||[0,0];c[0]+=Vo(h[0],u[0]),c[1]+=Vo(h[1],u[1])}var d=t.get("symbolRotate");return o.rotation=(d||0)*Math.PI/180||0,a.attr(o),a.updateTransform(),a}function Bx(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}function Vx(t){return 0===t.indexOf("my")}function Gx(t){this.model=t}function Fx(t){this.model=t}function Wx(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getBaseAxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryAxis:a,valueAxis:o.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Hx(t){var e=[];return d(t,function(t,i){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(f(t.series,function(t){return t.name})),r=[n.model.getCategories()];d(t.series,function(t){r.push(t.getRawData().mapArray(o,function(t){return t}))});for(var s=[a.join(fE)],l=0;l<r[0].length;l++){for(var u=[],h=0;h<r.length;h++)u.push(r[h][l]);s.push(u.join(fE))}e.push(s.join("\n"))}),e.join("\n\n"+dE+"\n\n")}function Zx(t){return f(t,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,o=arguments[t-1],a=e.getName(o),r=0;r<t-1;r++)n[r]=arguments[r];i.push((a?a+fE:"")+n.join(fE))}),i.join("\n")}).join("\n\n"+dE+"\n\n")}function Ux(t){var e=Wx(t);return{value:g([Hx(e.seriesGroupByCategoryAxis),Zx(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+dE+"\n\n"),meta:e.meta}}function Xx(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jx(t){if(t.slice(0,t.indexOf("\n")).indexOf(fE)>=0)return!0}function Yx(t){for(var e=t.split(/\n+/g),i=[],n=f(Xx(e.shift()).split(pE),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=Xx(e[o]).split(pE);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}function qx(t){for(var e=t.split(/\n+/g),i=Xx(e.shift()),n=[],o=0;o<e.length;o++){var a,r=Xx(e[o]).split(pE),s="",l=!1;isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},a=n[o].value):a=n[o]=[];for(var u=0;u<r.length;u++)a.push(+r[u]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}function Kx(t,e){var i={series:[]};return d(t.split(new RegExp("\n*"+dE+"\n*","g")),function(t,n){if(jx(t)){var o=Yx(t),a=e[n],r=a.axisDim+"Axis";a&&(i[r]=i[r]||[],i[r][a.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{o=qx(t);i.series.push(o)}}),i}function $x(t){this._dom=null,this.model=t}function Jx(t,e){return f(t,function(t,i){var n=e&&e[i];return w(n)&&!y(n)?(w(t)&&!y(t)&&(t=t.value),r({value:t},n)):t})}function Qx(t,e){var i=n_(t);gE(e,function(e,n){for(var o=i.length-1;o>=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function t_(t){var e=n_(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return gE(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function e_(t){t[mE]=null}function i_(t){return n_(t).length}function n_(t){var e=t[mE];return e||(e=t[mE]=[{}]),e}function o_(t,e,i){(this._brushController=new zf(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function a_(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function r_(t,e){t.setIconStatus("back",i_(e)>1?"emphasis":"normal")}function s_(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new hy(a_(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function l_(t){this.model=t}function u_(t){return SE(t)}function h_(){if(!TE&&AE){TE=!0;var t=AE.styleSheets;t.length<31?AE.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function c_(t){return parseInt(t,10)}function d_(t,e){h_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function f_(t){return function(){Yw('In IE8.0 VML mode painter not support method "'+t+'"')}}function p_(t){return document.createElementNS(sR,t)}function g_(t){return cR(1e4*t)/1e4}function m_(t){return t<vR&&t>-vR}function v_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==hR}function y_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==hR}function x_(t,e){e&&__(t,"transform","matrix("+uR.call(e,",")+")")}function __(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function w_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function b_(t,e,i,n){if(v_(e,i)){var o=i?e.textFill:e.fill;o="transparent"===o?hR:o,"none"!==t.getAttribute("clip-path")&&o===hR&&(o="rgba(0, 0, 0, 0.002)"),__(t,"fill",o),__(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else __(t,"fill",hR);if(y_(e,i)){var a=i?e.textStroke:e.stroke;__(t,"stroke",a="transparent"===a?hR:a),__(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),__(t,"paint-order",i?"stroke":"fill"),__(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(__(t,"stroke-dasharray",e.lineDash.join(",")),__(t,"stroke-dashoffset",cR(e.lineDashOffset||0))):__(t,"stroke-dasharray",""),e.lineCap&&__(t,"stroke-linecap",e.lineCap),e.lineJoin&&__(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&__(t,"stroke-miterlimit",e.miterLimit)}else __(t,"stroke",hR)}function S_(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case lR.M:a="M",r=2;break;case lR.L:a="L",r=2;break;case lR.Q:a="Q",r=4;break;case lR.C:a="C",r=6;break;case lR.A:var s=i[o++],l=i[o++],u=i[o++],h=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=m_(g-gR)&&!m_(g),v=!1;v=g>=gR||!m_(g)&&(d>-pR&&d<0||d>pR)==!!p;var y=g_(s+u*fR(c)),x=g_(l+h*dR(c));m&&(d=p?gR-1e-4:1e-4-gR,v=!0,9===o&&e.push("M",y,x));var _=g_(s+u*fR(c+d)),w=g_(l+h*dR(c+d));e.push("A",g_(u),g_(h),cR(f*mR),+v,+p,_,w);break;case lR.Z:a="Z";break;case lR.R:var _=g_(i[o++]),w=g_(i[o++]),b=g_(i[o++]),S=g_(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M<r;M++)e.push(g_(i[o++]))}return e.join(" ")}function M_(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}function I_(){}function T_(t,e,i,n){for(var o=0,a=e.length,r=0,s=0;o<a;o++){var l=e[o];if(l.removed){for(var u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=r;h<r+l.count;h++)u.push(h);l.indices=u,r+=l.count,l.added||(s+=l.count)}}return e}function A_(t){return{newPos:t.newPos,components:t.components.slice(0)}}function D_(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function C_(t,e){D_.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function L_(t,e){D_.call(this,t,e,"clipPath","__clippath_in_use__")}function k_(t,e){D_.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function P_(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function N_(t){return parseInt(t,10)}function O_(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR}function E_(t,e){return e&&t&&e.parentNode!==t}function R_(t,e,i){if(E_(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function z_(t,e){if(E_(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function B_(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function V_(t){return t.__textSvgEl}function G_(t){return t.__svgEl}function F_(t){return function(){Yw('In SVG mode painter not support method "'+t+'"')}}var W_=2311,H_=function(){return W_++},Z_={},U_=Z_="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),o&&(i.ie=!0,i.version=o[1]),a&&(i.edge=!0,i.version=a[1]),r&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),X_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},j_={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Y_=Object.prototype.toString,q_=Array.prototype,K_=q_.forEach,$_=q_.filter,J_=q_.slice,Q_=q_.map,tw=q_.reduce,ew={},iw=function(){return ew.createCanvas()};ew.createCanvas=function(){return document.createElement("canvas")};var nw,ow="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var aw=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:iw,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]},bind:m,curry:v,isArray:y,isFunction:x,isString:_,isObject:w,isBuiltInObject:b,isTypedArray:S,isDom:M,eqNaN:I,retrieve:T,retrieve2:A,retrieve3:D,slice:C,normalizeCssArray:L,assert:k,trim:P,setAsPrimitive:N,isPrimitive:O,createHashMap:R,concatArray:z,noop:B}),rw="undefined"==typeof Float32Array?Array:Float32Array,sw=X,lw=j,uw=K,hw=$,cw=(Object.freeze||Object)({create:V,copy:G,clone:F,set:W,add:H,scaleAndAdd:Z,sub:U,len:X,length:sw,lenSquare:j,lengthSquare:lw,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Y,normalize:q,distance:K,dist:uw,distanceSquare:$,distSquare:hw,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:J,applyTransform:Q,min:tt,max:et});it.prototype={constructor:it,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(nt(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(nt(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(nt(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(nt(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(nt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var dw=Array.prototype.slice,fw=function(t){this._$handlers={},this._$eventProcessor=t};fw.prototype={constructor:fw,one:function(t,e,i,n){return at(this,t,e,i,n,!0)},on:function(t,e,i,n){return at(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>3&&(n=dw.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>4&&(n=dw.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var pw="undefined"!=typeof window&&!!window.addEventListener,gw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,mw=pw?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},vw=function(){this._track=[]};vw.prototype={constructor:vw,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=st(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in yw)if(yw.hasOwnProperty(e)){var i=yw[e](this._track,t);if(i)return i}}};var yw={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var a=ft(n)/ft(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=pt(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},xw="silent";vt.prototype.dispose=function(){};var _w=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ww=function(t,e,i,n){fw.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new vt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,it.call(this),this.setHandlerProxy(i)};ww.prototype={constructor:ww,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(d(_w,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=gt(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;a>=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=yt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==xw)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new vw);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ww.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||uw(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(ww,fw),h(ww,it);var bw="undefined"==typeof Float32Array?Array:Float32Array,Sw=(Object.freeze||Object)({create:xt,identity:_t,copy:wt,mul:bt,translate:St,rotate:Mt,scale:It,invert:Tt,clone:At}),Mw=_t,Iw=5e-5,Tw=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Aw=Tw.prototype;Aw.transform=null,Aw.needLocalTransform=function(){return Dt(this.rotation)||Dt(this.position[0])||Dt(this.position[1])||Dt(this.scale[0]-1)||Dt(this.scale[1]-1)};var Dw=[];Aw.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||xt(),i?this.getLocalTransform(n):Mw(n),e&&(i?bt(n,t.transform,n):wt(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(Dw);var a=Dw[0]<0?-1:1,r=Dw[1]<0?-1:1,s=((Dw[0]-a)*o+a)/Dw[0]||0,l=((Dw[1]-r)*o+r)/Dw[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||xt(),Tt(this.invTransform,n)}else n&&Mw(n)},Aw.getLocalTransform=function(t){return Tw.getLocalTransform(this,t)},Aw.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Aw.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Cw=[],Lw=xt();Aw.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;Dt(e-1)&&(e=Math.sqrt(e)),Dt(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},Aw.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(bt(Cw,t.invTransform,e),e=Cw);var i=this.origin;i&&(i[0]||i[1])&&(Lw[4]=i[0],Lw[5]=i[1],bt(Cw,e,Lw),Cw[4]-=i[0],Cw[5]-=i[1],e=Cw),this.setLocalTransform(e)}},Aw.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)},Aw.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},Aw.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},Tw.getLocalTransform=function(t,e){Mw(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),It(e,e,n),o&&Mt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var kw={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kw.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*kw.bounceIn(2*t):.5*kw.bounceOut(2*t-1)+.5}};Ct.prototype={constructor:Ct,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?kw[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Pw=function(){this.head=null,this.tail=null,this._len=0},Nw=Pw.prototype;Nw.insert=function(t){var e=new Ow(t);return this.insertEntry(e),e},Nw.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++},Nw.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Nw.len=function(){return this._len},Nw.clear=function(){this.head=this.tail=null,this._len=0};var Ow=function(t){this.value=t,this.next,this.prev},Ew=function(t){this._list=new Pw,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rw=Ew.prototype;Rw.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ow(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Rw.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rw.clear=function(){this._list.clear(),this._map={}};var zw={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]},Bw=new Ew(20),Vw=null,Gw=Ut,Fw=Xt,Ww=(Object.freeze||Object)({parse:Gt,lift:Ht,toHex:Zt,fastLerp:Ut,fastMapToColor:Gw,lerp:Xt,mapToColor:Fw,modifyHSL:jt,modifyAlpha:Yt,stringify:qt}),Hw=Array.prototype.slice,Zw=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Kt,this._setter=n||$t,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Zw.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ae(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,o=0;for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var r=le(this,t,function(){--o||n._doneCallback()},this._tracks[a],a,e);r&&(this._clipList.push(r),o++,this.animation&&this.animation.addClip(r),i=r)}if(i){var s=i.onframe;i.onframe=function(t,e){s(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return o||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Uw=1;"undefined"!=typeof window&&(Uw=Math.max(window.devicePixelRatio||1,1));var Xw=Uw,jw=function(){},Yw=jw,qw=function(){this.animators=[]};qw.prototype={constructor:qw,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var u=0,h=r.length;u<h;u++)s&&(s=s[r[u]]);s&&(i=s)}else i=o;if(i){var c=o.animators,d=new Zw(i,e);return d.during(function(t){o.dirty(n)}).done(function(){c.splice(l(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d}Yw('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){ue(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){ue(this,t,e,i,n,o,a,!0)}};var Kw=function(t){Tw.call(this,t),fw.call(this,t),qw.call(this,t),this.id=t.id||H_()};Kw.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(w(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},h(Kw,qw),h(Kw,Tw),h(Kw,fw);var $w=Q,Jw=Math.min,Qw=Math.max;de.prototype={constructor:de,union:function(t){var e=Jw(t.x,this.x),i=Jw(t.y,this.y);this.width=Qw(t.x+t.width,this.x+this.width)-e,this.height=Qw(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],n=[];return function(o){if(o){t[0]=i[0]=this.x,t[1]=n[1]=this.y,e[0]=n[0]=this.x+this.width,e[1]=i[1]=this.y+this.height,$w(t,t,o),$w(e,e,o),$w(i,i,o),$w(n,n,o),this.x=Jw(t[0],e[0],i[0],n[0]),this.y=Jw(t[1],e[1],i[1],n[1]);var a=Qw(t[0],e[0],i[0],n[0]),r=Qw(t[1],e[1],i[1],n[1]);this.width=a-this.x,this.height=r-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,o=xt();return St(o,o,[-e.x,-e.y]),It(o,o,[i,n]),St(o,o,[t.x,t.y]),o},intersect:function(t){if(!t)return!1;t instanceof de||(t=de.create(t));var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<r||s<i||a<l||u<o)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new de(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},de.create=function(t){return new de(t.x,t.y,t.width,t.height)};var tb=function(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};tb.prototype={constructor:tb,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof tb&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof tb&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof tb&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new de(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},u(tb,Kw);var eb=32,ib=7,nb=function(){this._roots=[],this._displayList=[],this._displayListLen=0};nb.prototype={constructor:nb,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,U_.canvasSupported&&_e(i,we)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),a=o,o=o.clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof tb&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(i=0;i<this._roots.length;i++){var e=this._roots[i];e instanceof tb&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var i=0,n=t.length;i<n;i++)this.delRoot(t[i]);else{var o=l(this._roots,t);o>=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof tb&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:we};var ob={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ab=function(t,e,i){return ob.hasOwnProperty(e)?i*=t.dpr:i},rb={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},sb=9,lb=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ub=function(t){this.extendFrom(t,!1)};ub.prototype={constructor:ub,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==rb.STYLE_BIND;t.__attrCachedBy=rb.STYLE_BIND;for(var r=0;r<lb.length;r++){var s=lb[r],l=s[0];(a||n[l]!==o[l])&&(t[l]=ab(t,l,n[l]||s[1]))}if((a||n.fill!==o.fill)&&(t.fillStyle=n.fill),(a||n.stroke!==o.stroke)&&(t.strokeStyle=n.stroke),(a||n.opacity!==o.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(a||n.blend!==o.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Se:be)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var hb=ub.prototype,cb=0;cb<lb.length;cb++){var db=lb[cb];db[0]in hb||(hb[db[0]]=db[1])}ub.getGradient=hb.getGradient;var fb=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};fb.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var pb=function(t,e,i){var n;i=i||Xw,"string"==typeof t?n=Ie(t,e,i):w(t)&&(t=(n=t).id),this.id=t,this.dom=n;var o=n.style;o&&(n.onselectstart=Me,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};pb.prototype={constructor:pb,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Ie("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i=this.dom,n=this.ctx,o=i.width,a=i.height,e=e||this.clearColor,r=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(r&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/l,a/l)),n.clearRect(0,0,o,a),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||ub.getGradient(n,e,{x:0,y:0,width:o,height:a}),e.__canvasGradient=u):e.image&&(u=fb.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=u||e,n.fillRect(0,0,o,a),n.restore()}if(r){var h=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(h,0,0,o,a),n.restore()}}};var gb="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},mb=new Ew(50),vb={},yb=0,xb=5e3,_b=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,wb="12px sans-serif",bb={};bb.measureText=function(t,e){var i=s();return i.font=e||wb,i.measureText(t)};var Sb=wb,Mb={left:1,right:1,center:1},Ib={top:1,bottom:1,middle:1},Tb=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Ab=new de,Db=function(){};Db.prototype={constructor:Db,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&Ye(i);var n=i.text;if(null!=n&&(n+=""),ci(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&(Ab.copy(e),Ab.applyTransform(o),e=Ab),Ke(this,t,n,i,e,sb),t.restore()}}},di.prototype={constructor:di,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Kw.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new ub(t,this),this.dirty(!1),this}},u(di,Kw),h(di,Db),fi.prototype={constructor:fi,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=Ae(n,this._image,this,this.onload);if(o&&Ce(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,u=o.width/o.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(o,h,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(o,h,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new de(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},u(fi,di);var Cb=new de(0,0,0,0),Lb=new de(0,0,0,0),kb=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=a({},i||{}),this.dpr=i.devicePixelRatio||Xw,this._singleCanvas=n,this.root=t;var o=t.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var r=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,u=t.height;null!=i.width&&(l=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new pb(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[314159]=h,h.zlevel=314159,r.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=xi(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};kb.prototype={constructor:kb,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],a=this._layers[o];if(!a.__builtin__&&a.refresh){var r=0===n?this._backgroundColor:null;a.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=l(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){_e(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;gb(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,r=0;r<i.length;r++){var s=i[r],l=s.ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,f=c&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(h===s.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||s.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var m=h;m<s.__endIndex;m++){var v=t[m];if(this._doPaintEl(v,s,e,u),v.__dirty=v.__dirtyText=!1,c&&Date.now()-f>15)break}s.__drawIndex=m,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return U_.wxa&&d(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!mi(t,this._width,this._height))){var r=t.__clipPaths;n.prevElClipPaths&&!vi(r,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),yi(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new pb("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&n(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t])Yw("ZLevel "+t+" has been used already");else if(gi(e)){if(o>0&&t>n[0]){for(r=0;r<o-1&&!(n[r]<t&&n[r+1]>t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Yw("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)i=o[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(o=1;o<t.length;o++)if((r=t[o]).zlevel!==t[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,n=0,o=0;o<t.length;o++){var a,r=t[o],s=r.zlevel;r.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,n=1):a=this.getLayer(s+(n>0?.01:0),this._needsManuallyCompositing),a.__builtin__||Yw("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o<this._zlevelList.length;o++){var a=this._zlevelList[o];a!==t&&a!==t+.01||n(this._layers[a],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(l(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);d(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new pb("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||pi(s[i])||pi(r.style[i]))-(pi(s[o])||0)-(pi(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+r),c=Math.max(u/2,s+r),d=Math.max(u/2,-l+r),f=Math.max(u/2,l+r),p=o.width+h+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new fi({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Pb=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,fw.call(this)};Pb.prototype={constructor:Pb,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=l(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=o.length;for(r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(gb(t),!e._paused&&e._update())}var e=this;this._running=!0,gb(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new Zw(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},h(Pb,fw);var Nb=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ob=["touchstart","touchend","touchmove"],Eb={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Rb=f(Nb,function(t){var e=t.replace("mouse","pointer");return Eb[e]?e:t}),zb={mousemove:function(t){t=ut(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=ut(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),zb.mousemove.call(this,t),zb.mousedown.call(this,t),wi(this)},touchmove:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),zb.mousemove.call(this,t),wi(this)},touchend:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),zb.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&zb.click.call(this,t),wi(this)},pointerdown:function(t){zb.mousedown.call(this,t)},pointermove:function(t){bi(t)||zb.mousemove.call(this,t)},pointerup:function(t){zb.mouseup.call(this,t)},pointerout:function(t){bi(t)||zb.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){zb[t]=function(e){e=ut(this.dom,e),this.trigger(t,e)}});var Bb=Mi.prototype;Bb.dispose=function(){for(var t=Nb.concat(Ob),e=0;e<t.length;e++){var i=t[e];ct(this.dom,_i(i),this._handlers[i])}},Bb.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},h(Mi,fw);var Vb=!U_.canvasSupported,Gb={canvas:kb},Fb={},Wb=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new nb,a=i.renderer;if(Vb){if(!Gb.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Gb[a]||(a="canvas");var r=new Gb[a](e,o,i,t);this.storage=o,this.painter=r;var s=U_.node||U_.worker?null:new Mi(r.getViewportRoot());this.handler=new ww(o,r,s,r.root),this.animation=new Pb({stage:{update:m(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(n)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(n)}};Wb.prototype={constructor:Wb,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},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,Ai(this.id)}};var Hb=(Object.freeze||Object)({version:"4.0.7",init:Ii,dispose:function(t){if(t)t.dispose();else{for(var e in Fb)Fb.hasOwnProperty(e)&&Fb[e].dispose();Fb={}}return this},getInstance:function(t){return Fb[t]},registerPainter:Ti}),Zb=d,Ub=w,Xb=y,jb="series\0",Yb=["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"],qb=0,Kb=".",$b="___EC__COMPONENT__CONTAINER___",Jb=0,Qb=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var o={},a=0;a<t.length;a++){var r=t[a][1];if(!(i&&l(i,r)>=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},tS=Qb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eS={getLineStyle:function(t){var e=tS(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},iS=Qb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),nS={getAreaStyle:function(t,e){return iS(this,t,e)}},oS=Math.pow,aS=Math.sqrt,rS=1e-8,sS=1e-4,lS=aS(3),uS=1/3,hS=V(),cS=V(),dS=V(),fS=Math.min,pS=Math.max,gS=Math.sin,mS=Math.cos,vS=2*Math.PI,yS=V(),xS=V(),_S=V(),wS=[],bS=[],SS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},MS=[],IS=[],TS=[],AS=[],DS=Math.min,CS=Math.max,LS=Math.cos,kS=Math.sin,PS=Math.sqrt,NS=Math.abs,OS="undefined"!=typeof Float32Array,ES=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ES.prototype={constructor:ES,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=NS(1/Xw/t)||0,this._uy=NS(1/Xw/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(SS.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=NS(t-this._xi)>this._ux||NS(e-this._yi)>this._uy||this._len<5;return this.addData(SS.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(SS.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(SS.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(SS.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=LS(o)*i+t,this._yi=kS(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(SS.R,t,e,i,n),this},closePath:function(){this.addData(SS.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!OS||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();OS&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=PS(h*h+c*c),f=l,p=u,g=r.length;for(h/=d,c/=d,a<0&&(a=o+a),f-=(a%=o)*h,p-=a*c;h>0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&f<l||h<0&&f>l||c>0&&p<u||c<0&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?DS(f,t):CS(f,t),c>=0?DS(p,e):CS(p,e));h=f-t,c=p-e,this._dashOffset=-PS(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=tn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=PS(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-PS(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,OS&&(this.data=new Float32Array(t)))},getBoundingRect:function(){MS[0]=MS[1]=TS[0]=TS[1]=Number.MAX_VALUE,IS[0]=IS[1]=AS[0]=AS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;a<t.length;){var r=t[a++];switch(1===a&&(n=e=t[a],o=i=t[a+1]),r){case SS.M:e=n=t[a++],i=o=t[a++],TS[0]=n,TS[1]=o,AS[0]=n,AS[1]=o;break;case SS.L:pn(e,i,t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.C:gn(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.Q:mn(e,i,t[a++],t[a++],t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(n=LS(c)*u+s,o=kS(c)*h+l),vn(s,l,u,h,c,d,f,TS,AS),e=LS(d)*u+s,i=kS(d)*h+l;break;case SS.R:pn(n=e=t[a++],o=i=t[a++],n+t[a++],o+t[a++],TS,AS);break;case SS.Z:e=n,i=o}tt(MS,MS,TS),et(IS,IS,AS)}return 0===a&&(MS[0]=MS[1]=IS[0]=IS[1]=0),new de(MS[0],MS[1],IS[0]-MS[0],IS[1]-MS[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=o=s[c+1]),d){case SS.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case SS.L:a=s[c++],r=s[c++],(NS(a-n)>l||NS(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case SS.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=LS(v)*g+f,i=kS(v)*m+p),n=LS(M)*g+f,o=kS(M)*m+p;break;case SS.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case SS.Z:t.closePath(),n=e,o=i}}}},ES.CMD=SS;var RS=2*Math.PI,zS=2*Math.PI,BS=ES.CMD,VS=2*Math.PI,GS=1e-4,FS=[-1,-1,-1],WS=[-1,-1],HS=fb.prototype.getCanvasPattern,ZS=Math.abs,US=new ES(!0);Pn.prototype={constructor:Pn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||US,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=HS.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=HS.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ES},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new ES),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),kn(a,r/s,t,e)))return!0}if(o.hasFill())return Ln(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):di.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ZS(t[0]-1)>1e-10&&ZS(t[3]-1)>1e-10?Math.sqrt(ZS(t[0]*t[3]-t[2]*t[1])):1}},Pn.extend=function(t){var e=function(e){Pn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,Pn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Pn,di);var XS=ES.CMD,jS=[[],[],[]],YS=Math.sqrt,qS=Math.atan2,KS=function(t,e){var i,n,o,a,r,s,l=t.data,u=XS.M,h=XS.C,c=XS.L,d=XS.R,f=XS.A,p=XS.Q;for(o=0,a=0;o<l.length;){switch(i=l[o++],a=o,n=0,i){case u:case c:n=1;break;case h:n=3;break;case p:n=2;break;case f:var g=e[4],m=e[5],v=YS(e[0]*e[0]+e[1]*e[1]),y=YS(e[2]*e[2]+e[3]*e[3]),x=qS(-e[1]/y,e[0]/v);l[o]*=v,l[o++]+=g,l[o]*=y,l[o++]+=m,l[o++]*=v,l[o++]*=y,l[o++]+=x,l[o++]+=x,a=o+=2;break;case d:s[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[o++],s[1]+=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(r=0;r<n;r++)(s=jS[r])[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}},$S=Math.sqrt,JS=Math.sin,QS=Math.cos,tM=Math.PI,eM=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},iM=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(eM(t)*eM(e))},nM=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(iM(t,e))},oM=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,aM=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,rM=function(t){di.call(this,t)};rM.prototype={constructor:rM,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&Ye(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),ci(n,i)?(this.setTransform(t),Ke(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=rb.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Ye(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=ke(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,si(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},u(rM,di);var sM=Pn.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),lM=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],uM=function(t){return U_.browser.ie&&U_.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;o<i.length;o++){var a=i[o],r=a&&a.shape,s=a&&a.type;if(r&&("sector"===s&&r.startAngle===r.endAngle||"rect"===s&&(!r.width||!r.height))){for(l=0;l<lM.length;l++)lM[l][2]=n[lM[l][0]],n[lM[l][0]]=lM[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<lM.length;l++)n[lM[l][0]]=lM[l][2]}:t},hM=Pn.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+i,h*o+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),cM=Pn.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}}),dM=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=K(t[a-1],t[a]);var r=o/2;r=r<i?i:r;for(a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Bn(s[0],f[0],l[0],u[0],d,p,g),Bn(s[1],f[1],l[1],u[1],d,p,g)])}return n},fM=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)tt(r,r,t[d]),et(s,s,t[d]);tt(r,r,n[0]),et(s,s,n[1])}for(var d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(F(t[d]));continue}o=t[d-1],a=t[d+1]}U(u,a,o),Y(u,u,e);var g=K(p,o),m=K(p,a),v=g+m;0!==v&&(g/=v,m/=v),Y(h,u,-g),Y(c,u,m);var y=H([],p,h),x=H([],p,c);n&&(et(y,y,r),tt(y,y,s),et(x,x,r),tt(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},pM=Pn.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Vn(t,e,!0)}}),gM=Pn.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Vn(t,e,!1)}}),mM=Math.round,vM={},yM=Pn.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(Fn(vM,e,this.style),i=vM.x,n=vM.y,o=vM.width,a=vM.height,vM.r=e.r,e=vM):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?je(t,e):t.rect(i,n,o,a),t.closePath()}}),xM={},_M=Pn.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(Gn(xM,e,this.style),i=xM.x1,n=xM.y1,o=xM.x2,a=xM.y2):(i=e.x1,n=e.y1,o=e.x2,a=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),wM=[],bM=Pn.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(cn(i,r,o,h,wM),r=wM[1],o=wM[2],cn(n,s,a,h,wM),s=wM[1],a=wM[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(an(i,r,l,o,h,wM),r=wM[1],l=wM[2],o=wM[3],an(n,s,u,a,h,wM),s=wM[1],u=wM[2],a=wM[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return Hn(this.shape,t,!1)},tangentAt:function(t){var e=Hn(this.shape,t,!0);return q(e,e)}}),SM=Pn.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),MM=Pn.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Pn.prototype.getBoundingRect.call(this)}}),IM=function(t){this.colorStops=t||[]};IM.prototype={constructor:IM,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var TM=function(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,IM.call(this,o)};TM.prototype={constructor:TM},u(TM,IM);var AM=function(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,IM.call(this,n)};AM.prototype={constructor:AM},u(AM,IM),Zn.prototype.incremental=!0,Zn.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Zn.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Zn.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Zn.prototype.eachPendingDisplayable=function(t){for(e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Zn.prototype.update=function(){this.updateTransform();for(t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Zn.prototype.brush=function(t,e){for(i=this._cursor;i<this._displayables.length;i++)(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);this._cursor=i;for(var i=0;i<this._temporaryDisplayables.length;i++){var n=this._temporaryDisplayables[i];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var DM=[];Zn.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new de(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(DM)),t.union(n)}this._rect=t}return this._rect},Zn.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},u(Zn,di);var CM=Math.round,LM=Math.max,kM=Math.min,PM={},NM=1,OM=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new Pn(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r},EM=R(),RM=0,zM=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:NM,extendShape:Un,extendPath:function(t,e){return zn(t,e)},makePath:Xn,makeImage:jn,mergePath:OM,resizePath:qn,subPixelOptimizeLine:Kn,subPixelOptimizeRect:$n,subPixelOptimize:Jn,setElementHoverStyle:ro,isInEmphasis:so,setHoverStyle:fo,setAsHoverStyleTrigger:po,setLabelStyle:go,setTextStyle:mo,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,vo(t,e,o,n)},getFont:So,updateProps:Io,initProps:To,getTransform:Ao,applyTransform:Do,transformDirection:Co,groupTransition:Lo,clipPointsByRect:ko,clipRectByRect:function(t,e){var i=LM(t.x,e.x),n=kM(t.x+t.width,e.x+e.width),o=LM(t.y,e.y),a=kM(t.y+t.height,e.y+e.height);if(n>=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Po,Group:tb,Image:fi,Text:rM,Circle:sM,Sector:hM,Ring:cM,Polygon:pM,Polyline:gM,Rect:yM,Line:_M,BezierCurve:bM,Arc:SM,IncrementalDisplayable:Zn,CompoundPath:MM,LinearGradient:TM,RadialGradient:AM,BoundingRect:de}),BM=["textStyle","color"],VM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(BM):null)},getFont:function(){return So({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ke(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},GM=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),FM={getItemStyle:function(t,e){var i=GM(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},WM=h,HM=Bi();No.prototype={constructor:No,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Oo(this.option,this.parsePath(t),!e&&Eo(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Eo(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:Oo(this.option,t=this.parsePath(t));return e=e||(i=Eo(this,t))&&i.getModel(t),new No(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){HM(this).getParent=t},isAnimationEnabled:function(){if(!U_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ji(No),Yi(No),WM(No,eS),WM(No,nS),WM(No,VM),WM(No,FM);var ZM=0,UM=1e-4,XM=9007199254740991,jM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,YM=(Object.freeze||Object)({linearMap:Bo,parsePercent:Vo,round:Go,asc:Fo,getPrecision:Wo,getPrecisionSafe:Ho,getPixelPrecision:Zo,getPercentWithPrecision:Uo,MAX_SAFE_INTEGER:XM,remRadian:Xo,isRadianAroundZero:jo,parseDate:Yo,quantity:qo,nice:$o,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:Jo,isNumeric:Qo}),qM=L,KM=/([&<>"'])/g,$M={"&":"&","<":"<",">":">",'"':""","'":"'"},JM=["a","b","c","d","e","f","g"],QM=function(t,e){return"{"+t+(null==e?"":e)+"}"},tI=ze,eI=(Object.freeze||Object)({addCommas:ta,toCamelCase:ea,normalizeCssArray:qM,encodeHTML:ia,formatTpl:na,formatTplSimple:oa,getTooltipMarker:aa,formatTime:sa,capitalFirst:la,truncateText:tI,getTextBoundingRect:function(t){return ke(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return ke(t,e,i,n,o,s,a,r)}}),iI=d,nI=["left","right","top","bottom","width","height"],oI=[["width","left","right"],["height","top","bottom"]],aI=ua,rI=(v(ua,"vertical"),v(ua,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),sI=Bi(),lI=No.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){No.call(this,t,e,i,n),this.uid=Ro("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&pa(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&pa(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=sI(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultOption;o&&e.push(o),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});$i(lI,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Ui(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Ui(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(lI),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originalDeps=e(r),t);s.entryCount=u.length,0===s.entryCount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(lI,function(t){var e=[];return d(lI.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Ui(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(lI,rI);var uI="";"undefined"!=typeof navigator&&(uI=navigator.platform||"");var hI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:uI.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},cI=Bi(),dI={clearColorPalette:function(){cI(this).colorIdx=0,cI(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=cI(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Di(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?va(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},fI={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),xa(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),xa(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),xa(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),xa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),xa(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();d(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),xa(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}},pI="original",gI="arrayRows",mI="objectRows",vI="keyedColumns",yI="unknown",xI="typedArray",_I="column",wI="row";_a.seriesDataToSource=function(t){return new _a({data:t,sourceFormat:S(t)?xI:pI,fromDataset:!1})},Yi(_a);var bI=Bi(),SI="\0_ec_inner",MI=No.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new No(i),this._optionManager=n},setOption:function(t,e){k(!(SI in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Ea.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&d(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];Sa(this),d(t,function(t,o){null!=t&&(lI.hasClass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),lI.topologicalTravel(r,lI.getAllClassMainTypes(),function(i,n){var r=Di(t[i]),s=Pi(o.get(i),r);Ni(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=za(i,n,t.exist))});var l=Ra(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"Empty component definition"),s){var u=lI.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&Ba(this,o.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(lI.hasClass(i)){for(var n=(e=Di(e)).length-1;n>=0;n--)Ei(e[n])&&e.splice(n,1);t[i]=e}}),delete t[SI],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return Va(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Va(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ba(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Ba(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),lI.topologicalTravel(i,lI.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!Na(e,t))&&e.restoreData()})})}});h(MI,dI);var II=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],TI={};Fa.prototype={constructor:Fa,create:function(t,e){var i=[];d(TI,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Fa.register=function(t,e){TI[t]=e},Fa.get=function(t){return TI[t]};var AI=d,DI=i,CI=f,LI=n,kI=/^(min|max)?(.+)$/;Wa.prototype={constructor:Wa,setOption:function(t,e){t&&d(Di(t.series),function(t){t&&t.data&&S(t.data)&&N(t.data)}),t=DI(t,!0);var i=this._optionBackup,n=Ha.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ja(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=CI(e.timelineOptions,DI),this._mediaList=CI(e.mediaList,DI),this._mediaDefault=DI(e.mediaDefault),this._currentMediaIndices=[],DI(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=DI(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s<l;s++)Za(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!Xa(a,this._currentMediaIndices)&&(r=CI(a,function(t){return DI(-1===t?o.option:n[t].option)})),this._currentMediaIndices=a,r}};var PI=d,NI=w,OI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],EI=function(t,e){PI(tr(t.series),function(t){NI(t)&&Qa(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),PI(i,function(e){PI(tr(t[e]),function(t){t&&($a(t,"axisLabel"),$a(t.axisPointer,"label"))})}),PI(tr(t.parallel),function(t){var e=t&&t.parallelAxisDefault;$a(e,"axisLabel"),$a(e&&e.axisPointer,"label")}),PI(tr(t.calendar),function(t){qa(t,"itemStyle"),$a(t,"dayLabel"),$a(t,"monthLabel"),$a(t,"yearLabel")}),PI(tr(t.radar),function(t){$a(t,"name")}),PI(tr(t.geo),function(t){NI(t)&&(Ja(t),PI(tr(t.regions),function(t){Ja(t)}))}),PI(tr(t.timeline),function(t){Ja(t),qa(t,"label"),qa(t,"itemStyle"),qa(t,"controlStyle",!0);var e=t.data;y(e)&&d(e,function(t){w(t)&&(qa(t,"label"),qa(t,"itemStyle"))})}),PI(tr(t.toolbox),function(t){qa(t,"iconStyle"),PI(t.feature,function(t){qa(t,"iconStyle")})}),$a(er(t.axisPointer),"label"),$a(er(t.tooltip).axisPointer,"label")},RI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],zI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BI=function(t,e){EI(t,e),t.series=Di(t.series),d(t.series,function(t){if(w(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=ir(t,"pointer.color");null!=i&&nr(t,"itemStyle.normal.color",i)}or(t)}}),t.dataRange&&(t.visualMap=t.dataRange),d(zI,function(e){var i=t[e];i&&(y(i)||(i=[i]),d(i,function(t){or(t)}))})},VI=rr.prototype;VI.pure=!1,VI.persistent=!0,VI.getSource=function(){return this._source};var GI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:ur},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:sr,getItem:lr,appendData:ur},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var e=this._data;d(t,function(t,i){for(var n=e[i]||(e[i]=[]),o=0;o<(t||[]).length;o++)n.push(t[o])})}},original:{count:sr,getItem:lr,appendData:ur},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},FI={arrayRows:hr,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:hr,original:function(t,e,i,n){var o=Li(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:hr},WI={arrayRows:cr,objectRows:function(t,e,i,n){return dr(t[e],this._dimensionInfos[e])},keyedColumns:cr,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&ki(t)&&(this.hasItemOption=!0),dr(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},HI=/\{@(.+?)\}/g,ZI={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=this.ecModel.getComponent("tooltip"),u=Hi(l&&l.get("renderMode")),h=this.mainType,c="series"===h;return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,marker:aa({color:s,renderMode:u}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,o){e=e||"normal";var a=this.getData(i),r=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===e?[o||"label","formatter"]:[e,o||"label","formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?na(l,s).replace(HI,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),fr(a,t,i)}):void 0},getRawValue:function(t,e){return fr(this.getData(e),t)},formatTooltip:function(){}},UI=mr.prototype;UI.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;r===l&&s===u||(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=yr(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||d<f)){var p=this._progress;if(y(p))for(var g=0;g<p.length;g++)vr(this,p[g],d,f,l,u);else vr(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var XI=function(){function t(){return n<i?n++:null}function e(){var t=n%r*o+Math.ceil(n/r),e=n>=i?null:t<a?t:n;return n++,e}var i,n,o,a,r,s={reset:function(l,u,h,c){n=l,i=u,o=h,a=c,r=Math.ceil(a/o),s.next=o>1&&a>0?e:t}};return s}();UI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},UI.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},UI.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},UI.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},UI.getUpstream=function(){return this._upstream},UI.getDownstream=function(){return this._downstream},UI.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var jI=Bi(),YI=lI.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=gr({count:wr,reset:br}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Ma(this);var o=this.getInitialData(t,i);Mr(o,this),this.dataTask.context.data=o,jI(this).dataBeforeProcessed=o,xr(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{},a=this.subType;lI.hasClass(a)&&(a+="Series"),n(t,e.getTheme().get(this.subType)),n(t,this.getDefaultOption()),Ci(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&pa(t,o,i)},mergeOption:function(t,e){t=n(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&pa(this.option,t,i),Ma(this);var o=this.getInitialData(t,e);Mr(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,jI(this).dataBeforeProcessed=o,xr(this)},fillDataTextStyle:function(t){if(t&&!S(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Ci(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Tr(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return jI(this).data},setData:function(t){var e=Tr(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}jI(this).data=t},getSource:function(){return ba(this)},getRawData:function(){return jI(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){function o(t){return{renderMode:n,content:ia(ta(t)),style:l}}var a=this,r="html"===(n=n||"html")?"<br/>":"\n",s="richText"===n,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(i){function o(t,i){var o=h.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var c=o.type,d="sub"+a.seriesIndex+"at"+u,p=aa({color:v,type:"subItem",renderMode:n,markerId:d}),g="string"==typeof p?p:p.content,m=(r?g+ia(o.displayName||"-")+": ":"")+ia("ordinal"===c?t+"":"time"===c?e?"":sa("yyyy/MM/dd hh:mm:ss",t):ta(t));m&&f.push(m),s&&(l[d]=v,++u)}}var r=p(i,function(t,e,i){var n=h.getDimensionInfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayName},0),f=[];c.length?d(c,function(e){o(fr(h,t,e),e)}):d(i,o);var g=r?s?"\n":"<br/>":"",m=g+f.join(g||", ");return{renderMode:n,content:m,style:l}}(g):o(f?fr(h,t,c[0]):m?g[0]:g)).content,_=a.seriesIndex+"at"+u,b=aa({color:v,type:"item",renderMode:n,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;Oi(this)||(M=""),M=M?ia(M)+(e?": ":r):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?ia(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=dI.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});h(YI,ZI),h(YI,dI);var qI=function(){this.group=new tb,this.uid=Ro("viewComponent")};qI.prototype={constructor:qI,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var KI=qI.prototype;KI.updateView=KI.updateLayout=KI.updateVisual=function(t,e,i,n){},ji(qI),$i(qI,{registerWhenExtend:!0});var $I=function(){var t=Bi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}},JI=Bi(),QI=$I();Ar.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Cr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Cr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var tT=Ar.prototype;tT.updateView=tT.updateLayout=tT.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ji(Ar),$i(Ar,{registerWhenExtend:!0}),Ar.markUpdateMethod=function(t,e){JI(t).updateMethod=e};var eT={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)}}},iT="\0__throttleOriginMethod",nT="\0__throttleRate",oT="\0__throttleType",aT={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof IM||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},rT={toolbox:{brush:{title:{rect:"ç©å½¢éæ©",polygon:"åé",lineX:"横åéæ©",lineY:"纵åéæ©",keep:"ä¿æéæ©",clear:"æ¸
é¤éæ©"}},dataView:{title:"æ°æ®è§å¾",lang:["æ°æ®è§å¾","å
³é","å·æ°"]},dataZoom:{title:{zoom:"åºå缩æ¾",back:"åºå缩æ¾è¿å"}},magicType:{title:{line:"åæ¢ä¸ºæçº¿å¾",bar:"åæ¢ä¸ºæ±ç¶å¾",stack:"åæ¢ä¸ºå å ",tiled:"åæ¢ä¸ºå¹³éº"}},restore:{title:"è¿å"},saveAsImage:{title:"ä¿å为å¾ç",lang:["å³é®å¦å为å¾ç"]}},series:{typeNames:{pie:"饼å¾",bar:"æ±ç¶å¾",line:"æçº¿å¾",scatter:"æ£ç¹å¾",effectScatter:"æ¶æ¼ªæ£ç¹å¾",radar:"é·è¾¾å¾",tree:"æ å¾",treemap:"ç©å½¢æ å¾",boxplot:"ç®±åå¾",candlestick:"K线å¾",k:"K线å¾",heatmap:"çåå¾",map:"å°å¾",parallel:"å¹³è¡åæ å¾",lines:"线å¾",graph:"å
³ç³»å¾",sankey:"æ¡åºå¾",funnel:"æ¼æå¾",gauge:"仪表çå¾",pictorialBar:"象形æ±å¾",themeRiver:"䏻颿²³æµå¾",sunburst:"ææ¥å¾"}},aria:{general:{withTitle:"è¿æ¯ä¸ä¸ªå
³äºâ{title}âçå¾è¡¨ã",withoutTitle:"è¿æ¯ä¸ä¸ªå¾è¡¨ï¼"},series:{single:{prefix:"",withName:"å¾è¡¨ç±»åæ¯{seriesType}ï¼è¡¨ç¤º{seriesName}ã",withoutName:"å¾è¡¨ç±»åæ¯{seriesType}ã"},multiple:{prefix:"å®ç±{seriesCount}个å¾è¡¨ç³»åç»æã",withName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ªè¡¨ç¤º{seriesName}ç{seriesType}ï¼",withoutName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ª{seriesType}ï¼",separator:{middle:"ï¼",end:"ã"}}},data:{allData:"å
¶æ°æ®æ¯ââ",partialData:"å
¶ä¸ï¼å{displayCnt}项æ¯ââ",withName:"{name}çæ°æ®æ¯{value}",withoutName:"{value}",separator:{middle:"ï¼",end:""}}}},sT=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=rT.aria,o=0;o<i.length;++o)n=n[i[o]];return n}return e}function o(t){return rT.series.typeNames[t]||"èªå®ä¹å¾"}var a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var r=0;e.eachSeries(function(t,e){++r},this);var s,l=a.get("data.maxCount")||10,u=a.get("series.maxCount")||10,h=Math.min(r,u);if(!(r<1)){var c=function(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}();s=c?i(n("general.withTitle"),{title:c}):n("general.withoutTitle");var f=[];s+=i(n(r>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:r}),e.eachSeries(function(t,e){if(e<h){var a,s=t.get("name"),u="series."+(r>1?"multiple":"single")+".";a=i(a=n(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var c=t.getData();window.data=c,c.count()>l?a+=i(n("data.partialData"),{displayCnt:l}):a+=n("data.allData");for(var d=[],p=0;p<c.count();p++)if(p<l){var g=c.getName(p),m=fr(c,p);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),f.push(a)}}),s+=f.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",s)}}},lT=Math.PI,uT=Er.prototype;uT.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},uT.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},uT.getPipeline=function(t){return this._pipelineMap.get(t)},uT.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},uT.restorePipelines=function(t){var e=this,i=e._pipelineMap=R();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),jr(e,t,t.dataTask)})},uT.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&zr(this,n,o,e,i),n.overallReset&&Br(this,n,o,e,i)},this)},uT.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,jr(this,e,o)},uT.performDataProcessorTasks=function(t,e){Rr(this,this._dataProcessorHandlers,t,e,{block:!0})},uT.performVisualTasks=function(t,e,i){Rr(this,this._visualHandlers,t,e,i)},uT.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},uT.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)})};var hT=uT.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cT=Ur(0);Er.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:Yr(t)}),t.uid=Ro("stageHandler"),e&&(t.visualType=e),t};var dT,fT={},pT={};qr(fT,MI),qr(pT,Ga),fT.eachSeriesByType=fT.eachRawSeriesByType=function(t){dT=t},fT.eachComponent=function(t){"series"===t.mainType&&t.subType&&(dT=t.subType)};var gT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mT={color:gT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],gT]},vT=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],yT={color:vT,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:vT[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:vT},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};yT.categoryAxis.splitLine.show=!1,lI.extend({type:"dataset",defaultOption:{seriesLayoutBy:_I,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wa(this)}}),qI.extend({type:"dataset"});var xT=Pn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),_T=/[\s,]+/;$r.prototype.parse=function(t,e){e=e||{};var i=Kr(t);if(!i)throw new Error("Illegal svg");var n=new tb;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),es(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=P(o).split(_T);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=as(l,a,r),!e.ignoreViewBox)){var c=n;(n=new tb).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new yM({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},$r.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){if(r=bT[i]){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=wT[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},$r.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new rM({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Qr(e,o),es(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var wT={g:function(t,e){var i=new tb;return Qr(e,i),es(t,i,this._defs),i},rect:function(t,e){var i=new yM;return Qr(e,i),es(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new sM;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new _M;return Qr(e,i),es(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new xT;return Qr(e,i),es(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=ts(i));var n=new pM({shape:{points:i||[]}});return Qr(e,n),es(t,n,this._defs),n},polyline:function(t,e){var i=new Pn;Qr(e,i),es(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=ts(n)),new gM({shape:{points:n||[]}})},image:function(t,e){var i=new fi;return Qr(e,i),es(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new tb;return Qr(e,r),es(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new tb;return Qr(e,r),es(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Rn(t.getAttribute("d")||"");return Qr(e,i),es(t,i,this._defs),i}},bT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new TM(e,i,n,o);return Jr(t,a),a},radialgradient:function(t){}},ST={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-align":"textAlign","alignment-baseline":"textBaseline"},MT=/url\(\s*#(.*?)\)/,IT=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,TT=/([^\s:;]+)\s*:\s*([^:;]+)/g,AT=R(),DT={registerMap:function(t,e,i){var n;return y(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),d(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,CT[e])(t)}),AT.set(t,n)},retrieveMap:function(t){return AT.get(t)}},CT={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Kr(t.source)}},LT=k,kT=d,PT=x,NT=w,OT=lI.parseClassType,ET={zrender:"4.0.6"},RT=1e3,zT=1e3,BT=3e3,VT={PROCESSOR:{FILTER:RT,STATISTIC:5e3},VISUAL:{LAYOUT:zT,GLOBAL:2e3,CHART:BT,COMPONENT:4e3,BRUSH:5e3}},GT="__flagInMainProcess",FT="__optionUpdated",WT=/^[a-zA-Z0-9_]+$/;ls.prototype.on=ss("on"),ls.prototype.off=ss("off"),ls.prototype.one=ss("one"),h(ls,fw);var HT=us.prototype;HT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[FT]){var e=this[FT].silent;this[GT]=!0,cs(this),ZT.update.call(this),this[GT]=!1,this[FT]=!1,gs.call(this,e),ms.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),fs(this,n),t.performVisualTasks(n),bs(this,this._model,0,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},HT.getDom=function(){return this._dom},HT.getZr=function(){return this._zr},HT.setOption=function(t,e,i){var n;if(NT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[GT]=!0,!this._model||e){var o=new Wa(this._api),a=this._theme,r=this._model=new MI(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,qT),i?(this[FT]={silent:n},this[GT]=!1):(cs(this),ZT.update.call(this),this._zr.flush(),this[FT]=!1,this[GT]=!1,gs.call(this,n),ms.call(this,n))},HT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},HT.getModel=function(){return this._model},HT.getOption=function(){return this._model&&this._model.getOption()},HT.getWidth=function(){return this._zr.getWidth()},HT.getHeight=function(){return this._zr.getHeight()},HT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},HT.getRenderedCanvas=function(t){if(U_.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},HT.getSvgDataUrl=function(){if(U_.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},HT.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;kT(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return kT(n,function(t){t.group.ignore=!1}),a},HT.getConnectedDataURL=function(t){if(U_.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(eA[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(tA,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(i(t)),f=h.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=iw();p.width=c,p.height=f;var g=Ii(p);return kT(u,function(t){var e=new fi({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},HT.convertToPixel=v(hs,"convertToPixel"),HT.convertFromPixel=v(hs,"convertFromPixel"),HT.containPixel=function(t,e){var i;return t=Vi(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},HT.getVisual=function(t,e){var i=(t=Vi(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},HT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},HT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ZT={prepareAndUpdate:function(t){cs(this),ZT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),fs(this,e),o.update(e,i),xs(e),a.performVisualTasks(e,t),_s(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(U_.canvasSupported)n.setBackgroundColor(r);else{var s=Gt(r);r=qt(s,"rgb"),0===s[3]&&(r="transparent")}Ss(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=R();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),bs(i,e,0,t,a),Ss(e,this._api)}},updateView:function(t){var e=this._model;e&&(Ar.markUpdateMethod(t,"updateView"),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),_s(this,this._model,this._api,t),Ss(e,this._api))},updateVisual:function(t){ZT.update.call(this,t)},updateLayout:function(t){ZT.update.call(this,t)}};HT.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[GT]=!0,i&&cs(this),ZT.update.call(this),this[GT]=!1,gs.call(this,n),ms.call(this,n)}},HT.showLoading=function(t,e){if(NT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),QT[t]){var i=QT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},HT.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},HT.makeActionFromEvent=function(t){var e=a({},t);return e.type=jT[t.type],e},HT.dispatchAction=function(t,e){NT(e)||(e={silent:!!e}),XT[t.type]&&this._model&&(this[GT]?this._pendingActions.push(t):(ps.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&U_.browser.weChat&&this._throttledZrFlush(),gs.call(this,e.silent),ms.call(this,e.silent)))},HT.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},HT.on=ss("on"),HT.off=ss("off"),HT.one=ss("one");var UT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];HT._initEvents=function(){kT(UT,function(t){var e=function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=a({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),kT(jT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},HT.isDisposed=function(){return this._disposed},HT.clear=function(){this.setOption({series:[]},!0)},HT.dispose=function(){if(!this._disposed){this._disposed=!0,Fi(this.getDom(),oA,"");var t=this._api,e=this._model;kT(this._componentsViews,function(i){i.dispose(e,t)}),kT(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete tA[this.id]}},h(us,fw),Ds.prototype={constructor:Ds,normalizeQuery:function(t){var e={},i={},n={};if(_(t)){var o=OT(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};d(t,function(t,o){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=o.lastIndexOf(u);if(h>0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){function n(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var o=this.eventInfo;if(!o)return!0;var a=o.targetEl,r=o.packedEvent,s=o.model,l=o.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return n(u,s,"mainType")&&n(u,s,"subType")&&n(u,s,"index","componentIndex")&&n(u,s,"name")&&n(u,s,"id")&&n(h,r,"name")&&n(h,r,"dataIndex")&&n(h,r,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,r))},afterTrigger:function(){this.eventInfo=null}};var XT={},jT={},YT=[],qT=[],KT=[],$T=[],JT={},QT={},tA={},eA={},iA=new Date-0,nA=new Date-0,oA="_echarts_instance_",aA=Ls;Bs(2e3,aT),Ns(BI),Os(5e3,function(t){var e=R();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(ar)}),Gs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new yM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new SM({shape:{startAngle:-lT/2,endAngle:-lT/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new yM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*lT/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*lT/2}).delay(300).start("circularInOut");var a=new tb;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),Es({type:"highlight",event:"highlight",update:"highlight"},B),Es({type:"downplay",event:"downplay",update:"downplay"},B),Ps("light",mT),Ps("dark",yT);var rA={};Xs.prototype={constructor:Xs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(js(t,{},n,"_oldKeyGetter",this),js(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=i[r=n[a]])?((u=s.length)?(1===u&&(i[r]=null),s=s.unshift()):i[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s=i[r];if(null==s)continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var sA=R(["tooltip","label","itemName","itemId","seriesName"]),lA=w,uA=-1,hA="e\0\0",cA={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},dA="undefined"==typeof Uint32Array?Array:Uint32Array,fA="undefined"==typeof Int32Array?Array:Int32Array,pA="undefined"==typeof Uint16Array?Array:Uint16Array,gA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],mA=["_extent","_approximateExtent","_rawExtent"],vA=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];_(r)&&(r={name:r});var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),i[s]=r,r.index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Ys(this),this._invertedIndicesMap=o,this._calculationInfo={}},yA=vA.prototype;yA.type="list",yA.hasItemOption=!0,yA.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},yA.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},yA.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},yA.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},yA.initData=function(t,e,i){(_a.isInstance(t)||c(t))&&(t=new rr(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=WI[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=WI.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},yA.getProvider=function(){return this._rawData},yA.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},yA.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++)r[v=o[h]]||(r[v]=[1/0,-1/0]),n[v]||(n[v]=[]),tl(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length;for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},el(this)},yA._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=r[p]]||(c[w]=[1/0,-1/0]);var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),tl(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w=r[_],b=a[w][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},el(this)}},yA.count=function(){return this._count},yA.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){n=new e(i);for(o=0;o<i;o++)n[o]=t[o]}else n=new e(t.buffer,0,i)}else for(var n=new(e=$s(this))(this.count()),o=0;o<n.length;o++)n[o]=o;return n},yA.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[t][n][o]},yA.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[n][o]},yA._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},yA.getValues=function(t,e){var i=[];y(t)||(e=t,t=this.dimensions);for(var n=0,o=t.length;n<o;n++)i.push(this.get(t[n],e));return i},yA.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=this._dimensionInfos,n=0,o=e.length;n<o;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},yA.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var i,n=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=e)[0],a=i[1],r=0;r<n;r++){var s=this._getFast(t,this.getRawIndex(r));s<o&&(o=s),s>a&&(a=s)}return i=[o,a],this._extent[t]=i,i},yA.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},yA.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},yA.getCalculationInfo=function(t){return this._calculationInfo[t]},yA.setCalculationInfo=function(t,e){lA(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},yA.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},yA.getMedian=function(t){var e=[];this.each(t,function(t,i){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},yA.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?uA:i},yA.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},yA.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;o=a-1}}return-1},yA.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r<s;r++){var l=e-this.get(t,r),u=Math.abs(l);l<=i&&u<=o&&((u<o||l>=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},yA.getRawIndex=nl,yA.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},yA.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||il(this,this._nameDimIdx,e)||""},yA.getId=function(t){return al(this,this.getRawIndex(t))},yA.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var o=(t=f(rl(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},yA.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=f(rl(t),this.getDimension,this);for(var o=this.count(),a=new($s(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var p=this._getFast(u,d);c=e.call(i,p,h)}else{for(var g=0;g<s;g++)r[g]=this._getFast(u,d);r[g]=h,c=e.apply(i,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?ol:nl,this}},yA.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var o=this.count(),a=new($s(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++)((w=p[m])>=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f<this._chunkCount;f++)for(var p=d[f],_=v[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(w>=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){M=this.getRawIndex(m);((w=this._getFast(s,M))>=l&&w<=u||isNaN(w))&&(a[r++]=M)}else for(m=0;m<o;m++){for(var S=!0,M=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,M))<t[I][0]||w>t[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?ol:nl,this}}},yA.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i),o},yA.map=function(t,e,i,n){i=i||n||this;var o=sl(this,t=f(rl(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?ol:nl;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)h[p]=this.get(t[p],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=a[_];S&&(S[v][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return o},yA.downSample=function(t,e,i,n){for(var o=sl(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new($s(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=_%h;l[Math.floor(_/h)][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=ol,o},yA.getItemModel=function(t){var e=this.hostModel;return new No(this.getRawDataItem(t),e,e&&e.ecModel)},yA.diff=function(t){var e=this;return new Xs(t?t.getIndices():[],this.getIndices(),function(e){return al(t,e)},function(t){return al(e,t)})},yA.getVisual=function(t){var e=this._visual;return e&&e[t]},yA.setVisual=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},yA.setLayout=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},yA.getLayout=function(t){return this._layout[t]},yA.getItemLayout=function(t){return this._itemLayouts[t]},yA.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},yA.clearItemLayouts=function(){this._itemLayouts.length=0},yA.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},yA.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,lA(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},yA.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var xA=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};yA.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(xA,e)),this._graphicEls[t]=e},yA.getItemGraphicEl=function(t){return this._graphicEls[t]},yA.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},yA.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new vA(e,this.hostModel)}if(t._storage=this._storage,Qs(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ol:nl,t},yA.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},yA.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],yA.CHANGABLE_METHODS=["filterSelf","selectRange"];var _A=function(t,e){return e=e||{},hl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};xl.prototype.parse=function(t){return t},xl.prototype.getSetting=function(t){return this._setting[t]},xl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},xl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},xl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},xl.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},xl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},xl.prototype.getExtent=function(){return this._extent.slice()},xl.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},xl.prototype.isBlank=function(){return this._isBlank},xl.prototype.setBlank=function(t){this._isBlank=t},xl.prototype.getLabel=null,ji(xl),$i(xl,{registerWhenExtend:!0}),_l.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,bl);return new _l({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var wA=_l.prototype;wA.getOrdinal=function(t){return wl(this).get(t)},wA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=wl(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var bA=xl.prototype,SA=xl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new _l({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),bA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return bA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(bA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:B,niceExtent:B});SA.create=function(){return new SA};var MA=Go,IA=Go,TA=xl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),TA.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ml(t)},getTicks:function(){return Al(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Ho(t)||0:"auto"===i&&(i=this._intervalPrecision),t=IA(t,i,!0),ta(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=Sl(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=IA(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=IA(Math.ceil(e[1]/o)*o))}});TA.create=function(){return new TA};var AA="__ec_stack_",DA="undefined"!=typeof Float32Array?Float32Array:Array,CA={seriesType:"bar",plan:$I(),reset:function(t){if(Rl(t)&&zl(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=Ol(Pl([t]),n,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var n,h=new DA(2*t.count),c=[],d=[],f=0;null!=(n=t.next());)d[l]=e.get(a,n),d[1-l]=e.get(r,n),c=i.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:Bl(0,o),valueAxisHorizontal:s})}}}}},LA=TA.prototype,kA=Math.ceil,PA=Math.floor,NA=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=o+1:n=o}return i},OA=TA.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return sa(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Go(PA(e[0]/n)*n)),t.fixMax||(e[1]=Go(kA(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0],a=o/t;null!=e&&a<e&&(a=e),null!=i&&a>i&&(a=i);var r=EA.length,s=NA(EA,a,0,r),l=EA[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=$o(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(kA((n[0]-h)/u)*u+h),Math.round(PA((n[1]-h)/u)*u+h)];Tl(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yo(t)}});d(["contain","normalize"],function(t){OA.prototype[t]=function(e){return LA[t].call(this,this.parse(e))}});var EA=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];OA.create=function(t){return new OA({useUTC:t.ecModel.get("useUTC")})};var RA=xl.prototype,zA=TA.prototype,BA=Ho,VA=Go,GA=Math.floor,FA=Math.ceil,WA=Math.pow,HA=Math.log,ZA=xl.extend({type:"log",base:10,$constructor:function(){xl.apply(this,arguments),this._originalScale=new TA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(zA.getTicks.call(this),function(n){var o=Go(WA(this.base,n));return o=n===e[0]&&t.__fixMin?Vl(o,i[0]):o,o=n===e[1]&&t.__fixMax?Vl(o,i[1]):o},this)},getLabel:zA.getLabel,scale:function(t){return t=RA.scale.call(this,t),WA(this.base,t)},setExtent:function(t,e){var i=this.base;t=HA(t)/HA(i),e=HA(e)/HA(i),zA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=RA.getExtent.call(this);e[0]=WA(t,e[0]),e[1]=WA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Vl(e[0],n[0])),i.__fixMax&&(e[1]=Vl(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=HA(t[0])/HA(e),t[1]=HA(t[1])/HA(e),RA.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=qo(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Go(FA(e[0]/n)*n),Go(GA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){zA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){ZA.prototype[t]=function(e){return e=HA(e)/HA(this.base),RA[t].call(this,e)}}),ZA.create=function(){return new ZA};var UA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},XA=Un({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),jA=Un({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),YA=Un({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),qA=Un({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),KA={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},$A={};d({line:_M,rect:yM,roundRect:yM,square:yM,circle:sM,diamond:jA,pin:YA,arrow:qA,triangle:XA},function(t,e){$A[e]=new t});var JA=Un({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=$A[n];"none"!==e.symbolType&&(o||(o=$A[n="rect"]),KA[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),QA={isDimensionStacked:pl,enableDataStack:fl,getStackedDimension:gl},tD=(Object.freeze||Object)({createList:function(t){return ml(t.getSource(),t)},getLayoutRect:ca,dataStack:QA,createScale:function(t,e){var i=e;No.isInstance(e)||h(i=new No(e),UA);var n=Hl(i);return n.setExtent(t[0],t[1]),Wl(n,i),n},mixinAxisModelCommonMethods:function(t){h(t,UA)},completeDimensions:hl,createDimensions:_A,createSymbol:Jl}),eD=1e-8;eu.prototype={constructor:eu,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++)"polygon"===r[s].type&&(fn(r[s].exterior,o,a),tt(i,i,o),et(n,n,a));return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new de(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(tu(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(tu(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n||(n=i/a):i=a*n;for(var r=new de(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)Q(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)Q(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new eu(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var iD=function(t){return iu(t),f(g(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new eu(e.name,o,e.cp);return a.properties=e,a})},nD=Bi(),oD=[0,1],aD=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};aD.prototype={constructor:aD,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Zo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count()),Bo(t,oD,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count());var o=Bo(t,i,oD,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=au(this,e),n=f(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return xu(this,n,i.tickCategoryInterval,o,t.clamp),n},getViewLabels:function(){return ou(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return pu(this)}};var rD=iD,sD={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){sD[t]=aw[t]});var lD={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){lD[t]=zM[t]}),YI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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}});var uD=wu.prototype,hD=wu.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};uD._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Jl(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:bu(n)}),a.drift=Su,this._symbolType=t,this.add(a)},uD.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},uD.getSymbolPath=function(){return this.childAt(0)},uD.getScale=function(){return this.childAt(0).scale},uD.highlight=function(){this.childAt(0).trigger("emphasis")},uD.downplay=function(){this.childAt(0).trigger("normal")},uD.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},uD.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},uD.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=hD(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,Io(l,{scale:bu(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),To(l,h,o,e)}this._seriesModel=o};var cD=["itemStyle"],dD=["emphasis","itemStyle"],fD=["label"],pD=["emphasis","label"];uD._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,u=n&&n.hoverItemStyle,h=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(cD).getItemStyle(["color"]),u=m.getModel(dD).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(fD),f=m.getModel(pD),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=a({},u);var v=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Vo(c[0],i[0]),Vo(c[1],i[1])]),g&&o.attr("cursor",g),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=x?null==_&&(o.__z2Origin=o.z2,o.z2+=x):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;go(v,u,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):_u(t,e)},isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,fo(o),o.__symbolOriginalScale=bu(i),p&&r.isAnimationEnabled()&&o.on("mouseover",Mu).on("mouseout",Iu).on("emphasis",Tu).on("normal",Au)},uD.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Io(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(wu,tb);var gD=Du.prototype;gD.updateData=function(t,e){e=Lu(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=ku(t);o||i.removeAll(),t.diff(o).add(function(n){var o=t.getItemLayout(n);if(Cu(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);Cu(t,h,s,e)?(u?(u.updateData(t,s,r),Io(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},gD.isPersistent=function(){return!0},gD.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},gD.incrementalPrepareUpdate=function(t){this._seriesScope=ku(t),this._data=null,this.group.removeAll()},gD.incrementalUpdate=function(t,e,i){i=Lu(i);for(var n=t.start;n<t.end;n++){var o=e.getItemLayout(n);if(Cu(e,o,n,i)){var a=new this._symbolCtor(e,n,this._seriesScope);a.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(n,a)}}},gD.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var mD=function(t,e,i,n,o,a,r,s){for(var l=Eu(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Pu(o,e,r),v=Pu(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":S=x.idx;u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(Ou(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":var S=x.idx,M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Ou(v,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],T=[],A=[],D=[],C=[],y=0;y<p.length;y++){S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}},vD=tt,yD=et,xD=Z,_D=G,wD=[],bD=[],SD=[],MD=Pn.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=Gu(i,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Ru(i[o-1]);o--);for(;n<o&&Ru(i[n]);n++);}for(;n<o;)n+=zu(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),ID=Pn.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=Gu(i,e.smoothConstraint),l=Gu(n,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Ru(i[a-1]);a--);for(;o<a&&Ru(i[o]);o++);}for(;o<a;){var u=zu(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);zu(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});Ar.extend({type:"line",init:function(){var t=new tb,e=new Du;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=Zu(n,a,Pu(n,a,y)),_=t.get("showSymbol"),w=_&&!h&&Ku(t,a,n),b=this._data;b&&b.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),b.setItemGraphicEl(e,null))}),_||d.remove(),o.add(g);var S=!h&&t.get("step");f&&c.type===n.type&&S===this._step?(v&&!p?p=this._newPolygon(u,x,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(ju(n,!1,!1,t)),_&&d.updateData(a,{isIgnore:w,clipShape:ju(n,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Fu(this._stackedOnPoints,x)&&Fu(this._points,u)||(m?this._updateAnimation(a,x,n,i,S,y):(S&&(u=Yu(u,n,S),x=Yu(x,n,S)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(_&&d.updateData(a,{isIgnore:w,clipShape:ju(n,!1,!0,t)}),S&&(u=Yu(u,n,S),x=Yu(x,n,S)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,x,n,m)),g.setClipPath(ju(n,!0,!1,t)));var M=qu(a,n)||a.getVisual("color");f.useStyle(r(s.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Wu(t.get("smooth")),f.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var T=a.getCalculationInfo("stackedOnSeries"),A=0;p.useStyle(r(l.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Wu(T.get("smooth"))),p.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=x,this._points=u,this._step=S,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(!(a instanceof Array)&&null!=a&&a>=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new wu(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Ar.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Ar.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new MD({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new ID({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=mD(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Yu(u.current,i,o),c=Yu(u.stackedOnCurrent,i,o),d=Yu(u.next,i,o),f=Yu(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,Io(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Io(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++)if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",r.shape.__points[p[t].ptIdx])})},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var TD=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,o){var a=t.getData(),r=t.get("symbol")||e,s=t.get("symbolSize"),l=t.get("symbolKeepAspect");if(a.setVisual({legendSymbol:i||r,symbol:r,symbolSize:s,symbolKeepAspect:l}),!n.isSeriesFiltered(t)){var u="function"==typeof s;return{dataEach:a.hasItemOption||u?function(e,i){if("function"==typeof s){var n=t.getRawValue(i),o=t.getDataParams(i);e.setItemVisual(i,"symbolSize",s(n,o))}if(e.hasItemOption){var a=e.getItemModel(i),r=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0),u=a.getShallow("symbolKeepAspect",!0);null!=r&&e.setItemVisual(i,"symbol",r),null!=l&&e.setItemVisual(i,"symbolSize",l),null!=u&&e.setItemVisual(i,"symbolKeepAspect",u)}}:null}}}}},AD=function(t){return{seriesType:t,plan:$I(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var o=f(i.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),a=o.length,r=e.getCalculationInfo("stackResultDimension");return pl(e,o[0])&&(o[0]=r),pl(e,o[1])&&(o[1]=r),a&&{progress:function(t,e){for(var r=t.end-t.start,s=n&&new Float32Array(r*a),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===a)f=e.get(o[0],l),d=!isNaN(f)&&i.dataToPoint(f,null,c);else{var f=h[0]=e.get(o[0],l),p=h[1]=e.get(o[1],l);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(h,null,c)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):e.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",s)}}}}}},DD={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},CD=function(t,e){return Math.round(t.length/2)},LD=function(t){this._axes={},this._dimList=[],this.name=t||""};LD.prototype={constructor:LD,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return f(this._dimList,Ju,this)},getAxesByScale:function(t){return t=t.toLowerCase(),g(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o],r=this._axes[a];n[a]=r[e](t[a])}return n}},Qu.prototype={constructor:Qu,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),a=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return e=e||[],e[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},u(Qu,LD);var kD=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};kD.prototype={constructor:kD,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(kD,aD);var PD={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ND={};ND.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},PD),ND.valueAxis=n({boundaryGap:[0,0],splitNumber:5},PD),ND.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},ND.valueAxis),ND.logAxis=r({scale:!0,logBase:10},ND.valueAxis);var OD=["value","category","time","log"],ED=function(t,e,i,a){d(OD,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?ga(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&pa(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=_l.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},ND[r+"Axis"],a],!0)})}),lI.registerSubTypeDefaulter(t+"Axis",v(i,t))},RD=lI.extend({type:"cartesian2dAxis",axis:null,init:function(){RD.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){RD.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){RD.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(RD.prototype,UA);var zD={offset:0};ED("x",RD,th,zD),ED("y",RD,th,zD),lI.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var BD=ih.prototype;BD.type="grid",BD.axisPointerEnabled=!0,BD.getRect=function(){return this._rect},BD.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),d(i.x,function(t){Wl(t.scale,t.model)}),d(i.y,function(t){Wl(t.scale,t.model)});var n={};d(i.x,function(t){nh(i,"y",t,n)}),d(i.y,function(t){nh(i,"x",t,n)}),this.resize(this.model,e)},BD.resize=function(t,e,i){function n(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),ah(t,e?o.x:o.y)})}var o=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=jl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},BD.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},BD.getAxes=function(){return this._axesList.slice()},BD.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},BD.getCartesians=function(){return this._coordsList.slice()},BD.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},BD.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},BD._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,u=this._coordsList;return o?l(u,i=o.coordinateSystem)<0&&(i=null):a&&r?i=this.getCartesian(a.componentIndex,r.componentIndex):a?n=this.getAxis("x",a.componentIndex):r?n=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(i=this._coordsList[0]),{cartesian:i,axis:n}},BD.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},BD._initCartesian=function(t,e,i){function n(i){return function(n,s){if(eh(n,t,e)){var l=n.get("position");"x"===i?"top"!==l&&"bottom"!==l&&o[l="bottom"]&&(l="top"===l?"bottom":"top"):"left"!==l&&"right"!==l&&o[l="left"]&&(l="left"===l?"right":"left"),o[l]=!0;var u=new kD(i,Hl(n),[0,0],n.get("type"),l),h="category"===u.type;u.onBand=h&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=this,u.index=s,this._axesList.push(u),a[i][s]=u,r[i]++}}}var o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);this._axesMap=a,d(a.x,function(e,i){d(a.y,function(n,o){var a="x"+i+"y"+o,r=new Qu(a);r.grid=this,r.model=t,this._coordsMap[a]=r,this._coordsList.push(r),r.addAxis(e),r.addAxis(n)},this)},this)},BD._updateScale=function(t,e){function i(t,e,i){d(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,gl(t,i))})}d(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(sh(n)){var o=rh(n),a=o[0],r=o[1];if(!eh(a,e,t)||!eh(r,e,t))return;var s=this.getCartesian(a.componentIndex,r.componentIndex),l=n.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(i(l,u),i(l,h))}},this)},BD.getTooltipAxes=function(t){var e=[],i=[];return d(this.getCartesians(),function(n){var o=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(o);l(e,o)<0&&e.push(o),l(i,a)<0&&i.push(a)}),{baseAxes:e,otherAxes:i}};var VD=["xAxis","yAxis"];ih.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,o){var a=new ih(n,t,e);a.name="grid_"+o,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(t){if(sh(t)){var e=rh(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),i},ih.dimensions=ih.prototype.dimensions=Qu.prototype.dimensions,Fa.register("cartesian2d",ih);var GD=Math.PI,FD=function(t,e){this.opt=e,this.axisModel=t,r(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new tb;var i=new tb({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};FD.prototype={constructor:FD,hasBuilder:function(t){return!!WD[t]},add:function(t){WD[t].call(this)},getGroup:function(){return this.group}};var WD={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],r=[i[1],0];n&&(Q(o,o,n),Q(r,r,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new _M(Kn({anid:"line",shape:{x1:o[0],y1:o[1],x2:r[0],y2:r[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof u&&"number"!=typeof u||(u=[u,u]);var c=u[0],f=u[1];d([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((o[0]-r[0])*(o[0]-r[0])+(o[1]-r[1])*(o[1]-r[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=Jl(l[i],-c/2,-f/2,c,f,s.stroke,!0),a=e.r+e.offset,r=[o[0]+a*Math.cos(t.rotation),o[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=gh(this,t,e);ch(t,mh(this,t,e),i)},axisName:function(){var t=this.opt,e=this.axisModel,i=T(t.axisName,e.get("name"));if(i){var n,o=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,ph(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*GD/180);var f;ph(o)?n=HD(t.rotation,null!=d?d:t.rotation,r):(n=uh(t,o,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?tI(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new rM({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:hh(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});mo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=lh(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},HD=FD.innerTextLayout=function(t,e,i){var n,o,a=Xo(e-t);return jo(a)?(o=i>0?"top":"bottom",n="center"):jo(a-GD)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a<GD?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},ZD=d,UD=v,XD=Ws({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Sh(t),XD.superApply(this,"render",arguments),Dh(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Dh(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),XD.superApply(this,"remove",arguments)},dispose:function(t,e){Ch(this,e),XD.superApply(this,"dispose",arguments)}}),jD=[];XD.registerAxisPointerClass=function(t,e){jD[t]=e},XD.getAxisPointerClass=function(t){return t&&jD[t]};var YD=["axisLine","axisTickLabel","axisName"],qD=["splitArea","splitLine"],KD=XD.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Lh(a,t),s=new FD(t,r);d(YD,s.add,s),this._axisGroup.add(s.getGroup()),d(qD,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Lo(o,this._axisGroup,t),KD.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p<h.length;p++){var g=i.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=s.y,d[0]=g,d[1]=s.y+s.height):(c[0]=s.x,c[1]=g,d[0]=s.x+s.width,d[1]=g);var m=u++%a.length,v=h[p].tickValue;this._axisGroup.add(new _M(Kn({anid:null!=v?"line_"+h[p].tickValue:null,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:r({stroke:a[m]},f),silent:!0})))}}},_splitArea:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),a=o.get("color"),s=e.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:n,clamp:!0});if(l.length){var u=a.length,h=this._splitAreaColors,c=R(),d=0;if(h)for(m=0;m<l.length;m++){var f=h.get(l[m].tickValue);if(null!=f){d=(f+(u-1)*m)%u;break}}var p=i.toGlobalCoord(l[0].coord),g=o.getAreaStyle();a=y(a)?a:[a];for(var m=1;m<l.length;m++){var v,x,_,w,b=i.toGlobalCoord(l[m].coord);i.isHorizontal()?(v=p,x=s.y,_=b-v,w=s.height,p=v+_):(v=s.x,x=p,_=s.width,p=x+(w=b-x));var S=l[m-1].tickValue;null!=S&&c.set(S,d),this._axisGroup.add(new yM({anid:null!=S?"area_"+S:null,shape:{x:v,y:x,width:_,height:w},style:r({fill:a[d]},g),silent:!0})),d=(d+1)%u}this._splitAreaColors=c}}}});KD.extend({type:"xAxis"}),KD.extend({type:"yAxis"}),Ws({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new yM({shape:t.coordinateSystem.getRect(),style:r({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Ns(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Bs(TD("line","circle","line")),zs(AD("line")),Os(VT.PROCESSOR.STATISTIC,function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r=a.getBaseAxis(),s=a.getOtherAxis(r),l=r.getExtent(),u=l[1]-l[0],h=Math.round(n.count()/u);if(h>1){var c;"string"==typeof o?c=DD[o]:"function"==typeof o&&(c=o),c&&t.setData(n.downSample(n.mapDimension(s.dim),1/h,c,CD))}}}}}("line"));var $D=YI.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ml(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});$D.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var JD=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QD={getBarItemStyle:function(t){var e=JD(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},tC=["itemStyle","barBorderWidth"];a(No.prototype,QD),Zs({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;a.diff(r).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=iC[s.type](a,e,i),l=eC[s.type](a,e,i,r,n,u);a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var h=a.getItemModel(e),c=iC[s.type](a,e,h);l?Io(l,{shape:c},u,e):l=eC[s.type](a,e,h,c,n,u,!0),a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Nh(t,u,e):e&&Oh(t,u,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),zh(t,this.group)},_incrementalRenderLarge:function(t,e){zh(e,this.group,!0)},dispose:B,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Oh(e.dataIndex,t,e):Nh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var eC={cartesian2d:function(t,e,i,n,o,r,s){var l=new yM({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],zM[s?"updateProps":"initProps"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startAngle<n.endAngle,u=new hM({shape:r({clockwise:l},n)});if(a){var h=u.shape,c=o?"r":"endAngle",d={};h[c]=o?0:n.startAngle,d[c]=n[c],zM[s?"updateProps":"initProps"](u,{shape:d},a,e)}return u}},iC={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=Rh(i,n),a=n.width>0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},nC=Pn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__valueIdx,a=0;a<i.length;a+=2)n[this.__valueIdx]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});zs(v(El,"bar")),zs(CA),Bs({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var oC=function(t,e,i){e=y(e)&&{coordDimensions:e}||a({},e);var n=t.getSource(),o=_A(n,e),r=new vA(o,t);return r.initData(n,i),r},aC={updateSelectedMap:function(t){this._targetList=y(t)?t.slice():[],this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},R())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},rC=Hs({type:"series.pie",init:function(t){rC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){rC.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return oC(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();n<o;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:pr(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=rC.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Uo(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});h(rC,aC);var sC=Fh.prototype;sC.updateData=function(t,e,i){function n(){s.stopAnimation(!0),s.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")}function o(){s.stopAnimation(!0),s.animateTo({shape:{r:h.r}},300,"elasticOut")}var s=this.childAt(0),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=a({},h);c.label=null,i?(s.setShape(c),"scale"===l.getShallow("animationType")?(s.shape.r=h.r0,To(s,{shape:{r:h.r}},l,e)):(s.shape.endAngle=h.startAngle,Io(s,{shape:{endAngle:h.endAngle}},l,e))):Io(s,{shape:c},l,e);var d=t.getItemVisual(e,"color");s.useStyle(r({lineJoin:"bevel",fill:d},u.getModel("itemStyle").getItemStyle())),s.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var f=u.getShallow("cursor");f&&s.attr("cursor",f),Gh(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),s.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&l.isAnimationEnabled()&&s.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),fo(this)},sC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=h.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},u(Fh,tb);Ar.extend({type:"pie",init:function(){var t=new tb;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=v(Vh,this.uid,t,s,i),c=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new Fh(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",h),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),c&&i.on("click",h),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==u){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new hM({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return To(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var lC=function(t,e){d(e,function(e){e.update="updateView",Es(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},uC=function(t){return{getTargetSeries:function(e){var i={},n=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each(function(t){var e=o.getRawIndex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getItemVisual(a,"color",!0);if(r)i.setItemVisual(e,"color",r);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=a&&o.setItemVisual(a,"color",s)}})}}},hC=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getItemLayout(i),f=r.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),A=I+(_<0?-1:1)*y,D=T;n=A+(_<0?-5:5),u=D,h=[[S,M],[I,T],[A,D]]}c=b?"center":_>0?"left":"right"}var C=p.getFont(),L=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ke(t.getFormattedLabel(i,"normal")||r.getName(i),C,c,"top");l=!!L,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Hh(s,o,a,e,i,n)},cC=2*Math.PI,dC=Math.PI/180,fC=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o<i.length;o++)if(!i[o].isSelected(e))return!1;return!0})}}}};lC("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Bs(uC("pie")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),o=t.get("center"),a=t.get("radius");y(a)||(a=[0,a]),y(o)||(o=[o,o]);var r=i.getWidth(),s=i.getHeight(),l=Math.min(r,s),u=Vo(o[0],r),h=Vo(o[1],s),c=Vo(a[0],l/2),d=Vo(a[1],l/2),f=-t.get("startAngle")*dC,p=t.get("minAngle")*dC,g=0;e.each(n,function(t){!isNaN(t)&&g++});var m=e.getSum(n),v=Math.PI/(m||g)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(n);b[0]=0;var S=cC,M=0,I=f,T=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:u,cy:h,r0:c,r:_?NaN:d});else{(n="area"!==_?0===m&&w?v:t*v:cC/g)<p?(n=p,S-=p):M+=t;var o=I+T*n;e.setItemLayout(i,{angle:n,startAngle:I,endAngle:o,clockwise:x,cx:u,cy:h,r0:c,r:_?Bo(t,b,[c,d]):d}),I=o}}),S<cC&&g)if(S<=.001){var A=cC/g;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=A,n.startAngle=f+T*i*A,n.endAngle=f+T*(i+1)*A}})}else v=S/M,I=f,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),o=n.angle===p?p:t*v;n.startAngle=I,n.endAngle=I+T*o,I+=T*o}});hC(t,d,r,s)})},"pie")),Os(fC("pie")),YI.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}});var pC=Un({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),gC=Uh.prototype;gC.isPersistent=function(){return!this._incremental},gC.updateData=function(t){this.group.removeAll();var e=new pC({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},gC.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},gC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},gC.incrementalUpdate=function(t,e){var i;this._incremental?(i=new pC,this._incremental.addDisplayable(i,!0)):((i=new pC({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},gC._setCommon=function(t,e,i){var n=e.hostModel,o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.symbolProxy=Jl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=e.getVisual("color");r&&t.setColor(r),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},gC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Zs({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Uh:new Du,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Bs(TD("scatter","circle")),zs(AD("scatter")),u(Xh,aD),jh.prototype.getIndicatorAxes=function(){return this._indicatorAxes},jh.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},jh.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},jh.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coodToData(n))]},jh.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Vo(i[0],n),this.cy=Vo(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Vo(r[0],a),this.r=Vo(r[1],a),d(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},jh.prototype.update=function(t,e){function i(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var n=this._indicatorAxes,o=this._model;d(n,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e,i){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===o){var a=e.getData();d(n,function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))})}},this);var a=o.get("splitNumber");d(n,function(t,e){var n=Gl(t.scale,t.model);Wl(t.scale,t.model);var o=t.model,r=t.scale,s=o.getMin(),l=o.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/a);else if(null!=s){var h;do{h=s+u*a,r.setExtent(+s,h),r.setInterval(u),u=i(u)}while(h<n[1]&&isFinite(h)&&isFinite(n[1]))}else if(null!=l){var c;do{c=l-u*a,r.setExtent(c,+l),r.setInterval(u),u=i(u)}while(c>n[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(u=i(u));var d=Math.round((n[0]+n[1])/2/u)*u,f=Math.round(a/2);r.setExtent(Go(d-f*u),Go(d+(a-f)*u)),r.setInterval(u)}})},jh.dimensions=[],jh.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new jh(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Fa.register("radar",jh);var mC=ND.valueAxis,vC=(Fs({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:f.text,nameLocation:"end",nameGap:p,nameTextStyle:m,triggerEvent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new No(f,null,this.ecModel),UA);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},mC.axisLine),axisLabel:Yh(mC.axisLabel,!1),axisTick:Yh(mC.axisTick,!1),splitLine:Yh(mC.splitLine,!0),splitArea:Yh(mC.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Ws({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new FD(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(vC,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,w=i.cy,b=0;b<x.length;b++)h&&m[D=e(m,p,b)].push(new sM({shape:{cx:_,cy:w,r:x[b].coord}})),c&&b<x.length-1&&v[D=e(v,g,b)].push(new cM({shape:{cx:_,cy:w,r0:x[b].coord,r:x[b+1].coord}}));else for(var S,M=f(n,function(t,e){var n=t.getTicksCoords();return S=null==S?n.length-1:Math.min(n.length-1,S),f(n,function(t){return i.coordToPoint(t.coord,e)})}),I=[],b=0;b<=S;b++){for(var T=[],A=0;A<n.length;A++)T.push(M[A][b]);if(T[0]&&T.push(T[0].slice()),h&&m[D=e(m,p,b)].push(new gM({shape:{points:T}})),c&&I){var D=e(v,g,b-1);v[D].push(new pM({shape:{points:T.concat(I)}}))}I=T.slice().reverse()}var C=l.getLineStyle(),L=u.getAreaStyle();d(v,function(t,e){this.group.add(OM(t,{style:r({stroke:"none",fill:g[e%g.length]},L),silent:!0}))},this),d(m,function(t,e){this.group.add(OM(t,{style:r({fill:"none",stroke:p[e%p.length]},C),silent:!0}))},this)}}});var yC=YI.extend({type:"series.radar",dependencies:["radar"],init:function(t){yC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return oC(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(t);return ia(""===n?this.name:n)+"<br/>"+f(i,function(i,n){var o=e.get(e.mapDimension(i.dim),t);return ia(i.name+" : "+o)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Zs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=qh(t.getItemVisual(e,"symbolSize")),a=Jl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l<i.length-1;l++){var u=o(a,r);u&&(u.__dimIdx=l,e[l]?(u.attr("position",e[l]),zM[s?"initProps":"updateProps"](u,{position:i[l]},t,r)):u.attr("position",i[l]),n.add(u))}}function s(t){return f(t,function(t){return[l.cx,l.cy]})}var l=t.coordinateSystem,u=this.group,h=t.getData(),c=this._data;h.diff(c).add(function(e){var i=h.getItemLayout(e);if(i){var n=new pM,o=new gM,r={shape:{points:i}};n.shape.points=s(i),o.shape.points=s(i),To(n,r,t,e),To(o,r,t,e);var l=new tb,u=new tb;l.add(o),l.add(n),l.add(u),a(o.shape.points,i,u,h,e,!0),h.setItemGraphicEl(e,l)}}).update(function(e,i){var n=c.getItemGraphicEl(i),o=n.childAt(0),r=n.childAt(1),s=n.childAt(2),l={shape:{points:h.getItemLayout(e)}};l.shape.points&&(a(o.shape.points,l.shape.points,s,h,e,!1),Io(o,l,t),Io(r,l,t),h.setItemGraphicEl(e,n))}).remove(function(t){u.remove(c.getItemGraphicEl(t))}).execute(),h.eachItemGraphicEl(function(t,e){function n(){l.attr("ignore",m)}function o(){l.attr("ignore",g)}var a=h.getItemModel(e),s=t.childAt(0),l=t.childAt(1),c=t.childAt(2),d=h.getItemVisual(e,"color");u.add(t),s.useStyle(r(a.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:d})),s.hoverStyle=a.getModel("emphasis.lineStyle").getLineStyle();var f=a.getModel("areaStyle"),p=a.getModel("emphasis.areaStyle"),g=f.isEmpty()&&f.parentModel.isEmpty(),m=p.isEmpty()&&p.parentModel.isEmpty();m=m&&g,l.ignore=g,l.useStyle(r(f.getAreaStyle(),{fill:d,opacity:.7})),l.hoverStyle=p.getAreaStyle();var v=a.getModel("itemStyle").getItemStyle(["color"]),y=a.getModel("emphasis.itemStyle").getItemStyle(),x=a.getModel("label"),_=a.getModel("emphasis.label");c.eachChild(function(t){t.setStyle(v),t.hoverStyle=i(y),go(t.style,t.hoverStyle,x,_,{labelFetcher:h.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:h.get(h.dimensions[t.__dimIdx],e),autoColor:d,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",n).on("mouseover",n).on("normal",o).on("mouseout",o),fo(t)}),this._data=h},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("radar")),Bs(TD("radar","circle")),zs(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){for(var o=n.getIndicatorAxes(),a=0;a<o.length;a++)e.each(e.mapDimension(o[a].dim),function(t,e){i[e]=i[e]||[],i[e][a]=n.dataToPoint(t,a)});e.each(function(t){i[t][0]&&i[t].push(i[t][0].slice()),e.setItemLayout(t,i[t])})}})}),Os(fC("radar")),Ns(function(t){var e=t.polar;if(e){y(e)||(e=[e]);var i=[];d(e,function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],y(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)}),t.polar=i}d(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var xC=[126,25],_C=[[[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]]],wC=0;wC<_C.length;wC++)for(var bC=0;bC<_C[wC].length;bC++)_C[wC][bC][0]/=10.5,_C[wC][bC][1]/=-14,_C[wC][bC][0]+=xC[0],_C[wC][bC][1]+=xC[1];var SC=function(t,e){"china"===t&&e.push(new eu("åæµ·è¯¸å²",f(_C,function(t){return{type:"polygon",exterior:t}}),xC))},MC={"åæµ·è¯¸å²":[32,80],"广ä¸":[0,-10],"馿¸¯":[10,5],"æ¾³é¨":[-10,10],"天津":[5,5]},IC=function(t,e){if("china"===t){var i=MC[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},TC={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},AC=function(t,e){if("world"===t){var i=TC[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}},DC=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],CC=function(t,e){"china"===t&&"å°æ¹¾"===e.name&&e.geometries.push({type:"polygon",exterior:DC[0]})},LC=Bi(),kC={load:function(t,e){var i=LC(e).parsed;if(i)return i;var n,o=e.specialAreas||{},a=e.geoJSON;try{n=a?iD(a):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return d(n,function(e){var i=e.name;IC(t,e),AC(t,e),CC(t,e);var n=o[i];n&&e.transformTo(n.left,n.top,n.width,n.height)}),SC(t,n),LC(e).parsed={regions:n,boundingRect:Kh(n)}}},PC=Bi(),NC={geoJSON:kC,svg:{load:function(t,e){var i=PC(e).originRoot;if(i)return{root:i,boundingRect:PC(e).boundingRect};var n=$h(e);return PC(e).originRoot=n.root,PC(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=PC(e),o=n.rootMap||(n.rootMap=R()),a=o.get(i);if(a)return a;var r=n.originRoot,s=n.boundingRect;return n.originRootHostKey?a=$h(e,s).root:(n.originRootHostKey=i,a=r),o.set(i,a)},removeGraphic:function(t,e,i){var n=PC(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},OC={load:function(t,e){var i,n=[],o=R(),a=R();return d(Qh(t),function(r){var s=NC[r.type].load(t,r);d(s.regions,function(t){var i=t.name;e&&e.hasOwnProperty(i)&&(t=t.cloneShallow(i=e[i])),n.push(t),o.set(i,t),a.set(i,t.center)});var l=s.boundingRect;l&&(i?i.union(l):i=l.clone())}),{regions:n,regionsMap:o,nameCoordMap:a,boundingRect:i||new de(0,0,0,0)}},makeGraphic:Jh("makeGraphic"),removeGraphic:Jh("removeGraphic")};h(YI.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=oC(this,["value"]),i=e.mapDimension("value"),n=R(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:pr(e,r,"selected")})}return d(OC.load(this.getMapType(),this.option.nameMap).regions,function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=ta(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(ia(o[r].name))}return a.join(", ")+"<br />"+ia(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}}}}),aC);var EC="\0_ec_interaction_mutex";Es({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(oc,fw);var RC={axisPointer:1,tooltip:1,brush:1};xc.prototype={constructor:xc,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.scale,c={position:s.position,scale:h};!l.childAt(0)||o?u.attr(c):Io(u,c,t),l.removeAll();var f=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=R();d(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new tb),n=new MM({shape:{paths:[]}});i.add(n);var o,s=(C=t.getRegionModel(e.name)||t).getModel(f),u=C.getModel(p),c=mc(s),y=mc(u),x=C.getModel(g),_=C.getModel(m);if(r){o=r.indexOfName(e.name);var w=r.getItemVisual(o,"color",!0);w&&(c.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new pM({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new pM({shape:{points:t.interiors[e]}}))}}),n.setStyle(c),n.style.strokeNoScale=!0,n.culling=!0;var b=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get(r.mapDimension("value"),o)),I=r&&r.getItemLayout(o);if(a||M&&(b||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var D=new rM({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});go(D.style,D.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(r)r.setItemGraphicEl(o,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),fo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),vc(this,t,l,i,n),yc(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&OC.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&d(OC.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t){this._mouseDownFlag=!1,fc(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),r.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,pc(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!gc(e,i,t)})}};var zC="__seriesMapHighDown",BC="__seriesMapCallKey";Zs({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new xc(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var s=r.point,l=r.offset,u=new sM({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:NM+1)});if(!l){var h=t.mainSeries.getData(),c=n.getName(i),d=h.indexOfName(c),f=n.getItemModel(i),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),y=A(t.getFormattedLabel(d,"normal"),c),x=A(t.getFormattedLabel(d,"emphasis"),y),_=m[zC],w=Math.random();if(!_){_=m[zC]={};var b=v(_c,!0),S=v(_c,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[BC]=w,a(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:x,normalText:y}),wc(_,!1)}o.add(u)}}})}}),Es({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=bc(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});var VC=Q;h(Sc,Tw),Mc.prototype={constructor:Mc,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new de(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new de(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new de(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Q([],n,t),i=Q([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),wt(this.transform||(this.transform=[]),e.transform||xt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Tt(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?VC(i,t,n):G(i,t)},pointToData:function(t){var e=this.invTransform;return e?VC([],t,e):[t[0],t[1]]},convertToPixel:v(Ic,"dataToPoint"),convertFromPixel:v(Ic,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},h(Mc,Tw),Tc.prototype={constructor:Tc,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new de(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return Mc.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:v(Ac,"dataToPoint"),convertFromPixel:v(Ac,"pointToData")},h(Tc,Mc);var GC={dimensions:Tc.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,n){var o=t.get("map"),a=t.get("aspectScale"),r=!0,s=DT.retrieveMap(o);s&&s[0]&&"svg"===s[0].type?(null==a&&(a=1),r=!1):null==a&&(a=.75);var l=new Tc(o+n,o,t.get("nameMap"),r);l.aspectScale=a,l.zoomLimit=t.get("scaleLimit"),i.push(l),Cc(l,t),t.coordinateSystem=l,l.model=t,l.resize=Dc,l.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}});var n={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}}),d(n,function(t,n){var a=new Tc(n,n,o(f(t,function(t){return t.get("nameMap")})));a.zoomLimit=T.apply(null,f(t,function(t){return t.get("scaleLimit")})),i.push(a),a.resize=Dc,a.aspectScale=t[0].get("aspectScale"),a.resize(t[0],e),d(t,function(t){t.coordinateSystem=a,Cc(a,t)})}),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=R(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return d(OC.load(e,i).regions,function(t){var e=t.name;!o.get(e)&&n.push({name:e})}),n}};Rs("geo",GC);zs(function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};d(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),function(t,e){var a=n.getName(e),r=i.getRegion(a);if(r&&!isNaN(t)){var s=o[a]||0,l=i.dataToPoint(r.center);o[a]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var a=i.getData();a.each(function(t){var e=a.getName(t),i=a.getItemLayout(t)||{};i.showLabel=!o[e],a.setItemLayout(t,i)}),e[n]=!0}})}),Bs(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),Os(VT.PROCESSOR.STATISTIC,function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=Lc(f(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),Ns(function(t){var e=[];d(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,r(t,t.mapLocation))})}),lC("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var FC=d,WC="\0__link_datas",HC="\0__link_mainData",ZC=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};ZC.prototype={constructor:ZC,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),_(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Vc.prototype={constructor:Vc,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Vc.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,y(i)?i.length:1),a.push(t);var s=new ZC(t.name,o);e?Gc(s,e):o.root=s,o._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)n(l[u],s)}var o=new Vc(e,i.levels,i.leaves),a=[],r=1;n(t),o.root.updateDepthAndHeight(0);var s=_A(a,{coordDimensions:["value"],dimensionsCount:r}),l=new vA(s,e);return l.initData(a),kc({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},YI.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var o=Vc.createTree(e,this,n),a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return ia(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Zs({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new tb,this._controller=new oc(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){td(o,e)&&id(o,e,null,r,t,u)}).update(function(e,i){var n=l.getItemGraphicEl(i);td(o,e)?id(o,e,n,r,t,u):n&&nd(l,i,n,r,t,u)}).remove(function(e){var i=l.getItemGraphicEl(e);i&&nd(l,e,i,r,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];fn(i,n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=t.coordinateSystem=new Mc;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Es({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Es({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});Bs(TD("tree","circle")),zs(function(t,e){t.eachSeriesByType("tree",function(t){sd(t,e)})}),YI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"â¶",zoomToNodeRatio:.1024,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};dd(i);var n=t.levels||[];n=t.levels=fd(n,e);var o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=ta(y(i)?i[0]:i);return ia(e.getName(t)+": "+n)},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=R(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var UC=5;pd.prototype={constructor:pd,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),da(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=ha(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new pM({shape:{points:gd(a,0,g,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,p)});this.group.add(y),md(y,t,p),a+=g+8}},remove:function(){this.group.removeAll()}};var XC=m,jC=tb,YC=yM,qC=d,KC=["label"],$C=["emphasis","label"],JC=["upperLabel"],QC=["emphasis","upperLabel"],tL=10,eL=1,iL=2,nL=Qb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),oL=function(t){var e=nL(t);return e.stroke=e.fill=e.lineWidth=null,e};Zs({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=ld(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,u=this._storage,h="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new jC,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,a+1)}o?(e=t,qC(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,u=[],h=v(yd,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&qC(t,function(t,i){var n=e[i];qC(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){qC(c,function(t){qC(t,function(t){t.parent&&t.parent.remove(t)})}),qC(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=vd();qC(e.willDeleteEls,function(t,e){qC(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),qC(this._storage,function(t,i){qC(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(XC(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new oc(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",XC(this._onPan,this)),e.on("zoom",XC(this._onZoom,this)));var i=new de(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new de(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=xt();St(s,s,[-e,-i]),It(s,s,[t.scale,t.scale]),St(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,i.node,XC(function(e){"animating"!==this._state&&(hd(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var aL=["treemapZoomToNode","treemapRender","treemapMove"],rL=0;rL<aL.length;rL++)Es({type:aL[rL],update:"updateView"},function(){});Es({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,i){var n=ld(t,["treemapZoomToNode","treemapRootToNode"],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var sL=d,lL=w,uL=-1,hL=function(t){var e=t.mappingMethod,n=t.type,o=this.option=i(t);this.type=n,this.mappingMethod=e,this._normalizeData=dL[e];var a=cL[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(bd(o),_d(o)):"category"===e?o.categories?wd(o):bd(o,!0):(k("linear"!==e||o.dataExtent),bd(o))};hL.prototype={constructor:hL,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return m(this._normalizeData,this)}};var cL=hL.visualHandlers={color:{applyVisual:Id("color"),getColorMapper:function(){var t=this.option;return m("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Td.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizeData(e)),n=Ut(e,t.parsedVisual,n),o?n:qt(n,"rgba")},this)},_doMap:{linear:function(t){return qt(Ut(t,this.option.parsedVisual),"rgba")},category:Td,piecewise:function(t,e){var i=Cd.call(this,e);return null==i&&(i=qt(Ut(t,this.option.parsedVisual),"rgba")),i},fixed:Ad}},colorHue:Sd(function(t,e){return jt(t,e)}),colorSaturation:Sd(function(t,e){return jt(t,null,e)}),colorLightness:Sd(function(t,e){return jt(t,null,null,e)}),colorAlpha:Sd(function(t,e){return Yt(t,e)}),opacity:{applyVisual:Id("opacity"),_doMap:Dd([0,1])},liftZ:{applyVisual:Id("liftZ"),_doMap:{linear:Ad,category:Ad,piecewise:Ad,fixed:Ad}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(_(n))i("symbol",n);else if(lL(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:Md,category:Td,piecewise:function(t,e){var i=Cd.call(this,e);return null==i&&(i=Md.call(this,t)),i},fixed:Ad}},symbolSize:{applyVisual:Id("symbolSize"),_doMap:Dd([0,1])}},dL={linear:function(t){return Bo(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=hL.findPieceIndex(t,e,!0);if(null!=i)return Bo(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?uL:e},fixed:B};hL.listVisualTypes=function(){var t=[];return d(cL,function(e,i){t.push(i)}),t},hL.addVisualHandler=function(t,e){cL[t]=e},hL.isValidType=function(t){return cL.hasOwnProperty(t)},hL.eachVisual=function(t,e,i){w(t)?d(t,e,i):e.call(i,t)},hL.mapVisual=function(t,e,i){var n,o=y(t)?[]:w(t)?{}:(n=!0,null);return hL.eachVisual(t,function(t,a){var r=e.call(i,t,a);n?o=r:o[a]=r}),o},hL.retrieveVisuals=function(t){var e,i={};return t&&sL(cL,function(n,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},hL.prepareVisualTypes=function(t){if(lL(t)){var e=[];sL(t,function(t,i){e.push(i)}),t=e}else{if(!y(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},hL.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},hL.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);n<a&&(a=n,o=i)}for(var o,a=1/0,r=0,s=e.length;r<s;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;r<s;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(kd(c[1],t,h[1]))return r}else if(h[1]===1/0){if(kd(c[0],h[0],t))return r}else if(kd(c[0],h[0],t)&&kd(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}if(i)return t===1/0?e.length-1:t===-1/0?0:o};var fL=y,pL="itemStyle",gL={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(pL);a.isRemoved()||Pd(a,{},f(o.levelModels,function(t){return t?t.get(pL):null}),r,t.getViewRoot().getAncestors(),t)}},mL=Math.max,vL=Math.min,yL=T,xL=d,_L=["itemStyle","borderWidth"],wL=["itemStyle","gapWidth"],bL=["upperLabel","show"],SL=["upperLabel","height"],ML={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),r=i.getHeight(),s=t.option,l=ca(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Vo(yL(l.width,u[0]),o),c=Vo(yL(l.height,u[1]),r),d=n&&n.type,f=ld(n,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===d||"treemapMove"===d?n.rootRect:null,g=t.getViewRoot(),m=ud(g);if("treemapMove"!==d){var v="treemapZoomToNode"===d?jd(t,f,g,h,c):p?[p.width,p.height]:[h,c],y=s.sort;y&&"asc"!==y&&"desc"!==y&&(y="desc");var x={squareRatio:s.squareRatio,sort:y,leafDepth:s.leafDepth};g.hostTree.clearLayouts();_={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};g.setLayout(_),Gd(g,x,!1,0);var _=g.getLayout();xL(m,function(t,e){var i=(m[e+1]||g).getValue();t.setLayout(a({dataExtent:[i,i],borderWidth:0,upperHeight:0},_))})}var w=t.getData().tree.root;w.setLayout(Yd(l,p,f),!0),t.setLayoutInfo(l),qd(w,new de(-l.x,-l.y,o,r),m,g,0)}};Bs(gL),zs(ML);var IL=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},TL=IL.prototype;TL.type="graph",TL.isDirected=function(){return this._directed},TL.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[$d(t)]){var n=new Jd(t,e);return n.hostGraph=this,this.nodes.push(n),i[$d(t)]=n,n}},TL.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},TL.getNodeById=function(t){return this._nodesMap[$d(t)]},TL.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Jd.isInstance(t)||(t=n[$d(t)]),Jd.isInstance(e)||(e=n[$d(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new Qd(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r,r}}},TL.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},TL.getEdge=function(t,e){Jd.isInstance(t)&&(t=t.id),Jd.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},TL.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&t.call(e,i[o],o)},TL.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},TL.breadthFirstTraverse=function(t,e,i,n){if(Jd.isInstance(e)||(e=this._nodesMap[$d(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[o],a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}},TL.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(var o=0,a=t.count();o<a;o++)i[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(var o=0,a=e.count();o<a;o++)n[e.getRawIndex(o)].dataIndex=o},TL.clone=function(){for(var t=new IL(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},Jd.prototype={constructor:Jd,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},Qd.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var AL=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};h(Jd,AL("hostGraph","data")),h(Qd,AL("hostGraph","edgeData")),IL.Node=Jd,IL.Edge=Qd,Yi(Jd),Yi(Qd);var DL=function(t,e,i,n,o){for(var a=new IL(n),r=0;r<t.length;r++)a.addNode(T(t[r].id,t[r].name,r),r);for(var s=[],u=[],h=0,r=0;r<e.length;r++){var c=e[r],d=c.source,f=c.target;a.addEdge(d,f,h)&&(u.push(c),s.push(T(c.id,d+" > "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=ml(t,i);else{var m=Fa.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];l(v,"value")<0&&v.concat(["value"]);var y=_A(t,{coordDimensions:v});(p=new vA(y,i)).initData(t)}var x=new vA(["value"],i);return x.initData(u,s),o&&o(p,x),kc({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},CL=Hs({type:"series.graph",init:function(t){CL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){CL.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){CL.superApply(this,"mergeDefaultAndTheme",arguments),Ci(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return DL(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new No({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new No({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=ia(l.join(" > ")),o.value&&(l+=" : "+ia(o.value)),l}return CL.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new vA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return CL.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),LL=_M.prototype,kL=bM.prototype,PL=Un({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(tf(e)?LL:kL).buildPath(t,e)},pointAt:function(t){return tf(this.shape)?LL.pointAt.call(this,t):kL.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=tf(e)?[e.x2-e.x1,e.y2-e.y1]:kL.tangentAt.call(this,t);return q(i,i)}}),NL=["fromSymbol","toSymbol"],OL=rf.prototype;OL.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=U([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(x=Math.PI+x),n.attr("rotation",x)}else d=[-h[0]*g+l[0],-h[1]*g+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},OL._createLine=function(t,e,i){var n=t.hostModel,o=of(t.getItemLayout(e));o.shape.percent=0,To(o,{shape:{percent:1}},n,e),this.add(o);var a=new rM({name:"label",lineLabelOriginalOpacity:1});this.add(a),d(NL,function(i){var n=nf(i,t,e);this.add(n),this[ef(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},OL.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};af(r.shape,a),Io(o,r,n,e),d(NL,function(i){var n=t.getItemVisual(e,i),o=ef(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=nf(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},OL._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(NL,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType)))){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Go(x):x}var _=m?g:null,w=v?A(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(mo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,fo(this)},OL.highlight=function(){this.trigger("emphasis")},OL.downplay=function(){this.trigger("normal")},OL.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},OL.setLinePoints=function(t){var e=this.childOfName("line");af(e.shape,t),e.dirty()},u(rf,tb);var EL=sf.prototype;EL.isPersistent=function(){return!0},EL.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=hf(t);t.diff(n).add(function(i){lf(e,t,i,o)}).update(function(i,a){uf(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},EL.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},EL.incrementalPrepareUpdate=function(t){this._seriesScope=hf(t),this._lineData=null,this.group.removeAll()},EL.incrementalUpdate=function(t,e){for(var i=t.start;i<t.end;i++)if(df(e.getItemLayout(i))){var n=new this._ctor(e,i,this._seriesScope);n.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),this.group.add(n),e.setItemGraphicEl(i,n)}},EL.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},EL._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var RL=[],zL=[],BL=[],VL=sn,GL=hw,FL=Math.abs,WL=function(t,e){function i(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var n=[],o=cn,a=[[],[],[]],r=[[],[]],s=[];e/=2,t.eachEdge(function(t,l){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[F(u[0]),F(u[1])],u[2]&&u.__original.push(F(u[2])));var d=u.__original;if(null!=u[2]){if(G(a[0],d[0]),G(a[1],d[2]),G(a[2],d[1]),h&&"none"!==h){var f=i(t.node1),p=ff(a,d[0],f*e);o(a[0][0],a[1][0],a[2][0],p,n),a[0][0]=n[3],a[1][0]=n[4],o(a[0][1],a[1][1],a[2][1],p,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!==c){var f=i(t.node2),p=ff(a,d[1],f*e);o(a[0][0],a[1][0],a[2][0],p,n),a[1][0]=n[1],a[2][0]=n[2],o(a[0][1],a[1][1],a[2][1],p,n),a[1][1]=n[1],a[2][1]=n[2]}G(u[0],a[0]),G(u[1],a[2]),G(u[2],a[1])}else{if(G(r[0],d[0]),G(r[1],d[1]),U(s,r[1],r[0]),q(s,s),h&&"none"!==h){f=i(t.node1);Z(r[0],r[0],s,f*e)}if(c&&"none"!==c){f=i(t.node2);Z(r[1],r[1],s,-f*e)}G(u[0],r[0]),G(u[1],r[1])}})},HL="__focusNodeAdjacency",ZL=["itemStyle","opacity"],UL=["lineStyle","opacity"];Zs({type:"graph",init:function(t,e){var i=new Du,n=new sf,o=this.group;this._controller=new oc(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var o=this._symbolDraw,a=this._lineDraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?r.attr(s):Io(r,s,t)}WL(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();o.updateData(l);var u=t.getEdgeData();a.updateData(u),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var h=t.forceLayout,c=t.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,c),l.eachItemGraphicEl(function(e,n){var o=l.getItemModel(n);e.off("drag").off("dragend");var a=o.get("draggable");a&&e.on("drag",function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,c),h.setFixed(n),l.setItemLayout(n,e.position))},this).on("dragend",function(){h&&h.setUnfixed(n)},this),e.setDraggable(a&&h),e[HL]&&e.off("mouseover",e[HL]),e.__unfocusNodeAdjacency&&e.off("mouseout",e.__unfocusNodeAdjacency),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[HL]=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))},this),l.graph.eachEdge(function(e){var n=e.getGraphicEl();n[HL]&&n.off("mouseover",n[HL]),n.__unfocusNodeAdjacency&&n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n[HL]=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))});var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),f=l.getLayout("cx"),p=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),o=Math.atan2(n[1]-p,n[0]-f);o<0&&(o=2*Math.PI+o);var a=n[0]<f;a&&(o-=Math.PI);var r=a?"left":"right";i.setStyle({textRotation:-o,textPosition:r,textOrigin:"center"}),i.hoverStyle&&(i.hoverStyle.textPosition=r)}else i.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){gf(t,ZL,.1)}),o.eachEdge(function(t){gf(t,UL,.1)}),s&&(mf(s,ZL),d(s.edges,function(t){t.dataIndex<0||(mf(t,UL),mf(t.node1,ZL),mf(t.node2,ZL))})),l&&(mf(l,UL),mf(l.node1,ZL),mf(l.node2,ZL)))},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph;o.eachNode(function(t){gf(t,ZL)}),o.eachEdge(function(t){gf(t,UL)})},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),WL(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()},this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},updateLayout:function(t){WL(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Es({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),Es({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){}),Es({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});var XL=Z;Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph().data,o=i.mapArray(i.getName);n.filterSelf(function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=o[i]);for(var a=0;a<e.length;a++)if(!e[a].isSelected(i))return!1}return!0})},this)}),Bs(TD("graph","circle",null)),Bs(function(t){var e={};t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getData(),o={};i.each(function(n){var a=i.getName(n);o["ec-"+a]=n;var r=i.getItemModel(n).get("itemStyle.color")||t.getColorFromPalette(a,e);i.setItemVisual(n,"color",r)}),i.count()&&n.each(function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=o["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",i.getItemVisual(e,"color")))})})}),Bs(function(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),i=t.getEdgeData(),n=vf(t.get("edgeSymbol")),o=vf(t.get("edgeSymbolSize")),a="lineStyle.color".split("."),r="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",o&&o[0]),i.setVisual("toSymbolSize",o&&o[1]),i.setVisual("color",t.get(a)),i.setVisual("opacity",t.get(r)),i.each(function(t){var n=i.getItemModel(t),o=e.getEdgeByIndex(t),s=vf(n.getShallow("symbol",!0)),l=vf(n.getShallow("symbolSize",!0)),u=n.get(a),h=n.get(r);switch(u){case"source":u=o.node1.getVisual("color");break;case"target":u=o.node2.getVisual("color")}s[0]&&o.setVisual("fromSymbol",s[0]),s[1]&&o.setVisual("toSymbol",s[1]),l[0]&&o.setVisual("fromSymbolSize",l[0]),l[1]&&o.setVisual("toSymbolSize",l[1]),o.setVisual("color",u),o.setVisual("opacity",h)})})}),zs(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];d(i.dimensions,function(t){o=o.concat(n.mapDimension(t,!0))});for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?n.setItemLayout(a,i.dataToPoint(r)):n.setItemLayout(a,[NaN,NaN])}xf(n.graph)}else e&&"none"!==e||yf(t)})}),zs(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&_f(t)})}),zs(function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),o=n.data,a=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?o.each(function(t){var e=o.getId(t);o.setItemLayout(t,i[e]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&_f(t):yf(t);var l=o.getDataExtent("value"),u=a.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");y(h)||(h=[h,h]),y(c)||(c=[c,c]),c=[c[1],c[0]];var d=o.mapArray("value",function(t,e){var i=o.getItemLayout(e),n=Bo(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:o.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=a.mapArray("value",function(t,e){var i=n.getEdgeByIndex(e),o=Bo(t,u,c);return isNaN(o)&&(o=(c[0]+c[1])/2),{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:o,curveness:i.getModel().get("lineStyle.curveness")||0}}),p=(e=t.coordinateSystem).getBoundingRect(),g=wf(d,f,{rect:p,gravity:r.get("gravity")}),m=g.step;g.step=function(t){for(var e=0,a=d.length;e<a;e++)d[e].fixed&&G(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,a,r){for(var s=0,l=e.length;s<l;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[o.getId(s)]=e[s].p;for(var s=0,l=a.length;s<l;s++){var u=a[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],G(f[0],c),G(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})}),Rs("graphView",{create:function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),a=[],r=[];fn(o.mapArray(function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]}),a,r),r[0]-a[0]==0&&(r[0]+=1,a[0]-=1),r[1]-a[1]==0&&(r[1]+=1,a[1]-=1);var s=(r[0]-a[0])/(r[1]-a[1]),l=bf(t,e,s);isNaN(s)&&(a=[l.x,l.y],r=[l.x+l.width,l.y+l.height]);var u=r[0]-a[0],h=r[1]-a[1],c=l.width,d=l.height,f=t.coordinateSystem=new Mc;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(a[0],a[1],u,h),f.setViewRect(l.x,l.y,c,d),f.setCenter(t.get("center")),f.setZoom(t.get("zoom")),i.push(f)}}),i}});YI.extend({type:"series.gauge",getInitialData:function(t,e){var i=t.data||[];return y(i)||(i=[i]),t.data=i,oC(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var jL=Pn.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(a>=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),YL=2*Math.PI,qL=(Ar.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Sf(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%YL,c=l,d=r.get("width"),f=0;f<n.length;f++){var p=Math.min(Math.max(n[f][0],0),1),g=new hM({shape:{startAngle:c,endAngle:u=l+h*p,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-d,r:o.r},silent:!0});g.setStyle({fill:n[f][1]}),g.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(g),c=u}var m=function(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!s){var v=l;l=u,u=v}this._renderTicks(t,e,i,m,o,l,u,s),this._renderPointer(t,e,i,m,o,l,u,s),this._renderTitle(t,e,i,m,o),this._renderDetail(t,e,i,m,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=Vo(p.get("length"),c),_=Vo(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=Mf(Go(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new rM({style:mo({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){var A=Math.cos(w),D=Math.sin(w),O=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add(function(e){var i=new jL({shape:{angle:a}});To(i,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=u.getItemGraphicEl(i);Io(n,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Vo(a.get("width"),o.r),r:Vo(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Bo(d.get(f,e),h,[0,1],!0))),fo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(Bo(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=Vo(a.get("width"),o.r),d=Vo(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Bo(p,[r,s],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},a,{x:u,y:h,text:Mf(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Hs({type:"series.funnel",init:function(t){qL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return oC(this,["value"])},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=qL.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),KL=If.prototype,$L=["itemStyle","opacity"];KL.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get($L);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),To(n,{style:{opacity:l}},o,e)):Io(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),fo(this)},KL._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},u(If,tb);Ar.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new If(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("funnel")),zs(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=Tf(t,e),r=Af(i,o),s=[Vo(t.get("minSize"),a.width),Vo(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=Bo(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;m<r.length;m++){var v=r[m],y=r[m+1],x=i.getItemModel(v).get("itemStyle.height");null==x?x=f:(x=Vo(x,a.height),"ascending"===o&&(x=-x));var _=g(v,p),w=g(y,p+x);p+=x+d,i.setItemLayout(v,{points:_.concat(w.slice().reverse())})}Df(i)})}),Os(fC("funnel"));var JL=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.axisIndex=o};JL.prototype={constructor:JL,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},u(JL,aD);var QL=function(t,e,i,n,o,a){e[0]=Pf(e[0],i),e[1]=Pf(e[1],i),t=t||0;var r=i[1]-i[0];null!=o&&(o=Pf(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n&&(o=a=Math.abs(e[1]-e[0]),n=0);var s=kf(e,n);e[n]+=t;var l=o||0,u=i.slice();s.sign<0?u[0]+=l:u[1]-=l,e[n]=Pf(e[n],u);h=kf(e,n);null!=o&&(h.sign!==s.sign||h.span<o)&&(e[1-n]=e[n]+s.sign*o);var h=kf(e,n);return null!=a&&h.span>a&&(e[1-n]=e[n]+h.sign*a),e},tk=d,ek=Math.min,ik=Math.max,nk=Math.floor,ok=Math.ceil,ak=Go,rk=Math.PI;Nf.prototype={type:"parallel",constructor:Nf,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;tk(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new JL(t,Hl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();tk(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Of(e.get("axisExpandWidth"),l),c=Of(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=Of(f[1]-f[0],l),f[1]=f[0]+t):(t=Of(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||nk(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[nk(ak(f[0]/h,1))+1,ok(ak(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),tk(i,function(e,i){var a=(n.axisExpandable?Rf:Ef)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:rk/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=xt();Mt(h,h,u),St(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];d(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),f=0,p=a.length;f<p;f++)if("inactive"===s[f].getActiveState(c[f])){h="inactive";break}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return Do([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return i(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?QL(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[ik(0,a[1]*s/o-o/2)])[1]=ek(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},Fa.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new Nf(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var sk=lI.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Qb([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Fo(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),lk={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};n(sk.prototype,UA),ED("parallel",sk,function(t,e){return e.type||(e.data?"category":"value")},lk),lI.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){lI.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){d(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];d(g(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}}),Es({type:"axisAreaSelect",event:"axisAreaSelected"},function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Es("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var uk=v,hk=d,ck=f,dk=Math.min,fk=Math.max,pk=Math.pow,gk=1e4,mk=6,vk=6,yk="globalPan",xk={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_k={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},wk={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},bk=0;zf.prototype={constructor:zf,enableBrush:function(t){return this._brushType&&Vf(this),t.brushType&&Bf(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=i(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){hk(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:a+e)+"-"+t.brushType}function o(e,i){var n=t[e];if(null!=i&&r[i]===u)s[e]=r[i];else{var o=s[e]=null!=i?(r[i].__brushOption=n,r[i]):Ff(l,Gf(l,n));Zf(l,o)}}t=f(t,function(t){return n(i(wk),t,!0)});var a="\0-brush-index-",r=this._covers,s=this._covers=[],l=this,u=this._creatingCover;return new Xs(r,t,function(t,i){return e(t.__brushOption,i)},e).add(o).update(o).remove(function(t){r[t]!==u&&l.group.remove(r[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),Yf(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},h(zf,fw);var Sk={mousedown:function(t){if(this._dragging)mp.call(this,t);else if(!t.target||!t.target.draggable){dp(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Xf(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(cp(this,t,e),this._dragging){dp(t);var i=pp(this,t,e,!1);i&&qf(this,i)}},mouseup:mp},Mk={lineX:vp(0),lineY:vp(1),rect:{createCover:function(t,e){return Jf(uk(rp,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=$f(t);return np(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Qf(t,e,i,n)},updateCommon:tp,contain:fp},polygon:{createCover:function(t,e){var i=new tb;return i.add(new gM({name:"main",style:ip(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new pM({name:"main",draggable:!0,drift:uk(sp,t,e),ondragend:uk(qf,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:up(t,e,i)})},updateCommon:tp,contain:fp}},Ik=["axisLine","axisTickLabel","axisName"],Tk=Ws({type:"parallelAxis",init:function(t,e){Tk.superApply(this,"init",arguments),(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this))},render:function(t,e,i,n){if(!bp(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var r=Mp(t,e),s=r.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=a({strokeContainThreshold:u},s.getAxisLayout(h)),f=new FD(t,c);d(Ik,f.add,f),this._axisGroup.add(f.getGroup()),this._refreshBrushController(c,l,t,r,u,i);var p=n&&!1===n.animation?null:t;Lo(o,this._axisGroup,p)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=de.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:yp(u),isTargetByCursor:_p(u,a,n),getLinearBrushOtherExtent:xp(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Sp(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=f(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});Ws({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},d(Ak,function(t,e){i.getZr().on(e,this._handlers[e]=m(t,this))},this)),Nr(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){d(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(a({type:"parallelAxisExpand"},t))}});var Ak={mousedown:function(t){Ip(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Ip(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ip(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};Ns(function(t){Cf(t),Lf(t)}),YI.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return Tp(i,this),ml(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,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"}});var Dk=.3,Ck=(Ar.extend({type:"parallel",init:function(){this._dataGroup=new tb,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=kp(t);if(a.diff(r).add(function(t){Pp(Lp(a,o,t,l,s),a,t,u)}).update(function(e,i){var o=r.getItemGraphicEl(i),h=Cp(a,e,l,s);a.setItemGraphicEl(e,o),Io(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),Pp(o,a,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var h=Dp(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=kp(e),s=t.start;s<t.end;s++){var l=Lp(n,this._dataGroup,s,a,o);l.incremental=!0,Pp(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]);Bs({seriesType:"parallel",reset:function(t,e,i){var n=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||n.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,e){h.eachActiveState(e,function(t,i){var n=d[t];if("normal"===t&&e.hasItemOption){var o=e.getItemModel(i).get(Ck,!0);null!=o&&(n=o)}e.setItemVisual(i,"opacity",n)},t.start,t.end)}}}});var Lk=YI.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return DL(i,e,this,!0).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),ia(a)}return Lk.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),kk=["itemStyle","opacity"],Pk=["lineStyle","opacity"],Nk=Un({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()}});Zs({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,o=t.getGraph(),a=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,a.removeAll(),a.attr("position",[r.x,r.y]),o.eachEdge(function(e){var i=new Nk;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,o,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,o=(null!=w?w*l:y.y)+y.dy,r=(null!=M?M*s:b.x)+T.ty,d=n,f=o*(1-v)+(u=null!=I?I*l:b.y)*v,p=r,g=o*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,o=(null!=w?w*l:y.y)+T.sy,d=n*(1-v)+(r=null!=M?M*s:b.x)*v,f=o,p=n*v+r*(1-v),g=u=(null!=I?I*l:b.y)+T.ty),i.setShape({x1:n,y1:o,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}fo(i,e.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),h.setItemGraphicEl(e.dataIndex,i)}),o.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new yM({shape:{x:null!=o?o*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();go(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),fo(d,f),a.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,o){var a=u.getItemModel(o);a.get("draggable")&&(e.drift=function(e,a){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),a.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),h.eachItemGraphicEl(function(e,o){h.getItemModel(o).get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),!this._data&&t.get("animation")&&a.setClipPath(zp(a.getBoundingRect(),t,function(){a.removeClipPath()})),this._data=t.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){Ep(t,kk,.1)}),a.eachEdge(function(t){Ep(t,Pk,.1)}),u){Rp(u,kk);var c=s.get("focusNodeAdjacency");"outEdges"===c?d(u.outEdges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node2,kk))}):"inEdges"===c?d(u.inEdges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node1,kk))}):"allEdges"===c&&d(u.edges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node1,kk),Rp(t.node2,kk))})}h&&(Rp(h,Pk),Rp(h.node1,kk),Rp(h.node2,kk))}},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getGraph();o.eachNode(function(t){Ep(t,kk)}),o.eachEdge(function(t){Ep(t,Pk)})}}),Es({type:"dragNode",event:"dragNode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});zs(function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=Bp(t,e);t.layoutInfo=o;var a=o.width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;Gp(l),Vp(l,u,i,n,a,r,0!==g(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"))})}),Bs(function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph().nodes;if(e.length){var i=1/0,n=-1/0;d(e,function(t){var e=t.getLayout().value;e<i&&(i=e),e>n&&(n=e)}),d(e,function(e){var o=new hL({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.color");null!=a&&e.setVisual("color",a)})}})});var Ok={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],f=[o,a],p=f[u].get("type"),g=f[1-u].get("type"),m=t.data;if(m&&n){var v=[];d(m,function(t,e){var i;t.value&&y(t.value)?(i=t.value.slice(),t.value.unshift(e)):y(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var x=this.defaultValueDimensions;return oC(this,{coordDimensions:[{name:h,type:qs(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:qs(g),dimsDef:x.slice()}],dimensionsCount:x.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};h(YI.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),Ok,!0);var Ek=["itemStyle"],Rk=["emphasis","itemStyle"],zk=(Ar.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add(function(t){if(n.hasValue(t)){var e=ig(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?ng(s,i,n,t):i=ig(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:B}),Pn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}})),Bk=["itemStyle","borderColor"],Vk=d;Bs(function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var n=i[e.seriesIndex%i.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(Bk)||n}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(Bk,!0)})})})}),zs(function(t){var e=ag(t);Vk(e,function(t){var e=t.seriesModels;e.length&&(rg(t),Vk(e,function(e,i){sg(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}),h(YI.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}}),Ok,!0);var Gk=["itemStyle"],Fk=["emphasis","itemStyle"],Wk=["color","color0","borderColor","borderColor0"],Hk=(Ar.extend({type:"candlestick",render:function(t,e,i){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox");this._data||n.removeAll(),e.diff(i).add(function(i){if(e.hasValue(i)){var a,r=e.getItemLayout(i);To(a=lg(r,0,!0),{shape:{points:r.ends}},t,i),ug(a,e,i,o),n.add(a),e.setItemGraphicEl(i,a)}}).update(function(a,r){var s=i.getItemGraphicEl(r);if(e.hasValue(a)){var l=e.getItemLayout(a);s?Io(s,{shape:{points:l.ends}},t,a):s=lg(l),ug(s,e,a,o),n.add(s),e.setItemGraphicEl(a,s)}else n.remove(s)}).remove(function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),cg(t,this.group)},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;ug(a=lg(n.getItemLayout(i)),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){cg(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:B}),Pn.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}})),Zk=Pn.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3}}),Uk=["itemStyle","borderColor"],Xk=["itemStyle","borderColor0"],jk=["itemStyle","color"],Yk=["itemStyle","color0"],qk={seriesType:"candlestick",plan:$I(),performRawSeries:!0,reset:function(t,e){function i(t,e){return e.get(t>0?jk:Yk)}function n(t,e){return e.get(t>0?Uk:Xk)}var o=t.getData(),a=t.pipelineContext.large;if(o.setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!a&&{progress:function(t,e){for(var o;null!=(o=t.next());){var a=e.getItemModel(o),r=e.getItemLayout(o).sign;e.setItemVisual(o,{color:i(r,a),borderColor:n(r,a)})}}}}},Kk="undefined"!=typeof Float32Array?Float32Array:Array,$k={seriesType:"candlestick",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=pg(t,i),o=0,a=1,r=["x","y"],s=i.mapDimension(r[o]),l=i.mapDimension(r[a],!0),u=l[0],h=l[1],c=l[2],d=l[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==s||l.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,r,l=new Kk(5*t.count),f=0,p=[],g=[];null!=(r=t.next());){var m=i.get(s,r),v=i.get(u,r),y=i.get(h,r),x=i.get(c,r),_=i.get(d,r);isNaN(m)||isNaN(x)||isNaN(_)?(l[f++]=NaN,f+=4):(l[f++]=fg(i,r,v,y,h),p[o]=m,p[a]=x,n=e.dataToPoint(p,null,g),l[f++]=n?n[0]:NaN,l[f++]=n?n[1]:NaN,p[a]=_,n=e.dataToPoint(p,null,g),l[f++]=n?n[1]:NaN)}i.setLayout("largePoints",l)}:function(t,i){function r(t,i){var n=[];return n[o]=i,n[a]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function l(t,e,i){var a=e.slice(),r=e.slice();a[o]=Jn(a[o]+n/2,1,!1),r[o]=Jn(r[o]-n/2,1,!0),i?t.push(a,r):t.push(r,a)}function f(t){return t[o]=Jn(t[o],1),t}for(var p;null!=(p=t.next());){var g=i.get(s,p),m=i.get(u,p),v=i.get(h,p),y=i.get(c,p),x=i.get(d,p),_=Math.min(m,v),w=Math.max(m,v),b=r(_,g),S=r(w,g),M=r(y,g),I=r(x,g),T=[];l(T,S,0),l(T,b,1),T.push(f(I),f(S),f(M),f(b)),i.setItemLayout(p,{sign:fg(i,p,m,v,h),initBaseline:m>v?S[a]:b[a],ends:T,brushRect:function(t,e,i){var s=r(t,i),l=r(e,i);return s[o]-=n/2,l[o]-=n/2,{x:s[0],y:s[1],width:a?n:l[0]-s[0],height:a?l[1]-s[1]:n}}(y,x,g)})}}}}};Ns(function(t){t&&y(t.series)&&d(t.series,function(t){w(t)&&"k"===t.type&&(t.type="candlestick")})}),Bs(qk),zs($k),YI.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Jk=vg.prototype;Jk.stopEffectAnimation=function(){this.childAt(1).removeAll()},Jk.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Jl(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}mg(n,t)},Jk.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}mg(i,t)},Jk.highlight=function(){this.trigger("emphasis")},Jk.downplay=function(){this.trigger("normal")},Jk.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),r=gg(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Vo(l[0],r[0]),u[1]=Vo(l[1],r[1])}n.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=o.get("rippleEffect.scale"),h.brushType=o.get("rippleEffect.brushType"),h.period=1e3*o.get("rippleEffect.period"),h.effectOffset=e/t.count(),h.z=o.getShallow("z")||0,h.zlevel=o.getShallow("zlevel")||0,h.symbolType=a,h.color=s,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){c.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",f,this).on("emphasis",d,this).on("normal",f,this)}this._effectCfg=h},Jk.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},u(vg,tb),Zs({type:"effectScatter",init:function(){this._symbolDraw=new Du(vg)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=At(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Bs(TD("effectScatter","circle")),zs(AD("effectScatter"));var Qk="undefined"==typeof Uint32Array?Array:Uint32Array,tP="undefined"==typeof Float64Array?Array:Float64Array,eP=YI.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],yg(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),eP.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],yg(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}eP.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=z(this._flatCoords,e.flatCoords),this._flatCoordsOffset=z(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}for(var a=this._getCoordsFromItemModel(t),o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var i=t.length,n=new Qk(i),o=new tP(i),a=0,r=0,s=0,l=0;l<i;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){var i=new vA(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[o]:a:void 0}),i},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),ia(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),iP=xg.prototype;iP.createLine=function(t,e,i){return new rf(t,e,i)},iP._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Jl(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},iP._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=T(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},iP.getLineLength=function(t){return uw(t.__p1,t.__cp1)+uw(t.__cp1,t.__p2)},iP.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},iP.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},iP.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=sn,s=ln;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},iP.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(xg,tb);var nP=_g.prototype;nP._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new gM({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},nP.updateData=function(t,e,i){var n=t.hostModel;Io(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},nP._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle").getLineStyle(),l=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,fo(this)},nP.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},u(_g,tb);var oP=wg.prototype;oP.createLine=function(t,e,i){return new _g(t,e,i)},oP.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];n+=uw(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},oP.getLineLength=function(t){return this._length},oP.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}J(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(wg,xg);var aP=Un({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r<i.length;){var o=i[r++];if(o>0){t.moveTo(i[r++],i[r++]);for(var a=1;a<o;a++)t.lineTo(i[r++],i[r++])}}else for(var r=0;r<i.length;){var s=i[r++],l=i[r++],u=i[r++],h=i[r++];if(t.moveTo(s,l),n>0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(s>0)for(var l=n[r++],u=n[r++],h=1;h<s;h++)if(yn(l,u,c=n[r++],d=n[r++]))return a;a++}else for(var a=0,r=0;r<n.length;){var l=n[r++],u=n[r++],c=n[r++],d=n[r++];if(o>0){if(_n(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(yn(l,u,c,d))return a;a++}return-1}}),rP=bg.prototype;rP.isPersistent=function(){return!this._incremental},rP.updateData=function(t){this.group.removeAll();var e=new aP({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},rP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},rP.incrementalUpdate=function(t,e){var i=new aP;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},rP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rP._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},rP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var sP={seriesType:"lines",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h<o.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=o.start;h<o.end;h++){g=t.getLineCoords(h,r),i&&(s[c++]=g);for(var f=0;f<g;f++)d=e.dataToPoint(r[f],!1,d),s[c++]=d[0],s[c++]=d[1]}a.setLayout("linesPoints",s)}else for(h=o.start;h<o.end;h++){var p=a.getItemModel(h),g=t.getLineCoords(h,r),m=[];if(i)for(var v=0;v<g;v++)m.push(e.dataToPoint(r[v]));else{m[0]=e.dataToPoint(r[0]),m[1]=e.dataToPoint(r[1]);var y=p.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(h,m)}}}}};Zs({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=sP.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new bg:new sf(o?n?wg:_g:n?xg:rf),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var lP="lineStyle.opacity".split("."),uP={seriesType:"lines",reset:function(t,e,i){var n=Sg(t.get("symbol")),o=Sg(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(lP)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=Sg(i.getShallow("symbol",!0)),o=Sg(i.getShallow("symbolSize",!0)),a=i.get(lP);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};zs(sP),Bs(uP),YI.extend({type:"series.heatmap",getInitialData:function(t,e){return ml(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Fa.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});Mg.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){var v=x[_+3]/256,M=4*Math.floor(255*v);if(v>0){var I=a(v)?s:l;v>0&&(v=v*S+b),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iw()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Zs({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ag(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var r,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");r=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),m=t.getModel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],x=i;x<n;x++){var _;if("cartesian2d"===v){if(isNaN(d.get(y[2],x)))continue;var w=l.dataToPoint([d.get(y[0],x),d.get(y[1],x)]);_=new yM({shape:{x:w[0]-r/2,y:w[1]-s/2,width:r,height:s},style:{fill:d.getItemVisual(x,"color"),opacity:d.getItemVisual(x,"opacity")}})}else{if(isNaN(d.get(y[1],x)))continue;_=new yM({z2:1,shape:l.dataToRect([d.get(y[0],x)]).contentShape,style:{fill:d.getItemVisual(x,"color"),opacity:d.getItemVisual(x,"opacity")}})}var b=d.getItemModel(x);d.hasItemOption&&(f=b.getModel("itemStyle").getItemStyle(["color"]),p=b.getModel("emphasis.itemStyle").getItemStyle(),g=b.getModel("label"),m=b.getModel("emphasis.label"));var S=t.getRawValue(x),M="-";S&&null!=S[2]&&(M=S[2]),go(f,p,g,m,{labelFetcher:t,labelDataIndex:x,defaultText:M,isRectText:!0}),_.setStyle(f),fo(_,d.hasItemOption?p:a({},p)),_.incremental=o,o&&(_.useHoverLayer=!0),c.add(_),d.setItemGraphicEl(x,_)}},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new Mg;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=h,o[1]-=c,o.push(n),o}),y=i.getExtent(),x="visualMap.continuous"===i.type?Tg(y,i.option.range):Ig(y,i.getPieceList(),i.option.selected);s.update(v,p,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new fi({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var hP=$D.extend({type:"series.pictorialBar",dependencies:["grid"],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,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,hP.superApply(this,"getInitialData",arguments)}}),cP=["itemStyle","borderWidth"],dP=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],fP=new sM;Zs({type:"pictorialBar",render:function(t,e,i){var n=this.group,o=t.getData(),a=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:dP[+s],categoryDim:dP[1-s]};return o.diff(a).add(function(t){if(o.hasValue(t)){var e=Vg(o,t),i=Dg(o,t,e,u),a=Hg(o,u,i);o.setItemGraphicEl(t,a),n.add(a),qg(a,u,i)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(o.hasValue(t)){var r=Vg(o,t),s=Dg(o,t,r,u),l=Xg(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?Zg(i,u,s):i=Hg(o,u,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),qg(i,u,s)}else n.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&Ug(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=o,this.group},dispose:B,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){Ug(n,e.dataIndex,t,e)}):i.removeAll()}});zs(v(El,"pictorialBar")),Bs(TD("pictorialBar","roundRect"));var pP=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null};pP.prototype={constructor:pP,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},u(pP,aD),$g.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:$g,_init:function(t,e,i){var n=this.dimension,o=new pP(n,Hl(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();d(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Wl(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ca({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()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},Fa.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new $g(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:$g.prototype.dimensions});var gP=["axisLine","axisTickLabel","axisName"],mP=XD.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=Jg(t),r=new FD(t,a);d(gP,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),mP.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new _M(Kn({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0})))}for(f=0;f<l.length;++f)this.group.add(OM(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}}}),vP=lI.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),yP={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};n(vP.prototype,UA),ED("single",vP,function(t,e){return e.type||(e.data?"category":"value")},yP);var xP=function(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=zi(a,t);if(null==r||r<0||y(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(f(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},_P=d,wP=v,bP=Bi(),SP=(Fs({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),Bi()),MP=d,IP=Ws({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";um("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){gm(e.getZr(),"axisPointer"),IP.superApply(this._model,"remove",arguments)},dispose:function(t,e){gm("axisPointer",e),IP.superApply(this._model,"dispose",arguments)}}),TP=Bi(),AP=i,DP=m;(mm.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(vm,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new tb,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);wm(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Mh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=TP(t).pointerEl=new zM[o.type](AP(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=TP(t).labelEl=new yM(AP(e.label));t.add(o),xm(o,n)}},updatePointerEl:function(t,e,i){var n=TP(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=TP(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xm(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Po(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){mw(t.event)},onmousedown:DP(this._onHandleDragMove,this,0,0),drift:DP(this._onHandleDragMove,this),ondragend:DP(this._onHandleDragEnd,this)}),i.add(n)),wm(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Nr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){vm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_m(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_m(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_m(n)),TP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var 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}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=mm,ji(mm);var CP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=km(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bm(n),c=LP[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Lh(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Lh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=km(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),LP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Pm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Pm(t))}}};XD.registerAxisPointerClass("CartesianAxisPointer",CP),Ns(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Os(VT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vh(t,e)}),Es({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lm(o)&&(o=xP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=lm(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||lm(o),d={},f={},p={list:[],map:{}},g={showPointer:wP(em,f),showTooltip:wP(im,p)};_P(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);_P(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=rm(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&Qg(t,r,g,!1,d)}})});var v={};return _P(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&_P(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,sm(e),sm(t)))),v[t.key]=a}})}),_P(v,function(t,e){Qg(h[e],t,g,!0,d)}),nm(f,h,d),om(p,o,t,r),am(h,0,i),d}});var kP=["x","y"],PP=["width","height"],NP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Om(r,1-Nm(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=OP[u](a,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Jg(i),i,n,o)},getHandleTransform:function(t,e,i){var n=Jg(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Nm(o),s=Om(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=Om(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),OP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Nm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Nm(t))}}};XD.registerAxisPointerClass("SingleAxisPointer",NP),Ws({type:"single"});var EP=YI.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){EP.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=[];Zi(t,function(t){return t[2]}).buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var n=i.length,o=-1,a=-1,r=0;r<n;++r){var s=i[r].dataList.length;s>o&&(o=s,a=r)}for(var l=0;l<n;++l)if(l!==a)for(var u=i[l].name,h=0;h<o;++h){for(var c=i[a].dataList[h][0],d=i[l].dataList.length,f=-1,p=0;p<d;++p)if(i[l].dataList[p][0]===c){f=p;break}-1===f&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=g(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=R(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=_A(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:qs(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new vA(u,this);return h.initData(o),h},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;var o=t.mapDimension("single"),a=[];return Zi(i,function(e){return t.get("name",e)}).buckets.each(function(e,i){e.sort(function(e,i){return t.get(o,e)-t.get(o,i)}),a.push({name:i,indices:e})}),a},getAxisTooltipData:function(t,e,i){y(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=u&&(n=f,u=p,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),ia(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Zs({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,i){function n(t){return t.name}function o(e,i,n){var o=this._layers;if("remove"!==e){for(var u,h=[],c=[],f=l[i].indices,p=0;p<f.length;p++){var g=r.getItemLayout(f[p]),m=g.x,v=g.y0,y=g.y;h.push([m,v]),c.push([m,v+y]),u=r.getItemVisual(f[p],"color")}var x,_,w=r.getItemLayout(f[0]),b=r.getItemModel(f[p-1]),S=b.getModel("label"),M=S.get("margin");if("add"===e){I=d[i]=new tb;x=new ID({shape:{points:h,stackedOnPoints:c,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_=new rM({style:{x:w.x-M,y:w.y0+w.y/2}}),I.add(x),I.add(_),s.add(I),x.setClipPath(Em(x.getBoundingRect(),t,function(){x.removeClipPath()}))}else{var I=o[n];x=I.childAt(0),_=I.childAt(1),s.add(I),d[i]=I,Io(x,{shape:{points:h,stackedOnPoints:c}},t),Io(_,{style:{x:w.x-M,y:w.y0+w.y/2}},t)}var T=b.getModel("emphasis.itemStyle"),A=b.getModel("itemStyle");mo(_.style,S,{text:S.get("show")?t.getFormattedLabel(f[p-1],"normal")||r.getName(f[p-1]):null,textVerticalAlign:"middle"}),x.setStyle(a({fill:u},A.getItemStyle(["color"]))),fo(x,T.getItemStyle())}else s.remove(o[i])}var r=t.getData(),s=this.group,l=t.getLayerSeries(),u=r.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.attr("position",[0,h.y+c[0]]);var d={};new Xs(this._layersSeries||[],l,n,n).add(m(o,this,"add")).update(m(o,this,"update")).remove(m(o,this,"remove")).execute(),this._layersSeries=l,this._layers=d},dispose:function(){}});zs(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();n.boundaryGap=a,"horizontal"===r.orient?(a[0]=Vo(a[0],o.height),a[1]=Vo(a[1],o.height),Rm(e,t,o.height-a[0]-a[1])):(a[0]=Vo(a[0],o.width),a[1]=Vo(a[1],o.width),Rm(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",n)})}),Bs(function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),o=R();e.each(function(t){o.set(e.getRawIndex(t),t)}),i.each(function(a){var r=i.getName(a),s=n[(t.nameMap.get(r)-1)%n.length];i.setItemVisual(a,"color",s);var l=o.get(a);null!=l&&e.setItemVisual(l,"color",s)})})}),Os(fC("themeRiver")),YI.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};Bm(i);var n=t.levels||[],o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var RP={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},zP=2,BP=4,VP=Vm.prototype;VP.updateData=function(t,e,i,o,s){this.node=e,e.piece=this,o=o||this._seriesModel,s=s||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=a({},h);c.label=null;var d=Gm(e,0,s);Hm(e,o,d);var f,p=u.getModel("itemStyle").getItemStyle();f=r({lineJoin:"bevel",fill:(f="normal"===i?p:n(u.getModel(i+".itemStyle").getItemStyle(),p)).fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,Io(l,{shape:{r:h.r}},o,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(Io(l,{shape:c},o),l.useStyle(f)):Io(l,{shape:c,style:f},o),this._updateLabel(o,d,i);var g=u.getShallow("cursor");if(g&&l.attr("cursor",g),t){var m=o.getShallow("highlightPolicy");this._initEvents(l,e,o,m)}this._seriesModel=o||this._seriesModel,this._ecModel=s||this._ecModel},VP.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):Wm(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==RP.NONE&&i.piece.childAt(0).trigger("downplay"))})},VP.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},VP.onHighlight=function(){this.updateData(!1,this.node,"highlight")},VP.onDownplay=function(){this.updateData(!1,this.node,"downplay")},VP._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?a.get(t):e}var o=this.node.getModel(),a=o.getModel("label"),r="normal"===i||"emphasis"===i?a:o.getModel(i+".label"),s=o.getModel("emphasis.label"),l=T(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);!1===n("show")&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=a.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);go(d.style,d.hoverStyle||{},a,s,{defaultText:r.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),m=Math.sin(p),v=n("position"),y=n("distance")||0,x=n("align");"outside"===v?(f=u.r+y,x=p>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},VP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},u(Vm,tb);Ar.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getValue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),s.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var o=new Vm(i,t,e);h.add(o),s.setItemGraphicEl(i.dataIndex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesModel=t,this.api=i,this.ecModel=e;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,c=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(t){d.push(t)});var f=this._oldChildren||[];if(function(t,e){function i(t){return t.getId()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new Xs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",t,e):(r.virtualPiece=new Vm(i,t,e),h.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(t){r._rootToNode(n.parentNode)};n.piece._onclickEvent=o,r.virtualPiece.on("click",o)}else r.virtualPiece&&(h.remove(r.virtualPiece),r.virtualPiece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(p)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var GP="sunburstRootToNode";Es({type:GP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[GP],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var FP="sunburstHighlight";Es({type:FP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[FP],e);n&&(t.highlight=n.node)})});Es({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var WP=Math.PI/180;Bs(v(uC,"sunburst")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Vo(e[0],o),l=Vo(e[1],a),u=Vo(n[0],r/2),h=Vo(n[1],r/2),c=-t.get("startAngle")*WP,f=t.get("minAngle")*WP,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Zm(g,v);var x=0;d(g.children,function(t){!isNaN(t.getValue())&&x++});var _=g.getValue(),w=Math.PI/(_||x)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===_&&T?w:n*w;o<f&&(o=f),i=e+A*o;var a=t.depth-m-(b?-1:1),h=u+M*a,c=u+M*(a+1),g=t.getModel();null!=g.get("r0")&&(h=Vo(g.get("r0"),r/2)),null!=g.get("r")&&(c=Vo(g.get("r"),r/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;d(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})},"sunburst")),Os(v(fC,"sunburst"));var HP=["itemStyle"],ZP=["emphasis","itemStyle"],UP=["label"],XP=["emphasis","label"],jP="e\0\0",YP={cartesian2d:function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:m(Xm,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:m(jm,t)}}},singleAxis:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:m(Ym,t)}}},polar:function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(qm,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};YI.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return ml(this.getSource(),this)},getDataParams:function(t,e,i){var n=YI.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Ar.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Qm(t,a,e,i);a.diff(o).add(function(e){ev(null,e,s(e,n),t,r,a)}).update(function(e,i){ev(o.getItemGraphicEl(i),e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){for(var a=e.getData(),r=Qm(e,a,i,n),s=t.start;s<t.end;s++)ev(null,s,r(s,o),e,this.group,a).traverse(function(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)})},dispose:B,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),Ns(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var qP=Fs({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,qP.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Pi(o,a);Ni(r);var s=this._elOptionsToUpdate=[];d(r,function(t,e){var i=t.option;i&&(s.push(i),gv(t,i),mv(o,e,i),vv(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ws({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;d(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=fv(e);o&&"merge"!==o?"replace"===o?(dv(r,i),cv(a,l,h,i)):"remove"===o&&dv(r,i):r?r.attr(h):cv(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,yv(c,t))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;da(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){dv(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var KP=Fs({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){KP.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var o=n.name;i.push(o);var a;if(n.legendDataProvider){var r=n.legendDataProvider(),s=r.mapArray(r.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&Oi(n)&&e.push(n.name)}),this._availableNames=i;var n=f(this.get("data")||e,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new No(t,this,this.ecModel)},this);this._data=n},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&d(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&l(this._availableNames,t)>=0},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Es("legendToggleSelect","legendselectchanged",v(xv,"toggleSelected")),Es("legendSelect","legendselected",v(xv,"select")),Es("legendUnSelect","legendunselected",v(xv,"unSelect"));var $P=v,JP=d,QP=tb,tN=Ws({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new QP),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(o,t,e,i);var a=t.getBoxLayoutParams(),s={width:i.getWidth(),height:i.getHeight()},l=t.get("padding"),u=ca(a,s,l),h=this.layoutInner(t,o,u,n),c=ca(r({width:h.width,height:h.height},a),s,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=wv(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=R(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),JP(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=i.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,c.name,null,n,s)).on("mouseout",$P(Mv,c.name,null,n,s)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),c=o.indexOfName(h);if(c<0)return;var d=o.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,null,h,n,s)).on("mouseout",$P(Mv,null,h,n,s)),a.set(h,!0)}},this)}else o.add(new QP({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("symbolKeepAspect"),p=n.isSelected(t),g=new QP,m=i.getModel("textStyle"),v=i.get("icon"),y=i.getModel("tooltip"),x=y.parentModel;if(o=v||o,g.add(Jl(o,0,0,h,c,p?l:d,null==f||f)),!v&&r&&(r!==o||"none"===r)){var _=.8*c;"none"===r&&(r="circle"),g.add(Jl(r,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=n.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new rM({style:mo({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new yM({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),fo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();aI(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}),lI.registerSubTypeDefaulter("legend",function(){return"plain"});var eN=KP.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},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},init:function(t,e,i,n){var o=ga(t);eN.superCall(this,"init",t,e,i,n),Iv(this,t,o)},mergeOption:function(t,e){eN.superCall(this,"mergeOption",t,e),Iv(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),iN=tb,nN=["width","height"],oN=["x","y"],aN=tN.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){aN.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new iN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new iN),this._showController},resetInner:function(){aN.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){function o(t,i){var o=t+"DataIndex",l=Po(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:m(a._pageGo,a,o,e,n)},{x:-s[0]/2,y:-s[1]/2,width:s[0],height:s[1]});l.name=t,r.add(l)}var a=this;aN.superCall(this,"renderInner",t,e,i,n);var r=this._controllerGroup,s=e.get("pageIconSize",!0);y(s)||(s=[s,s]),o("pagePrev",0);var l=e.getModel("pageTextStyle");r.add(new rM({name:"pageText",style:{textFill:l.getTextColor(),font:l.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),o("pageNext",1)},layoutInner:function(t,e,i,n){var o=this.getContentGroup(),a=this._containerGroup,r=this._controllerGroup,s=t.getOrient().index,l=nN[s],u=nN[1-s],h=oN[1-s];aI(t.get("orient"),o,t.get("itemGap"),s?i.width:null,s?null:i.height),aI("horizontal",r,t.get("pageButtonItemGap",!0));var c=o.getBoundingRect(),d=r.getBoundingRect(),f=this._showController=c[l]>i[l],p=[-c.x,-c.y];n||(p[s]=o.position[s]);var g=[0,0],m=[-d.x,-d.y],v=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[s]+=i[l]-d[l]:g[s]+=d[l]+v),m[1-s]+=c[u]/2-d[u]/2,o.attr("position",p),a.attr("position",g),r.attr("position",m);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[u]=Math.max(c[u],d[u]),y[h]=Math.min(0,d[h]+m[1-s]),a.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-v,0),x[u]=y[u],a.setClipPath(new yM({shape:x})),a.__rectSize=x[l]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Io(o,{position:_.contentPosition},!!f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),o=this.getContentGroup(),a=this._containerGroup.__rectSize,r=t.getOrient().index,s=nN[r],l=oN[r],u=this._findTargetItemIndex(n),h=o.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:o.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;m<=d;++m)(!(x=e(h[m]))&&y.e>v.s+a||x&&!i(x,v.s))&&(v=y.i>v.i?y:x)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)(x=e(h[m]))&&i(y,x.s)||!(v.i<y.i)||(y=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=x;return p},_findTargetItemIndex:function(t){var e,i=this.getContentGroup();return this._showController?i.eachChild(function(i,n){i.__legendDataIndex===t&&(e=n)}):e=0,e}});Es("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Fs({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var rN=d,sN=ea,lN=["","-webkit-","-moz-","-o-"];Cv.prototype={constructor:Cv,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Dv(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},Lv.prototype={constructor:Lv,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a=o.indexOf("{marker");a>=0;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new rM({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),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})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el?this.el.hide():true,this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var uN=m,hN=d,cN=Vo,dN=new yM({shape:{x:-1,y:-1,width:2,height:2}});Ws({type:"tooltip",init:function(t,e){if(!U_.node){var i=t.getComponent("tooltip").get("renderMode");this._renderMode=Hi(i);var n;"html"===this._renderMode?(n=new Cv(e.getDom(),e),this._newLine="<br/>"):(n=new Lv(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,i){if(!U_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");um("itemTooltip",this._api,uN(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!U_.node){var o=Pv(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=dN;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=xP(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Pv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=kv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,o=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=kv([e.tooltipOption,o]),u=this._renderMode,h=this._newLine,c={};hN(t,function(t){hN(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value,a=[];if(e&&null!=o){var l=Im(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Xl(e.axis,o),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;n(c,m)}else p=g;a.push(p)}});var f=l;"html"!==u?r.push(a.join(h)):r.push((f?ia(f)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=kv([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new No(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=na(h,i,!0);else if("function"==typeof h){var d=uN(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))i=cN(e[0],s),n=cN(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=ca(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=Ev(e,d,u))[0],n=p[1]):(i=(p=Nv(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=Rv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Rv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Ov(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&hN(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&hN(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&hN(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){U_.node||(this._tooltipContent.hide(),gm("itemTooltip",e))}}),Es({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Es({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Gv.prototype={constructor:Gv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:aD.prototype.dataToCoord,radiusToData:aD.prototype.coordToData},u(Gv,aD);var fN=Bi();Fv.prototype={constructor:Fv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:aD.prototype.dataToCoord,angleToData:aD.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(r),l=ke(a,e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=fN(t.model),d=c.lastAutoInterval,f=c.lastTickCount;return null!=d&&null!=f&&Math.abs(d-h)<=1&&Math.abs(f-o)<=1&&d>h?h=d:(c.lastTickCount=o,c.lastAutoInterval=h),h}},u(Fv,aD);var pN=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Gv,this._angleAxis=new Fv,this._radiusAxis.polar=this._angleAxis.polar=this};pN.prototype={type:"polar",axisPointerEnabled:!0,constructor:pN,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<a?1:-1;l<a||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var gN=lI.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(gN.prototype,UA);var mN={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};ED("angle",gN,Wv,mN.angle),ED("radius",gN,Wv,mN.radius),Fs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var vN={dimensions:pN.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new pN(n);o.update=Zv;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Uv(a,s),Uv(r,l),Hv(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Fa.register("polar",vN);var yN=["axisLine","axisLabel","axisTick","splitLine","splitArea"];XD.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,a=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),s=f(n.getViewLabels(),function(t){return(t=i(t)).coord=n.dataToCoord(t.tickValue),t});Yv(s),Yv(r),d(yN,function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,o,r,a,s)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new sM({shape:{cx:e.cx,cy:e.cy,r:n[jv(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[jv(e)],l=f(i,function(t){return new _M({shape:Xv(e,[s,s+a],t.coord)})});this.group.add(OM(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,o){var a=t.getCategories(!0),r=t.getModel("axisLabel"),s=r.get("margin");d(o,function(i,o){var l=r,u=i.tickValue,h=n[jv(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";a&&a[u]&&a[u].textStyle&&(l=new No(a[u].textStyle,r,r.ecModel));var m=new rM({silent:!0});this.group.add(m),mo(m.style,l,{x:c[0],y:c[1],textFill:l.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g})},this)},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u<i.length;u++){var h=s++%a.length;l[h]=l[h]||[],l[h].push(new _M({shape:Xv(e,n,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(OM(l[u],{style:r({stroke:a[u%a.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){if(i.length){var o=t.getModel("splitArea").getModel("areaStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(n[0],n[1]),d=Math.max(n[0],n[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%a.length;l[g]=l[g]||[],l[g].push(new hM({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-i[p].coord*u,clockwise:f},silent:!0})),h=-i[p].coord*u}for(p=0;p<l.length;p++)this.group.add(OM(l[p],{style:r({fill:a[p%a.length]},o.getAreaStyle()),silent:!0}))}}});var xN=["axisLine","axisTickLabel","axisName"],_N=["splitLine","splitArea"];XD.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=o.getExtent()[0],s=i.getExtent(),l=qv(n,t,r),u=new FD(t,l);d(xN,u.add,u),this.group.add(u.getGroup()),d(_N,function(e){t.get(e+".show")&&!i.scale.isBlank()&&this["_"+e](t,n,r,s,a)},this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<o.length;h++){var c=l++%s.length;u[c]=u[c]||[],u[c].push(new sM({shape:{cx:e.cx,cy:e.cy,r:o[h].coord},silent:!0}))}for(h=0;h<u.length;h++)this.group.add(OM(u[h],{style:r({stroke:s[h%s.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=o[0].coord,c=1;c<o.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new hM({shape:{cx:e.cx,cy:e.cy,r0:h,r:o[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=o[c].coord}for(c=0;c<u.length;c++)this.group.add(OM(u[c],{style:r({fill:s[c%s.length]},a.getAreaStyle()),silent:!0}))}}});var wN=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+la(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=bN[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Sm(t,i,n,o,Kv(e,i,0,s,n.get("label.margin")))}}),bN={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:Dm(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Lm(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:Lm(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};XD.registerAxisPointerClass("PolarAxisPointer",wN),zs(v(function(t,e,i){i.getWidth(),i.getHeight();var n={},o=Vv(g(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=zv(t),s=o[Bv(a)][r],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.coordinateSystem.cx,d=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;n[r]=n[r]||[];for(var g=e.mapDimension(h.dim),m=e.mapDimension(a.dim),v=pl(e,g),y=h.getExtent()[0],x=0,_=e.count();x<_;x++){var w=e.get(g,x),b=e.get(m,x);if(!isNaN(w)){var S=w>=0?"p":"n",M=y;v&&(n[r][b]||(n[r][b]={p:y,n:y}),M=n[r][b][S]);var I,T,A,D;if("radius"===h.dim){var C=h.dataToRadius(w)-y,L=a.dataToAngle(b);Math.abs(C)<f&&(C=(C<0?-1:1)*f),I=M,T=M+C,D=(A=L-l)-u,v&&(n[r][b][S]=T)}else{var k=h.dataToAngle(w,!0)-y,P=a.dataToRadius(b);Math.abs(k)<p&&(k=(k<0?-1:1)*p),T=(I=P+l)+u,A=M,D=M+k,v&&(n[r][b][S]=D)}e.setItemLayout(x,{cx:c,cy:d,r0:I,r:T,startAngle:-A*Math.PI/180,endAngle:-D*Math.PI/180})}}}},this)},"bar")),Ws({type:"polar"}),h(lI.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){lI.prototype.init.apply(this,arguments),Ci(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=GC.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=p(t.regions||[],function(t,i){return i.name&&t.set(i.name,new No(i,e)),t},R()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,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",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new No(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),aC),Ws({type:"geo",init:function(t,e){var i=new xc(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),$v("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),$v("select",{type:"geoSelect",event:"geoselected"}),$v("unSelect",{type:"geoUnSelect",event:"geounselected"});var SN=["rect","polygon","keep","clear"],MN=d,IN={lineX:oy(0),lineY:oy(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&tu(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(tu(n,o,a)||tu(n,o+r,a)||tu(n,o,a+s)||tu(n,o+r,a+s)||de.create(t).contain(l[0],l[1])||ry(o,a,o+r,a,n)||ry(o,a,o,a+s,n)||ry(o+r,a,o+r,a+s,n)||ry(o,a+s,o+r,a+s,n))||void 0}}},TN=d,AN=l,DN=v,CN=["dataToPoint","pointToData"],LN=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],kN=hy.prototype;kN.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=EN[t.brushType](0,i,e);t.__rangeOffset={offset:RN[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},kN.matchOutputRanges=function(t,e,i){TN(t,function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&d(n.coordSyses,function(n){var o=EN[t.brushType](1,n,t.range);i(t,o.values,n,e)})},this)},kN.setInputRanges=function(t,e){TN(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelId=i.panelId;var n=EN[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?RN[t.brushType](n.values,o.offset,gy(n.xyMinMax,o.xyMinMax)):n.values}},this)},kN.makePanelOpts=function(t,e){return f(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:yp(n),isTargetByCursor:_p(n,t,i.coordSysModel),getLinearBrushOtherExtent:xp(n)}})},kN.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&AN(n.coordSyses,e.coordinateSystem)>=0},kN.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dy(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<NN.length;o++)if(NN[o](n,a))return a}return!0};var PN={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,o=t.gridModels,a=R(),r={},s={};(i||n||o)&&(TN(i,function(t){var e=t.axis.grid.model;a.set(e.id,e),r[e.id]=!0}),TN(n,function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0}),TN(o,function(t){a.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),a.each(function(t){var o=t.coordinateSystem,a=[];TN(o.getCartesians(),function(t,e){(AN(i,t.getAxis("x").model)>=0||AN(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:ON.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){TN(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:ON.geo})})}},NN=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],ON={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ao(t)),e}},EN={lineX:DN(fy,0),lineY:DN(fy,1),rect:function(t,e,i){var n=e[CN[t]]([i[0][0],i[1][0]]),o=e[CN[t]]([i[0][1],i[1][1]]),a=[cy([n[0],o[0]]),cy([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[CN[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},RN={lineX:DN(py,0),lineY:DN(py,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},zN=["inBrush","outOfBrush"],BN="__ecBrushSelect",VN="__ecInBrushSelectEvent",GN=VT.VISUAL.BRUSH;zs(GN,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new hy(e.option,t)).setInputRanges(e.areas,t)})}),Bs(GN,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=_y(i);if(a&&!wy(e,n)&&(d(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){xy(a,o,r,t)&&(x[t]=1)})}}var p={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushLink,v=[],x=[],_=[],w=0;n||(o=g.throttleType,a=g.throttleDelay);var b=f(e.areas,function(t){return by(r({boundingRect:FN[t.brushType](t)},t))}),S=ty(e.option,zN,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};p.selected.push(i);var n=_y(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return xy(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&iy(zN,S,a,r)})}),vy(e,o,a,s,n)});var FN={lineX:B,lineY:B,rect:function(t){return Sy(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&Sy(e)}},WN=["#ddd"];Fs({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&ey(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=f(t,function(t){return My(this.option,t)},this))},setBrushOption:function(t){this.brushOption=My(this.option,t),this.brushType=this.brushOption.brushType}});Ws({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,Iy.apply(this,arguments)},updateTransform:Iy,updateView:Iy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),Es({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Es({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var HN={},ZN=rT.toolbox.brush;Dy.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:i(ZN.title)};var UN=Dy.prototype;UN.render=UN.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},UN.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},UN.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},Ty("brush",Dy),Ns(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Jv(s),e&&!s.length&&s.push.apply(s,SN)}});Cy.prototype={constructor:Cy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yo(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==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,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ca(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:v(Ly,"dataToPoint"),convertFromPixel:v(Ly,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Cy.dimensions=Cy.prototype.dimensions,Cy.getDimensionsInfo=Cy.prototype.getDimensionsInfo,Cy.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Cy(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Fa.register("calendar",Cy);var XN=lI.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ga(t);XN.superApply(this,"init",arguments),ky(t,o)},mergeOption:function(t,e){XN.superApply(this,"mergeOption",arguments),ky(this.option,t)}}),jN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"]},YN={EN:["S","M","T","W","T","F","S"],CN:["æ¥","ä¸","äº","ä¸","å","äº","å
"]};Ws({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new yM({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new gM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?oa(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new rM({z2:30});mo(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=jN[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f<u[h].length-1;f++){var p=u[h][f].slice(),g=this._firstDayOfMonth[f];if(d){var m=this._firstDayPoints[f];p[c]=(m[c]+u[0][f+1][c])/2}var v=n.get("formatter"),y=o[+g.m-1],x={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},w=this._formatterLabel(v,x),b=new rM({z2:30});a(mo(b.style,n,{text:w}),this._monthTextPositionControl(p,d,e,s,r)),i.add(b)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var r=t.coordinateSystem,s=o.get("position"),l=o.get("nameMap"),u=o.get("margin"),h=r.getFirstDayOfWeek();_(l)&&(l=YN[l.toUpperCase()]||[]);var c=r.getNextNDay(e.end.time,7-e.lweek).time,d=[r.getCellWidth(),r.getCellHeight()];u=Vo(u,d["horizontal"===i?0:1]),"start"===s&&(c=r.getNextNDay(e.start.time,-(7+e.fweek)).time,u=-u);for(var f=0;f<7;f++){var p=r.getNextNDay(c,f),g=r.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new rM({z2:30});a(mo(v.style,o,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Fs({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Ws({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=t.get("textBaseline"),l=new rM({style:mo({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new rM({style:mo({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ca(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new yM({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0});$n(w),n.add(w)}}}),lI.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var qN=["cartesian2d","polar","singleAxis"],KN=function(t,e){var i=f(t=t.slice(),la),n=f(e=(e||[]).slice(),la);return function(o,a){d(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l<e.length;l++)s[e[l]]=t+n[l];o.call(a,s)})}}(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]),$N=d,JN=Fo,QN=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};QN.prototype={constructor:QN,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(Py(i.get("coordinateSystem"))){var n=this._dimName,o=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(o&&o.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,o=this.getAxisModel();"x"===i||"y"===i?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(a=t)}),a},getMinMaxSpan:function(){return i(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[t.start,t.end],r=[];return $N(["startValue","endValue"],function(e){r.push(null!=t[e]?i.parse(t[e]):null)}),$N([0,1],function(t){var s=r[t],l=a[t];"percent"===n[t]?(null==l&&(l=o[t]),s=i.parse(Bo(l,o,e,!0))):l=Bo(s,e,o,!0),r[t]=s,a[t]=l}),{valueWindow:JN(r),percentWindow:JN(a)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Oy(this,this._dimName,e);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,zy(this),Ry(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ry(this,!0))},filterData:function(t,e){function i(t){return t>=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),r=this._valueWindow;"none"!==a&&$N(o,function(t){var e=t.getData(),o=e.mapDimension(n,!0);o.length&&("weakFilter"===a?e.filterSelf(function(t){for(var i,n,a,s=0;s<o.length;s++){var l=e.get(o[s],t),u=!isNaN(l),h=l<r[0],c=l>r[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):$N(o,function(n){if("empty"===a)t.setData(e.map(n,function(t){return i(t)?t:NaN}));else{var o={};o[n]=r,e.selectRange(o)}}),$N(o,function(t){e.setApproximateExtent(r,t)}))})}}};var tO=d,eO=KN,iO=Fs({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=By(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=By(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;U_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Vy(this,t),tO([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new QN(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();eO(function(e){var i=e.axisIndex;t[i]=Di(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;eO(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):tO(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&eO(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a<r;a++)"category"===o[a].get("type")&&n.push(a);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&eO(function(e){var n=i[e.axisIndex],o=t.get(e.axisIndex),a=t.get(e.axisId);l(n,o=t.ecModel.queryComponents({mainType:e.axis,index:o,id:a})[0].componentIndex)<0&&n.push(o)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return eO(function(n){var o=t.get(n.axisIndex),a=this.dependentModels[n.axis][o];a&&a.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return eO(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;eO(function(n){tO(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;tO([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Vy(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),nO=qI.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n}),o.axisModels.push(e)}var e=this.dataZoomModel,i=this.ecModel,n={};return e.eachTargetAxis(function(e,o){var a=i.getComponent(e.axis,o);if(a){var r=a.getCoordSysModel();r&&t(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}},this),n}}),oO=(iO.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),yM),aO=Bo,rO=Fo,sO=m,lO=d,uO="horizontal",hO=5,cO=["line","bar","candlestick","scatter"],dO=nO.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){dO.superApply(this,"render",arguments),Nr(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){dO.superApply(this,"remove",arguments),Or(this,"_dispatchZoomAction")},dispose:function(){dO.superApply(this,"dispose",arguments),Or(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new tb;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===uO?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ga(t.option);d(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=ca(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==uO||o?i===uO&&o?{scale:r?[-1,1]:[-1,-1]}:"vertical"!==i||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new oO({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new oO({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),s=.3*(a[1]-a[0]);a=[a[0]-s,a[1]+s];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(g>0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:aO(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new pM({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new gM({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(cO,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,u=Gy(o.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:o.name,otherDim:u,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new oO({draggable:!0,cursor:Fy(this._orient),drift:sO(this._onDragMove,this,"all"),onmousemove:function(t){mw(t.event)},ondragstart:sO(this._showDataInfo,this,!0),ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new oO($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),lO([0,1],function(t){var o=Po(a.get("handleIcon"),{cursor:Fy(this._orient),draggable:!0,drift:sO(this._onDragMove,this,t),onmousemove:function(t){mw(t.event)},ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Vo(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[aO(t[0],[0,100],e,!0),aO(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];QL(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?aO(a.minSpan,r,o,!0):null,null!=a.maxSpan?aO(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=rO([aO(n[0],o,r,!0),aO(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=rO(i.slice()),o=this._size;lO([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ao(n.handles[t].parent,this.group),i=Co(0===t?"right":"left",e),s=this._handleWidth/2+hO,l=Do([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===uO?"middle":i,textAlign:a===uO?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=rO(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Do([e,i],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(lO(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});iO.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var fO="\0_ec_dataZoom_roams",pO=m,gO=nO.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){gO.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Zy(t.model)});d(e,function(e){var a=e.model,r={};d(["pan","zoom","scrollMove"],function(t){r[t]=pO(mO[t],this,e,n)},this),Wy(i,{coordId:Zy(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Hy(this.api,this.dataZoomModel.id),gO.superApply(this,"dispose",arguments),this._range=null}}),mO={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=vO[e](null,[n.originX,n.originY],r,i,t),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 h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return QL(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Ky(function(t,e,i,n,o,a){var r=vO[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Ky(function(t,e,i,n,o,a){return vO[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})},vO={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};Os({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),Es("dataZoom",function(t,e){var i=Ny(m(e.eachComponent,e,"dataZoom"),KN,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var yO=d,xO=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),yO(e,function(t){if(t){$y(t,"splitList")&&!$y(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&yO(e,function(t){w(t)&&($y(t,"start")&&!$y(t,"min")&&(t.min=t.start),$y(t,"end")&&!$y(t,"max")&&(t.max=t.end))})}})};lI.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var _O=VT.VISUAL.COMPONENT;Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(ny(e.stateList,e.targetVisuals,m(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(m(Jy,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var wO={get:function(t,e,n){var o=i((bO[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},bO={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]}},SO=hL.mapVisual,MO=hL.eachVisual,IO=y,TO=d,AO=Fo,DO=Bo,CO=B,LO=Fs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;U_.canvasSupported||(i.realtime=!1),!e&&ey(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=ty(this.option.controller,e,t),this.targetVisuals=ty(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Di(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=AO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){IO(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")},TO(this.stateList,function(e){var i=t[e];if(_(i)){var n=wO.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecModel,o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.isCategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},TO(n,function(t,e){if(hL.isValidType(e)){var i=wO.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");TO(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=SO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var u=s.symbolSize;if(null!=u){var h=-1/0;MO(u,function(t){t>h&&(h=t)}),s.symbolSize=SO(u,function(t){return DO(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:CO,getValueState:CO,getVisualMeta:CO}),kO=[20,140],PO=LO.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){PO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){PO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=kO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=kO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){LO.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Fo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=Qy(0,0,this.getExtent()),n=Qy(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;r<l&&(!n.length||i[r]<=n[0]);r++)i[r]<n[a]&&e(i[r],"outOfRange");for(u=1;a<s;a++,u=0)u&&o.length&&e(n[a],"outOfRange"),e(n[a],"inRange");for(var u=1;r<l;r++)(!n.length||n[n.length-1]<i[r])&&(u&&(o.length&&e(o[o.length-1].value,"outOfRange"),u=0),e(i[r],"outOfRange"));var h=o.length;return{stops:o,outerColors:[h?o[0].color:"transparent",h?o[h-1].color:"transparent"]}}}),NO=Ws({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=qM(e.get("padding")||0),n=t.getBoundingRect();t.add(new yM({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function n(t){return s[t]}function o(t,e){s[t]=e}var a=(i=i||{}).forceState,r=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=r.get("itemSymbol")),"color"===e){var l=r.get("contentColor");s.color=l}var u=r.controllerVisuals[a||r.getValueState(t)];return d(hL.prepareVisualTypes(u),function(a){var r=u[a];i.convertOpacityToAlpha&&"opacity"===a&&(a="colorAlpha",r=u.__alphaForOpacity),hL.dependsOn(a,e)&&r&&r.applyVisual(t,n,o)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;da(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:B}),OO=Bo,EO=d,RO=Math.min,zO=Math.max,BO=12,VO=6,GO=NO.extend({type:"visualMap.continuous",init:function(){GO.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new rM({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=tx(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=ix()),s.add(i.inRange=ix(null,a?sx(this._orient):null,m(this._dragHandle,this,"all",!1),m(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("å½"),u=zO(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,o,r),this._createHandle(s,1,n,u,o,r)),this._createIndicator(s,n,u,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a=m(this._dragHandle,this,e,!1),r=m(this._dragHandle,this,e,!0),s=ix(nx(e,n),sx(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new rM({draggable:!0,drift:a,onmousemove:function(t){mw(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=ix([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:VO+3,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():rx(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[OO(e[0],i,n,!0),OO(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];QL(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[OO(n[0],o,a,!0),OO(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new TM(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new tb("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;EO([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Do(i.handleLabelPoints[r],Ao(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=OO(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",ox(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Do(u.indicatorLabelPoint,Ao(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=RO(zO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=RO(zO(o[0],t),o[1]);var r=ax(i,a,o),s=[t-r,t+r],l=OO(t,o,a,!0),u=[OO(s[0],o,a,!0),OO(s[1],o,a,!0)];s[0]<o[0]&&(u[0]=-1/0),s[1]>o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"â ",r));var h=this._hoverLinkDataIndices,c=[];(e||rx(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Ri(h,c);this._dispatchHighDown("downplay",ex(d[0])),this._dispatchHighDown("highlight",ex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Ao(e,n?null:this.group);return zM[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Es({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Ns(xO);var FO=LO.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FO.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WO[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=hL.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=wO.get(n,"inRange"===t?"active":"inactive",o)})},this),LO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=hL.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){hL.findPieceIndex(e,this._pieceList)===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WO={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r<l;s+=a){var u=r===o-1?n[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),Jo(e),d(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;d(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),lx(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;d(t.pieces,function(t,i){w(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var a=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;h<2;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&null==a[h];d++)a[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&a[1]===1/0&&(r[0]=0),u[1]&&a[0]===-1/0&&(r[1]=0),a[0]===a[1]&&r[0]&&r[1]&&(n.value=a[0])}n.visual=hL.retrieveVisuals(t),e.push(n)},this),lx(t,e),Jo(e),d(e,function(t){var e=t.close,i=[["<","â¤"][e[1]],[">","â¥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};NO.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=T(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),d(l.viewPieceList,function(n){var l=n.piece,u=new tb;u.onclick=m(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new rM({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,h,r),aI(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:ex(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return tx(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new tb,r=this.visualMapModel.textStyleModel;a.add(new rM({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});Ns(xO);var HO=ta,ZO=ia,UO=Fs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ux(i),d(i.data,function(t){t instanceof Array?(ux(t[0]),ux(t[1])):ux(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,HO).join(", "):HO(i),o=e.getName(t),a=ZO(this.name);return(null!=i||o)&&(a+="<br />"),o&&(a+=ZO(o),null!=i&&(a+=" : ")),null!=i&&(a+=ZO(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});h(UO,ZI),UO.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var XO=l,jO=v,YO={min:jO(dx,"min"),max:jO(dx,"max"),average:jO(dx,"average")},qO=Ws({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});qO.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(xx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Du),u=_x(o,t,e);e.setData(u),xx(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markPoint=t.markPoint||{}}),UO.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var KO=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis)){var u,h;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",e.getAxis(u),h=T(r.yAxis,r.xAxis);else{var c=px(r,s,e,t);u=c.valueDataDim,c.valueAxis,h=yx(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueIndex:r.valueIndex,value:h}]}return r=[fx(t,r[0]),fx(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};qO.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Ix(o,e,!0,t,i),Ix(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Ix(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new sf);this.group.add(u.group);var h=Tx(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markLine=t.markLine||{}}),UO.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var $O=function(t,e,i,n){var a=fx(t,n[0]),r=fx(t,n[1]),s=T,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},JO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];qO.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(JO,function(o){return Lx(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new tb});this.group.add(u.group),u.__keep=!0;var h=kx(o,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(JO,function(i){return Lx(h,e,i,t,n)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new pM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);Io(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=h.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:Yt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),go(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:s}),fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markArea=t.markArea||{}});lI.registerSubTypeDefaulter("timeline",function(){return"slider"}),Es({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),Es({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var QO=lI.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){QO.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Li(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new vA([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});h(QO.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),ZI);var tE=qI.extend({type:"timeline"}),eE=function(t,e,i,n){aD.call(this,t,e,i),this.type=n||"value",this.model=null};eE.prototype={constructor:eE,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},u(eE,aD);var iE=m,nE=d,oE=Math.PI;tE.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return ia(s.scale.getLabel(t))},nE(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=Ex(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:oE/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*oE/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=xt(),u=s.x,h=s.y+s.height;St(l,l,[-u,-h]),Mt(l,l,-oE/2),St(l,l,[u,h]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Hl(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new eE("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new tb;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new _M({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();nE(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:iE(this._changeTimeline,this,t)},h=zx(r,s,e,u);fo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();nE(a,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new rM({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:iE(this._changeTimeline,this,a),silent:!1});mo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),fo(h,mo({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c=Rx(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),fo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",iE(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",iE(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),iE(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=iE(s._handlePointerDrag,s),t.ondragend=iE(s._handlePointerDragend,s),Bx(t,a,i,n,!0)},onUpdate:function(t){Bx(t,a,i,n)}};this._currentPointer=zx(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Fo(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(iE(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Do(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,o=this._axis;return i.each(["value"],function(i,a){var r=o.dataToCoord(i),s=Math.abs(r-t);s<n&&(n=s,e=a)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Ns(function(t){var e=t&&t.timeline;y(e)||(e=e?[e]:[]),d(e,function(t){t&&Px(t)})});var aE=Fs({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){aE.superApply(this,"optionUpdated",arguments),d(this.option.feature,function(t,e){var i=Ay(e);i&&n(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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"}}}});Ws({type:"toolbox",render:function(t,e,i,n){function o(o,r){var s,c=h[o],d=h[r],f=new No(l[c],t,t.ecModel);if(c&&!d){if(Vx(c))s={model:f,onclick:f.option.onclick,featureName:c};else{var p=Ay(c);if(!p)return;s=new p(f,e,i)}u[c]=s}else{if(!(s=u[d]))return;s.model=f,s.ecModel=e,s.api=i}c||!d?f.get("show")&&!s.unusable?(a(f,s,c),f.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},s.render&&s.render(f,e,i,n)):s.remove&&s.remove(e,i):s.dispose&&s.dispose(e,i)}function a(n,o,a){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=o.getIcons?o.getIcons():n.get("icon"),c=n.get("title")||{};if("string"==typeof h){var f=h,p=c;c={},(h={})[a]=f,c[a]=p}var g=n.iconPaths={};d(h,function(a,h){var d=Po(a,{},{x:-s/2,y:-s/2,width:s,height:s});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),fo(d),t.get("showTitle")&&(d.__title=c[h],d.on("mouseover",function(){var t=u.getItemStyle();d.setStyle({text:c[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){d.setStyle({textFill:null})})),d.trigger(n.get("iconStatus."+h)||"normal"),r.add(d),d.on("click",m(o.onclick,o,e,i,h)),g[h]=d})}var r=this.group;if(r.removeAll(),t.get("show")){var s=+t.get("itemSize"),l=t.get("feature")||{},u=this._features||(this._features={}),h=[];d(l,function(t,e){h.push(e)}),new Xs(this._featureNames||[],h).add(o).update(o).remove(v(o,null)).execute(),this._featureNames=h,_v(r,t,i),r.add(wv(r.getBoundingRect(),t)),r.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var o=ke(e,Xe(n)),a=t.position[0]+r.position[0],l=!1;t.position[1]+r.position[1]+s+o.height>i.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var rE=rT.toolbox.saveAsImage;Gx.defaultOption={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:rE.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:rE.lang.slice()},Gx.prototype.unusable=!U_.canvasSupported,Gx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||U_.browser.ie||U_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Ty("saveAsImage",Gx);var sE=rT.toolbox.magicType;Fx.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(sE.title),option:{},seriesIndex:{}};var lE=Fx.prototype;lE.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uE={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},hE=[["line","bar"],["stack","tiled"]];lE.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(uE[i]){var a={series:[]};d(hE,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=uE[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},Es({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Ty("magicType",Fx);var cE=rT.toolbox.dataView,dE=new Array(60).join("-"),fE="\t",pE=new RegExp("["+fE+"]+","g");$x.defaultOption={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:i(cE.title),lang:i(cE.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},$x.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=Ux(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;ht(v,"click",i),ht(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Kx(u.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),ht(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+fE+e.substring(n),this.selectionStart=this.selectionEnd=i+1,mw(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},$x.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},$x.prototype.dispose=function(t,e){this.remove(t,e)},Ty("dataView",$x),Es({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Jx(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var gE=d,mE="\0_ec_hist_store";iO.extend({type:"dataZoom.select"}),nO.extend({type:"dataZoom.select"});var vE=rT.toolbox.dataZoom,yE=d,xE="\0_ec_\0toolbox-dataZoom_";o_.defaultOption={show:!0,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:i(vE.title)};var _E=o_.prototype;_E.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,s_(t,e,this,n,i),r_(t,e)},_E.onclick=function(t,e,i){wE[i].call(this)},_E.remove=function(t,e){this._brushController.unmount()},_E.dispose=function(t,e){this._brushController.dispose()};var wE={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(t_(this.ecModel))}};_E._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=QL(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new hy(a_(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Qx(a,o),this._dispatchZoomAction(o)}},_E._dispatchZoomAction=function(t){var e=[];yE(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ty("dataZoom",o_),Ns(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"===a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:xE+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),yE(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var bE=rT.toolbox.restore;l_.defaultOption={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:bE.title},l_.prototype.onclick=function(t,e,i){e_(t),e.dispatchAction({type:"restore",from:this.uid})},Ty("restore",l_),Es({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var SE,ME="urn:schemas-microsoft-com:vml",IE="undefined"==typeof window?null:window,TE=!1,AE=IE&&IE.document;if(AE&&!U_.canvasSupported)try{!AE.namespaces.zrvml&&AE.namespaces.add("zrvml",ME),SE=function(t){return AE.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){SE=function(t){return AE.createElement("<"+t+' xmlns="'+ME+'" class="zrvml">')}}var DE=ES.CMD,CE=Math.round,LE=Math.sqrt,kE=Math.abs,PE=Math.cos,NE=Math.sin,OE=Math.max;if(!U_.canvasSupported){var EE=21600,RE=EE/2,zE=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=EE+","+EE,t.coordorigin="0,0"},BE=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},VE=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},GE=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},FE=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},WE=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},HE=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ZE=function(t,e,i){var n=Gt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=VE(n[0],n[1],n[2]),t.opacity=i*n[3])},UE=function(t){var e=Gt(t);return[VE(e[0],e[1],e[2]),e[3]]},XE=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof IM){var o,a=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(Q(f,f,d),Q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&Q(f,f,d),y/=v[0]*EE,x/=v[1]*EE;var _=OE(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I<b;I++){var T=w[I],A=UE(T.color);M.push(T.offset*l+s+" "+A[0]),0!==I&&I!==b-1||S.push(A)}if(b>=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else ZE(t,n,e.opacity)},jE=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof IM||ZE(t,e.stroke,e.opacity)},YE=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof IM&&FE(t,a),a||(a=u_(e)),o?XE(a,i,n):jE(a,i),GE(t,a)):(t[o?"filled":"stroked"]="false",FE(t,a))},qE=[[],[],[]],KE=function(t,e){var i,n,o,a,r,s,l=DE.M,u=DE.C,h=DE.L,c=DE.A,d=DE.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(o=p[a++],n="",i=0,o){case l:n=" m ",i=1,r=p[a++],s=p[a++],qE[0][0]=r,qE[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],qE[0][0]=r,qE[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),qE[0][0]=y,qE[0][1]=x,qE[1][0]=_,qE[1][1]=w,qE[2][0]=m,qE[2][1]=v,r=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=LE(e[0]*e[0]+e[1]*e[1]),I=LE(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var N=p[a++],O=A+PE(k)*C,E=D+NE(k)*L,y=A+PE(P)*C,x=D+NE(P)*L,R=N?" wa ":" at ";Math.abs(O-y)<1e-4&&(Math.abs(P-k)>.01?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&O>A?x-=.0125:x+=.0125:N&&E<D||!N&&E>D?y+=.0125:y-=.0125),f.push(R,CE(((A-C)*M+b)*EE-RE),",",CE(((D-L)*I+S)*EE-RE),",",CE(((A+C)*M+b)*EE-RE),",",CE(((D+L)*I+S)*EE-RE),",",CE((O*M+b)*EE-RE),",",CE((E*I+S)*EE-RE),",",CE((y*M+b)*EE-RE),",",CE((x*I+S)*EE-RE)),r=y,s=x;break;case DE.R:var z=qE[0],B=qE[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=CE(z[0]*EE-RE),B[0]=CE(B[0]*EE-RE),z[1]=CE(z[1]*EE-RE),B[1]=CE(B[1]*EE-RE),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case DE.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V<i;V++){var G=qE[V];e&&Q(G,G,e),f.push(CE(G[0]*EE-RE),",",CE(G[1]*EE-RE),V<i-1?",":"")}}}return f.join("")};Pn.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=u_("shape"),zE(i),this._vmlEl=i),YE(i,"fill",e,this),YE(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;if(o&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=LE(kE(s))}a.weight=r+"px"}var l=this.path||(this.path=new ES);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=KE(l,this.transform),i.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Pn.prototype.onRemove=function(t){FE(t,this._vmlEl),this.removeRectText(t)},Pn.prototype.onAdd=function(t){GE(t,this._vmlEl),this.appendRectText(t)};var $E=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};fi.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if($E(o)){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=o.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=o.width,i=o.height,r.width=s,r.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=AE.createElement("div"),zE(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=LE(x[0]*x[0]+x[1]*x[1]),S=LE(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];Q(M,M,x),Q(I,I,x),Q(T,T,x),Q(A,A,x);var D=OE(M[0],I[0],T[0],A[0]),C=OE(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,",","M12=",x[2]/S,",","M21=",x[1]/b,",","M22=",x[3]/S,",","Dx=",CE(u*b+x[4]),",","Dy=",CE(h*S+x[5])),_.padding="0 "+CE(D)+"px "+CE(C)+"px 0",_.filter="progid:DXImageTransform.Microsoft.Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=CE(u)+"px",_.top=CE(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=AE.createElement("div"),this._imageEl=k);var N=k.style;if(v){if(e&&i)N.width=CE(b*e*c/f)+"px",N.height=CE(S*i*d/p)+"px";else{var O=new Image,E=this;O.onload=function(){O.onload=null,e=O.width,i=O.height,N.width=CE(b*e*c/f)+"px",N.height=CE(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},O.src=o}P||((P=AE.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=CE((c+g*c/f)*b),R.height=CE((d+m*d/p)*S),R.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else N.width=CE(b*c)+"px",N.height=CE(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;B<1&&(z+=".Alpha(opacity="+CE(100*B)+") "),z+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",N.filter=z,y.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},fi.prototype.onRemove=function(t){FE(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},fi.prototype.onAdd=function(t){GE(t,this._vmlEl),this.appendRectText(t)};var JE,QE={},tR=0,eR=document.createElement("div"),iR=function(t){var e=QE[t];if(!e){tR>100&&(tR=0,QE={});var i,n=eR.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},QE[t]=e,tR++}return e};!function(t,e){bb[t]=e}("measureText",function(t,e){var i=AE;JE||((JE=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",AE.body.appendChild(JE));try{JE.style.font=e}catch(t){}return JE.innerHTML="",JE.appendChild(i.createTextNode(t)),{width:JE.offsetWidth}});for(var nR=new de,oR=[Db,di,fi,Pn,rM],aR=0;aR<oR.length;aR++){var rR=oR[aR].prototype;rR.drawRectText=function(t,e,i,n){var o=this.style;this.__dirty&&Ye(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=Ze(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);a.push(u.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=iR(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||ke(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(nR.copy(e),nR.applyTransform(v),e=nR),n)c=e.x,d=e.y;else{var y=o.textPosition,x=o.textDistance;if(y instanceof Array)c=e.x+HE(y[0],e.width),d=e.y+HE(y[1],e.height),f=f||"left";else{var _=Re(y,e,x);c=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}c=Oe(c,i.width,f),d=Ee(d,i.height,p),d+=i.height/2;var w,b,S,M=u_,I=this._textVmlEl;I?b=(w=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),w=M("path"),b=M("textpath"),S=M("skew"),b.style["v-text-align"]="left",zE(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",GE(I,S),GE(I,w),GE(I,b),this._textVmlEl=I);var T=[c,d],A=I.style;v&&n?(Q(T,T,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(CE(T[0])||0)+","+(CE(T[1])||0),S.origin="0 0",A.left="0px",A.top="0px"):(S.on=!1,A.left=CE(c)+"px",A.top=CE(d)+"px"),b.string=BE(a);try{b.style.font=m}catch(t){}YE(I,"fill",{fill:o.textFill,opacity:o.opacity},this),YE(I,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash},this),I.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,I)}},rR.removeRectText=function(t){FE(t,this._textVmlEl),this._textVmlEl=null},rR.appendRectText=function(t){GE(t,this._textVmlEl)}}rM.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},rM.prototype.onRemove=function(t){this.removeRectText(t)},rM.prototype.onAdd=function(t){this.appendRectText(t)}}d_.prototype={constructor:d_,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||c_(e.width))-c_(e.paddingLeft)-c_(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||c_(e.height))-c_(e.paddingTop)-c_(e.paddingBottom)|0}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){d_.prototype[t]=f_(t)}),Ti("vml",d_);var sR="http://www.w3.org/2000/svg",lR=ES.CMD,uR=Array.prototype.join,hR="none",cR=Math.round,dR=Math.sin,fR=Math.cos,pR=Math.PI,gR=2*Math.PI,mR=180/pR,vR=1e-4,yR={};yR.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=p_("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=S_(n);o.indexOf("NaN")<0&&__(i,"d",o)}b_(i,e,!1,t),x_(i,t.transform),null!=e.text&&bR(t,t.getBoundingRect())};var xR={};xR.brush=function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement&&(i=i.src),i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=p_("image"),t.__svgEl=s),i!==t.__imageSrc&&(w_(s,"href",i),t.__imageSrc=i),__(s,"width",a),__(s,"height",r),__(s,"x",n),__(s,"y",o),x_(s,t.transform),null!=e.text&&bR(t,t.getBoundingRect())}};var _R={},wR=new de,bR=function(t,e,i){var n=t.style;t.__dirty&&Ye(n);var o=n.text;if(null!=o){o+="";var a=t.__textSvgEl;a||(a=p_("text"),t.__textSvgEl=a);var r,s,l=n.textPosition,u=n.textDistance,h=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var c=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||wb,d=M_(n.textVerticalAlign),f=(i=ke(o,c,h,d,n.textPadding,n.textLineHeight)).lineHeight;if(l instanceof Array)r=e.x+l[0],s=e.y+l[1];else{var p=Re(l,e,u);r=p.x,s=p.y,d=M_(p.textVerticalAlign),h=p.textAlign}__(a,"alignment-baseline",d),c&&(a.style.font=c);var g=n.textPadding;if(__(a,"x",r),__(a,"y",s),b_(a,n,!0,t),t instanceof rM||t.style.transformText)x_(a,t.transform);else{if(t.transform)wR.copy(e),wR.applyTransform(t.transform),e=wR;else{var m=t.transformCoordToGlobal(e.x,e.y);e.x=m[0],e.y=m[1],t.transform=_t(xt())}var v=n.textOrigin;"center"===v?(r=i.width/2+r,s=i.height/2+s):v&&(r=v[0]+r,s=v[1]+s);var y=-n.textRotation||0,x=xt();Mt(x,x,y),St(x,x,m=[t.transform[4],t.transform[5]]),x_(a,x)}var _=o.split("\n"),w=_.length,b=h;"left"===b?(b="start",g&&(r+=g[3])):"right"===b?(b="end",g&&(r-=g[1])):"center"===b&&(b="middle",g&&(r+=(g[3]-g[1])/2));var S=0;if("after-edge"===d?(S=-i.height+f,g&&(S-=g[2])):"middle"===d?(S=(-i.height+f)/2,g&&(s+=(g[0]-g[2])/2)):g&&(S+=g[0]),t.__text!==o||t.__textFont!==c){var M=t.__tspanList||[];t.__tspanList=M;for(T=0;T<w;T++)(A=M[T])?A.innerHTML="":(A=M[T]=p_("tspan"),a.appendChild(A),__(A,"alignment-baseline",d),__(A,"text-anchor",b)),__(A,"x",r),__(A,"y",s+T*f+S),A.appendChild(document.createTextNode(_[T]));for(;T<M.length;T++)a.removeChild(M[T]);M.length=w,t.__text=o,t.__textFont=c}else if(t.__tspanList.length)for(var I=t.__tspanList.length,T=0;T<I;++T){var A=t.__tspanList[T];A&&(__(A,"x",r),__(A,"y",s+T*f+S))}}};_R.drawRectText=bR,_R.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],bR(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},I_.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var n=this;t=t.slice();var o=(e=e.slice()).length,a=t.length,r=1,s=o+a,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=o&&u+1>=a){for(var h=[],c=0;c<e.length;c++)h.push(c);return[{indices:h,count:e.length}]}for(;r<=s;){var d=function(){for(var i=-1*r;i<=r;i+=2){var s,u=l[i-1],h=l[i+1],c=(h?h.newPos:0)-i;u&&(l[i-1]=void 0);var d=u&&u.newPos+1<o,f=h&&0<=c&&c<a;if(d||f){if(!d||f&&u.newPos<h.newPos?(s=A_(h),n.pushComponent(s.components,void 0,!0)):((s=u).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=o&&c+1>=a)return T_(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var SR=new I_,MR=function(t,e,i){return SR.diff(t,e,i)};D_.prototype.createElement=p_,D_.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},D_.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},D_.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},D_.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},D_.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},D_.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},D_.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},D_.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},D_.prototype.getSvgProxy=function(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR},D_.prototype.getTextSvgElement=function(t){return t.__textSvgEl},D_.prototype.getSvgElement=function(t){return t.__svgEl},u(C_,D_),C_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},C_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Yw("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},C_.prototype.update=function(t){var e=this;D_.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},C_.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Yw("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Gt(r)[3],l=Zt(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},C_.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&D_.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&D_.prototype.markUsed.call(this,e._dom)}},u(L_,D_),L_.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},L_.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);bt(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},L_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&D_.prototype.markUsed.call(e,t._dom),t._textDom&&D_.prototype.markUsed.call(e,t._textDom)})},u(k_,D_),k_.prototype.addWithoutUpdate=function(t,e){if(e&&P_(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},k_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},k_.prototype.update=function(t,e){var i=e.style;if(P_(i)){var n=this;D_.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},k_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},k_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},k_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&D_.prototype.markUsed.call(this,e._shadowDom)};var IR=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=p_("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new C_(n,o),this.clipPathManager=new L_(n,o),this.shadowManager=new k_(n,o);var r=document.createElement("div");r.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=r,t.appendChild(r),r.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};IR.prototype={constructor:IR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e<o;e++){var r=O_(f=t[e]),s=G_(f)||V_(f);f.invisible||(f.__dirty&&(r&&r.brush(f),this.clipPathManager.update(f),f.style&&(this.gradientManager.update(f.style.fill),this.gradientManager.update(f.style.stroke),this.shadowManager.update(s,f)),f.__dirty=!1),a.push(f))}var l,u=MR(n,a);for(e=0;e<u.length;e++)if((c=u[e]).removed)for(d=0;d<c.count;d++){var s=G_(f=n[c.indices[d]]),h=V_(f);B_(i,s),B_(i,h)}for(e=0;e<u.length;e++){var c=u[e];if(c.added)for(d=0;d<c.count;d++){var s=G_(f=a[c.indices[d]]),h=V_(f);l?R_(i,s,l):z_(i,s),s?R_(i,h,s):l?R_(i,h,l):z_(i,h),R_(i,h,s),l=h||s||l,this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.addWithoutUpdate(l,f),this.clipPathManager.markUsed(f)}else if(!c.removed)for(var d=0;d<c.count;d++){var f=a[c.indices[d]];l=s=V_(f)||G_(f)||l,this.gradientManager.markUsed(f),this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.markUsed(f),this.shadowManager.addWithoutUpdate(s,f),this.clipPathManager.markUsed(f)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(p_("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||N_(s[i])||N_(r.style[i]))-(N_(s[o])||0)-(N_(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){IR.prototype[t]=F_(t)}),Ti("svg",IR),t.version="4.2.1",t.dependencies=ET,t.PRIORITY=VT,t.init=function(t,e,i){var n=ks(t);if(n)return n;var o=new us(t,e,i);return o.id="ec_"+iA++,tA[o.id]=o,Fi(t,oA,o.id),Cs(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,kT(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+nA++,kT(e,function(e){e.group=t})}return eA[t]=!0,t},t.disConnect=Ls,t.disconnect=aA,t.dispose=function(t){"string"==typeof t?t=tA[t]:t instanceof us||(t=ks(t)),t instanceof us&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ks,t.getInstanceById=function(t){return tA[t]},t.registerTheme=Ps,t.registerPreprocessor=Ns,t.registerProcessor=Os,t.registerPostUpdate=function(t){KT.push(t)},t.registerAction=Es,t.registerCoordinateSystem=Rs,t.getCoordinateSystemDimensions=function(t){var e=Fa.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=zs,t.registerVisual=Bs,t.registerLoading=Gs,t.extendComponentModel=Fs,t.extendComponentView=Ws,t.extendSeriesModel=Hs,t.extendChartView=Zs,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){DT.registerMap(t,e,i)},t.getMap=function(t){var e=DT.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=rA,t.zrender=Hb,t.number=YM,t.format=eI,t.throttle=Pr,t.helper=tD,t.matrix=Sw,t.vector=cw,t.color=Ww,t.parseGeoJSON=iD,t.parseGeoJson=rD,t.util=sD,t.graphic=lD,t.List=vA,t.Model=No,t.Axis=aD,t.env=U_}); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | /* |
| | | * Licensed to the Apache Software Foundation (ASF) under one |
| | | * or more contributor license agreements. See the NOTICE file |
| | | * distributed with this work for additional information |
| | | * regarding copyright ownership. The ASF licenses this file |
| | | * to you under the Apache License, Version 2.0 (the |
| | | * "License"); you may not use this file except in compliance |
| | | * with the License. You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, |
| | | * software distributed under the License is distributed on an |
| | | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | * KIND, either express or implied. See the License for the |
| | | * specific language governing permissions and limitations |
| | | * under the License. |
| | | * çæ¬ä¸º4.2.1ï¼ä¿®æ¹ä¸å¤æºç ï¼this.el.hide() æ¹ä¸º this.el?this.el.hide():true |
| | | */ |
| | | |
| | | |
| | | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(nw=null),ew[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Y_.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o<a;o++)e[o]=i(t[o])}}else if(j_[n]){if(!O(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var o=0,a=t.length;o<a;o++)e[o]=i(t[o])}}}else if(!X_[n]&&!O(t)&&!M(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function n(t,e,o){if(!w(e)||!w(t))return o?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var r=t[a],s=e[a];!w(s)||!w(r)||y(s)||y(r)||M(s)||M(r)||b(s)||b(r)||O(s)||O(r)?!o&&a in t||(t[a]=i(e[a],!0)):n(r,s,o)}return t}function o(t,e){for(var i=t[0],o=1,a=t.length;o<a;o++)i=n(i,t[o],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function r(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return nw||(nw=iw().getContext("2d")),nw}function l(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var o in n)t.prototype[o]=n[o];t.prototype.constructor=t,t.superClass=e}function h(t,e,i){r(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function c(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function d(t,e,i){if(t&&e)if(t.forEach&&t.forEach===K_)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function f(t,e,i){if(t&&e){if(t.map&&t.map===Q_)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===tw)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function g(t,e,i){if(t&&e){if(t.filter&&t.filter===$_)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function m(t,e){var i=J_.call(arguments,2);return function(){return t.apply(e,i.concat(J_.call(arguments)))}}function v(t){var e=J_.call(arguments,1);return function(){return t.apply(this,e.concat(J_.call(arguments)))}}function y(t){return"[object Array]"===Y_.call(t)}function x(t){return"function"==typeof t}function _(t){return"[object String]"===Y_.call(t)}function w(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function b(t){return!!X_[Y_.call(t)]}function S(t){return!!j_[Y_.call(t)]}function M(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t){return t!==t}function T(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function A(t,e){return null!=t?t:e}function D(t,e,i){return null!=t?t:null!=e?e:i}function C(){return Function.call.apply(J_,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function k(t,e){if(!t)throw new Error(e)}function P(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function N(t){t[ow]=!0}function O(t){return t[ow]}function E(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=y(t);this.data={};var n=this;t instanceof E?t.each(e):t&&d(t,e)}function R(t){return new E(t)}function z(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function B(){}function V(t,e){var i=new rw(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function G(t,e){return t[0]=e[0],t[1]=e[1],t}function F(t){var e=new rw(2);return e[0]=t[0],e[1]=t[1],e}function W(t,e,i){return t[0]=e,t[1]=i,t}function H(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Z(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function U(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function X(t){return Math.sqrt(j(t))}function j(t){return t[0]*t[0]+t[1]*t[1]}function Y(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function q(t,e){var i=X(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function K(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function $(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function J(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function Q(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function tt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function et(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function it(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function nt(t,e){return{target:t,topTarget:e&&e.topTarget}}function ot(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function at(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=ot(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}function rt(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function st(t,e,i,n){return i=i||{},n||!U_.canvasSupported?lt(t,e,i):U_.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):lt(t,e,i),i}function lt(t,e,i){var n=rt(t);i.zrX=e.clientX-n.left,i.zrY=e.clientY-n.top}function ut(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&st(t,o,e,i)}else st(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ht(t,e,i){pw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ct(t,e,i){pw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function dt(t){return 2===t.which||3===t.which}function ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function pt(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function gt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:mt}}function mt(t){mw(this.event)}function vt(){}function yt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||xw}return!1}function xt(){var t=new bw(6);return _t(t),t}function _t(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function bt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function St(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Mt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function It(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function Tt(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function At(t){var e=xt();return wt(e,t),e}function Dt(t){return t>Iw||t<-Iw}function Ct(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Lt(t){return(t=Math.round(t))<0?0:t>255?255:t}function kt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Pt(t){return t<0?0:t>1?1:t}function Nt(t){return Lt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ot(t){return Pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Et(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Rt(t,e,i){return t+(e-t)*i}function zt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Vt(t,e){Vw&&Bt(Vw,e),Vw=Bw.put(t,Vw||e.slice())}function Gt(t,e){if(t){e=e||[];var i=Bw.get(t);if(i)return Bt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in zw)return Bt(e,zw[n]),Vt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void zt(e,0,0,0,1);l=Ot(s.pop());case"rgb":return 3!==s.length?void zt(e,0,0,0,1):(zt(e,Nt(s[0]),Nt(s[1]),Nt(s[2]),l),Vt(t,e),e);case"hsla":return 4!==s.length?void zt(e,0,0,0,1):(s[3]=Ot(s[3]),Ft(s,e),Vt(t,e),e);case"hsl":return 3!==s.length?void zt(e,0,0,0,1):(Ft(s,e),Vt(t,e),e);default:return}}zt(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(zt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Vt(t,e),e):void zt(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(zt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Vt(t,e),e):void zt(e,0,0,0,1)}}}}function Ft(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ot(t[1]),o=Ot(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],zt(e,Lt(255*Et(r,a,i+1/3)),Lt(255*Et(r,a,i)),Lt(255*Et(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Wt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Ht(t,e){var i=Gt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return qt(i,4===i.length?"rgba":"rgb")}}function Zt(t){var e=Gt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ut(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Lt(Rt(r[0],s[0],l)),i[1]=Lt(Rt(r[1],s[1],l)),i[2]=Lt(Rt(r[2],s[2],l)),i[3]=Pt(Rt(r[3],s[3],l)),i}}function Xt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Gt(e[o]),s=Gt(e[a]),l=n-o,u=qt([Lt(Rt(r[0],s[0],l)),Lt(Rt(r[1],s[1],l)),Lt(Rt(r[2],s[2],l)),Pt(Rt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function jt(t,e,i,n){if(t=Gt(t))return t=Wt(t),null!=e&&(t[0]=kt(e)),null!=i&&(t[1]=Ot(i)),null!=n&&(t[2]=Ot(n)),qt(Ft(t),"rgba")}function Yt(t,e){if((t=Gt(t))&&null!=e)return t[3]=Pt(e),qt(t,"rgba")}function qt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Kt(t,e){return t[e]}function $t(t,e,i){t[e]=i}function Jt(t,e,i){return(e-t)*i+t}function Qt(t,e,i){return i>.5?e:t}function te(t,e,i,n,o){var a=t.length;if(1===o)for(s=0;s<a;s++)n[s]=Jt(t[s],e[s],i);else for(var r=a&&t[0].length,s=0;s<a;s++)for(var l=0;l<r;l++)n[s][l]=Jt(t[s][l],e[s][l],i)}function ee(t,e,i){var n=t.length,o=e.length;if(n!==o)if(n>o)t.length=o;else for(r=n;r<o;r++)t.push(1===i?e[r]:Hw.call(e[r]));for(var a=t[0]&&t[0].length,r=0;r<t.length;r++)if(1===i)isNaN(t[r])&&(t[r]=e[r]);else for(var s=0;s<a;s++)isNaN(t[r][s])&&(t[r][s]=e[r][s])}function ie(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(a=0;a<n;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;a<n;a++)for(var r=0;r<o;r++)if(t[a][r]!==e[a][r])return!1;return!0}function ne(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(c=0;c<u;c++)s[c]=oe(t[c],e[c],i[c],n[c],o,a,r);else for(var h=t[0].length,c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=oe(t[c][d],e[c][d],i[c][d],n[c][d],o,a,r)}function oe(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ae(t){if(c(t)){var e=t.length;if(c(t[0])){for(var i=[],n=0;n<e;n++)i.push(Hw.call(t[n]));return i}return Hw.call(t)}return t}function re(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function se(t){var e=t[t.length-1].value;return c(e&&e[0])?2:1}function le(t,e,i,n,o,a){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,d=c(n[0].value),f=!1,p=!1,g=d?se(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<u;_++){m.push(n[_].time/h);var w=n[_].value;if(d&&ie(w,y,g)||!d&&w===y||(x=!1),y=w,"string"==typeof w){var b=Gt(w);b?(w=b,f=!0):p=!0}v.push(w)}if(a||!x){for(var S=v[u-1],_=0;_<u-1;_++)d?ee(v[_],S,g):!isNaN(v[_])||isNaN(S)||p||f||(v[_]=S);d&&ee(r(t._target,o),S,g);var M,I,T,A,D,C,L=0,k=0;if(f)var P=[0,0,0,0];var N=new Ct({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=M=Math.min(L+1,u-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;i<u&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ne(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=ne(T,A,D,C,I,I*I,I*I*I,P,1),a=re(P);else{if(p)return Qt(A,D,I);a=oe(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)te(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)te(v[i],v[i+1],I,P,1),a=re(P);else{if(p)return Qt(v[i],v[i+1],I);a=Jt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function ue(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),he(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h<l.length;h++)l[h].done(function(){--u||a&&a()}).start(o,r)}function he(t,e,i,n,o,a,r){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?w(n[u])&&!c(n[u])?he(t,e?e+"."+u:u,i[u],n[u],o,a,r):(r?(s[u]=i[u],ce(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||r||ce(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function ce(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function de(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function fe(t){for(var e=0;t>=eb;)e|=1&t,t>>=1;return t+e}function pe(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;ge(t,e,o)}else for(;o<i&&n(t[o],t[o-1])>=0;)o++;return o-e}function ge(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}function me(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=a+1;var u=n-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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ve(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l<s&&a(t,e[i+o+l])>0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ye(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&a(t,e[i+o+l])>=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function xe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ye(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ve(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r<n;r++)u[r]=t[i+r];var l=0,h=o,c=i;if(t[c++]=t[h++],0!=--a)if(1!==n){for(var d,f,p,g=s;;){d=0,f=0,p=!1;do{if(e(t[h],u[l])<0){if(t[c++]=t[h++],f++,d=0,0==--a){p=!0;break}}else if(t[c++]=u[l++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=ye(t[h],u,l,n,0,e))){for(r=0;r<d;r++)t[c+r]=u[l+r];if(c+=d,l+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--a){p=!0;break}if(0!==(f=ve(u[l],t,h,a,0,e))){for(r=0;r<f;r++)t[c+r]=t[h+r];if(c+=f,h+=f,0===(a-=f)){p=!0;break}}if(t[c++]=u[l++],1==--n){p=!0;break}g--}while(d>=ib||f>=ib);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r<a;r++)t[c+r]=t[h+r];t[c+a]=u[l]}else{if(0===n)throw new Error;for(r=0;r<n;r++)t[c+r]=u[l+r]}}else{for(r=0;r<a;r++)t[c+r]=t[h+r];t[c+a]=u[l]}else for(r=0;r<n;r++)t[c+r]=u[l+r]}function o(i,n,o,a){var r=0;for(r=0;r<a;r++)u[r]=t[o+r];var l=i+n-1,h=a-1,c=o+a-1,d=0,f=0;if(t[c--]=t[l--],0!=--n)if(1!==a){for(var p=s;;){var g=0,m=0,v=!1;do{if(e(u[h],t[l])<0){if(t[c--]=t[l--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=u[h--],m++,g=0,1==--a){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!=(g=n-ye(u[h],t,i,n,n-1,e))){for(n-=g,f=(c-=g)+1,d=(l-=g)+1,r=g-1;r>=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ve(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r<m;r++)t[f+r]=u[d+r];if(a<=1){v=!0;break}}if(t[c--]=t[l--],0==--n){v=!0;break}p--}while(g>=ib||m>=ib);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r<a;r++)t[d+r]=u[r]}}else{for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r<a;r++)t[d+r]=u[r]}var a,r,s=ib,l=0,u=[];a=[],r=[],this.mergeRuns=function(){for(;l>1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]<r[t+1]&&t--,i(t)}},this.pushRun=function(t,e){a[l]=t,r[l]=e,l+=1}}function _e(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(o<2)){var a=0;if(o<eb)return a=pe(t,i,n,e),void me(t,i,n,i+a,e);var r=new xe(t,e),s=fe(o);do{if((a=pe(t,i,n,e))<s){var l=o;l>s&&(l=s),me(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function be(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Se(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function Me(){return!1}function Ie(t,e,i){var n=iw(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Te(t){if("string"==typeof t){var e=mb.get(t);return e&&e.image}return t}function Ae(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=mb.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Ce(e=a.image)&&a.pending.push(r):((e=new Image).onload=e.onerror=De,mb.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function De(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Ce(t){return t&&t.width&&t.height}function Le(t,e){var i=t+":"+(e=e||wb);if(vb[i])return vb[i];for(var n=(t+"").split("\n"),o=0,a=0,r=n.length;a<r;a++)o=Math.max(We(n[a],e).width,o);return yb>xb&&(yb=0,vb={}),yb++,vb[i]=o,o}function ke(t,e,i,n,o,a,r,s){return r?Ne(t,e,i,n,o,a,r,s):Pe(t,e,i,n,o,a,s)}function Pe(t,e,i,n,o,a,r){var s=He(t,e,o,a,r),l=Le(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new de(Oe(0,l,i),Ee(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}function Ne(t,e,i,n,o,a,r,s){var l=Ze(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new de(Oe(0,u,i),Ee(0,h,n),u,h)}function Oe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ee(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Re(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function ze(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Be(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=Ve(a[r],o);return a.join("\n")}function Be(t,e,i,n){(n=a({},n)).font=e;var i=A(i,"...");n.maxIterations=A(n.maxIterations,2);var o=n.minChar=A(n.minChar,0);n.cnCharWidth=Le("å½",e);var r=n.ascCharWidth=Le("a",e);n.placeholder=A(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<o&&s>=r;l++)s-=r;var u=Le(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ve(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Le(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ge(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Le(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ge(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function Fe(t){return Le("å½",t)}function We(t,e){return bb.measureText(t,e)}function He(t,e,i,n,o){null!=t&&(t+="");var a=A(n,Fe(e)),r=t?t.split("\n"):[],s=r.length*a,l=s;if(i&&(l+=i[0]+i[2]),t&&o){var u=o.outerHeight,h=o.outerWidth;if(null!=u&&l>u)t="",r=[];else if(null!=h)for(var c=Be(h-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),d=0,f=r.length;d<f;d++)r[d]=Ve(r[d],c)}return{lines:r,height:s,outerHeight:l,lineHeight:a}}function Ze(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=_b.lastIndex=0;null!=(n=_b.exec(t));){var a=n.index;a>o&&Ue(i,t.substring(o,a)),Ue(i,n[2],n[1]),o=_b.lastIndex}o<t.length&&Ue(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(L=0;L<r.length;L++){for(var p=r[L],g=0,m=0,v=0;v<p.tokens.length;v++){var y=(k=p.tokens[v]).styleName&&e.rich[k.styleName]||{},x=k.textPadding=y.textPadding,_=k.font=y.font||e.font,w=k.textHeight=A(y.textHeight,Fe(_));if(x&&(w+=x[0]+x[2]),k.height=w,k.lineHeight=D(y.textLineHeight,e.textLineHeight,w),k.textAlign=y&&y.textAlign||e.textAlign,k.textVerticalAlign=y&&y.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=Le(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Ce(I=Te(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&C<b&&(!S||C<T?(k.text="",k.textWidth=b=0):(k.text=ze(k.text,C-T,_,c.ellipsis,{minChar:c.minChar}),k.textWidth=Le(k.text,_),b=k.textWidth+T))}m+=k.width=b,y&&(g=Math.max(g,k.lineHeight))}p.width=m,p.lineHeight=g,s+=g,l=Math.max(l,m)}i.outerWidth=i.width=A(e.textWidth,l),i.outerHeight=i.height=A(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var L=0;L<u.length;L++){var k=u[L],P=k.percentWidth;k.width=parseInt(P,10)/100*l}return i}function Ue(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}function Xe(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&P(e)||t.textFont||t.font}function je(t,e){var i,n,o,a,r=e.x,s=e.y,l=e.width,u=e.height,h=e.r;l<0&&(r+=l,l=-l),u<0&&(s+=u,u=-u),"number"==typeof h?i=n=o=a=h:h instanceof Array?1===h.length?i=n=o=a=h[0]:2===h.length?(i=o=h[0],n=a=h[1]):3===h.length?(i=h[0],n=a=h[1],o=h[2]):(i=h[0],n=h[1],o=h[2],a=h[3]):i=n=o=a=0;var c;i+n>l&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ye(t){return qe(t),d(t.rich,qe),t}function qe(t){if(t){t.font=Xe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Mb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ib[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function Ke(t,e,i,n,o,a){n.rich?Je(t,e,i,n,o,a):$e(t,e,i,n,o,a)}function $e(t,e,i,n,o,a){var r,s=ii(n),l=!1,u=e.__attrCachedBy===rb.PLAIN_TEXT;a!==sb?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?rb.NONE:rb.PLAIN_TEXT):u&&(e.__attrCachedBy=rb.NONE);var h=n.font||Sb;l&&h===(r.font||Sb)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=He(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ai(g,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ti(e,n,o,x,_);var S=Ee(_,g,b),M=x,I=S;if(s||d){var T=Le(i,c);d&&(T+=d[1]+d[3]);var A=Oe(x,T,w);s&&ni(t,e,n,A,S,T,g),d&&(M=hi(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(B=0;B<Tb.length;B++){var D=Tb[B],C=D[0],L=D[1],k=n[C];l&&k===r[C]||(e[L]=ab(e,L,k||D[2]))}I+=v/2;var P=n.textStrokeWidth,N=l?r.textStrokeWidth:null,O=!l||P!==N,E=!l||O||n.textStroke!==r.textStroke,R=si(n.textStroke,P),z=li(n.textFill);if(R&&(O&&(e.lineWidth=P),E&&(e.strokeStyle=R)),z&&(l&&n.textFill===r.textFill||(e.fillStyle=z)),1===m.length)R&&e.strokeText(m[0],M,I),z&&e.fillText(m[0],M,I);else for(var B=0;B<m.length;B++)R&&e.strokeText(m[B],M,I),z&&e.fillText(m[B],M,I),I+=v}function Je(t,e,i,n,o,a){a!==sb&&(e.__attrCachedBy=rb.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=Ze(i,n)),Qe(t,e,r,n,o)}function Qe(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=ai(s,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ti(e,n,o,h,c);var p=Oe(h,r,d),g=Ee(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;ii(n)&&ni(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)ei(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;C>=0&&"right"===(_=b[C]).textAlign;)ei(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)ei(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function ti(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function ei(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&ii(l)&&ni(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=hi(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ri(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ri(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ri(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ri(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ri(e,"textAlign",s),ri(e,"textBaseline","middle"),ri(e,"font",i.font||Sb);var d=si(l.textStroke||n.textStroke,p),f=li(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ri(e,"lineWidth",p),ri(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ri(e,"fillStyle",f),e.fillText(i.text,r,h))}function ii(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ni(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ri(e,"shadowBlur",i.textBoxShadowBlur||0),ri(e,"shadowColor",i.textBoxShadowColor||"transparent"),ri(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ri(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?je(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ri(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(w(s)){var d=s.image;(d=Ae(d,null,t,oi,s))&&Ce(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ri(e,"lineWidth",l),ri(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function oi(t,e){e.image=t}function ai(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ui(s[0],i.width),o=i.y+ui(s[1],i.height);else{var l=Re(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ri(t,e,i){return t[e]=ab(t,e,i),t[e]}function si(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function hi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function di(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ub(t.style,this),this._rect=null,this.__clipPaths=[]}function fi(t){di.call(this,t)}function pi(t){return parseInt(t,10)}function gi(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function mi(t,e,i){return Cb.copy(t.getBoundingRect()),t.transform&&Cb.applyTransform(t.transform),Lb.width=e,Lb.height=i,!Cb.intersect(Lb)}function vi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}function yi(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function xi(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function _i(t){return"mousewheel"===t&&U_.browser.firefox?"DOMMouseScroll":t}function wi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function bi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Si(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(Ob,function(e){t._handlers[e]=m(zb[e],t)}),d(Rb,function(e){t._handlers[e]=m(zb[e],t)}),d(Nb,function(i){t._handlers[i]=e(zb[i],t)})}function Mi(t){function e(e,i){d(e,function(e){ht(t,_i(e),i._handlers[e])},i)}fw.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},Si(this),U_.pointerEventsSupported?e(Rb,this):(U_.touchEventsSupported&&e(Ob,this),e(Nb,this))}function Ii(t,e){var i=new Wb(H_(),t,e);return Fb[i.id]=i,i}function Ti(t,e){Gb[t]=e}function Ai(t){delete Fb[t]}function Di(t){return t instanceof Array?t:null==t?[]:[t]}function Ci(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Li(t){return!Ub(t)||Xb(t)||t instanceof Date?t:t.value}function ki(t){return Ub(t)&&!(t instanceof Array)}function Pi(t,e){e=(e||[]).slice();var i=f(t||[],function(t,e){return{exist:t}});return Zb(e,function(t,n){if(Ub(t)){for(o=0;o<i.length;o++)if(!i[o].option&&null!=t.id&&i[o].exist.id===t.id+"")return i[o].option=t,void(e[n]=null);for(var o=0;o<i.length;o++){var a=i[o].exist;if(!(i[o].option||null!=a.id&&null!=t.id||null==t.name||Ei(t)||Ei(a)||a.name!==t.name+""))return i[o].option=t,void(e[n]=null)}}}),Zb(e,function(t,e){if(Ub(t)){for(var n=0;n<i.length;n++){var o=i[n].exist;if(!i[n].option&&!Ei(o)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}}),i}function Ni(t){var e=R();Zb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Zb(t,function(t,i){var n=t.option;k(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Zb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ub(o)){if(a.name=null!=o.name?o.name+"":n?n.name:jb+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Oi(t){var e=t.name;return!(!e||!e.indexOf(jb))}function Ei(t){return Ub(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ri(t,e){function i(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Di(t[n].dataIndex),s=i&&i[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function n(t,e){var i=[];for(var o in t)if(t.hasOwnProperty(o)&&null!=t[o])if(e)i.push(+o);else{var a=n(t[o],!0);a.length&&i.push({seriesId:o,dataIndex:a})}return i}var o={},a={};return i(t||[],o),i(e||[],a,o),[n(o),n(a)]}function zi(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Bi(){var t="__\0ec_inner_"+qb+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Vi(t,e,i){if(_(e)){var n={};n[e+"Index"]=0,e=n}var o=i&&i.defaultMainType;!o||Gi(e,o+"Index")||Gi(e,o+"Id")||Gi(e,o+"Name")||(e[o+"Index"]=0);var a={};return Zb(e,function(n,o){var n=e[o];if("dataIndex"!==o&&"dataIndexInside"!==o){var r=o.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],u=(r[2]||"").toLowerCase();if(!(!s||!u||null==n||"index"===u&&"none"===n||i&&i.includeMainTypes&&l(i.includeMainTypes,s)<0)){var h={mainType:s};"index"===u&&"all"===n||(h[u]=n);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[o]=n}),a}function Gi(t,e){return t&&t.hasOwnProperty(e)}function Fi(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Wi(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Hi(t){return"auto"===t?U_.domSupported?"html":"richText":t||"html"}function Zi(t,e){var i=R(),n=[];return d(t,function(t){var o=e(t);(i.get(o)||(n.push(o),i.set(o,[]))).push(t)}),{keys:n,buckets:i}}function Ui(t){var e={main:"",sub:""};return t&&(t=t.split(Kb),e.main=t[0]||"",e.sub=t[1]||""),e}function Xi(t){k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ji(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.superCall=qi,i.superApply=Ki,u(i,this),i.superClass=e,i}}function Yi(t){var e=["__\0is_clz",Jb++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function qi(t,e){var i=C(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Ki(t,e,i){return this.superClass.prototype[e].apply(t,i)}function $i(t,e){function i(t){var e=n[t.main];return e&&e[$b]||((e=n[t.main]={})[$b]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){return e&&(Xi(e),(e=Ui(e)).sub?e.sub!==$b&&(i(e)[e.sub]=t):n[e.main]=t),t},t.getClass=function(t,e,i){var o=n[t];if(o&&o[$b]&&(o=e?o[e]:null),i&&!o)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){t=Ui(t);var e=[],i=n[t.main];return i&&i[$b]?d(i,function(t,i){i!==$b&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=Ui(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=Ui(t);var e=n[t.main];return e&&e[$b]},t.parseClassType=Ui,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t}function Ji(t){return t>-rS&&t<rS}function Qi(t){return t>rS||t<-rS}function tn(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function en(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function nn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ji(h)&&Ji(c))Ji(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(Ji(p)){var g=c/h,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=aS(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-oS(-y,uS):oS(y,uS))+(x=x<0?-oS(-x,uS):oS(x,uS))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*aS(h*h*h)),w=Math.acos(_)/3,b=aS(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),m=(-s+b*(S+lS*Math.sin(w)))/(3*r),I=(-s+b*(S-lS*Math.sin(w)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function on(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ji(r))Qi(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if(Ji(u))o[0]=-a/(2*r);else if(u>0){var h=aS(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function an(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function rn(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;hS[0]=l,hS[1]=u;for(var y=0;y<1;y+=.05)cS[0]=tn(t,i,o,r,y),cS[1]=tn(e,n,a,s,y),(p=hw(hS,cS))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<sS);x++)d=c-m,f=c+m,cS[0]=tn(t,i,o,r,d),cS[1]=tn(e,n,a,s,d),p=hw(cS,hS),d>=0&&p<v?(c=d,v=p):(dS[0]=tn(t,i,o,r,f),dS[1]=tn(e,n,a,s,f),g=hw(dS,hS),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=tn(t,i,o,r,c),h[1]=tn(e,n,a,s,c)),aS(v)}function sn(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ln(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function un(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ji(a))Qi(r)&&(c=-s/r)>=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if(Ji(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=aS(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function hn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function cn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function dn(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;hS[0]=r,hS[1]=s;for(var d=0;d<1;d+=.05)cS[0]=sn(t,i,o,d),cS[1]=sn(e,n,a,d),(m=hw(hS,cS))<c&&(u=d,c=m);c=1/0;for(var f=0;f<32&&!(h<sS);f++){var p=u-h,g=u+h;cS[0]=sn(t,i,o,p),cS[1]=sn(e,n,a,p);var m=hw(cS,hS);if(p>=0&&m<c)u=p,c=m;else{dS[0]=sn(t,i,o,g),dS[1]=sn(e,n,a,g);var v=hw(dS,hS);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=sn(t,i,o,u),l[1]=sn(e,n,a,u)),aS(c)}function fn(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)o=t[n],a=fS(a,o[0]),r=pS(r,o[0]),s=fS(s,o[1]),l=pS(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function pn(t,e,i,n,o,a){o[0]=fS(t,i),o[1]=fS(e,n),a[0]=pS(t,i),a[1]=pS(e,n)}function gn(t,e,i,n,o,a,r,s,l,u){var h,c=on,d=tn,f=c(t,i,o,r,wS);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,o,r,wS[h]);l[0]=fS(p,l[0]),u[0]=pS(p,u[0])}for(f=c(e,n,a,s,bS),h=0;h<f;h++){var g=d(e,n,a,s,bS[h]);l[1]=fS(g,l[1]),u[1]=pS(g,u[1])}l[0]=fS(t,l[0]),u[0]=pS(t,u[0]),l[0]=fS(r,l[0]),u[0]=pS(r,u[0]),l[1]=fS(e,l[1]),u[1]=pS(e,u[1]),l[1]=fS(s,l[1]),u[1]=pS(s,u[1])}function mn(t,e,i,n,o,a,r,s){var l=hn,u=sn,h=pS(fS(l(t,i,o),1),0),c=pS(fS(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c);r[0]=fS(t,o,d),r[1]=fS(e,a,f),s[0]=pS(t,o,d),s[1]=pS(e,a,f)}function vn(t,e,i,n,o,a,r,s,l){var u=tt,h=et,c=Math.abs(o-a);if(c%vS<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(yS[0]=mS(o)*i+t,yS[1]=gS(o)*n+e,xS[0]=mS(a)*i+t,xS[1]=gS(a)*n+e,u(s,yS,xS),h(l,yS,xS),(o%=vS)<0&&(o+=vS),(a%=vS)<0&&(a+=vS),o>a&&!r?a+=vS:o<a&&r&&(o+=vS),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)f>o&&(_S[0]=mS(f)*i+t,_S[1]=gS(f)*n+e,u(s,_S,s),h(l,_S,l))}function yn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||r<e-s&&r<n-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var h=(l=(e-n)/(t-i))*a-r+(u=(t*n-i*e)/(t-i));return h*h/(l*l+1)<=s/2*s/2}function xn(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>n+c&&h>a+c&&h>s+c||h<e-c&&h<n-c&&h<a-c&&h<s-c||u>t+c&&u>i+c&&u>o+c&&u>r+c||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&rn(t,e,i,n,o,a,r,s,u,h,null)<=c/2}function _n(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>i+u&&s>o+u||s<t-u&&s<i-u&&s<o-u)&&dn(t,e,i,n,o,a,s,l,null)<=u/2}function wn(t){return(t%=RS)<0&&(t+=RS),t}function bn(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||h+u<i)return!1;if(Math.abs(n-o)%zS<1e-4)return!0;if(a){var c=n;n=wn(o),o=wn(c)}else n=wn(n),o=wn(o);n>o&&(o+=zS);var d=Math.atan2(l,s);return d<0&&(d+=zS),d>=n&&d<=o||d+zS>=n&&d+zS<=o}function Sn(t,e,i,n,o,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(r=n<e?.5:-.5);var l=s*(i-t)+t;return l===o?1/0:l>o?r:0}function Mn(t,e){return Math.abs(t-e)<GS}function In(){var t=WS[0];WS[0]=WS[1],WS[1]=t}function Tn(t,e,i,n,o,a,r,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var h=nn(e,n,a,s,u,FS);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;g<h;g++){var m=FS[g],v=0===m||1===m?.5:1;tn(t,i,o,r,m)<l||(p<0&&(p=on(e,n,a,s,WS),WS[1]<WS[0]&&p>1&&In(),c=tn(e,n,a,s,WS[0]),p>1&&(d=tn(e,n,a,s,WS[1]))),2===p?m<WS[0]?f+=c<e?v:-v:m<WS[1]?f+=d<c?v:-v:f+=s<d?v:-v:m<WS[0]?f+=c<e?v:-v:f+=s<c?v:-v)}return f}function An(t,e,i,n,o,a,r,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=un(e,n,a,s,FS);if(0===l)return 0;var u=hn(e,n,a);if(u>=0&&u<=1){for(var h=0,c=sn(e,n,a,u),d=0;d<l;d++){f=0===FS[d]||1===FS[d]?.5:1;(p=sn(t,i,o,FS[d]))<r||(FS[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}var f=0===FS[0]||1===FS[0]?.5:1,p=sn(t,i,o,FS[0]);return p<r?0:a<e?f:-f}function Dn(t,e,i,n,o,a,r,s){if((s-=e)>i||s<-i)return 0;u=Math.sqrt(i*i-s*s);FS[0]=-u,FS[1]=u;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%VS<1e-4){n=0,o=VS;p=a?1:-1;return r>=FS[0]+t&&r<=FS[1]+t?p:0}if(a){var u=n;n=wn(o),o=wn(u)}else n=wn(n),o=wn(o);n>o&&(o+=VS);for(var h=0,c=0;c<2;c++){var d=FS[c];if(d+t>r){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=VS+f),(f>=n&&f<=o||f+VS>=n&&f+VS<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function Cn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===BS.M&&h>1&&(i||(a+=Sn(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case BS.M:r=l=t[h++],s=u=t[h++];break;case BS.L:if(i){if(yn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=Sn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.C:if(i){if(xn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Tn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.Q:if(i){if(_n(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=An(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?a+=Sn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(bn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=Dn(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case BS.R:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(yn(l,u,x,u,e,n,o)||yn(x,u,x,_,e,n,o)||yn(x,_,l,_,e,n,o)||yn(l,_,l,u,e,n,o))return!0}else a+=Sn(x,u,x,_,n,o),a+=Sn(l,_,l,u,n,o);break;case BS.Z:if(i){if(yn(r,s,l,u,e,n,o))return!0}else a+=Sn(r,s,l,u,n,o);r=l,s=u}}return i||Mn(s,u)||(a+=Sn(r,s,l,u,n,o)||0),0!==a}function Ln(t,e,i){return Cn(t,0,!1,e,i)}function kn(t,e,i,n){return Cn(t,e,!0,i,n)}function Pn(t){di.call(this,t),this.path=null}function Nn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(tM/180),d=QS(c)*(t-i)/2+JS(c)*(e-n)/2,f=-1*JS(c)*(t-i)/2+QS(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=$S(p),s*=$S(p));var g=(o===a?-1:1)*$S((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+QS(c)*m-JS(c)*v,x=(e+n)/2+JS(c)*m+QS(c)*v,_=nM([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=nM(w,b);iM(w,b)<=-1&&(S=tM),iM(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*tM),1===a&&S<0&&(S+=2*tM),h.addData(u,y,x,r,s,_,S,c,a)}function On(t){if(!t)return new ES;for(var e,i=0,n=0,o=i,a=n,r=new ES,s=ES.CMD,l=t.match(oM),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(aM)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Nn(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Nn(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),i=o,n=a),e=h}return r.toStatic(),r}function En(t,e){var i=On(t);return e=e||{},e.buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){KS(i,t),this.dirty(!0)},e}function Rn(t,e){return new Pn(En(t,e))}function zn(t,e){return Pn.extend(En(t,e))}function Bn(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Vn(t,e,i){var n=e.points,o=e.smooth;if(n&&n.length>=2){if(o&&"spline"!==o){var a=fM(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=dM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Gn(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x1,a=e.x2,r=e.y1,s=e.y2;mM(2*o)===mM(2*a)?t.x1=t.x2=Wn(o,n,!0):(t.x1=o,t.x2=a),mM(2*r)===mM(2*s)?t.y1=t.y2=Wn(r,n,!0):(t.y1=r,t.y2=s)}}function Fn(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x,a=e.y,r=e.width,s=e.height;t.x=Wn(o,n,!0),t.y=Wn(a,n,!0),t.width=Math.max(Wn(o+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(Wn(a+s,n,!1)-t.y,0===s?0:1)}}function Wn(t,e,i){var n=mM(2*t);return(n+mM(e))%2==0?n/2:(n+(i?1:-1))/2}function Hn(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?en:tn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?en:tn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ln:sn)(t.x1,t.cpx1,t.x2,e),(i?ln:sn)(t.y1,t.cpy1,t.y2,e)]}function Zn(t){di.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Un(t){return Pn.extend(t)}function Xn(t,e,i,n){var o=Rn(t,e);return i&&("center"===n&&(i=Yn(i,o.getBoundingRect())),qn(o,i)),o}function jn(t,e,i){var n=new fi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var o={width:t.width,height:t.height};n.setStyle(Yn(e,o))}}});return n}function Yn(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}function qn(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Kn(t){var e=t.shape,i=t.style.lineWidth;return CM(2*e.x1)===CM(2*e.x2)&&(e.x1=e.x2=Jn(e.x1,i,!0)),CM(2*e.y1)===CM(2*e.y2)&&(e.y1=e.y2=Jn(e.y1,i,!0)),t}function $n(t){var e=t.shape,i=t.style.lineWidth,n=e.x,o=e.y,a=e.width,r=e.height;return e.x=Jn(e.x,i,!0),e.y=Jn(e.y,i,!0),e.width=Math.max(Jn(n+a,i,!1)-e.x,0===a?0:1),e.height=Math.max(Jn(o+r,i,!1)-e.y,0===r?0:1),t}function Jn(t,e,i){var n=CM(2*t);return(n+CM(e))%2==0?n/2:(n+(i?1:-1))/2}function Qn(t){return null!=t&&"none"!==t}function to(t){if("string"!=typeof t)return t;var e=EM.get(t);return e||(e=Ht(t,-.1),RM<1e4&&(EM.set(t,e),RM++)),e}function eo(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}function io(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.useHoverLayer;t.__highlighted=i?"layer":"plain";var n=t.__zr;if(n||!i){var o=t,a=t.style;i&&(a=(o=n.addHover(t)).style),bo(a),i||eo(o),a.extendFrom(e),no(a,e,"fill"),no(a,e,"stroke"),wo(a),i||(t.dirty(!1),t.z2+=NM)}}}function no(t,e,i){!Qn(e[i])&&Qn(t[i])&&(t[i]=to(t[i]))}function oo(t){var e=t.__highlighted;if(e)if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removeHover(t);else if(e){var i=t.style,n=t.__cachedNormalStl;n&&(bo(i),t.setStyle(n),wo(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o===NM&&(t.z2=o)}}function ao(t,e){t.isGroup?t.traverse(function(t){!t.isGroup&&e(t)}):e(t)}function ro(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,oo(t),io(t))}function so(t){return t&&t.__isEmphasisEntered}function lo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&ao(this,io)}function uo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&ao(this,oo)}function ho(){this.__isEmphasisEntered=!0,ao(this,io)}function co(){this.__isEmphasisEntered=!1,ao(this,oo)}function fo(t,e,i){t.isGroup?t.traverse(function(t){!t.isGroup&&ro(t,t.hoverStyle||e)}):ro(t,t.hoverStyle||e),po(t,i)}function po(t,e){var i=!1===e;if(t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,!i||t.__hoverStyleTrigger){var n=i?"off":"on";t[n]("mouseover",lo)[n]("mouseout",uo),t[n]("emphasis",ho)[n]("normal",co),t.__hoverStyleTrigger=!i}}function go(t,e,i,n,o,a,r){var s,l=(o=o||PM).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=x(o.defaultText)?o.defaultText(u,o):o.defaultText));var f=c?s:null,p=d?A(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==f&&null==p||(mo(t,i,a,o),mo(e,n,r,o,!0)),t.text=f,e.text=p}function mo(t,e,i,n,o){return vo(t,e,n,o),i&&a(t,i),t}function vo(t,e,i,n){if((i=i||PM).isRectText){var o=e.getShallow("position")||(n?null:"inside");"outside"===o&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=A(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=yo(e);if(u){r={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);xo(r[h]={},c,l,i,n)}}return t.rich=r,xo(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function yo(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||PM).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function xo(t,e,i,n,o,a){i=!o&&i||PM,t.textFill=_o(e.getShallow("color"),n)||i.color,t.textStroke=_o(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=A(e.getShallow("textBorderWidth"),i.textBorderWidth),t.insideRawTextPosition=t.textPosition,o||(a&&(t.insideRollbackOpt=n,wo(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=_o(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=_o(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function _o(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function wo(t){var e=t.insideRollbackOpt;if(e&&null==t.textFill){var i,n=e.useInsideStyle,o=t.insideRawTextPosition,a=e.autoColor;!1!==n&&(!0===n||e.isRectText&&o&&"string"==typeof o&&o.indexOf("inside")>=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function bo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function So(t,e){var i=e||e.getModel("textStyle");return P([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Mo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Io(t,e,i,n,o){Mo(!0,t,e,i,n,o)}function To(t,e,i,n,o){Mo(!1,t,e,i,n,o)}function Ao(t,e){for(var i=_t([]);t&&t!==e;)bt(i,t.getLocalTransform(),i),t=t.parent;return i}function Do(t,e,i){return e&&!c(e)&&(e=Tw.getLocalTransform(e)),i&&(e=Tt([],e)),Q([],t,e)}function Co(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Do(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lo(t,e,i,n){function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Io(t,n,i,t.dataIndex)}}})}}function ko(t,e){return f(t,function(t){var i=t[0];i=LM(i,e.x),i=kM(i,e.x+e.width);var n=t[1];return n=LM(n,e.y),n=kM(n,e.y+e.height),[i,n]})}function Po(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new fi(e)):Xn(t.replace("path://",""),e,i,"center")}function No(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Oo(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function Eo(t,e){var i=HM(t).getParent;return i?i.call(t,e):t.parentModel}function Ro(t){return[t||"",ZM++,Math.random().toFixed(5)].join("_")}function zo(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Bo(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0===o)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(o>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Vo(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?zo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Go(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Fo(t){return t.sort(function(t,e){return t-e}),t}function Wo(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ho(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Zo(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Uo(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,g=u.length;d<g;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Xo(t){var e=2*Math.PI;return(t%e+e)%e}function jo(t){return t>-UM&&t<UM}function Yo(t){if(t instanceof Date)return t;if("string"==typeof t){var e=jM.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function qo(t){return Math.pow(10,Ko(t))}function Ko(t){return Math.floor(Math.log(t)/Math.LN10)}function $o(t,e){var i,n=Ko(t),o=Math.pow(10,n),a=t/o;return i=e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10,t=i*o,n>=-20?+t.toFixed(n<0?-n:0):t}function Jo(t){function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]==(n?-1:1)||!n&&e(t,i,1))}t.sort(function(t,i){return e(t,i,0)?-1:1});for(var i=-1/0,n=1,o=0;o<t.length;){for(var a=t[o].interval,r=t[o].close,s=0;s<2;s++)a[s]<=i&&(a[s]=i,r[s]=s?1:1-n),i=a[s],n=r[s];a[0]===a[1]&&r[0]*r[1]!=1?t.splice(o,1):o++}return t}function Qo(t){return t-parseFloat(t)>=0}function ta(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ea(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function ia(t){return null==t?"":(t+"").replace(KM,function(t,e){return $M[e]})}function na(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=JM[a];t=t.replace(QM(r),QM(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(QM(JM[l],s),i?ia(u):u)}return t}function oa(t,e,i){return d(e,function(e,n){t=t.replace("{"+n+"}",i?ia(e):e)}),t}function aa(t,e){var i=(t=_(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,e=t.extraCssText,o=t.renderMode||"html",a=t.markerId||"X";return i?"html"===o?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ia(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+ia(i)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function ra(t,e){return t+="","0000".substr(0,e-t.length)+t}function sa(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yo(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",ra(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",ra(s,2)).replace("d",s).replace("hh",ra(l,2)).replace("h",l).replace("mm",ra(u,2)).replace("m",u).replace("ss",ra(h,2)).replace("s",h).replace("SSS",ra(c,3))}function la(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ua(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function ha(t,e,i){var n=e.width,o=e.height,a=Vo(t.x,n),r=Vo(t.y,o),s=Vo(t.x2,n),l=Vo(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=qM(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function ca(t,e,i){i=qM(i||0);var n=e.width,o=e.height,a=Vo(t.left,n),r=Vo(t.top,o),s=Vo(t.right,n),l=Vo(t.bottom,o),u=Vo(t.width,n),h=Vo(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/o?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new de(a+i[3],r+i[0],u,h);return p.margin=i,p}function da(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new de(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=ca(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function fa(t,e){return null!=t[oI[e][0]]||null!=t[oI[e][1]]&&null!=t[oI[e][2]]}function pa(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(iI(i,function(e){u[e]=t[e]}),iI(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;c<i.length;c++){var d=i[c];if(!o(r,d)&&o(t,d)){r[d]=t[d];break}}return r}return u}function o(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function r(t,e,i){iI(t,function(t){e[t]=i[t]})}!w(i)&&(i={});var s=i.ignoreSize;!y(s)&&(s=[s,s]);var l=n(oI[0],0),u=n(oI[1],1);r(oI[0],t,l),r(oI[1],t,u)}function ga(t){return ma({},t)}function ma(t,e){return e&&t&&iI(nI,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function va(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}function ya(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},n=fI[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function xa(t){return"category"===t.get("type")}function _a(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===vI?{}:[]),this.sourceFormat=t.sourceFormat||yI,this.seriesLayoutBy=t.seriesLayoutBy||_I,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function wa(t){var e=t.option.source,i=yI;if(S(e))i=xI;else if(y(e)){0===e.length&&(i=gI);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(y(a)){i=gI;break}if(w(a)){i=mI;break}}}}else if(w(e)){for(var r in e)if(e.hasOwnProperty(r)&&c(e[r])){i=vI;break}}else if(null!=e)throw new Error("Invalid data");bI(t).sourceFormat=i}function ba(t){return bI(t).source}function Sa(t){bI(t).datasetMap=R()}function Ma(t){var e=t.option,i=e.data,n=S(i)?xI:pI,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=La(t);if(l){var u=l.option;i=u.source,n=bI(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=Ia(i,n,a,r,s),c=e.encode;!c&&l&&(c=Ca(t,l,i,n,a,h)),bI(t).source=new _a({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function Ia(t,e,i,n,o){if(!t)return{dimensionsDefine:Ta(o)};var a,r,s;if(e===gI)"auto"===n||null==n?Aa(function(t){null!=t&&"-"!==t&&(_(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Aa(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===wI?t.length:t[0]?t[0].length:null;else if(e===mI)o||(o=Da(t),s=!0);else if(e===vI)o||(o=[],s=!0,d(t,function(t,e){o.push(e)}));else if(e===pI){var l=Li(t[0]);a=y(l)&&l.length||1}var u;return s&&d(o,function(t,e){"name"===(w(t)?t.name:t)&&(u=e)}),{startIndex:r,dimensionsDefine:Ta(o),dimensionsDetectCount:a,potentialNameDimIndex:u}}function Ta(t){if(t){var e=R();return f(t,function(t,i){if(null==(t=a({},w(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Aa(t,e,i,n){if(null==n&&(n=1/0),e===wI)for(a=0;a<i.length&&a<n;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;a<o.length&&a<n;a++)t(o[a],a)}function Da(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return d(e,function(t,e){n.push(e)}),n}}function Ca(t,e,i,n,o,a){var r=ya(t),s={},l=[],u=[],h=t.subType,c=R(["pie","map","funnel"]),f=R(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(r&&null!=f.get(h)){var p=t.ecModel,g=bI(p).datasetMap,m=e.uid+"_"+o,v=g.get(m)||g.set(m,{categoryWayDim:1,valueWayDim:0});d(r.coordSysDims,function(t){if(null==r.firstCategoryDimIndex){e=v.valueWayDim++;s[t]=e,u.push(e)}else if(r.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=v.categoryWayDim++;s[t]=e,u.push(e)}})}else if(null!=c.get(h)){for(var y,x=0;x<5&&null==y;x++)Pa(i,n,o,a.dimensionsDefine,a.startIndex,x)||(y=x);if(null!=y){s.value=y;var _=a.potentialNameDimIndex||Math.max(y-1,0);u.push(_),l.push(_)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function La(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function ka(t,e){return Pa(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Pa(t,e,i,n,o,a){function r(t){return(null==t||!isFinite(t)||""===t)&&(!(!_(t)||"-"===t)||void 0)}var s;if(S(t))return!1;var l;if(n&&(l=w(l=n[a])?l.name:l),e===gI)if(i===wI){for(var u=t[a],h=0;h<(u||[]).length&&h<5;h++)if(null!=(s=r(u[o+h])))return s}else for(h=0;h<t.length&&h<5;h++){var c=t[o+h];if(c&&null!=(s=r(c[a])))return s}else if(e===mI){if(!l)return;for(h=0;h<t.length&&h<5;h++)if((d=t[h])&&null!=(s=r(d[l])))return s}else if(e===vI){if(!l)return;if(!(u=t[l])||S(u))return!1;for(h=0;h<u.length&&h<5;h++)if(null!=(s=r(u[h])))return s}else if(e===pI)for(h=0;h<t.length&&h<5;h++){var d=t[h],f=Li(d);if(!y(f))return!1;if(null!=(s=r(f[a])))return s}return!1}function Na(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}function Oa(t,e){var o=t.color&&!t.colorLayer;d(e,function(e,a){"colorLayer"===a&&o||lI.hasClass(a)||("object"==typeof e?t[a]=t[a]?n(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function Ea(t){t=t,this.option={},this.option[SI]=1,this._componentsMap=R({series:[]}),this._seriesIndices,this._seriesIndicesMap,Oa(t,this._theme.option),n(t,hI,!1),this.mergeOption(t)}function Ra(t,e){y(e)||(e=e?[e]:[]);var i={};return d(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function za(t,e,i){return e.type?e.type:i?i.subType:lI.determineSubType(t,e)}function Ba(t,e){t._seriesIndicesMap=R(t._seriesIndices=f(e,function(t){return t.componentIndex})||[])}function Va(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function Ga(t){d(II,function(e){this[e]=m(t[e],t)},this)}function Fa(){this._coordinateSystems=[]}function Wa(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Ha(t,e,i){var n,o,a=[],r=[],s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;AI(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return o||(o=t),o.timeline||(o.timeline=s),AI([o].concat(a).concat(f(r,function(t){return t.option})),function(t){AI(e,function(e){e(t,i)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:r}}function Za(t,e,i){var n={width:e,height:i,aspectratio:e/i},o=!0;return d(t,function(t,e){var i=e.match(kI);if(i&&i[1]&&i[2]){var a=i[1],r=i[2].toLowerCase();Ua(n[r],t,a)||(o=!1)}}),o}function Ua(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e}function Xa(t,e){return t.join(",")===e.join(",")}function ja(t,e){AI(e=e||{},function(e,i){if(null!=e){var n=t[i];if(lI.hasClass(i)){e=Di(e);var o=Pi(n=Di(n),e);t[i]=CI(o,function(t){return t.option&&t.exist?LI(t.exist,t.option,!0):t.exist||t.option})}else t[i]=LI(n,e,!0)}})}function Ya(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=OI.length;i<o;i++){var a=OI[i],r=e.normal,s=e.emphasis;r&&r[a]&&(t[a]=t[a]||{},t[a].normal?n(t[a].normal,r[a]):t[a].normal=r[a],r[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?n(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function qa(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,r(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function Ka(t){qa(t,"itemStyle"),qa(t,"lineStyle"),qa(t,"areaStyle"),qa(t,"label"),qa(t,"labelLine"),qa(t,"upperLabel"),qa(t,"edgeLabel")}function $a(t,e){var i=NI(t)&&t[e],n=NI(i)&&i.textStyle;if(n)for(var o=0,a=Yb.length;o<a;o++){var e=Yb[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Ja(t){t&&(Ka(t),$a(t,"label"),t.emphasis&&$a(t.emphasis,"label"))}function Qa(t){if(NI(t)){Ya(t),Ka(t),$a(t,"label"),$a(t,"upperLabel"),$a(t,"edgeLabel"),t.emphasis&&($a(t.emphasis,"label"),$a(t.emphasis,"upperLabel"),$a(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Ya(e),Ja(e));var i=t.markLine;i&&(Ya(i),Ja(i));var n=t.markArea;n&&Ja(n);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!S(a))for(s=0;s<a.length;s++)Ja(a[s]);d(t.categories,function(t){Ka(t)})}if(o&&!S(o))for(s=0;s<o.length;s++)Ja(o[s]);if((e=t.markPoint)&&e.data)for(var r=e.data,s=0;s<r.length;s++)Ja(r[s]);if((i=t.markLine)&&i.data)for(var l=i.data,s=0;s<l.length;s++)y(l[s])?(Ja(l[s][0]),Ja(l[s][1])):Ja(l[s]);"gauge"===t.type?($a(t,"axisLabel"),$a(t,"title"),$a(t,"detail")):"treemap"===t.type?(qa(t.breadcrumb,"itemStyle"),d(t.levels,function(t){Ka(t)})):"tree"===t.type&&Ka(t.leaves)}}function tr(t){return y(t)?t:t?[t]:[]}function er(t){return(y(t)?t[0]:t)||{}}function ir(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}function nr(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];(n||null==a[e[r]])&&(a[e[r]]=i)}function or(t){d(RI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function ar(t){d(t,function(e,i){var n=[],o=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],r=e.data,s=e.isStackedByIndex,l=r.map(a,function(a,l,u){var h=r.get(e.stackedDimension,u);if(isNaN(h))return o;var c,d;s?d=r.getRawIndex(u):c=r.get(e.stackedByDimension,u);for(var f=NaN,p=i-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function rr(t,e){_a.isInstance(t)||(t=_a.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===xI&&(this._offset=0,this._dimSize=e,this._data=i),a(this,GI[n===gI?n+"_"+t.seriesLayoutBy:n])}function sr(){return this._data.length}function lr(t){return this._data[t]}function ur(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function hr(t,e,i,n){return null!=i?t[i]:t}function cr(t,e,i,n){return dr(t[n],this._dimensionInfos[e])}function dr(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Yo(t)),null==t||""===t?NaN:+t}function fr(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),FI[r](n,e,a,o)}}}function pr(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===pI||n===mI){var o=t.getRawDataItem(e);return n!==pI||w(o)||(o=null),o?o[i]:void 0}}}function gr(t){return new mr(t)}function mr(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function vr(t,e,i,n,o,a){XI.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:XI.next},t.context)}function yr(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var i,n;!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),y(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}function xr(t){var e=t.name;Oi(t)||(t.name=_r(t)||e)}function _r(t){var e=t.getRawData(),i=[];return d(e.mapDimension("seriesName",!0),function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function wr(t){return t.model.getRawData().count()}function br(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Sr}function Sr(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Mr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Ir,e))})}function Ir(t){var e=Tr(t);e&&e.setOutputEnd(this.count())}function Tr(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}function Ar(){this.group=new tb,this.uid=Ro("viewChart"),this.renderTask=gr({plan:Lr,reset:kr}),this.renderTask.context={view:this}}function Dr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)Dr(t.childAt(i),e)}function Cr(t,e,i){var n=zi(t,e);null!=n?d(Di(n),function(e){Dr(t.getItemGraphicEl(e),i)}):t.eachItemGraphicEl(function(t){Dr(t,i)})}function Lr(t){return QI(t.model)}function kr(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&JI(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),eT[l]}function Pr(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}var o,a,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){o=(new Date).getTime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,a=o-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):a>=0?n():c=setTimeout(n,-a),u=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Nr(t,e,i,n){var o=t[e];if(o){var a=o[iT]||o,r=o[oT];if(o[nT]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Pr(a,i,"debounce"===n))[iT]=a,o[oT]=n,o[nT]=i}return o}}function Or(t,e){var i=t[e];i&&i[iT]&&(t[e]=i[iT])}function Er(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=R()}function Rr(t,e,i,n,o){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),hT(h,n);var f=t.getPerformArgs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),hT(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function zr(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,gr({plan:Hr,reset:Zr,count:Xr}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},jr(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,o).each(a);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Br(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,gr({reset:Gr,onDirty:Wr})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,jr(t,e,n)}var r=i.overallTask=i.overallTask||gr({reset:Vr});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||R(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,d(n.getSeries(),a));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Vr(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gr(t,e){return t.overallProgress&&Fr}function Fr(){this.agent.dirty(),this.getDownstream().dirty()}function Wr(){this.agent&&this.agent.dirty()}function Hr(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zr(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Di(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Ur(e)}):cT}function Ur(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a<e.end;a++)o.dataEach(n,a);else o&&o.progress&&o.progress(e,n)}}function Xr(t){return t.data.count()}function jr(t,e,i){var n=e.uid,o=t._pipelineMap.get(n);!o.head&&(o.head=i),o.tail&&o.tail.pipe(i),o.tail=i,i.__idxInPipeline=o.count++,i.__pipeline=o}function Yr(t){dT=null;try{t(fT,pT)}catch(t){}return dT}function qr(t,e){for(var i in e.prototype)t[i]=B}function Kr(t){for(_(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function $r(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Jr(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}function Qr(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),r(e.__inheritedStyle,t.__inheritedStyle))}function ts(t){for(var e=P(t).split(_T),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}function es(t,e,i,n){var o=e.__inheritedStyle||{},r="text"===e.type;if(1===t.nodeType&&(ns(t,e),a(o,os(t)),!n))for(var s in ST)if(ST.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(o[ST[s]]=l)}var u=r?"textFill":"fill",h=r?"textStroke":"stroke";e.style=e.style||new ub;var c=e.style;null!=o.fill&&c.set(u,is(o.fill,i)),null!=o.stroke&&c.set(h,is(o.stroke,i)),d(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&r?"textStrokeWidth":t;null!=o[t]&&c.set(e,parseFloat(o[t]))}),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),d(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=o[t]&&c.set(t,o[t])}),o.lineDash&&(e.style.lineDash=P(o.lineDash).split(_T)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=o}function is(t,e){var i=e&&t&&t.match(MT);return i?e[P(i[1])]:t}function ns(t,e){var i=t.getAttribute("transform");if(i){var n=null,o=[];(i=i.replace(/,/g," ")).replace(IT,function(t,e,i){o.push(e,i)});for(var a=o.length-1;a>0;a-=2){var r=o[a],s=o[a-1];switch(n=n||xt(),s){case"translate":r=P(r).split(_T),St(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=P(r).split(_T),It(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=P(r).split(_T),Mt(n,n,parseFloat(r[0]));break;case"skew":r=P(r).split(_T),console.warn("Skew transform is not supported yet");break;case"matrix":r=P(r).split(_T);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function os(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};TT.lastIndex=0;for(var o;null!=(o=TT.exec(e));)n[o[1]]=o[2];for(var a in ST)ST.hasOwnProperty(a)&&null!=n[a]&&(i[ST[a]]=n[a]);return i}function as(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function rs(t,e){return(new $r).parse(t,e)}function ss(t){return function(e,i,n){e=e&&e.toLowerCase(),fw.prototype[t].call(this,e,i,n)}}function ls(){fw.call(this)}function us(t,e,n){function o(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=JT[e]),this.id,this.group,this._dom=t;var a=this._zr=Ii(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Pr(m(a.flush,a),17),(e=i(e))&&BI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Fa;var r=this._api=As(this);_e($T,o),_e(YT,o),this._scheduler=new Er(this,r,YT,$T),fw.call(this,this._ecEventProcessor=new Ds),this._messageCenter=new ls,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),vs(a,this),N(this)}function hs(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Vi(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}function cs(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),ys(t,"component",e,i),ys(t,"chart",e,i),i.plan()}function ds(t,e,i,n,o){function a(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}var r=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};o&&(l.subType=o);var u=i.excludeSeriesId;null!=u&&(u=R(Di(u))),r&&r.eachComponent(l,function(e){u&&null!=u.get(e.id)||a(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else kT(t._componentsViews.concat(t._chartsViews),a)}function fs(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function ps(t,e){var i=t.type,n=t.escapeConnect,o=XT[i],s=o.actionInfo,l=(s.update||"update").split(":"),u=l.pop();l=null!=l[0]&&OT(l[0]),this[GT]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=f(t.batch,function(e){return e=r(a({},e),t),e.batch=null,e}));var d,p=[],g="highlight"===i||"downplay"===i;kT(h,function(t){d=o.action(t,this._model,this._api),(d=d||a({},t)).type=s.event||d.type,p.push(d),g?ds(this,u,t,"series"):l&&ds(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[FT]?(cs(this),ZT.update.call(this,t),this[FT]=!1):ZT[u].call(this,t)),d=c?{type:s.event||i,escapeConnect:n,batch:p}:p[0],this[GT]=!1,!e&&this._messageCenter.trigger(d.type,d)}function gs(t){for(var e=this._pendingActions;e.length;){var i=e.shift();ps.call(this,i,t)}}function ms(t){!t&&this.trigger("updated")}function vs(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[FT]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function ys(t,e,i,n){function o(t){var e="_ec_"+t.id+"_"+t.type,o=s[e];if(!o){var h=OT(t.type);(o=new(a?qI.getClass(h.main,h.sub):Ar.getClass(h.sub))).init(i,u),s[e]=o,r.push(o),l.add(o.group)}t.__viewId=o.__id=e,o.__alive=!0,o.__model=t,o.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!a&&n.prepareView(o,t,i,u)}for(var a="component"===e,r=a?t._componentsViews:t._chartsViews,s=a?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<r.length;h++)r[h].__alive=!1;a?i.eachComponent(function(t,e){"series"!==t&&o(e)}):i.eachSeries(o);for(h=0;h<r.length;){var c=r[h];c.__alive?h++:(!a&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,u),r.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function xs(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function _s(t,e,i,n){ws(t,e,i,n),kT(t._chartsViews,function(t){t.__alive=!1}),bs(t,e,i,n),kT(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function ws(t,e,i,n,o){kT(o||t._componentsViews,function(t){var o=t.__model;t.render(o,e,i,n),Ts(o,t)})}function bs(t,e,i,n,o){var a,r=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;r.updatePayload(s,n),o&&o.get(e.uid)&&s.dirty(),a|=s.perform(r.getPerformArgs(s)),i.group.silent=!!e.get("silent"),Ts(e,i),Is(e,i)}),r.unfinished|=a,Ms(t._zr,e),sT(t._zr.dom,e)}function Ss(t,e){kT(KT,function(i){i(t,e)})}function Ms(t,e){var i=t.storage,n=0;i.traverse(function(t){t.isGroup||n++}),n>e.get("hoverLayerThreshold")&&!U_.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Is(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function Ts(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function As(t){var e=t._coordSysMgr;return a(new Ga(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Ds(){this.eventInfo}function Cs(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][i]=e}var i="__connectUpdateStatus";kT(jT,function(n,o){t._messageCenter.on(o,function(n){if(eA[t.group]&&0!==t[i]){if(n&&n.escapeConnect)return;var o=t.makeActionFromEvent(n),a=[];kT(tA,function(e){e!==t&&e.group===t.group&&a.push(e)}),e(a,0),kT(a,function(t){1!==t[i]&&t.dispatchAction(o)}),e(a,2)}})})}function Ls(t){eA[t]=!1}function ks(t){return tA[Wi(t,oA)]}function Ps(t,e){JT[t]=e}function Ns(t){qT.push(t)}function Os(t,e){Vs(YT,t,e,RT)}function Es(t,e,i){"function"==typeof e&&(i=e,e="");var n=NT(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,LT(WT.test(n)&&WT.test(e)),XT[n]||(XT[n]={action:i,actionInfo:t}),jT[e]=n}function Rs(t,e){Fa.register(t,e)}function zs(t,e){Vs($T,t,e,zT,"layout")}function Bs(t,e){Vs($T,t,e,BT,"visual")}function Vs(t,e,i,n,o){(PT(e)||NT(e))&&(i=e,e=n);var a=Er.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function Gs(t,e){QT[t]=e}function Fs(t){return lI.extend(t)}function Ws(t){return qI.extend(t)}function Hs(t){return YI.extend(t)}function Zs(t){return Ar.extend(t)}function Us(t){return t}function Xs(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Us,this._newKeyGetter=n||Us,this.context=o}function js(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}function Ys(t){var e={},i=e.encode={},n=R(),o=[],a=[];d(t.dimensions,function(e){var r=t.getDimensionInfo(e),s=r.coordDim;if(s){var l=i[s];i.hasOwnProperty(s)||(l=i[s]=[]),l[r.coordDimIndex]=e,r.isExtraCoord||(n.set(s,1),Ks(r.type)&&(o[0]=e)),r.defaultTooltip&&a.push(e)}sA.each(function(t,e){var n=i[e];i.hasOwnProperty(e)||(n=i[e]=[]);var o=r.otherDims[e];null!=o&&!1!==o&&(n[o]=r.name)})});var r=[],s={};n.each(function(t,e){var n=i[e];s[e]=n[0],r=r.concat(n)}),e.dataDimsOnCoord=r,e.encodeFirstDimNotExtra=s;var l=i.label;l&&l.length&&(o=l.slice());var u=i.tooltip;return u&&u.length?a=u.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,e}function qs(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Ks(t){return!("ordinal"===t||"time"===t)}function $s(t){return t._rawCount>65535?dA:pA}function Js(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Qs(t,e){d(gA.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,d(mA,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function tl(t,e,i,n,o){var a=cA[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function el(t){var e=t._invertedIndicesMap;d(e,function(i,n){var o=t._dimensionInfos[n].ordinalMeta;if(o){i=e[n]=new fA(o.categories.length);for(a=0;a<i.length;a++)i[a]=uA;for(var a=0;a<t._count;a++)i[t.get(n,a)]=a}})}function il(t,e,i){var n;if(null!=e){var o=t._chunkSize,a=Math.floor(i/o),r=i%o,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function nl(t){return t}function ol(t){return t<this._count&&t>=0?this._indices[t]:-1}function al(t,e){var i=t._idList[e];return null==i&&(i=il(t,t._idDimIdx,e)),null==i&&(i=hA+e),i}function rl(t){return y(t)||(t=[t]),t}function sl(t,e){var i=t.dimensions,n=new vA(f(i,t.getDimensionInfo,t),t.hostModel);Qs(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(l(e,s)>=0?(o[s]=ll(a[s]),n._rawExtent[s]=ul(),n._extent[s]=null):o[s]=a[s])}return n}function ll(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=Js(t[i]);return e}function ul(){return[1/0,-1/0]}function hl(t,e,n){function o(t,e,i){null!=sA.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}_a.isInstance(e)||(e=_a.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var s=(n.dimsDef||[]).slice(),l=R(n.encodeDef),u=R(),h=R(),c=[],f=cl(e,t,s,n.dimCount),p=0;p<f;p++){var g=s[p]=a({},w(s[p])?s[p]:{name:s[p]}),m=g.name,v=c[p]={otherDims:{}};null!=m&&null==u.get(m)&&(v.name=v.displayName=m,u.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}l.each(function(t,e){if(1===(t=Di(t).slice()).length&&t[0]<0)l.set(e,!1);else{var i=l.set(e,[]);d(t,function(t,n){_(t)&&(t=u.get(t)),null!=t&&t<f&&(i[n]=t,o(c[t],e,n))})}});var y=0;d(t,function(t,e){var n,t,a,s;if(_(t))n=t,t={};else{n=t.name;var u=t.ordinalMeta;t.ordinalMeta=null,(t=i(t)).ordinalMeta=u,a=t.dimsDef,s=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var h=l.get(n);if(!1!==h){if(!(h=Di(h)).length)for(var f=0;f<(a&&a.length||1);f++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&h.push(y++)}d(h,function(e,i){var l=c[e];if(o(r(l,t),n,i),null==l.name&&a){var u=a[i];!w(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}s&&r(l.otherDims,s)})}});var x=n.generateCoord,b=n.generateCoordCount,S=null!=b;b=x?b||1:0;for(var M=x||"value",I=0;I<f;I++)null==(v=c[I]=c[I]||{}).coordDim&&(v.coordDim=dl(M,h,S),v.coordDimIndex=0,(!x||b<=0)&&(v.isExtraCoord=!0),b--),null==v.name&&(v.name=dl(v.coordDim,u)),null==v.type&&ka(e,I,v.name)&&(v.type="ordinal");return c}function cl(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return d(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}function dl(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function fl(t,e,i){var n,o,a,r,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(d(e,function(t,i){_(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),o||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(o=t))}),!o||s||n||(s=!0),o){a="__\0ecstackresult",r="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=o.coordDim,c=o.type,f=0;d(e,function(t){t.coordDim===h&&f++}),e.push({name:a,coordDim:h,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0}),f++,e.push({name:r,coordDim:r,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function pl(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function gl(t,e){return pl(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ml(t,e,i){i=i||{},_a.isInstance(t)||(t=_a.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=Fa.get(o),r=ya(e);r&&(n=f(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=qs(n)}return e})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=_A(t,{coordDimensions:n,generateCoord:i.generateCoord});r&&d(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=fl(e,u),c=new vA(u,e);c.setCalculationInfo(h);var p=null!=s&&vl(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,p),c}function vl(t){if(t.sourceFormat===pI){var e=yl(t.data||[]);return null!=e&&!y(Li(e))}}function yl(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function xl(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function _l(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function wl(t){return t._map||(t._map=R(t.categories))}function bl(t){return w(t)&&null!=t.value?t.value:t+""}function Sl(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=$o(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&r>n&&(r=o.interval=n);var s=o.intervalPrecision=Ml(r);return Tl(o.niceTickExtent=[MA(Math.ceil(t[0]/r)*r,s),MA(Math.floor(t[1]/r)*r,s)],t),o}function Ml(t){return Ho(t)+2}function Il(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Il(t,0,e),Il(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Al(t,e,i,n){var o=[];if(!t)return o;e[0]<i[0]&&o.push(e[0]);for(var a=i[0];a<=i[1]&&(o.push(a),(a=MA(a+t,n))!==o[o.length-1]);)if(o.length>1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Dl(t){return t.get("stack")||AA+t.seriesIndex}function Cl(t){return t.dim+t.index}function Ll(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(r({bandWidth:n,axisKey:"axis0",stackId:AA+o},t));for(var a=Nl(e),s=[],o=0;o<t.count;o++){var l=a.axis0[AA+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function kl(t,e){var i=[];return e.eachSeriesByType(t,function(t){Rl(t)&&!zl(t)&&i.push(t)}),i}function Pl(t){var e=[];return d(t,function(t){var i=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=n.getExtent(),a="category"===n.type?n.getBandWidth():Math.abs(o[1]-o[0])/i.count(),r=Vo(t.get("barWidth"),a),s=Vo(t.get("barMaxWidth"),a),l=t.get("barGap"),u=t.get("barCategoryGap");e.push({bandWidth:a,barWidth:r,barMaxWidth:s,barGap:l,barCategoryGap:u,axisKey:Cl(n),stackId:Dl(t)})}),Nl(e)}function Nl(t){var e={};d(t,function(t,i){var n=t.axisKey,o=t.bandWidth,a=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=a.stacks;e[n]=a;var s=t.stackId;r[s]||a.autoWidthCount++,r[s]=r[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!r[s].width&&(r[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(r[s].maxWidth=u);var h=t.barGap;null!=h&&(a.gap=h);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var i={};return d(e,function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(n,function(t,e){var i=t.maxWidth;i&&i<u&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;d(n,function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var f=-c/2;d(n,function(t,n){i[e][n]=i[e][n]||{offset:f,width:t.width},f+=t.width*(1+r)})}),i}function Ol(t,e,i){if(t&&e){var n=t[Cl(e)];return null!=n&&null!=i&&(n=n[Dl(i)]),n}}function El(t,e){var i=kl(t,e),n=Pl(i),o={};d(i,function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=Dl(t),s=n[Cl(a)][r],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.get("barMinHeight")||0;o[r]=o[r]||[],e.setLayout({offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=pl(e,d),g=h.isHorizontal(),m=Bl(a,h,p),v=0,y=e.count();v<y;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)){var w=x>=0?"p":"n",b=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),b=o[r][_][w]);var S,M,I,T;if(g)S=b,M=(A=i.dataToPoint([x,_]))[1]+l,I=A[0]-m,T=u,Math.abs(I)<c&&(I=(I<0?-1:1)*c),p&&(o[r][_][w]+=I);else{var A=i.dataToPoint([_,x]);S=A[0]+l,M=b,I=u,T=A[1]-m,Math.abs(T)<c&&(T=(T<=0?-1:1)*c),p&&(o[r][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}}},this)}function Rl(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zl(t){return t.pipelineContext&&t.pipelineContext.large}function Bl(t,e,i){var n,o,a=e.getGlobalExtent();a[0]>a[1]?(n=a[1],o=a[0]):(n=a[0],o=a[1]);var r=e.toGlobalCoord(e.dataToCoord(0));return r<n&&(r=n),r>o&&(r=o),r}function Vl(t,e){return VA(t,BA(e))}function Gl(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Vo(n[0],1),n[1]=Vo(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(r)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var f,p=kl("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=Pl(p),m=Fl(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Fl(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ol(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Wl(t,e){var i=Gl(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Hl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new SA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new TA;default:return(xl.getClass(e)||TA).create(t)}}function Zl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function Ul(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,o){return null!=i&&(o=n-i),e(Xl(t,n),o)}:function(e){return t.scale.getLabel(e)}}function Xl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function jl(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Ul(t),h=1;o>40&&(h=Math.ceil(o/40));for(var c=0;c<o;c+=h){var d=u(n?n[c]:r[0]+c),f=Yl(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}}function Yl(t,e){var i=e*Math.PI/180,n=t.plain(),o=n.width,a=n.height,r=o*Math.cos(i)+a*Math.sin(i),s=o*Math.sin(i)+a*Math.cos(i);return new de(n.x,n.y,r,s)}function ql(t){var e=t.get("interval");return null==e?"auto":e}function Kl(t){return"category"===t.type&&0===ql(t.getLabelModel())}function $l(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Jl(t,e,i,n,o,a,r){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?jn(t.slice(8),new de(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Xn(t.slice(7),{},new de(e,i,n,o),r?"center":"cover"):new JA({shape:{symbolType:t,x:e,y:i,width:n,height:o}}),l.__isEmptyBrush=s,l.setColor=$l,l.setColor(a),l}function Ql(t,e){return Math.abs(t-e)<eD}function tu(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=Sn(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Ql(o[0],s[0])&&Ql(o[1],s[1])||(n+=Sn(o[0],o[1],s[0],s[1],e,i)),0!==n}function eu(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function iu(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=nu(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=nu(h,r[s][u],e)}}return t.UTF8Encoding=!1,t}function nu(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function ou(t){return"category"===t.type?ru(t):uu(t)}function au(t,e){return"category"===t.type?lu(t,e):{ticks:t.scale.getTicks()}}function ru(t){var e=t.getLabelModel(),i=su(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function su(t,e){var i=hu(t,"labels"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;return a=x(n)?vu(t,n):mu(t,r="auto"===n?fu(t):n),du(i,n,{labels:a,labelCategoryInterval:r})}function lu(t,e){var i=hu(t,"ticks"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;if(e.get("show")&&!t.scale.isBlank()||(a=[]),x(n))a=vu(t,n,!0);else if("auto"===n){var s=su(t,t.getLabelModel());r=s.labelCategoryInterval,a=f(s.labels,function(t){return t.tickValue})}else a=mu(t,r=n,!0);return du(i,n,{ticks:a,tickCategoryInterval:r})}function uu(t){var e=t.scale.getTicks(),i=Ul(t);return{labels:f(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function hu(t,e){return nD(t)[e]||(nD(t)[e]=[])}function cu(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function du(t,e,i){return t.push({key:e,value:i}),i}function fu(t){var e=nD(t).autoInterval;return null!=e?e:nD(t).autoInterval=t.calculateCategoryInterval()}function pu(t){var e=gu(t),i=Ul(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),r=o.count();if(a[1]-a[0]<1)return 0;var s=1;r>40&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=ke(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=nD(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-r)<=1&&w>x?x=w:(_.lastTickCount=r,_.lastAutoInterval=x),x}function gu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function mu(t,e,i){function n(t){l.push(i?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Ul(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Kl(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g!==r[1]&&n(r[1]),l}function vu(t,e,i){var n=t.scale,o=Ul(t),a=[];return d(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})}),a}function yu(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function xu(t,e,i,n,o){function a(t,e){return h?t>e:t<e}var r=e.length;if(t.onBand&&!n&&r){var s,l=t.getExtent();if(1===r)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;d(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(o?e[0].coord=l[0]:e.shift()),o&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(o?s.coord=l[1]:e.pop()),o&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function _u(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return fr(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=fr(t,e,i[a]);o.push(r)}return o.join(" ")}}function wu(t,e,i){tb.call(this),this.updateData(t,e,i)}function bu(t){return[t[0]/2,t[1]/2]}function Su(t,e){this.parent.drift(t,e)}function Mu(){!so(this)&&Tu.call(this)}function Iu(){!so(this)&&Au.call(this)}function Tu(){if(!this.incremental&&!this.useHoverLayer){var t=this.__symbolOriginalScale,e=t[1]/t[0];this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut")}}function Au(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Du(t){this.group=new tb,this._symbolCtor=t||wu}function Cu(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function Lu(t){return null==t||w(t)||(t={isIgnore:t}),t||{}}function ku(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Pu(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=Nu(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=f(t.dimensions,function(t){return e.mapDimension(t)}),p=e.getCalculationInfo("stackResultDimension");return(n|=pl(e,d[0]))&&(d[0]=p),(n|=pl(e,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Nu(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]),i}function Ou(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}function Eu(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function Ru(t){return isNaN(t[0])||isNaN(t[1])}function zu(t,e,i,n,o,a,r,s,l,u,h){return"none"!==u&&u?Bu.apply(this,arguments):Vu.apply(this,arguments)}function Bu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;_D(bD,g),bD[m]=g[m]+v,_D(SD,p),SD[m]=p[m]-v,t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Vu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),_D(bD,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&Ru(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Ru(m))_D(SD,p);else{Ru(m)&&!h&&(m=p),U(wD,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=uw(p,y),_=uw(p,m);xD(SD,p,wD,-l*(1-(v=_/(_+x))))}vD(bD,bD,s),yD(bD,bD,r),vD(SD,SD,s),yD(SD,SD,r),t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1]),xD(bD,p,wD,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Gu(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function Fu(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Wu(t){return"number"==typeof t?t:t?.5:0}function Hu(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Zu(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(Ou(i,t,e,o));return n}function Uu(t,e,i,n){var o=Hu(t.getAxis("x")),a=Hu(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),s=Math.min(o[0],o[1]),l=Math.min(a[0],a[1]),u=Math.max(o[0],o[1])-s,h=Math.max(a[0],a[1])-l;if(i)s-=.5,u+=.5,l-=.5,h+=.5;else{var c=n.get("lineStyle.width")||2,d=n.get("clipOverflow")?c/2:Math.max(u,h);r?(l-=d,h+=2*d):(s-=d,u+=2*d)}var f=new yM({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[r?"width":"height"]=0,To(f,{shape:{width:u,height:h}},n)),f}function Xu(t,e,i,n){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;i&&(a[0]-=.5,a[1]+=.5);var l=new hM({shape:{cx:Go(t.cx,1),cy:Go(t.cy,1),r0:Go(a[0],1),r:Go(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,To(l,{shape:{endAngle:-r[1]*s}},n)),l}function ju(t,e,i,n){return"polar"===t.type?Xu(t,e,i,n):Uu(t,e,i,n)}function Yu(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(i){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function qu(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;a>=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=f(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new TM(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function Ku(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!$u(a,e))){var r=e.mapDimension(a.dim),s={};return d(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function $u(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*wu.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function Ju(t){return this._axes[t]}function Qu(t){LD.call(this,t)}function th(t,e){return e.type||(e.data?"category":"value")}function eh(t,e,i){return t.getCoordSysModel()===e}function ih(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function nh(t,e,i,n){function o(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)oh(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&oh(r[h])&&!n[o(r[h])]){a=r[h];break}a&&(n[o(a)]=!0)}}function oh(t){return t&&"category"!==t.type&&"time"!==t.type&&Zl(t)}function ah(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function rh(t,e){return f(VD,function(e){return t.getReferringComponents(e)[0]})}function sh(t){return"cartesian2d"===t.get("coordinateSystem")}function lh(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function uh(t,e,i,n){var o,a,r=Xo(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return jo(r-GD/2)?(a=l?"bottom":"top",o="center"):jo(r-1.5*GD)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*GD&&r>GD/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function hh(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ch(t,e,i){if(!Kl(t.axis)){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(dh(a),dh(u)):fh(a,r)&&(n?(dh(r),dh(h)):(dh(a),dh(u))),!1===o?(dh(s),dh(c)):fh(l,s)&&(o?(dh(l),dh(d)):(dh(s),dh(c)))}}function dh(t){t&&(t.ignore=!0)}function fh(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=_t([]);return Mt(a,a,-t.rotation),n.applyTransform(bt([],a,t.getLocalTransform())),o.applyTransform(bt([],a,e.getLocalTransform())),n.intersect(o)}}function ph(t){return"middle"===t||"center"===t}function gh(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f<l.length;f++){var p=l[f].coord;u[0]=p,u[1]=0,h[0]=p,h[1]=i.tickDirection*s,c&&(Q(u,u,c),Q(h,h,c));var g=new _M(Kn({anid:"tick_"+l[f].tickValue,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:r(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(g),d.push(g)}return d}}function mh(t,e,i){var n=e.axis;if(T(i.axisLabelShow,e.get("axisLabel.show"))&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),r=n.getViewLabels(),s=(T(i.labelRotate,o.get("rotate"))||0)*GD/180,l=HD(i.rotation,s,i.labelDirection),u=e.getCategories(!0),h=[],c=hh(e),f=e.get("triggerEvent");return d(r,function(r,s){var d=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=o;u&&u[d]&&u[d].textStyle&&(m=new No(u[d].textStyle,o,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(d),i.labelOffset+i.labelDirection*a],x=new rM({anid:"label_"+d,position:y,rotation:l.rotation,silent:c,z2:10});mo(x.style,m,{text:p,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?d+"":d,s):v}),f&&(x.eventData=lh(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),h.push(x),t.group.add(x),x.decomposeTransform()}),h}}function vh(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return yh(i,t,e),i.seriesInvolved&&_h(i,t),i}function yh(t,e,i){var n=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),a=o.get("link",!0)||[],r=[];ZD(i.getCoordinateSystems(),function(i){function s(n,s,l){var c=l.model.getModel("axisPointer",o),d=c.get("show");if(d&&("auto"!==d||n||Th(c))){null==s&&(s=c.get("triggerTooltip"));var f=(c=n?xh(l,h,o,e,n,s):c).get("snap"),p=Ah(l.model),g=s||f||"category"===l.type,m=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Th(c),seriesModels:[]};u[p]=m,t.seriesInvolved|=g;var v=wh(a,l);if(null!=v){var y=r[v]||(r[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}if(i.axisPointerEnabled){var l=Ah(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model.getModel("tooltip",n);if(ZD(i.getAxes(),UD(s,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var c="axis"===h.get("trigger"),d="cross"===h.get("axisPointer.type"),f=i.getTooltipAxes(h.get("axisPointer.axis"));(c||d)&&ZD(f.baseAxes,UD(s,!d||"cross",c)),d&&ZD(f.otherAxes,UD(s,"cross",!1))}}})}function xh(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u={};ZD(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=i(l.get(t))}),u.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(u.type="line");var h=u.label||(u.label={});if(null==h.show&&(h.show=!1),"cross"===a){var c=l.get("label.show");if(h.show=null==c||c,!s){var d=u.lineStyle=l.get("crossStyle");d&&r(h,d.textStyle)}}return t.model.getModel("axisPointer",new No(u,n,o))}function _h(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),o=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==o&&!1!==e.get("axisPointer.show",!0)&&ZD(t.coordSysAxesInfo[Ah(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function wh(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(bh(a[n+"AxisId"],i.id)||bh(a[n+"AxisIndex"],i.componentIndex)||bh(a[n+"AxisName"],i.name))return o}}function bh(t,e){return"all"===t||y(t)&&l(t,e)>=0||t===e}function Sh(t){var e=Mh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Th(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}function Mh(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ah(t)]}function Ih(t){var e=Mh(t);return e&&e.axisPointerModel}function Th(t){return!!t.get("handle.show")}function Ah(t){return t.type+"||"+t.id}function Dh(t,e,i,n,o,a){var r=XD.getAxisPointerClass(t.axisPointerClass);if(r){var s=Ih(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):Ch(t,n)}}function Ch(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function Lh(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.getAxesOnZeroOf()[0],s=o.position,l=r?"onZero":s,u=o.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),T(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var v=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-v:v,a.z2=1,a}function kh(t,e,i,n,o,a,r){go(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:_u(o.getData(),a),isRectText:!0,autoColor:n}),Ph(t),Ph(e)}function Ph(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Nh(t,e,i){i.style.text=null,Io(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Oh(t,e,i){i.style.text=null,Io(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Eh(t,e,i,n,o,a,s,l){var u=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(r({fill:u,opacity:h},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var p=s?o.height>0?"bottom":"top":o.width>0?"left":"right";l||kh(t.style,d,n,u,a,i,p),fo(t,d)}function Rh(t,e){var i=t.get(tC)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function zh(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new nC({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__valueIdx:a});e.add(r),Bh(r,t,n)}function Bh(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Vh(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Gh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Gh(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Fh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new hM({z2:2}),a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Wh(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;p<c;p++)(u=t[p].y-h)<0&&function(e,i,n,o){for(var a=e;a<i;a++)if(t[a].y+=n,a>e&&a+1<i&&t[a+1].y>t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p<c;p++)t[p].y>=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function Hh(t,e,i,n,o,a){for(var r=[],s=[],l=0;l<t.length;l++)Zh(t[l])||(t[l].x<e?r.push(t[l]):s.push(t[l]));Wh(s,e,i,n,1,o,a),Wh(r,e,i,n,-1,o,a);for(l=0;l<t.length;l++)if(!Zh(t[l])){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];t[l].x<e?u[2][0]=t[l].x+3:u[2][0]=t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+h}}}function Zh(t){return"center"===t.position}function Uh(){this.group=new tb}function Xh(t,e,i){aD.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function jh(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=f(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new Xh(i,new TA);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}function Yh(t,e){return r({show:e},t)}function qh(t){return y(t)||(t=[+t,+t]),t}function Kh(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}function $h(t,e){var i,n,o=t.svgXML;try{k(null!=(n=(i=o&&rs(o,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new de(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=as(s,e.width,e.height),u=n;(n=new tb).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new yM({shape:e.plain()})),{root:n,boundingRect:e}}function Jh(t){return function(e,i){var n=[];return d(Qh(e),function(o){var a=NC[o.type][t];a&&n.push(a(e,o,i))}),n}}function Qh(t){return DT.retrieveMap(t)||[]}function tc(t,e,i){nc(t)[e]=i}function ec(t,e,i){var n=nc(t);n[e]===i&&(n[e]=null)}function ic(t,e){return!!nc(t)[e]}function nc(t){return t[EC]||(t[EC]={})}function oc(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(ac,this),o=e(rc,this),a=e(sc,this),s=e(lc,this),l=e(uc,this);fw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=r(i(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function ac(t){if(!(dt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function rc(t){if(this._dragging&&dc("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!ic(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&mw(t.event),cc(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function sc(t){dt(t)||(this._dragging=!1)}function lc(t){var e=dc("zoomOnMouseWheel",t,this._opt),i=dc("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=o>3?1.4:o>1?1.2:1.1;hc(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);hc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:r})}}}function uc(t){ic(this._zr,"globalPan")||hc(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function hc(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(mw(n.event),cc(t,e,i,n,o))}function cc(t,e,i,n,o){o.isAvailableBehavior=m(dc,null,i,n),t.trigger(e,o)}function dc(t,e,i){var n=i[t];return!t||n&&(!_(n)||e.event[n+"Key"])}function fc(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function pc(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function gc(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!RC[n.mainType]&&o&&o.model!==i}function mc(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function vc(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),yc(e,i)}}}))}function yc(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function xc(t,e){var i=new tb;this.uid=Ro("ec_map_draw"),this._controller=new oc(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new tb),i.add(this._backgroundGroup=new tb)}function _c(t){var e=this[zC];e&&e.recordVersion===this[BC]&&wc(e,t)}function wc(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(mo({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=NM):(mo(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function bc(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function Sc(){Tw.call(this)}function Mc(t){this.name=t,this.zoomLimit,Tw.call(this),this._roamTransformable=new Sc,this._rawTransformable=new Sc,this._center,this._zoom}function Ic(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function Tc(t,e,i,n){Mc.call(this,t),this.map=e;var o=OC.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function Ac(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function Dc(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;s&&l&&(s=[Vo(s[0],u),Vo(s[1],h)],l=Vo(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));if(d){var f={};c>1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=ca(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Cc(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Lc(t,e){var i={};return d(t,function(t){t.each(t.mapDimension("value"),function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h<u;h++)s=Math.min(s,i[a][h]),l=Math.max(l,i[a][h]),r+=i[a][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?NaN:c})}function kc(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,zc(e,i,t),FC(i,function(i){FC(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,v(Pc,t))})}),e.wrapMethod("cloneShallow",v(Oc,t)),FC(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,v(Nc,t))}),k(i[e.dataType]===e)}function Pc(t,e){if(Rc(this)){var i=a({},this[WC]);i[this.dataType]=e,zc(e,i,t)}else Bc(e,this.dataType,this[HC],t);return e}function Nc(t,e){return t.struct&&t.struct.update(this),e}function Oc(t,e){return FC(e[WC],function(i,n){i!==e&&Bc(i.cloneShallow(),n,e,t)}),e}function Ec(t){var e=this[HC];return null==t||null==e?e:e[WC][t]}function Rc(t){return t[HC]===t}function zc(t,e,i){t[WC]={},FC(e,function(e,n){Bc(e,n,t,i)})}function Bc(t,e,i,n){i[WC][e]=t,t[HC]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Ec}function Vc(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=f(e||[],function(e){return new No(e,t,t.ecModel)}),this.leavesModel=new No(i||{},t,t.ecModel)}function Gc(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Fc(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function Wc(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){jc(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=Yc(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Hc(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Zc(t){return arguments.length?t:Qc}function Uc(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Xc(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jc(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function Yc(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=qc(s),a=Kc(a),s&&a;){o=qc(o),r=Kc(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);d>0&&(Jc($c(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!qc(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Kc(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}return i}function qc(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Kc(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $c(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Jc(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Qc(t,e){return t.parentNode===e.parentNode?1:2}function td(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function ed(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function id(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=ed(l,l.getModel(),a),u=t.tree.root,h=l.parentNode===u?l:l.parentNode||l,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=l.getLayout();s?(i=new wu(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),Io(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===l.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-x.y,p.x-x.x))<0&&(m=2*Math.PI+m),0===l.children.length||0!==l.children.length&&!1===l.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var S=i.__edge;S||(S=i.__edge=new bM({shape:od(a,f,f),style:r({opacity:0,strokeNoScale:!0},a.lineStyle)})),Io(S,{shape:od(a,d,p),style:{opacity:1}},o),n.add(S)}}function nd(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ed(s,s.getModel(),a),u=s.parentNode===l?s:s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;Io(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var h=i.__edge;h&&Io(h,{shape:od(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function od(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Uc(s,u),f=Uc(s,u+(h-u)*t.curvature),p=Uc(l,h+(u-h)*t.curvature),g=Uc(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function ad(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}function rd(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;a>=0;a--)n.push(o[a])}}function sd(t,e){var i=Xc(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=Zc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=Zc());var s=t.getData().tree.root,l=s.children[0];if(l){Fc(s),ad(l,Wc,r),s.hierNode.modifier=-l.hierNode.prelim,rd(l,Hc);var u=l,h=l,c=l;rd(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Uc(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),rd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function ld(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function ud(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function hd(t,e){return l(ud(t),e)>=0}function cd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function dd(t){var e=0;d(t.children,function(t){dd(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function fd(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new No(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function pd(t){this.group=new tb,t.add(this.group)}function gd(t,e,i,n,o,a){var r=[[o?t:t-UC,e],[t+i,e],[t+i,e+n],[o?t:t-UC,e+n]];return!a&&r.splice(2,0,[t+i+UC,e+n/2]),!o&&r.push([t,e+n/2]),r}function md(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&cd(i,e)}}function vd(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o<a;o++){var r=e[o];r.el.animateTo(r.target,r.time,r.delay,r.easing,function(){--n||(e.length=0,i={},t&&t())})}return this}}}function yd(t,e,n,o,r,s,l,u,h,c){function d(t,e){w?!t.invisible&&s.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function f(e,n,o,a,r,s){var u=l.getModel(),h=T(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),u.get("name"));if(!s&&v.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=u.getModel(s?JC:KC),f=u.getModel(s?QC:$C),p=d.getShallow("show");go(e,n,d,f,{defaultText:p?h:null,autoColor:o,isRectText:!0}),s&&(e.textRect=i(s)),e.truncate=p&&d.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function p(t,i,o,a){var s=null!=S&&n[t][S],l=r[t];return s?(n[t][S]=null,g(l,s,t)):w||((s=new i({z:xd(o,a)})).__tmDepth=o,s.__tmStorageName=t,m(l,s,t)),e[t][b]=s}function g(t,e,i){(t[b]={}).old="nodeGroup"===i?e.position.slice():a({},e.shape)}function m(t,e,i){var n=t[b]={},a=l.parentNode;if(a&&(!o||"drillDown"===o.direction)){var s=0,u=0,h=r.background[a.getRawIndex()];!o&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var v=l.getLayout();if(v&&v.isInView){var y=v.width,x=v.height,_=v.borderWidth,w=v.invisible,b=l.getRawIndex(),S=u&&u.getRawIndex(),M=l.viewChildren,I=v.upperHeight,A=M&&M.length,D=l.getModel("itemStyle"),C=l.getModel("emphasis.itemStyle"),L=p("nodeGroup",jC);if(L){if(h.add(L),L.attr("position",[v.x||0,v.y||0]),L.__tmNodeWidth=y,L.__tmNodeHeight=x,v.isAboveViewRoot)return L;var k=p("background",YC,c,eL);if(k&&function(e,i,n){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:y,height:x});var o=l.getVisual("borderColor",!0),a=C.get("borderColor");d(i,function(){var t=oL(D);t.fill=o;var e=nL(C);if(e.fill=a,n){var r=y-2*_;f(t,e,o,r,I,{x:_,y:0,width:r,height:I})}else t.text=e.text=null;i.setStyle(t),fo(i,e)}),e.add(i)}(L,k,A&&v.upperHeight),!A){var P=p("content",YC,c,iL);P&&function(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(y-2*_,0),o=Math.max(x-2*_,0);i.culling=!0,i.setShape({x:_,y:_,width:n,height:o});var a=l.getVisual("color",!0);d(i,function(){var t=oL(D);t.fill=a;var e=nL(C);f(t,e,a,n,o),i.setStyle(t),fo(i,e)}),e.add(i)}(L,P)}return L}}}}function xd(t,e){var i=t*tL+e;return(i-1)/i}function _d(t){var e=t.pieceList;t.hasSpecialVisual=!1,d(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function wd(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(sL(e,function(t,e){n[t]=e}),!y(i)){var o=[];w(i)?sL(i,function(t,e){var i=n[e];o[null!=i?i:uL]=t}):o[uL]=i,i=Ld(t,o)}for(var a=e.length-1;a>=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function bd(t,e){var i=t.visual,n=[];w(i)?sL(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Ld(t,n)}function Sd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Dd([0,1])}}function Md(t){var e=this.option.visual;return e[Math.round(Bo(t,[0,1],[0,e.length-1],!0))]||{}}function Id(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Td(t){var e=this.option.visual;return e[this.option.loop&&t!==uL?t%e.length:t]}function Ad(){return this.option.visual[0]}function Dd(t){return{linear:function(e){return Bo(e,t,this.option.visual,!0)},category:Td,piecewise:function(e,i){var n=Cd.call(this,i);return null==n&&(n=Bo(e,t,this.option.visual,!0)),n},fixed:Ad}}function Cd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[hL.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Ld(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return Gt(t)})),e}function kd(t,e,i){return t?e<=i:e<i}function Pd(t,e,i,n,o,a){var r=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(pL),h=Nd(u,e,i[t.depth],n),c=u.get("borderColor"),f=u.get("borderColorSaturation");null!=f&&(c=Ed(f,l=Od(h))),t.setVisual("borderColor",c);var p=t.viewChildren;if(p&&p.length){var g=zd(t,r,s,u,h,p);d(p,function(t,e){(t.depth>=o.length||t===o[t.depth])&&Pd(t,Vd(r,h,t,e,g,a),i,n,o,a)})}else l=Od(h),t.setVisual("color",l)}}function Nd(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function Od(t){var e=Rd(t,"color");if(e){var i=Rd(t,"colorAlpha"),n=Rd(t,"colorSaturation");return n&&(e=jt(e,null,null,n)),i&&(e=Yt(e,i)),e}}function Ed(t,e){return null!=e?jt(e,null,null,t):null}function Rd(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function zd(t,e,i,n,o,a){if(a&&a.length){var r=Bd(e,"color")||null!=o.color&&"none"!==o.color&&(Bd(e,"colorAlpha")||Bd(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new hL(c);return d.__drColorMappingBy=h,d}}}function Bd(t,e){var i=t.get(e);return fL(i)&&i.length?{name:e,range:i}:null}function Vd(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?n:"id"===u?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}function Gd(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(_L),l=f.get(wL)/2,u=Kd(f),h=Math.max(s,u),c=s-l,d=h-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var p=(o=mL(o-2*c,0))*(a=mL(a-c-d,0)),g=Fd(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=vL(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_<w;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=Ud(x,v,e.squareRatio);S<=y?(_++,y=S):(x.area-=x.pop().getLayout().area,Xd(x,v,m,l,!1),v=vL(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&Xd(x,v,m,l,!0),!i){var M=f.get("childrenVisibleMin");null!=M&&p<M&&(i=!0)}for(var _=0,w=g.length;_<w;_++)Gd(g[_],e,i,n+1)}}}function Fd(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];Hd(r=g(r,function(t){return!t.isRemoved()}),s);var u=Zd(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=Wd(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function Wd(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;l>=0;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*e<a&&(s=l,i-=u)}return"asc"===n?o.splice(0,r-s):o.splice(s,r-s),i}function Hd(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function Zd(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];xL(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function Ud(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),n>o&&(o=n));var l=t.area*t.area,u=e*e*i;return l?mL(u*o/l,l/(u*a)):1/0}function Xd(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=mL(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=mL(y-2*n,0);p[s[r]]=i[s[r]]+vL(n,m/2),p[s[a]]=u+vL(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function jd(t,e,i,n,o){var a=(e||{}).node,r=[n,o];if(!a||a===i)return r;for(var s,l=n*o,u=l*t.option.zoomToNodeRatio;s=a.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=a.getValue();if(0===p)return r;u*=h/p;var g=s.getModel(),m=g.get(_L);(u+=4*m*m+(3*m+Math.max(m,Kd(g)))*Math.pow(u,.5))>XM&&(u=XM),a=s}u<l&&(u=l);var v=Math.pow(u/l,.5);return[n*v,o*v]}function Yd(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;for(var r=[a.width/2,a.height/2],s=o;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function qd(t,e,i,n,o){var a=t.getLayout(),r=i[o],s=r&&r===t;if(!(r&&!s||o===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new de(e.x-a.x,e.y-a.y,e.width,e.height);xL(t.viewChildren||[],function(t){qd(t,l,i,n,o+1)})}}function Kd(t){return t.get(bL)?t.get(SL):0}function $d(t){return"_EC_"+t}function Jd(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Qd(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function tf(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function ef(t){return"_"+t+"Type"}function nf(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){y(a)||(a=[a,a]);var r=Jl(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function of(t){var e=new PL({name:"line"});return af(e.shape,t),e}function af(t,e){var i=e[0],n=e[1],o=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=NaN,t.cpy1=NaN)}function rf(t,e,i){tb.call(this),this._createLine(t,e,i)}function sf(t){this._ctor=t||rf,this.group=new tb}function lf(t,e,i,n){if(df(e.getItemLayout(i))){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function uf(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);df(i.getItemLayout(o))?(r?r.updateData(i,o,a):r=new t._ctor(i,o,a),i.setItemGraphicEl(o,r),t.group.add(r)):t.group.remove(r)}function hf(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function cf(t){return isNaN(t[0])||isNaN(t[1])}function df(t){return!cf(t[0])&&!cf(t[1])}function ff(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1)RL[0]=VL(o[0],a[0],r[0],h),RL[1]=VL(o[1],a[1],r[1],h),(f=FL(GL(RL,e)-l))<s&&(s=f,n=h);for(var c=0;c<32;c++){var d=n+u;zL[0]=VL(o[0],a[0],r[0],n),zL[1]=VL(o[1],a[1],r[1],n),BL[0]=VL(o[0],a[0],r[0],d),BL[1]=VL(o[1],a[1],r[1],d);var f=GL(zL,e)-l;if(FL(f)<.01)break;var p=GL(BL,e)-l;u/=2,f<0?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function pf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function gf(t,e,i){var n=t.getGraphicEl(),o=pf(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if("group"!==t.type){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function mf(t,e){var i=pf(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function vf(t){return t instanceof Array||(t=[t,t]),t}function yf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),xf(i)}}function xf(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=F(t.node1.getLayout()),n=F(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function _f(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([h*Math.cos(a)+l,h*Math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:u}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=F(t.node1.getLayout()),o=F(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setLayout([n,o,e])})}}function wf(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=V(o*(Math.random()-.5)+r[0],a*(Math.random()-.5)+r[1])),u.pp=F(u.p),u.edges=null}var h=.6;return{warmUp:function(){h=.5},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],o=t.length,a=0;a<e.length;a++){var l=e[a],u=l.n1;U(n,(p=l.n2).p,u.p);var c=X(n)-l.d,d=p.w/(u.w+p.w);isNaN(d)&&(d=0),q(n,n),!u.fixed&&XL(u.p,u.p,n,d*c*h),!p.fixed&&XL(p.p,p.p,n,-(1-d)*c*h)}for(a=0;a<o;a++)(v=t[a]).fixed||(U(n,r,v.p),XL(v.p,v.p,n,s*h));for(a=0;a<o;a++)for(var u=t[a],f=a+1;f<o;f++){var p=t[f];U(n,p.p,u.p),0===(c=X(n))&&(W(n,Math.random()-.5,Math.random()-.5),c=1);var g=(u.rep+p.rep)/c/c;!u.fixed&&XL(u.pp,u.pp,n,g),!p.fixed&&XL(p.pp,p.pp,n,-g)}for(var m=[],a=0;a<o;a++){var v=t[a];v.fixed||(U(m,v.p,v.pp),XL(v.p,v.p,m,h),G(v.pp,v.p))}h*=.992,i&&i(t,e,h<.01)}}}function bf(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,ca(n,{width:e.getWidth(),height:e.getHeight()})}function Sf(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:Vo(i[0],e.getWidth()),cy:Vo(i[1],e.getHeight()),r:Vo(t.get("radius"),a/2)}}function Mf(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function If(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new pM,a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Tf(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Af(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?n[t]-n[e]:n[e]-n[t]}),o}function Df(t){t.each(function(e){var i,n,o,a,r=t.getItemModel(e),s=r.getModel("label").get("position"),l=r.getModel("labelLine"),u=t.getItemLayout(e),h=u.points,c="inner"===s||"inside"===s||"center"===s;if(c)i="center",a=[[n=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,o=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4],[n,o]];else{var d,f,p,g=l.get("length");"left"===s?(d=(h[3][0]+h[0][0])/2,f=(h[3][1]+h[0][1])/2,n=(p=d-g)-5,i="right"):(d=(h[1][0]+h[2][0])/2,f=(h[1][1]+h[2][1])/2,n=(p=d+g)+5,i="left");var m=f;a=[[d,f],[p,m]],o=m}u.label={linePoints:a,x:n,y:o,verticalAlign:"middle",textAlign:i,inside:c}})}function Cf(t){if(!t.parallel){var e=!1;d(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function Lf(t){d(Di(t.parallelAxis),function(e){if(w(e)){var i=e.parallelIndex||0,o=Di(t.parallel)[i];o&&o.parallelAxisDefault&&n(e,o.parallelAxisDefault,!1)}})}function kf(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function Pf(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nf(t,e,i){this._axesMap=R(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Of(t,e){return ek(ik(t,e[0]),e[1])}function Ef(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Rf(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(i=o-(r-1-t)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}function zf(t){fw.call(this),this._zr=t,this.group=new tb,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+bk++,this._handlers={},hk(Sk,function(t,e){this._handlers[e]=m(t,this)},this)}function Bf(t,e){var o=t._zr;t._enableGlobalPan||tc(o,yk,t._uid),hk(t._handlers,function(t,e){o.on(e,t)}),t._brushType=e.brushType,t._brushOption=n(i(wk),e,!0)}function Vf(t){var e=t._zr;ec(e,yk,t._uid),hk(t._handlers,function(t,i){e.off(i,t)}),t._brushType=t._brushOption=null}function Gf(t,e){var i=Mk[e.brushType].createCover(t,e);return i.__brushOption=e,Hf(i,e),t.group.add(i),i}function Ff(t,e){var i=Uf(e);return i.endCreating&&(i.endCreating(t,e),Hf(e,e.__brushOption)),e}function Wf(t,e){var i=e.__brushOption;Uf(e).updateCoverShape(t,e,i.range,i)}function Hf(t,e){var i=e.z;null==i&&(i=gk),t.traverse(function(t){t.z=i,t.z2=i})}function Zf(t,e){Uf(e).updateCommon(t,e),Wf(t,e)}function Uf(t){return Mk[t.__brushOption.brushType]}function Xf(t,e,i){var n=t._panels;if(!n)return!0;var o,a=t._transform;return hk(n,function(t){t.isTargetByCursor(e,i,a)&&(o=t)}),o}function jf(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Yf(t){var e=t._covers,i=e.length;return hk(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function qf(t,e){var n=ck(t._covers,function(t){var e=t.__brushOption,n=i(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Kf(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1];return pk(o*o+a*a,.5)>mk}function $f(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Jf(t,e,i,n){var o=new tb;return o.add(new yM({name:"main",style:ip(i),silent:!0,draggable:!0,cursor:"move",drift:uk(t,e,o,"nswe"),ondragend:uk(qf,e,{isEnd:!0})})),hk(n,function(i){o.add(new yM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:uk(t,e,o,i),ondragend:uk(qf,e,{isEnd:!0})}))}),o}function Qf(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=fk(o,vk),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;ep(t,e,"main",r,s,p,g),n.transformable&&(ep(t,e,"w",l,u,a,v),ep(t,e,"e",d,u,a,v),ep(t,e,"n",l,u,m,a),ep(t,e,"s",l,f,m,a),ep(t,e,"nw",l,u,a,a),ep(t,e,"ne",d,u,a,a),ep(t,e,"sw",l,f,a,a),ep(t,e,"se",d,f,a,a))}function tp(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(ip(i)),o.attr({silent:!n,cursor:n?"move":"default"}),hk(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=ap(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?_k[a]+"-resize":null})})}function ep(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(hp(up(t,e,[[n,o],[n+a,o+r]])))}function ip(t){return r({strokeNoScale:!0},t.brushStyle)}function np(t,e,i,n){var o=[dk(t,i),dk(e,n)],a=[fk(t,i),fk(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function op(t){return Ao(t.group)}function ap(t,e){if(e.length>1)return("e"===(n=[ap(t,(e=e.split(""))[0]),ap(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=Co({w:"left",e:"right",n:"top",s:"bottom"}[e],op(t));return i[n]}function rp(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=lp(i,a,r);hk(o.split(""),function(t){var e=xk[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(np(u[0][0],u[1][0],u[0][1],u[1][1])),Zf(i,n),qf(i,{isEnd:!1})}function sp(t,e,i,n,o){var a=e.__brushOption.range,r=lp(t,i,n);hk(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Zf(t,e),qf(t,{isEnd:!1})}function lp(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function up(t,e,n){var o=jf(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function hp(t){var e=dk(t[0][0],t[1][0]),i=dk(t[0][1],t[1][1]);return{x:e,y:i,width:fk(t[0][0],t[1][0])-e,height:fk(t[0][1],t[1][1])-i}}function cp(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Xf(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&Mk[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}function dp(t){var e=t.event;e.preventDefault&&e.preventDefault()}function fp(t,e,i){return t.childOfName("main").contain(e,i)}function pp(t,e,n,o){var a,r=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),Kf(t)||r){if(s&&!r){"single"===l.brushMode&&Yf(t);var u=i(l);u.brushType=gp(u.brushType,s),u.panelId=!0===s?null:s.panelId,r=t._creatingCover=Gf(t,u),t._covers.push(r)}if(r){var h=Mk[gp(t._brushType,s)];r.__brushOption.range=h.getCreatingRange(up(t,r,t._track)),o&&(Ff(t,r),h.updateCommon(t,r)),Wf(t,r),a={isEnd:o}}}else o&&"single"===l.brushMode&&l.removeOnClick&&Xf(t,e,n)&&Yf(t)&&(a={isEnd:o,removeOnClick:!0});return a}function gp(t,e){return"auto"===t?e.defaultBrushType:t}function mp(t){if(this._dragging){dp(t);var e=pp(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&qf(this,e)}}function vp(t){return{createCover:function(e,i){return Jf(uk(rp,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=$f(e);return[dk(i[0][t],i[1][t]),fk(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,o){var a,r=jf(e,i);if(!0!==r&&r.getLinearBrushOtherExtent)a=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),Qf(e,i,l,o)},updateCommon:tp,contain:fp}}function yp(t){return t=wp(t),function(e,i){return ko(e,t)}}function xp(t,e){return t=wp(t),function(i){var n=null!=e?e:i,o=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(o||0)]}}function _p(t,e,i){return t=wp(t),function(n,o,a){return t.contain(o[0],o[1])&&!gc(n,e,i)}}function wp(t){return de.create(t)}function bp(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function Sp(t){var e=t.axis;return f(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Mp(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function Ip(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function Tp(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=R();d(i.dimensions,function(t){var e=Ap(t);n.set(t,e)})}}}function Ap(t){return+t.replace("dim","")}function Dp(t,e,i){var n=t.model,o=t.getRect(),a=new yM({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),To(a,{shape:{width:o.width,height:o.height}},e,i),a}function Cp(t,e,i,n){for(var o=[],a=0;a<i.length;a++){var r=i[a],s=t.get(t.mapDimension(r),e);Np(s,n.getAxis(r).type)||o.push(n.dataToPoint(s,r))}return o}function Lp(t,e,i,n,o){var a=Cp(t,i,n,o),r=new gM({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function kp(t){var e=t.get("smooth",!0);return!0===e&&(e=Dk),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:Dk}}function Pp(t,e,i,n){var o=n.lineStyle;e.hasItemOption&&(o=e.getItemModel(i).getModel("lineStyle").getLineStyle()),t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(i,"color"),a.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}function Np(t,e){return"category"===e?null==t:null==t||isNaN(t)}function Op(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Ep(t,e,i){var n=t.getGraphicEl(),o=Op(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function Rp(t,e){var i=Op(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function zp(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Bp(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Vp(t,e,i,n,o,a,r,s){Fp(t,e,i,o,a,s),Zp(t,e,a,o,n,r,s),eg(t,s)}function Gp(t){d(t,function(t){var e=Qp(t.outEdges,Jp),i=Qp(t.inEdges,Jp),n=Math.max(e,i);t.setLayout({value:n},!0)})}function Fp(t,e,i,n,o,a){for(var r=[],s=[],l=[],u=[],h=0,c=0;c<e.length;c++)r[c]=1;for(c=0;c<t.length;c++)s[c]=t[c].inEdges.length,0===s[c]&&l.push(t[c]);for(;l.length;){for(var d=0;d<l.length;d++){var f=l[d];"vertical"===a?(f.setLayout({y:h},!0),f.setLayout({dy:i},!0)):(f.setLayout({x:h},!0),f.setLayout({dx:i},!0));for(var p=0;p<f.outEdges.length;p++){var g=f.outEdges[p];r[e.indexOf(g)]=0;var m=g.node2;0==--s[t.indexOf(m)]&&u.push(m)}}++h,l=u,u=[]}for(c=0;c<r.length;c++);Wp(t,h,a),Hp(t,"vertical"===a?(o-i)/(h-1):(n-i)/(h-1),a)}function Wp(t,e,i){d(t,function(t){t.outEdges.length||("vertical"===i?t.setLayout({y:e-1},!0):t.setLayout({x:e-1},!0))})}function Hp(t,e,i){d(t,function(t){if("vertical"===i){var n=t.getLayout().y*e;t.setLayout({y:n},!0)}else{var o=t.getLayout().x*e;t.setLayout({x:o},!0)}})}function Zp(t,e,i,n,o,a,r){var s=Up(t,r);Xp(t,s,e,i,n,o,r),jp(s,o,i,n,r);for(var l=1;a>0;a--)Yp(s,l*=.99,r),jp(s,o,i,n,r),tg(s,l,r),jp(s,o,i,n,r)}function Up(t,e){var i=[],n="vertical"===e?"y":"x",o=Zi(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),d(o.keys,function(t){i.push(o.buckets.get(t))}),i}function Xp(t,e,i,n,o,a,r){var s=[];d(e,function(t){var e=t.length,i=0,l=0;d(t,function(t){i+=t.getLayout().value}),l="vertical"===r?(o-(e-1)*a)/i:(n-(e-1)*a)/i,s.push(l)}),s.sort(function(t,e){return t-e});var l=s[0];d(e,function(t){d(t,function(t,e){var i=t.getLayout().value*l;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),d(i,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})}function jp(t,e,i,n,o){d(t,function(t){var a,r,s,l=0,u=t.length;if("vertical"===o){var h;for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),s=0;s<u;s++)(r=l-(a=t[s]).getLayout().x)>0&&(h=a.getLayout().x+r,a.setLayout({x:h},!0)),l=a.getLayout().x+a.getLayout().dx+e;if((r=l-e-n)>0)for(h=a.getLayout().x-r,a.setLayout({x:h},!0),l=h,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().x+a.getLayout().dx+e-l)>0&&(h=a.getLayout().x-r,a.setLayout({x:h},!0)),l=a.getLayout().x}else{var c;for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),s=0;s<u;s++)(r=l-(a=t[s]).getLayout().y)>0&&(c=a.getLayout().y+r,a.setLayout({y:c},!0)),l=a.getLayout().y+a.getLayout().dy+e;if((r=l-e-i)>0)for(c=a.getLayout().y-r,a.setLayout({y:c},!0),l=c,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().y+a.getLayout().dy+e-l)>0&&(c=a.getLayout().y-r,a.setLayout({y:c},!0)),l=a.getLayout().y}})}function Yp(t,e,i){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var n=Qp(t.outEdges,qp,i)/Qp(t.outEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function qp(t,e){return $p(t.node2,e)*t.getValue()}function Kp(t,e){return $p(t.node1,e)*t.getValue()}function $p(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Jp(t){return t.getValue()}function Qp(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function tg(t,e,i){d(t,function(t){d(t,function(t){if(t.inEdges.length){var n=Qp(t.inEdges,Kp,i)/Qp(t.inEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function eg(t,e){d(t,function(t){"vertical"===e?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),d(t,function(t){var e=0,i=0;d(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),d(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function ig(t,e,i,n,o){var a=t.ends,r=new zk({shape:{points:o?og(a,n,t):a}});return ng(t,r,e,i,o),r}function ng(t,e,i,n,o){var a=i.hostModel;(0,zM[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,n);var r=i.getItemModel(n),s=r.getModel(Ek),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,fo(e,r.getModel(Rk).getItemStyle())}function og(t,e,i){return f(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function ag(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),o=l(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)}),e}function rg(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;Vk(o,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}Vk(o,function(t){var e=t.get("boxWidth");y(e)||(e=[e,e]),l.push([Vo(e[0],i)||0,Vo(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;Vk(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function sg(t,e,i){function n(t,i,n){var o=s.get(i,n),a=[];a[u]=t,a[h]=o;var l;return isNaN(t)||isNaN(o)?l=[NaN,NaN]:(l=r.dataToPoint(a))[u]+=e,l}function o(t,e,i){var n=e.slice(),o=e.slice();n[u]+=l,o[u]-=l,i?t.push(n,o):t.push(o,n)}function a(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinateSystem,s=t.getData(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapDimension(c[u]),f=s.mapDimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p<s.count();p++){var g=s.get(d,p),m=n(g,f[2],p),v=n(g,f[0],p),y=n(g,f[1],p),x=n(g,f[3],p),_=n(g,f[4],p),w=[];o(w,y,0),o(w,x,1),w.push(v,y,_,x),a(w,v),a(w,_),a(w,m),s.setItemLayout(p,{initBaseline:m[h],ends:w})}}function lg(t,e,i){var n=t.ends;return new Hk({shape:{points:i?hg(n,t):n},z2:100})}function ug(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(Gk),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(Wk);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,fo(t,o.getModel(Fk).getItemStyle())}function hg(t,e){return f(t,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}function cg(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new Zk({shape:{points:o},__sign:1});e.add(a);var r=new Zk({shape:{points:o},__sign:-1});e.add(r),dg(1,a,t,n),dg(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function dg(t,e,i,n){var o=t>0?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(Gk).getItemStyle(Wk);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function fg(t,e,i,n,o){return i>n?-1:i<n?1:e>0?t.get(o,e-1)<=n?1:-1:1}function pg(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Vo(A(t.get("barMaxWidth"),o),o),r=Vo(A(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Vo(s,o):Math.max(Math.min(o/2,a),r)}function gg(t){return y(t)||(t=[+t,+t]),t}function mg(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function vg(t,e){tb.call(this);var i=new wu(t,e),n=new tb;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function yg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function xg(t,e,i){tb.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function _g(t,e,i){tb.call(this),this._createPolyline(t,e,i)}function wg(t,e,i){xg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function bg(){this.group=new tb}function Sg(t){return t instanceof Array||(t=[t,t]),t}function Mg(){var t=iw();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Ig(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n<o;n++)if((r=e[n].interval)[0]<=t&&t<=r[1]){a=n;break}if(n===o)for(var n=a-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n<o&&i[n]}}function Tg(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function Ag(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Dg(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Cg(i,a,o,n,c),kg(t,e,o,a,r,c.boundingLength,c.pxSign,u,n,c),Pg(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Vo(f[0],d[0]),Vo(f[1],d[1])]),Ng(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function Cg(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[Lg(l,s[0])-u,Lg(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?Lg(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]),o.pxSign=a>0?1:a<0?-1:0}function Lg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function kg(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Vo(f[c.index],d),f[h.index]=Vo(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}function Pg(t,e,i,n,o){var a=t.get(cP)||0;a&&(fP.attr({scale:e.slice(),rotation:i}),fP.updateTransform(),a/=fP.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Ng(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=T(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Vo(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Qo(n),M=S?n:Kg((y+b)/w);w=m+2*(x=(y-M*m)/2/(_?M:M-1)),b=_?0:2*x,S||"fixed"===n||(M=h?Kg((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var I=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?I:"end"===s?u-I:u/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[f.index]=i[f.xy],D[p.index]=i[p.xy];var C=d.barRectShape=a({},i);C[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+I)),C[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[p.xy]=0,L[p.wh]=i[p.wh]}function Og(t){var e=t.symbolPatternSize,i=Jl(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Eg(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,u=e.valueDim,h=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(jg(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c<h?Yg(t,null,o(c),i,n):Yg(t,null,{scale:[0,0]},i,n,function(){a.remove(t)}),Wg(t,i),c++});c<h;c++){var f=Og(i);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=h,a.add(f);var p=o(c);Yg(f,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),f.on("mouseover",function(){jg(t,function(t){t.trigger("emphasis")})}).on("mouseout",function(){jg(t,function(t){t.trigger("normal")})}),Wg(f,i)}}function Rg(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?Yg(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=Og(i),o.add(a),Yg(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),Wg(a,i)}function zg(t,e,i){var n=a({},e.barRectShape),o=t.__pictorialBarRect;o?Yg(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new yM({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function Bg(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,r=a({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(o)Io(o,{shape:r},l,u);else{r[s.wh]=0,o=new yM({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var h={};h[s.wh]=i.clipShape[s.wh],zM[n?"updateProps":"initProps"](o,{shape:h},l,u)}}}function Vg(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Gg,i.isAnimationEnabled=Fg,i}function Gg(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Fg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Wg(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function Hg(t,e,i,n){var o=new tb,a=new tb;return o.add(a),o.__pictorialBundle=a,a.attr("position",i.bundlePosition.slice()),i.symbolRepeat?Eg(o,e,i):Rg(o,e,i),zg(o,i,n),Bg(o,e,i,n),o.__pictorialShapeStr=Xg(t,i),o.__pictorialSymbolMeta=i,o}function Zg(t,e,i){var n=i.animationModel,o=i.dataIndex;Io(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?Eg(t,e,i,!0):Rg(t,e,i,!0),zg(t,i,!0),Bg(t,e,i,!0)}function Ug(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];jg(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),d(a,function(t){Io(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function Xg(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function jg(t,e,i){d(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function Yg(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&zM[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function qg(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,s=a.getModel("itemStyle").getItemStyle(["color"]),l=a.getModel("emphasis.itemStyle").getItemStyle(),u=a.getShallow("cursor");jg(t,function(t){t.setColor(n),t.setStyle(r({fill:n,opacity:i.opacity},s)),fo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;kh(d.style,h,a,n,e.seriesModel,o,c),fo(d,h)}function Kg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function $g(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Jg(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.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]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.z2=1,o}function Qg(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=tm(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,o),i.showTooltip(t,s,u)}else i.showPointer(t,e)}function tm(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return _P(e.seriesModels,function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p<r||f>=0&&s<0)&&(r=p,s=f,o=u,a.length=0),_P(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function em(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function im(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Ah(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function nm(t,e,i){var n=i.axesInfo=[];_P(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function om(t,e,i,n){if(!lm(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function am(t,e,i){var n=i.getZr(),o=bP(n).axisPointerLastHighlights||{},a=bP(n).axisPointerLastHighlights={};_P(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&_P(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function rm(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function sm(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function lm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function um(t,e,i){if(!U_.node){var n=e.getZr();SP(n).records||(SP(n).records={}),hm(n,e),(SP(n).records[t]||(SP(n).records[t]={})).handler=i}}function hm(t,e){function i(i,n){t.on(i,function(i){var o=pm(e);MP(SP(t).records,function(t){t&&n(t,i,o.dispatchAction)}),cm(o.pendings,e)})}SP(t).initialized||(SP(t).initialized=!0,i("click",v(fm,"click")),i("mousemove",v(fm,"mousemove")),i("globalout",dm))}function cm(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function dm(t,e,i){t.handler("leave",null,i)}function fm(t,e,i,n){e.handler(t,i,n)}function pm(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function gm(t,e){if(!U_.node){var i=e.getZr();(SP(i).records||{})[t]&&(SP(i).records[t]=null)}}function mm(){}function vm(t,e,i,n){ym(TP(i).lastProp,n)||(TP(i).lastProp=n,e?Io(i,n,t):(i.stopAnimation(),i.attr(n)))}function ym(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&ym(t[n],e)}),!!i}return t===e}function xm(t,e){t[e.get("label.show")?"show":"hide"]()}function _m(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wm(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function bm(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function Sm(t,e,i,n,o){var a=Im(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=qM(r.get("padding")||0),l=r.getFont(),u=ke(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),Mm(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function Mm(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Im(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Xl(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function Tm(t,e,i){var n=xt();return Mt(n,n,i.rotation),St(n,n,i.position),Do([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Am(t,e,i,n,o,a){var r=FD.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),Sm(e,n,o,a,{position:Tm(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Dm(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Cm(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Lm(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function km(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Pm(t){return"x"===t.dim?0:1}function Nm(t){return t.isHorizontal()?0:1}function Om(t,e){var i=t.getRect();return[i[kP[e]],i[kP[e]]+i[PP[e]]]}function Em(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Rm(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=zm(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;g<p;++g){n=h[g]*c,t.setItemLayout(a[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;m<d;++m)n+=l[m-1][g][1]*c,t.setItemLayout(a[m].indices[g],{layerIndex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function zm(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];u>a&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;a=0;for(var c=0;c<i;++c){var d=n[c]+o[c];d>a&&(a=d)}return r.y0=o,r.max=a,r}function Bm(t){var e=0;d(t.children,function(t){Bm(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Vm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}tb.call(this);var a=new hM({z2:zP});a.seriesIndex=e.seriesIndex;var r=new rM({z2:BP,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Gm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Fm(t)%r]}function Fm(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Wm(t,e,i){return i!==RP.NONE&&(i===RP.SELF?t===e:i===RP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Hm(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}function Zm(t,e){var i=t.children||[];t.children=Um(i,e),i.length&&d(t.children,function(t){Zm(t,e)})}function Um(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Xm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function jm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Ym(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function qm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Km(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=lv(n);(e=Xn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new fi({})).__customImagePath=t.style.image:"text"===i?(e=new rM({})).__customText=t.style.text:e=new(0,zM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function $m(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Jm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Jm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),To(t,{style:{opacity:c}},o,e)}r?t.attr(l):Io(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(ro(t,f),t.__cusHasEmphStl=!p),s&&po(t,!p)}function Jm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Qm(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(UP),f=c.getModel(XP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():YP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(HP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),mo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(ZP).getItemStyle();return mo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Ll(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return So(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:tv(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function tv(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function ev(t,e,i,n,o,a){return(t=iv(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function iv(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&uv(u)&&lv(u)!==t.__customPathData||"image"===l&&hv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Km(i)),$m(t,e,i,n,a,c,r),"group"===l&&nv(t,e,i,n,a),o.add(t),t}}function nv(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)ov({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&iv(t.childAt(h),e,a[h],n,t,o)}}function ov(t){new Xs(t.oldChildren,t.newChildren,av,av,t).add(rv).update(rv).remove(sv).execute()}function av(t,e){var i=t&&t.name;return null!=i?i:jP+e}function rv(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;iv(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function sv(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function lv(t){return t&&(t.pathData||t.d)}function uv(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function hv(t,e){return t&&t.hasOwnProperty(e)}function cv(t,e,i,n){var o=i.type,a=new(0,zM[o.charAt(0).toUpperCase()+o.slice(1)])(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function dv(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){dv(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function fv(t){return t=a({},t),d(["id","parentId","$action","hv","bounding"].concat(nI),function(e){delete t[e]}),t}function pv(t,e){var i;return d(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function gv(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function mv(t,e,i){var o=a({},i),r=t[e],s=i.$action||"merge";"merge"===s?r?(n(r,o,!0),pa(r,o,{ignoreSize:!0}),ma(i,r)):t[e]=o:"replace"===s?t[e]=o:"remove"===s&&r&&(t[e]=null)}function vv(t,e){t&&(t.hv=e.hv=[pv(e,["left","right"]),pv(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function yv(t,e,i){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=t.info)}function xv(t,e,i){var n,o={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name)),d(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o.hasOwnProperty(e)?o[e]=o[e]&&n:o[e]=n}})}),{name:e.name,selected:o}}function _v(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=ca(n,a,o);aI(e.get("orient"),t,e.get("itemGap"),r.width,r.height),da(t,n,a,o)}function wv(t,e){var i=qM(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new yM({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}function bv(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Sv(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Mv(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function Iv(t,e,i){var n=[1,1];n[t.getOrient().index]=0,pa(e,i,{type:"box",ignoreSize:n})}function Tv(t){var e="left "+t+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)";return f(lN,function(t){return t+"transition:"+e}).join(";")}function Av(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),rN(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Dv(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),o=t.getModel("textStyle"),a=t.get("padding");return i&&e.push(Tv(i)),n&&(U_.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+Zt(n)),e.push("filter:alpha(opacity=70)"))),rN(["width","color","radius"],function(i){var n="border-"+i,o=sN(n),a=t.get(o);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))}),e.push(Av(o)),null!=a&&e.push("padding:"+qM(a).join("px ")+"px"),e.join(";")+";"}function Cv(t,e){if(U_.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var i=n.handler;ut(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function Lv(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function kv(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(No.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new No(i,e,e.ecModel))}return e}function Pv(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function Nv(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>n?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function Ov(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Ev(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function Rv(t){return"center"===t||"middle"===t}function zv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Bv(t){return t.dim}function Vv(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Bv(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Bv(o)]=s;var u=zv(t);l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=Vo(t.get("barWidth"),r),c=Vo(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");h&&!l[u].width&&(h=Math.min(s.remainedWidth,h),l[u].width=h,s.remainedWidth-=h),c&&(l[u].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(i,function(t,e){var i=t.maxWidth;i&&i<u&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;d(i,function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var f=-c/2;d(i,function(t,i){n[e][i]=n[e][i]||{offset:f,width:t.width},f+=t.width*(1+r)})}),n}function Gv(t,e){aD.call(this,"radius",t,e),this.type="category"}function Fv(t,e){e=e||[0,360],aD.call(this,"angle",t,e),this.type="category"}function Wv(t,e){return e.type||(e.data?"category":"value")}function Hv(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Vo(n[0],o),t.cy=Vo(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=Vo(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}function Zv(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();d(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,gl(e,t))}),d(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,gl(e,t))})}}),Wl(n.scale,n.model),Wl(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function Uv(t,e){if(t.type=e.get("type"),t.scale=Hl(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function Xv(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function jv(t){return t.getRadiusAxis().inverse?0:1}function Yv(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function qv(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Kv(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=xt();Mt(d,d,s),St(d,d,[n.cx,n.cy]),l=Do([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=FD.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function $v(t,e){e.update="updateView",Es(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Jv(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function Qv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function ty(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return MN(e,function(e){var r=a[e]=o();MN(t[e],function(t,o){if(hL.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new hL(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new hL(a))}})}),a}function ey(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&Qv(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&Qv(e[n])?t[n]=i(e[n]):delete t[n]})}function iy(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g<m;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};d(t,function(t){var i=hL.prepareVisualTypes(e[t]);u[t]=i});var h;null==a?i.each(l):i.each([a],l)}function ny(t,e,i,n){var o={};return d(t,function(t){var i=hL.prepareVisualTypes(e[t]);o[t]=i}),{progress:function(t,a){null!=n&&(n=a.getDimension(n));for(var r;null!=(r=t.next());){var s=a.getRawDataItem(r);if(!s||!1!==s.visualMap)for(var l=null!=n?a.get(n,r,!0):r,u=i(l),h=e[u],c=o[u],d=0,f=c.length;d<f;d++){var p=c[d];h[p]&&h[p].applyVisual(l,function(t){return a.getItemVisual(r,t)},function(t,e){a.setItemVisual(r,t,e)})}}}}}function oy(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range;return ay(e[t],o)}},rect:function(n,o,a){if(n){var r=a.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),ay(s[0],r)||ay(s[1],r)||ay(r[0],s)||ay(r[1],s)}}}}function ay(t,e){return e[0]<=t&&t<=e[1]}function ry(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(sy(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function sy(t,e,i,n,o,a,r,s){var l=uy(i-t,o-r,n-e,a-s);if(ly(l))return!1;var u=uy(o-t,o-r,a-e,a-s)/l;if(u<0||u>1)return!1;var h=uy(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function ly(t){return t<=1e-6&&t>=-1e-6}function uy(t,e,i,n){return t*n-e*i}function hy(t,e,i){var n=this._targetInfoList=[],o={},a=dy(e,t);TN(PN,function(t,e){(!i||!i.include||AN(i.include,e)>=0)&&t(a,n,o)})}function cy(t){return t[0]>t[1]&&t.reverse(),t}function dy(t,e){return Vi(t,e,{includeMainTypes:LN})}function fy(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=cy(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function py(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function gy(t,e){var i=my(t),n=my(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function my(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function vy(t,e,i,n,o){if(o){var a=t.getZr();a[VN]||(a[BN]||(a[BN]=yy),Nr(a,BN,i,e)(t,n))}}function yy(t,e){if(!t.isDisposed()){var i=t.getZr();i[VN]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[VN]=!1}}function xy(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function _y(t){var e=t.brushSelector;if(_(e)){var i=[];return d(IN,function(t,n){i[n]=function(i,n,o,a){var r=n.getItemLayout(i);return t[e](r,o,a)}}),i}if(x(e)){var n={};return d(IN,function(t,i){n[i]=e}),n}return e}function wy(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(y(i)?l(i,e)<0:e!==i)}function by(t){var e=t.selectors={};return d(IN[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function Sy(t){return new de(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function My(t,e){return n({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new No(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Iy(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Ty(t,e){HN[t]=e}function Ay(t){return HN[t]}function Dy(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function Cy(t,e,i){this._model=t}function Ly(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}function ky(t,e){var i=t.cellSize;y(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=f([0,1],function(t){return fa(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});pa(t,e,{type:"box",ignoreSize:n})}function Py(t){return l(qN,t)>=0}function Ny(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Oy(t,e,i){var n=[1/0,-1/0];return $N(i,function(t){var i=t.getData();i&&$N(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]),Ey(t,n),n}function Ey(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=a>0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ry(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Zo(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function zy(t){var e=t._minMaxSpan={},i=t._dataZoomModel;$N(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=Bo(a[0]+o,a,[0,100],!0)}})}function By(t){var e={};return tO(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Vy(t,e){var i=t._rangePropMode,n=t.get("rangeMode");tO([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Gy(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Fy(t){return"vertical"===t?"ns-resize":"ew-resize"}function Wy(t,e){var i=Uy(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),jy(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=Xy(t,a),a.dispatchAction=v(Yy,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=qy(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Nr(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Hy(t,e){var i=Uy(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),jy(i)}function Zy(t){return t.type+"\0_"+t.id}function Uy(t){var e=t.getZr();return e[fO]||(e[fO]={})}function Xy(t,e){var i=new oc(t.getZr());return d(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];d(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function jy(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Yy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function qy(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return d(t,function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+a]>i["type_"+e]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ky(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return QL(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function $y(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jy(t,e,i,n){for(var o=e.targetVisuals[n],a=hL.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,function(t){return r[t]},function(t,e){r[t]=e})}return r.color}function Qy(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}function tx(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ca(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function ex(t){return d(t||[],function(e){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function ix(t,e,i,n){return new pM({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){mw(t.event)},ondragend:n})}function nx(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function ox(t,e,i,n){return t?[[0,-RO(e,zO(i,0))],[VO,0],[0,RO(e,zO(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ax(t,e,i){var n=BO/2,o=t.get("hoverLinkDataSize");return o&&(n=OO(o,e,i,!0)/2),n}function rx(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function sx(t){return"vertical"===t?"ns-resize":"ew-resize"}function lx(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function ux(t){Ci(t,"label",["show"])}function hx(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function cx(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function dx(t,e,i,n,o,a){var r=[],s=pl(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=yx(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(n,u);var h=Wo(e.get(n,u));return(h=Math.min(h,20))>=0&&(r[a]=+r[a].toFixed(h)),r}function fx(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!cx(e)&&!y(e.coord)&&o){var a=o.dimensions,r=px(e,n,o,t);if((e=i(e)).type&&YO[e.type]&&r.baseAxis&&r.valueAxis){var s=XO(a,r.baseAxis.dim),l=XO(a,r.valueAxis.dim);e.coord=YO[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)YO[u[h]]&&(u[h]=yx(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function px(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(gx(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function gx(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}function mx(t,e){return!(t&&t.containData&&e.coord&&!hx(e))||t.containData(e.coord)}function vx(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function yx(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)}),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function xx(t,e,i){var n=e.coordinateSystem;t.each(function(o){var a,r=t.getItemModel(o),s=Vo(r.get("x"),i.getWidth()),l=Vo(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),h=t.get(n.dimensions[1],o);a=n.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(o,a)})}function _x(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return r({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new vA(n,i),a=f(i.get("data"),v(fx,e));return t&&(a=g(a,v(mx,t))),o.initData(a,null,t?vx:function(t){return t.value}),o}function bx(t){return!isNaN(t)&&!isFinite(t)}function Sx(t,e,i,n){var o=1-t,a=n.dimensions[t];return bx(e[o])&&bx(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function Mx(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(Sx(1,i,n,t)||Sx(0,i,n,t)))return!0}return mx(t,e[0])&&mx(t,e[1])}function Ix(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Vo(s.get("x"),o.getWidth()),u=Vo(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;bx(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):bx(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function Tx(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return r({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new vA(n,i),a=new vA(n,i),s=new vA([],i),l=f(i.get("data"),v(KO,e,t,i));t&&(l=g(l,v(Mx,t)));var u=t?vx:function(t){return t.value};return o.initData(f(l,function(t){return t[0]}),null,u),a.initData(f(l,function(t){return t[1]}),null,u),s.initData(f(l,function(t){return t[2]})),s.hasItemOption=!0,{from:o,to:a,line:s}}function Ax(t){return!isNaN(t)&&!isFinite(t)}function Dx(t,e,i,n){var o=1-t;return Ax(e[o])&&Ax(i[o])}function Cx(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!Dx(1,i,n,t)&&!Dx(0,i,n,t))||(mx(t,{coord:i,x:e.x0,y:e.y0})||mx(t,{coord:n,x:e.x1,y:e.y1}))}function Lx(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Vo(s.get(i[0]),o.getWidth()),u=Vo(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(h,h),a=r.dataToPoint(h,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);Ax(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):Ax(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function kx(t,e,i){var n,o,a=["x0","y0","x1","y1"];t?(n=f(t&&t.dimensions,function(t){var i=e.getData();return r({name:t},i.getDimensionInfo(i.mapDimension(t))||{})}),o=new vA(f(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):o=new vA(n=[{name:"value",type:"float"}],i);var s=f(i.get("data"),v($O,e,t,i));t&&(s=g(s,v(Cx,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(s,null,l),o.hasItemOption=!0,o}function Px(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),Nx(t),Ox(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Ox(n,"position")||(n.position=t.controlPosition),"none"!==n.position||Ox(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}d(t.data||[],function(t){w(t)&&!y(t)&&(!Ox(t,"value")&&Ox(t,"name")&&(t.value=t.name),Nx(t))})}function Nx(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};d(n,function(t,e){a[e]||Ox(o,e)||(o[e]=t)}),i.label&&!Ox(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function Ox(t,e){return t.hasOwnProperty(e)}function Ex(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function Rx(t,e,n,o){return Xn(t.get(e).replace(/^path:\/\//,""),i(o||{}),new de(n[0],n[1],n[2],n[3]),"center")}function zx(t,e,i,o,a,r){var s=e.get("color");a?(a.setColor(s),i.add(a),r&&r.onUpdate(a)):((a=Jl(t.get("symbol"),-1,-1,2,2,s)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a));var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),o=n({rectHover:!0,z2:100},o,!0);var u=t.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,o.scale=u;var h=t.get("symbolOffset");if(h){var c=o.position=o.position||[0,0];c[0]+=Vo(h[0],u[0]),c[1]+=Vo(h[1],u[1])}var d=t.get("symbolRotate");return o.rotation=(d||0)*Math.PI/180||0,a.attr(o),a.updateTransform(),a}function Bx(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}function Vx(t){return 0===t.indexOf("my")}function Gx(t){this.model=t}function Fx(t){this.model=t}function Wx(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getBaseAxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryAxis:a,valueAxis:o.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Hx(t){var e=[];return d(t,function(t,i){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(f(t.series,function(t){return t.name})),r=[n.model.getCategories()];d(t.series,function(t){r.push(t.getRawData().mapArray(o,function(t){return t}))});for(var s=[a.join(fE)],l=0;l<r[0].length;l++){for(var u=[],h=0;h<r.length;h++)u.push(r[h][l]);s.push(u.join(fE))}e.push(s.join("\n"))}),e.join("\n\n"+dE+"\n\n")}function Zx(t){return f(t,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,o=arguments[t-1],a=e.getName(o),r=0;r<t-1;r++)n[r]=arguments[r];i.push((a?a+fE:"")+n.join(fE))}),i.join("\n")}).join("\n\n"+dE+"\n\n")}function Ux(t){var e=Wx(t);return{value:g([Hx(e.seriesGroupByCategoryAxis),Zx(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+dE+"\n\n"),meta:e.meta}}function Xx(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jx(t){if(t.slice(0,t.indexOf("\n")).indexOf(fE)>=0)return!0}function Yx(t){for(var e=t.split(/\n+/g),i=[],n=f(Xx(e.shift()).split(pE),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=Xx(e[o]).split(pE);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}function qx(t){for(var e=t.split(/\n+/g),i=Xx(e.shift()),n=[],o=0;o<e.length;o++){var a,r=Xx(e[o]).split(pE),s="",l=!1;isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},a=n[o].value):a=n[o]=[];for(var u=0;u<r.length;u++)a.push(+r[u]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}function Kx(t,e){var i={series:[]};return d(t.split(new RegExp("\n*"+dE+"\n*","g")),function(t,n){if(jx(t)){var o=Yx(t),a=e[n],r=a.axisDim+"Axis";a&&(i[r]=i[r]||[],i[r][a.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{o=qx(t);i.series.push(o)}}),i}function $x(t){this._dom=null,this.model=t}function Jx(t,e){return f(t,function(t,i){var n=e&&e[i];return w(n)&&!y(n)?(w(t)&&!y(t)&&(t=t.value),r({value:t},n)):t})}function Qx(t,e){var i=n_(t);gE(e,function(e,n){for(var o=i.length-1;o>=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function t_(t){var e=n_(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return gE(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function e_(t){t[mE]=null}function i_(t){return n_(t).length}function n_(t){var e=t[mE];return e||(e=t[mE]=[{}]),e}function o_(t,e,i){(this._brushController=new zf(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function a_(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function r_(t,e){t.setIconStatus("back",i_(e)>1?"emphasis":"normal")}function s_(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new hy(a_(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function l_(t){this.model=t}function u_(t){return SE(t)}function h_(){if(!TE&&AE){TE=!0;var t=AE.styleSheets;t.length<31?AE.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function c_(t){return parseInt(t,10)}function d_(t,e){h_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function f_(t){return function(){Yw('In IE8.0 VML mode painter not support method "'+t+'"')}}function p_(t){return document.createElementNS(sR,t)}function g_(t){return cR(1e4*t)/1e4}function m_(t){return t<vR&&t>-vR}function v_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==hR}function y_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==hR}function x_(t,e){e&&__(t,"transform","matrix("+uR.call(e,",")+")")}function __(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function w_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function b_(t,e,i,n){if(v_(e,i)){var o=i?e.textFill:e.fill;o="transparent"===o?hR:o,"none"!==t.getAttribute("clip-path")&&o===hR&&(o="rgba(0, 0, 0, 0.002)"),__(t,"fill",o),__(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else __(t,"fill",hR);if(y_(e,i)){var a=i?e.textStroke:e.stroke;__(t,"stroke",a="transparent"===a?hR:a),__(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),__(t,"paint-order",i?"stroke":"fill"),__(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(__(t,"stroke-dasharray",e.lineDash.join(",")),__(t,"stroke-dashoffset",cR(e.lineDashOffset||0))):__(t,"stroke-dasharray",""),e.lineCap&&__(t,"stroke-linecap",e.lineCap),e.lineJoin&&__(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&__(t,"stroke-miterlimit",e.miterLimit)}else __(t,"stroke",hR)}function S_(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case lR.M:a="M",r=2;break;case lR.L:a="L",r=2;break;case lR.Q:a="Q",r=4;break;case lR.C:a="C",r=6;break;case lR.A:var s=i[o++],l=i[o++],u=i[o++],h=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=m_(g-gR)&&!m_(g),v=!1;v=g>=gR||!m_(g)&&(d>-pR&&d<0||d>pR)==!!p;var y=g_(s+u*fR(c)),x=g_(l+h*dR(c));m&&(d=p?gR-1e-4:1e-4-gR,v=!0,9===o&&e.push("M",y,x));var _=g_(s+u*fR(c+d)),w=g_(l+h*dR(c+d));e.push("A",g_(u),g_(h),cR(f*mR),+v,+p,_,w);break;case lR.Z:a="Z";break;case lR.R:var _=g_(i[o++]),w=g_(i[o++]),b=g_(i[o++]),S=g_(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M<r;M++)e.push(g_(i[o++]))}return e.join(" ")}function M_(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}function I_(){}function T_(t,e,i,n){for(var o=0,a=e.length,r=0,s=0;o<a;o++){var l=e[o];if(l.removed){for(var u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=r;h<r+l.count;h++)u.push(h);l.indices=u,r+=l.count,l.added||(s+=l.count)}}return e}function A_(t){return{newPos:t.newPos,components:t.components.slice(0)}}function D_(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function C_(t,e){D_.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function L_(t,e){D_.call(this,t,e,"clipPath","__clippath_in_use__")}function k_(t,e){D_.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function P_(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function N_(t){return parseInt(t,10)}function O_(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR}function E_(t,e){return e&&t&&e.parentNode!==t}function R_(t,e,i){if(E_(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function z_(t,e){if(E_(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function B_(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function V_(t){return t.__textSvgEl}function G_(t){return t.__svgEl}function F_(t){return function(){Yw('In SVG mode painter not support method "'+t+'"')}}var W_=2311,H_=function(){return W_++},Z_={},U_=Z_="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),o&&(i.ie=!0,i.version=o[1]),a&&(i.edge=!0,i.version=a[1]),r&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),X_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},j_={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Y_=Object.prototype.toString,q_=Array.prototype,K_=q_.forEach,$_=q_.filter,J_=q_.slice,Q_=q_.map,tw=q_.reduce,ew={},iw=function(){return ew.createCanvas()};ew.createCanvas=function(){return document.createElement("canvas")};var nw,ow="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var aw=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:iw,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]},bind:m,curry:v,isArray:y,isFunction:x,isString:_,isObject:w,isBuiltInObject:b,isTypedArray:S,isDom:M,eqNaN:I,retrieve:T,retrieve2:A,retrieve3:D,slice:C,normalizeCssArray:L,assert:k,trim:P,setAsPrimitive:N,isPrimitive:O,createHashMap:R,concatArray:z,noop:B}),rw="undefined"==typeof Float32Array?Array:Float32Array,sw=X,lw=j,uw=K,hw=$,cw=(Object.freeze||Object)({create:V,copy:G,clone:F,set:W,add:H,scaleAndAdd:Z,sub:U,len:X,length:sw,lenSquare:j,lengthSquare:lw,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Y,normalize:q,distance:K,dist:uw,distanceSquare:$,distSquare:hw,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:J,applyTransform:Q,min:tt,max:et});it.prototype={constructor:it,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(nt(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(nt(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(nt(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(nt(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(nt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var dw=Array.prototype.slice,fw=function(t){this._$handlers={},this._$eventProcessor=t};fw.prototype={constructor:fw,one:function(t,e,i,n){return at(this,t,e,i,n,!0)},on:function(t,e,i,n){return at(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>3&&(n=dw.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>4&&(n=dw.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var pw="undefined"!=typeof window&&!!window.addEventListener,gw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,mw=pw?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},vw=function(){this._track=[]};vw.prototype={constructor:vw,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=st(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in yw)if(yw.hasOwnProperty(e)){var i=yw[e](this._track,t);if(i)return i}}};var yw={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var a=ft(n)/ft(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=pt(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},xw="silent";vt.prototype.dispose=function(){};var _w=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ww=function(t,e,i,n){fw.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new vt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,it.call(this),this.setHandlerProxy(i)};ww.prototype={constructor:ww,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(d(_w,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=gt(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;a>=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=yt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==xw)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new vw);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ww.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||uw(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(ww,fw),h(ww,it);var bw="undefined"==typeof Float32Array?Array:Float32Array,Sw=(Object.freeze||Object)({create:xt,identity:_t,copy:wt,mul:bt,translate:St,rotate:Mt,scale:It,invert:Tt,clone:At}),Mw=_t,Iw=5e-5,Tw=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Aw=Tw.prototype;Aw.transform=null,Aw.needLocalTransform=function(){return Dt(this.rotation)||Dt(this.position[0])||Dt(this.position[1])||Dt(this.scale[0]-1)||Dt(this.scale[1]-1)};var Dw=[];Aw.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||xt(),i?this.getLocalTransform(n):Mw(n),e&&(i?bt(n,t.transform,n):wt(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(Dw);var a=Dw[0]<0?-1:1,r=Dw[1]<0?-1:1,s=((Dw[0]-a)*o+a)/Dw[0]||0,l=((Dw[1]-r)*o+r)/Dw[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||xt(),Tt(this.invTransform,n)}else n&&Mw(n)},Aw.getLocalTransform=function(t){return Tw.getLocalTransform(this,t)},Aw.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Aw.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Cw=[],Lw=xt();Aw.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;Dt(e-1)&&(e=Math.sqrt(e)),Dt(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},Aw.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(bt(Cw,t.invTransform,e),e=Cw);var i=this.origin;i&&(i[0]||i[1])&&(Lw[4]=i[0],Lw[5]=i[1],bt(Cw,e,Lw),Cw[4]-=i[0],Cw[5]-=i[1],e=Cw),this.setLocalTransform(e)}},Aw.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)},Aw.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},Aw.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},Tw.getLocalTransform=function(t,e){Mw(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),It(e,e,n),o&&Mt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var kw={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kw.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*kw.bounceIn(2*t):.5*kw.bounceOut(2*t-1)+.5}};Ct.prototype={constructor:Ct,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?kw[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Pw=function(){this.head=null,this.tail=null,this._len=0},Nw=Pw.prototype;Nw.insert=function(t){var e=new Ow(t);return this.insertEntry(e),e},Nw.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++},Nw.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Nw.len=function(){return this._len},Nw.clear=function(){this.head=this.tail=null,this._len=0};var Ow=function(t){this.value=t,this.next,this.prev},Ew=function(t){this._list=new Pw,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rw=Ew.prototype;Rw.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ow(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Rw.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rw.clear=function(){this._list.clear(),this._map={}};var zw={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]},Bw=new Ew(20),Vw=null,Gw=Ut,Fw=Xt,Ww=(Object.freeze||Object)({parse:Gt,lift:Ht,toHex:Zt,fastLerp:Ut,fastMapToColor:Gw,lerp:Xt,mapToColor:Fw,modifyHSL:jt,modifyAlpha:Yt,stringify:qt}),Hw=Array.prototype.slice,Zw=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Kt,this._setter=n||$t,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Zw.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ae(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,o=0;for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var r=le(this,t,function(){--o||n._doneCallback()},this._tracks[a],a,e);r&&(this._clipList.push(r),o++,this.animation&&this.animation.addClip(r),i=r)}if(i){var s=i.onframe;i.onframe=function(t,e){s(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return o||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Uw=1;"undefined"!=typeof window&&(Uw=Math.max(window.devicePixelRatio||1,1));var Xw=Uw,jw=function(){},Yw=jw,qw=function(){this.animators=[]};qw.prototype={constructor:qw,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var u=0,h=r.length;u<h;u++)s&&(s=s[r[u]]);s&&(i=s)}else i=o;if(i){var c=o.animators,d=new Zw(i,e);return d.during(function(t){o.dirty(n)}).done(function(){c.splice(l(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d}Yw('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){ue(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){ue(this,t,e,i,n,o,a,!0)}};var Kw=function(t){Tw.call(this,t),fw.call(this,t),qw.call(this,t),this.id=t.id||H_()};Kw.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(w(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},h(Kw,qw),h(Kw,Tw),h(Kw,fw);var $w=Q,Jw=Math.min,Qw=Math.max;de.prototype={constructor:de,union:function(t){var e=Jw(t.x,this.x),i=Jw(t.y,this.y);this.width=Qw(t.x+t.width,this.x+this.width)-e,this.height=Qw(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],n=[];return function(o){if(o){t[0]=i[0]=this.x,t[1]=n[1]=this.y,e[0]=n[0]=this.x+this.width,e[1]=i[1]=this.y+this.height,$w(t,t,o),$w(e,e,o),$w(i,i,o),$w(n,n,o),this.x=Jw(t[0],e[0],i[0],n[0]),this.y=Jw(t[1],e[1],i[1],n[1]);var a=Qw(t[0],e[0],i[0],n[0]),r=Qw(t[1],e[1],i[1],n[1]);this.width=a-this.x,this.height=r-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,o=xt();return St(o,o,[-e.x,-e.y]),It(o,o,[i,n]),St(o,o,[t.x,t.y]),o},intersect:function(t){if(!t)return!1;t instanceof de||(t=de.create(t));var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<r||s<i||a<l||u<o)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new de(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},de.create=function(t){return new de(t.x,t.y,t.width,t.height)};var tb=function(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};tb.prototype={constructor:tb,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof tb&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof tb&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof tb&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new de(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},u(tb,Kw);var eb=32,ib=7,nb=function(){this._roots=[],this._displayList=[],this._displayListLen=0};nb.prototype={constructor:nb,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,U_.canvasSupported&&_e(i,we)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),a=o,o=o.clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof tb&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(i=0;i<this._roots.length;i++){var e=this._roots[i];e instanceof tb&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var i=0,n=t.length;i<n;i++)this.delRoot(t[i]);else{var o=l(this._roots,t);o>=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof tb&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:we};var ob={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ab=function(t,e,i){return ob.hasOwnProperty(e)?i*=t.dpr:i},rb={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},sb=9,lb=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ub=function(t){this.extendFrom(t,!1)};ub.prototype={constructor:ub,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==rb.STYLE_BIND;t.__attrCachedBy=rb.STYLE_BIND;for(var r=0;r<lb.length;r++){var s=lb[r],l=s[0];(a||n[l]!==o[l])&&(t[l]=ab(t,l,n[l]||s[1]))}if((a||n.fill!==o.fill)&&(t.fillStyle=n.fill),(a||n.stroke!==o.stroke)&&(t.strokeStyle=n.stroke),(a||n.opacity!==o.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(a||n.blend!==o.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Se:be)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var hb=ub.prototype,cb=0;cb<lb.length;cb++){var db=lb[cb];db[0]in hb||(hb[db[0]]=db[1])}ub.getGradient=hb.getGradient;var fb=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};fb.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var pb=function(t,e,i){var n;i=i||Xw,"string"==typeof t?n=Ie(t,e,i):w(t)&&(t=(n=t).id),this.id=t,this.dom=n;var o=n.style;o&&(n.onselectstart=Me,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};pb.prototype={constructor:pb,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Ie("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i=this.dom,n=this.ctx,o=i.width,a=i.height,e=e||this.clearColor,r=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(r&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/l,a/l)),n.clearRect(0,0,o,a),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||ub.getGradient(n,e,{x:0,y:0,width:o,height:a}),e.__canvasGradient=u):e.image&&(u=fb.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=u||e,n.fillRect(0,0,o,a),n.restore()}if(r){var h=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(h,0,0,o,a),n.restore()}}};var gb="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},mb=new Ew(50),vb={},yb=0,xb=5e3,_b=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,wb="12px sans-serif",bb={};bb.measureText=function(t,e){var i=s();return i.font=e||wb,i.measureText(t)};var Sb=wb,Mb={left:1,right:1,center:1},Ib={top:1,bottom:1,middle:1},Tb=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Ab=new de,Db=function(){};Db.prototype={constructor:Db,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&Ye(i);var n=i.text;if(null!=n&&(n+=""),ci(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&(Ab.copy(e),Ab.applyTransform(o),e=Ab),Ke(this,t,n,i,e,sb),t.restore()}}},di.prototype={constructor:di,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Kw.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new ub(t,this),this.dirty(!1),this}},u(di,Kw),h(di,Db),fi.prototype={constructor:fi,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=Ae(n,this._image,this,this.onload);if(o&&Ce(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,u=o.width/o.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(o,h,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(o,h,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new de(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},u(fi,di);var Cb=new de(0,0,0,0),Lb=new de(0,0,0,0),kb=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=a({},i||{}),this.dpr=i.devicePixelRatio||Xw,this._singleCanvas=n,this.root=t;var o=t.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var r=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,u=t.height;null!=i.width&&(l=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new pb(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[314159]=h,h.zlevel=314159,r.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=xi(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};kb.prototype={constructor:kb,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],a=this._layers[o];if(!a.__builtin__&&a.refresh){var r=0===n?this._backgroundColor:null;a.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=l(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){_e(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;gb(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,r=0;r<i.length;r++){var s=i[r],l=s.ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,f=c&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(h===s.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||s.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var m=h;m<s.__endIndex;m++){var v=t[m];if(this._doPaintEl(v,s,e,u),v.__dirty=v.__dirtyText=!1,c&&Date.now()-f>15)break}s.__drawIndex=m,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return U_.wxa&&d(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!mi(t,this._width,this._height))){var r=t.__clipPaths;n.prevElClipPaths&&!vi(r,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),yi(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new pb("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&n(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t])Yw("ZLevel "+t+" has been used already");else if(gi(e)){if(o>0&&t>n[0]){for(r=0;r<o-1&&!(n[r]<t&&n[r+1]>t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Yw("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)i=o[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(o=1;o<t.length;o++)if((r=t[o]).zlevel!==t[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,n=0,o=0;o<t.length;o++){var a,r=t[o],s=r.zlevel;r.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,n=1):a=this.getLayer(s+(n>0?.01:0),this._needsManuallyCompositing),a.__builtin__||Yw("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o<this._zlevelList.length;o++){var a=this._zlevelList[o];a!==t&&a!==t+.01||n(this._layers[a],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(l(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);d(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new pb("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||pi(s[i])||pi(r.style[i]))-(pi(s[o])||0)-(pi(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+r),c=Math.max(u/2,s+r),d=Math.max(u/2,-l+r),f=Math.max(u/2,l+r),p=o.width+h+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new fi({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Pb=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,fw.call(this)};Pb.prototype={constructor:Pb,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=l(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=o.length;for(r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(gb(t),!e._paused&&e._update())}var e=this;this._running=!0,gb(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new Zw(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},h(Pb,fw);var Nb=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ob=["touchstart","touchend","touchmove"],Eb={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Rb=f(Nb,function(t){var e=t.replace("mouse","pointer");return Eb[e]?e:t}),zb={mousemove:function(t){t=ut(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=ut(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),zb.mousemove.call(this,t),zb.mousedown.call(this,t),wi(this)},touchmove:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),zb.mousemove.call(this,t),wi(this)},touchend:function(t){(t=ut(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),zb.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&zb.click.call(this,t),wi(this)},pointerdown:function(t){zb.mousedown.call(this,t)},pointermove:function(t){bi(t)||zb.mousemove.call(this,t)},pointerup:function(t){zb.mouseup.call(this,t)},pointerout:function(t){bi(t)||zb.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){zb[t]=function(e){e=ut(this.dom,e),this.trigger(t,e)}});var Bb=Mi.prototype;Bb.dispose=function(){for(var t=Nb.concat(Ob),e=0;e<t.length;e++){var i=t[e];ct(this.dom,_i(i),this._handlers[i])}},Bb.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},h(Mi,fw);var Vb=!U_.canvasSupported,Gb={canvas:kb},Fb={},Wb=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new nb,a=i.renderer;if(Vb){if(!Gb.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Gb[a]||(a="canvas");var r=new Gb[a](e,o,i,t);this.storage=o,this.painter=r;var s=U_.node||U_.worker?null:new Mi(r.getViewportRoot());this.handler=new ww(o,r,s,r.root),this.animation=new Pb({stage:{update:m(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(n)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(n)}};Wb.prototype={constructor:Wb,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},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,Ai(this.id)}};var Hb=(Object.freeze||Object)({version:"4.0.7",init:Ii,dispose:function(t){if(t)t.dispose();else{for(var e in Fb)Fb.hasOwnProperty(e)&&Fb[e].dispose();Fb={}}return this},getInstance:function(t){return Fb[t]},registerPainter:Ti}),Zb=d,Ub=w,Xb=y,jb="series\0",Yb=["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"],qb=0,Kb=".",$b="___EC__COMPONENT__CONTAINER___",Jb=0,Qb=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var o={},a=0;a<t.length;a++){var r=t[a][1];if(!(i&&l(i,r)>=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},tS=Qb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eS={getLineStyle:function(t){var e=tS(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},iS=Qb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),nS={getAreaStyle:function(t,e){return iS(this,t,e)}},oS=Math.pow,aS=Math.sqrt,rS=1e-8,sS=1e-4,lS=aS(3),uS=1/3,hS=V(),cS=V(),dS=V(),fS=Math.min,pS=Math.max,gS=Math.sin,mS=Math.cos,vS=2*Math.PI,yS=V(),xS=V(),_S=V(),wS=[],bS=[],SS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},MS=[],IS=[],TS=[],AS=[],DS=Math.min,CS=Math.max,LS=Math.cos,kS=Math.sin,PS=Math.sqrt,NS=Math.abs,OS="undefined"!=typeof Float32Array,ES=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ES.prototype={constructor:ES,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=NS(1/Xw/t)||0,this._uy=NS(1/Xw/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(SS.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=NS(t-this._xi)>this._ux||NS(e-this._yi)>this._uy||this._len<5;return this.addData(SS.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(SS.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(SS.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(SS.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=LS(o)*i+t,this._yi=kS(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(SS.R,t,e,i,n),this},closePath:function(){this.addData(SS.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!OS||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();OS&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=PS(h*h+c*c),f=l,p=u,g=r.length;for(h/=d,c/=d,a<0&&(a=o+a),f-=(a%=o)*h,p-=a*c;h>0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&f<l||h<0&&f>l||c>0&&p<u||c<0&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?DS(f,t):CS(f,t),c>=0?DS(p,e):CS(p,e));h=f-t,c=p-e,this._dashOffset=-PS(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=tn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=PS(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-PS(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,OS&&(this.data=new Float32Array(t)))},getBoundingRect:function(){MS[0]=MS[1]=TS[0]=TS[1]=Number.MAX_VALUE,IS[0]=IS[1]=AS[0]=AS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;a<t.length;){var r=t[a++];switch(1===a&&(n=e=t[a],o=i=t[a+1]),r){case SS.M:e=n=t[a++],i=o=t[a++],TS[0]=n,TS[1]=o,AS[0]=n,AS[1]=o;break;case SS.L:pn(e,i,t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.C:gn(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.Q:mn(e,i,t[a++],t[a++],t[a],t[a+1],TS,AS),e=t[a++],i=t[a++];break;case SS.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(n=LS(c)*u+s,o=kS(c)*h+l),vn(s,l,u,h,c,d,f,TS,AS),e=LS(d)*u+s,i=kS(d)*h+l;break;case SS.R:pn(n=e=t[a++],o=i=t[a++],n+t[a++],o+t[a++],TS,AS);break;case SS.Z:e=n,i=o}tt(MS,MS,TS),et(IS,IS,AS)}return 0===a&&(MS[0]=MS[1]=IS[0]=IS[1]=0),new de(MS[0],MS[1],IS[0]-MS[0],IS[1]-MS[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=o=s[c+1]),d){case SS.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case SS.L:a=s[c++],r=s[c++],(NS(a-n)>l||NS(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case SS.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=LS(v)*g+f,i=kS(v)*m+p),n=LS(M)*g+f,o=kS(M)*m+p;break;case SS.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case SS.Z:t.closePath(),n=e,o=i}}}},ES.CMD=SS;var RS=2*Math.PI,zS=2*Math.PI,BS=ES.CMD,VS=2*Math.PI,GS=1e-4,FS=[-1,-1,-1],WS=[-1,-1],HS=fb.prototype.getCanvasPattern,ZS=Math.abs,US=new ES(!0);Pn.prototype={constructor:Pn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||US,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=HS.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=HS.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ES},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new ES),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),kn(a,r/s,t,e)))return!0}if(o.hasFill())return Ln(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):di.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ZS(t[0]-1)>1e-10&&ZS(t[3]-1)>1e-10?Math.sqrt(ZS(t[0]*t[3]-t[2]*t[1])):1}},Pn.extend=function(t){var e=function(e){Pn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,Pn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Pn,di);var XS=ES.CMD,jS=[[],[],[]],YS=Math.sqrt,qS=Math.atan2,KS=function(t,e){var i,n,o,a,r,s,l=t.data,u=XS.M,h=XS.C,c=XS.L,d=XS.R,f=XS.A,p=XS.Q;for(o=0,a=0;o<l.length;){switch(i=l[o++],a=o,n=0,i){case u:case c:n=1;break;case h:n=3;break;case p:n=2;break;case f:var g=e[4],m=e[5],v=YS(e[0]*e[0]+e[1]*e[1]),y=YS(e[2]*e[2]+e[3]*e[3]),x=qS(-e[1]/y,e[0]/v);l[o]*=v,l[o++]+=g,l[o]*=y,l[o++]+=m,l[o++]*=v,l[o++]*=y,l[o++]+=x,l[o++]+=x,a=o+=2;break;case d:s[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[o++],s[1]+=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(r=0;r<n;r++)(s=jS[r])[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}},$S=Math.sqrt,JS=Math.sin,QS=Math.cos,tM=Math.PI,eM=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},iM=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(eM(t)*eM(e))},nM=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(iM(t,e))},oM=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,aM=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,rM=function(t){di.call(this,t)};rM.prototype={constructor:rM,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&Ye(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),ci(n,i)?(this.setTransform(t),Ke(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=rb.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Ye(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=ke(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,si(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},u(rM,di);var sM=Pn.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),lM=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],uM=function(t){return U_.browser.ie&&U_.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;o<i.length;o++){var a=i[o],r=a&&a.shape,s=a&&a.type;if(r&&("sector"===s&&r.startAngle===r.endAngle||"rect"===s&&(!r.width||!r.height))){for(l=0;l<lM.length;l++)lM[l][2]=n[lM[l][0]],n[lM[l][0]]=lM[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<lM.length;l++)n[lM[l][0]]=lM[l][2]}:t},hM=Pn.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+i,h*o+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),cM=Pn.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}}),dM=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=K(t[a-1],t[a]);var r=o/2;r=r<i?i:r;for(a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Bn(s[0],f[0],l[0],u[0],d,p,g),Bn(s[1],f[1],l[1],u[1],d,p,g)])}return n},fM=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)tt(r,r,t[d]),et(s,s,t[d]);tt(r,r,n[0]),et(s,s,n[1])}for(var d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(F(t[d]));continue}o=t[d-1],a=t[d+1]}U(u,a,o),Y(u,u,e);var g=K(p,o),m=K(p,a),v=g+m;0!==v&&(g/=v,m/=v),Y(h,u,-g),Y(c,u,m);var y=H([],p,h),x=H([],p,c);n&&(et(y,y,r),tt(y,y,s),et(x,x,r),tt(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},pM=Pn.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Vn(t,e,!0)}}),gM=Pn.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Vn(t,e,!1)}}),mM=Math.round,vM={},yM=Pn.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(Fn(vM,e,this.style),i=vM.x,n=vM.y,o=vM.width,a=vM.height,vM.r=e.r,e=vM):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?je(t,e):t.rect(i,n,o,a),t.closePath()}}),xM={},_M=Pn.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(Gn(xM,e,this.style),i=xM.x1,n=xM.y1,o=xM.x2,a=xM.y2):(i=e.x1,n=e.y1,o=e.x2,a=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),wM=[],bM=Pn.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(cn(i,r,o,h,wM),r=wM[1],o=wM[2],cn(n,s,a,h,wM),s=wM[1],a=wM[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(an(i,r,l,o,h,wM),r=wM[1],l=wM[2],o=wM[3],an(n,s,u,a,h,wM),s=wM[1],u=wM[2],a=wM[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return Hn(this.shape,t,!1)},tangentAt:function(t){var e=Hn(this.shape,t,!0);return q(e,e)}}),SM=Pn.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),MM=Pn.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Pn.prototype.getBoundingRect.call(this)}}),IM=function(t){this.colorStops=t||[]};IM.prototype={constructor:IM,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var TM=function(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,IM.call(this,o)};TM.prototype={constructor:TM},u(TM,IM);var AM=function(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,IM.call(this,n)};AM.prototype={constructor:AM},u(AM,IM),Zn.prototype.incremental=!0,Zn.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Zn.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Zn.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Zn.prototype.eachPendingDisplayable=function(t){for(e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Zn.prototype.update=function(){this.updateTransform();for(t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Zn.prototype.brush=function(t,e){for(i=this._cursor;i<this._displayables.length;i++)(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);this._cursor=i;for(var i=0;i<this._temporaryDisplayables.length;i++){var n=this._temporaryDisplayables[i];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var DM=[];Zn.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new de(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(DM)),t.union(n)}this._rect=t}return this._rect},Zn.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},u(Zn,di);var CM=Math.round,LM=Math.max,kM=Math.min,PM={},NM=1,OM=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new Pn(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r},EM=R(),RM=0,zM=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:NM,extendShape:Un,extendPath:function(t,e){return zn(t,e)},makePath:Xn,makeImage:jn,mergePath:OM,resizePath:qn,subPixelOptimizeLine:Kn,subPixelOptimizeRect:$n,subPixelOptimize:Jn,setElementHoverStyle:ro,isInEmphasis:so,setHoverStyle:fo,setAsHoverStyleTrigger:po,setLabelStyle:go,setTextStyle:mo,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,vo(t,e,o,n)},getFont:So,updateProps:Io,initProps:To,getTransform:Ao,applyTransform:Do,transformDirection:Co,groupTransition:Lo,clipPointsByRect:ko,clipRectByRect:function(t,e){var i=LM(t.x,e.x),n=kM(t.x+t.width,e.x+e.width),o=LM(t.y,e.y),a=kM(t.y+t.height,e.y+e.height);if(n>=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Po,Group:tb,Image:fi,Text:rM,Circle:sM,Sector:hM,Ring:cM,Polygon:pM,Polyline:gM,Rect:yM,Line:_M,BezierCurve:bM,Arc:SM,IncrementalDisplayable:Zn,CompoundPath:MM,LinearGradient:TM,RadialGradient:AM,BoundingRect:de}),BM=["textStyle","color"],VM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(BM):null)},getFont:function(){return So({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ke(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},GM=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),FM={getItemStyle:function(t,e){var i=GM(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},WM=h,HM=Bi();No.prototype={constructor:No,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Oo(this.option,this.parsePath(t),!e&&Eo(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Eo(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:Oo(this.option,t=this.parsePath(t));return e=e||(i=Eo(this,t))&&i.getModel(t),new No(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){HM(this).getParent=t},isAnimationEnabled:function(){if(!U_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ji(No),Yi(No),WM(No,eS),WM(No,nS),WM(No,VM),WM(No,FM);var ZM=0,UM=1e-4,XM=9007199254740991,jM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,YM=(Object.freeze||Object)({linearMap:Bo,parsePercent:Vo,round:Go,asc:Fo,getPrecision:Wo,getPrecisionSafe:Ho,getPixelPrecision:Zo,getPercentWithPrecision:Uo,MAX_SAFE_INTEGER:XM,remRadian:Xo,isRadianAroundZero:jo,parseDate:Yo,quantity:qo,nice:$o,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:Jo,isNumeric:Qo}),qM=L,KM=/([&<>"'])/g,$M={"&":"&","<":"<",">":">",'"':""","'":"'"},JM=["a","b","c","d","e","f","g"],QM=function(t,e){return"{"+t+(null==e?"":e)+"}"},tI=ze,eI=(Object.freeze||Object)({addCommas:ta,toCamelCase:ea,normalizeCssArray:qM,encodeHTML:ia,formatTpl:na,formatTplSimple:oa,getTooltipMarker:aa,formatTime:sa,capitalFirst:la,truncateText:tI,getTextBoundingRect:function(t){return ke(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return ke(t,e,i,n,o,s,a,r)}}),iI=d,nI=["left","right","top","bottom","width","height"],oI=[["width","left","right"],["height","top","bottom"]],aI=ua,rI=(v(ua,"vertical"),v(ua,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),sI=Bi(),lI=No.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){No.call(this,t,e,i,n),this.uid=Ro("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&pa(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&pa(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=sI(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultOption;o&&e.push(o),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});$i(lI,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Ui(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Ui(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(lI),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originalDeps=e(r),t);s.entryCount=u.length,0===s.entryCount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(lI,function(t){var e=[];return d(lI.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Ui(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(lI,rI);var uI="";"undefined"!=typeof navigator&&(uI=navigator.platform||"");var hI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:uI.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},cI=Bi(),dI={clearColorPalette:function(){cI(this).colorIdx=0,cI(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=cI(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Di(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?va(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},fI={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),xa(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),xa(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),xa(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),xa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),xa(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();d(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),xa(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}},pI="original",gI="arrayRows",mI="objectRows",vI="keyedColumns",yI="unknown",xI="typedArray",_I="column",wI="row";_a.seriesDataToSource=function(t){return new _a({data:t,sourceFormat:S(t)?xI:pI,fromDataset:!1})},Yi(_a);var bI=Bi(),SI="\0_ec_inner",MI=No.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new No(i),this._optionManager=n},setOption:function(t,e){k(!(SI in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Ea.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&d(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];Sa(this),d(t,function(t,o){null!=t&&(lI.hasClass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),lI.topologicalTravel(r,lI.getAllClassMainTypes(),function(i,n){var r=Di(t[i]),s=Pi(o.get(i),r);Ni(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=za(i,n,t.exist))});var l=Ra(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"Empty component definition"),s){var u=lI.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&Ba(this,o.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(lI.hasClass(i)){for(var n=(e=Di(e)).length-1;n>=0;n--)Ei(e[n])&&e.splice(n,1);t[i]=e}}),delete t[SI],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return Va(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Va(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ba(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Ba(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),lI.topologicalTravel(i,lI.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!Na(e,t))&&e.restoreData()})})}});h(MI,dI);var II=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],TI={};Fa.prototype={constructor:Fa,create:function(t,e){var i=[];d(TI,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Fa.register=function(t,e){TI[t]=e},Fa.get=function(t){return TI[t]};var AI=d,DI=i,CI=f,LI=n,kI=/^(min|max)?(.+)$/;Wa.prototype={constructor:Wa,setOption:function(t,e){t&&d(Di(t.series),function(t){t&&t.data&&S(t.data)&&N(t.data)}),t=DI(t,!0);var i=this._optionBackup,n=Ha.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ja(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=CI(e.timelineOptions,DI),this._mediaList=CI(e.mediaList,DI),this._mediaDefault=DI(e.mediaDefault),this._currentMediaIndices=[],DI(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=DI(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s<l;s++)Za(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!Xa(a,this._currentMediaIndices)&&(r=CI(a,function(t){return DI(-1===t?o.option:n[t].option)})),this._currentMediaIndices=a,r}};var PI=d,NI=w,OI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],EI=function(t,e){PI(tr(t.series),function(t){NI(t)&&Qa(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),PI(i,function(e){PI(tr(t[e]),function(t){t&&($a(t,"axisLabel"),$a(t.axisPointer,"label"))})}),PI(tr(t.parallel),function(t){var e=t&&t.parallelAxisDefault;$a(e,"axisLabel"),$a(e&&e.axisPointer,"label")}),PI(tr(t.calendar),function(t){qa(t,"itemStyle"),$a(t,"dayLabel"),$a(t,"monthLabel"),$a(t,"yearLabel")}),PI(tr(t.radar),function(t){$a(t,"name")}),PI(tr(t.geo),function(t){NI(t)&&(Ja(t),PI(tr(t.regions),function(t){Ja(t)}))}),PI(tr(t.timeline),function(t){Ja(t),qa(t,"label"),qa(t,"itemStyle"),qa(t,"controlStyle",!0);var e=t.data;y(e)&&d(e,function(t){w(t)&&(qa(t,"label"),qa(t,"itemStyle"))})}),PI(tr(t.toolbox),function(t){qa(t,"iconStyle"),PI(t.feature,function(t){qa(t,"iconStyle")})}),$a(er(t.axisPointer),"label"),$a(er(t.tooltip).axisPointer,"label")},RI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],zI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BI=function(t,e){EI(t,e),t.series=Di(t.series),d(t.series,function(t){if(w(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=ir(t,"pointer.color");null!=i&&nr(t,"itemStyle.normal.color",i)}or(t)}}),t.dataRange&&(t.visualMap=t.dataRange),d(zI,function(e){var i=t[e];i&&(y(i)||(i=[i]),d(i,function(t){or(t)}))})},VI=rr.prototype;VI.pure=!1,VI.persistent=!0,VI.getSource=function(){return this._source};var GI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:ur},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:sr,getItem:lr,appendData:ur},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var e=this._data;d(t,function(t,i){for(var n=e[i]||(e[i]=[]),o=0;o<(t||[]).length;o++)n.push(t[o])})}},original:{count:sr,getItem:lr,appendData:ur},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},FI={arrayRows:hr,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:hr,original:function(t,e,i,n){var o=Li(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:hr},WI={arrayRows:cr,objectRows:function(t,e,i,n){return dr(t[e],this._dimensionInfos[e])},keyedColumns:cr,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&ki(t)&&(this.hasItemOption=!0),dr(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},HI=/\{@(.+?)\}/g,ZI={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=this.ecModel.getComponent("tooltip"),u=Hi(l&&l.get("renderMode")),h=this.mainType,c="series"===h;return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,marker:aa({color:s,renderMode:u}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,o){e=e||"normal";var a=this.getData(i),r=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===e?[o||"label","formatter"]:[e,o||"label","formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?na(l,s).replace(HI,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),fr(a,t,i)}):void 0},getRawValue:function(t,e){return fr(this.getData(e),t)},formatTooltip:function(){}},UI=mr.prototype;UI.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;r===l&&s===u||(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=yr(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||d<f)){var p=this._progress;if(y(p))for(var g=0;g<p.length;g++)vr(this,p[g],d,f,l,u);else vr(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var XI=function(){function t(){return n<i?n++:null}function e(){var t=n%r*o+Math.ceil(n/r),e=n>=i?null:t<a?t:n;return n++,e}var i,n,o,a,r,s={reset:function(l,u,h,c){n=l,i=u,o=h,a=c,r=Math.ceil(a/o),s.next=o>1&&a>0?e:t}};return s}();UI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},UI.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},UI.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},UI.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},UI.getUpstream=function(){return this._upstream},UI.getDownstream=function(){return this._downstream},UI.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var jI=Bi(),YI=lI.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=gr({count:wr,reset:br}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Ma(this);var o=this.getInitialData(t,i);Mr(o,this),this.dataTask.context.data=o,jI(this).dataBeforeProcessed=o,xr(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{},a=this.subType;lI.hasClass(a)&&(a+="Series"),n(t,e.getTheme().get(this.subType)),n(t,this.getDefaultOption()),Ci(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&pa(t,o,i)},mergeOption:function(t,e){t=n(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&pa(this.option,t,i),Ma(this);var o=this.getInitialData(t,e);Mr(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,jI(this).dataBeforeProcessed=o,xr(this)},fillDataTextStyle:function(t){if(t&&!S(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Ci(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Tr(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return jI(this).data},setData:function(t){var e=Tr(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}jI(this).data=t},getSource:function(){return ba(this)},getRawData:function(){return jI(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){function o(t){return{renderMode:n,content:ia(ta(t)),style:l}}var a=this,r="html"===(n=n||"html")?"<br/>":"\n",s="richText"===n,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(i){function o(t,i){var o=h.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var c=o.type,d="sub"+a.seriesIndex+"at"+u,p=aa({color:v,type:"subItem",renderMode:n,markerId:d}),g="string"==typeof p?p:p.content,m=(r?g+ia(o.displayName||"-")+": ":"")+ia("ordinal"===c?t+"":"time"===c?e?"":sa("yyyy/MM/dd hh:mm:ss",t):ta(t));m&&f.push(m),s&&(l[d]=v,++u)}}var r=p(i,function(t,e,i){var n=h.getDimensionInfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayName},0),f=[];c.length?d(c,function(e){o(fr(h,t,e),e)}):d(i,o);var g=r?s?"\n":"<br/>":"",m=g+f.join(g||", ");return{renderMode:n,content:m,style:l}}(g):o(f?fr(h,t,c[0]):m?g[0]:g)).content,_=a.seriesIndex+"at"+u,b=aa({color:v,type:"item",renderMode:n,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;Oi(this)||(M=""),M=M?ia(M)+(e?": ":r):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?ia(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=dI.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});h(YI,ZI),h(YI,dI);var qI=function(){this.group=new tb,this.uid=Ro("viewComponent")};qI.prototype={constructor:qI,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var KI=qI.prototype;KI.updateView=KI.updateLayout=KI.updateVisual=function(t,e,i,n){},ji(qI),$i(qI,{registerWhenExtend:!0});var $I=function(){var t=Bi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}},JI=Bi(),QI=$I();Ar.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Cr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Cr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var tT=Ar.prototype;tT.updateView=tT.updateLayout=tT.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ji(Ar),$i(Ar,{registerWhenExtend:!0}),Ar.markUpdateMethod=function(t,e){JI(t).updateMethod=e};var eT={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)}}},iT="\0__throttleOriginMethod",nT="\0__throttleRate",oT="\0__throttleType",aT={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof IM||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},rT={toolbox:{brush:{title:{rect:"ç©å½¢éæ©",polygon:"åé",lineX:"横åéæ©",lineY:"纵åéæ©",keep:"ä¿æéæ©",clear:"æ¸
é¤éæ©"}},dataView:{title:"æ°æ®è§å¾",lang:["æ°æ®è§å¾","å
³é","å·æ°"]},dataZoom:{title:{zoom:"åºå缩æ¾",back:"åºå缩æ¾è¿å"}},magicType:{title:{line:"åæ¢ä¸ºæçº¿å¾",bar:"åæ¢ä¸ºæ±ç¶å¾",stack:"åæ¢ä¸ºå å ",tiled:"åæ¢ä¸ºå¹³éº"}},restore:{title:"è¿å"},saveAsImage:{title:"ä¿å为å¾ç",lang:["å³é®å¦å为å¾ç"]}},series:{typeNames:{pie:"饼å¾",bar:"æ±ç¶å¾",line:"æçº¿å¾",scatter:"æ£ç¹å¾",effectScatter:"æ¶æ¼ªæ£ç¹å¾",radar:"é·è¾¾å¾",tree:"æ å¾",treemap:"ç©å½¢æ å¾",boxplot:"ç®±åå¾",candlestick:"K线å¾",k:"K线å¾",heatmap:"çåå¾",map:"å°å¾",parallel:"å¹³è¡åæ å¾",lines:"线å¾",graph:"å
³ç³»å¾",sankey:"æ¡åºå¾",funnel:"æ¼æå¾",gauge:"仪表çå¾",pictorialBar:"象形æ±å¾",themeRiver:"䏻颿²³æµå¾",sunburst:"ææ¥å¾"}},aria:{general:{withTitle:"è¿æ¯ä¸ä¸ªå
³äºâ{title}âçå¾è¡¨ã",withoutTitle:"è¿æ¯ä¸ä¸ªå¾è¡¨ï¼"},series:{single:{prefix:"",withName:"å¾è¡¨ç±»åæ¯{seriesType}ï¼è¡¨ç¤º{seriesName}ã",withoutName:"å¾è¡¨ç±»åæ¯{seriesType}ã"},multiple:{prefix:"å®ç±{seriesCount}个å¾è¡¨ç³»åç»æã",withName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ªè¡¨ç¤º{seriesName}ç{seriesType}ï¼",withoutName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ª{seriesType}ï¼",separator:{middle:"ï¼",end:"ã"}}},data:{allData:"å
¶æ°æ®æ¯ââ",partialData:"å
¶ä¸ï¼å{displayCnt}项æ¯ââ",withName:"{name}çæ°æ®æ¯{value}",withoutName:"{value}",separator:{middle:"ï¼",end:""}}}},sT=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=rT.aria,o=0;o<i.length;++o)n=n[i[o]];return n}return e}function o(t){return rT.series.typeNames[t]||"èªå®ä¹å¾"}var a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var r=0;e.eachSeries(function(t,e){++r},this);var s,l=a.get("data.maxCount")||10,u=a.get("series.maxCount")||10,h=Math.min(r,u);if(!(r<1)){var c=function(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}();s=c?i(n("general.withTitle"),{title:c}):n("general.withoutTitle");var f=[];s+=i(n(r>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:r}),e.eachSeries(function(t,e){if(e<h){var a,s=t.get("name"),u="series."+(r>1?"multiple":"single")+".";a=i(a=n(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var c=t.getData();window.data=c,c.count()>l?a+=i(n("data.partialData"),{displayCnt:l}):a+=n("data.allData");for(var d=[],p=0;p<c.count();p++)if(p<l){var g=c.getName(p),m=fr(c,p);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),f.push(a)}}),s+=f.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",s)}}},lT=Math.PI,uT=Er.prototype;uT.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},uT.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},uT.getPipeline=function(t){return this._pipelineMap.get(t)},uT.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},uT.restorePipelines=function(t){var e=this,i=e._pipelineMap=R();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),jr(e,t,t.dataTask)})},uT.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&zr(this,n,o,e,i),n.overallReset&&Br(this,n,o,e,i)},this)},uT.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,jr(this,e,o)},uT.performDataProcessorTasks=function(t,e){Rr(this,this._dataProcessorHandlers,t,e,{block:!0})},uT.performVisualTasks=function(t,e,i){Rr(this,this._visualHandlers,t,e,i)},uT.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},uT.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)})};var hT=uT.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cT=Ur(0);Er.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:Yr(t)}),t.uid=Ro("stageHandler"),e&&(t.visualType=e),t};var dT,fT={},pT={};qr(fT,MI),qr(pT,Ga),fT.eachSeriesByType=fT.eachRawSeriesByType=function(t){dT=t},fT.eachComponent=function(t){"series"===t.mainType&&t.subType&&(dT=t.subType)};var gT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mT={color:gT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],gT]},vT=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],yT={color:vT,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:vT[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:vT},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};yT.categoryAxis.splitLine.show=!1,lI.extend({type:"dataset",defaultOption:{seriesLayoutBy:_I,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wa(this)}}),qI.extend({type:"dataset"});var xT=Pn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),_T=/[\s,]+/;$r.prototype.parse=function(t,e){e=e||{};var i=Kr(t);if(!i)throw new Error("Illegal svg");var n=new tb;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),es(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=P(o).split(_T);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=as(l,a,r),!e.ignoreViewBox)){var c=n;(n=new tb).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new yM({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},$r.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){if(r=bT[i]){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=wT[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},$r.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new rM({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Qr(e,o),es(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var wT={g:function(t,e){var i=new tb;return Qr(e,i),es(t,i,this._defs),i},rect:function(t,e){var i=new yM;return Qr(e,i),es(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new sM;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new _M;return Qr(e,i),es(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new xT;return Qr(e,i),es(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=ts(i));var n=new pM({shape:{points:i||[]}});return Qr(e,n),es(t,n,this._defs),n},polyline:function(t,e){var i=new Pn;Qr(e,i),es(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=ts(n)),new gM({shape:{points:n||[]}})},image:function(t,e){var i=new fi;return Qr(e,i),es(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new tb;return Qr(e,r),es(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new tb;return Qr(e,r),es(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Rn(t.getAttribute("d")||"");return Qr(e,i),es(t,i,this._defs),i}},bT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new TM(e,i,n,o);return Jr(t,a),a},radialgradient:function(t){}},ST={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-align":"textAlign","alignment-baseline":"textBaseline"},MT=/url\(\s*#(.*?)\)/,IT=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,TT=/([^\s:;]+)\s*:\s*([^:;]+)/g,AT=R(),DT={registerMap:function(t,e,i){var n;return y(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),d(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,CT[e])(t)}),AT.set(t,n)},retrieveMap:function(t){return AT.get(t)}},CT={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Kr(t.source)}},LT=k,kT=d,PT=x,NT=w,OT=lI.parseClassType,ET={zrender:"4.0.6"},RT=1e3,zT=1e3,BT=3e3,VT={PROCESSOR:{FILTER:RT,STATISTIC:5e3},VISUAL:{LAYOUT:zT,GLOBAL:2e3,CHART:BT,COMPONENT:4e3,BRUSH:5e3}},GT="__flagInMainProcess",FT="__optionUpdated",WT=/^[a-zA-Z0-9_]+$/;ls.prototype.on=ss("on"),ls.prototype.off=ss("off"),ls.prototype.one=ss("one"),h(ls,fw);var HT=us.prototype;HT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[FT]){var e=this[FT].silent;this[GT]=!0,cs(this),ZT.update.call(this),this[GT]=!1,this[FT]=!1,gs.call(this,e),ms.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),fs(this,n),t.performVisualTasks(n),bs(this,this._model,0,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},HT.getDom=function(){return this._dom},HT.getZr=function(){return this._zr},HT.setOption=function(t,e,i){var n;if(NT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[GT]=!0,!this._model||e){var o=new Wa(this._api),a=this._theme,r=this._model=new MI(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,qT),i?(this[FT]={silent:n},this[GT]=!1):(cs(this),ZT.update.call(this),this._zr.flush(),this[FT]=!1,this[GT]=!1,gs.call(this,n),ms.call(this,n))},HT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},HT.getModel=function(){return this._model},HT.getOption=function(){return this._model&&this._model.getOption()},HT.getWidth=function(){return this._zr.getWidth()},HT.getHeight=function(){return this._zr.getHeight()},HT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},HT.getRenderedCanvas=function(t){if(U_.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},HT.getSvgDataUrl=function(){if(U_.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},HT.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;kT(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return kT(n,function(t){t.group.ignore=!1}),a},HT.getConnectedDataURL=function(t){if(U_.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(eA[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(tA,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(i(t)),f=h.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=iw();p.width=c,p.height=f;var g=Ii(p);return kT(u,function(t){var e=new fi({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},HT.convertToPixel=v(hs,"convertToPixel"),HT.convertFromPixel=v(hs,"convertFromPixel"),HT.containPixel=function(t,e){var i;return t=Vi(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},HT.getVisual=function(t,e){var i=(t=Vi(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},HT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},HT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ZT={prepareAndUpdate:function(t){cs(this),ZT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),fs(this,e),o.update(e,i),xs(e),a.performVisualTasks(e,t),_s(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(U_.canvasSupported)n.setBackgroundColor(r);else{var s=Gt(r);r=qt(s,"rgb"),0===s[3]&&(r="transparent")}Ss(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=R();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),bs(i,e,0,t,a),Ss(e,this._api)}},updateView:function(t){var e=this._model;e&&(Ar.markUpdateMethod(t,"updateView"),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),_s(this,this._model,this._api,t),Ss(e,this._api))},updateVisual:function(t){ZT.update.call(this,t)},updateLayout:function(t){ZT.update.call(this,t)}};HT.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[GT]=!0,i&&cs(this),ZT.update.call(this),this[GT]=!1,gs.call(this,n),ms.call(this,n)}},HT.showLoading=function(t,e){if(NT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),QT[t]){var i=QT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},HT.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},HT.makeActionFromEvent=function(t){var e=a({},t);return e.type=jT[t.type],e},HT.dispatchAction=function(t,e){NT(e)||(e={silent:!!e}),XT[t.type]&&this._model&&(this[GT]?this._pendingActions.push(t):(ps.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&U_.browser.weChat&&this._throttledZrFlush(),gs.call(this,e.silent),ms.call(this,e.silent)))},HT.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},HT.on=ss("on"),HT.off=ss("off"),HT.one=ss("one");var UT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];HT._initEvents=function(){kT(UT,function(t){var e=function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=a({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),kT(jT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},HT.isDisposed=function(){return this._disposed},HT.clear=function(){this.setOption({series:[]},!0)},HT.dispose=function(){if(!this._disposed){this._disposed=!0,Fi(this.getDom(),oA,"");var t=this._api,e=this._model;kT(this._componentsViews,function(i){i.dispose(e,t)}),kT(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete tA[this.id]}},h(us,fw),Ds.prototype={constructor:Ds,normalizeQuery:function(t){var e={},i={},n={};if(_(t)){var o=OT(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};d(t,function(t,o){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=o.lastIndexOf(u);if(h>0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){function n(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var o=this.eventInfo;if(!o)return!0;var a=o.targetEl,r=o.packedEvent,s=o.model,l=o.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return n(u,s,"mainType")&&n(u,s,"subType")&&n(u,s,"index","componentIndex")&&n(u,s,"name")&&n(u,s,"id")&&n(h,r,"name")&&n(h,r,"dataIndex")&&n(h,r,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,r))},afterTrigger:function(){this.eventInfo=null}};var XT={},jT={},YT=[],qT=[],KT=[],$T=[],JT={},QT={},tA={},eA={},iA=new Date-0,nA=new Date-0,oA="_echarts_instance_",aA=Ls;Bs(2e3,aT),Ns(BI),Os(5e3,function(t){var e=R();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(ar)}),Gs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new yM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new SM({shape:{startAngle:-lT/2,endAngle:-lT/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new yM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*lT/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*lT/2}).delay(300).start("circularInOut");var a=new tb;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),Es({type:"highlight",event:"highlight",update:"highlight"},B),Es({type:"downplay",event:"downplay",update:"downplay"},B),Ps("light",mT),Ps("dark",yT);var rA={};Xs.prototype={constructor:Xs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(js(t,{},n,"_oldKeyGetter",this),js(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=i[r=n[a]])?((u=s.length)?(1===u&&(i[r]=null),s=s.unshift()):i[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s=i[r];if(null==s)continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var sA=R(["tooltip","label","itemName","itemId","seriesName"]),lA=w,uA=-1,hA="e\0\0",cA={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},dA="undefined"==typeof Uint32Array?Array:Uint32Array,fA="undefined"==typeof Int32Array?Array:Int32Array,pA="undefined"==typeof Uint16Array?Array:Uint16Array,gA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],mA=["_extent","_approximateExtent","_rawExtent"],vA=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];_(r)&&(r={name:r});var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),i[s]=r,r.index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Ys(this),this._invertedIndicesMap=o,this._calculationInfo={}},yA=vA.prototype;yA.type="list",yA.hasItemOption=!0,yA.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},yA.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},yA.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},yA.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},yA.initData=function(t,e,i){(_a.isInstance(t)||c(t))&&(t=new rr(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=WI[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=WI.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},yA.getProvider=function(){return this._rawData},yA.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},yA.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++)r[v=o[h]]||(r[v]=[1/0,-1/0]),n[v]||(n[v]=[]),tl(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length;for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},el(this)},yA._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=r[p]]||(c[w]=[1/0,-1/0]);var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),tl(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w=r[_],b=a[w][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},el(this)}},yA.count=function(){return this._count},yA.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){n=new e(i);for(o=0;o<i;o++)n[o]=t[o]}else n=new e(t.buffer,0,i)}else for(var n=new(e=$s(this))(this.count()),o=0;o<n.length;o++)n[o]=o;return n},yA.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[t][n][o]},yA.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[n][o]},yA._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},yA.getValues=function(t,e){var i=[];y(t)||(e=t,t=this.dimensions);for(var n=0,o=t.length;n<o;n++)i.push(this.get(t[n],e));return i},yA.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=this._dimensionInfos,n=0,o=e.length;n<o;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},yA.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var i,n=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=e)[0],a=i[1],r=0;r<n;r++){var s=this._getFast(t,this.getRawIndex(r));s<o&&(o=s),s>a&&(a=s)}return i=[o,a],this._extent[t]=i,i},yA.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},yA.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},yA.getCalculationInfo=function(t){return this._calculationInfo[t]},yA.setCalculationInfo=function(t,e){lA(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},yA.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},yA.getMedian=function(t){var e=[];this.each(t,function(t,i){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},yA.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?uA:i},yA.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},yA.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;o=a-1}}return-1},yA.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r<s;r++){var l=e-this.get(t,r),u=Math.abs(l);l<=i&&u<=o&&((u<o||l>=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},yA.getRawIndex=nl,yA.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},yA.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||il(this,this._nameDimIdx,e)||""},yA.getId=function(t){return al(this,this.getRawIndex(t))},yA.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var o=(t=f(rl(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},yA.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=f(rl(t),this.getDimension,this);for(var o=this.count(),a=new($s(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var p=this._getFast(u,d);c=e.call(i,p,h)}else{for(var g=0;g<s;g++)r[g]=this._getFast(u,d);r[g]=h,c=e.apply(i,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?ol:nl,this}},yA.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var o=this.count(),a=new($s(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++)((w=p[m])>=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f<this._chunkCount;f++)for(var p=d[f],_=v[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(w>=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){M=this.getRawIndex(m);((w=this._getFast(s,M))>=l&&w<=u||isNaN(w))&&(a[r++]=M)}else for(m=0;m<o;m++){for(var S=!0,M=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,M))<t[I][0]||w>t[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?ol:nl,this}}},yA.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i),o},yA.map=function(t,e,i,n){i=i||n||this;var o=sl(this,t=f(rl(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?ol:nl;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)h[p]=this.get(t[p],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=a[_];S&&(S[v][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return o},yA.downSample=function(t,e,i,n){for(var o=sl(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new($s(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=_%h;l[Math.floor(_/h)][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=ol,o},yA.getItemModel=function(t){var e=this.hostModel;return new No(this.getRawDataItem(t),e,e&&e.ecModel)},yA.diff=function(t){var e=this;return new Xs(t?t.getIndices():[],this.getIndices(),function(e){return al(t,e)},function(t){return al(e,t)})},yA.getVisual=function(t){var e=this._visual;return e&&e[t]},yA.setVisual=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},yA.setLayout=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},yA.getLayout=function(t){return this._layout[t]},yA.getItemLayout=function(t){return this._itemLayouts[t]},yA.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},yA.clearItemLayouts=function(){this._itemLayouts.length=0},yA.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},yA.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,lA(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},yA.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var xA=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};yA.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(xA,e)),this._graphicEls[t]=e},yA.getItemGraphicEl=function(t){return this._graphicEls[t]},yA.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},yA.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new vA(e,this.hostModel)}if(t._storage=this._storage,Qs(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ol:nl,t},yA.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},yA.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],yA.CHANGABLE_METHODS=["filterSelf","selectRange"];var _A=function(t,e){return e=e||{},hl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};xl.prototype.parse=function(t){return t},xl.prototype.getSetting=function(t){return this._setting[t]},xl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},xl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},xl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},xl.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},xl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},xl.prototype.getExtent=function(){return this._extent.slice()},xl.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},xl.prototype.isBlank=function(){return this._isBlank},xl.prototype.setBlank=function(t){this._isBlank=t},xl.prototype.getLabel=null,ji(xl),$i(xl,{registerWhenExtend:!0}),_l.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,bl);return new _l({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var wA=_l.prototype;wA.getOrdinal=function(t){return wl(this).get(t)},wA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=wl(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var bA=xl.prototype,SA=xl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new _l({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),bA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return bA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(bA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:B,niceExtent:B});SA.create=function(){return new SA};var MA=Go,IA=Go,TA=xl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),TA.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ml(t)},getTicks:function(){return Al(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Ho(t)||0:"auto"===i&&(i=this._intervalPrecision),t=IA(t,i,!0),ta(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=Sl(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=IA(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=IA(Math.ceil(e[1]/o)*o))}});TA.create=function(){return new TA};var AA="__ec_stack_",DA="undefined"!=typeof Float32Array?Float32Array:Array,CA={seriesType:"bar",plan:$I(),reset:function(t){if(Rl(t)&&zl(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=Ol(Pl([t]),n,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var n,h=new DA(2*t.count),c=[],d=[],f=0;null!=(n=t.next());)d[l]=e.get(a,n),d[1-l]=e.get(r,n),c=i.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:Bl(0,o),valueAxisHorizontal:s})}}}}},LA=TA.prototype,kA=Math.ceil,PA=Math.floor,NA=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=o+1:n=o}return i},OA=TA.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return sa(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Go(PA(e[0]/n)*n)),t.fixMax||(e[1]=Go(kA(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0],a=o/t;null!=e&&a<e&&(a=e),null!=i&&a>i&&(a=i);var r=EA.length,s=NA(EA,a,0,r),l=EA[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=$o(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(kA((n[0]-h)/u)*u+h),Math.round(PA((n[1]-h)/u)*u+h)];Tl(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yo(t)}});d(["contain","normalize"],function(t){OA.prototype[t]=function(e){return LA[t].call(this,this.parse(e))}});var EA=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];OA.create=function(t){return new OA({useUTC:t.ecModel.get("useUTC")})};var RA=xl.prototype,zA=TA.prototype,BA=Ho,VA=Go,GA=Math.floor,FA=Math.ceil,WA=Math.pow,HA=Math.log,ZA=xl.extend({type:"log",base:10,$constructor:function(){xl.apply(this,arguments),this._originalScale=new TA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(zA.getTicks.call(this),function(n){var o=Go(WA(this.base,n));return o=n===e[0]&&t.__fixMin?Vl(o,i[0]):o,o=n===e[1]&&t.__fixMax?Vl(o,i[1]):o},this)},getLabel:zA.getLabel,scale:function(t){return t=RA.scale.call(this,t),WA(this.base,t)},setExtent:function(t,e){var i=this.base;t=HA(t)/HA(i),e=HA(e)/HA(i),zA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=RA.getExtent.call(this);e[0]=WA(t,e[0]),e[1]=WA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Vl(e[0],n[0])),i.__fixMax&&(e[1]=Vl(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=HA(t[0])/HA(e),t[1]=HA(t[1])/HA(e),RA.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=qo(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Go(FA(e[0]/n)*n),Go(GA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){zA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){ZA.prototype[t]=function(e){return e=HA(e)/HA(this.base),RA[t].call(this,e)}}),ZA.create=function(){return new ZA};var UA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},XA=Un({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),jA=Un({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),YA=Un({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),qA=Un({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),KA={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},$A={};d({line:_M,rect:yM,roundRect:yM,square:yM,circle:sM,diamond:jA,pin:YA,arrow:qA,triangle:XA},function(t,e){$A[e]=new t});var JA=Un({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=$A[n];"none"!==e.symbolType&&(o||(o=$A[n="rect"]),KA[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),QA={isDimensionStacked:pl,enableDataStack:fl,getStackedDimension:gl},tD=(Object.freeze||Object)({createList:function(t){return ml(t.getSource(),t)},getLayoutRect:ca,dataStack:QA,createScale:function(t,e){var i=e;No.isInstance(e)||h(i=new No(e),UA);var n=Hl(i);return n.setExtent(t[0],t[1]),Wl(n,i),n},mixinAxisModelCommonMethods:function(t){h(t,UA)},completeDimensions:hl,createDimensions:_A,createSymbol:Jl}),eD=1e-8;eu.prototype={constructor:eu,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++)"polygon"===r[s].type&&(fn(r[s].exterior,o,a),tt(i,i,o),et(n,n,a));return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new de(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(tu(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(tu(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n||(n=i/a):i=a*n;for(var r=new de(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)Q(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)Q(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new eu(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var iD=function(t){return iu(t),f(g(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new eu(e.name,o,e.cp);return a.properties=e,a})},nD=Bi(),oD=[0,1],aD=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};aD.prototype={constructor:aD,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Zo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count()),Bo(t,oD,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count());var o=Bo(t,i,oD,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=au(this,e),n=f(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return xu(this,n,i.tickCategoryInterval,o,t.clamp),n},getViewLabels:function(){return ou(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return pu(this)}};var rD=iD,sD={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){sD[t]=aw[t]});var lD={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){lD[t]=zM[t]}),YI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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}});var uD=wu.prototype,hD=wu.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};uD._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Jl(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:bu(n)}),a.drift=Su,this._symbolType=t,this.add(a)},uD.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},uD.getSymbolPath=function(){return this.childAt(0)},uD.getScale=function(){return this.childAt(0).scale},uD.highlight=function(){this.childAt(0).trigger("emphasis")},uD.downplay=function(){this.childAt(0).trigger("normal")},uD.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},uD.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},uD.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=hD(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,Io(l,{scale:bu(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),To(l,h,o,e)}this._seriesModel=o};var cD=["itemStyle"],dD=["emphasis","itemStyle"],fD=["label"],pD=["emphasis","label"];uD._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,u=n&&n.hoverItemStyle,h=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(cD).getItemStyle(["color"]),u=m.getModel(dD).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(fD),f=m.getModel(pD),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=a({},u);var v=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Vo(c[0],i[0]),Vo(c[1],i[1])]),g&&o.attr("cursor",g),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=x?null==_&&(o.__z2Origin=o.z2,o.z2+=x):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;go(v,u,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):_u(t,e)},isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,fo(o),o.__symbolOriginalScale=bu(i),p&&r.isAnimationEnabled()&&o.on("mouseover",Mu).on("mouseout",Iu).on("emphasis",Tu).on("normal",Au)},uD.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Io(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(wu,tb);var gD=Du.prototype;gD.updateData=function(t,e){e=Lu(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=ku(t);o||i.removeAll(),t.diff(o).add(function(n){var o=t.getItemLayout(n);if(Cu(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);Cu(t,h,s,e)?(u?(u.updateData(t,s,r),Io(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},gD.isPersistent=function(){return!0},gD.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},gD.incrementalPrepareUpdate=function(t){this._seriesScope=ku(t),this._data=null,this.group.removeAll()},gD.incrementalUpdate=function(t,e,i){i=Lu(i);for(var n=t.start;n<t.end;n++){var o=e.getItemLayout(n);if(Cu(e,o,n,i)){var a=new this._symbolCtor(e,n,this._seriesScope);a.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(n,a)}}},gD.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var mD=function(t,e,i,n,o,a,r,s){for(var l=Eu(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Pu(o,e,r),v=Pu(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":S=x.idx;u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(Ou(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":var S=x.idx,M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Ou(v,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],T=[],A=[],D=[],C=[],y=0;y<p.length;y++){S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}},vD=tt,yD=et,xD=Z,_D=G,wD=[],bD=[],SD=[],MD=Pn.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=Gu(i,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Ru(i[o-1]);o--);for(;n<o&&Ru(i[n]);n++);}for(;n<o;)n+=zu(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),ID=Pn.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:uM(Pn.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=Gu(i,e.smoothConstraint),l=Gu(n,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Ru(i[a-1]);a--);for(;o<a&&Ru(i[o]);o++);}for(;o<a;){var u=zu(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);zu(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});Ar.extend({type:"line",init:function(){var t=new tb,e=new Du;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=Zu(n,a,Pu(n,a,y)),_=t.get("showSymbol"),w=_&&!h&&Ku(t,a,n),b=this._data;b&&b.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),b.setItemGraphicEl(e,null))}),_||d.remove(),o.add(g);var S=!h&&t.get("step");f&&c.type===n.type&&S===this._step?(v&&!p?p=this._newPolygon(u,x,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(ju(n,!1,!1,t)),_&&d.updateData(a,{isIgnore:w,clipShape:ju(n,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Fu(this._stackedOnPoints,x)&&Fu(this._points,u)||(m?this._updateAnimation(a,x,n,i,S,y):(S&&(u=Yu(u,n,S),x=Yu(x,n,S)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(_&&d.updateData(a,{isIgnore:w,clipShape:ju(n,!1,!0,t)}),S&&(u=Yu(u,n,S),x=Yu(x,n,S)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,x,n,m)),g.setClipPath(ju(n,!0,!1,t)));var M=qu(a,n)||a.getVisual("color");f.useStyle(r(s.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Wu(t.get("smooth")),f.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var T=a.getCalculationInfo("stackedOnSeries"),A=0;p.useStyle(r(l.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Wu(T.get("smooth"))),p.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=x,this._points=u,this._step=S,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(!(a instanceof Array)&&null!=a&&a>=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new wu(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Ar.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Ar.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new MD({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new ID({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=mD(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Yu(u.current,i,o),c=Yu(u.stackedOnCurrent,i,o),d=Yu(u.next,i,o),f=Yu(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,Io(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Io(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++)if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",r.shape.__points[p[t].ptIdx])})},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var TD=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,o){var a=t.getData(),r=t.get("symbol")||e,s=t.get("symbolSize"),l=t.get("symbolKeepAspect");if(a.setVisual({legendSymbol:i||r,symbol:r,symbolSize:s,symbolKeepAspect:l}),!n.isSeriesFiltered(t)){var u="function"==typeof s;return{dataEach:a.hasItemOption||u?function(e,i){if("function"==typeof s){var n=t.getRawValue(i),o=t.getDataParams(i);e.setItemVisual(i,"symbolSize",s(n,o))}if(e.hasItemOption){var a=e.getItemModel(i),r=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0),u=a.getShallow("symbolKeepAspect",!0);null!=r&&e.setItemVisual(i,"symbol",r),null!=l&&e.setItemVisual(i,"symbolSize",l),null!=u&&e.setItemVisual(i,"symbolKeepAspect",u)}}:null}}}}},AD=function(t){return{seriesType:t,plan:$I(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var o=f(i.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),a=o.length,r=e.getCalculationInfo("stackResultDimension");return pl(e,o[0])&&(o[0]=r),pl(e,o[1])&&(o[1]=r),a&&{progress:function(t,e){for(var r=t.end-t.start,s=n&&new Float32Array(r*a),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===a)f=e.get(o[0],l),d=!isNaN(f)&&i.dataToPoint(f,null,c);else{var f=h[0]=e.get(o[0],l),p=h[1]=e.get(o[1],l);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(h,null,c)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):e.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",s)}}}}}},DD={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},CD=function(t,e){return Math.round(t.length/2)},LD=function(t){this._axes={},this._dimList=[],this.name=t||""};LD.prototype={constructor:LD,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return f(this._dimList,Ju,this)},getAxesByScale:function(t){return t=t.toLowerCase(),g(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o],r=this._axes[a];n[a]=r[e](t[a])}return n}},Qu.prototype={constructor:Qu,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),a=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return e=e||[],e[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},u(Qu,LD);var kD=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};kD.prototype={constructor:kD,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(kD,aD);var PD={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ND={};ND.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},PD),ND.valueAxis=n({boundaryGap:[0,0],splitNumber:5},PD),ND.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},ND.valueAxis),ND.logAxis=r({scale:!0,logBase:10},ND.valueAxis);var OD=["value","category","time","log"],ED=function(t,e,i,a){d(OD,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?ga(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&pa(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=_l.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},ND[r+"Axis"],a],!0)})}),lI.registerSubTypeDefaulter(t+"Axis",v(i,t))},RD=lI.extend({type:"cartesian2dAxis",axis:null,init:function(){RD.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){RD.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){RD.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(RD.prototype,UA);var zD={offset:0};ED("x",RD,th,zD),ED("y",RD,th,zD),lI.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var BD=ih.prototype;BD.type="grid",BD.axisPointerEnabled=!0,BD.getRect=function(){return this._rect},BD.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),d(i.x,function(t){Wl(t.scale,t.model)}),d(i.y,function(t){Wl(t.scale,t.model)});var n={};d(i.x,function(t){nh(i,"y",t,n)}),d(i.y,function(t){nh(i,"x",t,n)}),this.resize(this.model,e)},BD.resize=function(t,e,i){function n(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),ah(t,e?o.x:o.y)})}var o=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=jl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},BD.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},BD.getAxes=function(){return this._axesList.slice()},BD.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},BD.getCartesians=function(){return this._coordsList.slice()},BD.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},BD.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},BD._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,u=this._coordsList;return o?l(u,i=o.coordinateSystem)<0&&(i=null):a&&r?i=this.getCartesian(a.componentIndex,r.componentIndex):a?n=this.getAxis("x",a.componentIndex):r?n=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(i=this._coordsList[0]),{cartesian:i,axis:n}},BD.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},BD._initCartesian=function(t,e,i){function n(i){return function(n,s){if(eh(n,t,e)){var l=n.get("position");"x"===i?"top"!==l&&"bottom"!==l&&o[l="bottom"]&&(l="top"===l?"bottom":"top"):"left"!==l&&"right"!==l&&o[l="left"]&&(l="left"===l?"right":"left"),o[l]=!0;var u=new kD(i,Hl(n),[0,0],n.get("type"),l),h="category"===u.type;u.onBand=h&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=this,u.index=s,this._axesList.push(u),a[i][s]=u,r[i]++}}}var o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);this._axesMap=a,d(a.x,function(e,i){d(a.y,function(n,o){var a="x"+i+"y"+o,r=new Qu(a);r.grid=this,r.model=t,this._coordsMap[a]=r,this._coordsList.push(r),r.addAxis(e),r.addAxis(n)},this)},this)},BD._updateScale=function(t,e){function i(t,e,i){d(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,gl(t,i))})}d(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(sh(n)){var o=rh(n),a=o[0],r=o[1];if(!eh(a,e,t)||!eh(r,e,t))return;var s=this.getCartesian(a.componentIndex,r.componentIndex),l=n.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(i(l,u),i(l,h))}},this)},BD.getTooltipAxes=function(t){var e=[],i=[];return d(this.getCartesians(),function(n){var o=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(o);l(e,o)<0&&e.push(o),l(i,a)<0&&i.push(a)}),{baseAxes:e,otherAxes:i}};var VD=["xAxis","yAxis"];ih.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,o){var a=new ih(n,t,e);a.name="grid_"+o,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(t){if(sh(t)){var e=rh(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),i},ih.dimensions=ih.prototype.dimensions=Qu.prototype.dimensions,Fa.register("cartesian2d",ih);var GD=Math.PI,FD=function(t,e){this.opt=e,this.axisModel=t,r(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new tb;var i=new tb({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};FD.prototype={constructor:FD,hasBuilder:function(t){return!!WD[t]},add:function(t){WD[t].call(this)},getGroup:function(){return this.group}};var WD={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],r=[i[1],0];n&&(Q(o,o,n),Q(r,r,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new _M(Kn({anid:"line",shape:{x1:o[0],y1:o[1],x2:r[0],y2:r[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof u&&"number"!=typeof u||(u=[u,u]);var c=u[0],f=u[1];d([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((o[0]-r[0])*(o[0]-r[0])+(o[1]-r[1])*(o[1]-r[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=Jl(l[i],-c/2,-f/2,c,f,s.stroke,!0),a=e.r+e.offset,r=[o[0]+a*Math.cos(t.rotation),o[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=gh(this,t,e);ch(t,mh(this,t,e),i)},axisName:function(){var t=this.opt,e=this.axisModel,i=T(t.axisName,e.get("name"));if(i){var n,o=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,ph(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*GD/180);var f;ph(o)?n=HD(t.rotation,null!=d?d:t.rotation,r):(n=uh(t,o,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?tI(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new rM({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:hh(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});mo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=lh(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},HD=FD.innerTextLayout=function(t,e,i){var n,o,a=Xo(e-t);return jo(a)?(o=i>0?"top":"bottom",n="center"):jo(a-GD)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a<GD?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},ZD=d,UD=v,XD=Ws({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Sh(t),XD.superApply(this,"render",arguments),Dh(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Dh(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),XD.superApply(this,"remove",arguments)},dispose:function(t,e){Ch(this,e),XD.superApply(this,"dispose",arguments)}}),jD=[];XD.registerAxisPointerClass=function(t,e){jD[t]=e},XD.getAxisPointerClass=function(t){return t&&jD[t]};var YD=["axisLine","axisTickLabel","axisName"],qD=["splitArea","splitLine"],KD=XD.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Lh(a,t),s=new FD(t,r);d(YD,s.add,s),this._axisGroup.add(s.getGroup()),d(qD,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Lo(o,this._axisGroup,t),KD.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p<h.length;p++){var g=i.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=s.y,d[0]=g,d[1]=s.y+s.height):(c[0]=s.x,c[1]=g,d[0]=s.x+s.width,d[1]=g);var m=u++%a.length,v=h[p].tickValue;this._axisGroup.add(new _M(Kn({anid:null!=v?"line_"+h[p].tickValue:null,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:r({stroke:a[m]},f),silent:!0})))}}},_splitArea:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),a=o.get("color"),s=e.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:n,clamp:!0});if(l.length){var u=a.length,h=this._splitAreaColors,c=R(),d=0;if(h)for(m=0;m<l.length;m++){var f=h.get(l[m].tickValue);if(null!=f){d=(f+(u-1)*m)%u;break}}var p=i.toGlobalCoord(l[0].coord),g=o.getAreaStyle();a=y(a)?a:[a];for(var m=1;m<l.length;m++){var v,x,_,w,b=i.toGlobalCoord(l[m].coord);i.isHorizontal()?(v=p,x=s.y,_=b-v,w=s.height,p=v+_):(v=s.x,x=p,_=s.width,p=x+(w=b-x));var S=l[m-1].tickValue;null!=S&&c.set(S,d),this._axisGroup.add(new yM({anid:null!=S?"area_"+S:null,shape:{x:v,y:x,width:_,height:w},style:r({fill:a[d]},g),silent:!0})),d=(d+1)%u}this._splitAreaColors=c}}}});KD.extend({type:"xAxis"}),KD.extend({type:"yAxis"}),Ws({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new yM({shape:t.coordinateSystem.getRect(),style:r({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Ns(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Bs(TD("line","circle","line")),zs(AD("line")),Os(VT.PROCESSOR.STATISTIC,function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r=a.getBaseAxis(),s=a.getOtherAxis(r),l=r.getExtent(),u=l[1]-l[0],h=Math.round(n.count()/u);if(h>1){var c;"string"==typeof o?c=DD[o]:"function"==typeof o&&(c=o),c&&t.setData(n.downSample(n.mapDimension(s.dim),1/h,c,CD))}}}}}("line"));var $D=YI.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ml(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});$D.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var JD=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QD={getBarItemStyle:function(t){var e=JD(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},tC=["itemStyle","barBorderWidth"];a(No.prototype,QD),Zs({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;a.diff(r).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=iC[s.type](a,e,i),l=eC[s.type](a,e,i,r,n,u);a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var h=a.getItemModel(e),c=iC[s.type](a,e,h);l?Io(l,{shape:c},u,e):l=eC[s.type](a,e,h,c,n,u,!0),a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Nh(t,u,e):e&&Oh(t,u,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),zh(t,this.group)},_incrementalRenderLarge:function(t,e){zh(e,this.group,!0)},dispose:B,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Oh(e.dataIndex,t,e):Nh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var eC={cartesian2d:function(t,e,i,n,o,r,s){var l=new yM({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],zM[s?"updateProps":"initProps"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startAngle<n.endAngle,u=new hM({shape:r({clockwise:l},n)});if(a){var h=u.shape,c=o?"r":"endAngle",d={};h[c]=o?0:n.startAngle,d[c]=n[c],zM[s?"updateProps":"initProps"](u,{shape:d},a,e)}return u}},iC={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=Rh(i,n),a=n.width>0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},nC=Pn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__valueIdx,a=0;a<i.length;a+=2)n[this.__valueIdx]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});zs(v(El,"bar")),zs(CA),Bs({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var oC=function(t,e,i){e=y(e)&&{coordDimensions:e}||a({},e);var n=t.getSource(),o=_A(n,e),r=new vA(o,t);return r.initData(n,i),r},aC={updateSelectedMap:function(t){this._targetList=y(t)?t.slice():[],this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},R())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},rC=Hs({type:"series.pie",init:function(t){rC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){rC.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return oC(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();n<o;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:pr(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=rC.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Uo(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});h(rC,aC);var sC=Fh.prototype;sC.updateData=function(t,e,i){function n(){s.stopAnimation(!0),s.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")}function o(){s.stopAnimation(!0),s.animateTo({shape:{r:h.r}},300,"elasticOut")}var s=this.childAt(0),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=a({},h);c.label=null,i?(s.setShape(c),"scale"===l.getShallow("animationType")?(s.shape.r=h.r0,To(s,{shape:{r:h.r}},l,e)):(s.shape.endAngle=h.startAngle,Io(s,{shape:{endAngle:h.endAngle}},l,e))):Io(s,{shape:c},l,e);var d=t.getItemVisual(e,"color");s.useStyle(r({lineJoin:"bevel",fill:d},u.getModel("itemStyle").getItemStyle())),s.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var f=u.getShallow("cursor");f&&s.attr("cursor",f),Gh(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),s.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&l.isAnimationEnabled()&&s.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),fo(this)},sC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=h.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},u(Fh,tb);Ar.extend({type:"pie",init:function(){var t=new tb;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=v(Vh,this.uid,t,s,i),c=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new Fh(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",h),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),c&&i.on("click",h),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==u){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new hM({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return To(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var lC=function(t,e){d(e,function(e){e.update="updateView",Es(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},uC=function(t){return{getTargetSeries:function(e){var i={},n=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each(function(t){var e=o.getRawIndex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getItemVisual(a,"color",!0);if(r)i.setItemVisual(e,"color",r);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=a&&o.setItemVisual(a,"color",s)}})}}},hC=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getItemLayout(i),f=r.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),A=I+(_<0?-1:1)*y,D=T;n=A+(_<0?-5:5),u=D,h=[[S,M],[I,T],[A,D]]}c=b?"center":_>0?"left":"right"}var C=p.getFont(),L=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ke(t.getFormattedLabel(i,"normal")||r.getName(i),C,c,"top");l=!!L,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Hh(s,o,a,e,i,n)},cC=2*Math.PI,dC=Math.PI/180,fC=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o<i.length;o++)if(!i[o].isSelected(e))return!1;return!0})}}}};lC("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Bs(uC("pie")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),o=t.get("center"),a=t.get("radius");y(a)||(a=[0,a]),y(o)||(o=[o,o]);var r=i.getWidth(),s=i.getHeight(),l=Math.min(r,s),u=Vo(o[0],r),h=Vo(o[1],s),c=Vo(a[0],l/2),d=Vo(a[1],l/2),f=-t.get("startAngle")*dC,p=t.get("minAngle")*dC,g=0;e.each(n,function(t){!isNaN(t)&&g++});var m=e.getSum(n),v=Math.PI/(m||g)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(n);b[0]=0;var S=cC,M=0,I=f,T=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:u,cy:h,r0:c,r:_?NaN:d});else{(n="area"!==_?0===m&&w?v:t*v:cC/g)<p?(n=p,S-=p):M+=t;var o=I+T*n;e.setItemLayout(i,{angle:n,startAngle:I,endAngle:o,clockwise:x,cx:u,cy:h,r0:c,r:_?Bo(t,b,[c,d]):d}),I=o}}),S<cC&&g)if(S<=.001){var A=cC/g;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=A,n.startAngle=f+T*i*A,n.endAngle=f+T*(i+1)*A}})}else v=S/M,I=f,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),o=n.angle===p?p:t*v;n.startAngle=I,n.endAngle=I+T*o,I+=T*o}});hC(t,d,r,s)})},"pie")),Os(fC("pie")),YI.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}});var pC=Un({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),gC=Uh.prototype;gC.isPersistent=function(){return!this._incremental},gC.updateData=function(t){this.group.removeAll();var e=new pC({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},gC.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},gC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},gC.incrementalUpdate=function(t,e){var i;this._incremental?(i=new pC,this._incremental.addDisplayable(i,!0)):((i=new pC({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},gC._setCommon=function(t,e,i){var n=e.hostModel,o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.symbolProxy=Jl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=e.getVisual("color");r&&t.setColor(r),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},gC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Zs({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Uh:new Du,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Bs(TD("scatter","circle")),zs(AD("scatter")),u(Xh,aD),jh.prototype.getIndicatorAxes=function(){return this._indicatorAxes},jh.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},jh.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},jh.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coodToData(n))]},jh.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Vo(i[0],n),this.cy=Vo(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Vo(r[0],a),this.r=Vo(r[1],a),d(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},jh.prototype.update=function(t,e){function i(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var n=this._indicatorAxes,o=this._model;d(n,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e,i){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===o){var a=e.getData();d(n,function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))})}},this);var a=o.get("splitNumber");d(n,function(t,e){var n=Gl(t.scale,t.model);Wl(t.scale,t.model);var o=t.model,r=t.scale,s=o.getMin(),l=o.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/a);else if(null!=s){var h;do{h=s+u*a,r.setExtent(+s,h),r.setInterval(u),u=i(u)}while(h<n[1]&&isFinite(h)&&isFinite(n[1]))}else if(null!=l){var c;do{c=l-u*a,r.setExtent(c,+l),r.setInterval(u),u=i(u)}while(c>n[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(u=i(u));var d=Math.round((n[0]+n[1])/2/u)*u,f=Math.round(a/2);r.setExtent(Go(d-f*u),Go(d+(a-f)*u)),r.setInterval(u)}})},jh.dimensions=[],jh.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new jh(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Fa.register("radar",jh);var mC=ND.valueAxis,vC=(Fs({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:f.text,nameLocation:"end",nameGap:p,nameTextStyle:m,triggerEvent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new No(f,null,this.ecModel),UA);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},mC.axisLine),axisLabel:Yh(mC.axisLabel,!1),axisTick:Yh(mC.axisTick,!1),splitLine:Yh(mC.splitLine,!0),splitArea:Yh(mC.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Ws({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new FD(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(vC,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,w=i.cy,b=0;b<x.length;b++)h&&m[D=e(m,p,b)].push(new sM({shape:{cx:_,cy:w,r:x[b].coord}})),c&&b<x.length-1&&v[D=e(v,g,b)].push(new cM({shape:{cx:_,cy:w,r0:x[b].coord,r:x[b+1].coord}}));else for(var S,M=f(n,function(t,e){var n=t.getTicksCoords();return S=null==S?n.length-1:Math.min(n.length-1,S),f(n,function(t){return i.coordToPoint(t.coord,e)})}),I=[],b=0;b<=S;b++){for(var T=[],A=0;A<n.length;A++)T.push(M[A][b]);if(T[0]&&T.push(T[0].slice()),h&&m[D=e(m,p,b)].push(new gM({shape:{points:T}})),c&&I){var D=e(v,g,b-1);v[D].push(new pM({shape:{points:T.concat(I)}}))}I=T.slice().reverse()}var C=l.getLineStyle(),L=u.getAreaStyle();d(v,function(t,e){this.group.add(OM(t,{style:r({stroke:"none",fill:g[e%g.length]},L),silent:!0}))},this),d(m,function(t,e){this.group.add(OM(t,{style:r({fill:"none",stroke:p[e%p.length]},C),silent:!0}))},this)}}});var yC=YI.extend({type:"series.radar",dependencies:["radar"],init:function(t){yC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return oC(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(t);return ia(""===n?this.name:n)+"<br/>"+f(i,function(i,n){var o=e.get(e.mapDimension(i.dim),t);return ia(i.name+" : "+o)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Zs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=qh(t.getItemVisual(e,"symbolSize")),a=Jl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l<i.length-1;l++){var u=o(a,r);u&&(u.__dimIdx=l,e[l]?(u.attr("position",e[l]),zM[s?"initProps":"updateProps"](u,{position:i[l]},t,r)):u.attr("position",i[l]),n.add(u))}}function s(t){return f(t,function(t){return[l.cx,l.cy]})}var l=t.coordinateSystem,u=this.group,h=t.getData(),c=this._data;h.diff(c).add(function(e){var i=h.getItemLayout(e);if(i){var n=new pM,o=new gM,r={shape:{points:i}};n.shape.points=s(i),o.shape.points=s(i),To(n,r,t,e),To(o,r,t,e);var l=new tb,u=new tb;l.add(o),l.add(n),l.add(u),a(o.shape.points,i,u,h,e,!0),h.setItemGraphicEl(e,l)}}).update(function(e,i){var n=c.getItemGraphicEl(i),o=n.childAt(0),r=n.childAt(1),s=n.childAt(2),l={shape:{points:h.getItemLayout(e)}};l.shape.points&&(a(o.shape.points,l.shape.points,s,h,e,!1),Io(o,l,t),Io(r,l,t),h.setItemGraphicEl(e,n))}).remove(function(t){u.remove(c.getItemGraphicEl(t))}).execute(),h.eachItemGraphicEl(function(t,e){function n(){l.attr("ignore",m)}function o(){l.attr("ignore",g)}var a=h.getItemModel(e),s=t.childAt(0),l=t.childAt(1),c=t.childAt(2),d=h.getItemVisual(e,"color");u.add(t),s.useStyle(r(a.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:d})),s.hoverStyle=a.getModel("emphasis.lineStyle").getLineStyle();var f=a.getModel("areaStyle"),p=a.getModel("emphasis.areaStyle"),g=f.isEmpty()&&f.parentModel.isEmpty(),m=p.isEmpty()&&p.parentModel.isEmpty();m=m&&g,l.ignore=g,l.useStyle(r(f.getAreaStyle(),{fill:d,opacity:.7})),l.hoverStyle=p.getAreaStyle();var v=a.getModel("itemStyle").getItemStyle(["color"]),y=a.getModel("emphasis.itemStyle").getItemStyle(),x=a.getModel("label"),_=a.getModel("emphasis.label");c.eachChild(function(t){t.setStyle(v),t.hoverStyle=i(y),go(t.style,t.hoverStyle,x,_,{labelFetcher:h.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:h.get(h.dimensions[t.__dimIdx],e),autoColor:d,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",n).on("mouseover",n).on("normal",o).on("mouseout",o),fo(t)}),this._data=h},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("radar")),Bs(TD("radar","circle")),zs(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){for(var o=n.getIndicatorAxes(),a=0;a<o.length;a++)e.each(e.mapDimension(o[a].dim),function(t,e){i[e]=i[e]||[],i[e][a]=n.dataToPoint(t,a)});e.each(function(t){i[t][0]&&i[t].push(i[t][0].slice()),e.setItemLayout(t,i[t])})}})}),Os(fC("radar")),Ns(function(t){var e=t.polar;if(e){y(e)||(e=[e]);var i=[];d(e,function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],y(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)}),t.polar=i}d(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var xC=[126,25],_C=[[[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]]],wC=0;wC<_C.length;wC++)for(var bC=0;bC<_C[wC].length;bC++)_C[wC][bC][0]/=10.5,_C[wC][bC][1]/=-14,_C[wC][bC][0]+=xC[0],_C[wC][bC][1]+=xC[1];var SC=function(t,e){"china"===t&&e.push(new eu("åæµ·è¯¸å²",f(_C,function(t){return{type:"polygon",exterior:t}}),xC))},MC={"åæµ·è¯¸å²":[32,80],"广ä¸":[0,-10],"馿¸¯":[10,5],"æ¾³é¨":[-10,10],"天津":[5,5]},IC=function(t,e){if("china"===t){var i=MC[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},TC={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},AC=function(t,e){if("world"===t){var i=TC[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}},DC=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],CC=function(t,e){"china"===t&&"å°æ¹¾"===e.name&&e.geometries.push({type:"polygon",exterior:DC[0]})},LC=Bi(),kC={load:function(t,e){var i=LC(e).parsed;if(i)return i;var n,o=e.specialAreas||{},a=e.geoJSON;try{n=a?iD(a):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return d(n,function(e){var i=e.name;IC(t,e),AC(t,e),CC(t,e);var n=o[i];n&&e.transformTo(n.left,n.top,n.width,n.height)}),SC(t,n),LC(e).parsed={regions:n,boundingRect:Kh(n)}}},PC=Bi(),NC={geoJSON:kC,svg:{load:function(t,e){var i=PC(e).originRoot;if(i)return{root:i,boundingRect:PC(e).boundingRect};var n=$h(e);return PC(e).originRoot=n.root,PC(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=PC(e),o=n.rootMap||(n.rootMap=R()),a=o.get(i);if(a)return a;var r=n.originRoot,s=n.boundingRect;return n.originRootHostKey?a=$h(e,s).root:(n.originRootHostKey=i,a=r),o.set(i,a)},removeGraphic:function(t,e,i){var n=PC(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},OC={load:function(t,e){var i,n=[],o=R(),a=R();return d(Qh(t),function(r){var s=NC[r.type].load(t,r);d(s.regions,function(t){var i=t.name;e&&e.hasOwnProperty(i)&&(t=t.cloneShallow(i=e[i])),n.push(t),o.set(i,t),a.set(i,t.center)});var l=s.boundingRect;l&&(i?i.union(l):i=l.clone())}),{regions:n,regionsMap:o,nameCoordMap:a,boundingRect:i||new de(0,0,0,0)}},makeGraphic:Jh("makeGraphic"),removeGraphic:Jh("removeGraphic")};h(YI.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=oC(this,["value"]),i=e.mapDimension("value"),n=R(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:pr(e,r,"selected")})}return d(OC.load(this.getMapType(),this.option.nameMap).regions,function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=ta(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(ia(o[r].name))}return a.join(", ")+"<br />"+ia(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}}}}),aC);var EC="\0_ec_interaction_mutex";Es({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(oc,fw);var RC={axisPointer:1,tooltip:1,brush:1};xc.prototype={constructor:xc,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.scale,c={position:s.position,scale:h};!l.childAt(0)||o?u.attr(c):Io(u,c,t),l.removeAll();var f=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=R();d(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new tb),n=new MM({shape:{paths:[]}});i.add(n);var o,s=(C=t.getRegionModel(e.name)||t).getModel(f),u=C.getModel(p),c=mc(s),y=mc(u),x=C.getModel(g),_=C.getModel(m);if(r){o=r.indexOfName(e.name);var w=r.getItemVisual(o,"color",!0);w&&(c.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new pM({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new pM({shape:{points:t.interiors[e]}}))}}),n.setStyle(c),n.style.strokeNoScale=!0,n.culling=!0;var b=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get(r.mapDimension("value"),o)),I=r&&r.getItemLayout(o);if(a||M&&(b||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var D=new rM({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});go(D.style,D.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(r)r.setItemGraphicEl(o,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),fo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),vc(this,t,l,i,n),yc(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&OC.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&d(OC.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t){this._mouseDownFlag=!1,fc(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),r.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,pc(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!gc(e,i,t)})}};var zC="__seriesMapHighDown",BC="__seriesMapCallKey";Zs({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new xc(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var s=r.point,l=r.offset,u=new sM({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:NM+1)});if(!l){var h=t.mainSeries.getData(),c=n.getName(i),d=h.indexOfName(c),f=n.getItemModel(i),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),y=A(t.getFormattedLabel(d,"normal"),c),x=A(t.getFormattedLabel(d,"emphasis"),y),_=m[zC],w=Math.random();if(!_){_=m[zC]={};var b=v(_c,!0),S=v(_c,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[BC]=w,a(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:x,normalText:y}),wc(_,!1)}o.add(u)}}})}}),Es({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=bc(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});var VC=Q;h(Sc,Tw),Mc.prototype={constructor:Mc,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new de(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new de(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new de(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Q([],n,t),i=Q([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),wt(this.transform||(this.transform=[]),e.transform||xt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Tt(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?VC(i,t,n):G(i,t)},pointToData:function(t){var e=this.invTransform;return e?VC([],t,e):[t[0],t[1]]},convertToPixel:v(Ic,"dataToPoint"),convertFromPixel:v(Ic,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},h(Mc,Tw),Tc.prototype={constructor:Tc,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new de(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return Mc.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:v(Ac,"dataToPoint"),convertFromPixel:v(Ac,"pointToData")},h(Tc,Mc);var GC={dimensions:Tc.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,n){var o=t.get("map"),a=t.get("aspectScale"),r=!0,s=DT.retrieveMap(o);s&&s[0]&&"svg"===s[0].type?(null==a&&(a=1),r=!1):null==a&&(a=.75);var l=new Tc(o+n,o,t.get("nameMap"),r);l.aspectScale=a,l.zoomLimit=t.get("scaleLimit"),i.push(l),Cc(l,t),t.coordinateSystem=l,l.model=t,l.resize=Dc,l.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}});var n={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}}),d(n,function(t,n){var a=new Tc(n,n,o(f(t,function(t){return t.get("nameMap")})));a.zoomLimit=T.apply(null,f(t,function(t){return t.get("scaleLimit")})),i.push(a),a.resize=Dc,a.aspectScale=t[0].get("aspectScale"),a.resize(t[0],e),d(t,function(t){t.coordinateSystem=a,Cc(a,t)})}),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=R(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return d(OC.load(e,i).regions,function(t){var e=t.name;!o.get(e)&&n.push({name:e})}),n}};Rs("geo",GC);zs(function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};d(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),function(t,e){var a=n.getName(e),r=i.getRegion(a);if(r&&!isNaN(t)){var s=o[a]||0,l=i.dataToPoint(r.center);o[a]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var a=i.getData();a.each(function(t){var e=a.getName(t),i=a.getItemLayout(t)||{};i.showLabel=!o[e],a.setItemLayout(t,i)}),e[n]=!0}})}),Bs(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),Os(VT.PROCESSOR.STATISTIC,function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=Lc(f(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),Ns(function(t){var e=[];d(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,r(t,t.mapLocation))})}),lC("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var FC=d,WC="\0__link_datas",HC="\0__link_mainData",ZC=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};ZC.prototype={constructor:ZC,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),_(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Vc.prototype={constructor:Vc,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Vc.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,y(i)?i.length:1),a.push(t);var s=new ZC(t.name,o);e?Gc(s,e):o.root=s,o._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)n(l[u],s)}var o=new Vc(e,i.levels,i.leaves),a=[],r=1;n(t),o.root.updateDepthAndHeight(0);var s=_A(a,{coordDimensions:["value"],dimensionsCount:r}),l=new vA(s,e);return l.initData(a),kc({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},YI.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var o=Vc.createTree(e,this,n),a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return ia(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Zs({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new tb,this._controller=new oc(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){td(o,e)&&id(o,e,null,r,t,u)}).update(function(e,i){var n=l.getItemGraphicEl(i);td(o,e)?id(o,e,n,r,t,u):n&&nd(l,i,n,r,t,u)}).remove(function(e){var i=l.getItemGraphicEl(e);i&&nd(l,e,i,r,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];fn(i,n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=t.coordinateSystem=new Mc;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Es({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Es({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});Bs(TD("tree","circle")),zs(function(t,e){t.eachSeriesByType("tree",function(t){sd(t,e)})}),YI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"â¶",zoomToNodeRatio:.1024,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};dd(i);var n=t.levels||[];n=t.levels=fd(n,e);var o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=ta(y(i)?i[0]:i);return ia(e.getName(t)+": "+n)},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=R(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var UC=5;pd.prototype={constructor:pd,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),da(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=ha(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new pM({shape:{points:gd(a,0,g,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,p)});this.group.add(y),md(y,t,p),a+=g+8}},remove:function(){this.group.removeAll()}};var XC=m,jC=tb,YC=yM,qC=d,KC=["label"],$C=["emphasis","label"],JC=["upperLabel"],QC=["emphasis","upperLabel"],tL=10,eL=1,iL=2,nL=Qb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),oL=function(t){var e=nL(t);return e.stroke=e.fill=e.lineWidth=null,e};Zs({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=ld(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,u=this._storage,h="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new jC,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,a+1)}o?(e=t,qC(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,u=[],h=v(yd,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&qC(t,function(t,i){var n=e[i];qC(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){qC(c,function(t){qC(t,function(t){t.parent&&t.parent.remove(t)})}),qC(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=vd();qC(e.willDeleteEls,function(t,e){qC(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),qC(this._storage,function(t,i){qC(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(XC(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new oc(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",XC(this._onPan,this)),e.on("zoom",XC(this._onZoom,this)));var i=new de(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new de(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=xt();St(s,s,[-e,-i]),It(s,s,[t.scale,t.scale]),St(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,i.node,XC(function(e){"animating"!==this._state&&(hd(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var aL=["treemapZoomToNode","treemapRender","treemapMove"],rL=0;rL<aL.length;rL++)Es({type:aL[rL],update:"updateView"},function(){});Es({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,i){var n=ld(t,["treemapZoomToNode","treemapRootToNode"],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var sL=d,lL=w,uL=-1,hL=function(t){var e=t.mappingMethod,n=t.type,o=this.option=i(t);this.type=n,this.mappingMethod=e,this._normalizeData=dL[e];var a=cL[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(bd(o),_d(o)):"category"===e?o.categories?wd(o):bd(o,!0):(k("linear"!==e||o.dataExtent),bd(o))};hL.prototype={constructor:hL,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return m(this._normalizeData,this)}};var cL=hL.visualHandlers={color:{applyVisual:Id("color"),getColorMapper:function(){var t=this.option;return m("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Td.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizeData(e)),n=Ut(e,t.parsedVisual,n),o?n:qt(n,"rgba")},this)},_doMap:{linear:function(t){return qt(Ut(t,this.option.parsedVisual),"rgba")},category:Td,piecewise:function(t,e){var i=Cd.call(this,e);return null==i&&(i=qt(Ut(t,this.option.parsedVisual),"rgba")),i},fixed:Ad}},colorHue:Sd(function(t,e){return jt(t,e)}),colorSaturation:Sd(function(t,e){return jt(t,null,e)}),colorLightness:Sd(function(t,e){return jt(t,null,null,e)}),colorAlpha:Sd(function(t,e){return Yt(t,e)}),opacity:{applyVisual:Id("opacity"),_doMap:Dd([0,1])},liftZ:{applyVisual:Id("liftZ"),_doMap:{linear:Ad,category:Ad,piecewise:Ad,fixed:Ad}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(_(n))i("symbol",n);else if(lL(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:Md,category:Td,piecewise:function(t,e){var i=Cd.call(this,e);return null==i&&(i=Md.call(this,t)),i},fixed:Ad}},symbolSize:{applyVisual:Id("symbolSize"),_doMap:Dd([0,1])}},dL={linear:function(t){return Bo(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=hL.findPieceIndex(t,e,!0);if(null!=i)return Bo(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?uL:e},fixed:B};hL.listVisualTypes=function(){var t=[];return d(cL,function(e,i){t.push(i)}),t},hL.addVisualHandler=function(t,e){cL[t]=e},hL.isValidType=function(t){return cL.hasOwnProperty(t)},hL.eachVisual=function(t,e,i){w(t)?d(t,e,i):e.call(i,t)},hL.mapVisual=function(t,e,i){var n,o=y(t)?[]:w(t)?{}:(n=!0,null);return hL.eachVisual(t,function(t,a){var r=e.call(i,t,a);n?o=r:o[a]=r}),o},hL.retrieveVisuals=function(t){var e,i={};return t&&sL(cL,function(n,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},hL.prepareVisualTypes=function(t){if(lL(t)){var e=[];sL(t,function(t,i){e.push(i)}),t=e}else{if(!y(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},hL.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},hL.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);n<a&&(a=n,o=i)}for(var o,a=1/0,r=0,s=e.length;r<s;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;r<s;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(kd(c[1],t,h[1]))return r}else if(h[1]===1/0){if(kd(c[0],h[0],t))return r}else if(kd(c[0],h[0],t)&&kd(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}if(i)return t===1/0?e.length-1:t===-1/0?0:o};var fL=y,pL="itemStyle",gL={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(pL);a.isRemoved()||Pd(a,{},f(o.levelModels,function(t){return t?t.get(pL):null}),r,t.getViewRoot().getAncestors(),t)}},mL=Math.max,vL=Math.min,yL=T,xL=d,_L=["itemStyle","borderWidth"],wL=["itemStyle","gapWidth"],bL=["upperLabel","show"],SL=["upperLabel","height"],ML={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),r=i.getHeight(),s=t.option,l=ca(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Vo(yL(l.width,u[0]),o),c=Vo(yL(l.height,u[1]),r),d=n&&n.type,f=ld(n,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===d||"treemapMove"===d?n.rootRect:null,g=t.getViewRoot(),m=ud(g);if("treemapMove"!==d){var v="treemapZoomToNode"===d?jd(t,f,g,h,c):p?[p.width,p.height]:[h,c],y=s.sort;y&&"asc"!==y&&"desc"!==y&&(y="desc");var x={squareRatio:s.squareRatio,sort:y,leafDepth:s.leafDepth};g.hostTree.clearLayouts();_={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};g.setLayout(_),Gd(g,x,!1,0);var _=g.getLayout();xL(m,function(t,e){var i=(m[e+1]||g).getValue();t.setLayout(a({dataExtent:[i,i],borderWidth:0,upperHeight:0},_))})}var w=t.getData().tree.root;w.setLayout(Yd(l,p,f),!0),t.setLayoutInfo(l),qd(w,new de(-l.x,-l.y,o,r),m,g,0)}};Bs(gL),zs(ML);var IL=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},TL=IL.prototype;TL.type="graph",TL.isDirected=function(){return this._directed},TL.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[$d(t)]){var n=new Jd(t,e);return n.hostGraph=this,this.nodes.push(n),i[$d(t)]=n,n}},TL.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},TL.getNodeById=function(t){return this._nodesMap[$d(t)]},TL.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Jd.isInstance(t)||(t=n[$d(t)]),Jd.isInstance(e)||(e=n[$d(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new Qd(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r,r}}},TL.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},TL.getEdge=function(t,e){Jd.isInstance(t)&&(t=t.id),Jd.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},TL.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&t.call(e,i[o],o)},TL.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},TL.breadthFirstTraverse=function(t,e,i,n){if(Jd.isInstance(e)||(e=this._nodesMap[$d(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[o],a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}},TL.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(var o=0,a=t.count();o<a;o++)i[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(var o=0,a=e.count();o<a;o++)n[e.getRawIndex(o)].dataIndex=o},TL.clone=function(){for(var t=new IL(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},Jd.prototype={constructor:Jd,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},Qd.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var AL=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};h(Jd,AL("hostGraph","data")),h(Qd,AL("hostGraph","edgeData")),IL.Node=Jd,IL.Edge=Qd,Yi(Jd),Yi(Qd);var DL=function(t,e,i,n,o){for(var a=new IL(n),r=0;r<t.length;r++)a.addNode(T(t[r].id,t[r].name,r),r);for(var s=[],u=[],h=0,r=0;r<e.length;r++){var c=e[r],d=c.source,f=c.target;a.addEdge(d,f,h)&&(u.push(c),s.push(T(c.id,d+" > "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=ml(t,i);else{var m=Fa.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];l(v,"value")<0&&v.concat(["value"]);var y=_A(t,{coordDimensions:v});(p=new vA(y,i)).initData(t)}var x=new vA(["value"],i);return x.initData(u,s),o&&o(p,x),kc({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},CL=Hs({type:"series.graph",init:function(t){CL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){CL.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){CL.superApply(this,"mergeDefaultAndTheme",arguments),Ci(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return DL(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new No({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new No({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=ia(l.join(" > ")),o.value&&(l+=" : "+ia(o.value)),l}return CL.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new vA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return CL.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),LL=_M.prototype,kL=bM.prototype,PL=Un({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(tf(e)?LL:kL).buildPath(t,e)},pointAt:function(t){return tf(this.shape)?LL.pointAt.call(this,t):kL.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=tf(e)?[e.x2-e.x1,e.y2-e.y1]:kL.tangentAt.call(this,t);return q(i,i)}}),NL=["fromSymbol","toSymbol"],OL=rf.prototype;OL.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=U([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(x=Math.PI+x),n.attr("rotation",x)}else d=[-h[0]*g+l[0],-h[1]*g+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},OL._createLine=function(t,e,i){var n=t.hostModel,o=of(t.getItemLayout(e));o.shape.percent=0,To(o,{shape:{percent:1}},n,e),this.add(o);var a=new rM({name:"label",lineLabelOriginalOpacity:1});this.add(a),d(NL,function(i){var n=nf(i,t,e);this.add(n),this[ef(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},OL.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};af(r.shape,a),Io(o,r,n,e),d(NL,function(i){var n=t.getItemVisual(e,i),o=ef(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=nf(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},OL._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(NL,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType)))){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Go(x):x}var _=m?g:null,w=v?A(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(mo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,fo(this)},OL.highlight=function(){this.trigger("emphasis")},OL.downplay=function(){this.trigger("normal")},OL.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},OL.setLinePoints=function(t){var e=this.childOfName("line");af(e.shape,t),e.dirty()},u(rf,tb);var EL=sf.prototype;EL.isPersistent=function(){return!0},EL.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=hf(t);t.diff(n).add(function(i){lf(e,t,i,o)}).update(function(i,a){uf(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},EL.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},EL.incrementalPrepareUpdate=function(t){this._seriesScope=hf(t),this._lineData=null,this.group.removeAll()},EL.incrementalUpdate=function(t,e){for(var i=t.start;i<t.end;i++)if(df(e.getItemLayout(i))){var n=new this._ctor(e,i,this._seriesScope);n.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),this.group.add(n),e.setItemGraphicEl(i,n)}},EL.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},EL._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var RL=[],zL=[],BL=[],VL=sn,GL=hw,FL=Math.abs,WL=function(t,e){function i(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var n=[],o=cn,a=[[],[],[]],r=[[],[]],s=[];e/=2,t.eachEdge(function(t,l){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[F(u[0]),F(u[1])],u[2]&&u.__original.push(F(u[2])));var d=u.__original;if(null!=u[2]){if(G(a[0],d[0]),G(a[1],d[2]),G(a[2],d[1]),h&&"none"!==h){var f=i(t.node1),p=ff(a,d[0],f*e);o(a[0][0],a[1][0],a[2][0],p,n),a[0][0]=n[3],a[1][0]=n[4],o(a[0][1],a[1][1],a[2][1],p,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!==c){var f=i(t.node2),p=ff(a,d[1],f*e);o(a[0][0],a[1][0],a[2][0],p,n),a[1][0]=n[1],a[2][0]=n[2],o(a[0][1],a[1][1],a[2][1],p,n),a[1][1]=n[1],a[2][1]=n[2]}G(u[0],a[0]),G(u[1],a[2]),G(u[2],a[1])}else{if(G(r[0],d[0]),G(r[1],d[1]),U(s,r[1],r[0]),q(s,s),h&&"none"!==h){f=i(t.node1);Z(r[0],r[0],s,f*e)}if(c&&"none"!==c){f=i(t.node2);Z(r[1],r[1],s,-f*e)}G(u[0],r[0]),G(u[1],r[1])}})},HL="__focusNodeAdjacency",ZL=["itemStyle","opacity"],UL=["lineStyle","opacity"];Zs({type:"graph",init:function(t,e){var i=new Du,n=new sf,o=this.group;this._controller=new oc(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var o=this._symbolDraw,a=this._lineDraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?r.attr(s):Io(r,s,t)}WL(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();o.updateData(l);var u=t.getEdgeData();a.updateData(u),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var h=t.forceLayout,c=t.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,c),l.eachItemGraphicEl(function(e,n){var o=l.getItemModel(n);e.off("drag").off("dragend");var a=o.get("draggable");a&&e.on("drag",function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,c),h.setFixed(n),l.setItemLayout(n,e.position))},this).on("dragend",function(){h&&h.setUnfixed(n)},this),e.setDraggable(a&&h),e[HL]&&e.off("mouseover",e[HL]),e.__unfocusNodeAdjacency&&e.off("mouseout",e.__unfocusNodeAdjacency),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[HL]=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))},this),l.graph.eachEdge(function(e){var n=e.getGraphicEl();n[HL]&&n.off("mouseover",n[HL]),n.__unfocusNodeAdjacency&&n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n[HL]=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))});var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),f=l.getLayout("cx"),p=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),o=Math.atan2(n[1]-p,n[0]-f);o<0&&(o=2*Math.PI+o);var a=n[0]<f;a&&(o-=Math.PI);var r=a?"left":"right";i.setStyle({textRotation:-o,textPosition:r,textOrigin:"center"}),i.hoverStyle&&(i.hoverStyle.textPosition=r)}else i.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){gf(t,ZL,.1)}),o.eachEdge(function(t){gf(t,UL,.1)}),s&&(mf(s,ZL),d(s.edges,function(t){t.dataIndex<0||(mf(t,UL),mf(t.node1,ZL),mf(t.node2,ZL))})),l&&(mf(l,UL),mf(l.node1,ZL),mf(l.node2,ZL)))},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph;o.eachNode(function(t){gf(t,ZL)}),o.eachEdge(function(t){gf(t,UL)})},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),WL(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()},this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},updateLayout:function(t){WL(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Es({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),Es({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){}),Es({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});var XL=Z;Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph().data,o=i.mapArray(i.getName);n.filterSelf(function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=o[i]);for(var a=0;a<e.length;a++)if(!e[a].isSelected(i))return!1}return!0})},this)}),Bs(TD("graph","circle",null)),Bs(function(t){var e={};t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getData(),o={};i.each(function(n){var a=i.getName(n);o["ec-"+a]=n;var r=i.getItemModel(n).get("itemStyle.color")||t.getColorFromPalette(a,e);i.setItemVisual(n,"color",r)}),i.count()&&n.each(function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=o["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",i.getItemVisual(e,"color")))})})}),Bs(function(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),i=t.getEdgeData(),n=vf(t.get("edgeSymbol")),o=vf(t.get("edgeSymbolSize")),a="lineStyle.color".split("."),r="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",o&&o[0]),i.setVisual("toSymbolSize",o&&o[1]),i.setVisual("color",t.get(a)),i.setVisual("opacity",t.get(r)),i.each(function(t){var n=i.getItemModel(t),o=e.getEdgeByIndex(t),s=vf(n.getShallow("symbol",!0)),l=vf(n.getShallow("symbolSize",!0)),u=n.get(a),h=n.get(r);switch(u){case"source":u=o.node1.getVisual("color");break;case"target":u=o.node2.getVisual("color")}s[0]&&o.setVisual("fromSymbol",s[0]),s[1]&&o.setVisual("toSymbol",s[1]),l[0]&&o.setVisual("fromSymbolSize",l[0]),l[1]&&o.setVisual("toSymbolSize",l[1]),o.setVisual("color",u),o.setVisual("opacity",h)})})}),zs(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];d(i.dimensions,function(t){o=o.concat(n.mapDimension(t,!0))});for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?n.setItemLayout(a,i.dataToPoint(r)):n.setItemLayout(a,[NaN,NaN])}xf(n.graph)}else e&&"none"!==e||yf(t)})}),zs(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&_f(t)})}),zs(function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),o=n.data,a=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?o.each(function(t){var e=o.getId(t);o.setItemLayout(t,i[e]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&_f(t):yf(t);var l=o.getDataExtent("value"),u=a.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");y(h)||(h=[h,h]),y(c)||(c=[c,c]),c=[c[1],c[0]];var d=o.mapArray("value",function(t,e){var i=o.getItemLayout(e),n=Bo(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:o.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=a.mapArray("value",function(t,e){var i=n.getEdgeByIndex(e),o=Bo(t,u,c);return isNaN(o)&&(o=(c[0]+c[1])/2),{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:o,curveness:i.getModel().get("lineStyle.curveness")||0}}),p=(e=t.coordinateSystem).getBoundingRect(),g=wf(d,f,{rect:p,gravity:r.get("gravity")}),m=g.step;g.step=function(t){for(var e=0,a=d.length;e<a;e++)d[e].fixed&&G(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,a,r){for(var s=0,l=e.length;s<l;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[o.getId(s)]=e[s].p;for(var s=0,l=a.length;s<l;s++){var u=a[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],G(f[0],c),G(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})}),Rs("graphView",{create:function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),a=[],r=[];fn(o.mapArray(function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]}),a,r),r[0]-a[0]==0&&(r[0]+=1,a[0]-=1),r[1]-a[1]==0&&(r[1]+=1,a[1]-=1);var s=(r[0]-a[0])/(r[1]-a[1]),l=bf(t,e,s);isNaN(s)&&(a=[l.x,l.y],r=[l.x+l.width,l.y+l.height]);var u=r[0]-a[0],h=r[1]-a[1],c=l.width,d=l.height,f=t.coordinateSystem=new Mc;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(a[0],a[1],u,h),f.setViewRect(l.x,l.y,c,d),f.setCenter(t.get("center")),f.setZoom(t.get("zoom")),i.push(f)}}),i}});YI.extend({type:"series.gauge",getInitialData:function(t,e){var i=t.data||[];return y(i)||(i=[i]),t.data=i,oC(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var jL=Pn.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(a>=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),YL=2*Math.PI,qL=(Ar.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Sf(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%YL,c=l,d=r.get("width"),f=0;f<n.length;f++){var p=Math.min(Math.max(n[f][0],0),1),g=new hM({shape:{startAngle:c,endAngle:u=l+h*p,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-d,r:o.r},silent:!0});g.setStyle({fill:n[f][1]}),g.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(g),c=u}var m=function(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!s){var v=l;l=u,u=v}this._renderTicks(t,e,i,m,o,l,u,s),this._renderPointer(t,e,i,m,o,l,u,s),this._renderTitle(t,e,i,m,o),this._renderDetail(t,e,i,m,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=Vo(p.get("length"),c),_=Vo(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=Mf(Go(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new rM({style:mo({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){var A=Math.cos(w),D=Math.sin(w),O=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add(function(e){var i=new jL({shape:{angle:a}});To(i,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=u.getItemGraphicEl(i);Io(n,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Vo(a.get("width"),o.r),r:Vo(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Bo(d.get(f,e),h,[0,1],!0))),fo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(Bo(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=Vo(a.get("width"),o.r),d=Vo(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Bo(p,[r,s],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},a,{x:u,y:h,text:Mf(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Hs({type:"series.funnel",init:function(t){qL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return oC(this,["value"])},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=qL.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),KL=If.prototype,$L=["itemStyle","opacity"];KL.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get($L);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),To(n,{style:{opacity:l}},o,e)):Io(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),fo(this)},KL._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},u(If,tb);Ar.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new If(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("funnel")),zs(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=Tf(t,e),r=Af(i,o),s=[Vo(t.get("minSize"),a.width),Vo(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=Bo(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;m<r.length;m++){var v=r[m],y=r[m+1],x=i.getItemModel(v).get("itemStyle.height");null==x?x=f:(x=Vo(x,a.height),"ascending"===o&&(x=-x));var _=g(v,p),w=g(y,p+x);p+=x+d,i.setItemLayout(v,{points:_.concat(w.slice().reverse())})}Df(i)})}),Os(fC("funnel"));var JL=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.axisIndex=o};JL.prototype={constructor:JL,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},u(JL,aD);var QL=function(t,e,i,n,o,a){e[0]=Pf(e[0],i),e[1]=Pf(e[1],i),t=t||0;var r=i[1]-i[0];null!=o&&(o=Pf(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n&&(o=a=Math.abs(e[1]-e[0]),n=0);var s=kf(e,n);e[n]+=t;var l=o||0,u=i.slice();s.sign<0?u[0]+=l:u[1]-=l,e[n]=Pf(e[n],u);h=kf(e,n);null!=o&&(h.sign!==s.sign||h.span<o)&&(e[1-n]=e[n]+s.sign*o);var h=kf(e,n);return null!=a&&h.span>a&&(e[1-n]=e[n]+h.sign*a),e},tk=d,ek=Math.min,ik=Math.max,nk=Math.floor,ok=Math.ceil,ak=Go,rk=Math.PI;Nf.prototype={type:"parallel",constructor:Nf,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;tk(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new JL(t,Hl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();tk(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Of(e.get("axisExpandWidth"),l),c=Of(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=Of(f[1]-f[0],l),f[1]=f[0]+t):(t=Of(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||nk(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[nk(ak(f[0]/h,1))+1,ok(ak(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),tk(i,function(e,i){var a=(n.axisExpandable?Rf:Ef)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:rk/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=xt();Mt(h,h,u),St(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];d(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),f=0,p=a.length;f<p;f++)if("inactive"===s[f].getActiveState(c[f])){h="inactive";break}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return Do([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return i(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?QL(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[ik(0,a[1]*s/o-o/2)])[1]=ek(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},Fa.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new Nf(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var sk=lI.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Qb([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Fo(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),lk={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};n(sk.prototype,UA),ED("parallel",sk,function(t,e){return e.type||(e.data?"category":"value")},lk),lI.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){lI.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){d(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];d(g(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}}),Es({type:"axisAreaSelect",event:"axisAreaSelected"},function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Es("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var uk=v,hk=d,ck=f,dk=Math.min,fk=Math.max,pk=Math.pow,gk=1e4,mk=6,vk=6,yk="globalPan",xk={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_k={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},wk={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},bk=0;zf.prototype={constructor:zf,enableBrush:function(t){return this._brushType&&Vf(this),t.brushType&&Bf(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=i(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){hk(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:a+e)+"-"+t.brushType}function o(e,i){var n=t[e];if(null!=i&&r[i]===u)s[e]=r[i];else{var o=s[e]=null!=i?(r[i].__brushOption=n,r[i]):Ff(l,Gf(l,n));Zf(l,o)}}t=f(t,function(t){return n(i(wk),t,!0)});var a="\0-brush-index-",r=this._covers,s=this._covers=[],l=this,u=this._creatingCover;return new Xs(r,t,function(t,i){return e(t.__brushOption,i)},e).add(o).update(o).remove(function(t){r[t]!==u&&l.group.remove(r[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),Yf(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},h(zf,fw);var Sk={mousedown:function(t){if(this._dragging)mp.call(this,t);else if(!t.target||!t.target.draggable){dp(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Xf(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(cp(this,t,e),this._dragging){dp(t);var i=pp(this,t,e,!1);i&&qf(this,i)}},mouseup:mp},Mk={lineX:vp(0),lineY:vp(1),rect:{createCover:function(t,e){return Jf(uk(rp,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=$f(t);return np(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Qf(t,e,i,n)},updateCommon:tp,contain:fp},polygon:{createCover:function(t,e){var i=new tb;return i.add(new gM({name:"main",style:ip(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new pM({name:"main",draggable:!0,drift:uk(sp,t,e),ondragend:uk(qf,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:up(t,e,i)})},updateCommon:tp,contain:fp}},Ik=["axisLine","axisTickLabel","axisName"],Tk=Ws({type:"parallelAxis",init:function(t,e){Tk.superApply(this,"init",arguments),(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this))},render:function(t,e,i,n){if(!bp(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var r=Mp(t,e),s=r.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=a({strokeContainThreshold:u},s.getAxisLayout(h)),f=new FD(t,c);d(Ik,f.add,f),this._axisGroup.add(f.getGroup()),this._refreshBrushController(c,l,t,r,u,i);var p=n&&!1===n.animation?null:t;Lo(o,this._axisGroup,p)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=de.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:yp(u),isTargetByCursor:_p(u,a,n),getLinearBrushOtherExtent:xp(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Sp(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=f(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});Ws({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},d(Ak,function(t,e){i.getZr().on(e,this._handlers[e]=m(t,this))},this)),Nr(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){d(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(a({type:"parallelAxisExpand"},t))}});var Ak={mousedown:function(t){Ip(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Ip(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ip(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};Ns(function(t){Cf(t),Lf(t)}),YI.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return Tp(i,this),ml(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,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"}});var Dk=.3,Ck=(Ar.extend({type:"parallel",init:function(){this._dataGroup=new tb,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=kp(t);if(a.diff(r).add(function(t){Pp(Lp(a,o,t,l,s),a,t,u)}).update(function(e,i){var o=r.getItemGraphicEl(i),h=Cp(a,e,l,s);a.setItemGraphicEl(e,o),Io(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),Pp(o,a,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var h=Dp(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=kp(e),s=t.start;s<t.end;s++){var l=Lp(n,this._dataGroup,s,a,o);l.incremental=!0,Pp(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]);Bs({seriesType:"parallel",reset:function(t,e,i){var n=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||n.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,e){h.eachActiveState(e,function(t,i){var n=d[t];if("normal"===t&&e.hasItemOption){var o=e.getItemModel(i).get(Ck,!0);null!=o&&(n=o)}e.setItemVisual(i,"opacity",n)},t.start,t.end)}}}});var Lk=YI.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return DL(i,e,this,!0).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),ia(a)}return Lk.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),kk=["itemStyle","opacity"],Pk=["lineStyle","opacity"],Nk=Un({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()}});Zs({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,o=t.getGraph(),a=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,a.removeAll(),a.attr("position",[r.x,r.y]),o.eachEdge(function(e){var i=new Nk;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,o,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,o=(null!=w?w*l:y.y)+y.dy,r=(null!=M?M*s:b.x)+T.ty,d=n,f=o*(1-v)+(u=null!=I?I*l:b.y)*v,p=r,g=o*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,o=(null!=w?w*l:y.y)+T.sy,d=n*(1-v)+(r=null!=M?M*s:b.x)*v,f=o,p=n*v+r*(1-v),g=u=(null!=I?I*l:b.y)+T.ty),i.setShape({x1:n,y1:o,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}fo(i,e.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),h.setItemGraphicEl(e.dataIndex,i)}),o.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new yM({shape:{x:null!=o?o*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();go(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),fo(d,f),a.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,o){var a=u.getItemModel(o);a.get("draggable")&&(e.drift=function(e,a){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),a.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),h.eachItemGraphicEl(function(e,o){h.getItemModel(o).get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),!this._data&&t.get("animation")&&a.setClipPath(zp(a.getBoundingRect(),t,function(){a.removeClipPath()})),this._data=t.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){Ep(t,kk,.1)}),a.eachEdge(function(t){Ep(t,Pk,.1)}),u){Rp(u,kk);var c=s.get("focusNodeAdjacency");"outEdges"===c?d(u.outEdges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node2,kk))}):"inEdges"===c?d(u.inEdges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node1,kk))}):"allEdges"===c&&d(u.edges,function(t){t.dataIndex<0||(Rp(t,Pk),Rp(t.node1,kk),Rp(t.node2,kk))})}h&&(Rp(h,Pk),Rp(h.node1,kk),Rp(h.node2,kk))}},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getGraph();o.eachNode(function(t){Ep(t,kk)}),o.eachEdge(function(t){Ep(t,Pk)})}}),Es({type:"dragNode",event:"dragNode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});zs(function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=Bp(t,e);t.layoutInfo=o;var a=o.width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;Gp(l),Vp(l,u,i,n,a,r,0!==g(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"))})}),Bs(function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph().nodes;if(e.length){var i=1/0,n=-1/0;d(e,function(t){var e=t.getLayout().value;e<i&&(i=e),e>n&&(n=e)}),d(e,function(e){var o=new hL({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.color");null!=a&&e.setVisual("color",a)})}})});var Ok={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],f=[o,a],p=f[u].get("type"),g=f[1-u].get("type"),m=t.data;if(m&&n){var v=[];d(m,function(t,e){var i;t.value&&y(t.value)?(i=t.value.slice(),t.value.unshift(e)):y(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var x=this.defaultValueDimensions;return oC(this,{coordDimensions:[{name:h,type:qs(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:qs(g),dimsDef:x.slice()}],dimensionsCount:x.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};h(YI.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),Ok,!0);var Ek=["itemStyle"],Rk=["emphasis","itemStyle"],zk=(Ar.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add(function(t){if(n.hasValue(t)){var e=ig(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?ng(s,i,n,t):i=ig(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:B}),Pn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}})),Bk=["itemStyle","borderColor"],Vk=d;Bs(function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var n=i[e.seriesIndex%i.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(Bk)||n}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(Bk,!0)})})})}),zs(function(t){var e=ag(t);Vk(e,function(t){var e=t.seriesModels;e.length&&(rg(t),Vk(e,function(e,i){sg(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}),h(YI.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}}),Ok,!0);var Gk=["itemStyle"],Fk=["emphasis","itemStyle"],Wk=["color","color0","borderColor","borderColor0"],Hk=(Ar.extend({type:"candlestick",render:function(t,e,i){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox");this._data||n.removeAll(),e.diff(i).add(function(i){if(e.hasValue(i)){var a,r=e.getItemLayout(i);To(a=lg(r,0,!0),{shape:{points:r.ends}},t,i),ug(a,e,i,o),n.add(a),e.setItemGraphicEl(i,a)}}).update(function(a,r){var s=i.getItemGraphicEl(r);if(e.hasValue(a)){var l=e.getItemLayout(a);s?Io(s,{shape:{points:l.ends}},t,a):s=lg(l),ug(s,e,a,o),n.add(s),e.setItemGraphicEl(a,s)}else n.remove(s)}).remove(function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),cg(t,this.group)},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;ug(a=lg(n.getItemLayout(i)),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){cg(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:B}),Pn.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}})),Zk=Pn.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3}}),Uk=["itemStyle","borderColor"],Xk=["itemStyle","borderColor0"],jk=["itemStyle","color"],Yk=["itemStyle","color0"],qk={seriesType:"candlestick",plan:$I(),performRawSeries:!0,reset:function(t,e){function i(t,e){return e.get(t>0?jk:Yk)}function n(t,e){return e.get(t>0?Uk:Xk)}var o=t.getData(),a=t.pipelineContext.large;if(o.setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!a&&{progress:function(t,e){for(var o;null!=(o=t.next());){var a=e.getItemModel(o),r=e.getItemLayout(o).sign;e.setItemVisual(o,{color:i(r,a),borderColor:n(r,a)})}}}}},Kk="undefined"!=typeof Float32Array?Float32Array:Array,$k={seriesType:"candlestick",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=pg(t,i),o=0,a=1,r=["x","y"],s=i.mapDimension(r[o]),l=i.mapDimension(r[a],!0),u=l[0],h=l[1],c=l[2],d=l[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==s||l.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,r,l=new Kk(5*t.count),f=0,p=[],g=[];null!=(r=t.next());){var m=i.get(s,r),v=i.get(u,r),y=i.get(h,r),x=i.get(c,r),_=i.get(d,r);isNaN(m)||isNaN(x)||isNaN(_)?(l[f++]=NaN,f+=4):(l[f++]=fg(i,r,v,y,h),p[o]=m,p[a]=x,n=e.dataToPoint(p,null,g),l[f++]=n?n[0]:NaN,l[f++]=n?n[1]:NaN,p[a]=_,n=e.dataToPoint(p,null,g),l[f++]=n?n[1]:NaN)}i.setLayout("largePoints",l)}:function(t,i){function r(t,i){var n=[];return n[o]=i,n[a]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function l(t,e,i){var a=e.slice(),r=e.slice();a[o]=Jn(a[o]+n/2,1,!1),r[o]=Jn(r[o]-n/2,1,!0),i?t.push(a,r):t.push(r,a)}function f(t){return t[o]=Jn(t[o],1),t}for(var p;null!=(p=t.next());){var g=i.get(s,p),m=i.get(u,p),v=i.get(h,p),y=i.get(c,p),x=i.get(d,p),_=Math.min(m,v),w=Math.max(m,v),b=r(_,g),S=r(w,g),M=r(y,g),I=r(x,g),T=[];l(T,S,0),l(T,b,1),T.push(f(I),f(S),f(M),f(b)),i.setItemLayout(p,{sign:fg(i,p,m,v,h),initBaseline:m>v?S[a]:b[a],ends:T,brushRect:function(t,e,i){var s=r(t,i),l=r(e,i);return s[o]-=n/2,l[o]-=n/2,{x:s[0],y:s[1],width:a?n:l[0]-s[0],height:a?l[1]-s[1]:n}}(y,x,g)})}}}}};Ns(function(t){t&&y(t.series)&&d(t.series,function(t){w(t)&&"k"===t.type&&(t.type="candlestick")})}),Bs(qk),zs($k),YI.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Jk=vg.prototype;Jk.stopEffectAnimation=function(){this.childAt(1).removeAll()},Jk.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Jl(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}mg(n,t)},Jk.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}mg(i,t)},Jk.highlight=function(){this.trigger("emphasis")},Jk.downplay=function(){this.trigger("normal")},Jk.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),r=gg(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Vo(l[0],r[0]),u[1]=Vo(l[1],r[1])}n.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=o.get("rippleEffect.scale"),h.brushType=o.get("rippleEffect.brushType"),h.period=1e3*o.get("rippleEffect.period"),h.effectOffset=e/t.count(),h.z=o.getShallow("z")||0,h.zlevel=o.getShallow("zlevel")||0,h.symbolType=a,h.color=s,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){c.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",f,this).on("emphasis",d,this).on("normal",f,this)}this._effectCfg=h},Jk.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},u(vg,tb),Zs({type:"effectScatter",init:function(){this._symbolDraw=new Du(vg)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=At(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Bs(TD("effectScatter","circle")),zs(AD("effectScatter"));var Qk="undefined"==typeof Uint32Array?Array:Uint32Array,tP="undefined"==typeof Float64Array?Array:Float64Array,eP=YI.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],yg(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),eP.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],yg(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}eP.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=z(this._flatCoords,e.flatCoords),this._flatCoordsOffset=z(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}for(var a=this._getCoordsFromItemModel(t),o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var i=t.length,n=new Qk(i),o=new tP(i),a=0,r=0,s=0,l=0;l<i;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){var i=new vA(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[o]:a:void 0}),i},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),ia(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),iP=xg.prototype;iP.createLine=function(t,e,i){return new rf(t,e,i)},iP._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Jl(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},iP._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=T(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},iP.getLineLength=function(t){return uw(t.__p1,t.__cp1)+uw(t.__cp1,t.__p2)},iP.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},iP.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},iP.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=sn,s=ln;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},iP.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(xg,tb);var nP=_g.prototype;nP._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new gM({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},nP.updateData=function(t,e,i){var n=t.hostModel;Io(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},nP._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle").getLineStyle(),l=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,fo(this)},nP.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},u(_g,tb);var oP=wg.prototype;oP.createLine=function(t,e,i){return new _g(t,e,i)},oP.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];n+=uw(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},oP.getLineLength=function(t){return this._length},oP.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}J(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(wg,xg);var aP=Un({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r<i.length;){var o=i[r++];if(o>0){t.moveTo(i[r++],i[r++]);for(var a=1;a<o;a++)t.lineTo(i[r++],i[r++])}}else for(var r=0;r<i.length;){var s=i[r++],l=i[r++],u=i[r++],h=i[r++];if(t.moveTo(s,l),n>0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(s>0)for(var l=n[r++],u=n[r++],h=1;h<s;h++)if(yn(l,u,c=n[r++],d=n[r++]))return a;a++}else for(var a=0,r=0;r<n.length;){var l=n[r++],u=n[r++],c=n[r++],d=n[r++];if(o>0){if(_n(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(yn(l,u,c,d))return a;a++}return-1}}),rP=bg.prototype;rP.isPersistent=function(){return!this._incremental},rP.updateData=function(t){this.group.removeAll();var e=new aP({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},rP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},rP.incrementalUpdate=function(t,e){var i=new aP;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},rP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rP._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},rP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var sP={seriesType:"lines",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h<o.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=o.start;h<o.end;h++){g=t.getLineCoords(h,r),i&&(s[c++]=g);for(var f=0;f<g;f++)d=e.dataToPoint(r[f],!1,d),s[c++]=d[0],s[c++]=d[1]}a.setLayout("linesPoints",s)}else for(h=o.start;h<o.end;h++){var p=a.getItemModel(h),g=t.getLineCoords(h,r),m=[];if(i)for(var v=0;v<g;v++)m.push(e.dataToPoint(r[v]));else{m[0]=e.dataToPoint(r[0]),m[1]=e.dataToPoint(r[1]);var y=p.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(h,m)}}}}};Zs({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=sP.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new bg:new sf(o?n?wg:_g:n?xg:rf),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var lP="lineStyle.opacity".split("."),uP={seriesType:"lines",reset:function(t,e,i){var n=Sg(t.get("symbol")),o=Sg(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(lP)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=Sg(i.getShallow("symbol",!0)),o=Sg(i.getShallow("symbolSize",!0)),a=i.get(lP);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};zs(sP),Bs(uP),YI.extend({type:"series.heatmap",getInitialData:function(t,e){return ml(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Fa.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});Mg.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){var v=x[_+3]/256,M=4*Math.floor(255*v);if(v>0){var I=a(v)?s:l;v>0&&(v=v*S+b),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iw()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Zs({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ag(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var r,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");r=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),m=t.getModel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],x=i;x<n;x++){var _;if("cartesian2d"===v){if(isNaN(d.get(y[2],x)))continue;var w=l.dataToPoint([d.get(y[0],x),d.get(y[1],x)]);_=new yM({shape:{x:w[0]-r/2,y:w[1]-s/2,width:r,height:s},style:{fill:d.getItemVisual(x,"color"),opacity:d.getItemVisual(x,"opacity")}})}else{if(isNaN(d.get(y[1],x)))continue;_=new yM({z2:1,shape:l.dataToRect([d.get(y[0],x)]).contentShape,style:{fill:d.getItemVisual(x,"color"),opacity:d.getItemVisual(x,"opacity")}})}var b=d.getItemModel(x);d.hasItemOption&&(f=b.getModel("itemStyle").getItemStyle(["color"]),p=b.getModel("emphasis.itemStyle").getItemStyle(),g=b.getModel("label"),m=b.getModel("emphasis.label"));var S=t.getRawValue(x),M="-";S&&null!=S[2]&&(M=S[2]),go(f,p,g,m,{labelFetcher:t,labelDataIndex:x,defaultText:M,isRectText:!0}),_.setStyle(f),fo(_,d.hasItemOption?p:a({},p)),_.incremental=o,o&&(_.useHoverLayer=!0),c.add(_),d.setItemGraphicEl(x,_)}},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new Mg;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=h,o[1]-=c,o.push(n),o}),y=i.getExtent(),x="visualMap.continuous"===i.type?Tg(y,i.option.range):Ig(y,i.getPieceList(),i.option.selected);s.update(v,p,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new fi({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var hP=$D.extend({type:"series.pictorialBar",dependencies:["grid"],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,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,hP.superApply(this,"getInitialData",arguments)}}),cP=["itemStyle","borderWidth"],dP=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],fP=new sM;Zs({type:"pictorialBar",render:function(t,e,i){var n=this.group,o=t.getData(),a=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:dP[+s],categoryDim:dP[1-s]};return o.diff(a).add(function(t){if(o.hasValue(t)){var e=Vg(o,t),i=Dg(o,t,e,u),a=Hg(o,u,i);o.setItemGraphicEl(t,a),n.add(a),qg(a,u,i)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(o.hasValue(t)){var r=Vg(o,t),s=Dg(o,t,r,u),l=Xg(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?Zg(i,u,s):i=Hg(o,u,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),qg(i,u,s)}else n.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&Ug(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=o,this.group},dispose:B,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){Ug(n,e.dataIndex,t,e)}):i.removeAll()}});zs(v(El,"pictorialBar")),Bs(TD("pictorialBar","roundRect"));var pP=function(t,e,i,n,o){aD.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null};pP.prototype={constructor:pP,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},u(pP,aD),$g.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:$g,_init:function(t,e,i){var n=this.dimension,o=new pP(n,Hl(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();d(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Wl(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ca({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()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},Fa.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new $g(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:$g.prototype.dimensions});var gP=["axisLine","axisTickLabel","axisName"],mP=XD.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=Jg(t),r=new FD(t,a);d(gP,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),mP.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new _M(Kn({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0})))}for(f=0;f<l.length;++f)this.group.add(OM(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}}}),vP=lI.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),yP={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};n(vP.prototype,UA),ED("single",vP,function(t,e){return e.type||(e.data?"category":"value")},yP);var xP=function(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=zi(a,t);if(null==r||r<0||y(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(f(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},_P=d,wP=v,bP=Bi(),SP=(Fs({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),Bi()),MP=d,IP=Ws({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";um("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){gm(e.getZr(),"axisPointer"),IP.superApply(this._model,"remove",arguments)},dispose:function(t,e){gm("axisPointer",e),IP.superApply(this._model,"dispose",arguments)}}),TP=Bi(),AP=i,DP=m;(mm.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(vm,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new tb,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);wm(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Mh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=TP(t).pointerEl=new zM[o.type](AP(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=TP(t).labelEl=new yM(AP(e.label));t.add(o),xm(o,n)}},updatePointerEl:function(t,e,i){var n=TP(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=TP(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xm(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Po(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){mw(t.event)},onmousedown:DP(this._onHandleDragMove,this,0,0),drift:DP(this._onHandleDragMove,this),ondragend:DP(this._onHandleDragEnd,this)}),i.add(n)),wm(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Nr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){vm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_m(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_m(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_m(n)),TP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var 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}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=mm,ji(mm);var CP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=km(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bm(n),c=LP[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Lh(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Lh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=km(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),LP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Pm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Pm(t))}}};XD.registerAxisPointerClass("CartesianAxisPointer",CP),Ns(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Os(VT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vh(t,e)}),Es({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lm(o)&&(o=xP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=lm(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||lm(o),d={},f={},p={list:[],map:{}},g={showPointer:wP(em,f),showTooltip:wP(im,p)};_P(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);_P(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=rm(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&Qg(t,r,g,!1,d)}})});var v={};return _P(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&_P(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,sm(e),sm(t)))),v[t.key]=a}})}),_P(v,function(t,e){Qg(h[e],t,g,!0,d)}),nm(f,h,d),om(p,o,t,r),am(h,0,i),d}});var kP=["x","y"],PP=["width","height"],NP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Om(r,1-Nm(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=OP[u](a,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Jg(i),i,n,o)},getHandleTransform:function(t,e,i){var n=Jg(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Nm(o),s=Om(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=Om(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),OP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Nm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Nm(t))}}};XD.registerAxisPointerClass("SingleAxisPointer",NP),Ws({type:"single"});var EP=YI.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){EP.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=[];Zi(t,function(t){return t[2]}).buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var n=i.length,o=-1,a=-1,r=0;r<n;++r){var s=i[r].dataList.length;s>o&&(o=s,a=r)}for(var l=0;l<n;++l)if(l!==a)for(var u=i[l].name,h=0;h<o;++h){for(var c=i[a].dataList[h][0],d=i[l].dataList.length,f=-1,p=0;p<d;++p)if(i[l].dataList[p][0]===c){f=p;break}-1===f&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=g(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=R(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=_A(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:qs(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new vA(u,this);return h.initData(o),h},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;var o=t.mapDimension("single"),a=[];return Zi(i,function(e){return t.get("name",e)}).buckets.each(function(e,i){e.sort(function(e,i){return t.get(o,e)-t.get(o,i)}),a.push({name:i,indices:e})}),a},getAxisTooltipData:function(t,e,i){y(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=u&&(n=f,u=p,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),ia(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Zs({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,i){function n(t){return t.name}function o(e,i,n){var o=this._layers;if("remove"!==e){for(var u,h=[],c=[],f=l[i].indices,p=0;p<f.length;p++){var g=r.getItemLayout(f[p]),m=g.x,v=g.y0,y=g.y;h.push([m,v]),c.push([m,v+y]),u=r.getItemVisual(f[p],"color")}var x,_,w=r.getItemLayout(f[0]),b=r.getItemModel(f[p-1]),S=b.getModel("label"),M=S.get("margin");if("add"===e){I=d[i]=new tb;x=new ID({shape:{points:h,stackedOnPoints:c,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_=new rM({style:{x:w.x-M,y:w.y0+w.y/2}}),I.add(x),I.add(_),s.add(I),x.setClipPath(Em(x.getBoundingRect(),t,function(){x.removeClipPath()}))}else{var I=o[n];x=I.childAt(0),_=I.childAt(1),s.add(I),d[i]=I,Io(x,{shape:{points:h,stackedOnPoints:c}},t),Io(_,{style:{x:w.x-M,y:w.y0+w.y/2}},t)}var T=b.getModel("emphasis.itemStyle"),A=b.getModel("itemStyle");mo(_.style,S,{text:S.get("show")?t.getFormattedLabel(f[p-1],"normal")||r.getName(f[p-1]):null,textVerticalAlign:"middle"}),x.setStyle(a({fill:u},A.getItemStyle(["color"]))),fo(x,T.getItemStyle())}else s.remove(o[i])}var r=t.getData(),s=this.group,l=t.getLayerSeries(),u=r.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.attr("position",[0,h.y+c[0]]);var d={};new Xs(this._layersSeries||[],l,n,n).add(m(o,this,"add")).update(m(o,this,"update")).remove(m(o,this,"remove")).execute(),this._layersSeries=l,this._layers=d},dispose:function(){}});zs(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();n.boundaryGap=a,"horizontal"===r.orient?(a[0]=Vo(a[0],o.height),a[1]=Vo(a[1],o.height),Rm(e,t,o.height-a[0]-a[1])):(a[0]=Vo(a[0],o.width),a[1]=Vo(a[1],o.width),Rm(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",n)})}),Bs(function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),o=R();e.each(function(t){o.set(e.getRawIndex(t),t)}),i.each(function(a){var r=i.getName(a),s=n[(t.nameMap.get(r)-1)%n.length];i.setItemVisual(a,"color",s);var l=o.get(a);null!=l&&e.setItemVisual(l,"color",s)})})}),Os(fC("themeRiver")),YI.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};Bm(i);var n=t.levels||[],o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var RP={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},zP=2,BP=4,VP=Vm.prototype;VP.updateData=function(t,e,i,o,s){this.node=e,e.piece=this,o=o||this._seriesModel,s=s||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=a({},h);c.label=null;var d=Gm(e,0,s);Hm(e,o,d);var f,p=u.getModel("itemStyle").getItemStyle();f=r({lineJoin:"bevel",fill:(f="normal"===i?p:n(u.getModel(i+".itemStyle").getItemStyle(),p)).fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,Io(l,{shape:{r:h.r}},o,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(Io(l,{shape:c},o),l.useStyle(f)):Io(l,{shape:c,style:f},o),this._updateLabel(o,d,i);var g=u.getShallow("cursor");if(g&&l.attr("cursor",g),t){var m=o.getShallow("highlightPolicy");this._initEvents(l,e,o,m)}this._seriesModel=o||this._seriesModel,this._ecModel=s||this._ecModel},VP.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):Wm(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==RP.NONE&&i.piece.childAt(0).trigger("downplay"))})},VP.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},VP.onHighlight=function(){this.updateData(!1,this.node,"highlight")},VP.onDownplay=function(){this.updateData(!1,this.node,"downplay")},VP._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?a.get(t):e}var o=this.node.getModel(),a=o.getModel("label"),r="normal"===i||"emphasis"===i?a:o.getModel(i+".label"),s=o.getModel("emphasis.label"),l=T(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);!1===n("show")&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=a.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);go(d.style,d.hoverStyle||{},a,s,{defaultText:r.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),m=Math.sin(p),v=n("position"),y=n("distance")||0,x=n("align");"outside"===v?(f=u.r+y,x=p>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},VP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},u(Vm,tb);Ar.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getValue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),s.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var o=new Vm(i,t,e);h.add(o),s.setItemGraphicEl(i.dataIndex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesModel=t,this.api=i,this.ecModel=e;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,c=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(t){d.push(t)});var f=this._oldChildren||[];if(function(t,e){function i(t){return t.getId()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new Xs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",t,e):(r.virtualPiece=new Vm(i,t,e),h.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(t){r._rootToNode(n.parentNode)};n.piece._onclickEvent=o,r.virtualPiece.on("click",o)}else r.virtualPiece&&(h.remove(r.virtualPiece),r.virtualPiece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(p)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var GP="sunburstRootToNode";Es({type:GP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[GP],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var FP="sunburstHighlight";Es({type:FP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[FP],e);n&&(t.highlight=n.node)})});Es({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var WP=Math.PI/180;Bs(v(uC,"sunburst")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Vo(e[0],o),l=Vo(e[1],a),u=Vo(n[0],r/2),h=Vo(n[1],r/2),c=-t.get("startAngle")*WP,f=t.get("minAngle")*WP,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Zm(g,v);var x=0;d(g.children,function(t){!isNaN(t.getValue())&&x++});var _=g.getValue(),w=Math.PI/(_||x)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===_&&T?w:n*w;o<f&&(o=f),i=e+A*o;var a=t.depth-m-(b?-1:1),h=u+M*a,c=u+M*(a+1),g=t.getModel();null!=g.get("r0")&&(h=Vo(g.get("r0"),r/2)),null!=g.get("r")&&(c=Vo(g.get("r"),r/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;d(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})},"sunburst")),Os(v(fC,"sunburst"));var HP=["itemStyle"],ZP=["emphasis","itemStyle"],UP=["label"],XP=["emphasis","label"],jP="e\0\0",YP={cartesian2d:function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:m(Xm,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:m(jm,t)}}},singleAxis:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:m(Ym,t)}}},polar:function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(qm,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};YI.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return ml(this.getSource(),this)},getDataParams:function(t,e,i){var n=YI.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Ar.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Qm(t,a,e,i);a.diff(o).add(function(e){ev(null,e,s(e,n),t,r,a)}).update(function(e,i){ev(o.getItemGraphicEl(i),e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){for(var a=e.getData(),r=Qm(e,a,i,n),s=t.start;s<t.end;s++)ev(null,s,r(s,o),e,this.group,a).traverse(function(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)})},dispose:B,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),Ns(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var qP=Fs({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,qP.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Pi(o,a);Ni(r);var s=this._elOptionsToUpdate=[];d(r,function(t,e){var i=t.option;i&&(s.push(i),gv(t,i),mv(o,e,i),vv(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ws({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;d(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=fv(e);o&&"merge"!==o?"replace"===o?(dv(r,i),cv(a,l,h,i)):"remove"===o&&dv(r,i):r?r.attr(h):cv(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,yv(c,t))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;da(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){dv(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var KP=Fs({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){KP.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var o=n.name;i.push(o);var a;if(n.legendDataProvider){var r=n.legendDataProvider(),s=r.mapArray(r.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&Oi(n)&&e.push(n.name)}),this._availableNames=i;var n=f(this.get("data")||e,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new No(t,this,this.ecModel)},this);this._data=n},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&d(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&l(this._availableNames,t)>=0},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Es("legendToggleSelect","legendselectchanged",v(xv,"toggleSelected")),Es("legendSelect","legendselected",v(xv,"select")),Es("legendUnSelect","legendunselected",v(xv,"unSelect"));var $P=v,JP=d,QP=tb,tN=Ws({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new QP),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(o,t,e,i);var a=t.getBoxLayoutParams(),s={width:i.getWidth(),height:i.getHeight()},l=t.get("padding"),u=ca(a,s,l),h=this.layoutInner(t,o,u,n),c=ca(r({width:h.width,height:h.height},a),s,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=wv(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=R(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),JP(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=i.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,c.name,null,n,s)).on("mouseout",$P(Mv,c.name,null,n,s)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),c=o.indexOfName(h);if(c<0)return;var d=o.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,null,h,n,s)).on("mouseout",$P(Mv,null,h,n,s)),a.set(h,!0)}},this)}else o.add(new QP({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("symbolKeepAspect"),p=n.isSelected(t),g=new QP,m=i.getModel("textStyle"),v=i.get("icon"),y=i.getModel("tooltip"),x=y.parentModel;if(o=v||o,g.add(Jl(o,0,0,h,c,p?l:d,null==f||f)),!v&&r&&(r!==o||"none"===r)){var _=.8*c;"none"===r&&(r="circle"),g.add(Jl(r,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=n.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new rM({style:mo({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new yM({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),fo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();aI(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}),lI.registerSubTypeDefaulter("legend",function(){return"plain"});var eN=KP.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},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},init:function(t,e,i,n){var o=ga(t);eN.superCall(this,"init",t,e,i,n),Iv(this,t,o)},mergeOption:function(t,e){eN.superCall(this,"mergeOption",t,e),Iv(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),iN=tb,nN=["width","height"],oN=["x","y"],aN=tN.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){aN.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new iN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new iN),this._showController},resetInner:function(){aN.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){function o(t,i){var o=t+"DataIndex",l=Po(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:m(a._pageGo,a,o,e,n)},{x:-s[0]/2,y:-s[1]/2,width:s[0],height:s[1]});l.name=t,r.add(l)}var a=this;aN.superCall(this,"renderInner",t,e,i,n);var r=this._controllerGroup,s=e.get("pageIconSize",!0);y(s)||(s=[s,s]),o("pagePrev",0);var l=e.getModel("pageTextStyle");r.add(new rM({name:"pageText",style:{textFill:l.getTextColor(),font:l.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),o("pageNext",1)},layoutInner:function(t,e,i,n){var o=this.getContentGroup(),a=this._containerGroup,r=this._controllerGroup,s=t.getOrient().index,l=nN[s],u=nN[1-s],h=oN[1-s];aI(t.get("orient"),o,t.get("itemGap"),s?i.width:null,s?null:i.height),aI("horizontal",r,t.get("pageButtonItemGap",!0));var c=o.getBoundingRect(),d=r.getBoundingRect(),f=this._showController=c[l]>i[l],p=[-c.x,-c.y];n||(p[s]=o.position[s]);var g=[0,0],m=[-d.x,-d.y],v=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[s]+=i[l]-d[l]:g[s]+=d[l]+v),m[1-s]+=c[u]/2-d[u]/2,o.attr("position",p),a.attr("position",g),r.attr("position",m);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[u]=Math.max(c[u],d[u]),y[h]=Math.min(0,d[h]+m[1-s]),a.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-v,0),x[u]=y[u],a.setClipPath(new yM({shape:x})),a.__rectSize=x[l]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Io(o,{position:_.contentPosition},!!f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),o=this.getContentGroup(),a=this._containerGroup.__rectSize,r=t.getOrient().index,s=nN[r],l=oN[r],u=this._findTargetItemIndex(n),h=o.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:o.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;m<=d;++m)(!(x=e(h[m]))&&y.e>v.s+a||x&&!i(x,v.s))&&(v=y.i>v.i?y:x)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)(x=e(h[m]))&&i(y,x.s)||!(v.i<y.i)||(y=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=x;return p},_findTargetItemIndex:function(t){var e,i=this.getContentGroup();return this._showController?i.eachChild(function(i,n){i.__legendDataIndex===t&&(e=n)}):e=0,e}});Es("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Fs({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var rN=d,sN=ea,lN=["","-webkit-","-moz-","-o-"];Cv.prototype={constructor:Cv,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Dv(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},Lv.prototype={constructor:Lv,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a=o.indexOf("{marker");a>=0;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new rM({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),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})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el?this.el.hide():true,this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var uN=m,hN=d,cN=Vo,dN=new yM({shape:{x:-1,y:-1,width:2,height:2}});Ws({type:"tooltip",init:function(t,e){if(!U_.node){var i=t.getComponent("tooltip").get("renderMode");this._renderMode=Hi(i);var n;"html"===this._renderMode?(n=new Cv(e.getDom(),e),this._newLine="<br/>"):(n=new Lv(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,i){if(!U_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");um("itemTooltip",this._api,uN(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!U_.node){var o=Pv(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=dN;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=xP(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Pv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=kv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,o=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=kv([e.tooltipOption,o]),u=this._renderMode,h=this._newLine,c={};hN(t,function(t){hN(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value,a=[];if(e&&null!=o){var l=Im(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Xl(e.axis,o),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;n(c,m)}else p=g;a.push(p)}});var f=l;"html"!==u?r.push(a.join(h)):r.push((f?ia(f)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=kv([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new No(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=na(h,i,!0);else if("function"==typeof h){var d=uN(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))i=cN(e[0],s),n=cN(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=ca(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=Ev(e,d,u))[0],n=p[1]):(i=(p=Nv(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=Rv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Rv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Ov(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&hN(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&hN(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&hN(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){U_.node||(this._tooltipContent.hide(),gm("itemTooltip",e))}}),Es({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Es({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Gv.prototype={constructor:Gv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:aD.prototype.dataToCoord,radiusToData:aD.prototype.coordToData},u(Gv,aD);var fN=Bi();Fv.prototype={constructor:Fv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:aD.prototype.dataToCoord,angleToData:aD.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(r),l=ke(a,e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=fN(t.model),d=c.lastAutoInterval,f=c.lastTickCount;return null!=d&&null!=f&&Math.abs(d-h)<=1&&Math.abs(f-o)<=1&&d>h?h=d:(c.lastTickCount=o,c.lastAutoInterval=h),h}},u(Fv,aD);var pN=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Gv,this._angleAxis=new Fv,this._radiusAxis.polar=this._angleAxis.polar=this};pN.prototype={type:"polar",axisPointerEnabled:!0,constructor:pN,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<a?1:-1;l<a||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var gN=lI.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(gN.prototype,UA);var mN={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};ED("angle",gN,Wv,mN.angle),ED("radius",gN,Wv,mN.radius),Fs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var vN={dimensions:pN.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new pN(n);o.update=Zv;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Uv(a,s),Uv(r,l),Hv(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Fa.register("polar",vN);var yN=["axisLine","axisLabel","axisTick","splitLine","splitArea"];XD.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,a=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),s=f(n.getViewLabels(),function(t){return(t=i(t)).coord=n.dataToCoord(t.tickValue),t});Yv(s),Yv(r),d(yN,function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,o,r,a,s)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new sM({shape:{cx:e.cx,cy:e.cy,r:n[jv(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[jv(e)],l=f(i,function(t){return new _M({shape:Xv(e,[s,s+a],t.coord)})});this.group.add(OM(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,o){var a=t.getCategories(!0),r=t.getModel("axisLabel"),s=r.get("margin");d(o,function(i,o){var l=r,u=i.tickValue,h=n[jv(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";a&&a[u]&&a[u].textStyle&&(l=new No(a[u].textStyle,r,r.ecModel));var m=new rM({silent:!0});this.group.add(m),mo(m.style,l,{x:c[0],y:c[1],textFill:l.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g})},this)},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u<i.length;u++){var h=s++%a.length;l[h]=l[h]||[],l[h].push(new _M({shape:Xv(e,n,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(OM(l[u],{style:r({stroke:a[u%a.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){if(i.length){var o=t.getModel("splitArea").getModel("areaStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(n[0],n[1]),d=Math.max(n[0],n[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%a.length;l[g]=l[g]||[],l[g].push(new hM({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-i[p].coord*u,clockwise:f},silent:!0})),h=-i[p].coord*u}for(p=0;p<l.length;p++)this.group.add(OM(l[p],{style:r({fill:a[p%a.length]},o.getAreaStyle()),silent:!0}))}}});var xN=["axisLine","axisTickLabel","axisName"],_N=["splitLine","splitArea"];XD.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=o.getExtent()[0],s=i.getExtent(),l=qv(n,t,r),u=new FD(t,l);d(xN,u.add,u),this.group.add(u.getGroup()),d(_N,function(e){t.get(e+".show")&&!i.scale.isBlank()&&this["_"+e](t,n,r,s,a)},this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<o.length;h++){var c=l++%s.length;u[c]=u[c]||[],u[c].push(new sM({shape:{cx:e.cx,cy:e.cy,r:o[h].coord},silent:!0}))}for(h=0;h<u.length;h++)this.group.add(OM(u[h],{style:r({stroke:s[h%s.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=o[0].coord,c=1;c<o.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new hM({shape:{cx:e.cx,cy:e.cy,r0:h,r:o[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=o[c].coord}for(c=0;c<u.length;c++)this.group.add(OM(u[c],{style:r({fill:s[c%s.length]},a.getAreaStyle()),silent:!0}))}}});var wN=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+la(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=bN[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Sm(t,i,n,o,Kv(e,i,0,s,n.get("label.margin")))}}),bN={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:Dm(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Lm(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:Lm(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};XD.registerAxisPointerClass("PolarAxisPointer",wN),zs(v(function(t,e,i){i.getWidth(),i.getHeight();var n={},o=Vv(g(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=zv(t),s=o[Bv(a)][r],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.coordinateSystem.cx,d=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;n[r]=n[r]||[];for(var g=e.mapDimension(h.dim),m=e.mapDimension(a.dim),v=pl(e,g),y=h.getExtent()[0],x=0,_=e.count();x<_;x++){var w=e.get(g,x),b=e.get(m,x);if(!isNaN(w)){var S=w>=0?"p":"n",M=y;v&&(n[r][b]||(n[r][b]={p:y,n:y}),M=n[r][b][S]);var I,T,A,D;if("radius"===h.dim){var C=h.dataToRadius(w)-y,L=a.dataToAngle(b);Math.abs(C)<f&&(C=(C<0?-1:1)*f),I=M,T=M+C,D=(A=L-l)-u,v&&(n[r][b][S]=T)}else{var k=h.dataToAngle(w,!0)-y,P=a.dataToRadius(b);Math.abs(k)<p&&(k=(k<0?-1:1)*p),T=(I=P+l)+u,A=M,D=M+k,v&&(n[r][b][S]=D)}e.setItemLayout(x,{cx:c,cy:d,r0:I,r:T,startAngle:-A*Math.PI/180,endAngle:-D*Math.PI/180})}}}},this)},"bar")),Ws({type:"polar"}),h(lI.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){lI.prototype.init.apply(this,arguments),Ci(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=GC.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=p(t.regions||[],function(t,i){return i.name&&t.set(i.name,new No(i,e)),t},R()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,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",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new No(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),aC),Ws({type:"geo",init:function(t,e){var i=new xc(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),$v("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),$v("select",{type:"geoSelect",event:"geoselected"}),$v("unSelect",{type:"geoUnSelect",event:"geounselected"});var SN=["rect","polygon","keep","clear"],MN=d,IN={lineX:oy(0),lineY:oy(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&tu(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(tu(n,o,a)||tu(n,o+r,a)||tu(n,o,a+s)||tu(n,o+r,a+s)||de.create(t).contain(l[0],l[1])||ry(o,a,o+r,a,n)||ry(o,a,o,a+s,n)||ry(o+r,a,o+r,a+s,n)||ry(o,a+s,o+r,a+s,n))||void 0}}},TN=d,AN=l,DN=v,CN=["dataToPoint","pointToData"],LN=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],kN=hy.prototype;kN.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=EN[t.brushType](0,i,e);t.__rangeOffset={offset:RN[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},kN.matchOutputRanges=function(t,e,i){TN(t,function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&d(n.coordSyses,function(n){var o=EN[t.brushType](1,n,t.range);i(t,o.values,n,e)})},this)},kN.setInputRanges=function(t,e){TN(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelId=i.panelId;var n=EN[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?RN[t.brushType](n.values,o.offset,gy(n.xyMinMax,o.xyMinMax)):n.values}},this)},kN.makePanelOpts=function(t,e){return f(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:yp(n),isTargetByCursor:_p(n,t,i.coordSysModel),getLinearBrushOtherExtent:xp(n)}})},kN.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&AN(n.coordSyses,e.coordinateSystem)>=0},kN.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dy(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<NN.length;o++)if(NN[o](n,a))return a}return!0};var PN={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,o=t.gridModels,a=R(),r={},s={};(i||n||o)&&(TN(i,function(t){var e=t.axis.grid.model;a.set(e.id,e),r[e.id]=!0}),TN(n,function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0}),TN(o,function(t){a.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),a.each(function(t){var o=t.coordinateSystem,a=[];TN(o.getCartesians(),function(t,e){(AN(i,t.getAxis("x").model)>=0||AN(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:ON.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){TN(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:ON.geo})})}},NN=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],ON={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ao(t)),e}},EN={lineX:DN(fy,0),lineY:DN(fy,1),rect:function(t,e,i){var n=e[CN[t]]([i[0][0],i[1][0]]),o=e[CN[t]]([i[0][1],i[1][1]]),a=[cy([n[0],o[0]]),cy([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[CN[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},RN={lineX:DN(py,0),lineY:DN(py,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},zN=["inBrush","outOfBrush"],BN="__ecBrushSelect",VN="__ecInBrushSelectEvent",GN=VT.VISUAL.BRUSH;zs(GN,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new hy(e.option,t)).setInputRanges(e.areas,t)})}),Bs(GN,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=_y(i);if(a&&!wy(e,n)&&(d(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){xy(a,o,r,t)&&(x[t]=1)})}}var p={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushLink,v=[],x=[],_=[],w=0;n||(o=g.throttleType,a=g.throttleDelay);var b=f(e.areas,function(t){return by(r({boundingRect:FN[t.brushType](t)},t))}),S=ty(e.option,zN,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};p.selected.push(i);var n=_y(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return xy(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&iy(zN,S,a,r)})}),vy(e,o,a,s,n)});var FN={lineX:B,lineY:B,rect:function(t){return Sy(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&Sy(e)}},WN=["#ddd"];Fs({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&ey(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=f(t,function(t){return My(this.option,t)},this))},setBrushOption:function(t){this.brushOption=My(this.option,t),this.brushType=this.brushOption.brushType}});Ws({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,Iy.apply(this,arguments)},updateTransform:Iy,updateView:Iy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),Es({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Es({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var HN={},ZN=rT.toolbox.brush;Dy.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:i(ZN.title)};var UN=Dy.prototype;UN.render=UN.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},UN.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},UN.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},Ty("brush",Dy),Ns(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Jv(s),e&&!s.length&&s.push.apply(s,SN)}});Cy.prototype={constructor:Cy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yo(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==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,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ca(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:v(Ly,"dataToPoint"),convertFromPixel:v(Ly,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Cy.dimensions=Cy.prototype.dimensions,Cy.getDimensionsInfo=Cy.prototype.getDimensionsInfo,Cy.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Cy(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Fa.register("calendar",Cy);var XN=lI.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ga(t);XN.superApply(this,"init",arguments),ky(t,o)},mergeOption:function(t,e){XN.superApply(this,"mergeOption",arguments),ky(this.option,t)}}),jN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"]},YN={EN:["S","M","T","W","T","F","S"],CN:["æ¥","ä¸","äº","ä¸","å","äº","å
"]};Ws({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new yM({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new gM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?oa(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new rM({z2:30});mo(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=jN[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f<u[h].length-1;f++){var p=u[h][f].slice(),g=this._firstDayOfMonth[f];if(d){var m=this._firstDayPoints[f];p[c]=(m[c]+u[0][f+1][c])/2}var v=n.get("formatter"),y=o[+g.m-1],x={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},w=this._formatterLabel(v,x),b=new rM({z2:30});a(mo(b.style,n,{text:w}),this._monthTextPositionControl(p,d,e,s,r)),i.add(b)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var r=t.coordinateSystem,s=o.get("position"),l=o.get("nameMap"),u=o.get("margin"),h=r.getFirstDayOfWeek();_(l)&&(l=YN[l.toUpperCase()]||[]);var c=r.getNextNDay(e.end.time,7-e.lweek).time,d=[r.getCellWidth(),r.getCellHeight()];u=Vo(u,d["horizontal"===i?0:1]),"start"===s&&(c=r.getNextNDay(e.start.time,-(7+e.fweek)).time,u=-u);for(var f=0;f<7;f++){var p=r.getNextNDay(c,f),g=r.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new rM({z2:30});a(mo(v.style,o,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Fs({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Ws({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=t.get("textBaseline"),l=new rM({style:mo({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new rM({style:mo({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ca(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new yM({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0});$n(w),n.add(w)}}}),lI.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var qN=["cartesian2d","polar","singleAxis"],KN=function(t,e){var i=f(t=t.slice(),la),n=f(e=(e||[]).slice(),la);return function(o,a){d(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l<e.length;l++)s[e[l]]=t+n[l];o.call(a,s)})}}(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]),$N=d,JN=Fo,QN=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};QN.prototype={constructor:QN,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(Py(i.get("coordinateSystem"))){var n=this._dimName,o=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(o&&o.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,o=this.getAxisModel();"x"===i||"y"===i?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(a=t)}),a},getMinMaxSpan:function(){return i(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[t.start,t.end],r=[];return $N(["startValue","endValue"],function(e){r.push(null!=t[e]?i.parse(t[e]):null)}),$N([0,1],function(t){var s=r[t],l=a[t];"percent"===n[t]?(null==l&&(l=o[t]),s=i.parse(Bo(l,o,e,!0))):l=Bo(s,e,o,!0),r[t]=s,a[t]=l}),{valueWindow:JN(r),percentWindow:JN(a)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Oy(this,this._dimName,e);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,zy(this),Ry(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ry(this,!0))},filterData:function(t,e){function i(t){return t>=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),r=this._valueWindow;"none"!==a&&$N(o,function(t){var e=t.getData(),o=e.mapDimension(n,!0);o.length&&("weakFilter"===a?e.filterSelf(function(t){for(var i,n,a,s=0;s<o.length;s++){var l=e.get(o[s],t),u=!isNaN(l),h=l<r[0],c=l>r[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):$N(o,function(n){if("empty"===a)t.setData(e.map(n,function(t){return i(t)?t:NaN}));else{var o={};o[n]=r,e.selectRange(o)}}),$N(o,function(t){e.setApproximateExtent(r,t)}))})}}};var tO=d,eO=KN,iO=Fs({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=By(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=By(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;U_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Vy(this,t),tO([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new QN(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();eO(function(e){var i=e.axisIndex;t[i]=Di(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;eO(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):tO(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&eO(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a<r;a++)"category"===o[a].get("type")&&n.push(a);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&eO(function(e){var n=i[e.axisIndex],o=t.get(e.axisIndex),a=t.get(e.axisId);l(n,o=t.ecModel.queryComponents({mainType:e.axis,index:o,id:a})[0].componentIndex)<0&&n.push(o)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return eO(function(n){var o=t.get(n.axisIndex),a=this.dependentModels[n.axis][o];a&&a.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return eO(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;eO(function(n){tO(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;tO([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Vy(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),nO=qI.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n}),o.axisModels.push(e)}var e=this.dataZoomModel,i=this.ecModel,n={};return e.eachTargetAxis(function(e,o){var a=i.getComponent(e.axis,o);if(a){var r=a.getCoordSysModel();r&&t(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}},this),n}}),oO=(iO.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),yM),aO=Bo,rO=Fo,sO=m,lO=d,uO="horizontal",hO=5,cO=["line","bar","candlestick","scatter"],dO=nO.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){dO.superApply(this,"render",arguments),Nr(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){dO.superApply(this,"remove",arguments),Or(this,"_dispatchZoomAction")},dispose:function(){dO.superApply(this,"dispose",arguments),Or(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new tb;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===uO?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ga(t.option);d(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=ca(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==uO||o?i===uO&&o?{scale:r?[-1,1]:[-1,-1]}:"vertical"!==i||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new oO({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new oO({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),s=.3*(a[1]-a[0]);a=[a[0]-s,a[1]+s];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(g>0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:aO(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new pM({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new gM({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(cO,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,u=Gy(o.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:o.name,otherDim:u,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new oO({draggable:!0,cursor:Fy(this._orient),drift:sO(this._onDragMove,this,"all"),onmousemove:function(t){mw(t.event)},ondragstart:sO(this._showDataInfo,this,!0),ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new oO($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),lO([0,1],function(t){var o=Po(a.get("handleIcon"),{cursor:Fy(this._orient),draggable:!0,drift:sO(this._onDragMove,this,t),onmousemove:function(t){mw(t.event)},ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Vo(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[aO(t[0],[0,100],e,!0),aO(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];QL(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?aO(a.minSpan,r,o,!0):null,null!=a.maxSpan?aO(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=rO([aO(n[0],o,r,!0),aO(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=rO(i.slice()),o=this._size;lO([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ao(n.handles[t].parent,this.group),i=Co(0===t?"right":"left",e),s=this._handleWidth/2+hO,l=Do([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===uO?"middle":i,textAlign:a===uO?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=rO(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Do([e,i],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(lO(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});iO.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var fO="\0_ec_dataZoom_roams",pO=m,gO=nO.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){gO.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Zy(t.model)});d(e,function(e){var a=e.model,r={};d(["pan","zoom","scrollMove"],function(t){r[t]=pO(mO[t],this,e,n)},this),Wy(i,{coordId:Zy(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Hy(this.api,this.dataZoomModel.id),gO.superApply(this,"dispose",arguments),this._range=null}}),mO={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=vO[e](null,[n.originX,n.originY],r,i,t),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 h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return QL(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Ky(function(t,e,i,n,o,a){var r=vO[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Ky(function(t,e,i,n,o,a){return vO[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})},vO={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};Os({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),Es("dataZoom",function(t,e){var i=Ny(m(e.eachComponent,e,"dataZoom"),KN,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var yO=d,xO=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),yO(e,function(t){if(t){$y(t,"splitList")&&!$y(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&yO(e,function(t){w(t)&&($y(t,"start")&&!$y(t,"min")&&(t.min=t.start),$y(t,"end")&&!$y(t,"max")&&(t.max=t.end))})}})};lI.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var _O=VT.VISUAL.COMPONENT;Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(ny(e.stateList,e.targetVisuals,m(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(m(Jy,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var wO={get:function(t,e,n){var o=i((bO[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},bO={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]}},SO=hL.mapVisual,MO=hL.eachVisual,IO=y,TO=d,AO=Fo,DO=Bo,CO=B,LO=Fs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;U_.canvasSupported||(i.realtime=!1),!e&&ey(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=ty(this.option.controller,e,t),this.targetVisuals=ty(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Di(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=AO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){IO(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")},TO(this.stateList,function(e){var i=t[e];if(_(i)){var n=wO.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecModel,o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.isCategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},TO(n,function(t,e){if(hL.isValidType(e)){var i=wO.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");TO(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=SO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var u=s.symbolSize;if(null!=u){var h=-1/0;MO(u,function(t){t>h&&(h=t)}),s.symbolSize=SO(u,function(t){return DO(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:CO,getValueState:CO,getVisualMeta:CO}),kO=[20,140],PO=LO.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){PO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){PO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=kO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=kO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){LO.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Fo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=Qy(0,0,this.getExtent()),n=Qy(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;r<l&&(!n.length||i[r]<=n[0]);r++)i[r]<n[a]&&e(i[r],"outOfRange");for(u=1;a<s;a++,u=0)u&&o.length&&e(n[a],"outOfRange"),e(n[a],"inRange");for(var u=1;r<l;r++)(!n.length||n[n.length-1]<i[r])&&(u&&(o.length&&e(o[o.length-1].value,"outOfRange"),u=0),e(i[r],"outOfRange"));var h=o.length;return{stops:o,outerColors:[h?o[0].color:"transparent",h?o[h-1].color:"transparent"]}}}),NO=Ws({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=qM(e.get("padding")||0),n=t.getBoundingRect();t.add(new yM({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function n(t){return s[t]}function o(t,e){s[t]=e}var a=(i=i||{}).forceState,r=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=r.get("itemSymbol")),"color"===e){var l=r.get("contentColor");s.color=l}var u=r.controllerVisuals[a||r.getValueState(t)];return d(hL.prepareVisualTypes(u),function(a){var r=u[a];i.convertOpacityToAlpha&&"opacity"===a&&(a="colorAlpha",r=u.__alphaForOpacity),hL.dependsOn(a,e)&&r&&r.applyVisual(t,n,o)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;da(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:B}),OO=Bo,EO=d,RO=Math.min,zO=Math.max,BO=12,VO=6,GO=NO.extend({type:"visualMap.continuous",init:function(){GO.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new rM({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=tx(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=ix()),s.add(i.inRange=ix(null,a?sx(this._orient):null,m(this._dragHandle,this,"all",!1),m(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("å½"),u=zO(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,o,r),this._createHandle(s,1,n,u,o,r)),this._createIndicator(s,n,u,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a=m(this._dragHandle,this,e,!1),r=m(this._dragHandle,this,e,!0),s=ix(nx(e,n),sx(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new rM({draggable:!0,drift:a,onmousemove:function(t){mw(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=ix([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:VO+3,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():rx(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[OO(e[0],i,n,!0),OO(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];QL(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[OO(n[0],o,a,!0),OO(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new TM(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new tb("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;EO([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Do(i.handleLabelPoints[r],Ao(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=OO(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",ox(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Do(u.indicatorLabelPoint,Ao(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=RO(zO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=RO(zO(o[0],t),o[1]);var r=ax(i,a,o),s=[t-r,t+r],l=OO(t,o,a,!0),u=[OO(s[0],o,a,!0),OO(s[1],o,a,!0)];s[0]<o[0]&&(u[0]=-1/0),s[1]>o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"â ",r));var h=this._hoverLinkDataIndices,c=[];(e||rx(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Ri(h,c);this._dispatchHighDown("downplay",ex(d[0])),this._dispatchHighDown("highlight",ex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Ao(e,n?null:this.group);return zM[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Es({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Ns(xO);var FO=LO.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FO.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WO[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=hL.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=wO.get(n,"inRange"===t?"active":"inactive",o)})},this),LO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=hL.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){hL.findPieceIndex(e,this._pieceList)===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WO={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r<l;s+=a){var u=r===o-1?n[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),Jo(e),d(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;d(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),lx(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;d(t.pieces,function(t,i){w(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var a=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;h<2;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&null==a[h];d++)a[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&a[1]===1/0&&(r[0]=0),u[1]&&a[0]===-1/0&&(r[1]=0),a[0]===a[1]&&r[0]&&r[1]&&(n.value=a[0])}n.visual=hL.retrieveVisuals(t),e.push(n)},this),lx(t,e),Jo(e),d(e,function(t){var e=t.close,i=[["<","â¤"][e[1]],[">","â¥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};NO.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=T(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),d(l.viewPieceList,function(n){var l=n.piece,u=new tb;u.onclick=m(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new rM({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,h,r),aI(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:ex(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return tx(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new tb,r=this.visualMapModel.textStyleModel;a.add(new rM({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});Ns(xO);var HO=ta,ZO=ia,UO=Fs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ux(i),d(i.data,function(t){t instanceof Array?(ux(t[0]),ux(t[1])):ux(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,HO).join(", "):HO(i),o=e.getName(t),a=ZO(this.name);return(null!=i||o)&&(a+="<br />"),o&&(a+=ZO(o),null!=i&&(a+=" : ")),null!=i&&(a+=ZO(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});h(UO,ZI),UO.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var XO=l,jO=v,YO={min:jO(dx,"min"),max:jO(dx,"max"),average:jO(dx,"average")},qO=Ws({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});qO.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(xx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Du),u=_x(o,t,e);e.setData(u),xx(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markPoint=t.markPoint||{}}),UO.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var KO=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis)){var u,h;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",e.getAxis(u),h=T(r.yAxis,r.xAxis);else{var c=px(r,s,e,t);u=c.valueDataDim,c.valueAxis,h=yx(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueIndex:r.valueIndex,value:h}]}return r=[fx(t,r[0]),fx(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};qO.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Ix(o,e,!0,t,i),Ix(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Ix(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new sf);this.group.add(u.group);var h=Tx(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markLine=t.markLine||{}}),UO.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var $O=function(t,e,i,n){var a=fx(t,n[0]),r=fx(t,n[1]),s=T,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},JO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];qO.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(JO,function(o){return Lx(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new tb});this.group.add(u.group),u.__keep=!0;var h=kx(o,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(JO,function(i){return Lx(h,e,i,t,n)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new pM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);Io(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=h.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:Yt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),go(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:s}),fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markArea=t.markArea||{}});lI.registerSubTypeDefaulter("timeline",function(){return"slider"}),Es({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),Es({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var QO=lI.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){QO.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Li(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new vA([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});h(QO.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),ZI);var tE=qI.extend({type:"timeline"}),eE=function(t,e,i,n){aD.call(this,t,e,i),this.type=n||"value",this.model=null};eE.prototype={constructor:eE,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},u(eE,aD);var iE=m,nE=d,oE=Math.PI;tE.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return ia(s.scale.getLabel(t))},nE(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=Ex(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:oE/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*oE/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=xt(),u=s.x,h=s.y+s.height;St(l,l,[-u,-h]),Mt(l,l,-oE/2),St(l,l,[u,h]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Hl(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new eE("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new tb;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new _M({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();nE(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:iE(this._changeTimeline,this,t)},h=zx(r,s,e,u);fo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();nE(a,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new rM({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:iE(this._changeTimeline,this,a),silent:!1});mo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),fo(h,mo({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c=Rx(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),fo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",iE(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",iE(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),iE(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=iE(s._handlePointerDrag,s),t.ondragend=iE(s._handlePointerDragend,s),Bx(t,a,i,n,!0)},onUpdate:function(t){Bx(t,a,i,n)}};this._currentPointer=zx(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Fo(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(iE(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Do(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,o=this._axis;return i.each(["value"],function(i,a){var r=o.dataToCoord(i),s=Math.abs(r-t);s<n&&(n=s,e=a)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Ns(function(t){var e=t&&t.timeline;y(e)||(e=e?[e]:[]),d(e,function(t){t&&Px(t)})});var aE=Fs({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){aE.superApply(this,"optionUpdated",arguments),d(this.option.feature,function(t,e){var i=Ay(e);i&&n(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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"}}}});Ws({type:"toolbox",render:function(t,e,i,n){function o(o,r){var s,c=h[o],d=h[r],f=new No(l[c],t,t.ecModel);if(c&&!d){if(Vx(c))s={model:f,onclick:f.option.onclick,featureName:c};else{var p=Ay(c);if(!p)return;s=new p(f,e,i)}u[c]=s}else{if(!(s=u[d]))return;s.model=f,s.ecModel=e,s.api=i}c||!d?f.get("show")&&!s.unusable?(a(f,s,c),f.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},s.render&&s.render(f,e,i,n)):s.remove&&s.remove(e,i):s.dispose&&s.dispose(e,i)}function a(n,o,a){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=o.getIcons?o.getIcons():n.get("icon"),c=n.get("title")||{};if("string"==typeof h){var f=h,p=c;c={},(h={})[a]=f,c[a]=p}var g=n.iconPaths={};d(h,function(a,h){var d=Po(a,{},{x:-s/2,y:-s/2,width:s,height:s});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),fo(d),t.get("showTitle")&&(d.__title=c[h],d.on("mouseover",function(){var t=u.getItemStyle();d.setStyle({text:c[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){d.setStyle({textFill:null})})),d.trigger(n.get("iconStatus."+h)||"normal"),r.add(d),d.on("click",m(o.onclick,o,e,i,h)),g[h]=d})}var r=this.group;if(r.removeAll(),t.get("show")){var s=+t.get("itemSize"),l=t.get("feature")||{},u=this._features||(this._features={}),h=[];d(l,function(t,e){h.push(e)}),new Xs(this._featureNames||[],h).add(o).update(o).remove(v(o,null)).execute(),this._featureNames=h,_v(r,t,i),r.add(wv(r.getBoundingRect(),t)),r.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var o=ke(e,Xe(n)),a=t.position[0]+r.position[0],l=!1;t.position[1]+r.position[1]+s+o.height>i.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var rE=rT.toolbox.saveAsImage;Gx.defaultOption={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:rE.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:rE.lang.slice()},Gx.prototype.unusable=!U_.canvasSupported,Gx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||U_.browser.ie||U_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Ty("saveAsImage",Gx);var sE=rT.toolbox.magicType;Fx.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(sE.title),option:{},seriesIndex:{}};var lE=Fx.prototype;lE.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uE={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},hE=[["line","bar"],["stack","tiled"]];lE.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(uE[i]){var a={series:[]};d(hE,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=uE[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},Es({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Ty("magicType",Fx);var cE=rT.toolbox.dataView,dE=new Array(60).join("-"),fE="\t",pE=new RegExp("["+fE+"]+","g");$x.defaultOption={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:i(cE.title),lang:i(cE.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},$x.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=Ux(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;ht(v,"click",i),ht(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Kx(u.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),ht(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+fE+e.substring(n),this.selectionStart=this.selectionEnd=i+1,mw(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},$x.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},$x.prototype.dispose=function(t,e){this.remove(t,e)},Ty("dataView",$x),Es({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Jx(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var gE=d,mE="\0_ec_hist_store";iO.extend({type:"dataZoom.select"}),nO.extend({type:"dataZoom.select"});var vE=rT.toolbox.dataZoom,yE=d,xE="\0_ec_\0toolbox-dataZoom_";o_.defaultOption={show:!0,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:i(vE.title)};var _E=o_.prototype;_E.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,s_(t,e,this,n,i),r_(t,e)},_E.onclick=function(t,e,i){wE[i].call(this)},_E.remove=function(t,e){this._brushController.unmount()},_E.dispose=function(t,e){this._brushController.dispose()};var wE={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(t_(this.ecModel))}};_E._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=QL(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new hy(a_(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Qx(a,o),this._dispatchZoomAction(o)}},_E._dispatchZoomAction=function(t){var e=[];yE(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ty("dataZoom",o_),Ns(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"===a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:xE+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),yE(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var bE=rT.toolbox.restore;l_.defaultOption={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:bE.title},l_.prototype.onclick=function(t,e,i){e_(t),e.dispatchAction({type:"restore",from:this.uid})},Ty("restore",l_),Es({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var SE,ME="urn:schemas-microsoft-com:vml",IE="undefined"==typeof window?null:window,TE=!1,AE=IE&&IE.document;if(AE&&!U_.canvasSupported)try{!AE.namespaces.zrvml&&AE.namespaces.add("zrvml",ME),SE=function(t){return AE.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){SE=function(t){return AE.createElement("<"+t+' xmlns="'+ME+'" class="zrvml">')}}var DE=ES.CMD,CE=Math.round,LE=Math.sqrt,kE=Math.abs,PE=Math.cos,NE=Math.sin,OE=Math.max;if(!U_.canvasSupported){var EE=21600,RE=EE/2,zE=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=EE+","+EE,t.coordorigin="0,0"},BE=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},VE=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},GE=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},FE=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},WE=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},HE=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ZE=function(t,e,i){var n=Gt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=VE(n[0],n[1],n[2]),t.opacity=i*n[3])},UE=function(t){var e=Gt(t);return[VE(e[0],e[1],e[2]),e[3]]},XE=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof IM){var o,a=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(Q(f,f,d),Q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&Q(f,f,d),y/=v[0]*EE,x/=v[1]*EE;var _=OE(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I<b;I++){var T=w[I],A=UE(T.color);M.push(T.offset*l+s+" "+A[0]),0!==I&&I!==b-1||S.push(A)}if(b>=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else ZE(t,n,e.opacity)},jE=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof IM||ZE(t,e.stroke,e.opacity)},YE=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof IM&&FE(t,a),a||(a=u_(e)),o?XE(a,i,n):jE(a,i),GE(t,a)):(t[o?"filled":"stroked"]="false",FE(t,a))},qE=[[],[],[]],KE=function(t,e){var i,n,o,a,r,s,l=DE.M,u=DE.C,h=DE.L,c=DE.A,d=DE.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(o=p[a++],n="",i=0,o){case l:n=" m ",i=1,r=p[a++],s=p[a++],qE[0][0]=r,qE[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],qE[0][0]=r,qE[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),qE[0][0]=y,qE[0][1]=x,qE[1][0]=_,qE[1][1]=w,qE[2][0]=m,qE[2][1]=v,r=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=LE(e[0]*e[0]+e[1]*e[1]),I=LE(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var N=p[a++],O=A+PE(k)*C,E=D+NE(k)*L,y=A+PE(P)*C,x=D+NE(P)*L,R=N?" wa ":" at ";Math.abs(O-y)<1e-4&&(Math.abs(P-k)>.01?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&O>A?x-=.0125:x+=.0125:N&&E<D||!N&&E>D?y+=.0125:y-=.0125),f.push(R,CE(((A-C)*M+b)*EE-RE),",",CE(((D-L)*I+S)*EE-RE),",",CE(((A+C)*M+b)*EE-RE),",",CE(((D+L)*I+S)*EE-RE),",",CE((O*M+b)*EE-RE),",",CE((E*I+S)*EE-RE),",",CE((y*M+b)*EE-RE),",",CE((x*I+S)*EE-RE)),r=y,s=x;break;case DE.R:var z=qE[0],B=qE[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=CE(z[0]*EE-RE),B[0]=CE(B[0]*EE-RE),z[1]=CE(z[1]*EE-RE),B[1]=CE(B[1]*EE-RE),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case DE.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V<i;V++){var G=qE[V];e&&Q(G,G,e),f.push(CE(G[0]*EE-RE),",",CE(G[1]*EE-RE),V<i-1?",":"")}}}return f.join("")};Pn.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=u_("shape"),zE(i),this._vmlEl=i),YE(i,"fill",e,this),YE(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;if(o&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=LE(kE(s))}a.weight=r+"px"}var l=this.path||(this.path=new ES);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=KE(l,this.transform),i.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Pn.prototype.onRemove=function(t){FE(t,this._vmlEl),this.removeRectText(t)},Pn.prototype.onAdd=function(t){GE(t,this._vmlEl),this.appendRectText(t)};var $E=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};fi.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if($E(o)){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=o.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=o.width,i=o.height,r.width=s,r.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=AE.createElement("div"),zE(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=LE(x[0]*x[0]+x[1]*x[1]),S=LE(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];Q(M,M,x),Q(I,I,x),Q(T,T,x),Q(A,A,x);var D=OE(M[0],I[0],T[0],A[0]),C=OE(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,",","M12=",x[2]/S,",","M21=",x[1]/b,",","M22=",x[3]/S,",","Dx=",CE(u*b+x[4]),",","Dy=",CE(h*S+x[5])),_.padding="0 "+CE(D)+"px "+CE(C)+"px 0",_.filter="progid:DXImageTransform.Microsoft.Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=CE(u)+"px",_.top=CE(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=AE.createElement("div"),this._imageEl=k);var N=k.style;if(v){if(e&&i)N.width=CE(b*e*c/f)+"px",N.height=CE(S*i*d/p)+"px";else{var O=new Image,E=this;O.onload=function(){O.onload=null,e=O.width,i=O.height,N.width=CE(b*e*c/f)+"px",N.height=CE(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},O.src=o}P||((P=AE.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=CE((c+g*c/f)*b),R.height=CE((d+m*d/p)*S),R.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else N.width=CE(b*c)+"px",N.height=CE(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;B<1&&(z+=".Alpha(opacity="+CE(100*B)+") "),z+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",N.filter=z,y.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},fi.prototype.onRemove=function(t){FE(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},fi.prototype.onAdd=function(t){GE(t,this._vmlEl),this.appendRectText(t)};var JE,QE={},tR=0,eR=document.createElement("div"),iR=function(t){var e=QE[t];if(!e){tR>100&&(tR=0,QE={});var i,n=eR.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},QE[t]=e,tR++}return e};!function(t,e){bb[t]=e}("measureText",function(t,e){var i=AE;JE||((JE=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",AE.body.appendChild(JE));try{JE.style.font=e}catch(t){}return JE.innerHTML="",JE.appendChild(i.createTextNode(t)),{width:JE.offsetWidth}});for(var nR=new de,oR=[Db,di,fi,Pn,rM],aR=0;aR<oR.length;aR++){var rR=oR[aR].prototype;rR.drawRectText=function(t,e,i,n){var o=this.style;this.__dirty&&Ye(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=Ze(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);a.push(u.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=iR(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||ke(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(nR.copy(e),nR.applyTransform(v),e=nR),n)c=e.x,d=e.y;else{var y=o.textPosition,x=o.textDistance;if(y instanceof Array)c=e.x+HE(y[0],e.width),d=e.y+HE(y[1],e.height),f=f||"left";else{var _=Re(y,e,x);c=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}c=Oe(c,i.width,f),d=Ee(d,i.height,p),d+=i.height/2;var w,b,S,M=u_,I=this._textVmlEl;I?b=(w=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),w=M("path"),b=M("textpath"),S=M("skew"),b.style["v-text-align"]="left",zE(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",GE(I,S),GE(I,w),GE(I,b),this._textVmlEl=I);var T=[c,d],A=I.style;v&&n?(Q(T,T,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(CE(T[0])||0)+","+(CE(T[1])||0),S.origin="0 0",A.left="0px",A.top="0px"):(S.on=!1,A.left=CE(c)+"px",A.top=CE(d)+"px"),b.string=BE(a);try{b.style.font=m}catch(t){}YE(I,"fill",{fill:o.textFill,opacity:o.opacity},this),YE(I,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash},this),I.style.zIndex=WE(this.zlevel,this.z,this.z2),GE(t,I)}},rR.removeRectText=function(t){FE(t,this._textVmlEl),this._textVmlEl=null},rR.appendRectText=function(t){GE(t,this._textVmlEl)}}rM.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},rM.prototype.onRemove=function(t){this.removeRectText(t)},rM.prototype.onAdd=function(t){this.appendRectText(t)}}d_.prototype={constructor:d_,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||c_(e.width))-c_(e.paddingLeft)-c_(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||c_(e.height))-c_(e.paddingTop)-c_(e.paddingBottom)|0}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){d_.prototype[t]=f_(t)}),Ti("vml",d_);var sR="http://www.w3.org/2000/svg",lR=ES.CMD,uR=Array.prototype.join,hR="none",cR=Math.round,dR=Math.sin,fR=Math.cos,pR=Math.PI,gR=2*Math.PI,mR=180/pR,vR=1e-4,yR={};yR.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=p_("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=S_(n);o.indexOf("NaN")<0&&__(i,"d",o)}b_(i,e,!1,t),x_(i,t.transform),null!=e.text&&bR(t,t.getBoundingRect())};var xR={};xR.brush=function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement&&(i=i.src),i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=p_("image"),t.__svgEl=s),i!==t.__imageSrc&&(w_(s,"href",i),t.__imageSrc=i),__(s,"width",a),__(s,"height",r),__(s,"x",n),__(s,"y",o),x_(s,t.transform),null!=e.text&&bR(t,t.getBoundingRect())}};var _R={},wR=new de,bR=function(t,e,i){var n=t.style;t.__dirty&&Ye(n);var o=n.text;if(null!=o){o+="";var a=t.__textSvgEl;a||(a=p_("text"),t.__textSvgEl=a);var r,s,l=n.textPosition,u=n.textDistance,h=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var c=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||wb,d=M_(n.textVerticalAlign),f=(i=ke(o,c,h,d,n.textPadding,n.textLineHeight)).lineHeight;if(l instanceof Array)r=e.x+l[0],s=e.y+l[1];else{var p=Re(l,e,u);r=p.x,s=p.y,d=M_(p.textVerticalAlign),h=p.textAlign}__(a,"alignment-baseline",d),c&&(a.style.font=c);var g=n.textPadding;if(__(a,"x",r),__(a,"y",s),b_(a,n,!0,t),t instanceof rM||t.style.transformText)x_(a,t.transform);else{if(t.transform)wR.copy(e),wR.applyTransform(t.transform),e=wR;else{var m=t.transformCoordToGlobal(e.x,e.y);e.x=m[0],e.y=m[1],t.transform=_t(xt())}var v=n.textOrigin;"center"===v?(r=i.width/2+r,s=i.height/2+s):v&&(r=v[0]+r,s=v[1]+s);var y=-n.textRotation||0,x=xt();Mt(x,x,y),St(x,x,m=[t.transform[4],t.transform[5]]),x_(a,x)}var _=o.split("\n"),w=_.length,b=h;"left"===b?(b="start",g&&(r+=g[3])):"right"===b?(b="end",g&&(r-=g[1])):"center"===b&&(b="middle",g&&(r+=(g[3]-g[1])/2));var S=0;if("after-edge"===d?(S=-i.height+f,g&&(S-=g[2])):"middle"===d?(S=(-i.height+f)/2,g&&(s+=(g[0]-g[2])/2)):g&&(S+=g[0]),t.__text!==o||t.__textFont!==c){var M=t.__tspanList||[];t.__tspanList=M;for(T=0;T<w;T++)(A=M[T])?A.innerHTML="":(A=M[T]=p_("tspan"),a.appendChild(A),__(A,"alignment-baseline",d),__(A,"text-anchor",b)),__(A,"x",r),__(A,"y",s+T*f+S),A.appendChild(document.createTextNode(_[T]));for(;T<M.length;T++)a.removeChild(M[T]);M.length=w,t.__text=o,t.__textFont=c}else if(t.__tspanList.length)for(var I=t.__tspanList.length,T=0;T<I;++T){var A=t.__tspanList[T];A&&(__(A,"x",r),__(A,"y",s+T*f+S))}}};_R.drawRectText=bR,_R.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],bR(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},I_.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var n=this;t=t.slice();var o=(e=e.slice()).length,a=t.length,r=1,s=o+a,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=o&&u+1>=a){for(var h=[],c=0;c<e.length;c++)h.push(c);return[{indices:h,count:e.length}]}for(;r<=s;){var d=function(){for(var i=-1*r;i<=r;i+=2){var s,u=l[i-1],h=l[i+1],c=(h?h.newPos:0)-i;u&&(l[i-1]=void 0);var d=u&&u.newPos+1<o,f=h&&0<=c&&c<a;if(d||f){if(!d||f&&u.newPos<h.newPos?(s=A_(h),n.pushComponent(s.components,void 0,!0)):((s=u).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=o&&c+1>=a)return T_(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var SR=new I_,MR=function(t,e,i){return SR.diff(t,e,i)};D_.prototype.createElement=p_,D_.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},D_.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},D_.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},D_.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},D_.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},D_.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},D_.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},D_.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},D_.prototype.getSvgProxy=function(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR},D_.prototype.getTextSvgElement=function(t){return t.__textSvgEl},D_.prototype.getSvgElement=function(t){return t.__svgEl},u(C_,D_),C_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},C_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Yw("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},C_.prototype.update=function(t){var e=this;D_.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},C_.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Yw("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Gt(r)[3],l=Zt(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},C_.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&D_.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&D_.prototype.markUsed.call(this,e._dom)}},u(L_,D_),L_.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},L_.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);bt(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},L_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&D_.prototype.markUsed.call(e,t._dom),t._textDom&&D_.prototype.markUsed.call(e,t._textDom)})},u(k_,D_),k_.prototype.addWithoutUpdate=function(t,e){if(e&&P_(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},k_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},k_.prototype.update=function(t,e){var i=e.style;if(P_(i)){var n=this;D_.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},k_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},k_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},k_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&D_.prototype.markUsed.call(this,e._shadowDom)};var IR=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=p_("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new C_(n,o),this.clipPathManager=new L_(n,o),this.shadowManager=new k_(n,o);var r=document.createElement("div");r.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=r,t.appendChild(r),r.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};IR.prototype={constructor:IR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e<o;e++){var r=O_(f=t[e]),s=G_(f)||V_(f);f.invisible||(f.__dirty&&(r&&r.brush(f),this.clipPathManager.update(f),f.style&&(this.gradientManager.update(f.style.fill),this.gradientManager.update(f.style.stroke),this.shadowManager.update(s,f)),f.__dirty=!1),a.push(f))}var l,u=MR(n,a);for(e=0;e<u.length;e++)if((c=u[e]).removed)for(d=0;d<c.count;d++){var s=G_(f=n[c.indices[d]]),h=V_(f);B_(i,s),B_(i,h)}for(e=0;e<u.length;e++){var c=u[e];if(c.added)for(d=0;d<c.count;d++){var s=G_(f=a[c.indices[d]]),h=V_(f);l?R_(i,s,l):z_(i,s),s?R_(i,h,s):l?R_(i,h,l):z_(i,h),R_(i,h,s),l=h||s||l,this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.addWithoutUpdate(l,f),this.clipPathManager.markUsed(f)}else if(!c.removed)for(var d=0;d<c.count;d++){var f=a[c.indices[d]];l=s=V_(f)||G_(f)||l,this.gradientManager.markUsed(f),this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.markUsed(f),this.shadowManager.addWithoutUpdate(s,f),this.clipPathManager.markUsed(f)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(p_("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||N_(s[i])||N_(r.style[i]))-(N_(s[o])||0)-(N_(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){IR.prototype[t]=F_(t)}),Ti("svg",IR),t.version="4.2.1",t.dependencies=ET,t.PRIORITY=VT,t.init=function(t,e,i){var n=ks(t);if(n)return n;var o=new us(t,e,i);return o.id="ec_"+iA++,tA[o.id]=o,Fi(t,oA,o.id),Cs(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,kT(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+nA++,kT(e,function(e){e.group=t})}return eA[t]=!0,t},t.disConnect=Ls,t.disconnect=aA,t.dispose=function(t){"string"==typeof t?t=tA[t]:t instanceof us||(t=ks(t)),t instanceof us&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ks,t.getInstanceById=function(t){return tA[t]},t.registerTheme=Ps,t.registerPreprocessor=Ns,t.registerProcessor=Os,t.registerPostUpdate=function(t){KT.push(t)},t.registerAction=Es,t.registerCoordinateSystem=Rs,t.getCoordinateSystemDimensions=function(t){var e=Fa.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=zs,t.registerVisual=Bs,t.registerLoading=Gs,t.extendComponentModel=Fs,t.extendComponentView=Ws,t.extendSeriesModel=Hs,t.extendChartView=Zs,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){DT.registerMap(t,e,i)},t.getMap=function(t){var e=DT.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=rA,t.zrender=Hb,t.number=YM,t.format=eI,t.throttle=Pr,t.helper=tD,t.matrix=Sw,t.vector=cw,t.color=Ww,t.parseGeoJSON=iD,t.parseGeoJson=rD,t.util=sD,t.graphic=lD,t.List=vA,t.Model=No,t.Axis=aD,t.env=U_}); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | MIT License |
| | | |
| | | Copyright (c) 2020 www.uviewui.com |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in all |
| | | copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| | | SOFTWARE. |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <p align="center"> |
| | | <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;"> |
| | | </p> |
| | | <h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3> |
| | | <h3 align="center">å¤å¹³å°å¿«éå¼åçUIæ¡æ¶</h3> |
| | | |
| | | ## 说æ |
| | | |
| | | uView UIï¼æ¯[uni-app](https://uniapp.dcloud.io/)çæä¼ç§çUIæ¡æ¶ï¼å
¨é¢çç»ä»¶å便æ·çå·¥å
·ä¼è®©æ¨ä¿¡æææ¥ï¼å¦é±¼å¾æ°´ |
| | | |
| | | ## ç¹æ§ |
| | | |
| | | - å
¼å®¹å®åï¼iOSï¼å¾®ä¿¡å°ç¨åºï¼H5ï¼QQå°ç¨åºï¼ç¾åº¦å°ç¨åºï¼æ¯ä»å®å°ç¨åºï¼å¤´æ¡å°ç¨åº |
| | | - 60+ç²¾éç»ä»¶ï¼åè½ä¸°å¯ï¼å¤ç«¯å
¼å®¹ï¼è®©æ¨å¿«ééæï¼å¼ç®±å³ç¨ |
| | | - ä¼å¤è´´å¿çJSå©å¨ï¼è®©æ¨é£é卿ï¼å¬ä¹å³æ¥ï¼ç¾æ¥ç©¿æ¨ |
| | | - ä¼å¤ç常ç¨é¡µé¢åå¸å±ï¼è®©æ¨ä¸æ³¨é»è¾ï¼äºååå |
| | | - è¯¦å°½çææ¡£æ¯æï¼ç°ä»£åçæ¼ç¤ºææ |
| | | - æéå¼å
¥ï¼ç²¾ç®æå
ä½ç§¯ |
| | | |
| | | |
| | | ## å®è£
|
| | | |
| | | ```bash |
| | | # npmæ¹å¼å®è£
ï¼æä»¶å¸åºå¯¼å
¥æ éæ§è¡æ¤å½ä»¤ |
| | | npm i uview-ui |
| | | ``` |
| | | |
| | | ## å¿«é䏿 |
| | | |
| | | 1. `main.js`å¼å
¥uViewåº |
| | | ```js |
| | | // main.js |
| | | import uView from 'uview-ui'; |
| | | Vue.use(uView); |
| | | ``` |
| | | |
| | | 2. `App.vue`å¼å
¥åºç¡æ ·å¼(注æstyleæ ç¾é声æscss屿§æ¯æ) |
| | | ```css |
| | | /* App.vue */ |
| | | <style lang="scss"> |
| | | @import "uview-ui/index.scss"; |
| | | </style> |
| | | ``` |
| | | |
| | | 3. `uni.scss`å¼å
¥å
¨å±scssåéæä»¶ |
| | | ```css |
| | | /* uni.scss */ |
| | | @import "uview-ui/theme.scss"; |
| | | ``` |
| | | |
| | | 4. `pages.json`é
ç½®easycomè§å(æéå¼å
¥) |
| | | |
| | | ```js |
| | | // pages.json |
| | | { |
| | | "easycom": { |
| | | // npmå®è£
çæ¹å¼ä¸éè¦åé¢ç"@/"ï¼ä¸è½½å®è£
çæ¹å¼éè¦"@/" |
| | | // npmå®è£
æ¹å¼ |
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" |
| | | // ä¸è½½å®è£
æ¹å¼ |
| | | // "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" |
| | | }, |
| | | // æ¤ä¸ºæ¬èº«å·²æçå
容 |
| | | "pages": [ |
| | | // ...... |
| | | ] |
| | | } |
| | | ``` |
| | | |
| | | 请éè¿[å¿«é䏿](https://www.uviewui.com/components/quickstart.html)äºè§£æ´è¯¦ç»çå
容 |
| | | |
| | | ## ä½¿ç¨æ¹æ³ |
| | | é
ç½®easycomè§ååï¼èªå¨æéå¼å
¥ï¼æ é`import`ç»ä»¶ï¼ç´æ¥å¼ç¨å³å¯ã |
| | | |
| | | ```html |
| | | <template> |
| | | <u-button text="æé®"></u-button> |
| | | </template> |
| | | ``` |
| | | |
| | | 请éè¿[å¿«é䏿](https://www.uviewui.com/components/quickstart.html)äºè§£æ´è¯¦ç»çå
容 |
| | | |
| | | ## 龿¥ |
| | | |
| | | - [宿¹ææ¡£](https://www.uviewui.com/) |
| | | - [æ´æ°æ¥å¿](https://www.www.uviewui.com/components/changelog.html) |
| | | - [å级æå](https://www.uviewui.com/components/changelog.html) |
| | | - [å
³äºæä»¬](https://www.uviewui.com/cooperation/about.html) |
| | | |
| | | ## é¢è§ |
| | | |
| | | æ¨å¯ä»¥éè¿**微信**æ«ç ï¼æ¥çæä½³çæ¼ç¤ºææã |
| | | <br> |
| | | <br> |
| | | <img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" > |
| | | |
| | | ## æèµ uViewçç å |
| | | |
| | | uViewææ¡£åæºç å
¨é¨å¼æºå
è´¹ï¼å¦ææ¨è®¤ä¸ºuView帮å°äºæ¨çå¼åå·¥ä½ï¼æ¨å¯ä»¥æèµ uViewçç åå·¥ä½ï¼æèµ æ 鍿§ï¼åªææ¯ä¸æ¯å¯ä¹ä¹å¥½(ç¸ä¿¡è¿æ¯æèµä¸»ææ´ææä¹)ã |
| | | |
| | | <img src="https://uviewui.com/common/alipay.png" width="220" ><img style="margin-left: 100px;" src="https://uviewui.com/common/wechat.png" width="220" > |
| | | |
| | | ## çæä¿¡æ¯ |
| | | uViewéµå¾ª[MIT](https://en.wikipedia.org/wiki/MIT_License)弿ºåè®®ï¼æå³çæ¨æ 鿝ä»ä»»ä½è´¹ç¨ï¼ä¹æ éææï¼å³å¯å°uViewåºç¨å°æ¨ç产åä¸ã |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ## 2.0.31ï¼2022-04-19ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤`upload`å¨`vue`页é¢ä¸ä¼ æååæ²¡ææåæ å¿çé®é¢ |
| | | 2. è§£å³æ¼ç¤ºé¡¹ç®ä¸å¾®ä¿¡å°ç¨åºæ¨¡æä¸ä¼ å¾çä¸ç´åºäºä¸ä¼ ä¸é®é¢ |
| | | 3. ä¿®å¤`u-code-input`ç»ä»¶å¨`nvue`页é¢ç¼è¯å°`app`å¹³å°ä¸å
æ å¼å¸¸é®é¢ï¼`app`å»é¤æ¤åè½ï¼ |
| | | 4. ä¿®å¤`actionSheet`ç»ä»¶æ é¢å
³éæé®ç¹å»äºä»¶åç§°é误çé®é¢ |
| | | 5. å
¶ä»ä¿®å¤ |
| | | ## 2.0.30ï¼2022-04-04ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. `u-rate`å¢å `readonly`屿§ |
| | | 2. `tabs`æ»åæ¯æè®¾ç½®èæ¯å¾ç |
| | | 3. ä¿®å¤`u-subsection` `mode`为`subsection`æ¶ï¼æ»åæ ·å¼ä¸æ£ç¡®çé®é¢ |
| | | 4. `u-code-input`æ·»å å
æ ææå¨ç» |
| | | 5. ä¿®å¤`popup`ç`open`äºä»¶ä¸è§¦å |
| | | 6. ä¿®å¤`u-flex-column`æ æçé®é¢ |
| | | 7. ä¿®å¤`u-datetime-picker`ç´¢å¼å¨ç¹å®åºåå¼å¸¸é®é¢ |
| | | 8. ä¿®å¤`u-datetime-picker`æå°æ¶é´å符串模æ¿é误é®é¢ |
| | | 9. `u-swiper`æ·»å `m3u8`éªè¯ |
| | | 10. `u-swiper`ä¿®æ¹å¤æimageåvideoé»è¾ |
| | | 11. ä¿®å¤`swiper`æ æ³ä½¿ç¨æ¬å°å¾çé®é¢ï¼å¢å `type`åæ° |
| | | 12. ä¿®å¤`u-row-notice`æ ¼å¼é误é®é¢ |
| | | 13. ä¿®å¤`u-switch`ç»ä»¶å½`unit`为`rpx`æ¶,`nodeStyle`æ¶å¤±çé®é¢ |
| | | 14. ä¿®å¤`datetime-picker`ç»ä»¶`showToolbar`ä¸`visibleItemCount`屿§æ æçé®é¢ |
| | | 15. ä¿®å¤`upload`ç»ä»¶æ¡ä»¶ç¼è¯ä½ç½®å¤æé误ï¼å¯¼è´`previewImage`屿§è®¾ç½®ä¸º`false`æ¶ï¼æ´ä¸ªç»ä»¶é½ä¼è¢«éèçé®é¢ |
| | | 16. ä¿®å¤`u-checkbox-group`设置`shape`屿§æ æçé®é¢ |
| | | 17. ä¿®å¤`u-upload`ç`capture`ä¼ å
¥åç¬¦ä¸²çæ¶åä¸çæçé®é¢ |
| | | 18. ä¿®å¤`u-action-sheet`ç»ä»¶ï¼å
³éäºä»¶é»è¾é误çé®é¢ |
| | | 19. ä¿®å¤`u-list`触顶äºä»¶ç触åé误çé®é¢ |
| | | 20. ä¿®å¤`u-text`åªæææºå·å¯æ¨æçé®é¢ |
| | | 21. ä¿®å¤`u-textarea`ä¸è½æ¢è¡çé®é¢ |
| | | 22. å
¶ä»ä¿®å¤ |
| | | ## 2.0.29ï¼2022-03-13ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤`u--text`ç»ä»¶è®¾ç½®`decoration`屿§æªçæçé®é¢ |
| | | 2. ä¿®å¤`u-datetime-picker`使ç¨`formatter`åè¿åå¼ä¸æ£ç¡® |
| | | 3. ä¿®å¤`u-datetime-picker` `intercept` å¯è½ä¸ºundefined |
| | | 4. ä¿®å¤å·²è®¾ç½®åä½ uni..config.unit = 'rpx'æ¶ï¼çº¿åæç¤ºå¨ `transform` çä½ç½®ç¿»åï¼å¯¼è´æç¤ºå¨è¶
åºå®½åº¦ |
| | | 5. ä¿®å¤mixinä¸bemæ¹æ³çæçç±»å卿¯ä»å®ååèå°ç¨åºä¸å¤±æ |
| | | 6. ä¿®å¤é»è®¤å¼ä¼ å¼ä¸ºç©ºçæ¶åï¼æå¼`u-datetime-picker`æ¥éï¼ä¸è½éä¸ç¬¬ä¸åæ¶é´çbug |
| | | 7. ä¿®å¤`u-datetime-picker`使ç¨`formatter`åè¿åå¼ä¸æ£ç¡® |
| | | 8. ä¿®å¤`u-image`ç»ä»¶`loading`æ ææçé®é¢ |
| | | 9. ä¿®å¤`config.unit`屿§è®¾ä¸º`rpx`æ¶ï¼å¯¼èªæ å ç¨é«åº¦ä¸è¶³å¯¼è´å¡é·çé®é¢ |
| | | 10. ä¿®å¤`u-datetime-picker`ç»ä»¶`itemHeight`æ æé®é¢ |
| | | 11. å
¶ä»ä¿®å¤ |
| | | ## 2.0.28ï¼2022-02-22ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. searchç»ä»¶æ°å¢searchIconSize屿§ |
| | | 2. å
¼å®¹Safari/Webkitä¸ä¼ å
¥æ¶é´æ ¼å¼å¦2022-02-17 12:00:56 |
| | | 3. ä¿®å¤text value.js å¤ææ¥æåºformaté误é®é¢ |
| | | 4. priceFormatæ ¼å¼åéé¢åºç°ç²¾åº¦é误 |
| | | 5. priceFormatå¨é¨åæ
åµä¸åºç°ç²¾åº¦æå¤±é®é¢ |
| | | 6. ä¼å表årulesæç¤º |
| | | 7. ä¿®å¤avatarç»ä»¶src为空æ¶ï¼å±ç¤ºç¶æä¸å¯¹ |
| | | 8. å
¶ä»ä¿®å¤ |
| | | ## 2.0.27ï¼2022-01-28ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1.æ ·å¼ä¿®å¤ |
| | | ## 2.0.26ï¼2022-01-28ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1.æ ·å¼ä¿®å¤ |
| | | ## 2.0.25ï¼2022-01-27ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤textç»ä»¶mode=priceæ¶ï¼å¯è½ä¼å¯¼è´ç²¾åº¦é误çé®é¢ |
| | | 2. æ·»å $u.setConfig()æ¹æ³ï¼å¯è®¾ç½®uViewå
ç½®çconfig, props, zIndex, color屿§ï¼è¯¦è§ï¼[ä¿®æ¹uViewå
ç½®é
ç½®æ¹æ¡](https://uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE) |
| | | 3. ä¼åformç»ä»¶å¨errorType=toastæ¶ï¼å¦æè¾å
¥é误页é¢ä¼ææå¨çé®é¢ |
| | | 4. ä¿®å¤$u.addUnit()对é
ç½®é»è®¤åä½å¯è½æ æçé®é¢ |
| | | ## 2.0.24ï¼2022-01-25ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤swiperå¨currentæå®é0æ¶ç¼©æ¾æè¯¯ |
| | | 2. ä¿®å¤u-iconæ·»å stop屿§çæ¶åæ¥é |
| | | 3. ä¼åéççéè¿æ£å夿rpxåä½çé®é¢ |
| | | 4. ä¼åLayoutå¸å± vue使ç¨gutteræ¶ï¼ä¼è¶
åºåºå®åºå |
| | | 5. ä¼åsearchç»ä»¶é«åº¦åä½é®é¢ï¼rpx -> pxï¼ |
| | | 6. ä¿®å¤u-image slot å è½½åé误çå¾ç失å»äºé«åº¦ |
| | | 7. ä¿®å¤u-index-listä¸footerææ§½ä¸headerææ§½å卿§å¤æé误 |
| | | 8. ä¿®å¤é¨åæºåä¸u-popupå
³éæ¶ä¼éªç |
| | | 9. ä¿®å¤u-imageå¨nvue-appä¸å¤±å»å®½é« |
| | | 10. ä¿®å¤u-popupè¿è¡æ¥é |
| | | 11. ä¿®å¤u-tooltipæ¥é |
| | | 12. ä¿®å¤box-sizingå¨appä¸çè¦å |
| | | 13. ä¿®å¤u-navbarå¨å°ç¨åºä¸æ¥è¿è¡æ¶é误 |
| | | 14. å
¶ä»ä¿®å¤ |
| | | ## 2.0.23ï¼2022-01-24ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤imageç»ä»¶å¨hx3.3.9çnvueä¸å¯è½ä¼æ¾ç¤ºå¼å¸¸çé®é¢ |
| | | 2. ä¿®å¤colç»ä»¶gutter忰另rpxåä½å¤ç䏿£ç¡®çé®é¢ |
| | | 3. ä¿®å¤textç»ä»¶åè¡æ¶æ æ³æ¾ç¤ºçç¥å·çé®é¢ |
| | | 4. navbaræ·»å titleStyleåæ° |
| | | 5. å级å°hx3.3.9坿¶é¤nvue䏿§å¶å°æ ·å¼è¦åçé®é¢ |
| | | ## 2.0.22ï¼2022-01-19ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. $u.page()æ¹æ³ä¼åï¼é¿å
å¨ç¹æ®åºæ¯å¯è½æ¥éçé®é¢ |
| | | 2. pickerç»ä»¶æ·»å immediateChangeåæ° |
| | | 3. æ°å¢$u.pages()æ¹æ³ |
| | | ## 2.0.21ï¼2022-01-19ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¼åï¼formç»ä»¶å¨ç¨æ·è®¾ç½®rulesçæ¶åæç¤ºç¨æ·modelå¿
ä¼ |
| | | 2. ä¼åéççéè¿æ£å夿rpxåä½çé®é¢ |
| | | 3. ä¿®å¤å¾®ä¿¡å°ç¨åºç¯å¢ä¸tabbarç»ä»¶å¼å¯safeAreaInsetBottom屿§åï¼placeholderé«åº¦å¡«å
䏿£ç¡® |
| | | 4. ä¿®å¤swiperå¨currentæå®é0æ¶ç¼©æ¾æè¯¯ |
| | | 5. ä¿®å¤u-iconæ·»å stop屿§çæ¶åæ¥é |
| | | 6. ä¿®å¤uploadç»ä»¶å¨accept=allçæ¶åæ²¡æä½ç¨ |
| | | 7. ä¿®å¤å¨textç»ä»¶mode为phoneæ¶call屿§æ æçé®é¢ |
| | | 8. å¤çu-form clearValidateæ¹æ³ |
| | | 9. å
¶ä»ä¿®å¤ |
| | | ## 2.0.20ï¼2022-01-14ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤calendaré»è®¤ä¼éæ©ä¸ä¸ªæ¥æï¼å¦æç´æ¥ç¹ç¡®å®çè¯ï¼æ æ³åå°å¼çé®é¢ |
| | | 2. ä¿®å¤Slider缺å°disabled props è¿ææ³¨é |
| | | 3. ä¿®å¤u-notice-barç¹å»äºä»¶æ æ³æ¿å°indexç´¢å¼å¼çé®é¢ |
| | | 4. ä¿®å¤u-collapse-itemå¨vueæä»¶ä¸ï¼app端èªå®ä¹ææ§½ä¸çæçé®é¢ |
| | | 5. ä¼å头åä¸ºç©ºæ¶æ¾ç¤ºé»è®¤å¤´å |
| | | 6. ä¿®å¤å¾çå°åèµå¼å夿å è½½ç¶æä¸ºå®æé®é¢ |
| | | 7. ä¿®å¤æ¥åæ»å¨å°é»è®¤æ¥ææä»½åºå |
| | | 8. searchç»ä»¶æ´é²ç¹å»å·¦è¾¹iconäºä»¶ |
| | | 9. ä¿®å¤u-form clearValidateæ¹æ³ä¸çæ |
| | | 10. upload h5端å¢å è¿åæä»¶åæ°ï¼æä»¶çnameåæ°ï¼ |
| | | 11. å¤çuploadéæ©æä»¶åurl为blobç±»åæ æ³é¢è§çé®é¢ |
| | | 12. u-code-input ä¿®å¤è¾å
¥æ¡æ²¡æå¾å·¦ç§»åºä¸åå±å¹ |
| | | 13. ä¿®å¤Uploadä¸ä¼ disabled为trueæ¶ï¼æ§å¶å°æ¥hoverClassç±»åé误 |
| | | 14. 临æ¶å¤çios appä¸gridç¹å»åå¡é®é¢ |
| | | 15. å
¶ä»ä¿®å¤ |
| | | ## 2.0.19ï¼2021-12-29ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¼å微信å°ç¨åºå
ä½ç§¯å¯å¨å¾®ä¿¡ä¸é¢è§ï¼è¯·å级HbuilderX3.3.4ï¼åæ¶å¨âè¿è¡->è¿è¡å°å°ç¨åºæ¨¡æå¨âä¸å¾éâè¿è¡æ¶æ¯å¦å缩代ç â |
| | | 2. ä¼å微信å°ç¨åºsetDataæ§è½ï¼å¤çæäºæ¹æ³å¦$u.route()æ æ³å¨æ¨¡æ¿ä¸ä½¿ç¨çé®é¢ |
| | | 3. navbaræ·»å autoBackåæ° |
| | | 4. å
许avatarç»ä»¶çäºä»¶å泡 |
| | | 5. ä¿®å¤cellç»ä»¶æ¥éé®é¢ |
| | | 6. å
¶ä»ä¿®å¤ |
| | | ## 2.0.18ï¼2021-12-28ï¼ |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤app端ç¼è¯æ¥éé®é¢ |
| | | 2. éæ°å¤ç微信å°ç¨åºç«¯setDataè¿å¤§çæ§è½é®é¢ |
| | | 3. ä¿®å¤è¾¹æ¡é®é¢ |
| | | 4. ä¿®å¤æå¤§æå°æä»½ä¸å¤§äº0åæ²¡ææ°æ®åºç°çé®é¢ |
| | | 5. ä¿®å¤SwipeAction微信å°ç¨åºç«¯æ æ³ä¸ä¸æ»å¨é®é¢ |
| | | 6. ä¿®å¤inputçplaceholderå¨å°ç¨åºç«¯é»è®¤æ¾ç¤ºä¸ºtrueé®é¢ |
| | | 7. ä¿®å¤dividerç»ä»¶clickäºä»¶æ æé®é¢ |
| | | 8. ä¿®å¤u-code-input maxlength 屿§å¼ä¸º String ç±»åæ¶æ¾ç¤ºå¼å¸¸ |
| | | 9. ä¿®å¤å½ gridåªæ 1å°2æ¶ å¨å°ç¨åºç«¯alginè®¾ç½®æ æçé®é¢ |
| | | 10. å¤çform-itemçlabel为topæ¶ï¼åæ¶é误æç¤ºçå·¦è¾¹è· |
| | | 11. å
¶ä»ä¿®å¤ |
| | | ## 2.0.17ï¼2021-12-26ï¼ |
| | | ## uViewæ£å¨åä¸å¼æºä¸å½çâ年度æä½³é¡¹ç®âè¯éï¼ä¹åæè¿ç¥¨çç°å¨ä¹å¯ä»¥æç¥¨ï¼æ³è¯·åå¦ä»¬æä¸ç¥¨ï¼[ç¹æ¤å¸®å©uView](https://www.oschina.net/project/top_cn_2021/?id=583) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. è§£å³HBuilderX3.3.3.20211225çæ¬å¯¼è´çæ ·å¼é®é¢ |
| | | 2. calendaræ¥åæ·»å monthNumåæ° |
| | | 3. navbaræ·»å center slot |
| | | ## 2.0.16ï¼2021-12-25ï¼ |
| | | ## uViewæ£å¨åä¸å¼æºä¸å½çâ年度æä½³é¡¹ç®âè¯éï¼ä¹åæè¿ç¥¨çç°å¨ä¹å¯ä»¥æç¥¨ï¼æ³è¯·åå¦ä»¬æä¸ç¥¨ï¼[ç¹æ¤å¸®å©uView](https://www.oschina.net/project/top_cn_2021/?id=583) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. è§£å³å¾®ä¿¡å°ç¨åºsetDataæ§è½é®é¢ |
| | | 2. ä¿®å¤count-downç»ä»¶changeäºä»¶ä¸è§¦åé®é¢ |
| | | ## 2.0.15ï¼2021-12-21ï¼ |
| | | ## uViewæ£å¨åä¸å¼æºä¸å½çâ年度æä½³é¡¹ç®âè¯éï¼ä¹åæè¿ç¥¨çç°å¨ä¹å¯ä»¥æç¥¨ï¼æ³è¯·åå¦ä»¬æä¸ç¥¨ï¼[ç¹æ¤å¸®å©uView](https://www.oschina.net/project/top_cn_2021/?id=583) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤Cellåå
æ ¼titleWidthæ æ |
| | | 2. ä¿®å¤cheakboxç»ä»¶ischecked䏿´æ° |
| | | 3. ä¿®å¤keyboardæ¯å¦æ¾ç¤º"."æé®é»è®¤å¼é®é¢ |
| | | 4. ä¿®å¤number-keyboardæ¯å¦æ¾ç¤ºé®çç"."符å·é®é¢ |
| | | 5. ä¿®å¤Inputè¾å
¥æ¡ readonlyæ æ |
| | | 6. ä¿®å¤u-avatar å¯¼è´æå
appãH5æ¶åæ¥éé®é¢ |
| | | 7. ä¿®å¤Uploadä¸ä¼ deletableæ æ |
| | | 8. ä¿®å¤uploadå½è®¾ç½®maxSizeæ¶æ æçé®é¢ |
| | | 9. ä¿®å¤tabs lineWidthä¼ å
¥å¸¦åä½çåç¬¦ä¸²çæ¶ååç§»é计ç®é误é®é¢ |
| | | 10. ä¿®å¤rateç»ä»¶å¨æpaddingçviewå
ï¼æ¾ç¤ºçææä½ç½®åå¯è§¦æ¸åºåä¸å¹é
ï¼æ æ³æ£å¸¸é䏿æ |
| | | ## 2.0.13ï¼2021-12-14ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤é
ç½®é»è®¤åä½ä¸ºrpxå¯è½ä¼å¯¼è´èªå®ä¹å¯¼èªæ é«åº¦å¼å¸¸çé®é¢ |
| | | ## 2.0.12ï¼2021-12-14ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤tabsç»ä»¶å¨vueç¯å¢ä¸å线æ¶å¤±çé®é¢ |
| | | 2. ä¿®å¤uploadç»ä»¶å¨å®åå°ç¨åºæ æ³éæ©è§é¢çé®é¢ |
| | | 3. æ·»å uni.$u.config.unité
ç½®ï¼ç¨äºé
ç½®åæ°é»è®¤åä½ï¼è¯¦è§ï¼[é»è®¤åä½é
ç½®](https://www.uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE) |
| | | 4. ä¿®å¤textareaç»ä»¶å¨æ²¡ç»å®v-modelæ¶ï¼å符ç»è®¡ä¸çæé®é¢ |
| | | 5. ä¿®å¤nvue䏿§å¶æ¯å¦åºç°æ»å¨æ¡å¤±æé®é¢ |
| | | ## 2.0.11ï¼2021-12-13ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. textç»ä»¶alignåæ°æ æçé®é¢ |
| | | 2. subsectionç»ä»¶æ·»å keyNameåæ° |
| | | 3. uploadç»ä»¶æ æ³å¤æ[Object file]ç±»åçé®é¢ |
| | | 4. å¤çnotifyå±çº§è¿ä½é®é¢ |
| | | 5. codeInputç»ä»¶æ·»å disabledDotåæ° |
| | | 6. å¤çactionSheetç»ä»¶roundåæ°æ æçé®é¢ |
| | | 7. calendarç»ä»¶æ·»å roundåæ°ç¨äºæ§å¶åè§å¼ |
| | | 8. å¤çswipeActionç»ä»¶å¨vueç¯å¢ä¸é»è®¤è¢«æå¼çé®é¢ |
| | | 9. buttonç»ä»¶çthrottleTimeèæµåæ°æ æçé®é¢ |
| | | 10. è§£å³u-notifyæå¨å
³éæ¹æ³close()æ æçé®é¢ |
| | | 11. inputç»ä»¶readonlyä¸çæé®é¢ |
| | | 12. tagç»ä»¶typeåæ°ä¸ºinfoä¸çæé®é¢ |
| | | ## 2.0.10ï¼2021-12-08ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤button sendMessagePath屿§ä¸çæ |
| | | 2. ä¿®å¤DatetimePickeréæ©å¨titleæ æ |
| | | 3. ä¿®å¤u-toast设置loading=trueä¸çæ |
| | | 4. ä¿®å¤u-texté颿¨¡å¼ä¼ 0æ¥é |
| | | 5. ä¿®å¤u-toastç»ä»¶çicon屿§é
ç½®ä¸çæ |
| | | 6. buttonçiconå¨ç¹æ®åºæ¯ä¸çé¢è²ä¼å |
| | | 7. IndexListä¼åï¼å¢å # |
| | | ## 2.0.9ï¼2021-12-01ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¼åswiperçheightæ¯æ100%å¼(ä»
vueææ)ï¼ä¿®å¤åµå
¥è§é¢æ¶clickäºä»¶æ æ³è§¦åçé®é¢ |
| | | 2. ä¼åtabsç»ä»¶å¯¹listå¼ä¸ºç©ºçå¤æï¼æè
卿åålistæ¶éæ°è®¡ç®ç¸å
³å°ºå¯¸çé®é¢ |
| | | 3. ä¼ådatetime-pickerç»ä»¶é»è¾ï¼è®©å
¶åç»æå¼çé»è®¤å¼ä¸ºä¸ä¸æ¬¡çéä¸å¼ï¼éè¦éè¿v-modelç»å®å¼æææ |
| | | 4. ä¿®å¤uploadå
åµå¨å
¶ä»ç»ä»¶ä¸ï¼éæ©å¾çå¯è½ä¸ä¼æ¢è¡çé®é¢ |
| | | ## 2.0.8ï¼2021-12-01ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤toastçpositionåæ°æ æé®é¢ |
| | | 2. å¤çinputå¨ios nvue䏿 æ³è·å¾ç¦ç¹çé®é¢ |
| | | 3. avatar-groupç»ä»¶æ·»å extraValueåæ°ï¼è®©å©ä½å±ç¤ºæ°é坿卿§å¶ |
| | | 4. tabsç»ä»¶æ·»å keyNameåæ°ç¨äºé
ç½®ä»å¯¹è±¡ä¸è¯»åçé®å |
| | | 5. å¤çtextç»ä»¶ååè±æé»è®¤é
ç½®æ æçé®é¢ |
| | | 6. å¤çpickerç»ä»¶itemææ¬å¤ªé¿æ¢è¡é®é¢ |
| | | ## 2.0.7ï¼2021-11-30ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. ä¿®å¤radioåcheckbox卿æ¹åv-modelæ æçé®é¢ã |
| | | 2. ä¼åformè§åvalidatorå¨å¾®ä¿¡å°ç¨åºç¨æ³ |
| | | 3. ä¿®å¤backtopç»ä»¶modeåæ°å¨å¾®ä¿¡å°ç¨åºæ æçé®é¢ |
| | | 4. å¤çAlbumçpreviewFullImage屿§æ æçé®é¢ |
| | | 5. å¤çu-datetime-pickerç»ä»¶mode='time'å¨éæ©æ¹åæ¶é´æ¶ï¼æ§å¶å°æ¥éçé®é¢ |
| | | ## 2.0.6ï¼2021-11-27ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. å¤çtagç»ä»¶å¨vueä¸è¾¹æ¡æ æçé®é¢ã |
| | | 2. å¤çpopupç»ä»¶åè§åæ°å¯è½æ æçé®é¢ã |
| | | 3. å¤çtabsç»ä»¶lineColoråæ°å¯è½æ æçé®é¢ã |
| | | 4. propgressç»ä»¶å¨å¼å¾å°æ¶ï¼æ¾ç¤ºå¼å¸¸çé®é¢ã |
| | | ## 2.0.5ï¼2021-11-25ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. calendarå¨vue䏿¾ç¤ºå¼å¸¸é®é¢ã |
| | | 2. formç»ä»¶labelPositionåerrorTypeåæ°æ æçé®é¢ |
| | | 3. inputç»ä»¶inputAlignæ æçé®é¢ |
| | | 4. å
¶ä»ä¸äºä¿®å¤ |
| | | ## 2.0.4ï¼2021-11-23ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 0. inputç»ä»¶ç¼ºå¤±@confirmäºä»¶ï¼ä»¥åsubfixåprefixæ æé®é¢ |
| | | 1. component.scssæä»¶æ ·å¼å¨vueä¸å¹²æ°å
¨å±å¸å±é®é¢ |
| | | 2. ä¿®å¤subsectionå¨vueç¯å¢ä¸è¡¨ç°å¼å¸¸çé®é¢ |
| | | 3. tagç»ä»¶çbgColorçåæ°æ æçé®é¢ |
| | | 4. uploadç»ä»¶ä¸æ¢è¡çé®é¢ |
| | | 5. å
¶ä»çä¸äºä¿®å¤å¤ç |
| | | ## 2.0.3ï¼2021-11-16ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. uView2.0å·²å®ç°å
¨é¢å
¼å®¹nvue |
| | | 2. uView2.0对1.xè¿è¡äºæ¶æéæï¼ç»èåæ§è½é½ææå¤§æå |
| | | 3. ç®åuView2.0为å
¬æµé¶æ®µï¼ç¸å
³ç»èå¯è½ä¼æåå¨ |
| | | 4. æä»¬åäºä¸ä»½ä¸1.xçå¯¹æ¯æåï¼è¯¦è§[对æ¯1.x](https://www.uviewui.com/components/diff1.x.html) |
| | | 5. å¤çmodalçconfirmåè°äºä»¶æ¼åé误é®é¢ |
| | | 6. å¤çinputç»ä»¶@inputäºä»¶åæ°é误é®é¢ |
| | | 7. å
¶ä»ä¸äºä¿®å¤ |
| | | ## 2.0.2ï¼2021-11-16ï¼ |
| | | ## [ç¹å»å 群交æµåé¦ï¼1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. uView2.0å·²å®ç°å
¨é¢å
¼å®¹nvue |
| | | 2. uView2.0对1.xè¿è¡äºæ¶æéæï¼ç»èåæ§è½é½ææå¤§æå |
| | | 3. ç®åuView2.0为å
¬æµé¶æ®µï¼ç¸å
³ç»èå¯è½ä¼æåå¨ |
| | | 4. æä»¬åäºä¸ä»½ä¸1.xçå¯¹æ¯æåï¼è¯¦è§[对æ¯1.x](https://www.uviewui.com/components/diff1.x.html) |
| | | 5. ä¿®å¤inputç»ä»¶formatteråæ°ç¼ºå¤±é®é¢ |
| | | 6. ä¼åloading-iconç»ä»¶çscssåæ³é®é¢ï¼é²æ¢ä¸å
¼å®¹æ°çæ¬scss |
| | | ## 2.0.0(2020-11-15) |
| | | ## [ç¹å»å 群交æµåé¦ï¼1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) |
| | | |
| | | # uView2.0éç£
åå¸ï¼å©ååºéï¼ä¸ç»æ±æ¹ |
| | | |
| | | 1. uView2.0å·²å®ç°å
¨é¢å
¼å®¹nvue |
| | | 2. uView2.0对1.xè¿è¡äºæ¶æéæï¼ç»èåæ§è½é½ææå¤§æå |
| | | 3. ç®åuView2.0为å
¬æµé¶æ®µï¼ç¸å
³ç»èå¯è½ä¼æåå¨ |
| | | 4. æä»¬åäºä¸ä»½ä¸1.xçå¯¹æ¯æåï¼è¯¦è§[对æ¯1.x](https://www.uviewui.com/components/diff1.x.html) |
| | | 5. ä¿®å¤inputç»ä»¶formatteråæ°ç¼ºå¤±é®é¢ |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <uvForm |
| | | ref="uForm" |
| | | :model="model" |
| | | :rules="rules" |
| | | :errorType="errorType" |
| | | :borderBottom="borderBottom" |
| | | :labelPosition="labelPosition" |
| | | :labelWidth="labelWidth" |
| | | :labelAlign="labelAlign" |
| | | :labelStyle="labelStyle" |
| | | :customStyle="customStyle" |
| | | > |
| | | <slot /> |
| | | </uvForm> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ¤ç»ä»¶åå¨ççç±æ¯ï¼å¨nvueä¸ï¼u-form被uni-app宿¹å ç¨äºï¼u-formå¨nvueä¸ç¸å½äºformç»ä»¶ |
| | | * æä»¥å¨nvueä¸ï¼åå为u--formï¼å
é¨å
¶å®è¿æ¯u-form.vueï¼åªä¸è¿åä¸å±ä¸è½¬ |
| | | */ |
| | | import uvForm from '../u-form/u-form.vue'; |
| | | import props from '../u-form/props.js' |
| | | export default { |
| | | // #ifdef MP-WEIXIN |
| | | name: 'u-form', |
| | | // #endif |
| | | // #ifndef MP-WEIXIN |
| | | name: 'u--form', |
| | | // #endif |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | components: { |
| | | uvForm |
| | | }, |
| | | created() { |
| | | this.children = [] |
| | | }, |
| | | methods: { |
| | | // æå¨è®¾ç½®æ ¡éªçè§åï¼å¦æè§å䏿彿°çè¯ï¼å¾®ä¿¡å°ç¨åºä¸ä¼è¿æ»¤æï¼æä»¥åªè½æå¨è°ç¨è®¾ç½®è§å |
| | | setRules(rules) { |
| | | this.$refs.uForm.setRules(rules) |
| | | }, |
| | | validate() { |
| | | /** |
| | | * å¨å¾®ä¿¡å°ç¨åºä¸ï¼éè¿this.$parentæ¿å°çç¶ç»ä»¶æ¯u--formï¼è䏿¯å
¶å
åµçu-form |
| | | * 导è´å¨u-formç»ä»¶ä¸ï¼æ¿ä¸å°å¯¹åºçchildrenæ°ç»ï¼ä»èæ ¡éªæ æï¼æä»¥è¿éæ¯æ¬¡è°ç¨u-formç»ä»¶ä¸ç |
| | | * å¯¹åºæ¹æ³çæ¶åï¼å¨å°ç¨åºä¸é½å
å°u--formçchildrenèµå¼ç»u-formä¸çchildren |
| | | */ |
| | | // #ifdef MP-WEIXIN |
| | | this.setMpData() |
| | | // #endif |
| | | return this.$refs.uForm.validate() |
| | | }, |
| | | validateField(value, callback) { |
| | | // #ifdef MP-WEIXIN |
| | | this.setMpData() |
| | | // #endif |
| | | return this.$refs.uForm.validateField(value, callback) |
| | | }, |
| | | resetFields() { |
| | | // #ifdef MP-WEIXIN |
| | | this.setMpData() |
| | | // #endif |
| | | return this.$refs.uForm.resetFields() |
| | | }, |
| | | clearValidate(props) { |
| | | // #ifdef MP-WEIXIN |
| | | this.setMpData() |
| | | // #endif |
| | | return this.$refs.uForm.clearValidate(props) |
| | | }, |
| | | setMpData() { |
| | | this.$refs.uForm.children = this.children |
| | | } |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <uvImage |
| | | :src="src" |
| | | :mode="mode" |
| | | :width="width" |
| | | :height="height" |
| | | :shape="shape" |
| | | :radius="radius" |
| | | :lazyLoad="lazyLoad" |
| | | :showMenuByLongpress="showMenuByLongpress" |
| | | :loadingIcon="loadingIcon" |
| | | :errorIcon="errorIcon" |
| | | :showLoading="showLoading" |
| | | :showError="showError" |
| | | :fade="fade" |
| | | :webp="webp" |
| | | :duration="duration" |
| | | :bgColor="bgColor" |
| | | :customStyle="customStyle" |
| | | @click="$emit('click')" |
| | | @error="$emit('error')" |
| | | @load="$emit('load')" |
| | | > |
| | | <template v-slot:loading> |
| | | <slot name="loading"></slot> |
| | | </template> |
| | | <template v-slot:error> |
| | | <slot name="error"></slot> |
| | | </template> |
| | | </uvImage> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ¤ç»ä»¶åå¨ççç±æ¯ï¼å¨nvueä¸ï¼u-image被uni-app宿¹å ç¨äºï¼u-imageå¨nvueä¸ç¸å½äºimageç»ä»¶ |
| | | * æä»¥å¨nvueä¸ï¼åå为u--imageï¼å
é¨å
¶å®è¿æ¯u-iamge.vueï¼åªä¸è¿åä¸å±ä¸è½¬ |
| | | */ |
| | | import uvImage from '../u-image/u-image.vue'; |
| | | import props from '../u-image/props.js'; |
| | | export default { |
| | | name: 'u--image', |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | components: { |
| | | uvImage |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <uvInput |
| | | :value="value" |
| | | :type="type" |
| | | :fixed="fixed" |
| | | :disabled="disabled" |
| | | :disabledColor="disabledColor" |
| | | :clearable="clearable" |
| | | :password="password" |
| | | :maxlength="maxlength" |
| | | :placeholder="placeholder" |
| | | :placeholderClass="placeholderClass" |
| | | :placeholderStyle="placeholderStyle" |
| | | :showWordLimit="showWordLimit" |
| | | :confirmType="confirmType" |
| | | :confirmHold="confirmHold" |
| | | :holdKeyboard="holdKeyboard" |
| | | :focus="focus" |
| | | :autoBlur="autoBlur" |
| | | :disableDefaultPadding="disableDefaultPadding" |
| | | :cursor="cursor" |
| | | :cursorSpacing="cursorSpacing" |
| | | :selectionStart="selectionStart" |
| | | :selectionEnd="selectionEnd" |
| | | :adjustPosition="adjustPosition" |
| | | :inputAlign="inputAlign" |
| | | :fontSize="fontSize" |
| | | :color="color" |
| | | :prefixIcon="prefixIcon" |
| | | :suffixIcon="suffixIcon" |
| | | :suffixIconStyle="suffixIconStyle" |
| | | :prefixIconStyle="prefixIconStyle" |
| | | :border="border" |
| | | :readonly="readonly" |
| | | :shape="shape" |
| | | :customStyle="customStyle" |
| | | :formatter="formatter" |
| | | @focus="$emit('focus')" |
| | | @blur="$emit('blur')" |
| | | @keyboardheightchange="$emit('keyboardheightchange')" |
| | | @change="e => $emit('change', e)" |
| | | @input="e => $emit('input', e)" |
| | | @confirm="e => $emit('confirm', e)" |
| | | @clear="$emit('clear')" |
| | | @click="$emit('click')" |
| | | > |
| | | <!-- #ifdef MP --> |
| | | <slot name="prefix"></slot> |
| | | <slot name="suffix"></slot> |
| | | <!-- #endif --> |
| | | <!-- #ifndef MP --> |
| | | <slot name="prefix" slot="prefix"></slot> |
| | | <slot name="suffix" slot="suffix"></slot> |
| | | <!-- #endif --> |
| | | </uvInput> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ¤ç»ä»¶åå¨ççç±æ¯ï¼å¨nvueä¸ï¼u-input被uni-app宿¹å ç¨äºï¼u-inputå¨nvueä¸ç¸å½äºinputç»ä»¶ |
| | | * æä»¥å¨nvueä¸ï¼åå为u--inputï¼å
é¨å
¶å®è¿æ¯u-input.vueï¼åªä¸è¿åä¸å±ä¸è½¬ |
| | | */ |
| | | import uvInput from '../u-input/u-input.vue'; |
| | | import props from '../u-input/props.js' |
| | | export default { |
| | | name: 'u--input', |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | components: { |
| | | uvInput |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <uvText |
| | | :type="type" |
| | | :show="show" |
| | | :text="text" |
| | | :prefixIcon="prefixIcon" |
| | | :suffixIcon="suffixIcon" |
| | | :mode="mode" |
| | | :href="href" |
| | | :format="format" |
| | | :call="call" |
| | | :openType="openType" |
| | | :bold="bold" |
| | | :block="block" |
| | | :lines="lines" |
| | | :color="color" |
| | | :decoration="decoration" |
| | | :size="size" |
| | | :iconStyle="iconStyle" |
| | | :margin="margin" |
| | | :lineHeight="lineHeight" |
| | | :align="align" |
| | | :wordWrap="wordWrap" |
| | | :customStyle="customStyle" |
| | | @click="$emit('click')" |
| | | ></uvText> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ¤ç»ä»¶åå¨ççç±æ¯ï¼å¨nvueä¸ï¼u-text被uni-app宿¹å ç¨äºï¼u-textå¨nvueä¸ç¸å½äºinputç»ä»¶ |
| | | * æä»¥å¨nvueä¸ï¼åå为u--inputï¼å
é¨å
¶å®è¿æ¯u-text.vueï¼åªä¸è¿åä¸å±ä¸è½¬ |
| | | * ä¸ä½¿ç¨v-bind="$attrs"ï¼èæ¯åå¼ç¬ç«åä¼ åï¼æ¯å 为微信å°ç¨åºä¸æ¯ææ¤åæ³ |
| | | */ |
| | | import uvText from "../u-text/u-text.vue"; |
| | | import props from "../u-text/props.js"; |
| | | export default { |
| | | name: "u--text", |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | components: { |
| | | uvText, |
| | | }, |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <uvTextarea |
| | | :value="value" |
| | | :placeholder="placeholder" |
| | | :height="height" |
| | | :confirmType="confirmType" |
| | | :disabled="disabled" |
| | | :count="count" |
| | | :focus="focus" |
| | | :autoHeight="autoHeight" |
| | | :fixed="fixed" |
| | | :cursorSpacing="cursorSpacing" |
| | | :cursor="cursor" |
| | | :showConfirmBar="showConfirmBar" |
| | | :selectionStart="selectionStart" |
| | | :selectionEnd="selectionEnd" |
| | | :adjustPosition="adjustPosition" |
| | | :disableDefaultPadding="disableDefaultPadding" |
| | | :holdKeyboard="holdKeyboard" |
| | | :maxlength="maxlength" |
| | | :border="border" |
| | | :customStyle="customStyle" |
| | | :formatter="formatter" |
| | | @focus="e => $emit('focus')" |
| | | @blur="e => $emit('blur')" |
| | | @linechange="e => $emit('linechange', e)" |
| | | @confirm="e => $emit('confirm')" |
| | | @input="e => $emit('input', e)" |
| | | @keyboardheightchange="e => $emit('keyboardheightchange')" |
| | | ></uvTextarea> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ¤ç»ä»¶åå¨ççç±æ¯ï¼å¨nvueä¸ï¼u--textarea被uni-app宿¹å ç¨äºï¼u-textareaå¨nvueä¸ç¸å½äºtextareaç»ä»¶ |
| | | * æä»¥å¨nvueä¸ï¼åå为u--textareaï¼å
é¨å
¶å®è¿æ¯u-textarea.vueï¼åªä¸è¿åä¸å±ä¸è½¬ |
| | | */ |
| | | import uvTextarea from '../u-textarea/u-textarea.vue'; |
| | | import props from '../u-textarea/props.js' |
| | | export default { |
| | | name: 'u--textarea', |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | components: { |
| | | uvTextarea |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æä½è忝å¦å±ç¤º ï¼é»è®¤falseï¼ |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.actionSheet.show |
| | | }, |
| | | // æ é¢ |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.actionSheet.title |
| | | }, |
| | | // é项䏿¹çæè¿°ä¿¡æ¯ |
| | | description: { |
| | | type: String, |
| | | default: uni.$u.props.actionSheet.description |
| | | }, |
| | | // æ°æ® |
| | | actions: { |
| | | type: Array, |
| | | default: uni.$u.props.actionSheet.actions |
| | | }, |
| | | // åæ¶æé®çæåï¼ä¸ä¸ºç©ºæ¶æ¾ç¤ºæé® |
| | | cancelText: { |
| | | type: String, |
| | | default: uni.$u.props.actionSheet.cancelText |
| | | }, |
| | | // ç¹å»æä¸ªèåé¡¹æ¶æ¯å¦å
³éå¼¹çª |
| | | closeOnClickAction: { |
| | | type: Boolean, |
| | | default: uni.$u.props.actionSheet.closeOnClickAction |
| | | }, |
| | | // å¤çåºé¨å®å
¨åºï¼é»è®¤trueï¼ |
| | | safeAreaInsetBottom: { |
| | | type: Boolean, |
| | | default: uni.$u.props.actionSheet.safeAreaInsetBottom |
| | | }, |
| | | // å°ç¨åºçæå¼æ¹å¼ |
| | | openType: { |
| | | type: String, |
| | | default: uni.$u.props.actionSheet.openType |
| | | }, |
| | | // ç¹å»é®ç½©æ¯å¦å
许å
³é (é»è®¤true) |
| | | closeOnClickOverlay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.actionSheet.closeOnClickOverlay |
| | | }, |
| | | // åè§å¼ |
| | | round: { |
| | | type: [Boolean, String, Number], |
| | | default: uni.$u.props.actionSheet.round |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <u-popup |
| | | :show="show" |
| | | mode="bottom" |
| | | @close="closeHandler" |
| | | :safeAreaInsetBottom="safeAreaInsetBottom" |
| | | :round="round" |
| | | > |
| | | <view class="u-action-sheet"> |
| | | <view |
| | | class="u-action-sheet__header" |
| | | v-if="title" |
| | | > |
| | | <text class="u-action-sheet__header__title u-line-1">{{title}}</text> |
| | | <view |
| | | class="u-action-sheet__header__icon-wrap" |
| | | @tap.stop="cancel" |
| | | > |
| | | <u-icon |
| | | name="close" |
| | | size="17" |
| | | color="#c8c9cc" |
| | | bold |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <text |
| | | class="u-action-sheet__description" |
| | | :style="[{ |
| | | marginTop: `${title && description ? 0 : '18px'}` |
| | | }]" |
| | | v-if="description" |
| | | >{{description}}</text> |
| | | <slot> |
| | | <u-line v-if="description"></u-line> |
| | | <view class="u-action-sheet__item-wrap"> |
| | | <template v-for="(item, index) in actions"> |
| | | <!-- #ifdef MP --> |
| | | <button |
| | | :key="index" |
| | | class="u-reset-button" |
| | | :openType="item.openType" |
| | | @getuserinfo="onGetUserInfo" |
| | | @contact="onContact" |
| | | @getphonenumber="onGetPhoneNumber" |
| | | @error="onError" |
| | | @launchapp="onLaunchApp" |
| | | @opensetting="onOpenSetting" |
| | | :lang="lang" |
| | | :session-from="sessionFrom" |
| | | :send-message-title="sendMessageTitle" |
| | | :send-message-path="sendMessagePath" |
| | | :send-message-img="sendMessageImg" |
| | | :show-message-card="showMessageCard" |
| | | :app-parameter="appParameter" |
| | | @tap="selectHandler(index)" |
| | | :hover-class="!item.disabled && !item.loading ? 'u-action-sheet--hover' : ''" |
| | | > |
| | | <!-- #endif --> |
| | | <view |
| | | class="u-action-sheet__item-wrap__item" |
| | | @tap.stop="selectHandler(index)" |
| | | :hover-class="!item.disabled && !item.loading ? 'u-action-sheet--hover' : ''" |
| | | :hover-stay-time="150" |
| | | > |
| | | <template v-if="!item.loading"> |
| | | <text |
| | | class="u-action-sheet__item-wrap__item__name" |
| | | :style="[itemStyle(index)]" |
| | | >{{ item.name }}</text> |
| | | <text |
| | | v-if="item.subname" |
| | | class="u-action-sheet__item-wrap__item__subname" |
| | | >{{ item.subname }}</text> |
| | | </template> |
| | | <u-loading-icon |
| | | v-else |
| | | custom-class="van-action-sheet__loading" |
| | | size="18" |
| | | mode="circle" |
| | | /> |
| | | </view> |
| | | <!-- #ifdef MP --> |
| | | </button> |
| | | <!-- #endif --> |
| | | <u-line v-if="index !== actions.length - 1"></u-line> |
| | | </template> |
| | | </view> |
| | | </slot> |
| | | <u-gap |
| | | bgColor="#eaeaec" |
| | | height="6" |
| | | v-if="cancelText" |
| | | ></u-gap> |
| | | <view hover-class="u-action-sheet--hover"> |
| | | <text |
| | | @touchmove.stop.prevent |
| | | :hover-stay-time="150" |
| | | v-if="cancelText" |
| | | class="u-action-sheet__cancel-text" |
| | | @tap="cancel" |
| | | >{{cancelText}}</text> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </template> |
| | | |
| | | <script> |
| | | import openType from '../../libs/mixin/openType' |
| | | import button from '../../libs/mixin/button' |
| | | import props from './props.js'; |
| | | /** |
| | | * ActionSheet æä½èå |
| | | * @description æ¬ç»ä»¶ç¨äºä»åºé¨å¼¹åºä¸ä¸ªæä½èåï¼ä¾ç¨æ·éæ©å¹¶è¿åç»æãæ¬ç»ä»¶åè½ç±»ä¼¼äºuniçuni.showActionSheetAPIï¼é
ç½®æ´å çµæ´»ï¼ææå¹³å°é½è¡¨ç°ä¸è´ã |
| | | * @tutorial https://www.uviewui.com/components/actionSheet.html |
| | | * |
| | | * @property {Boolean} show æä½è忝å¦å±ç¤º ï¼é»è®¤ false ï¼ |
| | | * @property {String} title æä½èåæ é¢ |
| | | * @property {String} description é项䏿¹çæè¿°ä¿¡æ¯ |
| | | * @property {Array<Object>} actions æé®çæåæ°ç»ï¼è§å®æ¹ææ¡£ç¤ºä¾ |
| | | * @property {String} cancelText åæ¶æé®çæç¤ºæå,ä¸ä¸ºç©ºæ¶æ¾ç¤ºæé® |
| | | * @property {Boolean} closeOnClickAction ç¹å»æä¸ªèåé¡¹æ¶æ¯å¦å
³éå¼¹çª ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} safeAreaInsetBottom å¤çåºé¨å®å
¨åº ï¼é»è®¤ true ï¼ |
| | | * @property {String} openType å°ç¨åºçæå¼æ¹å¼ (contact | launchApp | getUserInfo | openSetting ï½getPhoneNumber ï½error ) |
| | | * @property {Boolean} closeOnClickOverlay ç¹å»é®ç½©æ¯å¦å
许å
³é (é»è®¤ true ) |
| | | * @property {Number|String} round åè§å¼ï¼é»è®¤æ åè§ (é»è®¤ 0 ) |
| | | * @property {String} lang æå®è¿åç¨æ·ä¿¡æ¯çè¯è¨ï¼zh_CN ç®ä½ä¸æï¼zh_TW ç¹ä½ä¸æï¼en è±æ |
| | | * @property {String} sessionFrom ä¼è¯æ¥æºï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessageTitle ä¼è¯å
æ¶æ¯å¡çæ é¢ï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessagePath ä¼è¯å
æ¶æ¯å¡çç¹å»è·³è½¬å°ç¨åºè·¯å¾ï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessageImg ä¼è¯å
æ¶æ¯å¡çå¾çï¼openType="contact"æ¶ææ |
| | | * @property {Boolean} showMessageCard æ¯å¦æ¾ç¤ºä¼è¯å
æ¶æ¯å¡çï¼è®¾ç½®æ¤åæ°ä¸º trueï¼ç¨æ·è¿å
¥å®¢æä¼è¯ä¼å¨å³ä¸è§æ¾ç¤º"å¯è½è¦åéçå°ç¨åº"æç¤ºï¼ç¨æ·ç¹å»åå¯ä»¥å¿«éåéå°ç¨åºæ¶æ¯ï¼openType="contact"æ¶ææ ï¼é»è®¤ false ï¼ |
| | | * @property {String} appParameter æå¼ APP æ¶ï¼å APP ä¼ éçåæ°ï¼openType=launchApp æ¶ææ |
| | | * |
| | | * @event {Function} select ç¹å»ActionSheetå表项æ¶è§¦å |
| | | * @event {Function} close ç¹å»åæ¶æé®æ¶è§¦å |
| | | * @event {Function} getuserinfo ç¨æ·ç¹å»è¯¥æé®æ¶ï¼ä¼è¿åè·åå°çç¨æ·ä¿¡æ¯ï¼åè°ç detail æ°æ®ä¸ wx.getUserInfo è¿åçä¸è´ï¼openType="getUserInfo"æ¶ææ |
| | | * @event {Function} contact å®¢ææ¶æ¯åè°ï¼openType="contact"æ¶ææ |
| | | * @event {Function} getphonenumber è·åç¨æ·ææºå·åè°ï¼openType="getPhoneNumber"æ¶ææ |
| | | * @event {Function} error å½ä½¿ç¨å¼æ¾è½åæ¶ï¼åçé误çåè°ï¼openType="error"æ¶ææ |
| | | * @event {Function} launchapp æå¼ APP æåçåè°ï¼openType="launchApp"æ¶ææ |
| | | * @event {Function} opensetting 卿弿æè®¾ç½®é¡µååè°ï¼openType="openSetting"æ¶ææ |
| | | * @example <u-action-sheet :actions="list" :title="title" :show="show"></u-action-sheet> |
| | | */ |
| | | export default { |
| | | name: "u-action-sheet", |
| | | // ä¸äºpropsåæ°åmethodsæ¹æ³ï¼éè¿mixinæ··å
¥ï¼å 为å
¶ä»æä»¶ä¹ä¼ç¨å° |
| | | mixins: [openType, button, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | // æä½é¡¹ç®çæ ·å¼ |
| | | itemStyle() { |
| | | return (index) => { |
| | | let style = {}; |
| | | if (this.actions[index].color) style.color = this.actions[index].color |
| | | if (this.actions[index].fontSize) style.fontSize = uni.$u.addUnit(this.actions[index].fontSize) |
| | | // é项被ç¦ç¨çæ ·å¼ |
| | | if (this.actions[index].disabled) style.color = '#c0c4cc' |
| | | return style; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | closeHandler() { |
| | | // å
许ç¹å»é®ç½©å
³éæ¶ï¼æååºcloseäºä»¶ |
| | | if(this.closeOnClickOverlay) { |
| | | this.$emit('close') |
| | | } |
| | | }, |
| | | // ç¹å»åæ¶æé® |
| | | cancel() { |
| | | this.$emit('close') |
| | | }, |
| | | selectHandler(index) { |
| | | const item = this.actions[index] |
| | | if (item && !item.disabled && !item.loading) { |
| | | this.$emit('select', item) |
| | | if (this.closeOnClickAction) { |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-action-sheet-reset-button-width:100% !default; |
| | | $u-action-sheet-title-font-size: 16px !default; |
| | | $u-action-sheet-title-padding: 12px 30px !default; |
| | | $u-action-sheet-title-color: $u-main-color !default; |
| | | $u-action-sheet-header-icon-wrap-right:15px !default; |
| | | $u-action-sheet-header-icon-wrap-top:15px !default; |
| | | $u-action-sheet-description-font-size:13px !default; |
| | | $u-action-sheet-description-color:14px !default; |
| | | $u-action-sheet-description-margin: 18px 15px !default; |
| | | $u-action-sheet-item-wrap-item-padding:15px !default; |
| | | $u-action-sheet-item-wrap-name-font-size:16px !default; |
| | | $u-action-sheet-item-wrap-subname-font-size:13px !default; |
| | | $u-action-sheet-item-wrap-subname-color: #c0c4cc !default; |
| | | $u-action-sheet-item-wrap-subname-margin-top:10px !default; |
| | | $u-action-sheet-cancel-text-font-size:16px !default; |
| | | $u-action-sheet-cancel-text-color:$u-content-color !default; |
| | | $u-action-sheet-cancel-text-font-size:15px !default; |
| | | $u-action-sheet-cancel-text-hover-background-color:rgb(242, 243, 245) !default; |
| | | |
| | | .u-reset-button { |
| | | width: $u-action-sheet-reset-button-width; |
| | | } |
| | | |
| | | .u-action-sheet { |
| | | text-align: center; |
| | | &__header { |
| | | position: relative; |
| | | padding: $u-action-sheet-title-padding; |
| | | &__title { |
| | | font-size: $u-action-sheet-title-font-size; |
| | | color: $u-action-sheet-title-color; |
| | | font-weight: bold; |
| | | text-align: center; |
| | | } |
| | | |
| | | &__icon-wrap { |
| | | position: absolute; |
| | | right: $u-action-sheet-header-icon-wrap-right; |
| | | top: $u-action-sheet-header-icon-wrap-top; |
| | | } |
| | | } |
| | | |
| | | &__description { |
| | | font-size: $u-action-sheet-description-font-size; |
| | | color: $u-tips-color; |
| | | margin: $u-action-sheet-description-margin; |
| | | text-align: center; |
| | | } |
| | | |
| | | &__item-wrap { |
| | | |
| | | &__item { |
| | | padding: $u-action-sheet-item-wrap-item-padding; |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | |
| | | &__name { |
| | | font-size: $u-action-sheet-item-wrap-name-font-size; |
| | | color: $u-main-color; |
| | | text-align: center; |
| | | } |
| | | |
| | | &__subname { |
| | | font-size: $u-action-sheet-item-wrap-subname-font-size; |
| | | color: $u-action-sheet-item-wrap-subname-color; |
| | | margin-top: $u-action-sheet-item-wrap-subname-margin-top; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | &__cancel-text { |
| | | font-size: $u-action-sheet-cancel-text-font-size; |
| | | color: $u-action-sheet-cancel-text-color; |
| | | text-align: center; |
| | | padding: $u-action-sheet-cancel-text-font-size; |
| | | } |
| | | |
| | | &--hover { |
| | | background-color: $u-action-sheet-cancel-text-hover-background-color; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å¾çå°åï¼Array<String>|Array<Object>å½¢å¼ |
| | | urls: { |
| | | type: Array, |
| | | default: uni.$u.props.album.urls |
| | | }, |
| | | // æå®ä»æ°ç»ç对象å
ç´ ä¸è¯»ååªä¸ªå±æ§ä½ä¸ºå¾çå°å |
| | | keyName: { |
| | | type: String, |
| | | default: uni.$u.props.album.keyName |
| | | }, |
| | | // å徿¶ï¼å¾çé¿è¾¹çé¿åº¦ |
| | | singleSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.album.singleSize |
| | | }, |
| | | // å¤å¾æ¶ï¼å¾çè¾¹é¿ |
| | | multipleSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.album.multipleSize |
| | | }, |
| | | // å¤å¾æ¶ï¼å¾çæ°´å¹³ååç´ä¹é´çé´é |
| | | space: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.album.space |
| | | }, |
| | | // å徿¶ï¼å¾ç缩æ¾è£åªçæ¨¡å¼ |
| | | singleMode: { |
| | | type: String, |
| | | default: uni.$u.props.album.singleMode |
| | | }, |
| | | // å¤å¾æ¶ï¼å¾ç缩æ¾è£åªçæ¨¡å¼ |
| | | multipleMode: { |
| | | type: String, |
| | | default: uni.$u.props.album.multipleMode |
| | | }, |
| | | // æå¤å±ç¤ºçå¾çæ°éï¼è¶
åºæ¶æåä¸ä¸ªä½ç½®å°ä¼æ¾ç¤ºå©ä½å¾çæ°é |
| | | maxCount: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.album.maxCount |
| | | }, |
| | | // æ¯å¦å¯ä»¥é¢è§å¾ç |
| | | previewFullImage: { |
| | | type: Boolean, |
| | | default: uni.$u.props.album.previewFullImage |
| | | }, |
| | | // æ¯è¡å±ç¤ºå¾çæ°éï¼å¦è®¾ç½®ï¼singleSizeåmultipleSizeå°ä¼æ æ |
| | | rowCount: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.album.rowCount |
| | | }, |
| | | // è¶
åºmaxCountæ¶æ¯å¦æ¾ç¤ºæ¥çæ´å¤çæç¤º |
| | | showMore: { |
| | | type: Boolean, |
| | | default: uni.$u.props.album.showMore |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-album"> |
| | | <view |
| | | class="u-album__row" |
| | | ref="u-album__row" |
| | | v-for="(arr, index) in showUrls" |
| | | :forComputedUse="albumWidth" |
| | | :key="index" |
| | | > |
| | | <view |
| | | class="u-album__row__wrapper" |
| | | v-for="(item, index1) in arr" |
| | | :key="index1" |
| | | :style="[imageStyle(index + 1, index1 + 1)]" |
| | | @tap="previewFullImage ? onPreviewTap(getSrc(item)) : ''" |
| | | > |
| | | <image |
| | | :src="getSrc(item)" |
| | | :mode=" |
| | | urls.length === 1 |
| | | ? imageHeight > 0 |
| | | ? singleMode |
| | | : 'widthFix' |
| | | : multipleMode |
| | | " |
| | | :style="[ |
| | | { |
| | | width: imageWidth, |
| | | height: imageHeight |
| | | } |
| | | ]" |
| | | ></image> |
| | | <view |
| | | v-if=" |
| | | showMore && |
| | | urls.length > rowCount * showUrls.length && |
| | | index === showUrls.length - 1 && |
| | | index1 === showUrls[showUrls.length - 1].length - 1 |
| | | " |
| | | class="u-album__row__wrapper__text" |
| | | > |
| | | <u--text |
| | | :text="`+${urls.length - maxCount}`" |
| | | color="#fff" |
| | | :size="multipleSize * 0.3" |
| | | align="center" |
| | | customStyle="justify-content: center" |
| | | ></u--text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js' |
| | | // #ifdef APP-NVUE |
| | | // ç±äºweex为é¿éçKPIä¸ç»©èæ ¸ç产ç©ï¼æä»¥ä¸æ¯æç¾åæ¯åä½ï¼è¿ééè¦éè¿domæ¥è¯¢ç»ä»¶ç宽度 |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | |
| | | /** |
| | | * Album ç¸å |
| | | * @description æ¬ç»ä»¶æä¾ä¸ä¸ªç±»ä¼¼ç¸åçåè½ï¼è®©å¼åè
å¼åèµ·æ¥æ´å å¾å¿åºæãåå°éå¤ç模æ¿ä»£ç |
| | | * @tutorial https://www.uviewui.com/components/album.html |
| | | * |
| | | * @property {Array} urls å¾çå°åå表 Array<String>|Array<Object>å½¢å¼ |
| | | * @property {String} keyName æå®ä»æ°ç»ç对象å
ç´ ä¸è¯»ååªä¸ªå±æ§ä½ä¸ºå¾çå°å |
| | | * @property {String | Number} singleSize å徿¶ï¼å¾çé¿è¾¹çé¿åº¦ ï¼é»è®¤ 180 ï¼ |
| | | * @property {String | Number} multipleSize å¤å¾æ¶ï¼å¾çè¾¹é¿ ï¼é»è®¤ 70 ï¼ |
| | | * @property {String | Number} space å¤å¾æ¶ï¼å¾çæ°´å¹³ååç´ä¹é´çé´é ï¼é»è®¤ 6 ï¼ |
| | | * @property {String} singleMode å徿¶ï¼å¾ç缩æ¾è£åªçæ¨¡å¼ ï¼é»è®¤ 'scaleToFill' ï¼ |
| | | * @property {String} multipleMode å¤å¾æ¶ï¼å¾ç缩æ¾è£åªçæ¨¡å¼ ï¼é»è®¤ 'aspectFill' ï¼ |
| | | * @property {String | Number} maxCount åæ¶æé®çæç¤ºæå ï¼é»è®¤ 9 ï¼ |
| | | * @property {Boolean} previewFullImage æ¯å¦å¯ä»¥é¢è§å¾ç ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} rowCount æ¯è¡å±ç¤ºå¾çæ°éï¼å¦è®¾ç½®ï¼singleSizeåmultipleSizeå°ä¼æ æ ï¼é»è®¤ 3 ï¼ |
| | | * @property {Boolean} showMore è¶
åºmaxCountæ¶æ¯å¦æ¾ç¤ºæ¥çæ´å¤çæç¤º ï¼é»è®¤ true ï¼ |
| | | * |
| | | * @event {Function} albumWidth æäºç¹æ®çæ
åµä¸ï¼éè¦è®©æåä¸ç¸åç宽度ç¸çï¼è¿éäºä»¶çå½¢å¼å¯¹å¤åé ï¼åè°åæ° width ï¼ |
| | | * @example <u-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></u-album> |
| | | */ |
| | | export default { |
| | | name: 'u-album', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // åå¾ç宽度 |
| | | singleWidth: 0, |
| | | // åå¾çé«åº¦ |
| | | singleHeight: 0, |
| | | // å徿¶ï¼å¦ææ æ³è·åå¾çç尺寸信æ¯ï¼è®©å¾ç宽度é»è®¤ä¸ºå®¹å¨çä¸å®ç¾åæ¯ |
| | | singlePercent: 0.6 |
| | | } |
| | | }, |
| | | watch: { |
| | | urls: { |
| | | immediate: true, |
| | | handler(newVal) { |
| | | if (newVal.length === 1) { |
| | | this.getImageRect() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | imageStyle() { |
| | | return (index1, index2) => { |
| | | const { space, rowCount, multipleSize, urls } = this, |
| | | { addUnit, addStyle } = uni.$u, |
| | | rowLen = this.showUrls.length, |
| | | allLen = this.urls.length |
| | | const style = { |
| | | marginRight: addUnit(space), |
| | | marginBottom: addUnit(space) |
| | | } |
| | | // å¦æä¸ºæåä¸è¡ï¼åæ¯ä¸ªå¾ç齿 éä¸è¾¹æ¡ |
| | | if (index1 === rowLen) style.marginBottom = 0 |
| | | // æ¯è¡çæå³è¾¹ä¸å¼ åæ»é¿åº¦çæåä¸å¼ æ éå³è¾¹æ¡ |
| | | if ( |
| | | index2 === rowCount || |
| | | (index1 === rowLen && |
| | | index2 === this.showUrls[index1 - 1].length) |
| | | ) |
| | | style.marginRight = 0 |
| | | return style |
| | | } |
| | | }, |
| | | // å°æ°ç»åå为äºç»´æ°ç» |
| | | showUrls() { |
| | | const arr = [] |
| | | this.urls.map((item, index) => { |
| | | // é嶿大å±ç¤ºæ°é |
| | | if (index + 1 <= this.maxCount) { |
| | | // 计ç®è¯¥å
ç´ ä¸ºç¬¬å ä¸ªç´ ç»å
|
| | | const itemIndex = Math.floor(index / this.rowCount) |
| | | // 夿坹åºçç´¢å¼æ¯å¦åå¨ |
| | | if (!arr[itemIndex]) { |
| | | arr[itemIndex] = [] |
| | | } |
| | | arr[itemIndex].push(item) |
| | | } |
| | | }) |
| | | return arr |
| | | }, |
| | | imageWidth() { |
| | | return uni.$u.addUnit( |
| | | this.urls.length === 1 ? this.singleWidth : this.multipleSize |
| | | ) |
| | | }, |
| | | imageHeight() { |
| | | return uni.$u.addUnit( |
| | | this.urls.length === 1 ? this.singleHeight : this.multipleSize |
| | | ) |
| | | }, |
| | | // æ¤åéæ å®é
ç¨éï¼ä»
ä»
æ¯ä¸ºäºå©ç¨computedç¹æ§ï¼è®©å
¶å¨urlsé¿åº¦çååæ¶ï¼éæ°è®¡ç®å¾çç宽度 |
| | | // å ä¸ºç¨æ·å¨æäºç¹æ®çæ
åµä¸ï¼éè¦è®©æåä¸ç¸åç宽度ç¸çï¼æä»¥è¿éäºä»¶çå½¢å¼å¯¹å¤åé |
| | | albumWidth() { |
| | | let width = 0 |
| | | if (this.urls.length === 1) { |
| | | width = this.singleWidth |
| | | } else { |
| | | width = |
| | | this.showUrls[0].length * this.multipleSize + |
| | | this.space * (this.showUrls[0].length - 1) |
| | | } |
| | | this.$emit('albumWidth', width) |
| | | return width |
| | | } |
| | | }, |
| | | methods: { |
| | | // é¢è§å¾ç |
| | | onPreviewTap(url) { |
| | | const urls = this.urls.map((item) => { |
| | | return this.getSrc(item) |
| | | }) |
| | | uni.previewImage({ |
| | | current: url, |
| | | urls |
| | | }) |
| | | }, |
| | | // è·åå¾ççè·¯å¾ |
| | | getSrc(item) { |
| | | return uni.$u.test.object(item) |
| | | ? (this.keyName && item[this.keyName]) || item.src |
| | | : item |
| | | }, |
| | | // å徿¶ï¼è·åå¾çç尺寸 |
| | | // å¨å°ç¨åºä¸ï¼éè¦å°ç½ç»å¾çççååæ·»å å°å°ç¨åºçdownloadååæå¯è½è·å尺寸 |
| | | // 卿²¡ææ·»å çæ
åµä¸ï¼è®©åå¾å®½åº¦é»è®¤ä¸ºçåçä¸å®å®½åº¦(singlePercent) |
| | | getImageRect() { |
| | | const src = this.getSrc(this.urls[0]) |
| | | uni.getImageInfo({ |
| | | src, |
| | | success: (res) => { |
| | | // 夿å¾ç横åè¿æ¯ç«åå±ç¤ºæ¹å¼ |
| | | const isHorizotal = res.width >= res.height |
| | | this.singleWidth = isHorizotal |
| | | ? this.singleSize |
| | | : (res.width / res.height) * this.singleSize |
| | | this.singleHeight = !isHorizotal |
| | | ? this.singleSize |
| | | : (res.height / res.width) * this.singleWidth |
| | | }, |
| | | fail: () => { |
| | | this.getComponentWidth() |
| | | } |
| | | }) |
| | | }, |
| | | // è·åç»ä»¶ç宽度 |
| | | async getComponentWidth() { |
| | | // å»¶æ¶ä¸å®æ¶é´ï¼ä»¥è·ådom尺寸 |
| | | await uni.$u.sleep(30) |
| | | // #ifndef APP-NVUE |
| | | this.$uGetRect('.u-album__row').then((size) => { |
| | | this.singleWidth = size.width * this.singlePercent |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | // è¿éref="u-album__row"æå¨çæ ç¾ä¸ºéè¿for循ç¯åºæ¥ï¼å¯¼è´this.$refs['u-album__row']æ¯ä¸ä¸ªæ°ç» |
| | | const ref = this.$refs['u-album__row'][0] |
| | | ref && |
| | | dom.getComponentRect(ref, (res) => { |
| | | this.singleWidth = res.size.width * this.singlePercent |
| | | }) |
| | | // #endif |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | |
| | | .u-album { |
| | | @include flex(column); |
| | | |
| | | &__row { |
| | | @include flex(row); |
| | | flex-wrap: wrap; |
| | | |
| | | &__wrapper { |
| | | position: relative; |
| | | |
| | | &__text { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-color: rgba(0, 0, 0, 0.3); |
| | | @include flex(row); |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¾ç¤ºæå |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.alert.title |
| | | }, |
| | | // 主é¢ï¼success/warning/info/error |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.alert.type |
| | | }, |
| | | // è¾
婿§æå |
| | | description: { |
| | | type: String, |
| | | default: uni.$u.props.alert.description |
| | | }, |
| | | // æ¯å¦å¯å
³é |
| | | closable: { |
| | | type: Boolean, |
| | | default: uni.$u.props.alert.closable |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå¾æ |
| | | showIcon: { |
| | | type: Boolean, |
| | | default: uni.$u.props.alert.showIcon |
| | | }, |
| | | // æµ
ææ·±è²è°ï¼light-æµ
è²ï¼dark-æ·±è² |
| | | effect: { |
| | | type: String, |
| | | default: uni.$u.props.alert.effect |
| | | }, |
| | | // æåæ¯å¦å±
ä¸ |
| | | center: { |
| | | type: Boolean, |
| | | default: uni.$u.props.alert.center |
| | | }, |
| | | // åä½å¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.alert.fontSize |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-transition |
| | | mode="fade" |
| | | :show="show" |
| | | > |
| | | <view |
| | | class="u-alert" |
| | | :class="[`u-alert--${type}--${effect}`]" |
| | | @tap.stop="clickHandler" |
| | | :style="[$u.addStyle(customStyle)]" |
| | | > |
| | | <view |
| | | class="u-alert__icon" |
| | | v-if="showIcon" |
| | | > |
| | | <u-icon |
| | | :name="iconName" |
| | | size="18" |
| | | :color="iconColor" |
| | | ></u-icon> |
| | | </view> |
| | | <view |
| | | class="u-alert__content" |
| | | :style="[{ |
| | | paddingRight: closable ? '20px' : 0 |
| | | }]" |
| | | > |
| | | <text |
| | | class="u-alert__content__title" |
| | | v-if="title" |
| | | :style="[{ |
| | | fontSize: $u.addUnit(fontSize), |
| | | textAlign: center ? 'center' : 'left' |
| | | }]" |
| | | :class="[effect === 'dark' ? 'u-alert__text--dark' : `u-alert__text--${type}--light`]" |
| | | >{{ title }}</text> |
| | | <text |
| | | class="u-alert__content__desc" |
| | | v-if="description" |
| | | :style="[{ |
| | | fontSize: $u.addUnit(fontSize), |
| | | textAlign: center ? 'center' : 'left' |
| | | }]" |
| | | :class="[effect === 'dark' ? 'u-alert__text--dark' : `u-alert__text--${type}--light`]" |
| | | >{{ description }}</text> |
| | | </view> |
| | | <view |
| | | class="u-alert__close" |
| | | v-if="closable" |
| | | @tap.stop="closeHandler" |
| | | > |
| | | <u-icon |
| | | name="close" |
| | | :color="iconColor" |
| | | size="15" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </u-transition> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Alert è¦åæç¤º |
| | | * @description è¦åæç¤ºï¼å±ç°éè¦å
³æ³¨çä¿¡æ¯ã |
| | | * @tutorial https://www.uviewui.com/components/alertTips.html |
| | | * |
| | | * @property {String} title æ¾ç¤ºçæå |
| | | * @property {String} type 使ç¨é¢è®¾çé¢è² ï¼é»è®¤ 'warning' ï¼ |
| | | * @property {String} description è¾
婿§æåï¼é¢è²æ¯titleæµ
ä¸ç¹ï¼åå·ä¹å°ä¸ç¹ï¼å¯é |
| | | * @property {Boolean} closable å
³éæé®(é»è®¤ä¸ºåå·icon徿 ) ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} showIcon æ¯å¦æ¾ç¤ºå·¦è¾¹çè¾
å©å¾æ ï¼ é»è®¤ false ï¼ |
| | | * @property {String} effect å¤å¾æ¶ï¼å¾ç缩æ¾è£åªçæ¨¡å¼ ï¼é»è®¤ 'light' ï¼ |
| | | * @property {Boolean} center æåæ¯å¦å±
ä¸ ï¼é»è®¤ false ï¼ |
| | | * @property {String | Number} fontSize åä½å¤§å° ï¼é»è®¤ 14 ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * @event {Function} click ç¹å»ç»ä»¶æ¶è§¦å |
| | | * @example <u-alert :title="title" type = "warning" :closable="closable" :description = "description"></u-alert> |
| | | */ |
| | | export default { |
| | | name: 'u-alert', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | show: true |
| | | } |
| | | }, |
| | | computed: { |
| | | iconColor() { |
| | | return this.effect === 'light' ? this.type : '#fff' |
| | | }, |
| | | // ä¸å主é¢å¯¹åºä¸åç徿 |
| | | iconName() { |
| | | switch (this.type) { |
| | | case 'success': |
| | | return 'checkmark-circle-fill'; |
| | | break; |
| | | case 'error': |
| | | return 'close-circle-fill'; |
| | | break; |
| | | case 'warning': |
| | | return 'error-circle-fill'; |
| | | break; |
| | | case 'info': |
| | | return 'info-circle-fill'; |
| | | break; |
| | | case 'primary': |
| | | return 'more-circle-fill'; |
| | | break; |
| | | default: |
| | | return 'error-circle-fill'; |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // ç¹å»å
容 |
| | | clickHandler() { |
| | | this.$emit('click') |
| | | }, |
| | | // ç¹å»å
³éæé® |
| | | closeHandler() { |
| | | this.show = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-alert { |
| | | position: relative; |
| | | background-color: $u-primary; |
| | | padding: 8px 10px; |
| | | @include flex(row); |
| | | align-items: center; |
| | | border-top-left-radius: 4px; |
| | | border-top-right-radius: 4px; |
| | | border-bottom-left-radius: 4px; |
| | | border-bottom-right-radius: 4px; |
| | | |
| | | &--primary--dark { |
| | | background-color: $u-primary; |
| | | } |
| | | |
| | | &--primary--light { |
| | | background-color: #ecf5ff; |
| | | } |
| | | |
| | | &--error--dark { |
| | | background-color: $u-error; |
| | | } |
| | | |
| | | &--error--light { |
| | | background-color: #FEF0F0; |
| | | } |
| | | |
| | | &--success--dark { |
| | | background-color: $u-success; |
| | | } |
| | | |
| | | &--success--light { |
| | | background-color: #f5fff0; |
| | | } |
| | | |
| | | &--warning--dark { |
| | | background-color: $u-warning; |
| | | } |
| | | |
| | | &--warning--light { |
| | | background-color: #FDF6EC; |
| | | } |
| | | |
| | | &--info--dark { |
| | | background-color: $u-info; |
| | | } |
| | | |
| | | &--info--light { |
| | | background-color: #f4f4f5; |
| | | } |
| | | |
| | | &__icon { |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | &__content { |
| | | @include flex(column); |
| | | flex: 1; |
| | | |
| | | &__title { |
| | | color: $u-main-color; |
| | | font-size: 14px; |
| | | font-weight: bold; |
| | | color: #fff; |
| | | margin-bottom: 2px; |
| | | } |
| | | |
| | | &__desc { |
| | | color: $u-main-color; |
| | | font-size: 14px; |
| | | flex-wrap: wrap; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | &__title--dark, |
| | | &__desc--dark { |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | &__text--primary--light, |
| | | &__text--primary--light { |
| | | color: $u-primary; |
| | | } |
| | | |
| | | &__text--success--light, |
| | | &__text--success--light { |
| | | color: $u-success; |
| | | } |
| | | |
| | | &__text--warning--light, |
| | | &__text--warning--light { |
| | | color: $u-warning; |
| | | } |
| | | |
| | | &__text--error--light, |
| | | &__text--error--light { |
| | | color: $u-error; |
| | | } |
| | | |
| | | &__text--info--light, |
| | | &__text--info--light { |
| | | color: $u-info; |
| | | } |
| | | |
| | | &__close { |
| | | position: absolute; |
| | | top: 11px; |
| | | right: 10px; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // 头åå¾çç» |
| | | urls: { |
| | | type: Array, |
| | | default: uni.$u.props.avatarGroup.urls |
| | | }, |
| | | // æå¤å±ç¤ºç头忰é |
| | | maxCount: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatarGroup.maxCount |
| | | }, |
| | | // 头åå½¢ç¶ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.avatarGroup.shape |
| | | }, |
| | | // å¾çè£åªæ¨¡å¼ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.avatarGroup.mode |
| | | }, |
| | | // è¶
åºmaxCountæ¶æ¯å¦æ¾ç¤ºæ¥çæ´å¤çæç¤º |
| | | showMore: { |
| | | type: Boolean, |
| | | default: uni.$u.props.avatarGroup.showMore |
| | | }, |
| | | // 头åå¤§å° |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatarGroup.size |
| | | }, |
| | | // æå®ä»æ°ç»ç对象å
ç´ ä¸è¯»ååªä¸ªå±æ§ä½ä¸ºå¾çå°å |
| | | keyName: { |
| | | type: String, |
| | | default: uni.$u.props.avatarGroup.keyName |
| | | }, |
| | | // 头åä¹é´ç鮿¡æ¯ä¾ |
| | | gap: { |
| | | type: [String, Number], |
| | | validator(value) { |
| | | return value >= 0 && value <= 1 |
| | | }, |
| | | default: uni.$u.props.avatarGroup.gap |
| | | }, |
| | | // éé¢å¤æ¾ç¤ºçå¼ |
| | | extraValue: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.avatarGroup.extraValue |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-avatar-group"> |
| | | <view |
| | | class="u-avatar-group__item" |
| | | v-for="(item, index) in showUrl" |
| | | :key="index" |
| | | :style="{ |
| | | marginLeft: index === 0 ? 0 : $u.addUnit(-size * gap) |
| | | }" |
| | | > |
| | | <u-avatar |
| | | :size="size" |
| | | :shape="shape" |
| | | :mode="mode" |
| | | :src="$u.test.object(item) ? keyName && item[keyName] || item.url : item" |
| | | ></u-avatar> |
| | | <view |
| | | class="u-avatar-group__item__show-more" |
| | | v-if="showMore && index === showUrl.length - 1 && (urls.length > maxCount || extraValue > 0)" |
| | | @tap="clickHandler" |
| | | > |
| | | <u--text |
| | | color="#ffffff" |
| | | :size="size * 0.4" |
| | | :text="`+${extraValue || urls.length - showUrl.length}`" |
| | | align="center" |
| | | customStyle="justify-content: center" |
| | | ></u--text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * AvatarGroup 头åç» |
| | | * @description æ¬ç»ä»¶ä¸è¬ç¨äºå±ç¤ºå¤´åçå°æ¹ï¼å¦ä¸ªäººä¸å¿ï¼æè
è¯è®ºå表页çç¨æ·å¤´åå±ç¤ºçåºæã |
| | | * @tutorial https://www.uviewui.com/components/avatar.html |
| | | * |
| | | * @property {Array} urls 头åå¾çç» ï¼é»è®¤ [] ï¼ |
| | | * @property {String | Number} maxCount æå¤å±ç¤ºç头忰é ï¼ é»è®¤ 5 ï¼ |
| | | * @property {String} shape 头åå½¢ç¶ï¼ 'circle' (é»è®¤) | 'square' ï¼ |
| | | * @property {String} mode å¾çè£åªæ¨¡å¼ï¼é»è®¤ 'scaleToFill' ï¼ |
| | | * @property {Boolean} showMore è¶
åºmaxCountæ¶æ¯å¦æ¾ç¤ºæ¥çæ´å¤çæç¤º ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} size 头åå¤§å° ï¼é»è®¤ 40 ï¼ |
| | | * @property {String} keyName æå®ä»æ°ç»ç对象å
ç´ ä¸è¯»ååªä¸ªå±æ§ä½ä¸ºå¾çå°å |
| | | * @property {String | Number} gap 头åä¹é´ç鮿¡æ¯ä¾ï¼0.4ä»£è¡¨é®æ¡40%ï¼ ï¼é»è®¤ 0.5 ï¼ |
| | | * @property {String | Number} extraValue éé¢å¤æ¾ç¤ºçå¼ |
| | | * @event {Function} showMore 头åç»æ´å¤ç¹å» |
| | | * @example <u-avatar-group:urls="urls" size="35" gap="0.4" ></u-avatar-group:urls=> |
| | | */ |
| | | export default { |
| | | name: 'u-avatar-group', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | showUrl() { |
| | | return this.urls.slice(0, this.maxCount) |
| | | } |
| | | }, |
| | | methods: { |
| | | clickHandler() { |
| | | this.$emit('showMore') |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-avatar-group { |
| | | @include flex; |
| | | |
| | | &__item { |
| | | margin-left: -10px; |
| | | position: relative; |
| | | |
| | | &--no-indent { |
| | | // å¦æä½ æ³è´¨çä½è
ä¸ä¼ä½¿ç¨:first-childï¼è¯´æä½ 太年轻ï¼å 为nvue䏿¯æ |
| | | margin-left: 0; |
| | | } |
| | | |
| | | &__show-more { |
| | | position: absolute; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | background-color: rgba(0, 0, 0, 0.3); |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 100px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // 头åå¾çè·¯å¾(ä¸è½ä¸ºç¸å¯¹è·¯å¾) |
| | | src: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.src |
| | | }, |
| | | // 头åå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.shape |
| | | }, |
| | | // 头å尺寸 |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatar.size |
| | | }, |
| | | // è£åªæ¨¡å¼ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.mode |
| | | }, |
| | | // æ¾ç¤ºçæå |
| | | text: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.text |
| | | }, |
| | | // èæ¯è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.bgColor |
| | | }, |
| | | // æåé¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.color |
| | | }, |
| | | // æåå¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatar.fontSize |
| | | }, |
| | | // æ¾ç¤ºç徿 |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.icon |
| | | }, |
| | | // æ¾ç¤ºå°ç¨åºå¤´åï¼åªå¯¹ç¾åº¦ï¼å¾®ä¿¡ï¼QQå°ç¨åºææ |
| | | mpAvatar: { |
| | | type: Boolean, |
| | | default: uni.$u.props.avatar.mpAvatar |
| | | }, |
| | | // æ¯å¦ä½¿ç¨éæºèæ¯è² |
| | | randomBgColor: { |
| | | type: Boolean, |
| | | default: uni.$u.props.avatar.randomBgColor |
| | | }, |
| | | // å 载失败çé»è®¤å¤´å(ç»ä»¶æå
ç½®é»è®¤å¾ç) |
| | | defaultUrl: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.defaultUrl |
| | | }, |
| | | // 妿é
ç½®äºrandomBgColor为trueï¼ä¸é
ç½®äºæ¤å¼ï¼åä»é»è®¤çèæ¯è²æ°ç»ä¸ååºå¯¹åºç´¢å¼çé¢è²å¼ï¼åå¼0-19ä¹é´ |
| | | colorIndex: { |
| | | type: [String, Number], |
| | | // æ ¡éªåæ°è§åï¼ç´¢å¼å¨0-19ä¹é´ |
| | | validator(n) { |
| | | return uni.$u.test.range(n, [0, 19]) || n === '' |
| | | }, |
| | | default: uni.$u.props.avatar.colorIndex |
| | | }, |
| | | // ç»ä»¶æ è¯ç¬¦ |
| | | name: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.name |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-avatar" |
| | | :class="[`u-avatar--${shape}`]" |
| | | :style="[{ |
| | | backgroundColor: (text || icon) ? (randomBgColor ? colors[colorIndex !== '' ? colorIndex : $u.random(0, 19)] : bgColor) : 'transparent', |
| | | width: $u.addUnit(size), |
| | | height: $u.addUnit(size), |
| | | }, $u.addStyle(customStyle)]" |
| | | @tap="clickHandler" |
| | | > |
| | | <slot> |
| | | <!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU --> |
| | | <open-data |
| | | v-if="mpAvatar && allowMp" |
| | | type="userAvatarUrl" |
| | | :style="[{ |
| | | width: $u.addUnit(size), |
| | | height: $u.addUnit(size) |
| | | }]" |
| | | /> |
| | | <!-- #endif --> |
| | | <!-- #ifndef MP-WEIXIN && MP-QQ && MP-BAIDU --> |
| | | <template v-if="mpAvatar && allowMp"></template> |
| | | <!-- #endif --> |
| | | <u-icon |
| | | v-else-if="icon" |
| | | :name="icon" |
| | | :size="fontSize" |
| | | :color="color" |
| | | ></u-icon> |
| | | <u--text |
| | | v-else-if="text" |
| | | :text="text" |
| | | :size="fontSize" |
| | | :color="color" |
| | | align="center" |
| | | customStyle="justify-content: center" |
| | | ></u--text> |
| | | <image |
| | | class="u-avatar__image" |
| | | v-else |
| | | :class="[`u-avatar__image--${shape}`]" |
| | | :src="avatarUrl || defaultUrl" |
| | | :mode="mode" |
| | | @error="errorHandler" |
| | | :style="[{ |
| | | width: $u.addUnit(size), |
| | | height: $u.addUnit(size) |
| | | }]" |
| | | ></image> |
| | | </slot> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | const base64Avatar = |
| | | "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; |
| | | /** |
| | | * Avatar 头å |
| | | * @description æ¬ç»ä»¶ä¸è¬ç¨äºå±ç¤ºå¤´åçå°æ¹ï¼å¦ä¸ªäººä¸å¿ï¼æè
è¯è®ºå表页çç¨æ·å¤´åå±ç¤ºçåºæã |
| | | * @tutorial https://www.uviewui.com/components/avatar.html |
| | | * |
| | | * @property {String} src 头åè·¯å¾ï¼å¦å 载失败ï¼å°ä¼æ¾ç¤ºé»è®¤å¤´å(ä¸è½ä¸ºç¸å¯¹è·¯å¾) |
| | | * @property {String} shape 头åå½¢ç¶ ï¼ circle (é»è®¤) | squareï¼ |
| | | * @property {String | Number} size 头å尺寸ï¼å¯ä»¥ä¸ºæå®å符串(large, default, mini)ï¼æè
æ°å¼ ï¼é»è®¤ 40 ï¼ |
| | | * @property {String} mode 头åå¾ççè£åªç±»åï¼ä¸uniçimageç»ä»¶çmodeåæ°ä¸è´ï¼å¦ææè¾¾ä¸å°éæ±ï¼å¯å°è¯ä¼ widthFixå¼ ï¼é»è®¤ 'scaleToFill' ï¼ |
| | | * @property {String} text ç¨æåæ¿ä»£å¾çï¼çº§å«ä¼å
äºsrc |
| | | * @property {String} bgColor èæ¯é¢è²ï¼ä¸è¬æ¾ç¤ºæåæ¶ç¨ ï¼é»è®¤ '#c0c4cc' ï¼ |
| | | * @property {String} color æåé¢è² ï¼é»è®¤ '#ffffff' ï¼ |
| | | * @property {String | Number} fontSize æåå¤§å° ï¼é»è®¤ 18 ï¼ |
| | | * @property {String} icon æ¾ç¤ºç徿 |
| | | * @property {Boolean} mpAvatar æ¾ç¤ºå°ç¨åºå¤´åï¼åªå¯¹ç¾åº¦ï¼å¾®ä¿¡ï¼QQå°ç¨åºææ ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} randomBgColor æ¯å¦ä½¿ç¨éæºèæ¯è² ï¼é»è®¤ false ï¼ |
| | | * @property {String} defaultUrl å 载失败çé»è®¤å¤´å(ç»ä»¶æå
ç½®é»è®¤å¾ç) |
| | | * @property {String | Number} colorIndex 妿é
ç½®äºrandomBgColor为trueï¼ä¸é
ç½®äºæ¤å¼ï¼åä»é»è®¤çèæ¯è²æ°ç»ä¸ååºå¯¹åºç´¢å¼çé¢è²å¼ï¼åå¼0-19ä¹é´ |
| | | * @property {String} name ç»ä»¶æ è¯ç¬¦ ï¼é»è®¤ 'level' ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click ç¹å»ç»ä»¶æ¶è§¦å index: ç¨æ·ä¼ éçæ è¯ç¬¦ |
| | | * @example <u-avatar :src="src" mode="square"></u-avatar> |
| | | */ |
| | | export default { |
| | | name: 'u-avatar', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // 妿é
ç½®randomBgColoråæ°ä¸ºtrueï¼å¨å¾æ æè
æåçæ¨¡å¼ä¸ï¼ä¼éæºä»ä¸ååºä¸ä¸ªé¢è²å¼å½åèæ¯è² |
| | | colors: ['#ffb34b', '#f2bba9', '#f7a196', '#f18080', '#88a867', '#bfbf39', '#89c152', '#94d554', '#f19ec2', |
| | | '#afaae4', '#e1b0df', '#c38cc1', '#72dcdc', '#9acdcb', '#77b1cc', '#448aca', '#86cefa', '#98d1ee', |
| | | '#73d1f1', |
| | | '#80a7dc' |
| | | ], |
| | | avatarUrl: this.src, |
| | | allowMp: false |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬å¤´åsrcçååï¼èµå¼ç»å
é¨çavatarUrlåéï¼å 为å¾çå 载失败æ¶ï¼éè¦ä¿®æ¹å¾ççsrc为é»è®¤å¼ |
| | | // èç»ä»¶å
é¨ä¸è½ç´æ¥ä¿®æ¹propsçå¼ï¼æä»¥éè¦ä¸ä¸ªä¸é´åé |
| | | src: { |
| | | immediate: true, |
| | | handler(newVal) { |
| | | this.avatarUrl = newVal |
| | | // å¦ææ²¡æä¼ srcï¼å主å¨è§¦åerroräºä»¶ï¼ç¨äºæ¾ç¤ºé»è®¤ç头åï¼å¦åsrc为''空å符ççæ¶åï¼ä¼æ å
容å±ç¤º |
| | | if(!newVal) { |
| | | this.errorHandler() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | imageStyle() { |
| | | const style = {} |
| | | return style |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // ç®ååªæè¿å 个å°ç¨åºå¹³å°å
·æopen-dataæ ç¾ |
| | | // å
¶ä»å¹³å°å¯ä»¥éè¿uni.getUserInfo类似æ¥å£è·åä¿¡æ¯ï¼ä½æ¯éè¦å¼¹çªææ(馿¬¡)ï¼ä¸å符ç»ä»¶é»è¾ |
| | | // æ
ç®åèªå¨è·åå°ç¨åºå¤´ååªæ¯æè¿å ä¸ªå¹³å° |
| | | // #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU |
| | | this.allowMp = true |
| | | // #endif |
| | | }, |
| | | // å¤æä¼ å
¥çname屿§ï¼æ¯å¦å¾çè·¯å¾ï¼åªè¦å¸¦æ"/"å认为æ¯å¾çå½¢å¼ |
| | | isImg() { |
| | | return this.src.indexOf('/') !== -1 |
| | | }, |
| | | // å¾çå è½½æ¶å¤±è´¥æ¶è§¦å |
| | | errorHandler() { |
| | | this.avatarUrl = this.defaultUrl || base64Avatar |
| | | }, |
| | | clickHandler() { |
| | | this.$emit('click', this.name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-avatar { |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | &--circle { |
| | | border-radius: 100px; |
| | | } |
| | | |
| | | &--square { |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | &__image { |
| | | &--circle { |
| | | border-radius: 100px; |
| | | } |
| | | |
| | | &--square { |
| | | border-radius: 4px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // è¿åé¡¶é¨çå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.backtop.mode |
| | | }, |
| | | // èªå®ä¹å¾æ |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.backtop.icon |
| | | }, |
| | | // æç¤ºæå |
| | | text: { |
| | | type: String, |
| | | default: uni.$u.props.backtop.text |
| | | }, |
| | | // è¿å顶鍿»å¨æ¶é´ |
| | | duration: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.duration |
| | | }, |
| | | // æ»å¨è·ç¦» |
| | | scrollTop: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.scrollTop |
| | | }, |
| | | // è·ç¦»é¡¶é¨å¤å°è·ç¦»æ¾ç¤ºï¼åä½px |
| | | top: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.top |
| | | }, |
| | | // è¿å顶鍿é®å°åºé¨çè·ç¦»ï¼åä½px |
| | | bottom: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.bottom |
| | | }, |
| | | // è¿å顶鍿é®å°å³è¾¹çè·ç¦»ï¼åä½px |
| | | right: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.right |
| | | }, |
| | | // å±çº§ |
| | | zIndex: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.backtop.zIndex |
| | | }, |
| | | // 徿 çæ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | iconStyle: { |
| | | type: Object, |
| | | default: uni.$u.props.backtop.iconStyle |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-transition |
| | | mode="fade" |
| | | :customStyle="backTopStyle" |
| | | :show="show" |
| | | > |
| | | <view |
| | | class="u-back-top" |
| | | :style="[contentStyle]" |
| | | v-if="!$slots.default && !$slots.$default" |
| | | @click="backToTop" |
| | | > |
| | | <u-icon |
| | | :name="icon" |
| | | :custom-style="iconStyle" |
| | | ></u-icon> |
| | | <text |
| | | v-if="text" |
| | | class="u-back-top__text" |
| | | >{{text}}</text> |
| | | </view> |
| | | <slot v-else /> |
| | | </u-transition> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | const dom = weex.requireModule('dom') |
| | | // #endif |
| | | /** |
| | | * backTop è¿åé¡¶é¨ |
| | | * @description æ¬ç»ä»¶ä¸ä¸ªç¨äºé¿é¡µé¢ï¼æ»å¨ä¸å®è·ç¦»åï¼åºç°è¿å顶鍿é®ï¼æ¹ä¾¿å¿«éè¿åé¡¶é¨çåºæ¯ã |
| | | * @tutorial https://uviewui.com/components/backTop.html |
| | | * |
| | | * @property {String} mode è¿åé¡¶é¨çå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ ï¼é»è®¤ 'circle' ï¼ |
| | | * @property {String} icon èªå®ä¹å¾æ ï¼é»è®¤ 'arrow-upward' ï¼ è§å®æ¹ææ¡£ç¤ºä¾ |
| | | * @property {String} text æç¤ºæå |
| | | * @property {String | Number} duration è¿å顶鍿»å¨æ¶é´ ï¼é»è®¤ 100ï¼ |
| | | * @property {String | Number} scrollTop æ»å¨è·ç¦» ï¼é»è®¤ 0 ï¼ |
| | | * @property {String | Number} top è·ç¦»é¡¶é¨å¤å°è·ç¦»æ¾ç¤ºï¼åä½px ï¼é»è®¤ 400 ï¼ |
| | | * @property {String | Number} bottom è¿å顶鍿é®å°åºé¨çè·ç¦»ï¼åä½px ï¼é»è®¤ 100 ï¼ |
| | | * @property {String | Number} right è¿å顶鍿é®å°å³è¾¹çè·ç¦»ï¼åä½px ï¼é»è®¤ 20 ï¼ |
| | | * @property {String | Number} zIndex å±çº§ ï¼é»è®¤ 9 ï¼ |
| | | * @property {Object<Object>} iconStyle 徿 çæ ·å¼ï¼å¯¹è±¡å½¢å¼ ï¼é»è®¤ {color: '#909399',fontSize: '19px'}ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @example <u-back-top :scrollTop="scrollTop"></u-back-top> |
| | | */ |
| | | export default { |
| | | name: 'u-back-top', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | backTopStyle() { |
| | | // å¨ç»ç»ä»¶æ ·å¼ |
| | | const style = { |
| | | bottom: uni.$u.addUnit(this.bottom), |
| | | right: uni.$u.addUnit(this.right), |
| | | width: '40px', |
| | | height: '40px', |
| | | position: 'fixed', |
| | | zIndex: 10, |
| | | } |
| | | return style |
| | | }, |
| | | show() { |
| | | return uni.$u.getPx(this.scrollTop) > uni.$u.getPx(this.top) |
| | | }, |
| | | contentStyle() { |
| | | const style = {} |
| | | let radius = 0 |
| | | // æ¯å¦åå½¢ |
| | | if(this.mode === 'circle') { |
| | | radius = '100px' |
| | | } else { |
| | | radius = '4px' |
| | | } |
| | | // 为äºå
¼å®¹å®ånvueï¼åªè½è¿ä¹åå¼å |
| | | style.borderTopLeftRadius = radius |
| | | style.borderTopRightRadius = radius |
| | | style.borderBottomLeftRadius = radius |
| | | style.borderBottomRightRadius = radius |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)) |
| | | } |
| | | }, |
| | | methods: { |
| | | backToTop() { |
| | | // #ifdef APP-NVUE |
| | | if (!this.$parent.$refs['u-back-top']) { |
| | | uni.$u.error(`nvue页é¢éè¦ç»é¡µé¢æå¤å±å
ç´ è®¾ç½®"ref='u-back-top'`) |
| | | } |
| | | dom.scrollToElement(this.$parent.$refs['u-back-top'], { |
| | | offset: 0 |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifndef APP-NVUE |
| | | uni.pageScrollTo({ |
| | | scrollTop: 0, |
| | | duration: this.duration |
| | | }); |
| | | // #endif |
| | | this.$emit('click') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | $u-back-top-flex:1 !default; |
| | | $u-back-top-height:100% !default; |
| | | $u-back-top-background-color:#E1E1E1 !default; |
| | | $u-back-top-tips-font-size:12px !default; |
| | | .u-back-top { |
| | | @include flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | flex:$u-back-top-flex; |
| | | height: $u-back-top-height; |
| | | justify-content: center; |
| | | background-color: $u-back-top-background-color; |
| | | |
| | | &__tips { |
| | | font-size:$u-back-top-tips-font-size; |
| | | transform: scale(0.8); |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦æ¾ç¤ºåç¹ |
| | | isDot: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.isDot |
| | | }, |
| | | // æ¾ç¤ºçå
容 |
| | | value: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.badge.value |
| | | }, |
| | | // æ¯å¦æ¾ç¤º |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.show |
| | | }, |
| | | // æå¤§å¼ï¼è¶
è¿æå¤§å¼ä¼æ¾ç¤º '{max}+' |
| | | max: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.badge.max |
| | | }, |
| | | // 主é¢ç±»åï¼error|warning|success|primary |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.badge.type |
| | | }, |
| | | // 彿°å¼ä¸º 0 æ¶ï¼æ¯å¦å±ç¤º Badge |
| | | showZero: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.showZero |
| | | }, |
| | | // èæ¯é¢è²ï¼ä¼å
级æ¯typeé«ï¼å¦è®¾ç½®ï¼typeåæ°ä¼å¤±æ |
| | | bgColor: { |
| | | type: [String, null], |
| | | default: uni.$u.props.badge.bgColor |
| | | }, |
| | | // åä½é¢è² |
| | | color: { |
| | | type: [String, null], |
| | | default: uni.$u.props.badge.color |
| | | }, |
| | | // å¾½æ å½¢ç¶ï¼circle-åè§å为åè§ï¼horn-å·¦ä¸è§ä¸ºç´è§ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.badge.shape |
| | | }, |
| | | // 设置æ°åçæ¾ç¤ºæ¹å¼ï¼overflow|ellipsis|limit |
| | | // overflow伿 ¹æ®maxåæ®µå¤æï¼è¶
åºæ¾ç¤º`${max}+` |
| | | // ellipsis伿 ¹æ®max夿ï¼è¶
åºæ¾ç¤º`${max}...` |
| | | // limitä¼ä¾æ®1000ä½ä¸ºå¤ææ¡ä»¶ï¼è¶
åº1000ï¼æ¾ç¤º`${value/1000}K`ï¼æ¯å¦2.2kã3.34wï¼æå¤ä¿ç2ä½å°æ° |
| | | numberType: { |
| | | type: String, |
| | | default: uni.$u.props.badge.numberType |
| | | }, |
| | | // 设置badgeçä½ç½®åç§»ï¼æ ¼å¼ä¸º [x, y]ï¼ä¹å³è®¾ç½®ç为topårightçå¼ï¼absolute为trueæ¶ææ |
| | | offset: { |
| | | type: Array, |
| | | default: uni.$u.props.badge.offset |
| | | }, |
| | | // æ¯å¦åè½¬èæ¯ååä½é¢è² |
| | | inverted: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.inverted |
| | | }, |
| | | // æ¯å¦ç»å¯¹å®ä½ |
| | | absolute: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.absolute |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <text |
| | | v-if="show && ((Number(value) === 0 ? showZero : true) || isDot)" |
| | | :class="[isDot ? 'u-badge--dot' : 'u-badge--not-dot', inverted && 'u-badge--inverted', shape === 'horn' && 'u-badge--horn', `u-badge--${type}${inverted ? '--inverted' : ''}`]" |
| | | :style="[$u.addStyle(customStyle), badgeStyle]" |
| | | class="u-badge" |
| | | >{{ isDot ? '' :showValue }}</text> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * badge å¾½æ æ° |
| | | * @description 该ç»ä»¶ä¸è¬ç¨äºå¾æ å³ä¸è§æ¾ç¤ºæªè¯»çæ¶æ¯æ°éï¼æç¤ºç¨æ·ç¹å»ï¼æåç¹ååå
嫿å两ç§å½¢å¼ã |
| | | * @tutorial https://uviewui.com/components/badge.html |
| | | * |
| | | * @property {Boolean} isDot æ¯å¦æ¾ç¤ºåç¹ ï¼é»è®¤ false ï¼ |
| | | * @property {String | Number} value æ¾ç¤ºçå
容 |
| | | * @property {Boolean} show æ¯å¦æ¾ç¤º ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} max æå¤§å¼ï¼è¶
è¿æå¤§å¼ä¼æ¾ç¤º '{max}+' ï¼é»è®¤999ï¼ |
| | | * @property {String} type 主é¢ç±»åï¼error|warning|success|primary ï¼é»è®¤ 'error' ï¼ |
| | | * @property {Boolean} showZero 彿°å¼ä¸º 0 æ¶ï¼æ¯å¦å±ç¤º Badge ï¼é»è®¤ false ï¼ |
| | | * @property {String} bgColor èæ¯é¢è²ï¼ä¼å
级æ¯typeé«ï¼å¦è®¾ç½®ï¼typeåæ°ä¼å¤±æ |
| | | * @property {String} color åä½é¢è² ï¼é»è®¤ '#ffffff' ï¼ |
| | | * @property {String} shape å¾½æ å½¢ç¶ï¼circle-åè§å为åè§ï¼horn-å·¦ä¸è§ä¸ºç´è§ ï¼é»è®¤ 'circle' ï¼ |
| | | * @property {String} numberType 设置æ°åçæ¾ç¤ºæ¹å¼ï¼overflow|ellipsis|limit ï¼é»è®¤ 'overflow' ï¼ |
| | | * @property {Array}} offset 设置badgeçä½ç½®åç§»ï¼æ ¼å¼ä¸º [x, y]ï¼ä¹å³è®¾ç½®ç为topårightçå¼ï¼absolute为trueæ¶ææ |
| | | * @property {Boolean} inverted æ¯å¦åè½¬èæ¯ååä½é¢è²ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} absolute æ¯å¦ç»å¯¹å®ä½ï¼é»è®¤ false ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * @example <u-badge :type="type" :count="count"></u-badge> |
| | | */ |
| | | export default { |
| | | name: 'u-badge', |
| | | mixins: [uni.$u.mpMixin, props, uni.$u.mixin], |
| | | computed: { |
| | | // æ¯å¦å°badgeä¸å¿ä¸ç¶ç»ä»¶å³ä¸è§éå |
| | | boxStyle() { |
| | | let style = {}; |
| | | return style; |
| | | }, |
| | | // æ´ä¸ªç»ä»¶çæ ·å¼ |
| | | badgeStyle() { |
| | | const style = {} |
| | | if(this.color) { |
| | | style.color = this.color |
| | | } |
| | | if (this.bgColor && !this.inverted) { |
| | | style.backgroundColor = this.bgColor |
| | | } |
| | | if (this.absolute) { |
| | | style.position = 'absolute' |
| | | // 妿æè®¾ç½®offsetåæ° |
| | | if(this.offset.length) { |
| | | // topårightå为为offsetç第ä¸ä¸ªå第äºä¸ªå¼ï¼å¦ææ²¡æç¬¬äºä¸ªå¼ï¼årightçäºtop |
| | | const top = this.offset[0] |
| | | const right = this.offset[1] || top |
| | | style.top = uni.$u.addUnit(top) |
| | | style.right = uni.$u.addUnit(right) |
| | | } |
| | | } |
| | | return style |
| | | }, |
| | | showValue() { |
| | | switch (this.numberType) { |
| | | case "overflow": |
| | | return Number(this.value) > Number(this.max) ? this.max + "+" : this.value |
| | | break; |
| | | case "ellipsis": |
| | | return Number(this.value) > Number(this.max) ? "..." : this.value |
| | | break; |
| | | case "limit": |
| | | return Number(this.value) > 999 ? Number(this.value) >= 9999 ? |
| | | Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / |
| | | 1e3 * 100) / 100 + "k" : this.value |
| | | break; |
| | | default: |
| | | return Number(this.value) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | $u-badge-primary: $u-primary !default; |
| | | $u-badge-error: $u-error !default; |
| | | $u-badge-success: $u-success !default; |
| | | $u-badge-info: $u-info !default; |
| | | $u-badge-warning: $u-warning !default; |
| | | $u-badge-dot-radius: 100px !default; |
| | | $u-badge-dot-size: 8px !default; |
| | | $u-badge-dot-right: 4px !default; |
| | | $u-badge-dot-top: 0 !default; |
| | | $u-badge-text-font-size: 11px !default; |
| | | $u-badge-text-right: 10px !default; |
| | | $u-badge-text-padding: 2px 5px !default; |
| | | $u-badge-text-align: center !default; |
| | | $u-badge-text-color: #FFFFFF !default; |
| | | |
| | | .u-badge { |
| | | border-top-right-radius: $u-badge-dot-radius; |
| | | border-top-left-radius: $u-badge-dot-radius; |
| | | border-bottom-left-radius: $u-badge-dot-radius; |
| | | border-bottom-right-radius: $u-badge-dot-radius; |
| | | @include flex; |
| | | line-height: $u-badge-text-font-size; |
| | | text-align: $u-badge-text-align; |
| | | font-size: $u-badge-text-font-size; |
| | | color: $u-badge-text-color; |
| | | |
| | | &--dot { |
| | | height: $u-badge-dot-size; |
| | | width: $u-badge-dot-size; |
| | | } |
| | | |
| | | &--inverted { |
| | | font-size: 13px; |
| | | } |
| | | |
| | | &--not-dot { |
| | | padding: $u-badge-text-padding; |
| | | } |
| | | |
| | | &--horn { |
| | | border-bottom-left-radius: 0; |
| | | } |
| | | |
| | | &--primary { |
| | | background-color: $u-badge-primary; |
| | | } |
| | | |
| | | &--primary--inverted { |
| | | color: $u-badge-primary; |
| | | } |
| | | |
| | | &--error { |
| | | background-color: $u-badge-error; |
| | | } |
| | | |
| | | &--error--inverted { |
| | | color: $u-badge-error; |
| | | } |
| | | |
| | | &--success { |
| | | background-color: $u-badge-success; |
| | | } |
| | | |
| | | &--success--inverted { |
| | | color: $u-badge-success; |
| | | } |
| | | |
| | | &--info { |
| | | background-color: $u-badge-info; |
| | | } |
| | | |
| | | &--info--inverted { |
| | | color: $u-badge-info; |
| | | } |
| | | |
| | | &--warning { |
| | | background-color: $u-badge-warning; |
| | | } |
| | | |
| | | &--warning--inverted { |
| | | color: $u-badge-warning; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | $u-button-active-opacity:0.75 !default; |
| | | $u-button-loading-text-margin-left:4px !default; |
| | | $u-button-text-color: #FFFFFF !default; |
| | | $u-button-text-plain-error-color:$u-error !default; |
| | | $u-button-text-plain-warning-color:$u-warning !default; |
| | | $u-button-text-plain-success-color:$u-success !default; |
| | | $u-button-text-plain-info-color:$u-info !default; |
| | | $u-button-text-plain-primary-color:$u-primary !default; |
| | | .u-button { |
| | | &--active { |
| | | opacity: $u-button-active-opacity; |
| | | } |
| | | |
| | | &--active--plain { |
| | | background-color: rgb(217, 217, 217); |
| | | } |
| | | |
| | | &__loading-text { |
| | | margin-left:$u-button-loading-text-margin-left; |
| | | } |
| | | |
| | | &__text, |
| | | &__loading-text { |
| | | color:$u-button-text-color; |
| | | } |
| | | |
| | | &__text--plain--error { |
| | | color:$u-button-text-plain-error-color; |
| | | } |
| | | |
| | | &__text--plain--warning { |
| | | color:$u-button-text-plain-warning-color; |
| | | } |
| | | |
| | | &__text--plain--success{ |
| | | color:$u-button-text-plain-success-color; |
| | | } |
| | | |
| | | &__text--plain--info { |
| | | color:$u-button-text-plain-info-color; |
| | | } |
| | | |
| | | &__text--plain--primary { |
| | | color:$u-button-text-plain-primary-color; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Author : LQ |
| | | * @Description : |
| | | * @version : 1.0 |
| | | * @Date : 2021-08-16 10:04:04 |
| | | * @LastAuthor : LQ |
| | | * @lastTime : 2021-08-16 10:04:24 |
| | | * @FilePath : /u-view2.0/uview-ui/components/u-button/props.js |
| | | */ |
| | | export default { |
| | | props: { |
| | | // æ¯å¦ç»è¾¹æ¡ |
| | | hairline: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.hairline |
| | | }, |
| | | // æé®çé¢ç½®æ ·å¼ï¼infoï¼primaryï¼errorï¼warningï¼success |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.button.type |
| | | }, |
| | | // æé®å°ºå¯¸ï¼largeï¼normalï¼smallï¼mini |
| | | size: { |
| | | type: String, |
| | | default: uni.$u.props.button.size |
| | | }, |
| | | // æé®å½¢ç¶ï¼circleï¼ä¸¤è¾¹ä¸ºååï¼ï¼squareï¼å¸¦åè§ï¼ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.button.shape |
| | | }, |
| | | // æé®æ¯å¦é空 |
| | | plain: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.plain |
| | | }, |
| | | // æ¯å¦ç¦æ¢ç¶æ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.disabled |
| | | }, |
| | | // æ¯å¦å è½½ä¸ |
| | | loading: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.loading |
| | | }, |
| | | // å è½½ä¸æç¤ºæå |
| | | loadingText: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.loadingText |
| | | }, |
| | | // å è½½ç¶æå¾æ ç±»å |
| | | loadingMode: { |
| | | type: String, |
| | | default: uni.$u.props.button.loadingMode |
| | | }, |
| | | // å è½½å¾æ å¤§å° |
| | | loadingSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.loadingSize |
| | | }, |
| | | // 弿¾è½åï¼å
·ä½è¯·çuniapp稳å®å
³äºbuttonç»ä»¶é¨å说æ |
| | | // https://uniapp.dcloud.io/component/button |
| | | openType: { |
| | | type: String, |
| | | default: uni.$u.props.button.openType |
| | | }, |
| | | // ç¨äº <form> ç»ä»¶ï¼ç¹å»åå«ä¼è§¦å <form> ç»ä»¶ç submit/reset äºä»¶ |
| | | // åå¼ä¸ºsubmitï¼æäº¤è¡¨åï¼ï¼resetï¼é置表åï¼ |
| | | formType: { |
| | | type: String, |
| | | default: uni.$u.props.button.formType |
| | | }, |
| | | // æå¼ APP æ¶ï¼å APP ä¼ éçåæ°ï¼open-type=launchAppæ¶ææ |
| | | // åªå¾®ä¿¡å°ç¨åºãQQå°ç¨åºææ |
| | | appParameter: { |
| | | type: String, |
| | | default: uni.$u.props.button.appParameter |
| | | }, |
| | | // æå®æ¯å¦é»æ¢æ¬èç¹çç¥å
èç¹åºç°ç¹å»æï¼å¾®ä¿¡å°ç¨åºææ |
| | | hoverStopPropagation: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.hoverStopPropagation |
| | | }, |
| | | // æå®è¿åç¨æ·ä¿¡æ¯çè¯è¨ï¼zh_CN ç®ä½ä¸æï¼zh_TW ç¹ä½ä¸æï¼en è±æãåªå¾®ä¿¡å°ç¨åºææ |
| | | lang: { |
| | | type: String, |
| | | default: uni.$u.props.button.lang |
| | | }, |
| | | // ä¼è¯æ¥æºï¼open-type="contact"æ¶ææãåªå¾®ä¿¡å°ç¨åºææ |
| | | sessionFrom: { |
| | | type: String, |
| | | default: uni.$u.props.button.sessionFrom |
| | | }, |
| | | // ä¼è¯å
æ¶æ¯å¡çæ é¢ï¼open-type="contact"æ¶ææ |
| | | // é»è®¤å½åæ é¢ï¼åªå¾®ä¿¡å°ç¨åºææ |
| | | sendMessageTitle: { |
| | | type: String, |
| | | default: uni.$u.props.button.sendMessageTitle |
| | | }, |
| | | // ä¼è¯å
æ¶æ¯å¡çç¹å»è·³è½¬å°ç¨åºè·¯å¾ï¼open-type="contact"æ¶ææ |
| | | // é»è®¤å½åå享路å¾ï¼åªå¾®ä¿¡å°ç¨åºææ |
| | | sendMessagePath: { |
| | | type: String, |
| | | default: uni.$u.props.button.sendMessagePath |
| | | }, |
| | | // ä¼è¯å
æ¶æ¯å¡çå¾çï¼open-type="contact"æ¶ææ |
| | | // é»è®¤å½å页颿ªå¾ï¼åªå¾®ä¿¡å°ç¨åºææ |
| | | sendMessageImg: { |
| | | type: String, |
| | | default: uni.$u.props.button.sendMessageImg |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºä¼è¯å
æ¶æ¯å¡çï¼è®¾ç½®æ¤åæ°ä¸º trueï¼ç¨æ·è¿å
¥å®¢æä¼è¯ä¼å¨å³ä¸è§æ¾ç¤º"å¯è½è¦åéçå°ç¨åº"æç¤ºï¼ |
| | | // ç¨æ·ç¹å»åå¯ä»¥å¿«éåéå°ç¨åºæ¶æ¯ï¼open-type="contact"æ¶ææ |
| | | showMessageCard: { |
| | | type: Boolean, |
| | | default: uni.$u.props.button.showMessageCard |
| | | }, |
| | | // é¢å¤ä¼ ååæ°ï¼ç¨äºå°ç¨åºçdata-xxx屿§ï¼éè¿target.dataset.nameè·å |
| | | dataName: { |
| | | type: String, |
| | | default: uni.$u.props.button.dataName |
| | | }, |
| | | // èæµï¼ä¸å®æ¶é´å
åªè½è§¦å䏿¬¡ |
| | | throttleTime: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.throttleTime |
| | | }, |
| | | // æä½åå¤ä¹
åºç°ç¹å»æï¼å使¯«ç§ |
| | | hoverStartTime: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.hoverStartTime |
| | | }, |
| | | // æææ¾å¼åç¹å»æä¿çæ¶é´ï¼å使¯«ç§ |
| | | hoverStayTime: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.hoverStayTime |
| | | }, |
| | | // æé®æåï¼ä¹æä»¥éè¿propsä¼ å
¥ï¼æ¯å 为slotä¼ å
¥çè¯ |
| | | // nvue䏿 æ³æ§å¶æåçæ ·å¼ |
| | | text: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.button.text |
| | | }, |
| | | // æé®å¾æ |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.button.icon |
| | | }, |
| | | // æé®å¾æ |
| | | iconColor: { |
| | | type: String, |
| | | default: uni.$u.props.button.icon |
| | | }, |
| | | // æé®é¢è²ï¼æ¯æä¼ å
¥linear-gradientæ¸åè² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.button.color |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <button |
| | | :hover-start-time="Number(hoverStartTime)" |
| | | :hover-stay-time="Number(hoverStayTime)" |
| | | :form-type="formType" |
| | | :open-type="openType" |
| | | :app-parameter="appParameter" |
| | | :hover-stop-propagation="hoverStopPropagation" |
| | | :send-message-title="sendMessageTitle" |
| | | :send-message-path="sendMessagePath" |
| | | :lang="lang" |
| | | :data-name="dataName" |
| | | :session-from="sessionFrom" |
| | | :send-message-img="sendMessageImg" |
| | | :show-message-card="showMessageCard" |
| | | @getphonenumber="getphonenumber" |
| | | @getuserinfo="getuserinfo" |
| | | @error="error" |
| | | @opensetting="opensetting" |
| | | @launchapp="launchapp" |
| | | :hover-class="!disabled && !loading ? 'u-button--active' : ''" |
| | | class="u-button u-reset-button" |
| | | :style="[baseColor, $u.addStyle(customStyle)]" |
| | | @tap="clickHandler" |
| | | :class="bemClass" |
| | | > |
| | | <template v-if="loading"> |
| | | <u-loading-icon |
| | | :mode="loadingMode" |
| | | :size="textSize * 1.15" |
| | | :color="loadingColor" |
| | | ></u-loading-icon> |
| | | <text |
| | | class="u-button__loading-text" |
| | | :style="[{ fontSize: textSize + 'px' }]" |
| | | >{{ loadingText || text }}</text |
| | | > |
| | | </template> |
| | | <template v-else> |
| | | <u-icon |
| | | v-if="icon" |
| | | :name="icon" |
| | | :color="iconColorCom" |
| | | :size="textSize * 1.35" |
| | | :customStyle="{ marginRight: '2px' }" |
| | | ></u-icon> |
| | | <slot> |
| | | <text |
| | | class="u-button__text" |
| | | :style="[{ fontSize: textSize + 'px' }]" |
| | | >{{ text }}</text |
| | | > |
| | | </slot> |
| | | </template> |
| | | </button> |
| | | <!-- #endif --> |
| | | |
| | | <!-- #ifdef APP-NVUE --> |
| | | <view |
| | | :hover-start-time="Number(hoverStartTime)" |
| | | :hover-stay-time="Number(hoverStayTime)" |
| | | class="u-button" |
| | | :hover-class=" |
| | | !disabled && !loading && !color && (plain || type === 'info') |
| | | ? 'u-button--active--plain' |
| | | : !disabled && !loading && !plain |
| | | ? 'u-button--active' |
| | | : '' |
| | | " |
| | | @tap="clickHandler" |
| | | :class="bemClass" |
| | | :style="[baseColor, $u.addStyle(customStyle)]" |
| | | > |
| | | <template v-if="loading"> |
| | | <u-loading-icon |
| | | :mode="loadingMode" |
| | | :size="textSize * 1.15" |
| | | :color="loadingColor" |
| | | ></u-loading-icon> |
| | | <text |
| | | class="u-button__loading-text" |
| | | :style="[nvueTextStyle]" |
| | | :class="[plain && `u-button__text--plain--${type}`]" |
| | | >{{ loadingText || text }}</text |
| | | > |
| | | </template> |
| | | <template v-else> |
| | | <u-icon |
| | | v-if="icon" |
| | | :name="icon" |
| | | :color="iconColorCom" |
| | | :size="textSize * 1.35" |
| | | ></u-icon> |
| | | <text |
| | | class="u-button__text" |
| | | :style="[ |
| | | { |
| | | marginLeft: icon ? '2px' : 0, |
| | | }, |
| | | nvueTextStyle, |
| | | ]" |
| | | :class="[plain && `u-button__text--plain--${type}`]" |
| | | >{{ text }}</text |
| | | > |
| | | </template> |
| | | </view> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | | import button from "../../libs/mixin/button.js"; |
| | | import openType from "../../libs/mixin/openType.js"; |
| | | import props from "./props.js"; |
| | | /** |
| | | * button æé® |
| | | * @description Button æé® |
| | | * @tutorial https://www.uviewui.com/components/button.html |
| | | * |
| | | * @property {Boolean} hairline æ¯å¦æ¾ç¤ºæé®çç»è¾¹æ¡ (é»è®¤ true ) |
| | | * @property {String} type æé®çé¢ç½®æ ·å¼ï¼infoï¼primaryï¼errorï¼warningï¼success (é»è®¤ 'info' ) |
| | | * @property {String} size æé®å°ºå¯¸ï¼largeï¼normalï¼mini ï¼é»è®¤ normalï¼ |
| | | * @property {String} shape æé®å½¢ç¶ï¼circleï¼ä¸¤è¾¹ä¸ºååï¼ï¼squareï¼å¸¦åè§ï¼ ï¼é»è®¤ 'square' ï¼ |
| | | * @property {Boolean} plain æé®æ¯å¦é空ï¼èæ¯è²éæ ï¼é»è®¤ falseï¼ |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨ ï¼é»è®¤ falseï¼ |
| | | * @property {Boolean} loading æé®åç§°åæ¯å¦å¸¦ loading 徿 (App-nvue å¹³å°ï¼å¨ ios ä¸ä¸ºéªè±ï¼Androidä¸ä¸ºåå) ï¼é»è®¤ falseï¼ |
| | | * @property {String | Number} loadingText å è½½ä¸æç¤ºæå |
| | | * @property {String} loadingMode å è½½ç¶æå¾æ ç±»å ï¼é»è®¤ 'spinner' ï¼ |
| | | * @property {String | Number} loadingSize å è½½å¾æ å¤§å° ï¼é»è®¤ 15 ï¼ |
| | | * @property {String} openType 弿¾è½åï¼å
·ä½è¯·çuniapp稳å®å
³äºbuttonç»ä»¶é¨å说æ |
| | | * @property {String} formType ç¨äº <form> ç»ä»¶ï¼ç¹å»åå«ä¼è§¦å <form> ç»ä»¶ç submit/reset äºä»¶ |
| | | * @property {String} appParameter æå¼ APP æ¶ï¼å APP ä¼ éçåæ°ï¼open-type=launchAppæ¶ææ ï¼æ³¨ï¼åªå¾®ä¿¡å°ç¨åºãQQå°ç¨åºææï¼ |
| | | * @property {Boolean} hoverStopPropagation æå®æ¯å¦é»æ¢æ¬èç¹çç¥å
èç¹åºç°ç¹å»æï¼å¾®ä¿¡å°ç¨åºææï¼é»è®¤ true ï¼ |
| | | * @property {String} lang æå®è¿åç¨æ·ä¿¡æ¯çè¯è¨ï¼zh_CN ç®ä½ä¸æï¼zh_TW ç¹ä½ä¸æï¼en è±æï¼é»è®¤ en ï¼ |
| | | * @property {String} sessionFrom ä¼è¯æ¥æºï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessageTitle ä¼è¯å
æ¶æ¯å¡çæ é¢ï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessagePath ä¼è¯å
æ¶æ¯å¡çç¹å»è·³è½¬å°ç¨åºè·¯å¾ï¼openType="contact"æ¶ææ |
| | | * @property {String} sendMessageImg ä¼è¯å
æ¶æ¯å¡çå¾çï¼openType="contact"æ¶ææ |
| | | * @property {Boolean} showMessageCard æ¯å¦æ¾ç¤ºä¼è¯å
æ¶æ¯å¡çï¼è®¾ç½®æ¤åæ°ä¸º trueï¼ç¨æ·è¿å
¥å®¢æä¼è¯ä¼å¨å³ä¸è§æ¾ç¤º"å¯è½è¦åéçå°ç¨åº"æç¤ºï¼ç¨æ·ç¹å»åå¯ä»¥å¿«éåéå°ç¨åºæ¶æ¯ï¼openType="contact"æ¶ææï¼é»è®¤falseï¼ |
| | | * @property {String} dataName é¢å¤ä¼ ååæ°ï¼ç¨äºå°ç¨åºçdata-xxx屿§ï¼éè¿target.dataset.nameè·å |
| | | * @property {String | Number} throttleTime èæµï¼ä¸å®æ¶é´å
åªè½è§¦å䏿¬¡ ï¼é»è®¤ 0 ) |
| | | * @property {String | Number} hoverStartTime æä½åå¤ä¹
åºç°ç¹å»æï¼å使¯«ç§ ï¼é»è®¤ 0 ) |
| | | * @property {String | Number} hoverStayTime æææ¾å¼åç¹å»æä¿çæ¶é´ï¼å使¯«ç§ ï¼é»è®¤ 200 ) |
| | | * @property {String | Number} text æé®æåï¼ä¹æä»¥éè¿propsä¼ å
¥ï¼æ¯å 为slotä¼ å
¥çè¯ï¼æ³¨ï¼nvue䏿 æ³æ§å¶æåçæ ·å¼ï¼ |
| | | * @property {String} icon æé®å¾æ |
| | | * @property {String} iconColor æé®å¾æ é¢è² |
| | | * @property {String} color æé®é¢è²ï¼æ¯æä¼ å
¥linear-gradientæ¸åè² |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click éç¦æ¢å¹¶ä¸éå è½½ä¸ï¼æè½ç¹å» |
| | | * @event {Function} getphonenumber open-type="getPhoneNumber"æ¶ææ |
| | | * @event {Function} getuserinfo ç¨æ·ç¹å»è¯¥æé®æ¶ï¼ä¼è¿åè·åå°çç¨æ·ä¿¡æ¯ï¼ä»è¿ååæ°çdetailä¸è·åå°çå¼åuni.getUserInfo |
| | | * @event {Function} error å½ä½¿ç¨å¼æ¾è½åæ¶ï¼åçé误çåè° |
| | | * @event {Function} opensetting 卿弿æè®¾ç½®é¡µå¹¶å
³éååè° |
| | | * @event {Function} launchapp æå¼ APP æåçåè° |
| | | * @example <u-button>æè½</u-button> |
| | | */ |
| | | export default { |
| | | name: "u-button", |
| | | // #ifdef MP |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, button, openType, props], |
| | | // #endif |
| | | // #ifndef MP |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | // #endif |
| | | data() { |
| | | return {}; |
| | | }, |
| | | computed: { |
| | | // çæbem飿 ¼çç±»å |
| | | bemClass() { |
| | | // this.bem为ä¸ä¸ªcomputedåéï¼å¨mixinä¸ |
| | | if (!this.color) { |
| | | return this.bem( |
| | | "button", |
| | | ["type", "shape", "size"], |
| | | ["disabled", "plain", "hairline"] |
| | | ); |
| | | } else { |
| | | // ç±äºnvueçåå ï¼å¨æcoloråæ°æ¶ï¼ä¸éè¦ä¼ å
¥typeï¼å¦åä¼çætypeç¸å
³çç±»åï¼å½±åæç»çæ ·å¼ |
| | | return this.bem( |
| | | "button", |
| | | ["shape", "size"], |
| | | ["disabled", "plain", "hairline"] |
| | | ); |
| | | } |
| | | }, |
| | | loadingColor() { |
| | | if (this.plain) { |
| | | // 妿æè®¾ç½®colorå¼ï¼åç¨colorå¼ï¼å¦å使ç¨type主é¢é¢è² |
| | | return this.color |
| | | ? this.color |
| | | : uni.$u.config.color[`u-${this.type}`]; |
| | | } |
| | | if (this.type === "info") { |
| | | return "#c9c9c9"; |
| | | } |
| | | return "rgb(200, 200, 200)"; |
| | | }, |
| | | iconColorCom() { |
| | | // 妿æ¯éç©ºç¶æï¼è®¾ç½®äºcolorå°±ç¨colorå¼ï¼å¦å使ç¨ä¸»é¢é¢è²ï¼ |
| | | // u-iconçcolorè½æ¥åä¸ä¸ªä¸»é¢é¢è²çå¼ |
| | | if (this.iconColor) return this.iconColor; |
| | | if (this.plain) { |
| | | return this.color ? this.color : this.type; |
| | | } else { |
| | | return this.type === "info" ? "#000000" : "#ffffff"; |
| | | } |
| | | }, |
| | | baseColor() { |
| | | let style = {}; |
| | | if (this.color) { |
| | | // é对èªå®ä¹äºcoloré¢è²çæ
åµï¼éç©ºç¶æä¸ï¼å°±æ¯ç¨èªå®ä¹çé¢è² |
| | | style.color = this.plain ? this.color : "white"; |
| | | if (!this.plain) { |
| | | // éé空ï¼èæ¯è²ä½¿ç¨èªå®ä¹çé¢è² |
| | | style["background-color"] = this.color; |
| | | } |
| | | if (this.color.indexOf("gradient") !== -1) { |
| | | // 妿èªå®ä¹çé¢è²ä¸ºæ¸åè²ï¼ä¸æ¾ç¤ºè¾¹æ¡ï¼ä»¥åéè¿backgroundImage设置æ¸åè² |
| | | // weexææ¡£è¯´æå¯ä»¥åborderWidthçå½¢å¼ï¼ä¸ºä»ä¹è¿ééè¦åå¼åï¼ |
| | | // å 为weexæ¯é¿é巴巴为äºé¨é¨ä¸ç»©èæ ¸èåçä½ æçä¸è¥¿ï¼æä»¥éè¦è¿ä¹åæææ |
| | | style.borderTopWidth = 0; |
| | | style.borderRightWidth = 0; |
| | | style.borderBottomWidth = 0; |
| | | style.borderLeftWidth = 0; |
| | | if (!this.plain) { |
| | | style.backgroundImage = this.color; |
| | | } |
| | | } else { |
| | | // 鿏åè²ï¼å设置边æ¡ç¸å
³ç屿§ |
| | | style.borderColor = this.color; |
| | | style.borderWidth = "1px"; |
| | | style.borderStyle = "solid"; |
| | | } |
| | | } |
| | | return style; |
| | | }, |
| | | // nvueçæ¬æé®çåä½ä¸ä¼ç»§æ¿ç¶ç»ä»¶çé¢è²ï¼éè¦å¯¹æ¯ä¸ä¸ªtextç»ä»¶è¿è¡åç¬ç设置 |
| | | nvueTextStyle() { |
| | | let style = {}; |
| | | // é对èªå®ä¹äºcoloré¢è²çæ
åµï¼éç©ºç¶æä¸ï¼å°±æ¯ç¨èªå®ä¹çé¢è² |
| | | if (this.type === "info") { |
| | | style.color = "#323233"; |
| | | } |
| | | if (this.color) { |
| | | style.color = this.plain ? this.color : "white"; |
| | | } |
| | | style.fontSize = this.textSize + "px"; |
| | | return style; |
| | | }, |
| | | // åä½å¤§å° |
| | | textSize() { |
| | | let fontSize = 14, |
| | | { size } = this; |
| | | if (size === "large") fontSize = 16; |
| | | if (size === "normal") fontSize = 14; |
| | | if (size === "small") fontSize = 12; |
| | | if (size === "mini") fontSize = 10; |
| | | return fontSize; |
| | | }, |
| | | }, |
| | | methods: { |
| | | clickHandler() { |
| | | // éç¦æ¢å¹¶ä¸éå è½½ä¸ï¼æè½ç¹å» |
| | | if (!this.disabled && !this.loading) { |
| | | // è¿è¡èæµæ§å¶ï¼æ¯this.throttle毫ç§å
ï¼åªå¨å¼å§å¤æ§è¡ |
| | | uni.$u.throttle(() => { |
| | | this.$emit("click"); |
| | | }, this.throttleTime); |
| | | } |
| | | }, |
| | | // ä¸é¢ä¸ºå¯¹æ¥uniapp宿¹æé®å¼æ¾è½åäºä»¶åè°çå¯¹æ¥ |
| | | getphonenumber(res) { |
| | | this.$emit("getphonenumber", res); |
| | | }, |
| | | getuserinfo(res) { |
| | | this.$emit("getuserinfo", res); |
| | | }, |
| | | error(res) { |
| | | this.$emit("error", res); |
| | | }, |
| | | opensetting(res) { |
| | | this.$emit("opensetting", res); |
| | | }, |
| | | launchapp(res) { |
| | | this.$emit("launchapp", res); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | /* #ifndef APP-NVUE */ |
| | | @import "./vue.scss"; |
| | | /* #endif */ |
| | | |
| | | /* #ifdef APP-NVUE */ |
| | | @import "./nvue.scss"; |
| | | /* #endif */ |
| | | |
| | | $u-button-u-button-height: 40px !default; |
| | | $u-button-text-font-size: 15px !default; |
| | | $u-button-loading-text-font-size: 15px !default; |
| | | $u-button-loading-text-margin-left: 4px !default; |
| | | $u-button-large-width: 100% !default; |
| | | $u-button-large-height: 50px !default; |
| | | $u-button-normal-padding: 0 12px !default; |
| | | $u-button-large-padding: 0 15px !default; |
| | | $u-button-normal-font-size: 14px !default; |
| | | $u-button-small-min-width: 60px !default; |
| | | $u-button-small-height: 30px !default; |
| | | $u-button-small-padding: 0px 8px !default; |
| | | $u-button-mini-padding: 0px 8px !default; |
| | | $u-button-small-font-size: 12px !default; |
| | | $u-button-mini-height: 22px !default; |
| | | $u-button-mini-font-size: 10px !default; |
| | | $u-button-mini-min-width: 50px !default; |
| | | $u-button-disabled-opacity: 0.5 !default; |
| | | $u-button-info-color: #323233 !default; |
| | | $u-button-info-background-color: #fff !default; |
| | | $u-button-info-border-color: #ebedf0 !default; |
| | | $u-button-info-border-width: 1px !default; |
| | | $u-button-info-border-style: solid !default; |
| | | $u-button-success-color: #fff !default; |
| | | $u-button-success-background-color: $u-success !default; |
| | | $u-button-success-border-color: $u-button-success-background-color !default; |
| | | $u-button-success-border-width: 1px !default; |
| | | $u-button-success-border-style: solid !default; |
| | | $u-button-primary-color: #fff !default; |
| | | $u-button-primary-background-color: $u-primary !default; |
| | | $u-button-primary-border-color: $u-button-primary-background-color !default; |
| | | $u-button-primary-border-width: 1px !default; |
| | | $u-button-primary-border-style: solid !default; |
| | | $u-button-error-color: #fff !default; |
| | | $u-button-error-background-color: $u-error !default; |
| | | $u-button-error-border-color: $u-button-error-background-color !default; |
| | | $u-button-error-border-width: 1px !default; |
| | | $u-button-error-border-style: solid !default; |
| | | $u-button-warning-color: #fff !default; |
| | | $u-button-warning-background-color: $u-warning !default; |
| | | $u-button-warning-border-color: $u-button-warning-background-color !default; |
| | | $u-button-warning-border-width: 1px !default; |
| | | $u-button-warning-border-style: solid !default; |
| | | $u-button-block-width: 100% !default; |
| | | $u-button-circle-border-top-right-radius: 100px !default; |
| | | $u-button-circle-border-top-left-radius: 100px !default; |
| | | $u-button-circle-border-bottom-left-radius: 100px !default; |
| | | $u-button-circle-border-bottom-right-radius: 100px !default; |
| | | $u-button-square-border-top-right-radius: 3px !default; |
| | | $u-button-square-border-top-left-radius: 3px !default; |
| | | $u-button-square-border-bottom-left-radius: 3px !default; |
| | | $u-button-square-border-bottom-right-radius: 3px !default; |
| | | $u-button-icon-min-width: 1em !default; |
| | | $u-button-plain-background-color: #fff !default; |
| | | $u-button-hairline-border-width: 0.5px !default; |
| | | |
| | | .u-button { |
| | | height: $u-button-u-button-height; |
| | | position: relative; |
| | | align-items: center; |
| | | justify-content: center; |
| | | @include flex; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | flex-direction: row; |
| | | |
| | | &__text { |
| | | font-size: $u-button-text-font-size; |
| | | } |
| | | |
| | | &__loading-text { |
| | | font-size: $u-button-loading-text-font-size; |
| | | margin-left: $u-button-loading-text-margin-left; |
| | | } |
| | | |
| | | &--large { |
| | | /* #ifndef APP-NVUE */ |
| | | width: $u-button-large-width; |
| | | /* #endif */ |
| | | height: $u-button-large-height; |
| | | padding: $u-button-large-padding; |
| | | } |
| | | |
| | | &--normal { |
| | | padding: $u-button-normal-padding; |
| | | font-size: $u-button-normal-font-size; |
| | | } |
| | | |
| | | &--small { |
| | | /* #ifndef APP-NVUE */ |
| | | min-width: $u-button-small-min-width; |
| | | /* #endif */ |
| | | height: $u-button-small-height; |
| | | padding: $u-button-small-padding; |
| | | font-size: $u-button-small-font-size; |
| | | } |
| | | |
| | | &--mini { |
| | | height: $u-button-mini-height; |
| | | font-size: $u-button-mini-font-size; |
| | | /* #ifndef APP-NVUE */ |
| | | min-width: $u-button-mini-min-width; |
| | | /* #endif */ |
| | | padding: $u-button-mini-padding; |
| | | } |
| | | |
| | | &--disabled { |
| | | opacity: $u-button-disabled-opacity; |
| | | } |
| | | |
| | | &--info { |
| | | color: $u-button-info-color; |
| | | background-color: $u-button-info-background-color; |
| | | border-color: $u-button-info-border-color; |
| | | border-width: $u-button-info-border-width; |
| | | border-style: $u-button-info-border-style; |
| | | } |
| | | |
| | | &--success { |
| | | color: $u-button-success-color; |
| | | background-color: $u-button-success-background-color; |
| | | border-color: $u-button-success-border-color; |
| | | border-width: $u-button-success-border-width; |
| | | border-style: $u-button-success-border-style; |
| | | } |
| | | |
| | | &--primary { |
| | | color: $u-button-primary-color; |
| | | background-color: $u-button-primary-background-color; |
| | | border-color: $u-button-primary-border-color; |
| | | border-width: $u-button-primary-border-width; |
| | | border-style: $u-button-primary-border-style; |
| | | } |
| | | |
| | | &--error { |
| | | color: $u-button-error-color; |
| | | background-color: $u-button-error-background-color; |
| | | border-color: $u-button-error-border-color; |
| | | border-width: $u-button-error-border-width; |
| | | border-style: $u-button-error-border-style; |
| | | } |
| | | |
| | | &--warning { |
| | | color: $u-button-warning-color; |
| | | background-color: $u-button-warning-background-color; |
| | | border-color: $u-button-warning-border-color; |
| | | border-width: $u-button-warning-border-width; |
| | | border-style: $u-button-warning-border-style; |
| | | } |
| | | |
| | | &--block { |
| | | @include flex; |
| | | width: $u-button-block-width; |
| | | } |
| | | |
| | | &--circle { |
| | | border-top-right-radius: $u-button-circle-border-top-right-radius; |
| | | border-top-left-radius: $u-button-circle-border-top-left-radius; |
| | | border-bottom-left-radius: $u-button-circle-border-bottom-left-radius; |
| | | border-bottom-right-radius: $u-button-circle-border-bottom-right-radius; |
| | | } |
| | | |
| | | &--square { |
| | | border-bottom-left-radius: $u-button-square-border-top-right-radius; |
| | | border-bottom-right-radius: $u-button-square-border-top-left-radius; |
| | | border-top-left-radius: $u-button-square-border-bottom-left-radius; |
| | | border-top-right-radius: $u-button-square-border-bottom-right-radius; |
| | | } |
| | | |
| | | &__icon { |
| | | /* #ifndef APP-NVUE */ |
| | | min-width: $u-button-icon-min-width; |
| | | line-height: inherit !important; |
| | | vertical-align: top; |
| | | /* #endif */ |
| | | } |
| | | |
| | | &--plain { |
| | | background-color: $u-button-plain-background-color; |
| | | } |
| | | |
| | | &--hairline { |
| | | border-width: $u-button-hairline-border-width !important; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // nvueä¸hover-classæ æ |
| | | $u-button-before-top:50% !default; |
| | | $u-button-before-left:50% !default; |
| | | $u-button-before-width:100% !default; |
| | | $u-button-before-height:100% !default; |
| | | $u-button-before-transform:translate(-50%, -50%) !default; |
| | | $u-button-before-opacity:0 !default; |
| | | $u-button-before-background-color:#000 !default; |
| | | $u-button-before-border-color:#000 !default; |
| | | $u-button-active-before-opacity:.15 !default; |
| | | $u-button-icon-margin-left:4px !default; |
| | | $u-button-plain-u-button-info-color:$u-info; |
| | | $u-button-plain-u-button-success-color:$u-success; |
| | | $u-button-plain-u-button-error-color:$u-error; |
| | | $u-button-plain-u-button-warning-color:$u-error; |
| | | |
| | | .u-button { |
| | | width: 100%; |
| | | |
| | | &__text { |
| | | white-space: nowrap; |
| | | line-height: 1; |
| | | } |
| | | |
| | | &:before { |
| | | position: absolute; |
| | | top:$u-button-before-top; |
| | | left:$u-button-before-left; |
| | | width:$u-button-before-width; |
| | | height:$u-button-before-height; |
| | | border: inherit; |
| | | border-radius: inherit; |
| | | transform:$u-button-before-transform; |
| | | opacity:$u-button-before-opacity; |
| | | content: " "; |
| | | background-color:$u-button-before-background-color; |
| | | border-color:$u-button-before-border-color; |
| | | } |
| | | |
| | | &--active { |
| | | &:before { |
| | | opacity: .15 |
| | | } |
| | | } |
| | | |
| | | &__icon+&__text:not(:empty), |
| | | &__loading-text { |
| | | margin-left:$u-button-icon-margin-left; |
| | | } |
| | | |
| | | &--plain { |
| | | &.u-button--primary { |
| | | color: $u-primary; |
| | | } |
| | | } |
| | | |
| | | &--plain { |
| | | &.u-button--info { |
| | | color:$u-button-plain-u-button-info-color; |
| | | } |
| | | } |
| | | |
| | | &--plain { |
| | | &.u-button--success { |
| | | color:$u-button-plain-u-button-success-color; |
| | | } |
| | | } |
| | | |
| | | &--plain { |
| | | &.u-button--error { |
| | | color:$u-button-plain-u-button-error-color; |
| | | } |
| | | } |
| | | |
| | | &--plain { |
| | | &.u-button--warning { |
| | | color:$u-button-plain-u-button-warning-color; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-calendar-header u-border-bottom"> |
| | | <text |
| | | class="u-calendar-header__title" |
| | | v-if="showTitle" |
| | | >{{ title }}</text> |
| | | <text |
| | | class="u-calendar-header__subtitle" |
| | | v-if="showSubtitle" |
| | | >{{ subtitle }}</text> |
| | | <view class="u-calendar-header__weekdays"> |
| | | <text class="u-calendar-header__weekdays__weekday">ä¸</text> |
| | | <text class="u-calendar-header__weekdays__weekday">äº</text> |
| | | <text class="u-calendar-header__weekdays__weekday">ä¸</text> |
| | | <text class="u-calendar-header__weekdays__weekday">å</text> |
| | | <text class="u-calendar-header__weekdays__weekday">äº</text> |
| | | <text class="u-calendar-header__weekdays__weekday">å
</text> |
| | | <text class="u-calendar-header__weekdays__weekday">æ¥</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'u-calendar-header', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin], |
| | | props: { |
| | | // æ é¢ |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // 坿 é¢ |
| | | subtitle: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæ é¢ |
| | | showTitle: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå¯æ é¢ |
| | | showSubtitle: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | name() { |
| | | |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-calendar-header { |
| | | padding-bottom: 4px; |
| | | |
| | | &__title { |
| | | font-size: 16px; |
| | | color: $u-main-color; |
| | | text-align: center; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | &__subtitle { |
| | | font-size: 14px; |
| | | color: $u-main-color; |
| | | height: 40px; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | &__weekdays { |
| | | @include flex; |
| | | justify-content: space-between; |
| | | |
| | | &__weekday { |
| | | font-size: 13px; |
| | | color: $u-main-color; |
| | | line-height: 30px; |
| | | flex: 1; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-calendar-month-wrapper" ref="u-calendar-month-wrapper"> |
| | | <view v-for="(item, index) in months" :key="index" :class="[`u-calendar-month-${index}`]" |
| | | :ref="`u-calendar-month-${index}`" :id="`month-${index}`"> |
| | | <text v-if="index !== 0" class="u-calendar-month__title">{{ item.year }}å¹´{{ item.month }}æ</text> |
| | | <view class="u-calendar-month__days"> |
| | | <view v-if="showMark" class="u-calendar-month__days__month-mark-wrapper"> |
| | | <text class="u-calendar-month__days__month-mark-wrapper__text">{{ item.month }}</text> |
| | | </view> |
| | | <view class="u-calendar-month__days__day" v-for="(item1, index1) in item.date" :key="index1" |
| | | :style="[dayStyle(index, index1, item1)]" @tap="clickHandler(index, index1, item1)" |
| | | :class="[item1.selected && 'u-calendar-month__days__day__select--selected']"> |
| | | <view class="u-calendar-month__days__day__select" :style="[daySelectStyle(index, index1, item1)]"> |
| | | <text class="u-calendar-month__days__day__select__info" |
| | | :class="[item1.disabled && 'u-calendar-month__days__day__select__info--disabled']" |
| | | :style="[textStyle(item1)]">{{ item1.day }}</text> |
| | | <text v-if="getBottomInfo(index, index1, item1)" |
| | | class="u-calendar-month__days__day__select__buttom-info" |
| | | :class="[item1.disabled && 'u-calendar-month__days__day__select__buttom-info--disabled']" |
| | | :style="[textStyle(item1)]">{{ getBottomInfo(index, index1, item1) }}</text> |
| | | <text v-if="item1.dot" class="u-calendar-month__days__day__select__dot"></text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // #ifdef APP-NVUE |
| | | // ç±äºnvue䏿¯æç¾åæ¯åä½ï¼éè¦æ¥è¯¢å®½åº¦æ¥è®¡ç®æ¯ä¸ªæ¥æç宽度 |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | import dayjs from '../../libs/util/dayjs.js'; |
| | | export default { |
| | | name: 'u-calendar-month', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin], |
| | | props: { |
| | | // æ¯å¦æ¾ç¤ºæä»½èæ¯è² |
| | | showMark: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // 主é¢è²ï¼å¯¹åºé¨æé®åé䏿¥æææ |
| | | color: { |
| | | type: String, |
| | | default: '#3c9cff' |
| | | }, |
| | | // æä»½æ°æ® |
| | | months: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // æ¥æéæ©ç±»å |
| | | mode: { |
| | | type: String, |
| | | default: 'single' |
| | | }, |
| | | // æ¥æè¡é« |
| | | rowHeight: { |
| | | type: [String, Number], |
| | | default: 58 |
| | | }, |
| | | // mode=multipleæ¶ï¼æå¤å¯éå¤å°ä¸ªæ¥æ |
| | | maxCount: { |
| | | type: [String, Number], |
| | | default: Infinity |
| | | }, |
| | | // mode=rangeæ¶ï¼ç¬¬ä¸ä¸ªæ¥æåºé¨çæç¤ºæå |
| | | startText: { |
| | | type: String, |
| | | default: 'å¼å§' |
| | | }, |
| | | // mode=rangeæ¶ï¼æåä¸ä¸ªæ¥æåºé¨çæç¤ºæå |
| | | endText: { |
| | | type: String, |
| | | default: 'ç»æ' |
| | | }, |
| | | // é»è®¤éä¸çæ¥æï¼mode为multipleærangeæ¯å¿
须为æ°ç»æ ¼å¼ |
| | | defaultDate: { |
| | | type: [Array, String, Date], |
| | | default: null |
| | | }, |
| | | // æå°çå¯éæ¥æ |
| | | minDate: { |
| | | type: [String, Number], |
| | | default: 0 |
| | | }, |
| | | // æå¤§å¯éæ¥æ |
| | | maxDate: { |
| | | type: [String, Number], |
| | | default: 0 |
| | | }, |
| | | // å¦ææ²¡æè®¾ç½®maxDateï¼åå¾åæ¨å¤å°ä¸ªæ |
| | | maxMonth: { |
| | | type: [String, Number], |
| | | default: 2 |
| | | }, |
| | | // æ¯å¦ä¸ºåªè¯»ç¶æï¼åªè¯»ç¶æä¸ç¦æ¢éæ©æ¥æ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.readonly |
| | | }, |
| | | // æ¥æåºé´æå¤å¯é天æ°ï¼é»è®¤æ éå¶ï¼mode = rangeæ¶ææ |
| | | maxRange: { |
| | | type: [Number, String], |
| | | default: Infinity |
| | | }, |
| | | // èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶çæç¤ºææ¡ï¼mode = rangeæ¶ææ |
| | | rangePrompt: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶ï¼æ¯å¦å±ç¤ºæç¤ºææ¡ï¼mode = rangeæ¶ææ |
| | | showRangePrompt: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¯å¦å
è®¸æ¥æèå´çèµ·æ¢æ¶é´ä¸ºåä¸å¤©ï¼mode = rangeæ¶ææ |
| | | allowSameDay: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // æ¯ä¸ªæ¥æç宽度 |
| | | width: 0, |
| | | // å½åéä¸çæ¥æitem |
| | | item: {}, |
| | | selected: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | selectedChange: { |
| | | immediate: true, |
| | | handler(n) { |
| | | this.setDefaultDate() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // å¤ä¸ªæ¡ä»¶çååï¼ä¼å¼èµ·é䏿¥æçååï¼è¿éç»ä¸ç®¡ççå¬ |
| | | selectedChange() { |
| | | return [this.minDate, this.maxDate, this.defaultDate] |
| | | }, |
| | | dayStyle(index1, index2, item) { |
| | | return (index1, index2, item) => { |
| | | const style = {} |
| | | let week = item.week |
| | | // ä¸è¿è¡åèäºå
¥çå½¢å¼ä¿ç2ä½å°æ° |
| | | const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1)) |
| | | // å¾åºæ¯ä¸ªæ¥æç宽度 |
| | | // #ifdef APP-NVUE |
| | | style.width = uni.$u.addUnit(dayWidth) |
| | | // #endif |
| | | style.height = uni.$u.addUnit(this.rowHeight) |
| | | if (index2 === 0) { |
| | | // è·åå½å为ææå ï¼å¦æä¸º0ï¼å为ææå¤©ï¼åä¸ä¸ºæ¯æç¬¬ä¸å¤©æ¶ï¼éè¦åå·¦åç§»çitemä¸ªæ° |
| | | week = (week === 0 ? 7 : week) - 1 |
| | | style.marginLeft = uni.$u.addUnit(week * dayWidth) |
| | | } |
| | | if (this.mode === 'range') { |
| | | // 乿以éè¦è¿ä¹åï¼æ¯å 为DCloudå
¬å¸çiOS客æ·ç«¯çå¼åè
è½åæé导è´çbug |
| | | style.paddingLeft = 0 |
| | | style.paddingRight = 0 |
| | | style.paddingBottom = 0 |
| | | style.paddingTop = 0 |
| | | } |
| | | return style |
| | | } |
| | | }, |
| | | daySelectStyle() { |
| | | return (index1, index2, item) => { |
| | | let date = dayjs(item.date).format("YYYY-MM-DD"), |
| | | style = {} |
| | | // 夿dateæ¯å¦å¨selectedæ°ç»ä¸ï¼å 为æä»½å¯è½ä¼éè¦è¡¥0ï¼æä»¥ä½¿ç¨dateSame夿ï¼èä¸ç¨æ°ç»çincludes夿 |
| | | if (this.selected.some(item => this.dateSame(item, date))) { |
| | | style.backgroundColor = this.color |
| | | } |
| | | if (this.mode === 'single') { |
| | | if (date === this.selected[0]) { |
| | | // å 为éè¦å¯¹nvueçå
¼å®¹ï¼åªè½è¿ä¹åï¼æ æ³ç¼©åï¼ä¹æ æ³éè¿ç±»åæ§å¶çç |
| | | style.borderTopLeftRadius = '3px' |
| | | style.borderBottomLeftRadius = '3px' |
| | | style.borderTopRightRadius = '3px' |
| | | style.borderBottomRightRadius = '3px' |
| | | } |
| | | } else if (this.mode === 'range') { |
| | | if (this.selected.length >= 2) { |
| | | const len = this.selected.length - 1 |
| | | // 第ä¸ä¸ªæ¥æè®¾ç½®å·¦ä¸è§åå·¦ä¸è§çåè§ |
| | | if (this.dateSame(date, this.selected[0])) { |
| | | style.borderTopLeftRadius = '3px' |
| | | style.borderBottomLeftRadius = '3px' |
| | | } |
| | | // æåä¸ä¸ªæ¥æè®¾ç½®å³ä¸è§åå³ä¸è§çåè§ |
| | | if (this.dateSame(date, this.selected[len])) { |
| | | style.borderTopRightRadius = '3px' |
| | | style.borderBottomRightRadius = '3px' |
| | | } |
| | | // å¤äºç¬¬ä¸åæåä¸ä¸ªä¹é´çæ¥æï¼èæ¯è²è®¾ç½®ä¸ºæµ
è²ï¼éè¿å°å¯¹åºé¢è²è¿è¡çåï¼ååå
¶å°¾é¨çé¢è²å¼ |
| | | if (dayjs(date).isAfter(dayjs(this.selected[0])) && dayjs(date).isBefore(dayjs(this |
| | | .selected[len]))) { |
| | | style.backgroundColor = uni.$u.colorGradient(this.color, '#ffffff', 100)[90] |
| | | // å¢å ä¸ä¸ªéæåº¦ï¼è®©èå´åºé´çèæ¯è²ä¹è½çå°åºé¨çmarkæ°´å°å符 |
| | | style.opacity = 0.7 |
| | | } |
| | | } else if (this.selected.length === 1) { |
| | | // 乿以éè¦è¿ä¹åï¼æ¯å 为DCloudå
¬å¸çiOS客æ·ç«¯çå¼åè
è½åæé导è´çbug |
| | | // è¿è¡è¿åæä½ï¼å¦åå¨nvueçiOSï¼uni-appæbugï¼ä¼å¯¼è´è¯¡å¼çè¡¨ç° |
| | | style.borderTopLeftRadius = '3px' |
| | | style.borderBottomLeftRadius = '3px' |
| | | } |
| | | } else { |
| | | if (this.selected.some(item => this.dateSame(item, date))) { |
| | | style.borderTopLeftRadius = '3px' |
| | | style.borderBottomLeftRadius = '3px' |
| | | style.borderTopRightRadius = '3px' |
| | | style.borderBottomRightRadius = '3px' |
| | | } |
| | | } |
| | | return style |
| | | } |
| | | }, |
| | | // æä¸ªæ¥ææ¯å¦è¢«éä¸ |
| | | textStyle() { |
| | | return (item) => { |
| | | const date = dayjs(item.date).format("YYYY-MM-DD"), |
| | | style = {} |
| | | // éä¸çæ¥æï¼æç¤ºæå设置ç½è² |
| | | if (this.selected.some(item => this.dateSame(item, date))) { |
| | | style.color = '#ffffff' |
| | | } |
| | | if (this.mode === 'range') { |
| | | const len = this.selected.length - 1 |
| | | // 妿æ¯èå´éæ©æ¨¡å¼ï¼ç¬¬ä¸ä¸ªåæåä¸ä¸ªä¹é´çæ¥æï¼æåé¢è²è®¾ç½®ä¸ºé«äº®ç主é¢è² |
| | | if (dayjs(date).isAfter(dayjs(this.selected[0])) && dayjs(date).isBefore(dayjs(this |
| | | .selected[len]))) { |
| | | style.color = this.color |
| | | } |
| | | } |
| | | return style |
| | | } |
| | | }, |
| | | // è·ååºé¨çæç¤ºæå |
| | | getBottomInfo() { |
| | | return (index1, index2, item) => { |
| | | const date = dayjs(item.date).format("YYYY-MM-DD") |
| | | const bottomInfo = item.bottomInfo |
| | | // å½ä¸ºæ¥æèå´æ¨¡å¼æ¶ï¼ä¸éæ©çæ¥æä¸ªæ°å¤§äº0æ¶ |
| | | if (this.mode === 'range' && this.selected.length > 0) { |
| | | if (this.selected.length === 1) { |
| | | // éæ©äºä¸ä¸ªæ¥ææ¶ï¼å¦æå½åæ¥æä¸ºæ°ç»ä¸ç第ä¸ä¸ªæ¥æï¼åæ¾ç¤ºåºé¨æå为âå¼å§â |
| | | if (this.dateSame(date, this.selected[0])) return this.startText |
| | | else return bottomInfo |
| | | } else { |
| | | const len = this.selected.length - 1 |
| | | // 妿æ°ç»ä¸çæ¥æå¤§äº2个æ¶ï¼ç¬¬ä¸ä¸ªåæåä¸ä¸ªæ¾ç¤ºä¸ºå¼å§åç»ææ¥æ |
| | | if (this.dateSame(date, this.selected[0]) && this.dateSame(date, this.selected[1]) && |
| | | len === 1) { |
| | | // 妿é¿åº¦ä¸º2ï¼ä¸ç¬¬ä¸ä¸ªçäºç¬¬äºä¸ªæ¥æï¼åæç¤ºè¯æ¾å¨åä¸ä¸ªitemä¸ |
| | | return `${this.startText}/${this.endText}` |
| | | } else if (this.dateSame(date, this.selected[0])) { |
| | | return this.startText |
| | | } else if (this.dateSame(date, this.selected[len])) { |
| | | return this.endText |
| | | } else { |
| | | return bottomInfo |
| | | } |
| | | } |
| | | } else { |
| | | return bottomInfo |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // åå§åé»è®¤éä¸ |
| | | this.$emit('monthSelected', this.selected) |
| | | this.$nextTick(() => { |
| | | // è¿ééè¦å¦ä¸ä¸ªå»¶æ¶ï¼å 为è·å宽度åï¼ä¼è¿è¡æä»½æ°æ®æ¸²æï¼åªææ¸²æå®æä¹åï¼ææçæ£çé«åº¦ |
| | | // å 为nvueä¸ï¼$nextTick并䏿¯100%å¯é ç |
| | | uni.$u.sleep(10).then(() => { |
| | | this.getWrapperWidth() |
| | | this.getMonthRect() |
| | | }) |
| | | }) |
| | | }, |
| | | // å¤æä¸¤ä¸ªæ¥ææ¯å¦ç¸ç |
| | | dateSame(date1, date2) { |
| | | return dayjs(date1).isSame(dayjs(date2)) |
| | | }, |
| | | // è·åæä»½æ°æ®åºåç宽度ï¼å 为nvue䏿¯æç¾åæ¯ï¼æä»¥æ æ³éè¿css设置æ¯ä¸ªæ¥æitemç宽度 |
| | | getWrapperWidth() { |
| | | // #ifdef APP-NVUE |
| | | dom.getComponentRect(this.$refs['u-calendar-month-wrapper'], res => { |
| | | this.width = res.size.width |
| | | }) |
| | | // #endif |
| | | // #ifndef APP-NVUE |
| | | this.$uGetRect('.u-calendar-month-wrapper').then(size => { |
| | | this.width = size.width |
| | | }) |
| | | // #endif |
| | | }, |
| | | getMonthRect() { |
| | | // è·åæ¯ä¸ªæä»½æ°æ®ç尺寸ï¼ç¨äºç¶ç»ä»¶å¨scroll-viewæ»å¨äºä»¶ä¸ï¼çå¬å½åæ»å¨å°äºç¬¬å 个æä»½ |
| | | const promiseAllArr = this.months.map((item, index) => this.getMonthRectByPromise( |
| | | `u-calendar-month-${index}`)) |
| | | // 䏿¬¡æ§è¿å |
| | | Promise.all(promiseAllArr).then( |
| | | sizes => { |
| | | let height = 1 |
| | | const topArr = [] |
| | | for (let i = 0; i < this.months.length; i++) { |
| | | // æ·»å å°monthsæ°ç»ä¸ï¼ä¾scroll-viewæ»å¨äºä»¶ä¸ï¼å¤æå½åæ»å¨å°åªä¸ªæä»½ |
| | | topArr[i] = height |
| | | height += sizes[i].height |
| | | } |
| | | // ç±äºå¾®ä¿¡ä¸ï¼æ æ³éè¿this.months[i].topçå½¢å¼(å¼ç¨ç±»å)å»ä¿®æ¹ç¶ç»ä»¶çmonthçtopå¼ï¼æä»¥ä½¿ç¨äºä»¶å½¢å¼å¯¹å¤ååº |
| | | this.$emit('updateMonthTop', topArr) |
| | | }) |
| | | }, |
| | | // è·åæ¯ä¸ªæä»½åºåç尺寸 |
| | | getMonthRectByPromise(el) { |
| | | // #ifndef APP-NVUE |
| | | // $uGetRect为uViewèªå¸¦çèç¹æ¥è¯¢ç®åæ¹æ³ï¼è¯¦è§ææ¡£ä»ç»ï¼https://www.uviewui.com/js/getRect.html |
| | | // ç»ä»¶å
é¨ä¸è¬ç¨this.$uGetRectï¼å¯¹å¤ç为uni.$u.getRectï¼äºè
åè½ä¸è´ï¼åç§°ä¸å |
| | | return new Promise(resolve => { |
| | | this.$uGetRect(`.${el}`).then(size => { |
| | | resolve(size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | // nvueä¸ï¼ä½¿ç¨domæ¨¡åæ¥è¯¢å
ç´ é«åº¦ |
| | | // è¿åä¸ä¸ªpromiseï¼è®©è°ç¨æ¤æ¹æ³ç主ä½è½ä½¿ç¨thenåè° |
| | | return new Promise(resolve => { |
| | | dom.getComponentRect(this.$refs[el][0], res => { |
| | | resolve(res.size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | }, |
| | | // ç¹å»æä¸ä¸ªæ¥æ |
| | | clickHandler(index1, index2, item) { |
| | | if (this.readonly) { |
| | | return; |
| | | } |
| | | this.item = item |
| | | const date = dayjs(item.date).format("YYYY-MM-DD") |
| | | if (item.disabled) return |
| | | // 对ä¸ä¸æ¬¡éæ©çæ¥ææ°ç»è¿è¡æ·±åº¦å
é |
| | | let selected = uni.$u.deepClone(this.selected) |
| | | if (this.mode === 'single') { |
| | | // åéæ
åµä¸ï¼è®©æ°ç»ä¸çå
ç´ ä¸ºå½åç¹å»çæ¥æ |
| | | selected = [date] |
| | | } else if (this.mode === 'multiple') { |
| | | if (selected.some(item => this.dateSame(item, date))) { |
| | | // 妿ç¹å»çæ¥æå·²å¨æ°ç»ä¸ï¼åè¿è¡ç§»é¤æä½ï¼ä¹å°±æ¯è¾¾å°åéçææ |
| | | const itemIndex = selected.findIndex(item => item === date) |
| | | selected.splice(itemIndex, 1) |
| | | } else { |
| | | // 妿ç¹å»çæ¥æä¸å¨æ°ç»ä¸ï¼ä¸å·²æçé¿åº¦å°äºæ»å¯éé¿åº¦æ¶ï¼åæ·»å å°æ°ç»ä¸å» |
| | | if (selected.length < this.maxCount) selected.push(date) |
| | | } |
| | | } else { |
| | | // éæ©åºé´å½¢å¼ |
| | | if (selected.length === 0 || selected.length >= 2) { |
| | | // å¦æåæ¥å°±ä¸º0æè
大äº2çé¿åº¦ï¼åå½åç¹å»çæ¥æï¼å°±æ¯å¼å§æ¥æ |
| | | selected = [date] |
| | | } else if (selected.length === 1) { |
| | | // 妿已ç»éæ©äºå¼å§æ¥æ |
| | | const existsDate = selected[0] |
| | | // 妿å½åéæ©çæ¥æå°äºä¸ä¸æ¬¡éæ©çæ¥æï¼åå½åçæ¥æå®ä¸ºå¼å§æ¥æ |
| | | if (dayjs(date).isBefore(existsDate)) { |
| | | selected = [date] |
| | | } else if (dayjs(date).isAfter(existsDate)) { |
| | | // å½åæ¥æå廿大å¯éçæ¥æå¤©æ°ï¼å¦æå¤§äºèµ·å§æ¶é´ï¼åè¿è¡æç¤º |
| | | if(dayjs(dayjs(date).subtract(this.maxRange, 'day')).isAfter(dayjs(selected[0])) && this.showRangePrompt) { |
| | | if(this.rangePrompt) { |
| | | uni.$u.toast(this.rangePrompt) |
| | | } else { |
| | | uni.$u.toast(`鿩天æ°ä¸è½è¶
è¿ ${this.maxRange} 天`) |
| | | } |
| | | return |
| | | } |
| | | // 妿å½åæ¥æå¤§äºå·²ææ¥æï¼å°å½åçæ·»å å°æ°ç»å°¾é¨ |
| | | selected.push(date) |
| | | const startDate = selected[0] |
| | | const endDate = selected[1] |
| | | const arr = [] |
| | | let i = 0 |
| | | do { |
| | | // å°å¼å§åç»ææ¥æä¹é´çæ¥ææ·»å å°æ°ç»ä¸ |
| | | arr.push(dayjs(startDate).add(i, 'day').format("YYYY-MM-DD")) |
| | | i++ |
| | | // ç´¯å çæ¥æå°äºç»ææ¥ææ¶ï¼ç»§ç»ä¸ä¸æ¬¡çå¾ªç¯ |
| | | } while (dayjs(startDate).add(i, 'day').isBefore(dayjs(endDate))) |
| | | // 为äºä¸æ¬¡æ§ä¿®æ¹æ°ç»ï¼é¿å
computedä¸å¤æ¬¡è§¦åï¼è¿éæç¨arråé䏿¬¡æ§èµå¼çæ¹å¼ï¼åæ¶å°æåä¸ä¸ªæ¥ææ·»å è¿æ¥ |
| | | arr.push(endDate) |
| | | selected = arr |
| | | } else { |
| | | // éæ©åºé´æ¶ï¼åªæä¸ä¸ªæ¥æçæ
åµä¸ï¼ä¸ä¸å
è®¸éæ©èµ·æ¢ä¸ºåä¸å¤©çè¯ï¼ä¸å
è®¸éæ©èªå·± |
| | | if (selected[0] === date && !this.allowSameDay) return |
| | | selected.push(date) |
| | | } |
| | | } |
| | | } |
| | | this.setSelected(selected) |
| | | }, |
| | | // 设置é»è®¤æ¥æ |
| | | setDefaultDate() { |
| | | if (!this.defaultDate) { |
| | | // å¦ææ²¡æè®¾ç½®é»è®¤æ¥æï¼åå°å½å¤©æ¥æè®¾ç½®ä¸ºé»è®¤éä¸çæ¥æ |
| | | const selected = [dayjs().format("YYYY-MM-DD")] |
| | | return this.setSelected(selected, false) |
| | | } |
| | | let defaultDate = [] |
| | | const minDate = this.minDate || dayjs().format("YYYY-MM-DD") |
| | | const maxDate = this.maxDate || dayjs(minDate).add(this.maxMonth - 1, 'month').format("YYYY-MM-DD") |
| | | if (this.mode === 'single') { |
| | | // å鿍¡å¼ï¼å¯ä»¥æ¯åç¬¦ä¸²ææ°ç»ï¼Date对象ç |
| | | if (!uni.$u.test.array(this.defaultDate)) { |
| | | defaultDate = [dayjs(this.defaultDate).format("YYYY-MM-DD")] |
| | | } else { |
| | | defaultDate = [this.defaultDate[0]] |
| | | } |
| | | } else { |
| | | // å¦æä¸ºéæ°ç»ï¼å䏿§è¡ |
| | | if (!uni.$u.test.array(this.defaultDate)) return |
| | | defaultDate = this.defaultDate |
| | | } |
| | | // è¿æ»¤ç¨æ·ä¼ éçé»è®¤æ°ç»ï¼ååºåªå¨å¯å
许æå¤§å¼ä¸æå°å¼ä¹é´çå
ç´ |
| | | defaultDate = defaultDate.filter(item => { |
| | | return dayjs(item).isAfter(dayjs(minDate).subtract(1, 'day')) && dayjs(item).isBefore(dayjs( |
| | | maxDate).add(1, 'day')) |
| | | }) |
| | | this.setSelected(defaultDate, false) |
| | | }, |
| | | setSelected(selected, event = true) { |
| | | this.selected = selected |
| | | event && this.$emit('monthSelected', this.selected) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-calendar-month-wrapper { |
| | | margin-top: 4px; |
| | | } |
| | | |
| | | .u-calendar-month { |
| | | |
| | | &__title { |
| | | font-size: 14px; |
| | | line-height: 42px; |
| | | height: 42px; |
| | | color: $u-main-color; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | &__days { |
| | | position: relative; |
| | | @include flex; |
| | | flex-wrap: wrap; |
| | | |
| | | &__month-mark-wrapper { |
| | | position: absolute; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | &__text { |
| | | font-size: 155px; |
| | | color: rgba(231, 232, 234, 0.83); |
| | | } |
| | | } |
| | | |
| | | &__day { |
| | | @include flex; |
| | | padding: 2px; |
| | | /* #ifndef APP-NVUE */ |
| | | // vueä¸ä½¿ç¨cssè¿è¡å®½åº¦è®¡ç®ï¼å 为æäºå®åæºä¼æ æ³è¿è¡jsè·åç¶å
ç´ å®½åº¦è¿è¡è®¡ç®å¾åºï¼ä¼æåç§» |
| | | width: calc(100% / 7); |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | |
| | | &__select { |
| | | flex: 1; |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: relative; |
| | | |
| | | &__dot { |
| | | width: 7px; |
| | | height: 7px; |
| | | border-radius: 100px; |
| | | background-color: $u-error; |
| | | position: absolute; |
| | | top: 12px; |
| | | right: 7px; |
| | | } |
| | | |
| | | &__buttom-info { |
| | | color: $u-content-color; |
| | | text-align: center; |
| | | position: absolute; |
| | | bottom: 5px; |
| | | font-size: 10px; |
| | | text-align: center; |
| | | left: 0; |
| | | right: 0; |
| | | |
| | | &--selected { |
| | | color: #ffffff; |
| | | } |
| | | |
| | | &--disabled { |
| | | color: #cacbcd; |
| | | } |
| | | } |
| | | |
| | | &__info { |
| | | text-align: center; |
| | | font-size: 16px; |
| | | |
| | | &--selected { |
| | | color: #ffffff; |
| | | } |
| | | |
| | | &--disabled { |
| | | color: #cacbcd; |
| | | } |
| | | } |
| | | |
| | | &--selected { |
| | | background-color: $u-primary; |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | &--range-selected { |
| | | opacity: 0.3; |
| | | border-radius: 0; |
| | | } |
| | | |
| | | &--range-start-selected { |
| | | border-top-right-radius: 0; |
| | | border-bottom-right-radius: 0; |
| | | } |
| | | |
| | | &--range-end-selected { |
| | | border-top-left-radius: 0; |
| | | border-bottom-left-radius: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¥å顶鍿 é¢ |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.title |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæ é¢ |
| | | showTitle: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showTitle |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå¯æ é¢ |
| | | showSubtitle: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showSubtitle |
| | | }, |
| | | // æ¥æç±»åéæ©ï¼single-éæ©åä¸ªæ¥æï¼multiple-å¯ä»¥éæ©å¤ä¸ªæ¥æï¼range-éæ©æ¥æèå´ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.mode |
| | | }, |
| | | // mode=rangeæ¶ï¼ç¬¬ä¸ä¸ªæ¥æåºé¨çæç¤ºæå |
| | | startText: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.startText |
| | | }, |
| | | // mode=rangeæ¶ï¼æåä¸ä¸ªæ¥æåºé¨çæç¤ºæå |
| | | endText: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.endText |
| | | }, |
| | | // èªå®ä¹å表 |
| | | customList: { |
| | | type: Array, |
| | | default: uni.$u.props.calendar.customList |
| | | }, |
| | | // 主é¢è²ï¼å¯¹åºé¨æé®åé䏿¥æææ |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.color |
| | | }, |
| | | // æå°çå¯éæ¥æ |
| | | minDate: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.calendar.minDate |
| | | }, |
| | | // æå¤§å¯éæ¥æ |
| | | maxDate: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.calendar.maxDate |
| | | }, |
| | | // é»è®¤éä¸çæ¥æï¼mode为multipleærangeæ¯å¿
须为æ°ç»æ ¼å¼ |
| | | defaultDate: { |
| | | type: [Array, String, Date, null], |
| | | default: uni.$u.props.calendar.defaultDate |
| | | }, |
| | | // mode=multipleæ¶ï¼æå¤å¯éå¤å°ä¸ªæ¥æ |
| | | maxCount: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.calendar.maxCount |
| | | }, |
| | | // æ¥æè¡é« |
| | | rowHeight: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.calendar.rowHeight |
| | | }, |
| | | // æ¥ææ ¼å¼å彿° |
| | | formatter: { |
| | | type: [Function, null], |
| | | default: uni.$u.props.calendar.formatter |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºåå |
| | | showLunar: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showLunar |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæä»½èæ¯è² |
| | | showMark: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showMark |
| | | }, |
| | | // ç¡®å®æé®çæå |
| | | confirmText: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.confirmText |
| | | }, |
| | | // 确认æé®å¤äºç¦ç¨ç¶ææ¶çæå |
| | | confirmDisabledText: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.confirmDisabledText |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæ¥åå¼¹çª |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.show |
| | | }, |
| | | // æ¯å¦å
许ç¹å»é®ç½©å
³éæ¥å |
| | | closeOnClickOverlay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.closeOnClickOverlay |
| | | }, |
| | | // æ¯å¦ä¸ºåªè¯»ç¶æï¼åªè¯»ç¶æä¸ç¦æ¢éæ©æ¥æ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.readonly |
| | | }, |
| | | // æ¯å¦å±ç¤ºç¡®è®¤æé® |
| | | showConfirm: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showConfirm |
| | | }, |
| | | // æ¥æåºé´æå¤å¯é天æ°ï¼é»è®¤æ éå¶ï¼mode = rangeæ¶ææ |
| | | maxRange: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.calendar.maxRange |
| | | }, |
| | | // èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶çæç¤ºææ¡ï¼mode = rangeæ¶ææ |
| | | rangePrompt: { |
| | | type: String, |
| | | default: uni.$u.props.calendar.rangePrompt |
| | | }, |
| | | // èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶ï¼æ¯å¦å±ç¤ºæç¤ºææ¡ï¼mode = rangeæ¶ææ |
| | | showRangePrompt: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.showRangePrompt |
| | | }, |
| | | // æ¯å¦å
è®¸æ¥æèå´çèµ·æ¢æ¶é´ä¸ºåä¸å¤©ï¼mode = rangeæ¶ææ |
| | | allowSameDay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.calendar.allowSameDay |
| | | }, |
| | | // åè§å¼ |
| | | round: { |
| | | type: [Boolean, String, Number], |
| | | default: uni.$u.props.calendar.round |
| | | }, |
| | | // æå¤å±ç¤ºæä»½æ°é |
| | | monthNum: { |
| | | type: [Number, String], |
| | | default: 3 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-popup |
| | | :show="show" |
| | | mode="bottom" |
| | | closeable |
| | | @close="close" |
| | | :round="round" |
| | | :closeOnClickOverlay="closeOnClickOverlay" |
| | | > |
| | | <view class="u-calendar"> |
| | | <uHeader |
| | | :title="title" |
| | | :subtitle="subtitle" |
| | | :showSubtitle="showSubtitle" |
| | | :showTitle="showTitle" |
| | | ></uHeader> |
| | | <scroll-view |
| | | :style="{ |
| | | height: $u.addUnit(listHeight) |
| | | }" |
| | | scroll-y |
| | | @scroll="onScroll" |
| | | :scroll-top="scrollTop" |
| | | :scrollIntoView="scrollIntoView" |
| | | > |
| | | <uMonth |
| | | :color="color" |
| | | :rowHeight="rowHeight" |
| | | :showMark="showMark" |
| | | :months="months" |
| | | :mode="mode" |
| | | :maxCount="maxCount" |
| | | :startText="startText" |
| | | :endText="endText" |
| | | :defaultDate="defaultDate" |
| | | :minDate="innerMinDate" |
| | | :maxDate="innerMaxDate" |
| | | :maxMonth="monthNum" |
| | | :readonly="readonly" |
| | | :maxRange="maxRange" |
| | | :rangePrompt="rangePrompt" |
| | | :showRangePrompt="showRangePrompt" |
| | | :allowSameDay="allowSameDay" |
| | | ref="month" |
| | | @monthSelected="monthSelected" |
| | | @updateMonthTop="updateMonthTop" |
| | | ></uMonth> |
| | | </scroll-view> |
| | | <slot name="footer" v-if="showConfirm"> |
| | | <view class="u-calendar__confirm"> |
| | | <u-button |
| | | shape="circle" |
| | | :text=" |
| | | buttonDisabled ? confirmDisabledText : confirmText |
| | | " |
| | | :color="color" |
| | | @click="confirm" |
| | | :disabled="buttonDisabled" |
| | | ></u-button> |
| | | </view> |
| | | </slot> |
| | | </view> |
| | | </u-popup> |
| | | </template> |
| | | |
| | | <script> |
| | | import uHeader from './header.vue' |
| | | import uMonth from './month.vue' |
| | | import props from './props.js' |
| | | import util from './util.js' |
| | | import dayjs from '../../libs/util/dayjs.js' |
| | | import Calendar from '../../libs/util/calendar.js' |
| | | /** |
| | | * Calendar æ¥å |
| | | * @description æ¤ç»ä»¶ç¨äºåä¸ªéæ©æ¥æï¼èå´éæ©æ¥æçï¼æ¥å被å
裹å¨åºé¨å¼¹èµ·ç容å¨ä¸. |
| | | * @tutorial https://www.uviewui.com/components/calendar.html |
| | | * |
| | | * @property {String} title æ é¢å
容 (é»è®¤ æ¥æéæ© ) |
| | | * @property {Boolean} showTitle æ¯å¦æ¾ç¤ºæ é¢ (é»è®¤ true ) |
| | | * @property {Boolean} showSubtitle æ¯å¦æ¾ç¤ºå¯æ é¢ (é»è®¤ true ) |
| | | * @property {String} mode æ¥æç±»åéæ© single-éæ©åä¸ªæ¥æï¼multiple-å¯ä»¥éæ©å¤ä¸ªæ¥æï¼range-éæ©æ¥æèå´ ï¼ é»è®¤ 'single' ) |
| | | * @property {String} startText mode=rangeæ¶ï¼ç¬¬ä¸ä¸ªæ¥æåºé¨çæç¤ºæå (é»è®¤ 'å¼å§' ) |
| | | * @property {String} endText mode=rangeæ¶ï¼æåä¸ä¸ªæ¥æåºé¨çæç¤ºæå (é»è®¤ 'ç»æ' ) |
| | | * @property {Array} customList èªå®ä¹å表 |
| | | * @property {String} color 主é¢è²ï¼å¯¹åºé¨æé®åé䏿¥æææ (é»è®¤ â#3c9cff' ) |
| | | * @property {String | Number} minDate æå°çå¯éæ¥æ (é»è®¤ 0 ) |
| | | * @property {String | Number} maxDate æå¤§å¯éæ¥æ (é»è®¤ 0 ) |
| | | * @property {Array | String| Date} defaultDate é»è®¤éä¸çæ¥æï¼mode为multipleærangeæ¯å¿
须为æ°ç»æ ¼å¼ |
| | | * @property {String | Number} maxCount mode=multipleæ¶ï¼æå¤å¯éå¤å°ä¸ªæ¥æ (é»è®¤ Number.MAX_SAFE_INTEGER ) |
| | | * @property {String | Number} rowHeight æ¥æè¡é« (é»è®¤ 56 ) |
| | | * @property {Function} formatter æ¥ææ ¼å¼å彿° |
| | | * @property {Boolean} showLunar æ¯å¦æ¾ç¤ºåå (é»è®¤ false ) |
| | | * @property {Boolean} showMark æ¯å¦æ¾ç¤ºæä»½èæ¯è² (é»è®¤ true ) |
| | | * @property {String} confirmText ç¡®å®æé®çæå (é»è®¤ 'ç¡®å®' ) |
| | | * @property {String} confirmDisabledText 确认æé®å¤äºç¦ç¨ç¶ææ¶çæå (é»è®¤ 'ç¡®å®' ) |
| | | * @property {Boolean} show æ¯å¦æ¾ç¤ºæ¥åå¼¹çª (é»è®¤ false ) |
| | | * @property {Boolean} closeOnClickOverlay æ¯å¦å
许ç¹å»é®ç½©å
³éæ¥å (é»è®¤ false ) |
| | | * @property {Boolean} readonly æ¯å¦ä¸ºåªè¯»ç¶æï¼åªè¯»ç¶æä¸ç¦æ¢éæ©æ¥æ (é»è®¤ false ) |
| | | * @property {String | Number} maxRange æ¥æåºé´æå¤å¯é天æ°ï¼é»è®¤æ éå¶ï¼mode = rangeæ¶ææ |
| | | * @property {String} rangePrompt èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶çæç¤ºææ¡ï¼mode = rangeæ¶ææ |
| | | * @property {Boolean} showRangePrompt èå´éæ©è¶
è¿æå¤å¯éå¤©æ°æ¶ï¼æ¯å¦å±ç¤ºæç¤ºææ¡ï¼mode = rangeæ¶ææ (é»è®¤ true ) |
| | | * @property {Boolean} allowSameDay æ¯å¦å
è®¸æ¥æèå´çèµ·æ¢æ¶é´ä¸ºåä¸å¤©ï¼mode = rangeæ¶ææ (é»è®¤ false ) |
| | | * @property {Number|String} round åè§å¼ï¼é»è®¤æ åè§ (é»è®¤ 0 ) |
| | | * @property {Number|String} monthNum æå¤å±ç¤ºçæä»½æ°é (é»è®¤ 3 ) |
| | | * |
| | | * @event {Function()} confirm ç¹å»ç¡®å®æé®æ¶è§¦å éæ©æ¥æç¸å
³çè¿ååæ° |
| | | * @event {Function()} close æ¥åå
³éæ¶è§¦å å¯å®ä¹é¡µé¢å
³éæ¶çåè°äºä»¶ |
| | | * @example <u-calendar :defaultDate="defaultDateMultiple" :show="show" mode="multiple" @confirm="confirm"> |
| | | </u-calendar> |
| | | * */ |
| | | export default { |
| | | name: 'u-calendar', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | components: { |
| | | uHeader, |
| | | uMonth |
| | | }, |
| | | data() { |
| | | return { |
| | | // éè¦æ¾ç¤ºçæä»½çæ°ç» |
| | | months: [], |
| | | // 卿份æ»å¨åºåä¸ï¼å½åè§å¾ä¸æä»½çindexç´¢å¼ |
| | | monthIndex: 0, |
| | | // æä»½æ»å¨åºåçé«åº¦ |
| | | listHeight: 0, |
| | | // monthç»ä»¶ä¸éæ©çæ¥ææ°ç» |
| | | selected: [], |
| | | scrollIntoView: '', |
| | | scrollTop:0, |
| | | // è¿æ»¤å¤çæ¹æ³ |
| | | innerFormatter: (value) => value |
| | | } |
| | | }, |
| | | watch: { |
| | | selectedChange: { |
| | | immediate: true, |
| | | handler(n) { |
| | | this.setMonth() |
| | | } |
| | | }, |
| | | // æå¼å¼¹çªæ¶ï¼è®¾ç½®æä»½æ°æ® |
| | | show: { |
| | | immediate: true, |
| | | handler(n) { |
| | | this.setMonth() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // ç±äºmaxDateåminDateå¯ä»¥ä¸ºå符串(2021-10-10)ï¼æè
æ°å¼(æ¶é´æ³)ï¼ä½æ¯dayjs妿æ¥åå符串形å¼çæ¶é´æ³ä¼æé®é¢ï¼è¿éè¿è¡å¤ç |
| | | innerMaxDate() { |
| | | return uni.$u.test.number(this.maxDate) |
| | | ? Number(this.maxDate) |
| | | : this.maxDate |
| | | }, |
| | | innerMinDate() { |
| | | return uni.$u.test.number(this.minDate) |
| | | ? Number(this.minDate) |
| | | : this.minDate |
| | | }, |
| | | // å¤ä¸ªæ¡ä»¶çååï¼ä¼å¼èµ·é䏿¥æçååï¼è¿éç»ä¸ç®¡ççå¬ |
| | | selectedChange() { |
| | | return [this.innerMinDate, this.innerMaxDate, this.defaultDate] |
| | | }, |
| | | subtitle() { |
| | | // åå§åæ¶ï¼this.months为空æ°ç»ï¼æä»¥éè¦ç¹å«å¤æå¤ç |
| | | if (this.months.length) { |
| | | return `${this.months[this.monthIndex].year}å¹´${ |
| | | this.months[this.monthIndex].month |
| | | }æ` |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | buttonDisabled() { |
| | | // å¦æä¸ºrangeç±»åï¼ä¸éæ©çæ¥æä¸ªæ°ä¸è¶³1个æ¶ï¼è®©åºé¨çæé®åºäºdisabledç¶æ |
| | | if (this.mode === 'range') { |
| | | if (this.selected.length <= 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.start = Date.now() |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | // å¨å¾®ä¿¡å°ç¨åºä¸ï¼ä¸æ¯æå°å½æ°å½åpropsåæ°ï¼æ
åªè½éè¿refå½¢å¼è°ç¨ |
| | | setFormatter(e) { |
| | | this.innerFormatter = e |
| | | }, |
| | | // monthç»ä»¶å
é¨éæ©æ¥æåï¼éè¿äºä»¶éç¥ç»ç¶ç»ä»¶ |
| | | monthSelected(e) { |
| | | this.selected = e |
| | | if (!this.showConfirm) { |
| | | // å¨ä¸éè¦ç¡®è®¤æé®çæ
åµä¸ï¼å¦æä¸ºåéï¼æè
èå´å¤éä¸å·²éé¿åº¦å¤§äº2ï¼åç´æ¥è¿è¡è¿è¿ |
| | | if ( |
| | | this.mode === 'multiple' || |
| | | this.mode === 'single' || |
| | | (this.mode === 'range' && this.selected.length >= 2) |
| | | ) { |
| | | this.$emit('confirm', this.selected) |
| | | } |
| | | } |
| | | }, |
| | | init() { |
| | | // æ ¡éªmaxDateï¼ä¸è½å°äºå½åæ¶é´ |
| | | if ( |
| | | this.innerMaxDate && |
| | | new Date(this.innerMaxDate).getTime() <= Date.now() |
| | | ) { |
| | | return uni.$u.error('maxDateä¸è½å°äºå½åæ¶é´') |
| | | } |
| | | // æ»å¨åºåçé«åº¦ |
| | | this.listHeight = this.rowHeight * 5 + 30 |
| | | this.setMonth() |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | // ç¹å»ç¡®å®æé® |
| | | confirm() { |
| | | if (!this.buttonDisabled) { |
| | | this.$emit('confirm', this.selected) |
| | | } |
| | | }, |
| | | // è·å¾ä¸¤ä¸ªæ¥æä¹é´çæä»½æ° |
| | | getMonths(minDate, maxDate) { |
| | | const minYear = dayjs(minDate).year() |
| | | const minMonth = dayjs(minDate).month() + 1 |
| | | const maxYear = dayjs(maxDate).year() |
| | | const maxMonth = dayjs(maxDate).month() + 1 |
| | | return (maxYear - minYear) * 12 + (maxMonth - minMonth) + 1 |
| | | }, |
| | | // 设置æä»½æ°æ® |
| | | setMonth() { |
| | | // æå°æ¥æçæ¯«ç§æ° |
| | | const minDate = this.innerMinDate || dayjs().valueOf() |
| | | // å¦ææ²¡ææå®æå¤§æ¥æï¼åå¾åæ¨3个æ |
| | | const maxDate = |
| | | this.innerMaxDate || |
| | | dayjs(minDate) |
| | | .add(this.monthNum - 1, 'month') |
| | | .valueOf() |
| | | // æå¤§æå°æä»½ä¹é´çå
±æå¤å°ä¸ªæä»½ï¼ |
| | | const months = uni.$u.range( |
| | | 1, |
| | | this.monthNum, |
| | | this.getMonths(minDate, maxDate) |
| | | ) |
| | | // å
æ¸
空æ°ç» |
| | | this.months = [] |
| | | for (let i = 0; i < months; i++) { |
| | | this.months.push({ |
| | | date: new Array( |
| | | dayjs(minDate).add(i, 'month').daysInMonth() |
| | | ) |
| | | .fill(1) |
| | | .map((item, index) => { |
| | | // æ¥æï¼åå¼1-31 |
| | | let day = index + 1 |
| | | // ææï¼0-6ï¼0ä¸ºå¨æ¥ |
| | | const week = dayjs(minDate) |
| | | .add(i, 'month') |
| | | .date(day) |
| | | .day() |
| | | const date = dayjs(minDate) |
| | | .add(i, 'month') |
| | | .date(day) |
| | | .format('YYYY-MM-DD') |
| | | let bottomInfo = '' |
| | | if (this.showLunar) { |
| | | // å°æ¥æè½¬ä¸ºååæ ¼å¼ |
| | | const lunar = Calendar.solar2lunar( |
| | | dayjs(date).year(), |
| | | dayjs(date).month() + 1, |
| | | dayjs(date).date() |
| | | ) |
| | | bottomInfo = lunar.IDayCn |
| | | } |
| | | let config = { |
| | | day, |
| | | week, |
| | | // å°äºæå°å
è®¸çæ¥æï¼æè
å¤§äºæå¤§çæ¥æï¼å设置为disabledç¶æ |
| | | disabled: |
| | | dayjs(date).isBefore( |
| | | dayjs(minDate).format('YYYY-MM-DD') |
| | | ) || |
| | | dayjs(date).isAfter( |
| | | dayjs(maxDate).format('YYYY-MM-DD') |
| | | ), |
| | | // è¿åä¸ä¸ªæ¥æå¯¹è±¡ï¼ä¾å¤é¨çformatterè·åå½åæ¥æçå¹´ææ¥çä¿¡æ¯ï¼è¿è¡å å·¥å¤ç |
| | | date: new Date(date), |
| | | bottomInfo, |
| | | dot: false, |
| | | month: |
| | | dayjs(minDate).add(i, 'month').month() + 1 |
| | | } |
| | | const formatter = |
| | | this.formatter || this.innerFormatter |
| | | return formatter(config) |
| | | }), |
| | | // å½åæå±çæä»½ |
| | | month: dayjs(minDate).add(i, 'month').month() + 1, |
| | | // å½å年份 |
| | | year: dayjs(minDate).add(i, 'month').year() |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // æ»å¨å°é»è®¤è®¾ç½®çæä»½ |
| | | scrollIntoDefaultMonth(selected) { |
| | | // æ¥è¯¢é»è®¤æ¥æå¨å¯éå表ç䏿 |
| | | const _index = this.months.findIndex(({ |
| | | year, |
| | | month |
| | | }) => { |
| | | month = uni.$u.padZero(month) |
| | | return `${year}-${month}` === selected |
| | | }) |
| | | if (_index !== -1) { |
| | | // #ifndef MP-WEIXIN |
| | | this.$nextTick(() => { |
| | | this.scrollIntoView = `month-${_index}` |
| | | }) |
| | | // #endif |
| | | // #ifdef MP-WEIXIN |
| | | this.scrollTop = this.months[_index].top || 0; |
| | | // #endif |
| | | } |
| | | }, |
| | | // scroll-viewæ»å¨çå¬ |
| | | onScroll(event) { |
| | | // ä¸å
许å°äº0çæ»å¨å¼ï¼å¦æscroll-viewå°é¡¶äºï¼ç»§ç»ä¸æï¼ä¼åºç°è´æ°å¼ |
| | | const scrollTop = Math.max(0, event.detail.scrollTop) |
| | | // å°å½åæ»å¨æ¡æ°å¼ï¼é¤ä»¥æ»å¨åºåçé«åº¦ï¼å¯ä»¥å¾åºå½åæ»å¨å°äºåªä¸ä¸ªæä»½çç´¢å¼ |
| | | for (let i = 0; i < this.months.length; i++) { |
| | | if (scrollTop >= (this.months[i].top || this.listHeight)) { |
| | | this.monthIndex = i |
| | | } |
| | | } |
| | | }, |
| | | // æ´æ°æä»½çtopå¼ |
| | | updateMonthTop(topArr = []) { |
| | | // è®¾ç½®å¯¹åºæä»½çtopå¼ï¼ç¨äºonScrollæ¹æ³æ´æ°æä»½ |
| | | topArr.map((item, index) => { |
| | | this.months[index].top = item |
| | | }) |
| | | |
| | | // è·åé»è®¤æ¥æç䏿 |
| | | if (!this.defaultDate) { |
| | | // å¦ææ²¡æè®¾ç½®é»è®¤æ¥æï¼åå°å½å¤©æ¥æè®¾ç½®ä¸ºé»è®¤éä¸çæ¥æ |
| | | const selected = dayjs().format("YYYY-MM") |
| | | this.scrollIntoDefaultMonth(selected) |
| | | return |
| | | } |
| | | let selected = dayjs().format("YYYY-MM"); |
| | | // å鿍¡å¼ï¼å¯ä»¥æ¯åç¬¦ä¸²ææ°ç»ï¼Date对象ç |
| | | if (!uni.$u.test.array(this.defaultDate)) { |
| | | selected = dayjs(this.defaultDate).format("YYYY-MM") |
| | | } else { |
| | | selected = dayjs(this.defaultDate[0]).format("YYYY-MM"); |
| | | } |
| | | this.scrollIntoDefaultMonth(selected) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | |
| | | .u-calendar { |
| | | &__confirm { |
| | | padding: 7px 18px; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | methods: { |
| | | // 设置æä»½æ°æ® |
| | | setMonth() { |
| | | // æåæ¯å¨å |
| | | const day = dayjs(this.date).date(1).day() |
| | | const start = day == 0 ? 6 : day - 1 |
| | | |
| | | // æ¬æå¤©æ° |
| | | const days = dayjs(this.date).endOf('month').format('D') |
| | | |
| | | // ä¸ä¸ªæå¤©æ° |
| | | const prevDays = dayjs(this.date).endOf('month').subtract(1, 'month').format('D') |
| | | |
| | | // æ¥ææ°æ® |
| | | const arr = [] |
| | | // æ¸
ç©ºè¡¨æ ¼ |
| | | this.month = [] |
| | | |
| | | // æ·»å ä¸ææ°æ® |
| | | arr.push( |
| | | ...new Array(start).fill(1).map((e, i) => { |
| | | const day = prevDays - start + i + 1 |
| | | |
| | | return { |
| | | value: day, |
| | | disabled: true, |
| | | date: dayjs(this.date).subtract(1, 'month').date(day).format('YYYY-MM-DD') |
| | | } |
| | | }) |
| | | ) |
| | | |
| | | // æ·»å æ¬ææ°æ® |
| | | arr.push( |
| | | ...new Array(days - 0).fill(1).map((e, i) => { |
| | | const day = i + 1 |
| | | |
| | | return { |
| | | value: day, |
| | | date: dayjs(this.date).date(day).format('YYYY-MM-DD') |
| | | } |
| | | }) |
| | | ) |
| | | |
| | | // æ·»å ä¸ä¸ªæ |
| | | arr.push( |
| | | ...new Array(42 - days - start).fill(1).map((e, i) => { |
| | | const day = i + 1 |
| | | |
| | | return { |
| | | value: day, |
| | | disabled: true, |
| | | date: dayjs(this.date).add(1, 'month').date(day).format('YYYY-MM-DD') |
| | | } |
| | | }) |
| | | ) |
| | | |
| | | // å岿°ç» |
| | | for (let n = 0; n < arr.length; n += 7) { |
| | | this.month.push( |
| | | arr.slice(n, n + 7).map((e, i) => { |
| | | e.index = i + n |
| | | |
| | | // èªå®ä¹ä¿¡æ¯ |
| | | const custom = this.customList.find((c) => c.date == e.date) |
| | | |
| | | // åå |
| | | if (this.lunar) { |
| | | const { |
| | | IDayCn, |
| | | IMonthCn |
| | | } = this.getLunar(e.date) |
| | | e.lunar = IDayCn == 'åä¸' ? IMonthCn : IDayCn |
| | | } |
| | | |
| | | return { |
| | | ...e, |
| | | ...custom |
| | | } |
| | | }) |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦æä¹±é®çæé®çé¡ºåº |
| | | random: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // è¾å
¥ä¸ä¸ªä¸æåï¼æ¯å¦èªå¨åæ¢å°è±æ |
| | | autoChange: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-keyboard" |
| | | @touchmove.stop.prevent="noop" |
| | | > |
| | | <view |
| | | v-for="(group, i) in abc ? engKeyBoardList : areaList" |
| | | :key="i" |
| | | class="u-keyboard__button" |
| | | :index="i" |
| | | :class="[i + 1 === 4 && 'u-keyboard__button--center']" |
| | | > |
| | | <view |
| | | v-if="i === 3" |
| | | class="u-keyboard__button__inner-wrapper" |
| | | > |
| | | <view |
| | | class="u-keyboard__button__inner-wrapper__left" |
| | | hover-class="u-hover-class" |
| | | :hover-stay-time="200" |
| | | @tap="changeCarInputMode" |
| | | > |
| | | <text |
| | | class="u-keyboard__button__inner-wrapper__left__lang" |
| | | :class="[!abc && 'u-keyboard__button__inner-wrapper__left__lang--active']" |
| | | >ä¸</text> |
| | | <text class="u-keyboard__button__inner-wrapper__left__line">/</text> |
| | | <text |
| | | class="u-keyboard__button__inner-wrapper__left__lang" |
| | | :class="[abc && 'u-keyboard__button__inner-wrapper__left__lang--active']" |
| | | >è±</text> |
| | | </view> |
| | | </view> |
| | | <view |
| | | class="u-keyboard__button__inner-wrapper" |
| | | v-for="(item, j) in group" |
| | | :key="j" |
| | | > |
| | | <view |
| | | class="u-keyboard__button__inner-wrapper__inner" |
| | | :hover-stay-time="200" |
| | | @tap="carInputClick(i, j)" |
| | | hover-class="u-hover-class" |
| | | > |
| | | <text class="u-keyboard__button__inner-wrapper__inner__text">{{ item }}</text> |
| | | </view> |
| | | </view> |
| | | <view |
| | | v-if="i === 3" |
| | | @touchstart="backspaceClick" |
| | | @touchend="clearTimer" |
| | | class="u-keyboard__button__inner-wrapper" |
| | | > |
| | | <view |
| | | class="u-keyboard__button__inner-wrapper__right" |
| | | hover-class="u-hover-class" |
| | | :hover-stay-time="200" |
| | | > |
| | | <u-icon |
| | | size="28" |
| | | name="backspace" |
| | | color="#303133" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * keyboard é®çç»ä»¶ |
| | | * @description æ¤ä¸ºuViewèªå®ä¹çé®ç颿¿ï¼å
å«äºæ°åé®çï¼è½¦çå·é®ï¼èº«ä»½è¯å·é®ç3ç§æ¨¡å¼ï¼é½æå¯ä»¥æä¹±æé®é¡ºåºçé项ã |
| | | * @tutorial https://uviewui.com/components/keyboard.html |
| | | * @property {Boolean} random æ¯å¦æä¹±é®ççé¡ºåº |
| | | * @event {Function} change ç¹å»é®ç触å |
| | | * @event {Function} backspace ç¹å»éæ ¼é®è§¦å |
| | | * @example <u-keyboard ref="uKeyboard" mode="car" v-model="show"></u-keyboard> |
| | | */ |
| | | export default { |
| | | name: "u-keyboard", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // 车çè¾å
¥æ¶ï¼abc=true为è¾å
¥è½¦çå·ç ï¼bac=false为è¾å
¥ç份䏿ç®ç§° |
| | | abc: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | areaList() { |
| | | let data = [ |
| | | '京', |
| | | '沪', |
| | | '粤', |
| | | 'æ´¥', |
| | | 'å', |
| | | '豫', |
| | | 'äº', |
| | | 'è¾½', |
| | | 'é»', |
| | | 'æ¹', |
| | | 'ç', |
| | | 'é²', |
| | | 'è', |
| | | 'æµ', |
| | | 'èµ£', |
| | | 'é', |
| | | 'æ¡', |
| | | 'ç', |
| | | 'æ', |
| | | 'é', |
| | | 'è', |
| | | 'å', |
| | | 'é½', |
| | | 'è´µ', |
| | | 'æ¸', |
| | | 'å·', |
| | | 'é', |
| | | 'ç¼', |
| | | 'å®', |
| | | 'æ', |
| | | 'è', |
| | | '港', |
| | | 'æ¾³', |
| | | 'æ°', |
| | | '使', |
| | | 'å¦' |
| | | ]; |
| | | let tmp = []; |
| | | // æä¹±é¡ºåº |
| | | if (this.random) data = uni.$u.randomArray(data); |
| | | // å岿äºç»´æ°ç» |
| | | tmp[0] = data.slice(0, 10); |
| | | tmp[1] = data.slice(10, 20); |
| | | tmp[2] = data.slice(20, 30); |
| | | tmp[3] = data.slice(30, 36); |
| | | return tmp; |
| | | }, |
| | | engKeyBoardList() { |
| | | let data = [ |
| | | 1, |
| | | 2, |
| | | 3, |
| | | 4, |
| | | 5, |
| | | 6, |
| | | 7, |
| | | 8, |
| | | 9, |
| | | 0, |
| | | 'Q', |
| | | 'W', |
| | | 'E', |
| | | 'R', |
| | | 'T', |
| | | 'Y', |
| | | 'U', |
| | | 'I', |
| | | 'O', |
| | | 'P', |
| | | 'A', |
| | | 'S', |
| | | 'D', |
| | | 'F', |
| | | 'G', |
| | | 'H', |
| | | 'J', |
| | | 'K', |
| | | 'L', |
| | | 'Z', |
| | | 'X', |
| | | 'C', |
| | | 'V', |
| | | 'B', |
| | | 'N', |
| | | 'M' |
| | | ]; |
| | | let tmp = []; |
| | | if (this.random) data = uni.$u.randomArray(data); |
| | | tmp[0] = data.slice(0, 10); |
| | | tmp[1] = data.slice(10, 20); |
| | | tmp[2] = data.slice(20, 30); |
| | | tmp[3] = data.slice(30, 36); |
| | | return tmp; |
| | | } |
| | | }, |
| | | methods: { |
| | | // ç¹å»é®çæé® |
| | | carInputClick(i, j) { |
| | | let value = ''; |
| | | // ä¸å模å¼ï¼è·åä¸åæ°ç»çå¼ |
| | | if (this.abc) value = this.engKeyBoardList[i][j]; |
| | | else value = this.areaList[i][j]; |
| | | // 妿å
许èªå¨åæ¢ï¼åå°ä¸æç¶æåæ¢ä¸ºè±æ |
| | | if (!this.abc && this.autoChange) uni.$u.sleep(200).then(() => this.abc = true) |
| | | this.$emit('change', value); |
| | | }, |
| | | // ä¿®æ¹æ±½è½¦çé®ççè¾å
¥æ¨¡å¼ï¼ä¸æ|è±æ |
| | | changeCarInputMode() { |
| | | this.abc = !this.abc; |
| | | }, |
| | | // ç¹å»éæ ¼é® |
| | | backspaceClick() { |
| | | this.$emit('backspace'); |
| | | clearInterval(this.timer); //忬¡æ¸
ç©ºå®æ¶å¨ï¼é²æ¢é夿³¨å宿¶å¨ |
| | | this.timer = null; |
| | | this.timer = setInterval(() => { |
| | | this.$emit('backspace'); |
| | | }, 250); |
| | | }, |
| | | clearTimer() { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-car-keyboard-background-color: rgb(224, 228, 230) !default; |
| | | $u-car-keyboard-padding:6px 0 6px !default; |
| | | $u-car-keyboard-button-inner-width:64rpx !default; |
| | | $u-car-keyboard-button-inner-background-color:#FFFFFF !default; |
| | | $u-car-keyboard-button-height:80rpx !default; |
| | | $u-car-keyboard-button-inner-box-shadow:0 1px 0px #999992 !default; |
| | | $u-car-keyboard-button-border-radius:4px !default; |
| | | $u-car-keyboard-button-inner-margin:8rpx 5rpx !default; |
| | | $u-car-keyboard-button-text-font-size:16px !default; |
| | | $u-car-keyboard-button-text-color:$u-main-color !default; |
| | | $u-car-keyboard-center-inner-margin: 0 4rpx !default; |
| | | $u-car-keyboard-special-button-width:134rpx !default; |
| | | $u-car-keyboard-lang-font-size:16px !default; |
| | | $u-car-keyboard-lang-color:$u-main-color !default; |
| | | $u-car-keyboard-active-color:$u-primary !default; |
| | | $u-car-keyboard-line-font-size:15px !default; |
| | | $u-car-keyboard-line-color:$u-main-color !default; |
| | | $u-car-keyboard-line-margin:0 1px !default; |
| | | $u-car-keyboard-u-hover-class-background-color:#BBBCC6 !default; |
| | | |
| | | .u-keyboard { |
| | | @include flex(column); |
| | | justify-content: space-around; |
| | | background-color: $u-car-keyboard-background-color; |
| | | align-items: stretch; |
| | | padding: $u-car-keyboard-padding; |
| | | |
| | | &__button { |
| | | @include flex; |
| | | justify-content: center; |
| | | flex: 1; |
| | | /* #ifndef APP-NVUE */ |
| | | /* #endif */ |
| | | |
| | | &__inner-wrapper { |
| | | box-shadow: $u-car-keyboard-button-inner-box-shadow; |
| | | margin: $u-car-keyboard-button-inner-margin; |
| | | border-radius: $u-car-keyboard-button-border-radius; |
| | | |
| | | &__inner { |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | width: $u-car-keyboard-button-inner-width; |
| | | background-color: $u-car-keyboard-button-inner-background-color; |
| | | height: $u-car-keyboard-button-height; |
| | | border-radius: $u-car-keyboard-button-border-radius; |
| | | |
| | | &__text { |
| | | font-size: $u-car-keyboard-button-text-font-size; |
| | | color: $u-car-keyboard-button-text-color; |
| | | } |
| | | } |
| | | |
| | | &__left, |
| | | &__right { |
| | | border-radius: $u-car-keyboard-button-border-radius; |
| | | width: $u-car-keyboard-special-button-width; |
| | | height: $u-car-keyboard-button-height; |
| | | background-color: $u-car-keyboard-u-hover-class-background-color; |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | box-shadow: $u-car-keyboard-button-inner-box-shadow; |
| | | } |
| | | |
| | | &__left { |
| | | &__line { |
| | | font-size: $u-car-keyboard-line-font-size; |
| | | color: $u-car-keyboard-line-color; |
| | | margin: $u-car-keyboard-line-margin; |
| | | } |
| | | |
| | | &__lang { |
| | | font-size: $u-car-keyboard-lang-font-size; |
| | | color: $u-car-keyboard-lang-color; |
| | | |
| | | &--active { |
| | | color: $u-car-keyboard-active-color; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-hover-class { |
| | | background-color: $u-car-keyboard-u-hover-class-background-color; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // åç»æ é¢ |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.cellGroup.title |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå¤è¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cellGroup.border |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view :style="[$u.addStyle(customStyle)]" :class="[customClass]" class="u-cell-group"> |
| | | <view v-if="title" class="u-cell-group__title"> |
| | | <slot name="title"> |
| | | <text class="u-cell-group__title__text">{{ title }}</text> |
| | | </slot> |
| | | </view> |
| | | <view class="u-cell-group__wrapper"> |
| | | <u-line v-if="border"></u-line> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * cellGroup åå
æ ¼ |
| | | * @description cellåå
æ ¼ä¸è¬ç¨äºä¸ç»å表çæ
åµï¼æ¯å¦ä¸ªäººä¸å¿é¡µï¼è®¾ç½®é¡µçã |
| | | * @tutorial https://uviewui.com/components/cell.html |
| | | * |
| | | * @property {String} title åç»æ é¢ |
| | | * @property {Boolean} border æ¯å¦æ¾ç¤ºå¤è¾¹æ¡ (é»è®¤ true ) |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click ç¹å»cellå表æ¶è§¦å |
| | | * @example <u-cell-group title="设置å好"> |
| | | */ |
| | | export default { |
| | | name: 'u-cell-group', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | $u-cell-group-title-padding: 16px 16px 8px !default; |
| | | $u-cell-group-title-font-size: 15px !default; |
| | | $u-cell-group-title-line-height: 16px !default; |
| | | $u-cell-group-title-color: $u-main-color !default; |
| | | |
| | | .u-cell-group { |
| | | flex: 1; |
| | | |
| | | &__title { |
| | | padding: $u-cell-group-title-padding; |
| | | |
| | | &__text { |
| | | font-size: $u-cell-group-title-font-size; |
| | | line-height: $u-cell-group-title-line-height; |
| | | color: $u-cell-group-title-color; |
| | | } |
| | | } |
| | | |
| | | &__wrapper { |
| | | position: relative; |
| | | } |
| | | } |
| | | </style> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ é¢ |
| | | title: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.cell.title |
| | | }, |
| | | // æ é¢ä¸æ¹çæè¿°ä¿¡æ¯ |
| | | label: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.cell.label |
| | | }, |
| | | // å³ä¾§çå
容 |
| | | value: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.cell.value |
| | | }, |
| | | // 左侧徿 åç§°ï¼æè
å¾ç龿¥(æ¬å°æä»¶å»ºè®®ä½¿ç¨ç»å¯¹å°å) |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.cell.icon |
| | | }, |
| | | // æ¯å¦ç¦ç¨cell |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.disabled |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºä¸è¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.border |
| | | }, |
| | | // å
容æ¯å¦åç´å±
ä¸(ä¸»è¦æ¯é对å³ä¾§çvalueé¨å) |
| | | center: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.center |
| | | }, |
| | | // ç¹å»å跳转çURLå°å |
| | | url: { |
| | | type: String, |
| | | default: uni.$u.props.cell.url |
| | | }, |
| | | // 龿¥è·³è½¬çæ¹å¼ï¼å
é¨ä½¿ç¨çæ¯uViewå°è£
çrouteæ¹æ³ï¼å¯è½ä¼è¿è¡æ¦æªæä½ |
| | | linkType: { |
| | | type: String, |
| | | default: uni.$u.props.cell.linkType |
| | | }, |
| | | // æ¯å¦å¼å¯ç¹å»åé¦(表ç°ä¸ºç¹å»æ¶å ä¸ç°è²èæ¯) |
| | | clickable: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.clickable |
| | | }, |
| | | // æ¯å¦å±ç¤ºå³ä¾§ç®å¤´å¹¶å¼å¯ç¹å»åé¦ |
| | | isLink: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.isLink |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¡¨åç¶æä¸çå¿
å¡«æå·(æ¤ç»ä»¶å¯è½ä¼å
åµå
¥inputç»ä»¶) |
| | | required: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.required |
| | | }, |
| | | // å³ä¾§ç徿 ç®å¤´ |
| | | rightIcon: { |
| | | type: String, |
| | | default: uni.$u.props.cell.rightIcon |
| | | }, |
| | | // å³ä¾§ç®å¤´çæ¹åï¼å¯éå¼ä¸ºï¼leftï¼upï¼down |
| | | arrowDirection: { |
| | | type: String, |
| | | default: uni.$u.props.cell.arrowDirection |
| | | }, |
| | | // 左侧徿 æ ·å¼ |
| | | iconStyle: { |
| | | type: [Object, String], |
| | | default: () => { |
| | | return uni.$u.props.cell.iconStyle |
| | | } |
| | | }, |
| | | // å³ä¾§ç®å¤´å¾æ çæ ·å¼ |
| | | rightIconStyle: { |
| | | type: [Object, String], |
| | | default: () => { |
| | | return uni.$u.props.cell.rightIconStyle |
| | | } |
| | | }, |
| | | // æ é¢çæ ·å¼ |
| | | titleStyle: { |
| | | type: [Object, String], |
| | | default: () => { |
| | | return uni.$u.props.cell.titleStyle |
| | | } |
| | | }, |
| | | // åä½å
ç大å°ï¼å¯éå¼ä¸ºlarge |
| | | size: { |
| | | type: String, |
| | | default: uni.$u.props.cell.size |
| | | }, |
| | | // ç¹å»cellæ¯å¦é»æ¢äºä»¶ä¼ æ |
| | | stop: { |
| | | type: Boolean, |
| | | default: uni.$u.props.cell.stop |
| | | }, |
| | | // æ è¯ç¬¦ï¼cell被ç¹å»æ¶è¿å |
| | | name: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.cell.name |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-cell" :class="[customClass]" :style="[$u.addStyle(customStyle)]" |
| | | :hover-class="(!disabled && (clickable || isLink)) ? 'u-cell--clickable' : ''" :hover-stay-time="250" |
| | | @tap="clickHandler"> |
| | | <view class="u-cell__body" :class="[ center && 'u-cell--center', size === 'large' && 'u-cell__body--large']"> |
| | | <view class="u-cell__body__content"> |
| | | <view class="u-cell__left-icon-wrap" v-if="$slots.icon || icon"> |
| | | <slot name="icon" v-if="$slots.icon"> |
| | | </slot> |
| | | <u-icon v-else :name="icon" :custom-style="iconStyle" :size="size === 'large' ? 22 : 18"></u-icon> |
| | | </view> |
| | | <view class="u-cell__title"> |
| | | <slot name="title"> |
| | | <text v-if="title" class="u-cell__title-text" :style="[titleTextStyle]" |
| | | :class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text> |
| | | </slot> |
| | | <slot name="label"> |
| | | <text class="u-cell__label" v-if="label" |
| | | :class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text> |
| | | </slot> |
| | | </view> |
| | | </view> |
| | | <slot name="value"> |
| | | <text class="u-cell__value" |
| | | :class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__value--large']" |
| | | v-if="!$u.test.empty(value)">{{ value }}</text> |
| | | </slot> |
| | | <view class="u-cell__right-icon-wrap" v-if="$slots['right-icon'] || isLink" |
| | | :class="[`u-cell__right-icon-wrap--${arrowDirection}`]"> |
| | | <slot name="right-icon" v-if="$slots['right-icon']"> |
| | | </slot> |
| | | <u-icon v-else :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'" |
| | | :size="size === 'large' ? 18 : 16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <u-line v-if="border"></u-line> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * cell åå
æ ¼ |
| | | * @description cellåå
æ ¼ä¸è¬ç¨äºä¸ç»å表çæ
åµï¼æ¯å¦ä¸ªäººä¸å¿é¡µï¼è®¾ç½®é¡µçã |
| | | * @tutorial https://uviewui.com/components/cell.html |
| | | * @property {String | Number} title æ é¢ |
| | | * @property {String | Number} label æ é¢ä¸æ¹çæè¿°ä¿¡æ¯ |
| | | * @property {String | Number} value å³ä¾§çå
容 |
| | | * @property {String} icon 左侧徿 åç§°ï¼æè
å¾ç龿¥(æ¬å°æä»¶å»ºè®®ä½¿ç¨ç»å¯¹å°å) |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨cell |
| | | * @property {Boolean} border æ¯å¦æ¾ç¤ºä¸è¾¹æ¡ (é»è®¤ true ) |
| | | * @property {Boolean} center å
容æ¯å¦åç´å±
ä¸(ä¸»è¦æ¯é对å³ä¾§çvalueé¨å) (é»è®¤ false ) |
| | | * @property {String} url ç¹å»å跳转çURLå°å |
| | | * @property {String} linkType 龿¥è·³è½¬çæ¹å¼ï¼å
é¨ä½¿ç¨çæ¯uViewå°è£
çrouteæ¹æ³ï¼å¯è½ä¼è¿è¡æ¦æªæä½ (é»è®¤ 'navigateTo' ) |
| | | * @property {Boolean} clickable æ¯å¦å¼å¯ç¹å»åé¦(表ç°ä¸ºç¹å»æ¶å ä¸ç°è²èæ¯) ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} isLink æ¯å¦å±ç¤ºå³ä¾§ç®å¤´å¹¶å¼å¯ç¹å»åé¦ ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} required æ¯å¦æ¾ç¤ºè¡¨åç¶æä¸çå¿
å¡«æå·(æ¤ç»ä»¶å¯è½ä¼å
åµå
¥inputç»ä»¶) ï¼é»è®¤ false ï¼ |
| | | * @property {String} rightIcon å³ä¾§ç徿 ç®å¤´ ï¼é»è®¤ 'arrow-right'ï¼ |
| | | * @property {String} arrowDirection å³ä¾§ç®å¤´çæ¹åï¼å¯éå¼ä¸ºï¼leftï¼upï¼down |
| | | * @property {Object | String} rightIconStyle å³ä¾§ç®å¤´å¾æ çæ ·å¼ |
| | | * @property {Object | String} titleStyle æ é¢çæ ·å¼ |
| | | * @property {Object | String} iconStyle 左侧徿 æ ·å¼ |
| | | * @property {String} size åä½å
ç大å°ï¼å¯éå¼ä¸º largeï¼normalï¼mini |
| | | * @property {Boolean} stop ç¹å»cellæ¯å¦é»æ¢äºä»¶ä¼ æ (é»è®¤ true ) |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click ç¹å»cellå表æ¶è§¦å |
| | | * @example 该ç»ä»¶éè¦æé
cell-groupç»ä»¶ä½¿ç¨ï¼è§å®æ¹ææ¡£ç¤ºä¾ |
| | | */ |
| | | export default { |
| | | name: 'u-cell', |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | computed: { |
| | | titleTextStyle() { |
| | | return uni.$u.addStyle(this.titleStyle) |
| | | } |
| | | }, |
| | | methods: { |
| | | // ç¹å»cell |
| | | clickHandler(e) { |
| | | if (this.disabled) return |
| | | this.$emit('click', { |
| | | name: this.name |
| | | }) |
| | | // 妿é
ç½®äºurl(æ¤propsåæ°éè¿mixinå¼å
¥)åæ°ï¼è·³è½¬é¡µé¢ |
| | | this.openPage() |
| | | // æ¯å¦é»æ¢äºä»¶ä¼ æ |
| | | this.stop && this.preventEvent(e) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | $u-cell-padding: 10px 15px !default; |
| | | $u-cell-font-size: 15px !default; |
| | | $u-cell-line-height: 24px !default; |
| | | $u-cell-color: $u-main-color !default; |
| | | $u-cell-icon-size: 16px !default; |
| | | $u-cell-title-font-size: 15px !default; |
| | | $u-cell-title-line-height: 22px !default; |
| | | $u-cell-title-color: $u-main-color !default; |
| | | $u-cell-label-font-size: 12px !default; |
| | | $u-cell-label-color: $u-tips-color !default; |
| | | $u-cell-label-line-height: 18px !default; |
| | | $u-cell-value-font-size: 14px !default; |
| | | $u-cell-value-color: $u-content-color !default; |
| | | $u-cell-clickable-color: $u-bg-color !default; |
| | | $u-cell-disabled-color: #c8c9cc !default; |
| | | $u-cell-padding-top-large: 13px !default; |
| | | $u-cell-padding-bottom-large: 13px !default; |
| | | $u-cell-value-font-size-large: 15px !default; |
| | | $u-cell-label-font-size-large: 14px !default; |
| | | $u-cell-title-font-size-large: 16px !default; |
| | | $u-cell-left-icon-wrap-margin-right: 4px !default; |
| | | $u-cell-right-icon-wrap-margin-left: 4px !default; |
| | | $u-cell-title-flex:1 !default; |
| | | $u-cell-label-margin-top:5px !default; |
| | | |
| | | |
| | | .u-cell { |
| | | &__body { |
| | | @include flex(); |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | padding: $u-cell-padding; |
| | | font-size: $u-cell-font-size; |
| | | color: $u-cell-color; |
| | | // line-height: $u-cell-line-height; |
| | | align-items: center; |
| | | |
| | | &__content { |
| | | @include flex(row); |
| | | align-items: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | &--large { |
| | | padding-top: $u-cell-padding-top-large; |
| | | padding-bottom: $u-cell-padding-bottom-large; |
| | | } |
| | | } |
| | | |
| | | &__left-icon-wrap, |
| | | &__right-icon-wrap { |
| | | @include flex(); |
| | | align-items: center; |
| | | // height: $u-cell-line-height; |
| | | font-size: $u-cell-icon-size; |
| | | } |
| | | |
| | | &__left-icon-wrap { |
| | | margin-right: $u-cell-left-icon-wrap-margin-right; |
| | | } |
| | | |
| | | &__right-icon-wrap { |
| | | margin-left: $u-cell-right-icon-wrap-margin-left; |
| | | transition: transform 0.3s; |
| | | |
| | | &--up { |
| | | transform: rotate(-90deg); |
| | | } |
| | | |
| | | &--down { |
| | | transform: rotate(90deg); |
| | | } |
| | | } |
| | | |
| | | &__title { |
| | | flex: $u-cell-title-flex; |
| | | |
| | | &-text { |
| | | font-size: $u-cell-title-font-size; |
| | | line-height: $u-cell-title-line-height; |
| | | color: $u-cell-title-color; |
| | | |
| | | &--large { |
| | | font-size: $u-cell-title-font-size-large; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | &__label { |
| | | margin-top: $u-cell-label-margin-top; |
| | | font-size: $u-cell-label-font-size; |
| | | color: $u-cell-label-color; |
| | | line-height: $u-cell-label-line-height; |
| | | |
| | | &--large { |
| | | font-size: $u-cell-label-font-size-large; |
| | | } |
| | | } |
| | | |
| | | &__value { |
| | | text-align: right; |
| | | font-size: $u-cell-value-font-size; |
| | | line-height: $u-cell-line-height; |
| | | color: $u-cell-value-color; |
| | | |
| | | &--large { |
| | | font-size: $u-cell-value-font-size-large; |
| | | } |
| | | } |
| | | |
| | | &--clickable { |
| | | background-color: $u-cell-clickable-color; |
| | | } |
| | | |
| | | &--disabled { |
| | | color: $u-cell-disabled-color; |
| | | /* #ifndef APP-NVUE */ |
| | | cursor: not-allowed; |
| | | /* #endif */ |
| | | } |
| | | |
| | | &--center { |
| | | align-items: center; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ è¯ç¬¦ |
| | | name: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.name |
| | | }, |
| | | // ç»å®çå¼ |
| | | value: { |
| | | type: Array, |
| | | default: uni.$u.props.checkboxGroup.value |
| | | }, |
| | | // å½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.shape |
| | | }, |
| | | // æ¯å¦ç¦ç¨å
¨é¨checkbox |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.checkboxGroup.disabled |
| | | }, |
| | | |
| | | // éä¸ç¶æä¸çé¢è²ï¼å¦è®¾ç½®æ¤å¼ï¼å°ä¼è¦çparentçactiveColorå¼ |
| | | activeColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.activeColor |
| | | }, |
| | | // æªéä¸çé¢è² |
| | | inactiveColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.inactiveColor |
| | | }, |
| | | |
| | | // æ´ä¸ªç»ä»¶ç尺寸ï¼é»è®¤px |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkboxGroup.size |
| | | }, |
| | | // å¸å±æ¹å¼ï¼row-横åï¼column-纵å |
| | | placement: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.placement |
| | | }, |
| | | // labelçåä½å¤§å°ï¼pxåä½ |
| | | labelSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkboxGroup.labelSize |
| | | }, |
| | | // labelçåä½é¢è² |
| | | labelColor: { |
| | | type: [String], |
| | | default: uni.$u.props.checkboxGroup.labelColor |
| | | }, |
| | | // æ¯å¦ç¦æ¢ç¹å»ææ¬æä½ |
| | | labelDisabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.checkboxGroup.labelDisabled |
| | | }, |
| | | // 徿 é¢è² |
| | | iconColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.iconColor |
| | | }, |
| | | // 徿 ç大å°ï¼åä½px |
| | | iconSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkboxGroup.iconSize |
| | | }, |
| | | // å¾é徿 ç坹齿¹å¼ï¼left-左边ï¼right-å³è¾¹ |
| | | iconPlacement: { |
| | | type: String, |
| | | default: uni.$u.props.checkboxGroup.iconPlacement |
| | | }, |
| | | // ç«åé
åæ¶ï¼æ¯å¦æ¾ç¤ºä¸å线 |
| | | borderBottom: { |
| | | type: Boolean, |
| | | default: uni.$u.props.checkboxGroup.borderBottom |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-checkbox-group" |
| | | :class="bemClass" |
| | | > |
| | | <slot></slot> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * checkboxGroup å¤éæ¡ç» |
| | | * @description å¤éæ¡ç»ä»¶ä¸è¬ç¨äºéè¦å¤ä¸ªéæ©çåºæ¯ï¼è¯¥ç»ä»¶åè½å®æ´ï¼ä½¿ç¨æ¹ä¾¿ |
| | | * @tutorial https://www.uviewui.com/components/checkbox.html |
| | | * @property {String} name æ è¯ç¬¦ |
| | | * @property {Array} value ç»å®çå¼ |
| | | * @property {String} shape å½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ ï¼é»è®¤ 'square' ï¼ |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨å
¨é¨checkbox ï¼é»è®¤ false ï¼ |
| | | * @property {String} activeColor éä¸ç¶æä¸çé¢è²ï¼å¦è®¾ç½®æ¤å¼ï¼å°ä¼è¦çparentçactiveColorå¼ ï¼é»è®¤ '#2979ff' ï¼ |
| | | * @property {String} inactiveColor æªéä¸çé¢è² ï¼é»è®¤ '#c8c9cc' ï¼ |
| | | * @property {String | Number} size æ´ä¸ªç»ä»¶ç尺寸 åä½px ï¼é»è®¤ 18 ï¼ |
| | | * @property {String} placement å¸å±æ¹å¼ï¼row-横åï¼column-纵å ï¼é»è®¤ 'row' ï¼ |
| | | * @property {String | Number} labelSize labelçåä½å¤§å°ï¼pxåä½ ï¼é»è®¤ 14 ï¼ |
| | | * @property {String} labelColor labelçåä½é¢è² ï¼é»è®¤ '#303133' ï¼ |
| | | * @property {Boolean} labelDisabled æ¯å¦ç¦æ¢ç¹å»ææ¬æä½ (é»è®¤ false ) |
| | | * @property {String} iconColor 徿 é¢è² ï¼é»è®¤ '#ffffff' ï¼ |
| | | * @property {String | Number} iconSize 徿 ç大å°ï¼åä½px ï¼é»è®¤ 12 ï¼ |
| | | * @property {String} iconPlacement å¾é徿 ç坹齿¹å¼ï¼left-左边ï¼right-å³è¾¹ ï¼é»è®¤ 'left' ï¼ |
| | | * @property {Boolean} borderBottom placement为rowæ¶ï¼æ¯å¦æ¾ç¤ºä¸è¾¹æ¡ ï¼é»è®¤ false ï¼ |
| | | * @event {Function} change ä»»ä¸ä¸ªcheckboxç¶æåçååæ¶è§¦åï¼åè°ä¸ºä¸ä¸ªå¯¹è±¡ |
| | | * @event {Function} input ä¿®æ¹éè¿v-modelç»å®ç弿¶è§¦åï¼åè°ä¸ºä¸ä¸ªå¯¹è±¡ |
| | | * @example <u-checkbox-group></u-checkbox-group> |
| | | */ |
| | | export default { |
| | | name: 'u-checkbox-group', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | // è¿écomputedçåéï¼é½æ¯åç»ä»¶u-checkboxéè¦ç¨å°çï¼ç±äºå¤´æ¡å°ç¨åºçå
¼å®¹æ§å·®å¼ï¼åç»ä»¶æ æ³å®æ¶çå¬ç¶ç»ä»¶åæ°çåå |
| | | // æä»¥éè¦æå¨éç¥åç»ä»¶ï¼è¿éè¿åä¸ä¸ªparentDataåéï¼ä¾watchçå¬ï¼å¨å
¶ä¸å»éç¥æ¯ä¸ä¸ªåç»ä»¶éæ°ä»ç¶ç»ä»¶(u-checkbox-group) |
| | | // æåç¶ç»ä»¶æ°çåååçåæ° |
| | | parentData() { |
| | | return [this.value, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape, |
| | | this.iconSize, this.borderBottom, this.placement |
| | | ] |
| | | }, |
| | | bemClass() { |
| | | // this.bem为ä¸ä¸ªcomputedåéï¼å¨mixinä¸ |
| | | return this.bem('checkbox-group', ['placement']) |
| | | }, |
| | | }, |
| | | watch: { |
| | | // å½ç¶ç»ä»¶éè¦åç»ä»¶éè¦å
±äº«çåæ°åçäºååï¼æå¨éç¥åç»ä»¶ |
| | | parentData() { |
| | | if (this.children.length) { |
| | | this.children.map(child => { |
| | | // 夿åç»ä»¶(u-checkbox)妿æinitæ¹æ³çè¯ï¼å°±å°±æ§è¡(æ§è¡çç»ææ¯åç»ä»¶éæ°ä»ç¶ç»ä»¶æåäºææ°çå¼) |
| | | typeof(child.init) === 'function' && child.init() |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.children = [] |
| | | }, |
| | | methods: { |
| | | // å°å
¶ä»çcheckbox设置为æªéä¸çç¶æ |
| | | unCheckedOther(childInstance) { |
| | | const values = [] |
| | | this.children.map(child => { |
| | | // å°è¢«éä¸çcheckboxï¼æ¾å°æ°ç»ä¸è¿å |
| | | if (child.isChecked) { |
| | | values.push(child.name) |
| | | } |
| | | }) |
| | | // ååºäºä»¶ |
| | | this.$emit('change', values) |
| | | // ä¿®æ¹éè¿v-modelç»å®çå¼ |
| | | this.$emit('input', values) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-checkbox-group { |
| | | |
| | | &--row { |
| | | @include flex; |
| | | } |
| | | |
| | | &--column { |
| | | @include flex(column); |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // checkboxçåç§° |
| | | name: { |
| | | type: [String, Number, Boolean], |
| | | default: uni.$u.props.checkbox.name |
| | | }, |
| | | // å½¢ç¶ï¼square为æ¹å½¢ï¼circle为åå |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.checkbox.shape |
| | | }, |
| | | // æ´ä½çå¤§å° |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkbox.size |
| | | }, |
| | | // æ¯å¦é»è®¤éä¸ |
| | | checked: { |
| | | type: Boolean, |
| | | default: uni.$u.props.checkbox.checked |
| | | }, |
| | | // æ¯å¦ç¦ç¨ |
| | | disabled: { |
| | | type: [String, Boolean], |
| | | default: uni.$u.props.checkbox.disabled |
| | | }, |
| | | // éä¸ç¶æä¸çé¢è²ï¼å¦è®¾ç½®æ¤å¼ï¼å°ä¼è¦çparentçactiveColorå¼ |
| | | activeColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkbox.activeColor |
| | | }, |
| | | // æªéä¸çé¢è² |
| | | inactiveColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkbox.inactiveColor |
| | | }, |
| | | // 徿 ç大å°ï¼åä½px |
| | | iconSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkbox.iconSize |
| | | }, |
| | | // 徿 é¢è² |
| | | iconColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkbox.iconColor |
| | | }, |
| | | // labelæç¤ºæåï¼å 为nvueä¸ï¼ç´æ¥slotè¿æ¥çæåï¼ç±äºç¹æ®çç»æï¼æ æ³ä¿®æ¹æ ·å¼ |
| | | label: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkbox.label |
| | | }, |
| | | // labelçåä½å¤§å°ï¼pxåä½ |
| | | labelSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.checkbox.labelSize |
| | | }, |
| | | // labelçé¢è² |
| | | labelColor: { |
| | | type: String, |
| | | default: uni.$u.props.checkbox.labelColor |
| | | }, |
| | | // æ¯å¦ç¦æ¢ç¹å»æç¤ºè¯éä¸å¤éæ¡ |
| | | labelDisabled: { |
| | | type: [String, Boolean], |
| | | default: uni.$u.props.checkbox.labelDisabled |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-checkbox" |
| | | :style="[checkboxStyle]" |
| | | @tap.stop="wrapperClickHandler" |
| | | :class="[`u-checkbox-label--${parentData.iconPlacement}`, parentData.borderBottom && parentData.placement === 'column' && 'u-border-bottom']" |
| | | > |
| | | <view |
| | | class="u-checkbox__icon-wrap" |
| | | @tap.stop="iconClickHandler" |
| | | :class="iconClasses" |
| | | :style="[iconWrapStyle]" |
| | | > |
| | | <slot name="icon"> |
| | | <u-icon |
| | | class="u-checkbox__icon-wrap__icon" |
| | | name="checkbox-mark" |
| | | :size="elIconSize" |
| | | :color="elIconColor" |
| | | /> |
| | | </slot> |
| | | </view> |
| | | <text |
| | | @tap.stop="labelClickHandler" |
| | | :style="{ |
| | | color: elDisabled ? elInactiveColor : elLabelColor, |
| | | fontSize: elLabelSize, |
| | | lineHeight: elLabelSize |
| | | }" |
| | | >{{label}}</text> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * checkbox å¤éæ¡ |
| | | * @description å¤éæ¡ç»ä»¶ä¸è¬ç¨äºéè¦å¤ä¸ªéæ©çåºæ¯ï¼è¯¥ç»ä»¶åè½å®æ´ï¼ä½¿ç¨æ¹ä¾¿ |
| | | * @tutorial https://uviewui.com/components/checkbox.html |
| | | * @property {String | Number | Boolean} name checkboxç»ä»¶çæ 示符 |
| | | * @property {String} shape å½¢ç¶ï¼square为æ¹å½¢ï¼circle为åå |
| | | * @property {String | Number} size æ´ä½çå¤§å° |
| | | * @property {Boolean} checked æ¯å¦é»è®¤éä¸ |
| | | * @property {String | Boolean} disabled æ¯å¦ç¦ç¨ |
| | | * @property {String} activeColor éä¸ç¶æä¸çé¢è²ï¼å¦è®¾ç½®æ¤å¼ï¼å°ä¼è¦çparentçactiveColorå¼ |
| | | * @property {String} inactiveColor æªéä¸çé¢è² |
| | | * @property {String | Number} iconSize 徿 ç大å°ï¼åä½px |
| | | * @property {String} iconColor 徿 é¢è² |
| | | * @property {String | Number} label labelæç¤ºæåï¼å 为nvueä¸ï¼ç´æ¥slotè¿æ¥çæåï¼ç±äºç¹æ®çç»æï¼æ æ³ä¿®æ¹æ ·å¼ |
| | | * @property {String} labelColor labelçé¢è² |
| | | * @property {String | Number} labelSize labelçåä½å¤§å°ï¼pxåä½ |
| | | * @property {String | Boolean} labelDisabled æ¯å¦ç¦æ¢ç¹å»æç¤ºè¯éä¸å¤éæ¡ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} change ä»»ä¸ä¸ªcheckboxç¶æåçååæ¶è§¦åï¼åè°ä¸ºä¸ä¸ªå¯¹è±¡ |
| | | * @example <u-checkbox v-model="checked" :disabled="false">天涯</u-checkbox> |
| | | */ |
| | | export default { |
| | | name: "u-checkbox", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | isChecked: false, |
| | | // ç¶ç»ä»¶çé»è®¤å¼ï¼å 为头æ¡å°ç¨åºä¸æ¯æå¨computedä¸ä½¿ç¨this.parent.shapeçå½¢å¼ |
| | | // æ
åªè½ä½¿ç¨å¦æ¤æ¹æ³ |
| | | parentData: { |
| | | iconSize: 12, |
| | | labelDisabled: null, |
| | | disabled: null, |
| | | shape: 'square', |
| | | activeColor: null, |
| | | inactiveColor: null, |
| | | size: 18, |
| | | value: null, |
| | | iconColor: null, |
| | | placement: 'row', |
| | | borderBottom: false, |
| | | iconPlacement: 'left' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // æ¯å¦ç¦ç¨ï¼å¦æç¶ç»ä»¶u-raios-groupç¦ç¨çè¯ï¼å°ä¼å¿½ç¥åç»ä»¶çé
ç½® |
| | | elDisabled() { |
| | | return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; |
| | | }, |
| | | // æ¯å¦ç¦ç¨labelç¹å» |
| | | elLabelDisabled() { |
| | | return this.labelDisabled !== '' ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : |
| | | false; |
| | | }, |
| | | // ç»ä»¶å°ºå¯¸ï¼å¯¹åºsizeçå¼ï¼é»è®¤å¼ä¸º21px |
| | | elSize() { |
| | | return this.size ? this.size : (this.parentData.size ? this.parentData.size : 21); |
| | | }, |
| | | // ç»ä»¶çå¾é徿 ç尺寸ï¼é»è®¤12px |
| | | elIconSize() { |
| | | return this.iconSize ? this.iconSize : (this.parentData.iconSize ? this.parentData.iconSize : 12); |
| | | }, |
| | | // ç»ä»¶é䏿¿æ´»æ¶çé¢è² |
| | | elActiveColor() { |
| | | return this.activeColor ? this.activeColor : (this.parentData.activeColor ? this.parentData.activeColor : '#2979ff'); |
| | | }, |
| | | // ç»ä»¶éæªä¸æ¿æ´»æ¶çé¢è² |
| | | elInactiveColor() { |
| | | return this.inactiveColor ? this.inactiveColor : (this.parentData.inactiveColor ? this.parentData.inactiveColor : |
| | | '#c8c9cc'); |
| | | }, |
| | | // labelçé¢è² |
| | | elLabelColor() { |
| | | return this.labelColor ? this.labelColor : (this.parentData.labelColor ? this.parentData.labelColor : '#606266') |
| | | }, |
| | | // ç»ä»¶çå½¢ç¶ |
| | | elShape() { |
| | | return this.shape ? this.shape : (this.parentData.shape ? this.parentData.shape : 'circle'); |
| | | }, |
| | | // labelå¤§å° |
| | | elLabelSize() { |
| | | return uni.$u.addUnit(this.labelSize ? this.labelSize : (this.parentData.labelSize ? this.parentData.labelSize : |
| | | '15')) |
| | | }, |
| | | elIconColor() { |
| | | const iconColor = this.iconColor ? this.iconColor : (this.parentData.iconColor ? this.parentData.iconColor : |
| | | '#ffffff'); |
| | | // 徿 çé¢è² |
| | | if (this.elDisabled) { |
| | | // disabledç¶æä¸ï¼å·²å¾éçcheckbox徿 æ¹ä¸ºelInactiveColor |
| | | return this.isChecked ? this.elInactiveColor : 'transparent' |
| | | } else { |
| | | return this.isChecked ? iconColor : 'transparent' |
| | | } |
| | | }, |
| | | iconClasses() { |
| | | let classes = [] |
| | | // ç»ä»¶çå½¢ç¶ |
| | | classes.push('u-checkbox__icon-wrap--' + this.elShape) |
| | | if (this.elDisabled) { |
| | | classes.push('u-checkbox__icon-wrap--disabled') |
| | | } |
| | | if (this.isChecked && this.elDisabled) { |
| | | classes.push('u-checkbox__icon-wrap--disabled--checked') |
| | | } |
| | | // æ¯ä»å®ï¼å¤´æ¡å°ç¨åºæ æ³å¨æç»å®ä¸ä¸ªæ°ç»ç±»åï¼å¦åè§£æåºæ¥çç»æä¼å¸¦æ","ï¼è导è´å¤±æ |
| | | // #ifdef MP-ALIPAY || MP-TOUTIAO |
| | | classes = classes.join(' ') |
| | | // #endif |
| | | return classes |
| | | }, |
| | | iconWrapStyle() { |
| | | // checkboxçæ´ä½æ ·å¼ |
| | | const style = {} |
| | | style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : '#ffffff' |
| | | style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor |
| | | style.width = uni.$u.addUnit(this.elSize) |
| | | style.height = uni.$u.addUnit(this.elSize) |
| | | // 妿æ¯å¾æ å¨å³è¾¹çè¯ï¼ç§»é¤å®çå³è¾¹è· |
| | | if (this.parentData.iconPlacement === 'right') { |
| | | style.marginRight = 0 |
| | | } |
| | | return style |
| | | }, |
| | | checkboxStyle() { |
| | | const style = {} |
| | | if (this.parentData.borderBottom && this.parentData.placement === 'row') { |
| | | uni.$u.error('æ£æµå°æ¨å°borderBottom设置为trueï¼éè¦åæ¶å°u-checkbox-groupçplacement设置为columnæææ') |
| | | } |
| | | // å½ç¶ç»ä»¶è®¾ç½®äºæ¾ç¤ºä¸è¾¹æ¡å¹¶ä¸æåå½¢å¼ä¸ºçºµåæ¶ï¼ç»å
容åè¾¹æ¡ä¹é´å ä¸ä¸å®é´é |
| | | if (this.parentData.borderBottom && this.parentData.placement === 'column') { |
| | | style.paddingBottom = '8px' |
| | | } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // æ¯ä»å®å°ç¨åºä¸æ¯æprovide/injectï¼æä»¥ä½¿ç¨è¿ä¸ªæ¹æ³è·åæ´ä¸ªç¶ç»ä»¶ï¼å¨createdå®ä¹ï¼é¿å
循ç¯å¼ç¨ |
| | | this.updateParentData() |
| | | if (!this.parent) { |
| | | uni.$u.error('u-checkboxå¿
é¡»æé
u-checkbox-groupç»ä»¶ä½¿ç¨') |
| | | } |
| | | // 设置åå§åæ¶ï¼æ¯å¦é»è®¤éä¸çç¶æï¼ç¶ç»ä»¶u-checkbox-groupçvalueå¯è½æ¯arrayï¼æä»¥é¢å¤å¤æ |
| | | if (this.checked) { |
| | | this.isChecked = true |
| | | } else if (uni.$u.test.array(this.parentData.value)) { |
| | | // æ¥æ¾æ°ç»æ¯æ¯å¦åå¨this.nameå
ç´ å¼ |
| | | this.isChecked = this.parentData.value.some(item => { |
| | | return item === this.name |
| | | }) |
| | | } |
| | | }, |
| | | updateParentData() { |
| | | this.getParentData('u-checkbox-group') |
| | | }, |
| | | // 横å两端æåæ¶ï¼ç¹å»ç»ä»¶å³å¯è§¦åéä¸äºä»¶ |
| | | wrapperClickHandler(e) { |
| | | this.parentData.iconPlacement === 'right' && this.iconClickHandler(e) |
| | | }, |
| | | // ç¹å»å¾æ |
| | | iconClickHandler(e) { |
| | | this.preventEvent(e) |
| | | // 妿æ´ä½è¢«ç¦ç¨ï¼ä¸å
许被ç¹å» |
| | | if (!this.elDisabled) { |
| | | this.setRadioCheckedStatus() |
| | | } |
| | | }, |
| | | // ç¹å»label |
| | | labelClickHandler(e) { |
| | | this.preventEvent(e) |
| | | // 妿æé®æ´ä½è¢«ç¦ç¨æè
label被ç¦ç¨ï¼åä¸å
许ç¹å»æåä¿®æ¹ç¶æ |
| | | if (!this.elLabelDisabled && !this.elDisabled) { |
| | | this.setRadioCheckedStatus() |
| | | } |
| | | }, |
| | | emitEvent() { |
| | | this.$emit('change', this.isChecked) |
| | | // å°è¯è°ç¨u-formçéªè¯æ¹æ³ï¼è¿è¡ä¸å®å»¶è¿ï¼å¦å微信å°ç¨åºæ´æ°å¯è½ä¼ä¸åæ¶ |
| | | this.$nextTick(() => { |
| | | uni.$u.formValidate(this, 'change') |
| | | }) |
| | | }, |
| | | // æ¹åç»ä»¶éä¸ç¶æ |
| | | // è¿éçæ¹åç便®æ¯ï¼æ´æ¹æ¬ç»ä»¶çcheckedå¼ä¸ºtrueï¼åæ¶éè¿ç¶ç»ä»¶éåææu-checkboxå®ä¾ |
| | | // å°æ¬ç»ä»¶å¤çå
¶ä»u-checkboxçcheckedé½è®¾ç½®ä¸ºfalse(é½è¢«åæ¶éä¸ç¶æ)ï¼å èåªå©ä¸ä¸ä¸ªä¸ºéä¸ç¶æ |
| | | setRadioCheckedStatus() { |
| | | // å°æ¬ç»ä»¶æ 记为ä¸åæ¥ç¸åçç¶æ |
| | | this.isChecked = !this.isChecked |
| | | this.emitEvent() |
| | | typeof this.parent.unCheckedOther === 'function' && this.parent.unCheckedOther(this) |
| | | } |
| | | }, |
| | | watch:{ |
| | | checked(){ |
| | | this.isChecked = this.checked |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-checkbox-icon-wrap-margin-right:6px !default; |
| | | $u-checkbox-icon-wrap-font-size:6px !default; |
| | | $u-checkbox-icon-wrap-border-width:1px !default; |
| | | $u-checkbox-icon-wrap-border-color:#c8c9cc !default; |
| | | $u-checkbox-icon-wrap-icon-line-height:0 !default; |
| | | $u-checkbox-icon-wrap-circle-border-radius:100% !default; |
| | | $u-checkbox-icon-wrap-square-border-radius:3px !default; |
| | | $u-checkbox-icon-wrap-checked-color:#fff !default; |
| | | $u-checkbox-icon-wrap-checked-background-color:red !default; |
| | | $u-checkbox-icon-wrap-checked-border-color:#2979ff !default; |
| | | $u-checkbox-icon-wrap-disabled-background-color:#ebedf0 !default; |
| | | $u-checkbox-icon-wrap-disabled-checked-color:#c8c9cc !default; |
| | | $u-checkbox-label-margin-left:5px !default; |
| | | $u-checkbox-label-margin-right:12px !default; |
| | | $u-checkbox-label-color:$u-content-color !default; |
| | | $u-checkbox-label-font-size:15px !default; |
| | | $u-checkbox-label-disabled-color:#c8c9cc !default; |
| | | |
| | | .u-checkbox { |
| | | /* #ifndef APP-NVUE */ |
| | | @include flex(row); |
| | | /* #endif */ |
| | | overflow: hidden; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | &-label--left { |
| | | flex-direction: row |
| | | } |
| | | |
| | | &-label--right { |
| | | flex-direction: row-reverse; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | &__icon-wrap { |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | // nvueä¸ï¼border-colorè¿æ¸¡æé®é¢ |
| | | transition-property: border-color, background-color, color; |
| | | transition-duration: 0.2s; |
| | | /* #endif */ |
| | | color: $u-content-color; |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: transparent; |
| | | text-align: center; |
| | | margin-right: $u-checkbox-icon-wrap-margin-right; |
| | | |
| | | font-size: $u-checkbox-icon-wrap-font-size; |
| | | border-width: $u-checkbox-icon-wrap-border-width; |
| | | border-color: $u-checkbox-icon-wrap-border-color; |
| | | border-style: solid; |
| | | |
| | | /* #ifdef MP-TOUTIAO */ |
| | | // 头æ¡å°ç¨åºå
¼å®¹æ§é®é¢ï¼éè¦è®¾ç½®è¡é«ä¸º0ï¼å¦å徿 åä¸ |
| | | &__icon { |
| | | line-height: $u-checkbox-icon-wrap-icon-line-height; |
| | | } |
| | | |
| | | /* #endif */ |
| | | |
| | | &--circle { |
| | | border-radius: $u-checkbox-icon-wrap-circle-border-radius; |
| | | } |
| | | |
| | | &--square { |
| | | border-radius: $u-checkbox-icon-wrap-square-border-radius; |
| | | } |
| | | |
| | | &--checked { |
| | | color: $u-checkbox-icon-wrap-checked-color; |
| | | background-color: $u-checkbox-icon-wrap-checked-background-color; |
| | | border-color: $u-checkbox-icon-wrap-checked-border-color; |
| | | } |
| | | |
| | | &--disabled { |
| | | background-color: $u-checkbox-icon-wrap-disabled-background-color !important; |
| | | } |
| | | |
| | | &--disabled--checked { |
| | | color: $u-checkbox-icon-wrap-disabled-checked-color !important; |
| | | } |
| | | } |
| | | |
| | | &__label { |
| | | /* #ifndef APP-NVUE */ |
| | | word-wrap: break-word; |
| | | /* #endif */ |
| | | margin-left: $u-checkbox-label-margin-left; |
| | | margin-right: $u-checkbox-label-margin-right; |
| | | color: $u-checkbox-label-color; |
| | | font-size: $u-checkbox-label-font-size; |
| | | |
| | | &--disabled { |
| | | color: $u-checkbox-label-disabled-color; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | percentage: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.circleProgress.percentage |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-circle-progress"> |
| | | <view class="u-circle-progress__left"> |
| | | <view |
| | | class="u-circle-progress__left__circle" |
| | | :style="[leftSyle]" |
| | | ref="left-circle" |
| | | > |
| | | |
| | | </view> |
| | | </view> |
| | | <view |
| | | class="u-circle-progress__right" |
| | | > |
| | | <view |
| | | class="u-circle-progress__right__circle" |
| | | ref="right-circle" |
| | | :style="[rightSyle]" |
| | | > |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="u-circle-progress__circle"> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | const animation = uni.requireNativePlugin('animation') |
| | | // #endif |
| | | /** |
| | | * CircleProgress åå½¢è¿åº¦æ¡ TODO: å¾
å®å |
| | | * @description å±ç¤ºæä½æä»»å¡çå½åè¿åº¦ï¼æ¯å¦ä¸ä¼ æä»¶ï¼æ¯ä¸ä¸ªåå½¢çè¿åº¦ç¯ã |
| | | * @tutorial https://www.uviewui.com/components/circleProgress.html |
| | | * @property {String | Number} percentage åç¯è¿åº¦ç¾åæ¯å¼ï¼ä¸ºæ°å¼ç±»åï¼0-100 (é»è®¤ 30 ) |
| | | * @example |
| | | */ |
| | | export default { |
| | | name: 'u-circle-progress', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | leftBorderColor: 'rgb(200, 200, 200)', |
| | | rightBorderColor: 'rgb(200, 200, 200)', |
| | | } |
| | | }, |
| | | computed: { |
| | | leftSyle() { |
| | | const style = {} |
| | | style.borderTopColor = this.leftBorderColor |
| | | style.borderRightColor = this.leftBorderColor |
| | | return style |
| | | }, |
| | | rightSyle() { |
| | | const style = {} |
| | | style.borderLeftColor = this.rightBorderColor |
| | | style.borderBottomColor = this.rightBorderColor |
| | | return style |
| | | } |
| | | }, |
| | | mounted() { |
| | | uni.$u.sleep().then(() => { |
| | | this.rightBorderColor = 'rgb(66, 185, 131)' |
| | | // this.init() |
| | | }) |
| | | }, |
| | | methods: { |
| | | init() { |
| | | animation.transition(this.$refs['right-circle'].ref, { |
| | | styles: { |
| | | transform: 'rotate(45deg)', |
| | | transformOrigin: 'center center' |
| | | }, |
| | | }, () => { |
| | | this.rightBorderColor = 'rgb(66, 185, 131)' |
| | | // animation.transition(this.$refs['right-circle'].ref, { |
| | | // styles: { |
| | | // transform: 'rotate(225deg)', |
| | | // transformOrigin: 'center center' |
| | | // }, |
| | | // duration: 3000, |
| | | // }, () => { |
| | | // animation.transition(this.$refs['left-circle'].ref, { |
| | | // styles: { |
| | | // transform: 'rotate(45deg)', |
| | | // transformOrigin: 'center center' |
| | | // }, |
| | | // }, () => { |
| | | // this.leftBorderColor = 'rgb(66, 185, 131)' |
| | | // animation.transition(this.$refs['left-circle'].ref, { |
| | | // styles: { |
| | | // transform: 'rotate(225deg)', |
| | | // transformOrigin: 'center center' |
| | | // }, |
| | | // duration: 1500, |
| | | // }, () => { |
| | | |
| | | // }) |
| | | // }) |
| | | // }) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-circle-progress { |
| | | @include flex(row); |
| | | position: relative; |
| | | border-radius: 100px; |
| | | height: 100px; |
| | | width: 100px; |
| | | // transform: rotate(0deg); |
| | | // background-color: rgb(66, 185, 131); |
| | | background-color: rgb(200, 200, 200); |
| | | overflow: hidden; |
| | | justify-content: space-between; |
| | | |
| | | &__circle { |
| | | border-radius: 100px; |
| | | height: 90px; |
| | | width: 90px; |
| | | transform: translate(-50%, -50%); |
| | | background-color: rgb(255, 255, 255); |
| | | left: 50px; |
| | | top: 50px; |
| | | position: absolute; |
| | | } |
| | | |
| | | &__left { |
| | | position: absolute; |
| | | left: 0; |
| | | width: 50px; |
| | | height: 100px; |
| | | overflow: hidden; |
| | | box-sizing: border-box; |
| | | // background-color: rgb(66, 185, 131); |
| | | // background-color: rgb(200, 200, 200); |
| | | // transform-origin: left center; |
| | | |
| | | &__circle { |
| | | box-sizing: border-box; |
| | | // background-color: red; |
| | | border-left-color: transparent; |
| | | border-bottom-color: transparent; |
| | | border-top-left-radius: 50px; |
| | | border-top-right-radius: 50px; |
| | | border-bottom-right-radius: 50px; |
| | | // border-left-color: rgb(66, 185, 131); |
| | | // border-bottom-color: rgb(66, 185, 131); |
| | | border-top-color: rgb(66, 185, 131); |
| | | border-right-color: rgb(66, 185, 131); |
| | | border-width: 5px; |
| | | width: 100px; |
| | | height: 100px; |
| | | transform: rotate(225deg); |
| | | // border-radius: 100px; |
| | | } |
| | | } |
| | | |
| | | &__right { |
| | | position: absolute; |
| | | right: 0; |
| | | width: 50px; |
| | | height: 100px; |
| | | overflow: hidden; |
| | | |
| | | &__circle { |
| | | position: absolute; |
| | | right: 0; |
| | | box-sizing: border-box; |
| | | // background-color: red; |
| | | border-top-color: transparent; |
| | | border-right-color: transparent; |
| | | border-top-left-radius: 50px; |
| | | border-bottom-left-radius: 50px; |
| | | border-bottom-right-radius: 50px; |
| | | // border-left-color: rgb(66, 185, 131); |
| | | // border-bottom-color: rgb(66, 185, 131); |
| | | border-left-color: rgb(200, 200, 200); |
| | | border-bottom-color: rgb(200, 200, 200); |
| | | border-width: 5px; |
| | | width: 100px; |
| | | height: 100px; |
| | | transform: rotate(45deg); |
| | | transform-origin: center center; |
| | | // border-radius: 100px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æå¤§è¾å
¥é¿åº¦ |
| | | maxlength: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.codeInput.maxlength |
| | | }, |
| | | // æ¯å¦ç¨åç¹å¡«å
|
| | | dot: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.dot |
| | | }, |
| | | // æ¾ç¤ºæ¨¡å¼ï¼box-ç忍¡å¼ï¼line-åºé¨æ¨ªçº¿æ¨¡å¼ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.codeInput.mode |
| | | }, |
| | | // æ¯å¦ç»è¾¹æ¡ |
| | | hairline: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.hairline |
| | | }, |
| | | // å符é´çè·ç¦» |
| | | space: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.codeInput.space |
| | | }, |
| | | // é¢ç½®å¼ |
| | | value: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.codeInput.value |
| | | }, |
| | | // æ¯å¦èªå¨è·åç¦ç¹ |
| | | focus: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.focus |
| | | }, |
| | | // å使¯å¦å ç² |
| | | bold: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.bold |
| | | }, |
| | | // åä½é¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.codeInput.color |
| | | }, |
| | | // åä½å¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.codeInput.fontSize |
| | | }, |
| | | // è¾å
¥æ¡ç大å°ï¼å®½çäºé« |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.codeInput.size |
| | | }, |
| | | // æ¯å¦éèåçé®çï¼å¦ææ³ç¨èªå®ä¹é®ççè¯ï¼é设置æ¤åæ°ä¸ºtrue |
| | | disabledKeyboard: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.disabledKeyboard |
| | | }, |
| | | // è¾¹æ¡å线æ¡é¢è² |
| | | borderColor: { |
| | | type: String, |
| | | default: uni.$u.props.codeInput.borderColor |
| | | }, |
| | | // æ¯å¦ç¦æ¢è¾å
¥"."ç¬¦å· |
| | | disabledDot: { |
| | | type: Boolean, |
| | | default: uni.$u.props.codeInput.disabledDot |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-code-input"> |
| | | <view |
| | | class="u-code-input__item" |
| | | :style="[itemStyle(index)]" |
| | | v-for="(item, index) in codeLength" |
| | | :key="index" |
| | | > |
| | | <view |
| | | class="u-code-input__item__dot" |
| | | v-if="dot && codeArray.length > index" |
| | | ></view> |
| | | <text |
| | | v-else |
| | | :style="{ |
| | | fontSize: $u.addUnit(fontSize), |
| | | fontWeight: bold ? 'bold' : 'normal', |
| | | color: color |
| | | }" |
| | | >{{codeArray[index]}}</text> |
| | | <view |
| | | class="u-code-input__item__line" |
| | | v-if="mode === 'line'" |
| | | :style="[lineStyle]" |
| | | ></view> |
| | | <!-- #ifndef APP-PLUS --> |
| | | <view v-if="isFocus && codeArray.length === index" :style="{backgroundColor: color}" class="u-code-input__item__cursor"></view> |
| | | <!-- #endif --> |
| | | </view> |
| | | <input |
| | | :disabled="disabledKeyboard" |
| | | type="number" |
| | | :focus="focus" |
| | | :value="inputValue" |
| | | :maxlength="maxlength" |
| | | class="u-code-input__input" |
| | | @input="inputHandler" |
| | | :style="{ |
| | | height: $u.addUnit(size) |
| | | }" |
| | | @focus="isFocus = true" |
| | | @blur="isFocus = false" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * CodeInput éªè¯ç è¾å
¥ |
| | | * @description 该ç»ä»¶ä¸è¬ç¨äºéªè¯ç¨æ·çä¿¡éªè¯ç çåºæ¯ï¼ä¹å¯ä»¥ç»åuViewçé®çç»ä»¶ä½¿ç¨ |
| | | * @tutorial https://www.uviewui.com/components/codeInput.html |
| | | * @property {String | Number} maxlength æå¤§è¾å
¥é¿åº¦ ï¼é»è®¤ 6 ï¼ |
| | | * @property {Boolean} dot æ¯å¦ç¨åç¹å¡«å
ï¼é»è®¤ false ï¼ |
| | | * @property {String} mode æ¾ç¤ºæ¨¡å¼ï¼box-ç忍¡å¼ï¼line-åºé¨æ¨ªçº¿æ¨¡å¼ ï¼é»è®¤ 'box' ï¼ |
| | | * @property {Boolean} hairline æ¯å¦ç»è¾¹æ¡ ï¼é»è®¤ false ï¼ |
| | | * @property {String | Number} space å符é´çè·ç¦» ï¼é»è®¤ 10 ï¼ |
| | | * @property {String | Number} value é¢ç½®å¼ |
| | | * @property {Boolean} focus æ¯å¦èªå¨è·åç¦ç¹ ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} bold åä½åè¾å
¥æ¨ªçº¿æ¯å¦å ç² ï¼é»è®¤ false ï¼ |
| | | * @property {String} color åä½é¢è² ï¼é»è®¤ '#606266' ï¼ |
| | | * @property {String | Number} fontSize åä½å¤§å°ï¼åä½px ï¼é»è®¤ 18 ï¼ |
| | | * @property {String | Number} size è¾å
¥æ¡ç大å°ï¼å®½çäºé« ï¼é»è®¤ 35 ï¼ |
| | | * @property {Boolean} disabledKeyboard æ¯å¦éèåçé®çï¼å¦ææ³ç¨èªå®ä¹é®ççè¯ï¼é设置æ¤åæ°ä¸ºtrue ï¼é»è®¤ false ï¼ |
| | | * @property {String} borderColor è¾¹æ¡å线æ¡é¢è² ï¼é»è®¤ '#c9cacc' ï¼ |
| | | * @property {Boolean} disabledDot æ¯å¦ç¦æ¢è¾å
¥"."ç¬¦å· ï¼é»è®¤ true ï¼ |
| | | * |
| | | * @event {Function} change è¾å
¥å
容åçæ¹åæ¶è§¦åï¼å
·ä½è§ä¸æ¹è¯´æ valueï¼å½åè¾å
¥çå¼ |
| | | * @event {Function} finish è¾å
¥å符个æ°è¾¾maxlength弿¶è§¦åï¼è§ä¸æ¹è¯´æ valueï¼å½åè¾å
¥çå¼ |
| | | * @example <u-code-input v-model="value4" :focus="true"></u-code-input> |
| | | */ |
| | | export default { |
| | | name: 'u-code-input', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | inputValue: '', |
| | | isFocus: this.focus |
| | | } |
| | | }, |
| | | watch: { |
| | | value: { |
| | | immediate: true, |
| | | handler(val) { |
| | | // 转为å符串ï¼è¶
åºé¨åæªæ |
| | | this.inputValue = String(val).substring(0, this.maxlength) |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | // æ ¹æ®é¿åº¦ï¼å¾ªç¯è¾å
¥æ¡ç个æ°ï¼å 为头æ¡å°ç¨åºæ°å¼ä¸è½ç¨äºv-for |
| | | codeLength() { |
| | | return new Array(Number(this.maxlength)) |
| | | }, |
| | | // 循ç¯itemçæ ·å¼ |
| | | itemStyle() { |
| | | return index => { |
| | | const addUnit = uni.$u.addUnit |
| | | const style = { |
| | | width: addUnit(this.size), |
| | | height: addUnit(this.size) |
| | | } |
| | | // ç忍¡å¼ä¸ï¼éè¦é¢å¤è¿è¡å¤ç |
| | | if (this.mode === 'box') { |
| | | // 设置çåçè¾¹æ¡ï¼å¦ææ¯ç»è¾¹æ¡ï¼å设置为0.5px宽度 |
| | | style.border = `${this.hairline ? 0.5 : 1}px solid ${this.borderColor}` |
| | | // 妿çåé´è·ä¸º0çè¯ |
| | | if (uni.$u.getPx(this.space) === 0) { |
| | | // ç»ç¬¬ä¸åæåä¸ä¸ªçå设置åè§ |
| | | if (index === 0) { |
| | | style.borderTopLeftRadius = '3px' |
| | | style.borderBottomLeftRadius = '3px' |
| | | } |
| | | if (index === this.codeLength.length - 1) { |
| | | style.borderTopRightRadius = '3px' |
| | | style.borderBottomRightRadius = '3px' |
| | | } |
| | | // æåä¸ä¸ªçåçå³è¾¹æ¡éè¦ä¿ç |
| | | if (index !== this.codeLength.length - 1) { |
| | | style.borderRight = 'none' |
| | | } |
| | | } |
| | | } |
| | | if (index !== this.codeLength.length - 1) { |
| | | // 设置éªè¯ç å符ä¹é´çè·ç¦»ï¼éè¿margin-rightè®¾ç½®ï¼æåä¸ä¸ªåç¬¦ï¼æ éå³è¾¹æ¡ |
| | | style.marginRight = addUnit(this.space) |
| | | } else { |
| | | // æåä¸ä¸ªçåçæè¾¹æ¡éè¦ä¿ç |
| | | style.marginRight = 0 |
| | | } |
| | | |
| | | return style |
| | | } |
| | | }, |
| | | // å°è¾å
¥çå¼ï¼è½¬ä¸ºæ°ç»ï¼ç»itemåéæ¶ï¼æ ¹æ®å½åçç´¢å¼æ¾ç¤ºæ°ç»çå
ç´ |
| | | codeArray() { |
| | | return String(this.inputValue).split('') |
| | | }, |
| | | // ä¸å线模å¼ä¸ï¼æ¨ªçº¿çæ ·å¼ |
| | | lineStyle() { |
| | | const style = {} |
| | | style.height = this.hairline ? '2px' : '4px' |
| | | style.width = uni.$u.addUnit(this.size) |
| | | // çº¿æ¡æ¨¡å¼ä¸ï¼èæ¯è²å³ä¸ºè¾¹æ¡é¢è² |
| | | style.backgroundColor = this.borderColor |
| | | return style |
| | | } |
| | | }, |
| | | methods: { |
| | | // çå¬è¾å
¥æ¡çå¼åçåå |
| | | inputHandler(e) { |
| | | const value = e.detail.value |
| | | this.inputValue = value |
| | | // æ¯å¦å
许è¾å
¥â.âç¬¦å· |
| | | if(this.disabledDot) { |
| | | this.$nextTick(() => { |
| | | this.inputValue = value.replace('.', '') |
| | | }) |
| | | } |
| | | // æªè¾¾å°maxlengthä¹åï¼åéchangeäºä»¶ï¼è¾¾å°ååéfinishäºä»¶ |
| | | this.$emit('change', value) |
| | | // ä¿®æ¹éè¿v-modelååç»å®çå¼ |
| | | this.$emit('input', value) |
| | | // è¾¾å°ç¨æ·æå®è¾å
¥é¿åº¦æ¶ï¼ååºå®æäºä»¶ |
| | | if (String(value).length >= Number(this.maxlength)) { |
| | | this.$emit('finish', value) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-code-input-cursor-width: 1px; |
| | | $u-code-input-cursor-height: 40%; |
| | | $u-code-input-cursor-animation-duration: 1s; |
| | | $u-code-input-cursor-animation-name: u-cursor-flicker; |
| | | |
| | | .u-code-input { |
| | | @include flex; |
| | | position: relative; |
| | | overflow: hidden; |
| | | |
| | | &__item { |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | position: relative; |
| | | |
| | | &__text { |
| | | font-size: 15px; |
| | | color: $u-content-color; |
| | | } |
| | | |
| | | &__dot { |
| | | width: 7px; |
| | | height: 7px; |
| | | border-radius: 100px; |
| | | background-color: $u-content-color; |
| | | } |
| | | |
| | | &__line { |
| | | position: absolute; |
| | | bottom: 0; |
| | | height: 4px; |
| | | border-radius: 100px; |
| | | width: 40px; |
| | | background-color: $u-content-color; |
| | | } |
| | | /* #ifndef APP-PLUS */ |
| | | &__cursor { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%,-50%); |
| | | width: $u-code-input-cursor-width; |
| | | height: $u-code-input-cursor-height; |
| | | animation: $u-code-input-cursor-animation-duration u-cursor-flicker infinite; |
| | | } |
| | | /* #endif */ |
| | | |
| | | } |
| | | |
| | | &__input { |
| | | // 乿以éè¦inputè¾å
¥æ¡ï¼æ¯å 为æå®æè½å¤èµ·é®ç |
| | | // è¿éå°å®è®¾ç½®ä¸ºä¸¤åçå±å¹å®½åº¦ï¼åå°å·¦è¾¹çä¸åç§»åºå±å¹ï¼ä¸ºäºä¸è®©ç¨æ·çå°è¾å
¥çå
容 |
| | | position: absolute; |
| | | left: -750rpx; |
| | | width: 1500rpx; |
| | | top: 0; |
| | | background-color: transparent; |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | /* #ifndef APP-PLUS */ |
| | | @keyframes u-cursor-flicker { |
| | | 0% { |
| | | opacity: 0; |
| | | } |
| | | 50% { |
| | | opacity: 1; |
| | | } |
| | | 100% { |
| | | opacity: 0; |
| | | } |
| | | } |
| | | /* #endif */ |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // åè®¡æ¶æ»ç§æ° |
| | | seconds: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.code.seconds |
| | | }, |
| | | // å°æªå¼å§æ¶æç¤º |
| | | startText: { |
| | | type: String, |
| | | default: uni.$u.props.code.startText |
| | | }, |
| | | // æ£å¨å计æ¶ä¸çæç¤º |
| | | changeText: { |
| | | type: String, |
| | | default: uni.$u.props.code.changeText |
| | | }, |
| | | // å计æ¶ç»ææ¶çæç¤º |
| | | endText: { |
| | | type: String, |
| | | default: uni.$u.props.code.endText |
| | | }, |
| | | // æ¯å¦å¨H5å·æ°æå端è¿ååè¿å
¥æ¶ç»§ç»åè®¡æ¶ |
| | | keepRunning: { |
| | | type: Boolean, |
| | | default: uni.$u.props.code.keepRunning |
| | | }, |
| | | // 为äºåºåå¤ä¸ªé¡µé¢ï¼æè
ä¸ä¸ªé¡µé¢å¤ä¸ªå计æ¶ç»ä»¶æ¬å°åå¨çç»§ç»å计æ¶åäº |
| | | uniqueKey: { |
| | | type: String, |
| | | default: uni.$u.props.code.uniqueKey |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-code"> |
| | | <!-- æ¤ç»ä»¶åè½ç±jså®æï¼æ éåhtmlé»è¾ --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Code éªè¯ç è¾å
¥æ¡ |
| | | * @description èèå°ç¨æ·å®é
åééªè¯ç çåºæ¯ï¼å¯è½æ¯ä¸ä¸ªæé®ï¼ä¹å¯è½æ¯ä¸æ®µæåï¼æç¤ºè¯åæä¸åï¼æä»¥æ¬ç»ä»¶ 䏿ä¾ç颿¾ç¤ºï¼åªæä¾æç¤ºè¯ï¼ç±ç¨æ·å°æç¤ºè¯åµå
¥å°å
·ä½çåºæ¯ |
| | | * @tutorial https://www.uviewui.com/components/code.html |
| | | * @property {String | Number} seconds åè®¡æ¶æéçç§æ°ï¼é»è®¤ 60 ï¼ |
| | | * @property {String} startText å¼å§åçæç¤ºè¯ï¼è§å®ç½è¯´æï¼é»è®¤ 'è·åéªè¯ç ' ï¼ |
| | | * @property {String} changeText åè®¡æ¶æé´çæç¤ºè¯ï¼å¿
须带æåæ¯"x"ï¼è§å®ç½è¯´æï¼é»è®¤ 'Xç§éæ°è·å' ï¼ |
| | | * @property {String} endText åè®¡ç»æçæç¤ºè¯ï¼è§å®ç½è¯´æï¼é»è®¤ 'éæ°è·å' ï¼ |
| | | * @property {Boolean} keepRunning æ¯å¦å¨H5å·æ°æå端è¿ååè¿å
¥æ¶ç»§ç»å计æ¶ï¼ é»è®¤false ï¼ |
| | | * @property {String} uniqueKey 为äºåºåå¤ä¸ªé¡µé¢ï¼æè
ä¸ä¸ªé¡µé¢å¤ä¸ªå计æ¶ç»ä»¶æ¬å°åå¨çç»§ç»å计æ¶åäº |
| | | * |
| | | * @event {Function} change åè®¡æ¶æé´ï¼æ¯ç§è§¦å䏿¬¡ |
| | | * @event {Function} start å¼å§å计æ¶è§¦å |
| | | * @event {Function} end ç»æå计æ¶è§¦å |
| | | * @example <u-code ref="uCode" @change="codeChange" seconds="20"></u-code> |
| | | */ |
| | | export default { |
| | | name: "u-code", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | secNum: this.seconds, |
| | | timer: null, |
| | | canGetCode: true, // æ¯å¦å¯ä»¥æ§è¡éªè¯ç æä½ |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.checkKeepRunning() |
| | | }, |
| | | watch: { |
| | | seconds: { |
| | | immediate: true, |
| | | handler(n) { |
| | | this.secNum = n |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | checkKeepRunning() { |
| | | // è·åä¸ä¸æ¬¡éåºé¡µé¢(H5è¿å
æ¬å·æ°)æ¶çæ¶é´æ³ï¼å¦ææ²¡æä¸æ¬¡çä¿åï¼æ¤å¼å¯è½ä¸ºç©º |
| | | let lastTimestamp = Number(uni.getStorageSync(this.uniqueKey + '_$uCountDownTimestamp')) |
| | | if(!lastTimestamp) return this.changeEvent(this.startText) |
| | | // å½åç§çæ¶é´æ³ |
| | | let nowTimestamp = Math.floor((+ new Date()) / 1000) |
| | | // 夿å½åçæ¶é´æ³ï¼æ¯å¦å°äºä¸ä¸æ¬¡çæ¬è¯¥æè®¾å®ç»æï¼å´æåç»æçæ¶é´æ³ |
| | | if(this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) { |
| | | // å©ä½å°æªæ§è¡å®çåè®¡ç§æ° |
| | | this.secNum = lastTimestamp - nowTimestamp |
| | | // æ¸
餿¬å°ä¿åçåé |
| | | uni.removeStorageSync(this.uniqueKey + '_$uCountDownTimestamp') |
| | | // å¼å§åè®¡æ¶ |
| | | this.start() |
| | | } else { |
| | | // 妿ä¸åå¨éè¦ç»§ç»ä¸ä¸æ¬¡çå计æ¶ï¼æ§è¡æ£å¸¸çé»è¾ |
| | | this.changeEvent(this.startText) |
| | | } |
| | | }, |
| | | // å¼å§åè®¡æ¶ |
| | | start() { |
| | | // 鲿¢å¿«éç¹å»è·åéªè¯ç çæé®è导è´å
é¨äº§çå¤ä¸ªå®æ¶å¨å¯¼è´æ··ä¹± |
| | | if(this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | this.$emit('start') |
| | | this.canGetCode = false |
| | | // è¿éæ¾è¿å¥ï¼æ¯ä¸ºäºä¸å¼å§æ¶å°±æç¤ºï¼å¦åè¦çsetIntervalç1ç§åæä¼ææç¤º |
| | | this.changeEvent(this.changeText.replace(/x|X/, this.secNum)) |
| | | this.setTimeToStorage() |
| | | this.timer = setInterval(() => { |
| | | if (--this.secNum) { |
| | | // ç¨å½åå计æ¶çç§æ°æ¿æ¢æç¤ºå符串ä¸ç"x"忝 |
| | | this.changeEvent(this.changeText.replace(/x|X/, this.secNum)) |
| | | } else { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | this.changeEvent(this.endText) |
| | | this.secNum = this.seconds |
| | | this.$emit('end') |
| | | this.canGetCode = true |
| | | } |
| | | }, 1000) |
| | | }, |
| | | // éç½®ï¼å¯ä»¥è®©ç¨æ·å次è·åéªè¯ç |
| | | reset() { |
| | | this.canGetCode = true |
| | | clearInterval(this.timer) |
| | | this.secNum = this.seconds |
| | | this.changeEvent(this.endText) |
| | | }, |
| | | changeEvent(text) { |
| | | this.$emit('change', text) |
| | | }, |
| | | // ä¿åæ¶é´æ³ï¼ä¸ºäºé²æ¢å计æ¶å°æªç»æï¼H5å·æ°æè
å端çå³ä¸è§è¿åä¸ä¸é¡µåè¿æ¥ |
| | | setTimeToStorage() { |
| | | if(!this.keepRunning || !this.timer) return |
| | | // è®°å½å½åçæ¶é´æ³ï¼ä¸ºäºä¸æ¬¡è¿å
¥é¡µé¢ï¼å¦æè¿å¨å计æ¶å
çè¯ï¼ç»§ç»åè®¡æ¶ |
| | | // å计æ¶å°æªç»æï¼ç»æå¤§äº0ï¼å计æ¶å·²ç»å¼å§ï¼å°±ä¼å°äºåå§å¼ï¼å¦æçäºåå§å¼ï¼è¯´ææ²¡æå¼å§å计æ¶ï¼æ éå¤ç |
| | | if(this.secNum > 0 && this.secNum <= this.seconds) { |
| | | // è·åå½åæ¶é´æ³(+ new Date()ä¸ºç¹æ®åæ³)ï¼é¤ä»¥1000åæç§ï¼åå»é¤å°æ°é¨å |
| | | let nowTimestamp = Math.floor((+ new Date()) / 1000) |
| | | // å°æ¬è¯¥ç»ææ¶åçæ¶é´æ³ä¿åèµ·æ¥ => å½åæ¶é´æ³ + å©ä½çç§æ° |
| | | uni.setStorage({ |
| | | key: this.uniqueKey + '_$uCountDownTimestamp', |
| | | data: nowTimestamp + Number(this.secNum) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // ç»ä»¶éæ¯çæ¶åï¼æ¸
é¤å®æ¶å¨ï¼å¦å宿¶å¨ä¼ç»§ç»åå¨ï¼ç³»ç»ä¸ä¼èªå¨æ¸
é¤ |
| | | beforeDestroy() { |
| | | this.setTimeToStorage() |
| | | clearTimeout(this.timer) |
| | | this.timer = null |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å ç¶å®¹å¨å®½åº¦çå¤å°çåï¼æ»å为12份 |
| | | span: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.col.span |
| | | }, |
| | | // æå®æ
æ ¼å·¦ä¾§çé´éæ°(æ»12æ ) |
| | | offset: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.col.offset |
| | | }, |
| | | // æ°´å¹³æåæ¹å¼ï¼å¯éå¼ä¸º`start`(æ`flex-start`)ã`end`(æ`flex-end`)ã`center`ã`around`(æ`space-around`)ã`between`(æ`space-between`) |
| | | justify: { |
| | | type: String, |
| | | default: uni.$u.props.col.justify |
| | | }, |
| | | // åç´å¯¹é½æ¹å¼ï¼å¯éå¼ä¸ºtopãcenterãbottomãstretch |
| | | align: { |
| | | type: String, |
| | | default: uni.$u.props.col.align |
| | | }, |
| | | // æå坹齿¹å¼ |
| | | textAlign: { |
| | | type: String, |
| | | default: uni.$u.props.col.textAlign |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-col" |
| | | ref="u-col" |
| | | :class="[ |
| | | 'u-col-' + span |
| | | ]" |
| | | :style="[colStyle]" |
| | | @tap="clickHandler" |
| | | > |
| | | <slot></slot> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * CodeInput æ
æ ¼ç³»ç»çå |
| | | * @description 该ç»ä»¶ä¸è¬ç¨äºLayout å¸å± éè¿åºç¡ç 12 åæ ï¼è¿
éç®ä¾¿å°å建å¸å± |
| | | * @tutorial https://www.uviewui.com/components/Layout.html |
| | | * @property {String | Number} span æ
æ ¼å æ®çåæ°ï¼æ»12ç份 (é»è®¤ 12 ) |
| | | * @property {String | Number} offset åæ å·¦è¾¹åç§»ï¼è®¡ç®æ¹å¼ä¸spanç¸å (é»è®¤ 0 ) |
| | | * @property {String} justify æ°´å¹³æåæ¹å¼ï¼å¯éå¼ä¸º`start`(æ`flex-start`)ã`end`(æ`flex-end`)ã`center`ã`around`(æ`space-around`)ã`between`(æ`space-between`) (é»è®¤ 'start' ) |
| | | * @property {String} align åç´å¯¹é½æ¹å¼ï¼å¯éå¼ä¸ºtopãcenterãbottomãstretch (é»è®¤ 'stretch' ) |
| | | * @property {String} textAlign æåæ°´å¹³å¯¹é½æ¹å¼ (é»è®¤ 'left' ) |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * @event {Function} click col被ç¹å»ï¼ä¼é»æ¢äºä»¶å泡å°row |
| | | * @example <u-col span="3" offset="3" > <view class="demo-layout bg-purple"></view> </u-col> |
| | | */ |
| | | export default { |
| | | name: 'u-col', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | width: 0, |
| | | parentData: { |
| | | gutter: 0 |
| | | }, |
| | | gridNum: 12 |
| | | } |
| | | }, |
| | | computed: { |
| | | uJustify() { |
| | | if (this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify |
| | | else if (this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify |
| | | else return this.justify |
| | | }, |
| | | uAlignItem() { |
| | | if (this.align == 'top') return 'flex-start' |
| | | if (this.align == 'bottom') return 'flex-end' |
| | | else return this.align |
| | | }, |
| | | colStyle() { |
| | | const style = { |
| | | // è¿éåæ"padding: 0 10px"ç形弿¯å 为nvueçéè¦ |
| | | paddingLeft: uni.$u.addUnit(uni.$u.getPx(this.parentData.gutter)/2), |
| | | paddingRight: uni.$u.addUnit(uni.$u.getPx(this.parentData.gutter)/2), |
| | | alignItems: this.uAlignItem, |
| | | justifyContent: this.uJustify, |
| | | textAlign: this.textAlign, |
| | | // #ifndef APP-NVUE |
| | | // å¨énvueä¸ï¼ä½¿ç¨ç¾åæ¯å½¢å¼ |
| | | flex: `0 0 ${100 / this.gridNum * this.span}%`, |
| | | marginLeft: 100 / 12 * this.offset + '%', |
| | | // #endif |
| | | // #ifdef APP-NVUE |
| | | // å¨nvueä¸ï¼ç±äºæ æ³ä½¿ç¨ç¾åæ¯åä½ï¼è¿ééè¦è·åç¶ç»ä»¶ç宽度ï¼å计ç®å¾åºè¯¥æå¯¹åºçç¾åæ¯å°ºå¯¸ |
| | | width: uni.$u.addUnit(Math.floor(this.width / this.gridNum * Number(this.span))), |
| | | marginLeft: uni.$u.addUnit(Math.floor(this.width / this.gridNum * Number(this.offset))), |
| | | // #endif |
| | | } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | async init() { |
| | | // æ¯ä»å®å°ç¨åºä¸æ¯æprovide/injectï¼æä»¥ä½¿ç¨è¿ä¸ªæ¹æ³è·åæ´ä¸ªç¶ç»ä»¶ï¼å¨createdå®ä¹ï¼é¿å
循ç¯å¼ç¨ |
| | | this.updateParentData() |
| | | this.width = await this.parent.getComponentWidth() |
| | | }, |
| | | updateParentData() { |
| | | this.getParentData('u-row') |
| | | }, |
| | | clickHandler(e) { |
| | | this.$emit('click'); |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-col { |
| | | padding: 0; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing:border-box; |
| | | /* #endif */ |
| | | /* #ifdef MP */ |
| | | display: block; |
| | | /* #endif */ |
| | | } |
| | | |
| | | // nvueä¸ç¾åæ¯æ æ |
| | | /* #ifndef APP-NVUE */ |
| | | .u-col-0 { |
| | | width: 0; |
| | | } |
| | | |
| | | .u-col-1 { |
| | | width: calc(100%/12); |
| | | } |
| | | |
| | | .u-col-2 { |
| | | width: calc(100%/12 * 2); |
| | | } |
| | | |
| | | .u-col-3 { |
| | | width: calc(100%/12 * 3); |
| | | } |
| | | |
| | | .u-col-4 { |
| | | width: calc(100%/12 * 4); |
| | | } |
| | | |
| | | .u-col-5 { |
| | | width: calc(100%/12 * 5); |
| | | } |
| | | |
| | | .u-col-6 { |
| | | width: calc(100%/12 * 6); |
| | | } |
| | | |
| | | .u-col-7 { |
| | | width: calc(100%/12 * 7); |
| | | } |
| | | |
| | | .u-col-8 { |
| | | width: calc(100%/12 * 8); |
| | | } |
| | | |
| | | .u-col-9 { |
| | | width: calc(100%/12 * 9); |
| | | } |
| | | |
| | | .u-col-10 { |
| | | width: calc(100%/12 * 10); |
| | | } |
| | | |
| | | .u-col-11 { |
| | | width: calc(100%/12 * 11); |
| | | } |
| | | |
| | | .u-col-12 { |
| | | width: calc(100%/12 * 12); |
| | | } |
| | | |
| | | /* #endif */ |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ é¢ |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.collapseItem.title |
| | | }, |
| | | // æ é¢å³ä¾§å
容 |
| | | value: { |
| | | type: String, |
| | | default: uni.$u.props.collapseItem.value |
| | | }, |
| | | // æ é¢ä¸æ¹çæè¿°ä¿¡æ¯ |
| | | label: { |
| | | type: String, |
| | | default: uni.$u.props.collapseItem.label |
| | | }, |
| | | // æ¯å¦ç¦ç¨æå 颿¿ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapseItem.disabled |
| | | }, |
| | | // æ¯å¦å±ç¤ºå³ä¾§ç®å¤´å¹¶å¼å¯ç¹å»åé¦ |
| | | isLink: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapseItem.isLink |
| | | }, |
| | | // æ¯å¦å¼å¯ç¹å»åé¦ |
| | | clickable: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapseItem.clickable |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå
è¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapseItem.border |
| | | }, |
| | | // æ é¢ç坹齿¹å¼ |
| | | align: { |
| | | type: String, |
| | | default: uni.$u.props.collapseItem.align |
| | | }, |
| | | // å¯ä¸æ è¯ç¬¦ |
| | | name: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.collapseItem.name |
| | | }, |
| | | // æ é¢å·¦ä¾§å¾çï¼å¯ä¸ºç»å¯¹è·¯å¾çå¾çæå
ç½®å¾æ |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.collapseItem.icon |
| | | }, |
| | | // 颿¿å±å¼æ¶èµ·çè¿æ¸¡æ¶é´ï¼åä½ms |
| | | duration: { |
| | | type: Number, |
| | | default: uni.$u.props.collapseItem.duration |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-collapse-item"> |
| | | <u-cell |
| | | :title="title" |
| | | :value="value" |
| | | :label="label" |
| | | :icon="icon" |
| | | :isLink="isLink" |
| | | :clickable="clickable" |
| | | :border="parentData.border && showBorder" |
| | | @click="clickHandler" |
| | | :arrowDirection="expanded ? 'up' : 'down'" |
| | | :disabled="disabled" |
| | | > |
| | | <!-- #ifndef MP-WEIXIN --> |
| | | <!-- 微信å°ç¨åºä¸æ¯æï¼å 为微信ä¸ä¸æ¯æ <slot name="title" slot="title" />çåæ³ --> |
| | | <template slot="title"> |
| | | <slot name="title"></slot> |
| | | </template> |
| | | <template slot="icon"> |
| | | <slot name="icon"></slot> |
| | | </template> |
| | | <template slot="value"> |
| | | <slot name="value"></slot> |
| | | </template> |
| | | <template slot="right-icon"> |
| | | <slot name="right-icon"></slot> |
| | | </template> |
| | | <!-- #endif --> |
| | | </u-cell> |
| | | <view |
| | | class="u-collapse-item__content" |
| | | :animation="animationData" |
| | | ref="animation" |
| | | > |
| | | <view |
| | | class="u-collapse-item__content__text content-class" |
| | | :id="elId" |
| | | :ref="elId" |
| | | ><slot /></view> |
| | | </view> |
| | | <u-line v-if="parentData.border"></u-line> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | const animation = uni.requireNativePlugin('animation') |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | /** |
| | | * collapseItem æå 颿¿Item |
| | | * @description éè¿æå 颿¿æ¶çº³å
容åºåï¼æé
u-collapse使ç¨ï¼ |
| | | * @tutorial https://www.uviewui.com/components/collapse.html |
| | | * @property {String} title æ é¢ |
| | | * @property {String} value æ é¢å³ä¾§å
容 |
| | | * @property {String} label æ é¢ä¸æ¹çæè¿°ä¿¡æ¯ |
| | | * @property {Boolean} disbled æ¯å¦ç¦ç¨æå 颿¿ ( é»è®¤ false ) |
| | | * @property {Boolean} isLink æ¯å¦å±ç¤ºå³ä¾§ç®å¤´å¹¶å¼å¯ç¹å»åé¦ ( é»è®¤ true ) |
| | | * @property {Boolean} clickable æ¯å¦å¼å¯ç¹å»åé¦ ( é»è®¤ true ) |
| | | * @property {Boolean} border æ¯å¦æ¾ç¤ºå
è¾¹æ¡ ( é»è®¤ true ) |
| | | * @property {String} align æ é¢ç坹齿¹å¼ ( é»è®¤ 'left' ) |
| | | * @property {String | Number} name å¯ä¸æ è¯ç¬¦ |
| | | * @property {String} icon æ é¢å·¦ä¾§å¾çï¼å¯ä¸ºç»å¯¹è·¯å¾çå¾çæå
ç½®å¾æ |
| | | * @event {Function} change æä¸ªitem被æå¼æè
æ¶èµ·æ¶è§¦å |
| | | * @example <u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">{{item.body}}</u-collapse-item> |
| | | */ |
| | | export default { |
| | | name: "u-collapse-item", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | elId: uni.$u.guid(), |
| | | // uni.createAnimationçå¯¼åºæ°æ® |
| | | animationData: {}, |
| | | // æ¯å¦å±å¼ç¶æ |
| | | expanded: false, |
| | | // æ ¹æ®expandedç¡®å®æ¯å¦æ¾ç¤ºborderï¼ä¸ºäºæ§å¶å±å¼æ¶ï¼cellçä¸å线æ´å¥½çæ¾ç¤ºææï¼è¿è¡ä¸å®æ¶é´çå»¶æ¶ |
| | | showBorder: false, |
| | | // æ¯å¦å¨ç»ä¸ï¼å¦ææ¯åä¸å
许继ç»è§¦åç¹å» |
| | | animating: false, |
| | | // ç¶ç»ä»¶u-collapseçåæ° |
| | | parentData: { |
| | | accordion: false, |
| | | border: false |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | expanded(n) { |
| | | clearTimeout(this.timer) |
| | | this.timer = null |
| | | // è¿éæ ¹æ®expandedç弿¥è¿è¡ä¸å®çå»¶æ¶ï¼æ¯ä¸ºäºcellçä¸å线æ´å¥½çæ¾ç¤ºææ |
| | | this.timer = setTimeout(() => { |
| | | this.showBorder = n |
| | | }, n ? 10 : 290) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | // 弿¥è·åå
å®¹ï¼æè
å¨æä¿®æ¹äºå
容æ¶ï¼éè¦éæ°åå§å |
| | | init() { |
| | | // åå§åæ°æ® |
| | | this.updateParentData() |
| | | if (!this.parent) { |
| | | return uni.$u.error('u-collapse-itemå¿
é¡»è¦æé
u-collapseç»ä»¶ä½¿ç¨') |
| | | } |
| | | const { |
| | | value, |
| | | accordion, |
| | | children = [] |
| | | } = this.parent |
| | | |
| | | if (accordion) { |
| | | if (uni.$u.test.array(value)) { |
| | | return uni.$u.error('æé£ç´æ¨¡å¼ä¸ï¼u-collapseç»ä»¶çvalueåæ°ä¸è½ä¸ºæ°ç»') |
| | | } |
| | | this.expanded = this.name == value |
| | | } else { |
| | | if (!uni.$u.test.array(value) && value !== null) { |
| | | return uni.$u.error('éæé£ç´æ¨¡å¼ä¸ï¼u-collapseç»ä»¶çvalueåæ°å¿
须为æ°ç»') |
| | | } |
| | | this.expanded = (value || []).some(item => item == this.name) |
| | | } |
| | | // 设置ç»ä»¶çå±å¼ææ¶èµ·ç¶æ |
| | | this.$nextTick(function() { |
| | | this.setContentAnimate() |
| | | }) |
| | | }, |
| | | updateParentData() { |
| | | // æ¤æ¹æ³å¨mixinä¸ |
| | | this.getParentData('u-collapse') |
| | | }, |
| | | async setContentAnimate() { |
| | | // æ¯æ¬¡é¢æ¿æå¼æè
æ¶èµ·æ¶ï¼é½æ¥è¯¢å
ç´ å°ºå¯¸ |
| | | // 好夿¯ï¼ç¶ç»ä»¶ä»æå¡ç«¯è·åå
容åï¼åæ´æå 颿¿åå¯ä»¥è·å¾ææ°çé«åº¦ |
| | | const rect = await this.queryRect() |
| | | const height = this.expanded ? rect.height : 0 |
| | | this.animating = true |
| | | // #ifdef APP-NVUE |
| | | const ref = this.$refs['animation'].ref |
| | | animation.transition(ref, { |
| | | styles: { |
| | | height: height + 'px' |
| | | }, |
| | | duration: this.duration, |
| | | // å¿
须设置为trueï¼å¦åä¼å°é¢æ¿æ¶èµ·æå±å¼æ¶ï¼é¡µé¢å
¶ä»å
ç´ ä¸ä¼éä¹è°æ´å®ä»¬çå¸å± |
| | | needLayout: true, |
| | | timingFunction: 'ease-in-out', |
| | | }, () => { |
| | | this.animating = false |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifndef APP-NVUE |
| | | const animation = uni.createAnimation({ |
| | | timingFunction: 'ease-in-out', |
| | | }); |
| | | animation |
| | | .height(height) |
| | | .step({ |
| | | duration: this.duration, |
| | | }) |
| | | .step() |
| | | // 导åºå¨ç»æ°æ®ç»é¢æ¿çanimationDataå¼ |
| | | this.animationData = animation.export() |
| | | // æ è¯å¨ç»ç»æ |
| | | uni.$u.sleep(this.duration).then(() => { |
| | | this.animating = false |
| | | }) |
| | | // #endif |
| | | }, |
| | | // ç¹å»collapseheadå¤´é¨ |
| | | clickHandler() { |
| | | if (this.disabled && this.animating) return |
| | | // 设置æ¬ç»ä»¶ä¸ºç¸åçç¶æ |
| | | this.parent && this.parent.onChange(this) |
| | | }, |
| | | // æ¥è¯¢å
容é«åº¦ |
| | | queryRect() { |
| | | // #ifndef APP-NVUE |
| | | // $uGetRect为uViewèªå¸¦çèç¹æ¥è¯¢ç®åæ¹æ³ï¼è¯¦è§ææ¡£ä»ç»ï¼https://www.uviewui.com/js/getRect.html |
| | | // ç»ä»¶å
é¨ä¸è¬ç¨this.$uGetRectï¼å¯¹å¤ç为uni.$u.getRectï¼äºè
åè½ä¸è´ï¼åç§°ä¸å |
| | | return new Promise(resolve => { |
| | | this.$uGetRect(`#${this.elId}`).then(size => { |
| | | resolve(size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | // nvueä¸ï¼ä½¿ç¨domæ¨¡åæ¥è¯¢å
ç´ é«åº¦ |
| | | // è¿åä¸ä¸ªpromiseï¼è®©è°ç¨æ¤æ¹æ³ç主ä½è½ä½¿ç¨thenåè° |
| | | return new Promise(resolve => { |
| | | dom.getComponentRect(this.$refs[this.elId], res => { |
| | | resolve(res.size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-collapse-item { |
| | | |
| | | &__content { |
| | | overflow: hidden; |
| | | height: 0; |
| | | |
| | | &__text { |
| | | padding: 12px 15px; |
| | | color: $u-content-color; |
| | | font-size: 14px; |
| | | line-height: 18px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å½åå±å¼é¢æ¿çnameï¼éæé£ç´æ¨¡å¼ï¼[<string | number>]ï¼æé£ç´æ¨¡å¼ï¼string | number |
| | | value: { |
| | | type: [String, Number, Array, null], |
| | | default: uni.$u.props.collapse.value |
| | | }, |
| | | // æ¯å¦æé£ç´æ¨¡å¼ |
| | | accordion: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapse.accordion |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå¤è¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.collapse.border |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-collapse"> |
| | | <u-line v-if="border"></u-line> |
| | | <slot /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * collapse æå 颿¿ |
| | | * @description éè¿æå 颿¿æ¶çº³å
容åºå |
| | | * @tutorial https://www.uviewui.com/components/collapse.html |
| | | * @property {String | Number | Array} value å½åå±å¼é¢æ¿çnameï¼éæé£ç´æ¨¡å¼ï¼[<string | number>]ï¼æé£ç´æ¨¡å¼ï¼string | number |
| | | * @property {Boolean} accordion æ¯å¦æé£ç´æ¨¡å¼ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} border æ¯å¦æ¾ç¤ºå¤è¾¹æ¡ ( é»è®¤ true ï¼ |
| | | * @event {Function} change å½åæ¿æ´»é¢æ¿å±å¼æ¶è§¦å(å¦ææ¯æé£ç´æ¨¡å¼ï¼åæ°activeNamesç±»å为Stringï¼å¦å为Array) |
| | | * @example <u-collapse></u-collapse> |
| | | */ |
| | | export default { |
| | | name: "u-collapse", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | watch: { |
| | | needInit() { |
| | | this.init() |
| | | } |
| | | }, |
| | | created() { |
| | | this.children = [] |
| | | }, |
| | | computed: { |
| | | needInit() { |
| | | // éè¿computedï¼åæ¶çå¬accordionåvalueå¼çåå |
| | | // åéè¿watch廿§è¡init()æ¹æ³ï¼è¿è¡å䏿¬¡çåå§å |
| | | return [this.accordion, this.value] |
| | | } |
| | | }, |
| | | watch: { |
| | | // å½ç¶ç»ä»¶éè¦åç»ä»¶éè¦å
±äº«çåæ°åçäºååï¼æå¨éç¥åç»ä»¶ |
| | | parentData() { |
| | | if (this.children.length) { |
| | | this.children.map(child => { |
| | | // 夿åç»ä»¶(u-checkbox)妿æupdateParentDataæ¹æ³çè¯ï¼å°±å°±æ§è¡(æ§è¡çç»ææ¯åç»ä»¶éæ°ä»ç¶ç»ä»¶æåäºææ°çå¼) |
| | | typeof(child.updateParentData) === 'function' && child.updateParentData() |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // éæ°åå§å䏿¬¡å
é¨çææåå
ç´ |
| | | init() { |
| | | this.children.map(child => { |
| | | child.init() |
| | | }) |
| | | }, |
| | | /** |
| | | * collapse-item被ç¹å»æ¶è§¦åï¼ç±collapseç»ä¸å¤çååç»ä»¶çç¶æ |
| | | * @param {Object} target 被æä½ç颿¿çå®ä¾ |
| | | */ |
| | | onChange(target) { |
| | | let changeArr = [] |
| | | this.children.map((child, index) => { |
| | | // å¦ææ¯æé£ç´æ¨¡å¼ï¼å°å
¶ä»çæå 颿¿æ¶èµ·æ¥ |
| | | if (this.accordion) { |
| | | child.expanded = child === target ? !target.expanded : false |
| | | child.setContentAnimate() |
| | | } else { |
| | | if(child === target) { |
| | | child.expanded = !child.expanded |
| | | child.setContentAnimate() |
| | | } |
| | | } |
| | | // æ¼æ¥changeäºä»¶ä¸ï¼æ°ç»å
ç´ çç¶æ |
| | | changeArr.push({ |
| | | // å¦ææ²¡æå®ä¹name屿§ï¼åé»è®¤è¿åç»ä»¶çindexç´¢å¼ |
| | | name: child.name || index, |
| | | status: child.expanded ? 'open' : 'close' |
| | | }) |
| | | }) |
| | | |
| | | this.$emit('change', changeArr) |
| | | this.$emit(target.expanded ? 'open' : 'close', target.name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¾ç¤ºçå
容ï¼å符串 |
| | | text: { |
| | | type: [Array], |
| | | default: uni.$u.props.columnNotice.text |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå·¦ä¾§çé³é徿 |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.columnNotice.icon |
| | | }, |
| | | // é忍¡å¼ï¼link-æ¾ç¤ºå³ç®å¤´ï¼closable-æ¾ç¤ºå³ä¾§å
³é徿 |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.columnNotice.mode |
| | | }, |
| | | // æåé¢è²ï¼å徿 ä¹ä¼ä½¿ç¨æåé¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.columnNotice.color |
| | | }, |
| | | // èæ¯é¢è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.columnNotice.bgColor |
| | | }, |
| | | // åä½å¤§å°ï¼åä½px |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.columnNotice.fontSize |
| | | }, |
| | | // æ°´å¹³æ»å¨æ¶çæ»å¨é度ï¼å³æ¯ç§æ»å¨å¤å°px(px)ï¼è¿æå©äºæ§å¶æåæ 论å¤å°æ¶ï¼é½è½æä¸ä¸ªæå®çé度 |
| | | speed: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.columnNotice.speed |
| | | }, |
| | | // direction = rowæ¶ï¼æ¯å¦ä½¿ç¨æ¥è¿å½¢å¼æ»å¨ |
| | | step: { |
| | | type: Boolean, |
| | | default: uni.$u.props.columnNotice.step |
| | | }, |
| | | // æ»å¨ä¸ä¸ªå¨æçæ¶é´é¿ï¼åä½ms |
| | | duration: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.columnNotice.duration |
| | | }, |
| | | // æ¯å¦ç¦æ¢ç¨ææ»å¨åæ¢ |
| | | // ç®åHX2.6.11ï¼åªæ¯æApp 2.5.5+ãH5 2.5.5+ãæ¯ä»å®å°ç¨åºãåèè·³å¨å°ç¨åº |
| | | disableTouch: { |
| | | type: Boolean, |
| | | default: uni.$u.props.columnNotice.disableTouch |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-notice" |
| | | @tap="clickHandler" |
| | | > |
| | | <slot name="icon"> |
| | | <view |
| | | class="u-notice__left-icon" |
| | | v-if="icon" |
| | | > |
| | | <u-icon |
| | | :name="icon" |
| | | :color="color" |
| | | size="19" |
| | | ></u-icon> |
| | | </view> |
| | | </slot> |
| | | <swiper |
| | | :disable-touch="disableTouch" |
| | | :vertical="step ? false : true" |
| | | circular |
| | | :interval="duration" |
| | | :autoplay="true" |
| | | class="u-notice__swiper" |
| | | @change="noticeChange" |
| | | > |
| | | <swiper-item |
| | | v-for="(item, index) in text" |
| | | :key="index" |
| | | class="u-notice__swiper__item" |
| | | > |
| | | <text |
| | | class="u-notice__swiper__item__text u-line-1" |
| | | :style="[textStyle]" |
| | | >{{ item }}</text> |
| | | </swiper-item> |
| | | </swiper> |
| | | <view |
| | | class="u-notice__right-icon" |
| | | v-if="['link', 'closable'].includes(mode)" |
| | | > |
| | | <u-icon |
| | | v-if="mode === 'link'" |
| | | name="arrow-right" |
| | | :size="17" |
| | | :color="color" |
| | | ></u-icon> |
| | | <u-icon |
| | | v-if="mode === 'closable'" |
| | | name="close" |
| | | :size="16" |
| | | :color="color" |
| | | @click="close" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * ColumnNotice æ»å¨éç¥ä¸çåç´æ»å¨ å
é¨ç»ä»¶ |
| | | * @description 该ç»ä»¶ç¨äºæ»å¨éååºæ¯ï¼æ¯å
¶ä¸çåç´æ»å¨æ¹å¼ |
| | | * @tutorial https://www.uviewui.com/components/noticeBar.html |
| | | * @property {Array} text æ¾ç¤ºçå
容ï¼å符串 |
| | | * @property {String} icon æ¯å¦æ¾ç¤ºå·¦ä¾§çé³é徿 ï¼ é»è®¤ 'volume' ï¼ |
| | | * @property {String} mode é忍¡å¼ï¼link-æ¾ç¤ºå³ç®å¤´ï¼closable-æ¾ç¤ºå³ä¾§å
³é徿 |
| | | * @property {String} color æåé¢è²ï¼å徿 ä¹ä¼ä½¿ç¨æåé¢è² ï¼ é»è®¤ '#f9ae3d' ï¼ |
| | | * @property {String} bgColor èæ¯é¢è² ï¼ é»è®¤ '#fdf6ec' ï¼ |
| | | * @property {String | Number} fontSize åä½å¤§å°ï¼åä½px ï¼ é»è®¤ 14 ï¼ |
| | | * @property {String | Number} speed æ°´å¹³æ»å¨æ¶çæ»å¨é度ï¼å³æ¯ç§æ»å¨å¤å°px(rpx)ï¼è¿æå©äºæ§å¶æåæ 论å¤å°æ¶ï¼é½è½æä¸ä¸ªæå®çé度 ï¼ é»è®¤ 80 ï¼ |
| | | * @property {Boolean} step direction = rowæ¶ï¼æ¯å¦ä½¿ç¨æ¥è¿å½¢å¼æ»å¨ ï¼ é»è®¤ false ï¼ |
| | | * @property {String | Number} duration æ»å¨ä¸ä¸ªå¨æçæ¶é´é¿ï¼åä½ms ï¼ é»è®¤ 1500 ï¼ |
| | | * @property {Boolean} disableTouch æ¯å¦ç¦æ¢ç¨ææ»å¨åæ¢ ç®åHX2.6.11ï¼åªæ¯æApp 2.5.5+ãH5 2.5.5+ãæ¯ä»å®å°ç¨åºãåèè·³å¨å°ç¨åº ï¼ é»è®¤ true ï¼ |
| | | * @example |
| | | */ |
| | | export default { |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | watch: { |
| | | text: { |
| | | immediate: true, |
| | | handler(newValue, oldValue) { |
| | | if(!uni.$u.test.array(newValue)) { |
| | | uni.$u.error('noticebarç»ä»¶direction为columnæ¶ï¼è¦æ±textåæ°ä¸ºæ°ç»å½¢å¼') |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // æåå
å®¹çæ ·å¼ |
| | | textStyle() { |
| | | let style = {} |
| | | style.color = this.color |
| | | style.fontSize = uni.$u.addUnit(this.fontSize) |
| | | return style |
| | | }, |
| | | // åç´æè
æ°´å¹³æ»å¨ |
| | | vertical() { |
| | | if (this.mode == 'horizontal') return false |
| | | else return true |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | index:0 |
| | | } |
| | | }, |
| | | methods: { |
| | | noticeChange(e){ |
| | | this.index = e.detail.current |
| | | }, |
| | | // ç¹å»éåæ |
| | | clickHandler() { |
| | | this.$emit('click', this.index) |
| | | }, |
| | | // ç¹å»å
³éæé® |
| | | close() { |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-notice { |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | &__left-icon { |
| | | align-items: center; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | &__right-icon { |
| | | margin-left: 5px; |
| | | align-items: center; |
| | | } |
| | | |
| | | &__swiper { |
| | | height: 16px; |
| | | @include flex; |
| | | align-items: center; |
| | | flex: 1; |
| | | |
| | | &__item { |
| | | @include flex; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | |
| | | &__text { |
| | | font-size: 14px; |
| | | color: $u-warning; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // åè®¡æ¶æ¶é¿ï¼åä½ms |
| | | time: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countDown.time |
| | | }, |
| | | // æ¶é´æ ¼å¼ï¼DD-æ¥ï¼HH-æ¶ï¼mm-åï¼ss-ç§ï¼SSS-æ¯«ç§ |
| | | format: { |
| | | type: String, |
| | | default: uni.$u.props.countDown.format |
| | | }, |
| | | // æ¯å¦èªå¨å¼å§åè®¡æ¶ |
| | | autoStart: { |
| | | type: Boolean, |
| | | default: uni.$u.props.countDown.autoStart |
| | | }, |
| | | // æ¯å¦å±ç¤ºæ¯«ç§åè®¡æ¶ |
| | | millisecond: { |
| | | type: Boolean, |
| | | default: uni.$u.props.countDown.millisecond |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-count-down"> |
| | | <slot> |
| | | <text class="u-count-down__text">{{ formattedTime }}</text> |
| | | </slot> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | import { |
| | | isSameSecond, |
| | | parseFormat, |
| | | parseTimeData |
| | | } from './utils'; |
| | | /** |
| | | * u-count-down åè®¡æ¶ |
| | | * @description 该ç»ä»¶ä¸è¬ä½¿ç¨äºæä¸ªæ´»å¨çæªæ¢æ¶é´ä¸ï¼éè¿æ°åçååï¼ç»ç¨æ·æç¡®çæ¶é´æåï¼æç¤ºç¨æ·è¿è¡æä¸ä¸ªè¡ä¸ºæä½ã |
| | | * @tutorial https://uviewui.com/components/countDown.html |
| | | * @property {String | Number} time åè®¡æ¶æ¶é¿ï¼åä½ms ï¼é»è®¤ 0 ï¼ |
| | | * @property {String} format æ¶é´æ ¼å¼ï¼DD-æ¥ï¼HH-æ¶ï¼mm-åï¼ss-ç§ï¼SSS-æ¯«ç§ ï¼é»è®¤ 'HH:mm:ss' ï¼ |
| | | * @property {Boolean} autoStart æ¯å¦èªå¨å¼å§åè®¡æ¶ ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} millisecond æ¯å¦å±ç¤ºæ¯«ç§åè®¡æ¶ ï¼é»è®¤ false ï¼ |
| | | * @event {Function} finish å计æ¶ç»ææ¶è§¦å |
| | | * @event {Function} change å计æ¶ååæ¶è§¦å |
| | | * @event {Function} start å¼å§åè®¡æ¶ |
| | | * @event {Function} pause æååè®¡æ¶ |
| | | * @event {Function} reset é设å计æ¶ï¼è¥ auto-start 为 trueï¼é设åä¼èªå¨å¼å§åè®¡æ¶ |
| | | * @example <u-count-down :time="time"></u-count-down> |
| | | */ |
| | | export default { |
| | | name: 'u-count-down', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | timer: null, |
| | | // ååä½(å¤©ï¼æ¶ï¼åç)å©ä½æ¶é´ |
| | | timeData: parseTimeData(0), |
| | | // æ ¼å¼ååçæ¶é´ï¼å¦"03:23:21" |
| | | formattedTime: '0', |
| | | // åè®¡æ¶æ¯å¦æ£å¨è¿è¡ä¸ |
| | | runing: false, |
| | | endTime: 0, // ç»æçæ¯«ç§æ¶é´æ³ |
| | | remainTime: 0, // å©ä½çæ¯«ç§æ¶é´ |
| | | } |
| | | }, |
| | | watch: { |
| | | time(n) { |
| | | this.reset() |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.reset() |
| | | }, |
| | | // å¼å§åè®¡æ¶ |
| | | start() { |
| | | if (this.runing) return |
| | | // æ è¯ä¸ºè¿è¡ä¸ |
| | | this.runing = true |
| | | // ç»ææ¶é´æ³ = æ¤å»æ¶é´æ³ + å©ä½çæ¶é´ |
| | | this.endTime = Date.now() + this.remainTime |
| | | this.toTick() |
| | | }, |
| | | // æ ¹æ®æ¯å¦å±ç¤ºæ¯«ç§ï¼æ§è¡ä¸åæä½å½æ° |
| | | toTick() { |
| | | if (this.millisecond) { |
| | | this.microTick() |
| | | } else { |
| | | this.macroTick() |
| | | } |
| | | }, |
| | | macroTick() { |
| | | this.clearTimeout() |
| | | // æ¯éä¸å®æ¶é´ï¼æ´æ°ä¸é宿¶å¨çå¼ |
| | | // åæ¶æ¤å®æ¶å¨çä½ç¨ä¹è½å¸¦æ¥æ¯«ç§çº§çæ´æ° |
| | | this.timer = setTimeout(() => { |
| | | // è·åå©ä½æ¶é´ |
| | | const remain = this.getRemainTime() |
| | | // é设å©ä½æ¶é´ |
| | | if (!isSameSecond(remain, this.remainTime) || remain === 0) { |
| | | this.setRemainTime(remain) |
| | | } |
| | | // 妿å©ä½æ¶é´ä¸ä¸º0ï¼åç»§ç»æ£æ¥æ´æ°åè®¡æ¶ |
| | | if (this.remainTime !== 0) { |
| | | this.macroTick() |
| | | } |
| | | }, 30) |
| | | }, |
| | | microTick() { |
| | | this.clearTimeout() |
| | | this.timer = setTimeout(() => { |
| | | this.setRemainTime(this.getRemainTime()) |
| | | if (this.remainTime !== 0) { |
| | | this.microTick() |
| | | } |
| | | }, 50) |
| | | }, |
| | | // è·åå©ä½çæ¶é´ |
| | | getRemainTime() { |
| | | // åæå¤§å¼ï¼é²æ¢åºç°å°äº0çå©ä½æ¶é´å¼ |
| | | return Math.max(this.endTime - Date.now(), 0) |
| | | }, |
| | | // 设置å©ä½çæ¶é´ |
| | | setRemainTime(remain) { |
| | | this.remainTime = remain |
| | | // æ ¹æ®å©ä½çæ¯«ç§æ¶é´ï¼å¾åºè¯¥æå¤©ï¼å°æ¶ï¼åéççå¼ï¼è¿åä¸ä¸ªå¯¹è±¡ |
| | | const timeData = parseTimeData(remain) |
| | | this.$emit('change', timeData) |
| | | // å¾åºæ ¼å¼ååçæ¶é´ |
| | | this.formattedTime = parseFormat(this.format, timeData) |
| | | // 妿æ¶é´å·²å°ï¼åæ¢åè®¡æ¶ |
| | | if (remain <= 0) { |
| | | this.pause() |
| | | this.$emit('finish') |
| | | } |
| | | }, |
| | | // éç½®åè®¡æ¶ |
| | | reset() { |
| | | this.pause() |
| | | this.remainTime = this.time |
| | | this.setRemainTime(this.remainTime) |
| | | if (this.autoStart) { |
| | | this.start() |
| | | } |
| | | }, |
| | | // æååè®¡æ¶ |
| | | pause() { |
| | | this.runing = false; |
| | | this.clearTimeout() |
| | | }, |
| | | // æ¸
ç©ºå®æ¶å¨ |
| | | clearTimeout() { |
| | | clearTimeout(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearTimeout() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style |
| | | lang="scss" |
| | | scoped |
| | | > |
| | | @import "../../libs/css/components.scss"; |
| | | $u-count-down-text-color:$u-content-color !default; |
| | | $u-count-down-text-font-size:15px !default; |
| | | $u-count-down-text-line-height:22px !default; |
| | | |
| | | .u-count-down { |
| | | &__text { |
| | | color: $u-count-down-text-color; |
| | | font-size: $u-count-down-text-font-size; |
| | | line-height: $u-count-down-text-line-height; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // è¡¥0ï¼å¦1 -> 01 |
| | | function padZero(num, targetLength = 2) { |
| | | let str = `${num}` |
| | | while (str.length < targetLength) { |
| | | str = `0${str}` |
| | | } |
| | | return str |
| | | } |
| | | const SECOND = 1000 |
| | | const MINUTE = 60 * SECOND |
| | | const HOUR = 60 * MINUTE |
| | | const DAY = 24 * HOUR |
| | | export function parseTimeData(time) { |
| | | const days = Math.floor(time / DAY) |
| | | const hours = Math.floor((time % DAY) / HOUR) |
| | | const minutes = Math.floor((time % HOUR) / MINUTE) |
| | | const seconds = Math.floor((time % MINUTE) / SECOND) |
| | | const milliseconds = Math.floor(time % SECOND) |
| | | return { |
| | | days, |
| | | hours, |
| | | minutes, |
| | | seconds, |
| | | milliseconds |
| | | } |
| | | } |
| | | export function parseFormat(format, timeData) { |
| | | let { |
| | | days, |
| | | hours, |
| | | minutes, |
| | | seconds, |
| | | milliseconds |
| | | } = timeData |
| | | // å¦ææ ¼å¼åå符串ä¸ä¸åå¨DD(天)ï¼åå°å¤©çæ¶é´è½¬ä¸ºå°æ¶ä¸å» |
| | | if (format.indexOf('DD') === -1) { |
| | | hours += days * 24 |
| | | } else { |
| | | // 对天补0 |
| | | format = format.replace('DD', padZero(days)) |
| | | } |
| | | // å
¶ä»åçäºDDçæ ¼å¼åå¤çæ¹å¼ |
| | | if (format.indexOf('HH') === -1) { |
| | | minutes += hours * 60 |
| | | } else { |
| | | format = format.replace('HH', padZero(hours)) |
| | | } |
| | | if (format.indexOf('mm') === -1) { |
| | | seconds += minutes * 60 |
| | | } else { |
| | | format = format.replace('mm', padZero(minutes)) |
| | | } |
| | | if (format.indexOf('ss') === -1) { |
| | | milliseconds += seconds * 1000 |
| | | } else { |
| | | format = format.replace('ss', padZero(seconds)) |
| | | } |
| | | return format.replace('SSS', padZero(milliseconds, 3)) |
| | | } |
| | | export function isSameSecond(time1, time2) { |
| | | return Math.floor(time1 / 1000) === Math.floor(time2 / 1000) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å¼å§çæ°å¼ï¼é»è®¤ä»0å¢é¿å°æä¸ä¸ªæ° |
| | | startVal: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.startVal |
| | | }, |
| | | // è¦æ»å¨çç®æ æ°å¼ï¼å¿
é¡» |
| | | endVal: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.endVal |
| | | }, |
| | | // æ»å¨å°ç®æ æ°å¼çå¨ç»æç»æ¶é´ï¼åä½ä¸ºæ¯«ç§ï¼msï¼ |
| | | duration: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.duration |
| | | }, |
| | | // 设置æ°å¼åæ¯å¦èªå¨å¼å§æ»å¨ |
| | | autoplay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.countTo.autoplay |
| | | }, |
| | | // è¦æ¾ç¤ºçå°æ°ä½æ° |
| | | decimals: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.decimals |
| | | }, |
| | | // æ¯å¦å¨å³å°å°è¾¾ç®æ æ°å¼çæ¶åï¼ä½¿ç¨ç¼æ
¢æ»å¨çææ |
| | | useEasing: { |
| | | type: Boolean, |
| | | default: uni.$u.props.countTo.useEasing |
| | | }, |
| | | // åè¿å¶åå² |
| | | decimal: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.decimal |
| | | }, |
| | | // åä½é¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.countTo.color |
| | | }, |
| | | // åä½å¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.countTo.fontSize |
| | | }, |
| | | // æ¯å¦å ç²åä½ |
| | | bold: { |
| | | type: Boolean, |
| | | default: uni.$u.props.countTo.bold |
| | | }, |
| | | // åä½åé符ï¼ç±»ä¼¼éé¢çåå²(ï¿¥23,321.05ä¸ç",") |
| | | separator: { |
| | | type: String, |
| | | default: uni.$u.props.countTo.separator |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <text |
| | | class="u-count-num" |
| | | :style="{ |
| | | fontSize: $u.addUnit(fontSize), |
| | | fontWeight: bold ? 'bold' : 'normal', |
| | | color: color |
| | | }" |
| | | >{{ displayValue }}</text> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * countTo æ°åæ»å¨ |
| | | * @description 该ç»ä»¶ä¸è¬ç¨äºéè¦æ»å¨æ°åå°æä¸ä¸ªå¼çåºæ¯ï¼ç®æ è¦æ±æ¯ä¸ä¸ªéå¢çå¼ã |
| | | * @tutorial https://www.uviewui.com/components/countTo.html |
| | | * @property {String | Number} startVal å¼å§çæ°å¼ï¼é»è®¤ä»0å¢é¿å°æä¸ä¸ªæ°ï¼é»è®¤ 0 ï¼ |
| | | * @property {String | Number} endVal è¦æ»å¨çç®æ æ°å¼ï¼å¿
é¡» ï¼é»è®¤ 0 ï¼ |
| | | * @property {String | Number} duration æ»å¨å°ç®æ æ°å¼çå¨ç»æç»æ¶é´ï¼åä½ä¸ºæ¯«ç§ï¼msï¼ ï¼é»è®¤ 2000 ï¼ |
| | | * @property {Boolean} autoplay 设置æ°å¼åæ¯å¦èªå¨å¼å§æ»å¨ ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} decimals è¦æ¾ç¤ºçå°æ°ä½æ°ï¼è§å®ç½è¯´æï¼é»è®¤ 0 ï¼ |
| | | * @property {Boolean} useEasing æ»å¨ç»ææ¶ï¼æ¯å¦ç¼å¨ç»å°¾ï¼è§å®ç½è¯´æï¼é»è®¤ true ï¼ |
| | | * @property {String} decimal åè¿å¶åå² ï¼ é»è®¤ "." ï¼ |
| | | * @property {String} color åä½é¢è²ï¼ é»è®¤ '#606266' ) |
| | | * @property {String | Number} fontSize åä½å¤§å°ï¼åä½pxï¼ é»è®¤ 22 ï¼ |
| | | * @property {Boolean} bold å使¯å¦å ç²ï¼é»è®¤ false ï¼ |
| | | * @property {String} separator åä½åé符ï¼è§å®ç½è¯´æ |
| | | * @event {Function} end æ°å¼æ»å¨å°ç®æ 弿¶è§¦å |
| | | * @example <u-count-to ref="uCountTo" :end-val="endVal" :autoplay="autoplay"></u-count-to> |
| | | */ |
| | | export default { |
| | | name: 'u-count-to', |
| | | data() { |
| | | return { |
| | | localStartVal: this.startVal, |
| | | displayValue: this.formatNumber(this.startVal), |
| | | printVal: null, |
| | | paused: false, // æ¯å¦æå |
| | | localDuration: Number(this.duration), |
| | | startTime: null, // å¼å§çæ¶é´ |
| | | timestamp: null, // æ¶é´æ³ |
| | | remaining: null, // åççæ¶é´ |
| | | rAF: null, |
| | | lastTime: 0 // ä¸ä¸æ¬¡çæ¶é´ |
| | | }; |
| | | }, |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | countDown() { |
| | | return this.startVal > this.endVal; |
| | | } |
| | | }, |
| | | watch: { |
| | | startVal() { |
| | | this.autoplay && this.start(); |
| | | }, |
| | | endVal() { |
| | | this.autoplay && this.start(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.autoplay && this.start(); |
| | | }, |
| | | methods: { |
| | | easingFn(t, b, c, d) { |
| | | return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b; |
| | | }, |
| | | requestAnimationFrame(callback) { |
| | | const currTime = new Date().getTime(); |
| | | // 为äºä½¿setTimteoutçå°½å¯è½çæ¥è¿æ¯ç§60å¸§çææ |
| | | const timeToCall = Math.max(0, 16 - (currTime - this.lastTime)); |
| | | const id = setTimeout(() => { |
| | | callback(currTime + timeToCall); |
| | | }, timeToCall); |
| | | this.lastTime = currTime + timeToCall; |
| | | return id; |
| | | }, |
| | | cancelAnimationFrame(id) { |
| | | clearTimeout(id); |
| | | }, |
| | | // å¼å§æ»å¨æ°å |
| | | start() { |
| | | this.localStartVal = this.startVal; |
| | | this.startTime = null; |
| | | this.localDuration = this.duration; |
| | | this.paused = false; |
| | | this.rAF = this.requestAnimationFrame(this.count); |
| | | }, |
| | | // æå®ç¶æï¼éæ°åå¼å§æ»å¨ï¼æè
æ»å¨ç¶æä¸ï¼æå |
| | | reStart() { |
| | | if (this.paused) { |
| | | this.resume(); |
| | | this.paused = false; |
| | | } else { |
| | | this.stop(); |
| | | this.paused = true; |
| | | } |
| | | }, |
| | | // æå |
| | | stop() { |
| | | this.cancelAnimationFrame(this.rAF); |
| | | }, |
| | | // éæ°å¼å§(æåçæ
åµä¸) |
| | | resume() { |
| | | if (!this.remaining) return |
| | | this.startTime = 0; |
| | | this.localDuration = this.remaining; |
| | | this.localStartVal = this.printVal; |
| | | this.requestAnimationFrame(this.count); |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.startTime = null; |
| | | this.cancelAnimationFrame(this.rAF); |
| | | this.displayValue = this.formatNumber(this.startVal); |
| | | }, |
| | | count(timestamp) { |
| | | if (!this.startTime) this.startTime = timestamp; |
| | | this.timestamp = timestamp; |
| | | const progress = timestamp - this.startTime; |
| | | this.remaining = this.localDuration - progress; |
| | | if (this.useEasing) { |
| | | if (this.countDown) { |
| | | this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration); |
| | | } else { |
| | | this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration); |
| | | } |
| | | } else { |
| | | if (this.countDown) { |
| | | this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration); |
| | | } else { |
| | | this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration); |
| | | } |
| | | } |
| | | if (this.countDown) { |
| | | this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal; |
| | | } else { |
| | | this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal; |
| | | } |
| | | this.displayValue = this.formatNumber(this.printVal) || 0; |
| | | if (progress < this.localDuration) { |
| | | this.rAF = this.requestAnimationFrame(this.count); |
| | | } else { |
| | | this.$emit('end'); |
| | | } |
| | | }, |
| | | // 夿æ¯å¦æ°å |
| | | isNumber(val) { |
| | | return !isNaN(parseFloat(val)); |
| | | }, |
| | | formatNumber(num) { |
| | | // å°num转为Numberç±»åï¼å 为å
¶å¼å¯è½ä¸ºå符串æ°å¼ï¼è°ç¨toFixed伿¥é |
| | | num = Number(num); |
| | | num = num.toFixed(Number(this.decimals)); |
| | | num += ''; |
| | | const x = num.split('.'); |
| | | let x1 = x[0]; |
| | | const x2 = x.length > 1 ? this.decimal + x[1] : ''; |
| | | const rgx = /(\d+)(\d{3})/; |
| | | if (this.separator && !this.isNumber(this.separator)) { |
| | | while (rgx.test(x1)) { |
| | | x1 = x1.replace(rgx, '$1' + this.separator + '$2'); |
| | | } |
| | | } |
| | | return x1 + x2; |
| | | }, |
| | | destroyed() { |
| | | this.cancelAnimationFrame(this.rAF); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-count-num { |
| | | /* #ifndef APP-NVUE */ |
| | | display: inline-flex; |
| | | /* #endif */ |
| | | text-align: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦æå¼ç»ä»¶ |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.datetimePicker.show |
| | | }, |
| | | // æ¯å¦å±ç¤ºé¡¶é¨çæä½æ |
| | | showToolbar: { |
| | | type: Boolean, |
| | | default: uni.$u.props.datetimePicker.showToolbar |
| | | }, |
| | | // ç»å®å¼ |
| | | value: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.datetimePicker.value |
| | | }, |
| | | // 顶鍿 é¢ |
| | | title: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.title |
| | | }, |
| | | // å±ç¤ºæ ¼å¼ï¼mode=dateä¸ºæ¥æéæ©ï¼mode=time为æ¶é´éæ©ï¼mode=year-month为年æéæ©ï¼mode=datetimeä¸ºæ¥ææ¶é´éæ© |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.mode |
| | | }, |
| | | // å¯éçæå¤§æ¶é´ |
| | | maxDate: { |
| | | type: Number, |
| | | // æå¤§é»è®¤å¼ä¸ºå10å¹´ |
| | | default: uni.$u.props.datetimePicker.maxDate |
| | | }, |
| | | // å¯éçæå°æ¶é´ |
| | | minDate: { |
| | | type: Number, |
| | | // æå°é»è®¤å¼ä¸ºå10å¹´ |
| | | default: uni.$u.props.datetimePicker.minDate |
| | | }, |
| | | // å¯éçæå°å°æ¶ï¼ä»
mode=timeææ |
| | | minHour: { |
| | | type: Number, |
| | | default: uni.$u.props.datetimePicker.minHour |
| | | }, |
| | | // å¯éçæå¤§å°æ¶ï¼ä»
mode=timeææ |
| | | maxHour: { |
| | | type: Number, |
| | | default: uni.$u.props.datetimePicker.maxHour |
| | | }, |
| | | // å¯éçæå°åéï¼ä»
mode=timeææ |
| | | minMinute: { |
| | | type: Number, |
| | | default: uni.$u.props.datetimePicker.minMinute |
| | | }, |
| | | // å¯éçæå¤§åéï¼ä»
mode=timeææ |
| | | maxMinute: { |
| | | type: Number, |
| | | default: uni.$u.props.datetimePicker.maxMinute |
| | | }, |
| | | // éé¡¹è¿æ»¤å½æ° |
| | | filter: { |
| | | type: [Function, null], |
| | | default: uni.$u.props.datetimePicker.filter |
| | | }, |
| | | // éé¡¹æ ¼å¼å彿° |
| | | formatter: { |
| | | type: [Function, null], |
| | | default: uni.$u.props.datetimePicker.formatter |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå è½½ä¸ç¶æ |
| | | loading: { |
| | | type: Boolean, |
| | | default: uni.$u.props.datetimePicker.loading |
| | | }, |
| | | // ååä¸ï¼å个é项çé«åº¦ |
| | | itemHeight: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.datetimePicker.itemHeight |
| | | }, |
| | | // åæ¶æé®çæå |
| | | cancelText: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.cancelText |
| | | }, |
| | | // 确认æé®çæå |
| | | confirmText: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.confirmText |
| | | }, |
| | | // åæ¶æé®çé¢è² |
| | | cancelColor: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.cancelColor |
| | | }, |
| | | // 确认æé®çé¢è² |
| | | confirmColor: { |
| | | type: String, |
| | | default: uni.$u.props.datetimePicker.confirmColor |
| | | }, |
| | | // æ¯åä¸å¯è§éé¡¹çæ°é |
| | | visibleItemCount: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.datetimePicker.visibleItemCount |
| | | }, |
| | | // æ¯å¦å
许ç¹å»é®ç½©å
³ééæ©å¨ |
| | | closeOnClickOverlay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.datetimePicker.closeOnClickOverlay |
| | | }, |
| | | // ååçé»è®¤ç´¢å¼ |
| | | defaultIndex: { |
| | | type: Array, |
| | | default: uni.$u.props.datetimePicker.defaultIndex |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-picker |
| | | ref="picker" |
| | | :show="show" |
| | | :closeOnClickOverlay="closeOnClickOverlay" |
| | | :columns="columns" |
| | | :title="title" |
| | | :itemHeight="itemHeight" |
| | | :showToolbar="showToolbar" |
| | | :visibleItemCount="visibleItemCount" |
| | | :defaultIndex="innerDefaultIndex" |
| | | :cancelText="cancelText" |
| | | :confirmText="confirmText" |
| | | :cancelColor="cancelColor" |
| | | :confirmColor="confirmColor" |
| | | @close="close" |
| | | @cancel="cancel" |
| | | @confirm="confirm" |
| | | @change="change" |
| | | > |
| | | </u-picker> |
| | | </template> |
| | | |
| | | <script> |
| | | function times(n, iteratee) { |
| | | let index = -1 |
| | | const result = Array(n < 0 ? 0 : n) |
| | | while (++index < n) { |
| | | result[index] = iteratee(index) |
| | | } |
| | | return result |
| | | } |
| | | import props from './props.js'; |
| | | import dayjs from '../../libs/util/dayjs.js'; |
| | | /** |
| | | * DatetimePicker æ¶é´æ¥æéæ©å¨ |
| | | * @description æ¤éæ©å¨ç¨äºæ¶é´æ¥æ |
| | | * @tutorial https://www.uviewui.com/components/datetimePicker.html |
| | | * @property {Boolean} show ç¨äºæ§å¶éæ©å¨çå¼¹åºä¸æ¶èµ· ( é»è®¤ false ) |
| | | * @property {Boolean} showToolbar æ¯å¦æ¾ç¤ºé¡¶é¨çæä½æ ( é»è®¤ true ) |
| | | * @property {String | Number} value ç»å®å¼ |
| | | * @property {String} title 顶鍿 é¢ |
| | | * @property {String} mode å±ç¤ºæ ¼å¼ mode=dateä¸ºæ¥æéæ©ï¼mode=time为æ¶é´éæ©ï¼mode=year-month为年æéæ©ï¼mode=datetimeä¸ºæ¥ææ¶é´éæ© ( é»è®¤ âdatetime ) |
| | | * @property {Number} maxDate å¯éçæå¤§æ¶é´ é»è®¤å¼ä¸ºå10å¹´ |
| | | * @property {Number} minDate å¯éçæå°æ¶é´ é»è®¤å¼ä¸ºå10å¹´ |
| | | * @property {Number} minHour å¯éçæå°å°æ¶ï¼ä»
mode=timeææ ( é»è®¤ 0 ) |
| | | * @property {Number} maxHour å¯éçæå¤§å°æ¶ï¼ä»
mode=timeææ ( é»è®¤ 23 ) |
| | | * @property {Number} minMinute å¯éçæå°åéï¼ä»
mode=timeææ ( é»è®¤ 0 ) |
| | | * @property {Number} maxMinute å¯éçæå¤§åéï¼ä»
mode=timeææ ( é»è®¤ 59 ) |
| | | * @property {Function} filter éé¡¹è¿æ»¤å½æ° |
| | | * @property {Function} formatter éé¡¹æ ¼å¼å彿° |
| | | * @property {Boolean} loading æ¯å¦æ¾ç¤ºå è½½ä¸ç¶æ ( é»è®¤ false ) |
| | | * @property {String | Number} itemHeight ååä¸ï¼å个é项çé«åº¦ ( é»è®¤ 44 ) |
| | | * @property {String} cancelText åæ¶æé®çæå ( é»è®¤ 'åæ¶' ) |
| | | * @property {String} confirmText 确认æé®çæå ( é»è®¤ '确认' ) |
| | | * @property {String} cancelColor åæ¶æé®çé¢è² ( é»è®¤ '#909193' ) |
| | | * @property {String} confirmColor 确认æé®çé¢è² ( é»è®¤ '#3c9cff' ) |
| | | * @property {String | Number} visibleItemCount æ¯åä¸å¯è§éé¡¹çæ°é ( é»è®¤ 5 ) |
| | | * @property {Boolean} closeOnClickOverlay æ¯å¦å
许ç¹å»é®ç½©å
³ééæ©å¨ ( é»è®¤ false ) |
| | | * @property {Array} defaultIndex ååçé»è®¤ç´¢å¼ |
| | | * @event {Function} close å
³é鿩卿¶è§¦å |
| | | * @event {Function} confirm ç¹å»ç¡®å®æé®ï¼è¿åå½åéæ©çå¼ |
| | | * @event {Function} change å½éæ©å¼ååæ¶è§¦å |
| | | * @event {Function} cancel ç¹å»åæ¶æé® |
| | | * @example <u-datetime-picker :show="show" :value="value1" mode="datetime" ></u-datetime-picker> |
| | | */ |
| | | export default { |
| | | name: 'datetime-picker', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | columns: [], |
| | | innerDefaultIndex: [], |
| | | innerFormatter: (type, value) => value |
| | | } |
| | | }, |
| | | watch: { |
| | | show(newValue, oldValue) { |
| | | if (newValue) { |
| | | this.updateColumnValue(this.innerValue) |
| | | } |
| | | }, |
| | | propsChange() { |
| | | this.init() |
| | | } |
| | | }, |
| | | computed: { |
| | | // 妿以ä¸è¿äºåéåçäºååï¼æå³çéè¦éæ°åå§åååçå¼ |
| | | propsChange() { |
| | | return [this.mode, this.maxDate, this.minDate, this.minHour, this.maxHour, this.minMinute, this.maxMinute, this.filter, ] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.innerValue = this.correctValue(this.value) |
| | | this.updateColumnValue(this.innerValue) |
| | | }, |
| | | // å¨å¾®ä¿¡å°ç¨åºä¸ï¼ä¸æ¯æå°å½æ°å½åpropsåæ°ï¼æ
åªè½éè¿refå½¢å¼è°ç¨ |
| | | setFormatter(e) { |
| | | this.innerFormatter = e |
| | | }, |
| | | // å
³ééæ©å¨ |
| | | close() { |
| | | if (this.closeOnClickOverlay) { |
| | | this.$emit('close') |
| | | } |
| | | }, |
| | | // ç¹å»å·¥å
·æ çåæ¶æé® |
| | | cancel() { |
| | | this.$emit('cancel') |
| | | }, |
| | | // ç¹å»å·¥å
·æ çç¡®å®æé® |
| | | confirm() { |
| | | this.$emit('confirm', { |
| | | value: this.innerValue, |
| | | mode: this.mode |
| | | }) |
| | | this.$emit('input', this.innerValue) |
| | | }, |
| | | //ç¨æ£åæªåè¾åºå¼,å½åºç°å¤ç»æ°åæ¶,æåºé误 |
| | | intercept(e,type){ |
| | | let judge = e.match(/\d+/g) |
| | | //夿æ¯å¦æºææ°å |
| | | if(judge.length>1){ |
| | | uni.$u.error("请å¿å¨è¿æ»¤ææ ¼å¼å彿°æ¶æ·»å æ°å") |
| | | return 0 |
| | | }else if(type&&judge[0].length==4){//夿æ¯å¦æ¯å¹´ä»½ |
| | | return judge[0] |
| | | }else if(judge[0].length>2){ |
| | | uni.$u.error("请å¿å¨è¿æ»¤ææ ¼å¼å彿°æ¶æ·»å æ°å") |
| | | return 0 |
| | | }else{ |
| | | return judge[0] |
| | | } |
| | | }, |
| | | // ååçååæ¶è§¦å |
| | | change(e) { |
| | | const { indexs, values } = e |
| | | let selectValue = '' |
| | | if(this.mode === 'time') { |
| | | // æ ¹æ®valueååç´¢å¼ï¼ä»ååæ°ç»ä¸ï¼ååºå½åæ¶é´çéä¸å¼ |
| | | selectValue = `${this.intercept(values[0][indexs[0]])}:${this.intercept(values[1][indexs[1]])}` |
| | | } else { |
| | | // å°éæ©çå¼è½¬ä¸ºæ°å¼ï¼æ¯å¦'03'转为æ°å¼ç3ï¼'2019'转为æ°å¼ç2019 |
| | | const year = parseInt(this.intercept(values[0][indexs[0]],'year')) |
| | | const month = parseInt(this.intercept(values[1][indexs[1]])) |
| | | let date = parseInt(values[2] ? this.intercept(values[2][indexs[2]]) : 1) |
| | | let hour = 0, minute = 0 |
| | | // æ¤æä»½çæå¤§å¤©æ° |
| | | const maxDate = dayjs(`${year}-${month}`).daysInMonth() |
| | | // year-month模å¼ä¸ï¼dateä¸ä¼åºç°å¨åä¸ï¼è®¾ç½®ä¸º1ï¼ä¸ºäºç¬¦ååè¾¹éè¦å1çéæ± |
| | | if (this.mode === 'year-month') { |
| | | date = 1 |
| | | } |
| | | // ä¸å
许è¶
è¿maxDateå¼ |
| | | date = Math.min(maxDate, date) |
| | | if (this.mode === 'datetime') { |
| | | hour = parseInt(this.intercept(values[3][indexs[3]])) |
| | | minute = parseInt(this.intercept(values[4][indexs[4]])) |
| | | } |
| | | // 转为æ¶é´æ¨¡å¼ |
| | | selectValue = Number(new Date(year, month - 1, date, hour, minute)) |
| | | } |
| | | // ååºåç¡®çåæ³å¼ï¼é²æ¢è¶
è¶è¾¹ççæ
åµ |
| | | selectValue = this.correctValue(selectValue) |
| | | this.innerValue = selectValue |
| | | this.updateColumnValue(selectValue) |
| | | // ååºchangeæ¶é´ï¼value为å½åéä¸çæ¶é´æ³ |
| | | this.$emit('change', { |
| | | value: selectValue, |
| | | // #ifndef MP-WEIXIN |
| | | // 微信å°ç¨åºä¸è½ä¼ éthiså®ä¾ï¼ä¼å 为循ç¯å¼ç¨èæ¥é |
| | | picker: this.$refs.picker, |
| | | // #endif |
| | | mode: this.mode |
| | | }) |
| | | }, |
| | | // æ´æ°ååçå¼ï¼è¿è¡è¡¥0ãæ ¼å¼åçæä½ |
| | | updateColumnValue(value) { |
| | | this.innerValue = value |
| | | this.updateColumns() |
| | | this.updateIndexs(value) |
| | | }, |
| | | // æ´æ°ç´¢å¼ |
| | | updateIndexs(value) { |
| | | let values = [] |
| | | const formatter = this.formatter || this.innerFormatter |
| | | const padZero = uni.$u.padZero |
| | | if (this.mode === 'time') { |
| | | // å°time模å¼çæ¶é´ç¨:åéææ°ç» |
| | | const timeArr = value.split(':') |
| | | // 使ç¨formatteræ ¼å¼åæ¹æ³è¿è¡ç®¡éå¤ç |
| | | values = [formatter('hour', timeArr[0]), formatter('minute', timeArr[1])] |
| | | } else { |
| | | const date = new Date(value) |
| | | values = [ |
| | | formatter('year', `${dayjs(value).year()}`), |
| | | // æä»½è¡¥0 |
| | | formatter('month', padZero(dayjs(value).month() + 1)) |
| | | ] |
| | | if (this.mode === 'date') { |
| | | // date模å¼ï¼éè¦æ·»å 天å |
| | | values.push(formatter('day', padZero(dayjs(value).date()))) |
| | | } |
| | | if (this.mode === 'datetime') { |
| | | // æ°ç»çpushæ¹æ³ï¼å¯ä»¥åå
¥å¤ä¸ªåæ° |
| | | values.push(formatter('day', padZero(dayjs(value).date())), formatter('hour', padZero(dayjs(value).hour())), formatter('minute', padZero(dayjs(value).minute()))) |
| | | } |
| | | } |
| | | |
| | | // æ ¹æ®å½åååçææå¼ï¼ä»ååé»è®¤å¼ä¸æ¾å°é»è®¤å¼å¨ååä¸çç´¢å¼ |
| | | const indexs = this.columns.map((column, index) => { |
| | | // éè¿å大å¼ï¼å¯ä»¥ä¿è¯ä¸ä¼åºç°æ¾ä¸å°ç´¢å¼ç-1æ
åµ |
| | | return Math.max(0, column.findIndex(item => item === values[index])) |
| | | }) |
| | | this.innerDefaultIndex = indexs |
| | | }, |
| | | // æ´æ°ååçå¼ |
| | | updateColumns() { |
| | | const formatter = this.formatter || this.innerFormatter |
| | | // è·åååçå¼ï¼å¹¶ä¸mapåï¼å¯¹ååçå
·ä½å¼è¿è¡è¡¥0æä½ |
| | | const results = this.getOriginColumns().map((column) => column.values.map((value) => formatter(column.type, value))) |
| | | this.columns = results |
| | | }, |
| | | getOriginColumns() { |
| | | // çæååçå¼ |
| | | const results = this.getRanges().map(({ type, range }) => { |
| | | let values = times(range[1] - range[0] + 1, (index) => { |
| | | let value = range[0] + index |
| | | value = type === 'year' ? `${value}` : uni.$u.padZero(value) |
| | | return value |
| | | }) |
| | | // è¿è¡è¿æ»¤ |
| | | if (this.filter) { |
| | | values = this.filter(type, values) |
| | | } |
| | | return { type, values } |
| | | }) |
| | | return results |
| | | }, |
| | | // éè¿æå¤§å¼åæå°å¼çææ°ç» |
| | | generateArray(start, end) { |
| | | return Array.from(new Array(end + 1).keys()).slice(start) |
| | | }, |
| | | // å¾åºåæ³çæ¶é´ |
| | | correctValue(value) { |
| | | const isDateMode = this.mode !== 'time' |
| | | if (isDateMode && !uni.$u.test.date(value)) { |
| | | // å¦ææ¯æ¥æç±»åï¼ä½æ¯å没æè®¾ç½®åæ³çå½åæ¶é´çè¯ï¼ä½¿ç¨æå°æ¶é´ä¸ºå½åæ¶é´ |
| | | value = this.minDate |
| | | } else if (!isDateMode && !value) { |
| | | // å¦ææ¯æ¶é´ç±»åï¼èåæ²¡æé»è®¤å¼çè¯ï¼å°±ç¨æå°æ¶é´ |
| | | value = `${uni.$u.padZero(this.minHour)}:${uni.$u.padZero(this.minMinute)}` |
| | | } |
| | | // æ¶é´ç±»å |
| | | if (!isDateMode) { |
| | | if (String(value).indexOf(':') === -1) return uni.$u.error('æ¶é´é误ï¼è¯·ä¼ éå¦12:24çæ ¼å¼') |
| | | let [hour, minute] = value.split(':') |
| | | // 对æ¶é´è¡¥é¶ï¼åæ¶æ§å¶å¨æå°å¼åæå¤§å¼ä¹é´ |
| | | hour = uni.$u.padZero(uni.$u.range(this.minHour, this.maxHour, Number(hour))) |
| | | minute = uni.$u.padZero(uni.$u.range(this.minMinute, this.maxMinute, Number(minute))) |
| | | return `${ hour }:${ minute }` |
| | | } else { |
| | | // å¦ææ¯æ¥ææ ¼å¼ï¼æ§å¶å¨æå°æ¥æåæå¤§æ¥æä¹é´ |
| | | value = dayjs(value).isBefore(dayjs(this.minDate)) ? this.minDate : value |
| | | value = dayjs(value).isAfter(dayjs(this.maxDate)) ? this.maxDate : value |
| | | return value |
| | | } |
| | | }, |
| | | // è·åæ¯åçæå¤§åæå°å¼ |
| | | getRanges() { |
| | | if (this.mode === 'time') { |
| | | return [ |
| | | { |
| | | type: 'hour', |
| | | range: [this.minHour, this.maxHour], |
| | | }, |
| | | { |
| | | type: 'minute', |
| | | range: [this.minMinute, this.maxMinute], |
| | | }, |
| | | ]; |
| | | } |
| | | const { maxYear, maxDate, maxMonth, maxHour, maxMinute, } = this.getBoundary('max', this.innerValue); |
| | | const { minYear, minDate, minMonth, minHour, minMinute, } = this.getBoundary('min', this.innerValue); |
| | | const result = [ |
| | | { |
| | | type: 'year', |
| | | range: [minYear, maxYear], |
| | | }, |
| | | { |
| | | type: 'month', |
| | | range: [minMonth, maxMonth], |
| | | }, |
| | | { |
| | | type: 'day', |
| | | range: [minDate, maxDate], |
| | | }, |
| | | { |
| | | type: 'hour', |
| | | range: [minHour, maxHour], |
| | | }, |
| | | { |
| | | type: 'minute', |
| | | range: [minMinute, maxMinute], |
| | | }, |
| | | ]; |
| | | if (this.mode === 'date') |
| | | result.splice(3, 2); |
| | | if (this.mode === 'year-month') |
| | | result.splice(2, 3); |
| | | return result; |
| | | }, |
| | | // æ ¹æ®minDateãmaxDateãminHourãmaxHourçè¾¹çå¼ï¼å¤æååçå¼å§åç»æè¾¹çå¼ |
| | | getBoundary(type, innerValue) { |
| | | const value = new Date(innerValue) |
| | | const boundary = new Date(this[`${type}Date`]) |
| | | const year = dayjs(boundary).year() |
| | | let month = 1 |
| | | let date = 1 |
| | | let hour = 0 |
| | | let minute = 0 |
| | | if (type === 'max') { |
| | | month = 12 |
| | | // æä»½çå¤©æ° |
| | | date = dayjs(value).daysInMonth() |
| | | hour = 23 |
| | | minute = 59 |
| | | } |
| | | // è·åè¾¹çå¼ï¼é»è¾æ¯ï¼å½å¹´è¾¾å°äºè¾¹çå¼(æå¤§ææå°å¹´)ï¼å°±æ£æ¥æå
许çæå¤§åæå°å¼ï¼ä»¥æ¤ç±»æ¨ |
| | | if (dayjs(value).year() === year) { |
| | | month = dayjs(boundary).month() + 1 |
| | | if (dayjs(value).month() + 1 === month) { |
| | | date = dayjs(boundary).date() |
| | | if (dayjs(value).date() === date) { |
| | | hour = dayjs(boundary).hour() |
| | | if (dayjs(value).hour() === hour) { |
| | | minute = dayjs(boundary).minute() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | [`${type}Year`]: year, |
| | | [`${type}Month`]: month, |
| | | [`${type}Date`]: date, |
| | | [`${type}Hour`]: hour, |
| | | [`${type}Minute`]: minute |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦è线 |
| | | dashed: { |
| | | type: Boolean, |
| | | default: uni.$u.props.divider.dashed |
| | | }, |
| | | // æ¯å¦ç»çº¿ |
| | | hairline: { |
| | | type: Boolean, |
| | | default: uni.$u.props.divider.hairline |
| | | }, |
| | | // æ¯å¦ä»¥ç¹æ¿ä»£æåï¼ä¼å
äºtextåæ®µèµ·ä½ç¨ |
| | | dot: { |
| | | type: Boolean, |
| | | default: uni.$u.props.divider.dot |
| | | }, |
| | | // å
å®¹ææ¬çä½ç½®ï¼left-左边ï¼center-ä¸é´ï¼right-å³è¾¹ |
| | | textPosition: { |
| | | type: String, |
| | | default: uni.$u.props.divider.textPosition |
| | | }, |
| | | // ææ¬å
容 |
| | | text: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.divider.text |
| | | }, |
| | | // ææ¬å¤§å° |
| | | textSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.divider.textSize |
| | | }, |
| | | // ææ¬é¢è² |
| | | textColor: { |
| | | type: String, |
| | | default: uni.$u.props.divider.textColor |
| | | }, |
| | | // 线æ¡é¢è² |
| | | lineColor: { |
| | | type: String, |
| | | default: uni.$u.props.divider.lineColor |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-divider" |
| | | :style="[$u.addStyle(customStyle)]" |
| | | @tap="click" |
| | | > |
| | | <u-line |
| | | :color="lineColor" |
| | | :customStyle="leftLineStyle" |
| | | :hairline="hairline" |
| | | :dashed="dashed" |
| | | ></u-line> |
| | | <text |
| | | v-if="dot" |
| | | class="u-divider__dot" |
| | | >â</text> |
| | | <text |
| | | v-else-if="text" |
| | | class="u-divider__text" |
| | | :style="[textStyle]" |
| | | >{{text}}</text> |
| | | <u-line |
| | | :color="lineColor" |
| | | :customStyle="rightLineStyle" |
| | | :hairline="hairline" |
| | | :dashed="dashed" |
| | | ></u-line> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * divider åå²çº¿ |
| | | * @description åºéå
容çåå²çº¿ï¼ä¸è¬ç¨äºé¡µé¢åºé¨"æ²¡ææ´å¤"çæç¤ºã |
| | | * @tutorial https://www.uviewui.com/components/divider.html |
| | | * @property {Boolean} dashed æ¯å¦è线 ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} hairline æ¯å¦ç»çº¿ ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} dot æ¯å¦ä»¥ç¹æ¿ä»£æåï¼ä¼å
äºtextåæ®µèµ·ä½ç¨ ï¼é»è®¤ false ï¼ |
| | | * @property {String} textPosition å
å®¹ææ¬çä½ç½®ï¼left-左边ï¼center-ä¸é´ï¼right-å³è¾¹ ï¼é»è®¤ 'center' ï¼ |
| | | * @property {String | Number} text ææ¬å
容 |
| | | * @property {String | Number} textSize ææ¬å¤§å° ï¼é»è®¤ 14ï¼ |
| | | * @property {String} textColor ææ¬é¢è² ï¼é»è®¤ '#909399' ï¼ |
| | | * @property {String} lineColor 线æ¡é¢è² ï¼é»è®¤ '#dcdfe6' ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click dividerç»ä»¶è¢«ç¹å»æ¶è§¦å |
| | | * @example <u-divider :color="color">é¦çæ 端äºå弦</u-divider> |
| | | */ |
| | | export default { |
| | | name:'u-divider', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | textStyle() { |
| | | const style = {} |
| | | style.fontSize = uni.$u.addUnit(this.textSize) |
| | | style.color = this.textColor |
| | | return style |
| | | }, |
| | | // 左边线æ¡ççæ ·å¼ |
| | | leftLineStyle() { |
| | | const style = {} |
| | | // 妿æ¯å¨å·¦è¾¹ï¼è®¾ç½®å·¦è¾¹ç宽度为åºå®å¼ |
| | | if (this.textPosition === 'left') { |
| | | style.width = '80rpx' |
| | | } else { |
| | | style.flex = 1 |
| | | } |
| | | return style |
| | | }, |
| | | // å³è¾¹çº¿æ¡ççæ ·å¼ |
| | | rightLineStyle() { |
| | | const style = {} |
| | | // 妿æ¯å¨å³è¾¹ï¼è®¾ç½®å³è¾¹ç宽度为åºå®å¼ |
| | | if (this.textPosition === 'right') { |
| | | style.width = '80rpx' |
| | | } else { |
| | | style.flex = 1 |
| | | } |
| | | return style |
| | | } |
| | | }, |
| | | methods: { |
| | | // dividerç»ä»¶è¢«ç¹å»æ¶è§¦å |
| | | click() { |
| | | this.$emit('click'); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | $u-divider-margin:15px 0 !default; |
| | | $u-divider-text-margin:0 15px !default; |
| | | $u-divider-dot-font-size:12px !default; |
| | | $u-divider-dot-margin:0 12px !default; |
| | | $u-divider-dot-color: #c0c4cc !default; |
| | | |
| | | .u-divider { |
| | | @include flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin: $u-divider-margin; |
| | | |
| | | &__text { |
| | | margin: $u-divider-text-margin; |
| | | } |
| | | |
| | | &__dot { |
| | | font-size: $u-divider-dot-font-size; |
| | | margin: $u-divider-dot-margin; |
| | | color: $u-divider-dot-color; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å½åéä¸é¡¹çvalueå¼ |
| | | value: { |
| | | type: [Number, String, Array], |
| | | default: '' |
| | | }, |
| | | // èå项æ é¢ |
| | | title: { |
| | | type: [String, Number], |
| | | default: '' |
| | | }, |
| | | // éé¡¹æ°æ®ï¼å¦æä¼ å
¥äºé»è®¤slotï¼æ¤åæ°æ æ |
| | | options: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | // æ¯å¦ç¦ç¨æ¤èå项 |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // 䏿弹çªçé«åº¦ |
| | | height: { |
| | | type: [Number, String], |
| | | default: 'auto' |
| | | }, |
| | | // ç¹å»é®ç½©æ¯å¦å¯ä»¥æ¶èµ·å¼¹çª |
| | | closeOnClickOverlay: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-drawdown-item"> |
| | | <u-overlay |
| | | customStyle="top: 126px" |
| | | :show="show" |
| | | :closeOnClickOverlay="closeOnClickOverlay" |
| | | @click="overlayClick" |
| | | ></u-overlay> |
| | | <view |
| | | class="u-drawdown-item__content" |
| | | :style="[style]" |
| | | :animation="animationData" |
| | | ref="animation" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // #ifdef APP-NVUE |
| | | const animation = uni.requireNativePlugin('animation') |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | import props from './props.js'; |
| | | /** |
| | | * Drawdownitem |
| | | * @description |
| | | * @tutorial url |
| | | * @property {String} |
| | | * @event {Function} |
| | | * @example |
| | | */ |
| | | export default { |
| | | name: 'u-drawdown-item', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | show: false, |
| | | top: '126px', |
| | | // uni.createAnimationçå¯¼åºæ°æ® |
| | | animationData: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | watch: { |
| | | // åçååæ¶ï¼éè¦å»æ´æ°ç¶ç»ä»¶å¯¹åºçå¼ |
| | | dataChange(newValue, oldValue) { |
| | | this.updateParentData() |
| | | } |
| | | }, |
| | | computed: { |
| | | // çå¬å¯¹åºåéçåå |
| | | dataChange() { |
| | | return [this.title, this.disabled] |
| | | }, |
| | | style() { |
| | | const style = { |
| | | zIndex: 10071, |
| | | position: 'fixed', |
| | | display: 'flex', |
| | | left: 0, |
| | | right: 0 |
| | | } |
| | | style.top = uni.$u.addUnit(this.top) |
| | | return style |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.updateParentData() |
| | | }, |
| | | // æ´æ°ç¶ç»ä»¶æéçæ°æ® |
| | | updateParentData() { |
| | | // è·åç¶ç»ä»¶u-dropdown |
| | | this.getParentData('u-dropdown') |
| | | if (!this.parent) uni.$u.error('u-dropdown-itemå¿
é¡»é
åu-dropdown使ç¨') |
| | | // æ¥æ¾ç¶ç»ä»¶menuListæ°ç»ä¸å¯¹åºçæ 颿°æ® |
| | | const menuIndex = this.parent.menuList.findIndex(item => item.title === this.title) |
| | | const menuContent = { |
| | | title: this.title, |
| | | disabled: this.disabled |
| | | } |
| | | if (menuIndex >= 0) { |
| | | // å¦æè½æ¾å°ï¼åç´æ¥ä¿®æ¹ |
| | | this.parent.menuList[menuIndex] = menuContent; |
| | | } else { |
| | | // å¦ææ æ³æ¾å°ï¼åä¸ºç¬¬ä¸æ¬¡æ·»å ï¼ç´æ¥pushå³å¯ |
| | | this.parent.menuList.push(menuContent); |
| | | } |
| | | }, |
| | | async setContentAnimate(height) { |
| | | this.animating = true |
| | | // #ifdef APP-NVUE |
| | | const ref = this.$refs['animation'].ref |
| | | animation.transition(ref, { |
| | | styles: { |
| | | height: uni.$u.addUnit(height) |
| | | }, |
| | | duration: this.duration, |
| | | timingFunction: 'ease-in-out', |
| | | }, () => { |
| | | this.animating = false |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifndef APP-NVUE |
| | | const animation = uni.createAnimation({ |
| | | timingFunction: 'ease-in-out', |
| | | }); |
| | | animation |
| | | .height(height) |
| | | .step({ |
| | | duration: this.duration, |
| | | }) |
| | | .step() |
| | | // 导åºå¨ç»æ°æ®ç»é¢æ¿çanimationDataå¼ |
| | | this.animationData = animation.export() |
| | | // æ è¯å¨ç»ç»æ |
| | | uni.$u.sleep(this.duration).then(() => { |
| | | this.animating = false |
| | | }) |
| | | // #endif |
| | | }, |
| | | overlayClick() { |
| | | this.show = false |
| | | this.setContentAnimate(0) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | |
| | | .u-drawdown-item { |
| | | |
| | | &__content { |
| | | background-color: #FFFFFF; |
| | | overflow: hidden; |
| | | height: 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ é¢é䏿¶çæ ·å¼ |
| | | activeStyle: { |
| | | type: [String, Object], |
| | | default: () => ({ |
| | | color: '#2979ff', |
| | | fontSize: '14px' |
| | | }) |
| | | }, |
| | | // æ 颿ªé䏿¶çæ ·å¼ |
| | | inactiveStyle: { |
| | | type: [String, Object], |
| | | default: () => ({ |
| | | color: '#606266', |
| | | fontSize: '14px' |
| | | }) |
| | | }, |
| | | // ç¹å»é®ç½©æ¯å¦å
³éèå |
| | | closeOnClickMask: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // ç¹å»å½åæ¿æ´»é¡¹æ 颿¯å¦å
³éèå |
| | | closeOnClickSelf: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // è¿æ¸¡æ¶é´ |
| | | duration: { |
| | | type: [Number, String], |
| | | default: 300 |
| | | }, |
| | | // æ é¢èåçé«åº¦ |
| | | height: { |
| | | type: [Number, String], |
| | | default: 40 |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºä¸è¾¹æ¡ |
| | | borderBottom: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // æ é¢çåä½å¤§å° |
| | | titleSize: { |
| | | type: [Number, String], |
| | | default: 14 |
| | | }, |
| | | // ä¸æåºæ¥çå
容é¨åçåè§å¼ |
| | | borderRadius: { |
| | | type: [Number, String], |
| | | default: 0 |
| | | }, |
| | | // èåå³ä¾§çicon徿 |
| | | menuIcon: { |
| | | type: String, |
| | | default: 'arrow-down' |
| | | }, |
| | | // èåå³ä¾§å¾æ çå¤§å° |
| | | menuIconSize: { |
| | | type: [Number, String], |
| | | default: 14 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-drawdown"> |
| | | <view |
| | | class="u-dropdown__menu" |
| | | :style="{ |
| | | height: $u.addUnit(height) |
| | | }" |
| | | ref="u-dropdown__menu" |
| | | > |
| | | <view |
| | | class="u-dropdown__menu__item" |
| | | v-for="(item, index) in menuList" |
| | | :key="index" |
| | | @tap.stop="clickHandler(item, index)" |
| | | > |
| | | <view class="u-dropdown__menu__item__content"> |
| | | <text |
| | | class="u-dropdown__menu__item__content__text" |
| | | :style="[index === current ? activeStyle : inactiveStyle]" |
| | | >{{item.title}}</text> |
| | | <view |
| | | class="u-dropdown__menu__item__content__arrow" |
| | | :class="[index === current && 'u-dropdown__menu__item__content__arrow--rotate']" |
| | | > |
| | | <u-icon |
| | | :name="menuIcon" |
| | | :size="$u.addUnit(menuIconSize)" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="u-dropdown__content"> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Dropdown |
| | | * @description |
| | | * @tutorial url |
| | | * @property {String} |
| | | * @event {Function} |
| | | * @example |
| | | */ |
| | | export default { |
| | | name: 'u-dropdown', |
| | | mixins: [uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // èåæ°ç» |
| | | menuList: [], |
| | | current: 0 |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | created() { |
| | | // å¼ç¨ææåç»ä»¶(u-dropdown-item)çthisï¼ä¸è½å¨dataä¸å£°æåéï¼å¦åå¨å¾®ä¿¡å°ç¨åºä¼é æå¾ªç¯å¼ç¨èæ¥é |
| | | this.children = []; |
| | | }, |
| | | methods: { |
| | | clickHandler(item, index) { |
| | | this.children.map(child => { |
| | | if(child.title === item.title) { |
| | | // this.queryRect('u-dropdown__menu').then(size => { |
| | | child.$emit('click') |
| | | child.setContentAnimate(child.show ? 0 : 300) |
| | | child.show = !child.show |
| | | // }) |
| | | } else { |
| | | child.show = false |
| | | child.setContentAnimate(0) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åæ ç¾ç尺寸ä½ç½® |
| | | queryRect(el) { |
| | | // #ifndef APP-NVUE |
| | | // $uGetRect为uViewèªå¸¦çèç¹æ¥è¯¢ç®åæ¹æ³ï¼è¯¦è§ææ¡£ä»ç»ï¼https://www.uviewui.com/js/getRect.html |
| | | // ç»ä»¶å
é¨ä¸è¬ç¨this.$uGetRectï¼å¯¹å¤ç为this.$u.getRectï¼äºè
åè½ä¸è´ï¼åç§°ä¸å |
| | | return new Promise(resolve => { |
| | | this.$uGetRect(`.${el}`).then(size => { |
| | | resolve(size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | // nvueä¸ï¼ä½¿ç¨domæ¨¡åæ¥è¯¢å
ç´ é«åº¦ |
| | | // è¿åä¸ä¸ªpromiseï¼è®©è°ç¨æ¤æ¹æ³ç主ä½è½ä½¿ç¨thenåè° |
| | | return new Promise(resolve => { |
| | | dom.getComponentRect(this.$refs[el], res => { |
| | | resolve(res.size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '../../libs/css/components.scss'; |
| | | |
| | | .u-dropdown { |
| | | |
| | | &__menu { |
| | | @include flex; |
| | | |
| | | &__item { |
| | | flex: 1; |
| | | @include flex; |
| | | justify-content: center; |
| | | |
| | | &__content { |
| | | @include flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å
ç½®å¾æ åç§°ï¼æå¾çè·¯å¾ï¼å»ºè®®ç»å¯¹è·¯å¾ |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.empty.icon |
| | | }, |
| | | // æç¤ºæå |
| | | text: { |
| | | type: String, |
| | | default: uni.$u.props.empty.text |
| | | }, |
| | | // æåé¢è² |
| | | textColor: { |
| | | type: String, |
| | | default: uni.$u.props.empty.textColor |
| | | }, |
| | | // æåå¤§å° |
| | | textSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.empty.textSize |
| | | }, |
| | | // 徿 çé¢è² |
| | | iconColor: { |
| | | type: String, |
| | | default: uni.$u.props.empty.iconColor |
| | | }, |
| | | // 徿 çå¤§å° |
| | | iconSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.empty.iconSize |
| | | }, |
| | | // éæ©é¢ç½®ç徿 ç±»å |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.empty.mode |
| | | }, |
| | | // 徿 宽度ï¼åä½px |
| | | width: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.empty.width |
| | | }, |
| | | // 徿 é«åº¦ï¼åä½px |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.empty.height |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºç»ä»¶ |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.empty.show |
| | | }, |
| | | // ç»ä»¶è·ç¦»ä¸ä¸ä¸ªå
ç´ ä¹é´çè·ç¦»ï¼é»è®¤pxåä½ |
| | | marginTop: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.empty.marginTop |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-empty" |
| | | :style="[emptyStyle]" |
| | | v-if="show" |
| | | > |
| | | <u-icon |
| | | v-if="!isSrc" |
| | | :name="mode === 'message' ? 'chat' : `empty-${mode}`" |
| | | :size="iconSize" |
| | | :color="iconColor" |
| | | margin-top="14" |
| | | ></u-icon> |
| | | <image |
| | | v-else |
| | | :style="{ |
| | | width: $u.addUnit(width), |
| | | height: $u.addUnit(height), |
| | | }" |
| | | :src="icon" |
| | | mode="widthFix" |
| | | ></image> |
| | | <text |
| | | class="u-empty__text" |
| | | :style="[textStyle]" |
| | | >{{text ? text : icons[mode]}}</text> |
| | | <view class="u-empty__wrap" v-if="$slots.default || $slots.$default"> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | |
| | | /** |
| | | * empty å
容为空 |
| | | * @description 该ç»ä»¶ç¨äºéè¦å è½½å
容ï¼ä½æ¯å è½½ç第ä¸é¡µæ°æ®å°±ä¸ºç©ºï¼æç¤ºä¸ä¸ª"没æå
容"çåºæ¯ï¼ æä»¬ç²¾å¿æéäºåå ä¸ªåºæ¯ç徿 ï¼æ¹ä¾¿æ¨ä½¿ç¨ã |
| | | * @tutorial https://www.uviewui.com/components/empty.html |
| | | * @property {String} icon å
ç½®å¾æ åç§°ï¼æå¾çè·¯å¾ï¼å»ºè®®ç»å¯¹è·¯å¾ |
| | | * @property {String} text æç¤ºæå |
| | | * @property {String} textColor æåé¢è² (é»è®¤ '#c0c4cc' ) |
| | | * @property {String | Number} textSize æåå¤§å° ï¼é»è®¤ 14 ï¼ |
| | | * @property {String} iconColor 徿 çé¢è² ï¼é»è®¤ '#c0c4cc' ï¼ |
| | | * @property {String | Number} iconSize 徿 çå¤§å° ï¼é»è®¤ 90 ï¼ |
| | | * @property {String} mode éæ©é¢ç½®ç徿 ç±»å ï¼é»è®¤ 'data' ï¼ |
| | | * @property {String | Number} width 徿 宽度ï¼åä½px ï¼é»è®¤ 160 ï¼ |
| | | * @property {String | Number} height 徿 é«åº¦ï¼åä½px ï¼é»è®¤ 160 ï¼ |
| | | * @property {Boolean} show æ¯å¦æ¾ç¤ºç»ä»¶ ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} marginTop ç»ä»¶è·ç¦»ä¸ä¸ä¸ªå
ç´ ä¹é´çè·ç¦»ï¼é»è®¤pxåä½ ï¼é»è®¤ 0 ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @event {Function} click ç¹å»ç»ä»¶æ¶è§¦å |
| | | * @event {Function} close ç¹å»å
³éæé®æ¶è§¦å |
| | | * @example <u-empty text="æè°ä¼äººï¼å¨æ°´ä¸æ¹" mode="list"></u-empty> |
| | | */ |
| | | export default { |
| | | name: "u-empty", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | icons: { |
| | | car: 'è´ç©è½¦ä¸ºç©º', |
| | | page: '页é¢ä¸åå¨', |
| | | search: '没ææç´¢ç»æ', |
| | | address: 'æ²¡ææ¶è´§å°å', |
| | | wifi: '没æWiFi', |
| | | order: '订å为空', |
| | | coupon: '没æä¼æ å¸', |
| | | favor: 'ææ æ¶è', |
| | | permission: 'æ æé', |
| | | history: 'æ åå²è®°å½', |
| | | news: 'æ æ°é»å表', |
| | | message: 'æ¶æ¯å表为空', |
| | | list: 'å表为空', |
| | | data: 'æ°æ®ä¸ºç©º', |
| | | comment: 'ææ è¯è®º', |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // ç»ä»¶æ ·å¼ |
| | | emptyStyle() { |
| | | const style = {} |
| | | style.marginTop = uni.$u.addUnit(this.marginTop) |
| | | // åå¹¶customStyleæ ·å¼ï¼æ¤åæ°éè¿mixinä¸çpropsä¼ é |
| | | return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style) |
| | | }, |
| | | // ææ¬æ ·å¼ |
| | | textStyle() { |
| | | const style = {} |
| | | style.color = this.textColor |
| | | style.fontSize = uni.$u.addUnit(this.textSize) |
| | | return style |
| | | }, |
| | | // 夿iconæ¯å¦å¾çè·¯å¾ |
| | | isSrc() { |
| | | return this.icon.indexOf('/') >= 0 |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | $u-empty-text-margin-top:20rpx !default; |
| | | $u-empty-slot-margin-top:20rpx !default; |
| | | |
| | | .u-empty { |
| | | @include flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | &__text { |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | margin-top: $u-empty-text-margin-top; |
| | | } |
| | | } |
| | | .u-slot-wrap { |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | margin-top:$u-empty-slot-margin-top; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // inputçlabelæç¤ºè¯ |
| | | label: { |
| | | type: String, |
| | | default: uni.$u.props.formItem.label |
| | | }, |
| | | // ç»å®çå¼ |
| | | prop: { |
| | | type: String, |
| | | default: uni.$u.props.formItem.prop |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¡¨ååçä¸åçº¿è¾¹æ¡ |
| | | borderBottom: { |
| | | type: [String, Boolean], |
| | | default: uni.$u.props.formItem.borderBottom |
| | | }, |
| | | // labelç宽度ï¼åä½px |
| | | labelWidth: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.formItem.labelWidth |
| | | }, |
| | | // å³ä¾§å¾æ |
| | | rightIcon: { |
| | | type: String, |
| | | default: uni.$u.props.formItem.rightIcon |
| | | }, |
| | | // 左侧徿 |
| | | leftIcon: { |
| | | type: String, |
| | | default: uni.$u.props.formItem.leftIcon |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå·¦è¾¹çå¿
å¡«æå·ï¼åªä½æ¾ç¤ºç¨ï¼å
·ä½æ ¡éªå¿
å¡«çé»è¾ï¼è¯·å¨rulesä¸é
ç½® |
| | | required: { |
| | | type: Boolean, |
| | | default: uni.$u.props.formItem.required |
| | | }, |
| | | leftIconStyle: { |
| | | type: [String, Object], |
| | | default: uni.$u.props.formItem.leftIconStyle, |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-form-item"> |
| | | <view |
| | | class="u-form-item__body" |
| | | @tap="clickHandler" |
| | | :style="[$u.addStyle(customStyle), { |
| | | flexDirection: parentData.labelPosition === 'left' ? 'row' : 'column' |
| | | }]" |
| | | > |
| | | <!-- 微信å°ç¨åºä¸ï¼å°ä¸ä¸ªåæ°è®¾ç½®ç©ºå符串ï¼ç»æä¼åæå符串"true" --> |
| | | <slot name="label"> |
| | | <!-- {{required}} --> |
| | | <view |
| | | class="u-form-item__body__left" |
| | | v-if="required || leftIcon || label" |
| | | :style="{ |
| | | width: $u.addUnit(labelWidth || parentData.labelWidth), |
| | | marginBottom: parentData.labelPosition === 'left' ? 0 : '5px', |
| | | }" |
| | | > |
| | | <!-- 为äºåå¯¹é½ --> |
| | | <view class="u-form-item__body__left__content"> |
| | | <!-- nvue䏿¯æä¼ªå
ç´ before --> |
| | | <text |
| | | v-if="required" |
| | | class="u-form-item__body__left__content__required" |
| | | >*</text> |
| | | <view |
| | | class="u-form-item__body__left__content__icon" |
| | | v-if="leftIcon" |
| | | > |
| | | <u-icon |
| | | :name="leftIcon" |
| | | :custom-style="leftIconStyle" |
| | | ></u-icon> |
| | | </view> |
| | | <text |
| | | class="u-form-item__body__left__content__label" |
| | | :style="[parentData.labelStyle, { |
| | | justifyContent: parentData.labelAlign === 'left' ? 'flex-start' : parentData.labelAlign === 'center' ? 'center' : 'flex-end' |
| | | }]" |
| | | >{{ label }}</text> |
| | | </view> |
| | | </view> |
| | | </slot> |
| | | <view class="u-form-item__body__right"> |
| | | <view class="u-form-item__body__right__content"> |
| | | <view class="u-form-item__body__right__content__slot"> |
| | | <slot /> |
| | | </view> |
| | | <view |
| | | class="item__body__right__content__icon" |
| | | v-if="$slots.right" |
| | | > |
| | | <slot name="right" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <slot name="error"> |
| | | <text |
| | | v-if="!!message && parentData.errorType === 'message'" |
| | | class="u-form-item__body__right__message" |
| | | :style="{ |
| | | marginLeft: $u.addUnit(parentData.labelPosition === 'top' ? 0 : (labelWidth || parentData.labelWidth)) |
| | | }" |
| | | >{{ message }}</text> |
| | | </slot> |
| | | <u-line |
| | | v-if="borderBottom" |
| | | :color="message && parentData.errorType === 'border-bottom' ? $u.color.error : propsLine.color" |
| | | :customStyle="`margin-top: ${message && parentData.errorType === 'message' ? '5px' : 0}`" |
| | | ></u-line> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Form 表å |
| | | * @description æ¤ç»ä»¶ä¸è¬ç¨äºè¡¨ååºæ¯ï¼å¯ä»¥é
ç½®Inputè¾å
¥æ¡ï¼Selectå¼¹åºæ¡ï¼è¿è¡è¡¨åéªè¯çã |
| | | * @tutorial https://www.uviewui.com/components/form.html |
| | | * @property {String} label inputçlabelæç¤ºè¯ |
| | | * @property {String} prop ç»å®çå¼ |
| | | * @property {String | Boolean} borderBottom æ¯å¦æ¾ç¤ºè¡¨ååçä¸åçº¿è¾¹æ¡ |
| | | * @property {String | Number} labelWidth labelç宽度ï¼åä½px |
| | | * @property {String} rightIcon å³ä¾§å¾æ |
| | | * @property {String} leftIcon 左侧徿 |
| | | * @property {String | Object} leftIconStyle 左侧徿 çæ ·å¼ |
| | | * @property {Boolean} required æ¯å¦æ¾ç¤ºå·¦è¾¹çå¿
å¡«æå·ï¼åªä½æ¾ç¤ºç¨ï¼å
·ä½æ ¡éªå¿
å¡«çé»è¾ï¼è¯·å¨rulesä¸é
ç½® (é»è®¤ false ) |
| | | * |
| | | * @example <u-form-item label="å§å" prop="userInfo.name" borderBottom ref="item1"></u-form-item> |
| | | */ |
| | | export default { |
| | | name: 'u-form-item', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // é误æç¤ºè¯ |
| | | message: '', |
| | | parentData: { |
| | | // æç¤ºææ¬çä½ç½® |
| | | labelPosition: 'left', |
| | | // æç¤ºææ¬å¯¹é½æ¹å¼ |
| | | labelAlign: 'left', |
| | | // æç¤ºææ¬çæ ·å¼ |
| | | labelStyle: {}, |
| | | // æç¤ºææ¬ç宽度 |
| | | labelWidth: 45, |
| | | // é误æç¤ºæ¹å¼ |
| | | errorType: 'message' |
| | | } |
| | | } |
| | | }, |
| | | // ç»ä»¶åå»ºå®ææ¶ï¼å°å½åå®ä¾ä¿åå°u-formä¸ |
| | | computed: { |
| | | propsLine() { |
| | | return uni.$u.props.line |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // ç¶ç»ä»¶çå®ä¾ |
| | | this.updateParentData() |
| | | if (!this.parent) { |
| | | uni.$u.error('u-form-iteméè¦ç»åu-formç»ä»¶ä½¿ç¨') |
| | | } |
| | | }, |
| | | // è·åç¶ç»ä»¶çåæ° |
| | | updateParentData() { |
| | | // æ¤æ¹æ³åå¨mixinä¸ |
| | | this.getParentData('u-form'); |
| | | }, |
| | | // ç§»é¤u-form-itemçæ ¡éªç»æ |
| | | clearValidate() { |
| | | this.message = null |
| | | }, |
| | | // æ¸
空å½åçç»ä»¶çæ ¡éªç»æï¼å¹¶é置为åå§å¼ |
| | | resetField() { |
| | | // æ¾å°åå§å¼ |
| | | const value = uni.$u.getProperty(this.parent.originalModel, this.prop) |
| | | // å°u-formçmodelçprop屿§é¾è¿ååå§å¼ |
| | | uni.$u.setProperty(this.parent.model, this.prop, value) |
| | | // ç§»é¤æ ¡éªç»æ |
| | | this.message = null |
| | | }, |
| | | // ç¹å»ç»ä»¶ |
| | | clickHandler() { |
| | | this.$emit('click') |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-form-item { |
| | | @include flex(column); |
| | | font-size: 14px; |
| | | color: $u-main-color; |
| | | |
| | | &__body { |
| | | @include flex; |
| | | padding: 10px 0; |
| | | |
| | | &__left { |
| | | @include flex; |
| | | align-items: center; |
| | | |
| | | &__content { |
| | | position: relative; |
| | | @include flex; |
| | | align-items: center; |
| | | padding-right: 10rpx; |
| | | flex: 1; |
| | | |
| | | &__icon { |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | | &__required { |
| | | position: absolute; |
| | | left: -9px; |
| | | color: $u-error; |
| | | line-height: 20px; |
| | | font-size: 20px; |
| | | top: 3px; |
| | | } |
| | | |
| | | &__label { |
| | | @include flex; |
| | | align-items: center; |
| | | flex: 1; |
| | | color: $u-main-color; |
| | | font-size: 15px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | &__right { |
| | | flex: 1; |
| | | |
| | | &__content { |
| | | @include flex; |
| | | align-items: center; |
| | | flex: 1; |
| | | |
| | | &__slot { |
| | | flex: 1; |
| | | /* #ifndef MP */ |
| | | @include flex; |
| | | align-items: center; |
| | | /* #endif */ |
| | | } |
| | | |
| | | &__icon { |
| | | margin-left: 10rpx; |
| | | color: $u-light-color; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | &__message { |
| | | font-size: 12px; |
| | | line-height: 12px; |
| | | color: $u-error; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å½åformçéè¦éªè¯å段çéå |
| | | model: { |
| | | type: Object, |
| | | default: uni.$u.props.form.model |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | type: [Object, Function, Array], |
| | | default: uni.$u.props.form.rules |
| | | }, |
| | | // æé误æ¶çæç¤ºæ¹å¼ï¼message-æç¤ºä¿¡æ¯ï¼toast-è¿è¡toastæç¤º |
| | | // border-bottom-ä¸è¾¹æ¡åç°çº¢è²ï¼none-æ æç¤º |
| | | errorType: { |
| | | type: String, |
| | | default: uni.$u.props.form.errorType |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¡¨ååçä¸åçº¿è¾¹æ¡ |
| | | borderBottom: { |
| | | type: Boolean, |
| | | default: uni.$u.props.form.borderBottom |
| | | }, |
| | | // labelçä½ç½®ï¼left-左边ï¼top-ä¸è¾¹ |
| | | labelPosition: { |
| | | type: String, |
| | | default: uni.$u.props.form.labelPosition |
| | | }, |
| | | // labelç宽度ï¼åä½px |
| | | labelWidth: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.form.labelWidth |
| | | }, |
| | | // lableåä½ç坹齿¹å¼ |
| | | labelAlign: { |
| | | type: String, |
| | | default: uni.$u.props.form.labelAlign |
| | | }, |
| | | // lableçæ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | labelStyle: { |
| | | type: Object, |
| | | default: uni.$u.props.form.labelStyle |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-form"> |
| | | <slot /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from "./props.js"; |
| | | import Schema from "../../libs/util/async-validator"; |
| | | // å»é¤è¦åä¿¡æ¯ |
| | | Schema.warning = function() {}; |
| | | /** |
| | | * Form 表å |
| | | * @description æ¤ç»ä»¶ä¸è¬ç¨äºè¡¨ååºæ¯ï¼å¯ä»¥é
ç½®Inputè¾å
¥æ¡ï¼Selectå¼¹åºæ¡ï¼è¿è¡è¡¨åéªè¯çã |
| | | * @tutorial https://www.uviewui.com/components/form.html |
| | | * @property {Object} model å½åformçéè¦éªè¯å段çéå |
| | | * @property {Object | Function | Array} rules éªè¯è§å |
| | | * @property {String} errorType é误çæç¤ºæ¹å¼ï¼è§ä¸æ¹è¯´æ ( é»è®¤ message ) |
| | | * @property {Boolean} borderBottom æ¯å¦æ¾ç¤ºè¡¨ååçä¸åçº¿è¾¹æ¡ ( é»è®¤ true ï¼ |
| | | * @property {String} labelPosition 表ååæç¤ºæåçä½ç½®ï¼left-左侧ï¼top-䏿¹ ( é»è®¤ 'left' ï¼ |
| | | * @property {String | Number} labelWidth æç¤ºæåç宽度ï¼åä½px ( é»è®¤ 45 ï¼ |
| | | * @property {String} labelAlign lableåä½ç坹齿¹å¼ ( é»è®¤ âleft' ï¼ |
| | | * @property {Object} labelStyle lableçæ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | * @example <u--formlabelPosition="left" :model="model1" :rules="rules" ref="form1"></u--form> |
| | | */ |
| | | export default { |
| | | name: "u-form", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | provide() { |
| | | return { |
| | | uForm: this, |
| | | }; |
| | | }, |
| | | data() { |
| | | return { |
| | | formRules: {}, |
| | | // è§åæ ¡éªå¨ |
| | | validator: {}, |
| | | // åå§çmodelå¿«ç
§ï¼ç¨äºresetFieldsæ¹æ³éç½®è¡¨åæ¶ä½¿ç¨ |
| | | originalModel: null, |
| | | }; |
| | | }, |
| | | watch: { |
| | | // çå¬è§åçåå |
| | | rules: { |
| | | immediate: true, |
| | | handler(n) { |
| | | this.setRules(n); |
| | | }, |
| | | }, |
| | | // çå¬å±æ§çååï¼éç¥åç»ä»¶u-form-iteméæ°è·åä¿¡æ¯ |
| | | propsChange(n) { |
| | | if (this.children?.length) { |
| | | this.children.map((child) => { |
| | | // 夿åç»ä»¶(u-form-item)妿æupdateParentDataæ¹æ³çè¯ï¼å°±å°±æ§è¡(æ§è¡çç»ææ¯åç»ä»¶éæ°ä»ç¶ç»ä»¶æåäºææ°çå¼) |
| | | typeof child.updateParentData == "function" && |
| | | child.updateParentData(); |
| | | }); |
| | | } |
| | | }, |
| | | // çå¬modelçåå§å¼ä½ä¸ºé置表åçå¿«ç
§ |
| | | model: { |
| | | immediate: true, |
| | | handler(n) { |
| | | if (!this.originalModel) { |
| | | this.originalModel = uni.$u.deepClone(n); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | computed: { |
| | | propsChange() { |
| | | return [ |
| | | this.errorType, |
| | | this.borderBottom, |
| | | this.labelPosition, |
| | | this.labelWidth, |
| | | this.labelAlign, |
| | | this.labelStyle, |
| | | ]; |
| | | }, |
| | | }, |
| | | created() { |
| | | // åå¨å½åformä¸çææu-form-itemçå®ä¾ |
| | | // ä¸è½å®ä¹å¨dataä¸ï¼å¦å微信å°ç¨åºä¼é æå¾ªç¯å¼ç¨èæ¥é |
| | | this.children = []; |
| | | }, |
| | | methods: { |
| | | // æå¨è®¾ç½®æ ¡éªçè§åï¼å¦æè§å䏿彿°çè¯ï¼å¾®ä¿¡å°ç¨åºä¸ä¼è¿æ»¤æï¼æä»¥åªè½æå¨è°ç¨è®¾ç½®è§å |
| | | setRules(rules) { |
| | | // 夿æ¯å¦æè§å |
| | | if (Object.keys(rules).length === 0) return; |
| | | if (process.env.NODE_ENV === 'development' && Object.keys(this.model).length === 0) { |
| | | uni.$u.error('设置rulesï¼modelå¿
须设置ï¼å¦æå·²ç»è®¾ç½®ï¼è¯·å·æ°é¡µé¢ã'); |
| | | return; |
| | | }; |
| | | this.formRules = rules; |
| | | // éæ°å°è§åèµäºValidator |
| | | this.validator = new Schema(rules); |
| | | }, |
| | | // æ¸
空ææu-form-itemç»ä»¶çå
å®¹ï¼æ¬è´¨ä¸æ¯è°ç¨äºu-form-itemç»ä»¶ä¸çresetField()æ¹æ³ |
| | | resetFields() { |
| | | this.resetModel(); |
| | | }, |
| | | // éç½®model为åå§å¼çå¿«ç
§ |
| | | resetModel(obj) { |
| | | // åéææu-form-itemï¼æ ¹æ®å
¶prop屿§ï¼è¿åmodelçåå§å¿«ç
§ |
| | | this.children.map((child) => { |
| | | const prop = child?.prop; |
| | | const value = uni.$u.getProperty(this.originalModel, prop); |
| | | uni.$u.setProperty(this.model, prop, value); |
| | | }); |
| | | }, |
| | | // æ¸
ç©ºæ ¡éªç»æ |
| | | clearValidate(props) { |
| | | props = [].concat(props); |
| | | this.children.map((child) => { |
| | | // 妿u-form-itemçpropå¨propsæ°ç»ä¸ï¼åæ¸
é¤å¯¹åºçæ ¡éªç»æä¿¡æ¯ |
| | | if (props[0] === undefined || props.includes(child.prop)) { |
| | | child.message = null; |
| | | } |
| | | }); |
| | | }, |
| | | // 对é¨å表ååæ®µè¿è¡æ ¡éª |
| | | async validateField(value, callback, event = null) { |
| | | // $nextTickæ¯å¿
é¡»çï¼å¦åmodelçåæ´ï¼å¯è½ä¼å»¶åäºæ¤æ¹æ³çæ§è¡ |
| | | this.$nextTick(() => { |
| | | // æ ¡éªé误信æ¯ï¼è¿åç»åè°æ¹æ³ï¼ç¨äºåæ¾ææform-itemçéè¯¯ä¿¡æ¯ |
| | | const errorsRes = []; |
| | | // å¦æä¸ºå符串ï¼è½¬ä¸ºæ°ç» |
| | | value = [].concat(value); |
| | | // åéchildrenææåform-item |
| | | this.children.map((child) => { |
| | | // ç¨äºåæ¾form-itemçéè¯¯ä¿¡æ¯ |
| | | const childErrors = []; |
| | | if (value.includes(child.prop)) { |
| | | // è·å对åºç屿§ï¼éè¿ç±»ä¼¼'a.b.c'çå½¢å¼ |
| | | const propertyVal = uni.$u.getProperty( |
| | | this.model, |
| | | child.prop |
| | | ); |
| | | // 屿§é¾æ°ç» |
| | | const propertyChain = child.prop.split("."); |
| | | const propertyName = |
| | | propertyChain[propertyChain.length - 1]; |
| | | |
| | | const rule = this.formRules[child.prop]; |
| | | // 妿ä¸åå¨å¯¹åºçè§åï¼ç´æ¥è¿åï¼å¦åæ ¡éªå¨ä¼æ¥é |
| | | if (!rule) return; |
| | | // ruleè§åå¯ä¸ºæ°ç»å½¢å¼ï¼ä¹å¯ä¸ºå¯¹è±¡å½¢å¼ï¼æ¤å¤æ¼æ¥æä¸ºæ°ç» |
| | | const rules = [].concat(rule); |
| | | |
| | | // 对rulesæ°ç»è¿è¡æ ¡éª |
| | | for (let i = 0; i < rules.length; i++) { |
| | | const ruleItem = rules[i]; |
| | | // å°u-form-itemç触åå¨è½¬ä¸ºæ°ç»å½¢å¼ |
| | | const trigger = [].concat(ruleItem?.trigger); |
| | | // å¦ææ¯æä¼ å
¥è§¦åäºä»¶ï¼ä½æ¯æ¤form-itemå´æ²¡æé
ç½®æ¤è§¦åå¨çè¯ï¼ä¸æ§è¡æ ¡éªæä½ |
| | | if (event && !trigger.includes(event)) continue; |
| | | // å®ä¾åæ ¡éªå¯¹è±¡ï¼ä¼ å
¥æé è§å |
| | | const validator = new Schema({ |
| | | [propertyName]: ruleItem, |
| | | }); |
| | | validator.validate({ |
| | | [propertyName]: propertyVal, |
| | | }, |
| | | (errors, fields) => { |
| | | if (uni.$u.test.array(errors)) { |
| | | errorsRes.push(...errors); |
| | | childErrors.push(...errors); |
| | | } |
| | | child.message = |
| | | childErrors[0]?.message ?? null; |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | // æ§è¡åè°å½æ° |
| | | typeof callback === "function" && callback(errorsRes); |
| | | }); |
| | | }, |
| | | // æ ¡éªå
¨é¨æ°æ® |
| | | validate(callback) { |
| | | // å¼åç¯å¢ææç¤ºï¼ç产ç¯å¢ä¸ä¼æç¤º |
| | | if (process.env.NODE_ENV === 'development' && Object.keys(this.formRules).length === 0) { |
| | | uni.$u.error('æªè®¾ç½®rulesï¼è¯·çææ¡£è¯´æï¼å¦æå·²ç»è®¾ç½®ï¼è¯·å·æ°é¡µé¢ã'); |
| | | return; |
| | | } |
| | | return new Promise((resolve, reject) => { |
| | | // $nextTickæ¯å¿
é¡»çï¼å¦åmodelçåæ´ï¼å¯è½ä¼å»¶åäºvalidateæ¹æ³ |
| | | this.$nextTick(() => { |
| | | // è·åææform-itemçpropï¼äº¤ç»validateFieldæ¹æ³è¿è¡æ ¡éª |
| | | const formItemProps = this.children.map( |
| | | (item) => item.prop |
| | | ); |
| | | this.validateField(formItemProps, (errors) => { |
| | | if(errors.length) { |
| | | // 妿é误æç¤ºæ¹å¼ä¸ºtoastï¼åè¿è¡æç¤º |
| | | this.errorType === 'toast' && uni.$u.toast(errors[0].message) |
| | | reject(errors) |
| | | } else { |
| | | resolve(true) |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // èæ¯é¢è²ï¼é»è®¤transparentï¼ |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.gap.bgColor |
| | | }, |
| | | // å岿§½é«åº¦ï¼åä½pxï¼é»è®¤30ï¼ |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.gap.height |
| | | }, |
| | | // ä¸ä¸ä¸ä¸ªç»ä»¶çè·ç¦» |
| | | marginTop: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.gap.marginTop |
| | | }, |
| | | // ä¸ä¸ä¸ä¸ªç»ä»¶çè·ç¦» |
| | | marginBottom: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.gap.marginBottom |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-gap" :style="[gapStyle]"></view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * gap é´éæ§½ |
| | | * @description 该ç»ä»¶ä¸è¬ç¨äºå
容åä¹é´çç¨ä¸ä¸ªç°è²åéå¼çåºæ¯ï¼æ¹ä¾¿ç¨æ·é£æ ¼ç»ä¸ï¼åå°å·¥ä½é |
| | | * @tutorial https://www.uviewui.com/components/gap.html |
| | | * @property {String} bgColor èæ¯é¢è² ï¼é»è®¤ 'transparent' ï¼ |
| | | * @property {String | Number} height å岿§½é«åº¦ï¼åä½px ï¼é»è®¤ 20 ï¼ |
| | | * @property {String | Number} marginTop ä¸åä¸ä¸ªç»ä»¶çè·ç¦»ï¼åä½pxï¼ é»è®¤ 0 ï¼ |
| | | * @property {String | Number} marginBottom ä¸åä¸ä¸ªç»ä»¶çè·ç¦»ï¼åä½px ï¼é»è®¤ 0 ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @example <u-gap height="80" bg-color="#bbb"></u-gap> |
| | | */ |
| | | export default { |
| | | name: "u-gap", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | gapStyle() { |
| | | const style = { |
| | | backgroundColor: this.bgColor, |
| | | height: uni.$u.addUnit(this.height), |
| | | marginTop: uni.$u.addUnit(this.marginTop), |
| | | marginBottom: uni.$u.addUnit(this.marginBottom), |
| | | } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å®«æ ¼çname |
| | | name: { |
| | | type: [String, Number, null], |
| | | default: uni.$u.props.gridItem.name |
| | | }, |
| | | // èæ¯é¢è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.gridItem.bgColor |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <view |
| | | class="u-grid-item" |
| | | hover-class="u-grid-item--hover-class" |
| | | :hover-stay-time="200" |
| | | @tap="clickHandler" |
| | | :class="classes" |
| | | :style="[itemStyle]" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | <!-- #endif --> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <view |
| | | class="u-grid-item" |
| | | :hover-stay-time="200" |
| | | @tap="clickHandler" |
| | | :class="classes" |
| | | :style="[itemStyle]" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * gridItem æç¤º |
| | | * @description å®«æ ¼ç»ä»¶ä¸è¬ç¨äºåæ¶å±ç¤ºå¤ä¸ªå类项ç®çåºæ¯ï¼å¯ä»¥ç»å®«æ ¼ç项ç®è®¾ç½®å¾½æ ç»ä»¶(badge)ï¼æè
徿 çï¼ä¹å¯ä»¥æ©å±ä¸ºå·¦å³æ»å¨çè½®æå½¢å¼ãæé
u-gridä½¿ç¨ |
| | | * @tutorial https://www.uviewui.com/components/grid.html |
| | | * @property {String | Number} name å®«æ ¼çname ( é»è®¤ null ) |
| | | * @property {String} bgColor å®«æ ¼çèæ¯é¢è² ï¼é»è®¤ 'transparent' ï¼ |
| | | * @property {Object} customStyle èªå®ä¹æ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | * @event {Function} click ç¹å»å®«æ ¼è§¦å |
| | | * @example <u-grid-item></u-grid-item> |
| | | */ |
| | | export default { |
| | | name: "u-grid-item", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | parentData: { |
| | | col: 3, // ç¶ç»ä»¶ååçå®«æ ¼æ° |
| | | border: true, // æ¯å¦æ¾ç¤ºè¾¹æ¡ï¼æ ¹æ®ç¶ç»ä»¶å³å® |
| | | }, |
| | | // #ifdef APP-NVUE |
| | | width: 0, // nvue䏿è¿ä¹è®¡ç®ï¼vue䏿¾å°computedä¸ï¼å¦åä¼å 为延æ¶é æéªç |
| | | // #endif |
| | | classes: [], // ç±»åéåï¼ç¨äºå¤ææ¯å¦æ¾ç¤ºå³è¾¹åä¸è¾¹æ¡ |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | computed: { |
| | | // #ifndef APP-NVUE |
| | | // vue䏿¾å°computedä¸ï¼å¦åä¼å 为延æ¶é æéªç |
| | | width() { |
| | | return 100 / Number(this.parentData.col) + '%' |
| | | }, |
| | | // #endif |
| | | itemStyle() { |
| | | const style = { |
| | | background: this.bgColor, |
| | | width: this.width |
| | | } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)) |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // ç¨äºå¨ç¶ç»ä»¶u-gridçchildrenä¸è¢«æ·»å å
¥åç»ä»¶æ¶ï¼ |
| | | // éæ°è®¡ç®itemçè¾¹æ¡ |
| | | uni.$on('$uGridItem', () => { |
| | | this.gridItemClasses() |
| | | }) |
| | | // ç¶ç»ä»¶çå®ä¾ |
| | | this.updateParentData() |
| | | // #ifdef APP-NVUE |
| | | // è·åå
ç´ è¯¥æçé¿åº¦ï¼nvueä¸è¦å»¶æ¶æåç¡® |
| | | this.$nextTick(function(){ |
| | | this.getItemWidth() |
| | | }) |
| | | // #endif |
| | | // ååºäºä»¶ï¼éç¥ææçgrid-itemé½éæ°è®¡ç®èªå·±çè¾¹æ¡ |
| | | uni.$emit('$uGridItem') |
| | | this.gridItemClasses() |
| | | }, |
| | | // è·åç¶ç»ä»¶çåæ° |
| | | updateParentData() { |
| | | // æ¤æ¹æ³åå¨mixinä¸ |
| | | this.getParentData('u-grid'); |
| | | }, |
| | | clickHandler() { |
| | | let name = this.name |
| | | // å¦ææ²¡æè®¾ç½®name屿§ï¼åéç¶ç»ä»¶çchildrenæ°ç»ï¼å¤æå½åçå
ç´ æ¯å¦åæ¬å®ä¾thisç¸çï¼æ¾åºå½åç»ä»¶çç´¢å¼ |
| | | const children = this.parent?.children |
| | | if(children && this.name === null) { |
| | | name = children.findIndex(child => child === this) |
| | | } |
| | | // è°ç¨ç¶ç»ä»¶æ¹æ³ï¼ååºäºä»¶ |
| | | this.parent && this.parent.childClick(name) |
| | | this.$emit('click', name) |
| | | }, |
| | | async getItemWidth() { |
| | | // 妿æ¯nvueï¼ä¸è½ä½¿ç¨ç¾åæ¯ï¼åªè½ä½¿ç¨åºå®å®½åº¦ |
| | | let width = 0 |
| | | if(this.parent) { |
| | | // è·åç¶ç»ä»¶å®½åº¦åï¼é¤ä»¥æ
æ ¼æ°ï¼å¾åºæ¯ä¸ªitemç宽度 |
| | | const parentWidth = await this.getParentWidth() |
| | | width = parentWidth / Number(this.parentData.col) + 'px' |
| | | } |
| | | this.width = width |
| | | }, |
| | | // è·åç¶å
ç´ ç尺寸 |
| | | getParentWidth() { |
| | | // #ifdef APP-NVUE |
| | | // è¿åä¸ä¸ªpromiseï¼è®©è°ç¨è
å¯ä»¥ç¨await忥è·å |
| | | const dom = uni.requireNativePlugin('dom') |
| | | return new Promise(resolve => { |
| | | // è°ç¨ç¶ç»ä»¶çref |
| | | dom.getComponentRect(this.parent.$refs['u-grid'], res => { |
| | | resolve(res.size.width) |
| | | }) |
| | | }) |
| | | // #endif |
| | | }, |
| | | gridItemClasses() { |
| | | if(this.parentData.border) { |
| | | const classes = [] |
| | | this.parent.children.map((child, index) =>{ |
| | | if(this === child) { |
| | | const len = this.parent.children.length |
| | | // è´´è¿å³è¾¹å±å¹è¾¹æ²¿çchildï¼å¹¶ä¸æåä¸ä¸ªï¼æ¯å¦åªææ¨ªå2ä¸ªçæ¶åï¼ï¼æ éå³è¾¹æ¡ |
| | | if((index + 1) % this.parentData.col !== 0 && index + 1 !== len) { |
| | | classes.push('u-border-right') |
| | | } |
| | | // æ»çå®«æ ¼æ°é坹忰åä½çå¼ |
| | | // 妿åä½åï¼å¼ä¸º0ï¼åæå³çè¦å°æå䏿çå®«æ ¼ï¼é½ä¸éè¦ä¸è¾¹æ¡ |
| | | const lessNum = len % this.parentData.col === 0 ? this.parentData.col : len % this.parentData.col |
| | | // æä¸é¢ç䏿childï¼æ éä¸è¾¹æ¡ |
| | | if(index < len - lessNum) { |
| | | classes.push('u-border-bottom') |
| | | } |
| | | } |
| | | }) |
| | | // æ¯ä»å®ï¼å¤´æ¡å°ç¨åºæ æ³å¨æç»å®ä¸ä¸ªæ°ç»ç±»åï¼å¦åè§£æåºæ¥çç»æä¼å¸¦æ","ï¼è导è´å¤±æ |
| | | // #ifdef MP-ALIPAY || MP-TOUTIAO |
| | | classes = classes.join(' ') |
| | | // #endif |
| | | this.classes = classes |
| | | } |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | // ç§»é¤äºä»¶çå¬ï¼éæ¾æ§è½ |
| | | uni.$off('$uGridItem') |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-grid-item-hover-class-opcatiy:.5 !default; |
| | | $u-grid-item-margin-top:1rpx !default; |
| | | $u-grid-item-border-right-width:0.5px !default; |
| | | $u-grid-item-border-bottom-width:0.5px !default; |
| | | $u-grid-item-border-right-color:$u-border-color !default; |
| | | $u-grid-item-border-bottom-color:$u-border-color !default; |
| | | .u-grid-item { |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: relative; |
| | | flex-direction: column; |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | /* #endif */ |
| | | |
| | | /* #ifdef MP */ |
| | | position: relative; |
| | | float: left; |
| | | /* #endif */ |
| | | |
| | | /* #ifdef MP-WEIXIN */ |
| | | margin-top:$u-grid-item-margin-top; |
| | | /* #endif */ |
| | | |
| | | &--hover-class { |
| | | opacity:$u-grid-item-hover-class-opcatiy; |
| | | } |
| | | } |
| | | |
| | | /* #ifdef APP-NVUE */ |
| | | // ç±äºnvue䏿¯æç»ä»¶å
å¼å
¥app.vueä¸åå¼å
¥çæ ·å¼ï¼æä»¥éè¦åå¨è¿é |
| | | .u-border-right { |
| | | border-right-width:$u-grid-item-border-right-width; |
| | | border-color: $u-grid-item-border-right-color; |
| | | } |
| | | |
| | | .u-border-bottom { |
| | | border-bottom-width:$u-grid-item-border-bottom-width; |
| | | border-color:$u-grid-item-border-bottom-color; |
| | | } |
| | | |
| | | /* #endif */ |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // åæå å |
| | | col: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.grid.col |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¾¹æ¡ |
| | | border: { |
| | | type: Boolean, |
| | | default: uni.$u.props.grid.border |
| | | }, |
| | | // å®«æ ¼å¯¹é½æ¹å¼ï¼è¡¨ç°ä¸ºæ°éå°çæ¶åï¼é å·¦ï¼å±
ä¸ï¼è¿æ¯é å³ |
| | | align: { |
| | | type: String, |
| | | default: uni.$u.props.grid.align |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-grid" |
| | | ref='u-grid' |
| | | :style="[gridStyle]" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * grid å®«æ ¼å¸å± |
| | | * @description å®«æ ¼ç»ä»¶ä¸è¬ç¨äºåæ¶å±ç¤ºå¤ä¸ªå类项ç®çåºæ¯ï¼å¯ä»¥ç»å®«æ ¼ç项ç®è®¾ç½®å¾½æ ç»ä»¶(badge)ï¼æè
徿 çï¼ä¹å¯ä»¥æ©å±ä¸ºå·¦å³æ»å¨çè½®æå½¢å¼ã |
| | | * @tutorial https://www.uviewui.com/components/grid.html |
| | | * @property {String | Number} col å®«æ ¼çåæ°ï¼é»è®¤ 3 ï¼ |
| | | * @property {Boolean} border æ¯å¦æ¾ç¤ºå®«æ ¼çè¾¹æ¡ï¼é»è®¤ false ï¼ |
| | | * @property {String} align å®«æ ¼å¯¹é½æ¹å¼ï¼è¡¨ç°ä¸ºæ°éå°çæ¶åï¼é å·¦ï¼å±
ä¸ï¼è¿æ¯é å³ ï¼é»è®¤ 'left' ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * @event {Function} click ç¹å»å®«æ ¼è§¦å |
| | | * @example <u-grid :col="3" @click="click"></u-grid> |
| | | */ |
| | | export default { |
| | | name: 'u-grid', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | index: 0, |
| | | width: 0 |
| | | } |
| | | }, |
| | | watch: { |
| | | // å½ç¶ç»ä»¶éè¦åç»ä»¶éè¦å
±äº«çåæ°åçäºååï¼æå¨éç¥åç»ä»¶ |
| | | parentData() { |
| | | if (this.children.length) { |
| | | this.children.map(child => { |
| | | // 夿åç»ä»¶(u-radio)妿æupdateParentDataæ¹æ³çè¯ï¼å°±å°±æ§è¡(æ§è¡çç»ææ¯åç»ä»¶éæ°ä»ç¶ç»ä»¶æåäºææ°çå¼) |
| | | typeof(child.updateParentData) == 'function' && child.updateParentData(); |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | // 妿å°childrenå®ä¹å¨dataä¸ï¼å¨å¾®ä¿¡å°ç¨åºä¼é æå¾ªç¯å¼ç¨èæ¥é |
| | | this.children = [] |
| | | }, |
| | | computed: { |
| | | // 计ç®ç¶ç»ä»¶ç弿¯å¦åçåå |
| | | parentData() { |
| | | return [this.hoverClass, this.col, this.size, this.border]; |
| | | }, |
| | | // å®«æ ¼å¯¹é½æ¹å¼ |
| | | gridStyle() { |
| | | let style = {}; |
| | | switch (this.align) { |
| | | case 'left': |
| | | style.justifyContent = 'flex-start'; |
| | | break; |
| | | case 'center': |
| | | style.justifyContent = 'center'; |
| | | break; |
| | | case 'right': |
| | | style.justifyContent = 'flex-end'; |
| | | break; |
| | | default: |
| | | style.justifyContent = 'flex-start'; |
| | | }; |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ¤æ¹æ³ç±u-grid-item触åï¼ç¨äºå¨u-gridååºäºä»¶ |
| | | childClick(name) { |
| | | this.$emit('click', name) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | $u-grid-width:100% !default; |
| | | .u-grid { |
| | | /* #ifdef MP */ |
| | | width: $u-grid-width; |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | display: block; |
| | | /* #endif */ |
| | | justify-content: center; |
| | | @include flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | 'uicon-level': '\ue693', |
| | | 'uicon-column-line': '\ue68e', |
| | | 'uicon-checkbox-mark': '\ue807', |
| | | 'uicon-folder': '\ue7f5', |
| | | 'uicon-movie': '\ue7f6', |
| | | 'uicon-star-fill': '\ue669', |
| | | 'uicon-star': '\ue65f', |
| | | 'uicon-phone-fill': '\ue64f', |
| | | 'uicon-phone': '\ue622', |
| | | 'uicon-apple-fill': '\ue881', |
| | | 'uicon-chrome-circle-fill': '\ue885', |
| | | 'uicon-backspace': '\ue67b', |
| | | 'uicon-attach': '\ue632', |
| | | 'uicon-cut': '\ue948', |
| | | 'uicon-empty-car': '\ue602', |
| | | 'uicon-empty-coupon': '\ue682', |
| | | 'uicon-empty-address': '\ue646', |
| | | 'uicon-empty-favor': '\ue67c', |
| | | 'uicon-empty-permission': '\ue686', |
| | | 'uicon-empty-news': '\ue687', |
| | | 'uicon-empty-search': '\ue664', |
| | | 'uicon-github-circle-fill': '\ue887', |
| | | 'uicon-rmb': '\ue608', |
| | | 'uicon-person-delete-fill': '\ue66a', |
| | | 'uicon-reload': '\ue788', |
| | | 'uicon-order': '\ue68f', |
| | | 'uicon-server-man': '\ue6bc', |
| | | 'uicon-search': '\ue62a', |
| | | 'uicon-fingerprint': '\ue955', |
| | | 'uicon-more-dot-fill': '\ue630', |
| | | 'uicon-scan': '\ue662', |
| | | 'uicon-share-square': '\ue60b', |
| | | 'uicon-map': '\ue61d', |
| | | 'uicon-map-fill': '\ue64e', |
| | | 'uicon-tags': '\ue629', |
| | | 'uicon-tags-fill': '\ue651', |
| | | 'uicon-bookmark-fill': '\ue63b', |
| | | 'uicon-bookmark': '\ue60a', |
| | | 'uicon-eye': '\ue613', |
| | | 'uicon-eye-fill': '\ue641', |
| | | 'uicon-mic': '\ue64a', |
| | | 'uicon-mic-off': '\ue649', |
| | | 'uicon-calendar': '\ue66e', |
| | | 'uicon-calendar-fill': '\ue634', |
| | | 'uicon-trash': '\ue623', |
| | | 'uicon-trash-fill': '\ue658', |
| | | 'uicon-play-left': '\ue66d', |
| | | 'uicon-play-right': '\ue610', |
| | | 'uicon-minus': '\ue618', |
| | | 'uicon-plus': '\ue62d', |
| | | 'uicon-info': '\ue653', |
| | | 'uicon-info-circle': '\ue7d2', |
| | | 'uicon-info-circle-fill': '\ue64b', |
| | | 'uicon-question': '\ue715', |
| | | 'uicon-error': '\ue6d3', |
| | | 'uicon-close': '\ue685', |
| | | 'uicon-checkmark': '\ue6a8', |
| | | 'uicon-android-circle-fill': '\ue67e', |
| | | 'uicon-android-fill': '\ue67d', |
| | | 'uicon-ie': '\ue87b', |
| | | 'uicon-IE-circle-fill': '\ue889', |
| | | 'uicon-google': '\ue87a', |
| | | 'uicon-google-circle-fill': '\ue88a', |
| | | 'uicon-setting-fill': '\ue872', |
| | | 'uicon-setting': '\ue61f', |
| | | 'uicon-minus-square-fill': '\ue855', |
| | | 'uicon-plus-square-fill': '\ue856', |
| | | 'uicon-heart': '\ue7df', |
| | | 'uicon-heart-fill': '\ue851', |
| | | 'uicon-camera': '\ue7d7', |
| | | 'uicon-camera-fill': '\ue870', |
| | | 'uicon-more-circle': '\ue63e', |
| | | 'uicon-more-circle-fill': '\ue645', |
| | | 'uicon-chat': '\ue620', |
| | | 'uicon-chat-fill': '\ue61e', |
| | | 'uicon-bag-fill': '\ue617', |
| | | 'uicon-bag': '\ue619', |
| | | 'uicon-error-circle-fill': '\ue62c', |
| | | 'uicon-error-circle': '\ue624', |
| | | 'uicon-close-circle': '\ue63f', |
| | | 'uicon-close-circle-fill': '\ue637', |
| | | 'uicon-checkmark-circle': '\ue63d', |
| | | 'uicon-checkmark-circle-fill': '\ue635', |
| | | 'uicon-question-circle-fill': '\ue666', |
| | | 'uicon-question-circle': '\ue625', |
| | | 'uicon-share': '\ue631', |
| | | 'uicon-share-fill': '\ue65e', |
| | | 'uicon-shopping-cart': '\ue621', |
| | | 'uicon-shopping-cart-fill': '\ue65d', |
| | | 'uicon-bell': '\ue609', |
| | | 'uicon-bell-fill': '\ue640', |
| | | 'uicon-list': '\ue650', |
| | | 'uicon-list-dot': '\ue616', |
| | | 'uicon-zhihu': '\ue6ba', |
| | | 'uicon-zhihu-circle-fill': '\ue709', |
| | | 'uicon-zhifubao': '\ue6b9', |
| | | 'uicon-zhifubao-circle-fill': '\ue6b8', |
| | | 'uicon-weixin-circle-fill': '\ue6b1', |
| | | 'uicon-weixin-fill': '\ue6b2', |
| | | 'uicon-twitter-circle-fill': '\ue6ab', |
| | | 'uicon-twitter': '\ue6aa', |
| | | 'uicon-taobao-circle-fill': '\ue6a7', |
| | | 'uicon-taobao': '\ue6a6', |
| | | 'uicon-weibo-circle-fill': '\ue6a5', |
| | | 'uicon-weibo': '\ue6a4', |
| | | 'uicon-qq-fill': '\ue6a1', |
| | | 'uicon-qq-circle-fill': '\ue6a0', |
| | | 'uicon-moments-circel-fill': '\ue69a', |
| | | 'uicon-moments': '\ue69b', |
| | | 'uicon-qzone': '\ue695', |
| | | 'uicon-qzone-circle-fill': '\ue696', |
| | | 'uicon-baidu-circle-fill': '\ue680', |
| | | 'uicon-baidu': '\ue681', |
| | | 'uicon-facebook-circle-fill': '\ue68a', |
| | | 'uicon-facebook': '\ue689', |
| | | 'uicon-car': '\ue60c', |
| | | 'uicon-car-fill': '\ue636', |
| | | 'uicon-warning-fill': '\ue64d', |
| | | 'uicon-warning': '\ue694', |
| | | 'uicon-clock-fill': '\ue638', |
| | | 'uicon-clock': '\ue60f', |
| | | 'uicon-edit-pen': '\ue612', |
| | | 'uicon-edit-pen-fill': '\ue66b', |
| | | 'uicon-email': '\ue611', |
| | | 'uicon-email-fill': '\ue642', |
| | | 'uicon-minus-circle': '\ue61b', |
| | | 'uicon-minus-circle-fill': '\ue652', |
| | | 'uicon-plus-circle': '\ue62e', |
| | | 'uicon-plus-circle-fill': '\ue661', |
| | | 'uicon-file-text': '\ue663', |
| | | 'uicon-file-text-fill': '\ue665', |
| | | 'uicon-pushpin': '\ue7e3', |
| | | 'uicon-pushpin-fill': '\ue86e', |
| | | 'uicon-grid': '\ue673', |
| | | 'uicon-grid-fill': '\ue678', |
| | | 'uicon-play-circle': '\ue647', |
| | | 'uicon-play-circle-fill': '\ue655', |
| | | 'uicon-pause-circle-fill': '\ue654', |
| | | 'uicon-pause': '\ue8fa', |
| | | 'uicon-pause-circle': '\ue643', |
| | | 'uicon-eye-off': '\ue648', |
| | | 'uicon-eye-off-outline': '\ue62b', |
| | | 'uicon-gift-fill': '\ue65c', |
| | | 'uicon-gift': '\ue65b', |
| | | 'uicon-rmb-circle-fill': '\ue657', |
| | | 'uicon-rmb-circle': '\ue677', |
| | | 'uicon-kefu-ermai': '\ue656', |
| | | 'uicon-server-fill': '\ue751', |
| | | 'uicon-coupon-fill': '\ue8c4', |
| | | 'uicon-coupon': '\ue8ae', |
| | | 'uicon-integral': '\ue704', |
| | | 'uicon-integral-fill': '\ue703', |
| | | 'uicon-home-fill': '\ue964', |
| | | 'uicon-home': '\ue965', |
| | | 'uicon-hourglass-half-fill': '\ue966', |
| | | 'uicon-hourglass': '\ue967', |
| | | 'uicon-account': '\ue628', |
| | | 'uicon-plus-people-fill': '\ue626', |
| | | 'uicon-minus-people-fill': '\ue615', |
| | | 'uicon-account-fill': '\ue614', |
| | | 'uicon-thumb-down-fill': '\ue726', |
| | | 'uicon-thumb-down': '\ue727', |
| | | 'uicon-thumb-up': '\ue733', |
| | | 'uicon-thumb-up-fill': '\ue72f', |
| | | 'uicon-lock-fill': '\ue979', |
| | | 'uicon-lock-open': '\ue973', |
| | | 'uicon-lock-opened-fill': '\ue974', |
| | | 'uicon-lock': '\ue97a', |
| | | 'uicon-red-packet-fill': '\ue690', |
| | | 'uicon-photo-fill': '\ue98b', |
| | | 'uicon-photo': '\ue98d', |
| | | 'uicon-volume-off-fill': '\ue659', |
| | | 'uicon-volume-off': '\ue644', |
| | | 'uicon-volume-fill': '\ue670', |
| | | 'uicon-volume': '\ue633', |
| | | 'uicon-red-packet': '\ue691', |
| | | 'uicon-download': '\ue63c', |
| | | 'uicon-arrow-up-fill': '\ue6b0', |
| | | 'uicon-arrow-down-fill': '\ue600', |
| | | 'uicon-play-left-fill': '\ue675', |
| | | 'uicon-play-right-fill': '\ue676', |
| | | 'uicon-rewind-left-fill': '\ue679', |
| | | 'uicon-rewind-right-fill': '\ue67a', |
| | | 'uicon-arrow-downward': '\ue604', |
| | | 'uicon-arrow-leftward': '\ue601', |
| | | 'uicon-arrow-rightward': '\ue603', |
| | | 'uicon-arrow-upward': '\ue607', |
| | | 'uicon-arrow-down': '\ue60d', |
| | | 'uicon-arrow-right': '\ue605', |
| | | 'uicon-arrow-left': '\ue60e', |
| | | 'uicon-arrow-up': '\ue606', |
| | | 'uicon-skip-back-left': '\ue674', |
| | | 'uicon-skip-forward-right': '\ue672', |
| | | 'uicon-rewind-right': '\ue66f', |
| | | 'uicon-rewind-left': '\ue671', |
| | | 'uicon-arrow-right-double': '\ue68d', |
| | | 'uicon-arrow-left-double': '\ue68c', |
| | | 'uicon-wifi-off': '\ue668', |
| | | 'uicon-wifi': '\ue667', |
| | | 'uicon-empty-data': '\ue62f', |
| | | 'uicon-empty-history': '\ue684', |
| | | 'uicon-empty-list': '\ue68b', |
| | | 'uicon-empty-page': '\ue627', |
| | | 'uicon-empty-order': '\ue639', |
| | | 'uicon-man': '\ue697', |
| | | 'uicon-woman': '\ue69c', |
| | | 'uicon-man-add': '\ue61c', |
| | | 'uicon-man-add-fill': '\ue64c', |
| | | 'uicon-man-delete': '\ue61a', |
| | | 'uicon-man-delete-fill': '\ue66a', |
| | | 'uicon-zh': '\ue70a', |
| | | 'uicon-en': '\ue692' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // 徿 ç±»å |
| | | name: { |
| | | type: String, |
| | | default: uni.$u.props.icon.name |
| | | }, |
| | | // 徿 é¢è²ï¼å¯æ¥å主é¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.icon.color |
| | | }, |
| | | // åä½å¤§å°ï¼åä½px |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.size |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºç²ä½ |
| | | bold: { |
| | | type: Boolean, |
| | | default: uni.$u.props.icon.bold |
| | | }, |
| | | // ç¹å»å¾æ çæ¶åä¼ éäºä»¶åºå»çindexï¼ç¨äºåºåç¹å»äºåªä¸ä¸ªï¼ |
| | | index: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.index |
| | | }, |
| | | // 触æ¸å¾æ æ¶çç±»å |
| | | hoverClass: { |
| | | type: String, |
| | | default: uni.$u.props.icon.hoverClass |
| | | }, |
| | | // èªå®ä¹æ©å±åç¼ï¼æ¹ä¾¿ç¨æ·æ©å±èªå·±ç徿 åº |
| | | customPrefix: { |
| | | type: String, |
| | | default: uni.$u.props.icon.customPrefix |
| | | }, |
| | | // 徿 å³è¾¹æè
ä¸é¢çæå |
| | | label: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.label |
| | | }, |
| | | // labelçä½ç½®ï¼åªè½å³è¾¹æè
ä¸è¾¹ |
| | | labelPos: { |
| | | type: String, |
| | | default: uni.$u.props.icon.labelPos |
| | | }, |
| | | // labelçå¤§å° |
| | | labelSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.labelSize |
| | | }, |
| | | // labelçé¢è² |
| | | labelColor: { |
| | | type: String, |
| | | default: uni.$u.props.icon.labelColor |
| | | }, |
| | | // labelä¸å¾æ çè·ç¦» |
| | | space: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.space |
| | | }, |
| | | // å¾ççmode |
| | | imgMode: { |
| | | type: String, |
| | | default: uni.$u.props.icon.imgMode |
| | | }, |
| | | // ç¨äºæ¾ç¤ºå¾çå°å¾æ æ¶ï¼å¾çç宽度 |
| | | width: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.width |
| | | }, |
| | | // ç¨äºæ¾ç¤ºå¾çå°å¾æ æ¶ï¼å¾ççé«åº¦ |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.height |
| | | }, |
| | | // ç¨äºè§£å³æäºæ
åµä¸ï¼è®©å¾æ åç´å±
ä¸çç¨é |
| | | top: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.icon.top |
| | | }, |
| | | // æ¯å¦é»æ¢äºä»¶ä¼ æ |
| | | stop: { |
| | | type: Boolean, |
| | | default: uni.$u.props.icon.stop |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-icon" |
| | | @tap="clickHandler" |
| | | :class="['u-icon--' + labelPos]" |
| | | > |
| | | <image |
| | | class="u-icon__img" |
| | | v-if="isImg" |
| | | :src="name" |
| | | :mode="imgMode" |
| | | :style="[imgStyle, $u.addStyle(customStyle)]" |
| | | ></image> |
| | | <text |
| | | v-else |
| | | class="u-icon__icon" |
| | | :class="uClasses" |
| | | :style="[iconStyle, $u.addStyle(customStyle)]" |
| | | :hover-class="hoverClass" |
| | | >{{icon}}</text> |
| | | <!-- è¿éè¿è¡ç©ºåç¬¦ä¸²å¤æï¼å¦æä»
ä»
æ¯v-if="label"ï¼å¯è½ä¼åºç°ä¼ é0çæ¶åï¼ç»æä¹æ æ³æ¾ç¤º --> |
| | | <text |
| | | v-if="label !== ''" |
| | | class="u-icon__label" |
| | | :style="{ |
| | | color: labelColor, |
| | | fontSize: $u.addUnit(labelSize), |
| | | marginLeft: labelPos == 'right' ? $u.addUnit(space) : 0, |
| | | marginTop: labelPos == 'bottom' ? $u.addUnit(space) : 0, |
| | | marginRight: labelPos == 'left' ? $u.addUnit(space) : 0, |
| | | marginBottom: labelPos == 'top' ? $u.addUnit(space) : 0, |
| | | }" |
| | | >{{ label }}</text> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // #ifdef APP-NVUE |
| | | // nvueéè¿weexçdom模åå¼å
¥åä½ï¼ç¸å
³ææ¡£å°åå¦ä¸ï¼ |
| | | // https://weex.apache.org/zh/docs/modules/dom.html#addrule |
| | | const fontUrl = 'https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf' |
| | | const domModule = weex.requireModule('dom') |
| | | domModule.addRule('fontFace', { |
| | | 'fontFamily': "uicon-iconfont", |
| | | 'src': `url('${fontUrl}')` |
| | | }) |
| | | // #endif |
| | | |
| | | // å¼å
¥å¾æ åç§°ï¼å·²ç»å¯¹åºçunicode |
| | | import icons from './icons' |
| | | |
| | | import props from './props.js';; |
| | | |
| | | /** |
| | | * icon 徿 |
| | | * @description åºäºåä½ç徿 éï¼å
å«äºå¤§å¤æ°å¸¸è§åºæ¯ç徿 ã |
| | | * @tutorial https://www.uviewui.com/components/icon.html |
| | | * @property {String} name 徿 åç§°ï¼è§ç¤ºä¾å¾æ é |
| | | * @property {String} color 徿 é¢è²,坿¥å主é¢è² ï¼é»è®¤ color['u-content-color'] ï¼ |
| | | * @property {String | Number} size 徿 åä½å¤§å°ï¼åä½px ï¼é»è®¤ '16px' ï¼ |
| | | * @property {Boolean} bold æ¯å¦æ¾ç¤ºç²ä½ ï¼é»è®¤ false ï¼ |
| | | * @property {String | Number} index ç¹å»å¾æ çæ¶åä¼ éäºä»¶åºå»çindexï¼ç¨äºåºåç¹å»äºåªä¸ä¸ªï¼ |
| | | * @property {String} hoverClass 徿 æä¸å»çæ ·å¼ç±»ï¼ç¨æ³åuniçviewç»ä»¶çhoverClassåæ°ï¼è¯¦æ
è§å®ç½ |
| | | * @property {String} customPrefix èªå®ä¹æ©å±åç¼ï¼æ¹ä¾¿ç¨æ·æ©å±èªå·±ç徿 åº ï¼é»è®¤ 'uicon' ï¼ |
| | | * @property {String | Number} label 徿 å³ä¾§çlabelæå |
| | | * @property {String} labelPos labelç¸å¯¹äºå¾æ çä½ç½®ï¼åªè½rightæbottom ï¼é»è®¤ 'right' ï¼ |
| | | * @property {String | Number} labelSize labelåä½å¤§å°ï¼åä½px ï¼é»è®¤ '15px' ï¼ |
| | | * @property {String} labelColor 徿 å³ä¾§çlabelæåé¢è² ï¼ é»è®¤ color['u-content-color'] ï¼ |
| | | * @property {String | Number} space labelä¸å¾æ çè·ç¦»ï¼åä½px ï¼é»è®¤ '3px' ï¼ |
| | | * @property {String} imgMode å¾ççmode |
| | | * @property {String | Number} width æ¾ç¤ºå¾çå°å¾æ æ¶ç宽度 |
| | | * @property {String | Number} height æ¾ç¤ºå¾çå°å¾æ æ¶çé«åº¦ |
| | | * @property {String | Number} top 徿 å¨åç´æ¹åä¸çå®ä½ ç¨äºè§£å³æäºæ
åµä¸ï¼è®©å¾æ åç´å±
ä¸çç¨é ï¼é»è®¤ 0 ï¼ |
| | | * @property {Boolean} stop æ¯å¦é»æ¢äºä»¶ä¼ æ ï¼é»è®¤ false ï¼ |
| | | * @property {Object} customStyle iconçæ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | * @event {Function} click ç¹å»å¾æ æ¶è§¦å |
| | | * @event {Function} touchstart äºä»¶è§¦æ¸æ¶è§¦å |
| | | * @example <u-icon name="photo" color="#2979ff" size="28"></u-icon> |
| | | */ |
| | | export default { |
| | | name: 'u-icon', |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | computed: { |
| | | uClasses() { |
| | | let classes = [] |
| | | classes.push(this.customPrefix + '-' + this.name) |
| | | // // uViewçèªå®ä¹å¾æ ç±»å为u-iconfont |
| | | // if (this.customPrefix == 'uicon') { |
| | | // classes.push('u-iconfont') |
| | | // } else { |
| | | // classes.push(this.customPrefix) |
| | | // } |
| | | // 主é¢è²ï¼éè¿ç±»é
ç½® |
| | | if (this.color && uni.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color) |
| | | // é¿éï¼å¤´æ¡ï¼ç¾åº¦å°ç¨åºéè¿æ°ç»ç»å®ç±»åæ¶ï¼æ æ³ç´æ¥ä½¿ç¨[a, b, c]çå½¢å¼ï¼å¦åæ æ³è¯å« |
| | | // æ
éå°å
¶ææä¸ä¸ªå符串çå½¢å¼ï¼éè¿ç©ºæ ¼éå¼å个类å |
| | | //#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU |
| | | classes = classes.join(' ') |
| | | //#endif |
| | | return classes |
| | | }, |
| | | iconStyle() { |
| | | let style = {} |
| | | style = { |
| | | fontSize: uni.$u.addUnit(this.size), |
| | | lineHeight: uni.$u.addUnit(this.size), |
| | | fontWeight: this.bold ? 'bold' : 'normal', |
| | | // æäºç¹æ®æ
åµéè¦è®¾ç½®ä¸ä¸ªå°é¡¶é¨çè·ç¦»ï¼æè½æ´å¥½çåç´å±
ä¸ |
| | | top: uni.$u.addUnit(this.top) |
| | | } |
| | | // é主é¢è²å¼æ¶ï¼æå½ä½é¢è²å¼ |
| | | if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color |
| | | |
| | | return style |
| | | }, |
| | | // å¤æä¼ å
¥çname屿§ï¼æ¯å¦å¾çè·¯å¾ï¼åªè¦å¸¦æ"/"å认为æ¯å¾çå½¢å¼ |
| | | isImg() { |
| | | return this.name.indexOf('/') !== -1 |
| | | }, |
| | | imgStyle() { |
| | | let style = {} |
| | | // å¦æè®¾ç½®widthåheight屿§ï¼åä¼å
使ç¨ï¼å¦å使ç¨size屿§ |
| | | style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size) |
| | | style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size) |
| | | return style |
| | | }, |
| | | // éè¿å¾æ åï¼æ¥æ¾å¯¹åºç徿 |
| | | icon() { |
| | | // 妿å
ç½®ç徿 䏿¾ä¸å°å¯¹åºç徿 ï¼å°±ç´æ¥è¿ånameå¼ï¼å ä¸ºç¨æ·å¯è½ä¼ å
¥çæ¯unicode代ç |
| | | return icons['uicon-' + this.name] || this.name |
| | | } |
| | | }, |
| | | methods: { |
| | | clickHandler(e) { |
| | | this.$emit('click', this.index) |
| | | // æ¯å¦é»æ¢äºä»¶å泡 |
| | | this.stop && this.preventEvent(e) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | // åéå®ä¹ |
| | | $u-icon-primary: $u-primary !default; |
| | | $u-icon-success: $u-success !default; |
| | | $u-icon-info: $u-info !default; |
| | | $u-icon-warning: $u-warning !default; |
| | | $u-icon-error: $u-error !default; |
| | | $u-icon-label-line-height:1 !default; |
| | | |
| | | /* #ifndef APP-NVUE */ |
| | | // énvueä¸å è½½åä½ |
| | | @font-face { |
| | | font-family: 'uicon-iconfont'; |
| | | src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype'); |
| | | } |
| | | |
| | | /* #endif */ |
| | | |
| | | .u-icon { |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | /* #endif */ |
| | | align-items: center; |
| | | |
| | | &--left { |
| | | flex-direction: row-reverse; |
| | | align-items: center; |
| | | } |
| | | |
| | | &--right { |
| | | flex-direction: row; |
| | | align-items: center; |
| | | } |
| | | |
| | | &--top { |
| | | flex-direction: column-reverse; |
| | | justify-content: center; |
| | | } |
| | | |
| | | &--bottom { |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | } |
| | | |
| | | &__icon { |
| | | font-family: uicon-iconfont; |
| | | position: relative; |
| | | @include flex; |
| | | align-items: center; |
| | | |
| | | &--primary { |
| | | color: $u-icon-primary; |
| | | } |
| | | |
| | | &--success { |
| | | color: $u-icon-success; |
| | | } |
| | | |
| | | &--error { |
| | | color: $u-icon-error; |
| | | } |
| | | |
| | | &--warning { |
| | | color: $u-icon-warning; |
| | | } |
| | | |
| | | &--info { |
| | | color: $u-icon-info; |
| | | } |
| | | } |
| | | |
| | | &__img { |
| | | /* #ifndef APP-NVUE */ |
| | | height: auto; |
| | | will-change: transform; |
| | | /* #endif */ |
| | | } |
| | | |
| | | &__label { |
| | | /* #ifndef APP-NVUE */ |
| | | line-height: $u-icon-label-line-height; |
| | | /* #endif */ |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å¾çå°å |
| | | src: { |
| | | type: String, |
| | | default: uni.$u.props.image.src |
| | | }, |
| | | // è£åªæ¨¡å¼ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.image.mode |
| | | }, |
| | | // 宽度ï¼åä½ä»»æ |
| | | width: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.image.width |
| | | }, |
| | | // é«åº¦ï¼åä½ä»»æ |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.image.height |
| | | }, |
| | | // å¾çå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.image.shape |
| | | }, |
| | | // åè§ï¼åä½ä»»æ |
| | | radius: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.image.radius |
| | | }, |
| | | // æ¯å¦æå è½½ï¼å¾®ä¿¡å°ç¨åºãAppãç¾åº¦å°ç¨åºãåèè·³å¨å°ç¨åº |
| | | lazyLoad: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.lazyLoad |
| | | }, |
| | | // å¼å¯é¿æå¾çæ¾ç¤ºè¯å«å¾®ä¿¡å°ç¨åºç èå |
| | | showMenuByLongpress: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.showMenuByLongpress |
| | | }, |
| | | // å è½½ä¸ç徿 ï¼æè
å°å¾ç |
| | | loadingIcon: { |
| | | type: String, |
| | | default: uni.$u.props.image.loadingIcon |
| | | }, |
| | | // å 载失败ç徿 ï¼æè
å°å¾ç |
| | | errorIcon: { |
| | | type: String, |
| | | default: uni.$u.props.image.errorIcon |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå è½½ä¸ç徿 æè
èªå®ä¹çslot |
| | | showLoading: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.showLoading |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå è½½é误ç徿 æè
èªå®ä¹çslot |
| | | showError: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.showError |
| | | }, |
| | | // æ¯å¦éè¦æ·¡å
¥ææ |
| | | fade: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.fade |
| | | }, |
| | | // åªæ¯æç½ç»èµæºï¼åªå¯¹å¾®ä¿¡å°ç¨åºææ |
| | | webp: { |
| | | type: Boolean, |
| | | default: uni.$u.props.image.webp |
| | | }, |
| | | // è¿æ¸¡æ¶é´ï¼åä½ms |
| | | duration: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.image.duration |
| | | }, |
| | | // èæ¯é¢è²ï¼ç¨äºæ·±è²é¡µé¢å è½½å¾çæ¶ï¼ä¸ºäºåèæ¯è²èå |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.image.bgColor |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-transition |
| | | mode="fade" |
| | | :show="show" |
| | | :duration="fade ? 1000 : 0" |
| | | > |
| | | <view |
| | | class="u-image" |
| | | @tap="onClick" |
| | | :style="[wrapStyle, backgroundStyle]" |
| | | > |
| | | <image |
| | | v-if="!isError" |
| | | :src="src" |
| | | :mode="mode" |
| | | @error="onErrorHandler" |
| | | @load="onLoadHandler" |
| | | :show-menu-by-longpress="showMenuByLongpress" |
| | | :lazy-load="lazyLoad" |
| | | class="u-image__image" |
| | | :style="{ |
| | | borderRadius: shape == 'circle' ? '10000px' : $u.addUnit(radius), |
| | | width: $u.addUnit(width), |
| | | height: $u.addUnit(height) |
| | | }" |
| | | ></image> |
| | | <view |
| | | v-if="showLoading && loading" |
| | | class="u-image__loading" |
| | | :style="{ |
| | | borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius), |
| | | backgroundColor: this.bgColor, |
| | | width: $u.addUnit(width), |
| | | height: $u.addUnit(height) |
| | | }" |
| | | > |
| | | <slot name="loading"> |
| | | <u-icon |
| | | :name="loadingIcon" |
| | | :width="width" |
| | | :height="height" |
| | | ></u-icon> |
| | | </slot> |
| | | </view> |
| | | <view |
| | | v-if="showError && isError && !loading" |
| | | class="u-image__error" |
| | | :style="{ |
| | | borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius), |
| | | width: $u.addUnit(width), |
| | | height: $u.addUnit(height) |
| | | }" |
| | | > |
| | | <slot name="error"> |
| | | <u-icon |
| | | :name="errorIcon" |
| | | :width="width" |
| | | :height="height" |
| | | ></u-icon> |
| | | </slot> |
| | | </view> |
| | | </view> |
| | | </u-transition> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | /** |
| | | * Image å¾ç |
| | | * @description æ¤ç»ä»¶ä¸ºuni-appçimageç»ä»¶çå 强çï¼å¨ç»§æ¿äºåæåè½å¤ï¼è¿æ¯ææ·¡å
¥å¨ç»ãå è½½ä¸ãå 载失败æç¤ºãåè§å¼åå½¢ç¶çã |
| | | * @tutorial https://uviewui.com/components/image.html |
| | | * @property {String} src å¾çå°å |
| | | * @property {String} mode è£åªæ¨¡å¼ï¼è§å®ç½è¯´æ ï¼é»è®¤ 'aspectFill' ï¼ |
| | | * @property {String | Number} width 宽度ï¼åä½ä»»æï¼å¦æä¸ºæ°å¼ï¼å为pxåä½ ï¼é»è®¤ '300' ï¼ |
| | | * @property {String | Number} height é«åº¦ï¼åä½ä»»æï¼å¦æä¸ºæ°å¼ï¼å为pxåä½ ï¼é»è®¤ '225' ï¼ |
| | | * @property {String} shape å¾çå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ ï¼é»è®¤ 'square' ï¼ |
| | | * @property {String | Number} radius åè§å¼ï¼åä½ä»»æï¼å¦æä¸ºæ°å¼ï¼å为pxåä½ ï¼é»è®¤ 0 ï¼ |
| | | * @property {Boolean} lazyLoad æ¯å¦æå è½½ï¼ä»
微信å°ç¨åºãAppãç¾åº¦å°ç¨åºãåèè·³å¨å°ç¨åºææ ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} showMenuByLongpress æ¯å¦å¼å¯é¿æå¾çæ¾ç¤ºè¯å«å°ç¨åºç èåï¼ä»
微信å°ç¨åºææ ï¼é»è®¤ true ï¼ |
| | | * @property {String} loadingIcon å è½½ä¸ç徿 ï¼æè
å°å¾ç ï¼é»è®¤ 'photo' ï¼ |
| | | * @property {String} errorIcon å 载失败ç徿 ï¼æè
å°å¾ç ï¼é»è®¤ 'error-circle' ï¼ |
| | | * @property {Boolean} showLoading æ¯å¦æ¾ç¤ºå è½½ä¸ç徿 æè
èªå®ä¹çslot ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} showError æ¯å¦æ¾ç¤ºå è½½é误ç徿 æè
èªå®ä¹çslot ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} fade æ¯å¦éè¦æ·¡å
¥ææ ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} webp åªæ¯æç½ç»èµæºï¼åªå¯¹å¾®ä¿¡å°ç¨åºææ ï¼é»è®¤ false ï¼ |
| | | * @property {String | Number} duration æé
fadeåæ°çè¿æ¸¡æ¶é´ï¼åä½ms ï¼é»è®¤ 500 ï¼ |
| | | * @property {String} bgColor èæ¯é¢è²ï¼ç¨äºæ·±è²é¡µé¢å è½½å¾çæ¶ï¼ä¸ºäºåèæ¯è²èå (é»è®¤ '#f3f4f6' ) |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * @event {Function} click ç¹å»å¾çæ¶è§¦å |
| | | * @event {Function} error å¾çå 载失败æ¶è§¦å |
| | | * @event {Function} load å¾çå è½½æåæ¶è§¦å |
| | | * @example <u-image width="100%" height="300px" :src="src"></u-image> |
| | | */ |
| | | export default { |
| | | name: 'u-image', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // å¾çæ¯å¦å è½½é误ï¼å¦ææ¯ï¼åæ¾ç¤ºé误å ä½å¾ |
| | | isError: false, |
| | | // åå§åç»ä»¶æ¶ï¼é»è®¤ä¸ºå è½½ä¸ç¶æ |
| | | loading: true, |
| | | // ä¸éæåº¦ï¼ä¸ºäºå®ç°æ·¡å
¥æ·¡åºçææ |
| | | opacity: 1, |
| | | // è¿æ¸¡æ¶é´ï¼å 为propsç弿 æ³ä¿®æ¹ï¼æ
éè¦ä¸ä¸ªä¸é´å¼ |
| | | durationTime: this.duration, |
| | | // å¾çå è½½å®ææ¶ï¼å»æèæ¯é¢è²ï¼å ä¸ºå¦ææ¯pngå¾çï¼å°±ä¼æ¾ç¤ºç°è²çèæ¯ |
| | | backgroundStyle: {}, |
| | | // ç¨äºfade模å¼çæ§å¶ç»ä»¶æ¾ç¤ºä¸å¦ |
| | | show: false |
| | | }; |
| | | }, |
| | | watch: { |
| | | src: { |
| | | immediate: true, |
| | | handler(n) { |
| | | if (!n) { |
| | | // å¦æä¼ å
¥nullæè
''ï¼æè
falseï¼æè
undefinedï¼æ 记为éè¯¯ç¶æ |
| | | this.isError = true |
| | | |
| | | } else { |
| | | this.isError = false; |
| | | this.loading = true; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | wrapStyle() { |
| | | let style = {}; |
| | | // éè¿è°ç¨addUnit()æ¹æ³ï¼å¦ææåä½ï¼å¦ç¾åæ¯ï¼pxåä½çï¼ç´æ¥è¿åï¼å¦ææ¯çº¯ç²¹çæ°å¼ï¼åå ä¸rpxåä½ |
| | | style.width = this.$u.addUnit(this.width); |
| | | style.height = this.$u.addUnit(this.height); |
| | | // å¦ææ¯æ¾ç¤ºåå½¢ï¼è®¾ç½®ä¸ä¸ªå¾å¤çåå¾å¼å³å¯ |
| | | style.borderRadius = this.shape == 'circle' ? '10000px' : uni.$u.addUnit(this.radius) |
| | | // å¦æè®¾ç½®åè§ï¼å¿
é¡»è¦æhiddenï¼å¦åå¯è½åè§æ æ |
| | | style.overflow = this.borderRadius > 0 ? 'hidden' : 'visible' |
| | | // if (this.fade) { |
| | | // style.opacity = this.opacity |
| | | // // nvueä¸ï¼è¿å ä¸ªå±æ§å¿
é¡»è¦åå¼å |
| | | // style.transitionDuration = `${this.durationTime}ms` |
| | | // style.transitionTimingFunction = 'ease-in-out' |
| | | // style.transitionProperty = 'opacity' |
| | | // } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.show = true |
| | | }, |
| | | methods: { |
| | | // ç¹å»å¾ç |
| | | onClick() { |
| | | this.$emit('click') |
| | | }, |
| | | // å¾çå 载失败 |
| | | onErrorHandler(err) { |
| | | this.loading = false |
| | | this.isError = true |
| | | this.$emit('error', err) |
| | | }, |
| | | // å¾çå è½½å®æï¼æ è®°loadingç»æ |
| | | onLoadHandler() { |
| | | this.loading = false |
| | | this.isError = false |
| | | this.$emit('load') |
| | | this.removeBgColor() |
| | | // 妿ä¸éè¦å¨ç»ææï¼å°±ä¸æ§è¡ä¸æ¹ä»£ç ï¼åæ¶ç§»é¤å è½½æ¶çèæ¯é¢è² |
| | | // å¦åæ éfadeæææ¶ï¼pngå¾çä¾ç¶è½çå°ä¸æ¹çèæ¯è² |
| | | // if (!this.fade) return this.removeBgColor(); |
| | | // // 忥opacity为1(ä¸éæï¼æ¯ä¸ºäºæ¾ç¤ºå ä½å¾)ï¼æ¹æ0(éæï¼æå³ç该å
ç´ æ¾ç¤ºçæ¯èæ¯é¢è²ï¼é»è®¤çç°è²)ï¼åæ¹æ1ï¼æ¯ä¸ºäºè·å¾è¿æ¸¡ææ |
| | | // this.opacity = 0; |
| | | // // è¿é设置为0ï¼æ¯ä¸ºäºå¾çå±ç¤ºå°èæ¯å
¨éæè¿ä¸ªè¿ç¨æ¶é´ä¸º0ï¼å»¶æ¶ä¹åå»¶æ¶ä¹åéæ°è®¾ç½®ä¸ºdurationï¼æ¯ä¸ºäºè·å¾èæ¯éæ(ç°è²) |
| | | // // å°å¾çå±ç¤ºçè¿ç¨ä¸çæ·¡å
¥ææ |
| | | // this.durationTime = 0; |
| | | // // å»¶æ¶50msï¼å¦å卿µè§å¨H5ï¼è¿æ¸¡æææ æ |
| | | // setTimeout(() => { |
| | | // this.durationTime = this.duration; |
| | | // this.opacity = 1; |
| | | // setTimeout(() => { |
| | | // this.removeBgColor(); |
| | | // }, this.durationTime); |
| | | // }, 50); |
| | | }, |
| | | // ç§»é¤å¾ççèæ¯è² |
| | | removeBgColor() { |
| | | // æ·¡å
¥å¨ç»è¿æ¸¡å®æåï¼å°èæ¯è®¾ç½®ä¸ºéæè²ï¼å¦åpngå¾çä¼çå°ç°è²çèæ¯ |
| | | this.backgroundStyle = { |
| | | backgroundColor: 'transparent' |
| | | }; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../libs/css/components.scss'; |
| | | |
| | | $u-image-error-top:0px !default; |
| | | $u-image-error-left:0px !default; |
| | | $u-image-error-width:100% !default; |
| | | $u-image-error-hight:100% !default; |
| | | $u-image-error-background-color:$u-bg-color !default; |
| | | $u-image-error-color:$u-tips-color !default; |
| | | $u-image-error-font-size: 46rpx !default; |
| | | |
| | | .u-image { |
| | | position: relative; |
| | | transition: opacity 0.5s ease-in-out; |
| | | |
| | | &__image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | &__loading, |
| | | &__error { |
| | | position: absolute; |
| | | top: $u-image-error-top; |
| | | left: $u-image-error-left; |
| | | width: $u-image-error-width; |
| | | height: $u-image-error-hight; |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background-color: $u-image-error-background-color; |
| | | color: $u-image-error-color; |
| | | font-size: $u-image-error-font-size; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å表éç¹ææ¬å
容 |
| | | text: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.indexAnchor.text |
| | | }, |
| | | // å表éç¹æåé¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.indexAnchor.color |
| | | }, |
| | | // å表éç¹æå大å°ï¼åä½é»è®¤px |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.indexAnchor.size |
| | | }, |
| | | // å表éç¹èæ¯é¢è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.indexAnchor.bgColor |
| | | }, |
| | | // å表éç¹é«åº¦ï¼åä½é»è®¤px |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.indexAnchor.height |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <header> |
| | | <!-- #endif --> |
| | | <view |
| | | class="u-index-anchor u-border-bottom" |
| | | :ref="`u-index-anchor-${text}`" |
| | | :style="{ |
| | | height: $u.addUnit(height), |
| | | backgroundColor: bgColor |
| | | }" |
| | | > |
| | | <text |
| | | class="u-index-anchor__text" |
| | | :style="{ |
| | | fontSize: $u.addUnit(size), |
| | | color: color |
| | | }" |
| | | >{{ text }}</text> |
| | | </view> |
| | | <!-- #ifdef APP-NVUE --> |
| | | </header> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | /** |
| | | * IndexAnchor å表éç¹ |
| | | * @description |
| | | * @tutorial https://uviewui.com/components/indexList.html |
| | | * @property {String | Number} text å表éç¹ææ¬å
容 |
| | | * @property {String} color å表éç¹æåé¢è² ( é»è®¤ '#606266' ) |
| | | * @property {String | Number} size å表éç¹æå大å°ï¼åä½é»è®¤px ( é»è®¤ 14 ) |
| | | * @property {String} bgColor å表éç¹èæ¯é¢è² ( é»è®¤ '#dedede' ) |
| | | * @property {String | Number} height å表éç¹é«åº¦ï¼åä½é»è®¤px ( é»è®¤ 32 ) |
| | | * @example <u-index-anchor :text="indexList[index]"></u-index-anchor> |
| | | */ |
| | | export default { |
| | | name: 'u-index-anchor', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // æ¤å¤ä¼æ´»å¨ç¶ç»ä»¶å®ä¾ï¼å¹¶èµå¼ç»å®ä¾çparent屿§ |
| | | const indexList = uni.$u.$parent.call(this, 'u-index-list') |
| | | if (!indexList) { |
| | | return uni.$u.error('u-index-anchorå¿
é¡»è¦æé
u-index-listç»ä»¶ä½¿ç¨') |
| | | } |
| | | // å°å½åå®ä¾æ¾å
¥å°u-index-listä¸ |
| | | indexList.anchors.push(this) |
| | | const indexListItem = uni.$u.$parent.call(this, 'u-index-item') |
| | | // #ifndef APP-NVUE |
| | | // åªæå¨énvueä¸ï¼u-index-anchorææ¯åµå¥å¨u-index-itemä¸ç |
| | | if (!indexListItem) { |
| | | return uni.$u.error('u-index-anchorå¿
é¡»è¦æé
u-index-itemç»ä»¶ä½¿ç¨') |
| | | } |
| | | // 设置u-index-itemçid为anchorçtextæ è¯ç¬¦ï¼å 为énvue䏿»å¨å表éè¦ä¾èµscroll-viewæ»å¨å°å
ç´ çç¹æ§ |
| | | indexListItem.id = this.text.charCodeAt(0) |
| | | // #endif |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-index-anchor { |
| | | position: sticky; |
| | | top: 0; |
| | | @include flex; |
| | | align-items: center; |
| | | padding-left: 15px; |
| | | z-index: 1; |
| | | |
| | | &__text { |
| | | @include flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <cell ref="u-index-item"> |
| | | <!-- #endif --> |
| | | <view |
| | | class="u-index-item" |
| | | :id="`u-index-item-${id}`" |
| | | :class="[`u-index-item-${id}`]" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | <!-- #ifdef APP-NVUE --> |
| | | </cell> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | // ç±äºweex为é¿éçKPIä¸ç»©èæ ¸ç产ç©ï¼æä»¥ä¸æ¯æç¾åæ¯åä½ï¼è¿ééè¦éè¿domæ¥è¯¢ç»ä»¶ç宽度 |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | /** |
| | | * IndexItem |
| | | * @description |
| | | * @tutorial https://uviewui.com/components/indexList.html |
| | | * @property {String} |
| | | * @event {Function} |
| | | * @example |
| | | */ |
| | | export default { |
| | | name: 'u-index-item', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | // æ¬ç»ä»¶å°æ»å¨æ¡é¡¶é¨çè·ç¦» |
| | | top: 0, |
| | | height: 0, |
| | | id: '' |
| | | } |
| | | }, |
| | | created() { |
| | | // åç»ä»¶u-index-anchorçå®ä¾ |
| | | this.anchor = {} |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // æ¤å¤ä¼æ´»å¨ç¶ç»ä»¶å®ä¾ï¼å¹¶èµå¼ç»å®ä¾çparent屿§ |
| | | this.getParentData('u-index-list') |
| | | if (!this.parent) { |
| | | return uni.$u.error('u-index-itemå¿
é¡»è¦æé
u-index-listç»ä»¶ä½¿ç¨') |
| | | } |
| | | uni.$u.sleep().then(() =>{ |
| | | this.getIndexItemRect().then(size => { |
| | | // ç±äºå¯¹è±¡çå¼ç¨ç¹æ§ï¼æ¤å¤ä¼åæ¶çæå°ç¶ç»ä»¶çchildrenæ°ç»çæ¬å®ä¾çtop屿§ä¸ï¼ä¾ç¶ç»ä»¶å¤æè¯»å |
| | | this.top = Math.ceil(size.top) |
| | | this.height = Math.ceil(size.height) |
| | | }) |
| | | }) |
| | | }, |
| | | getIndexItemRect() { |
| | | return new Promise(resolve => { |
| | | // #ifndef APP-NVUE |
| | | this.$uGetRect('.u-index-item').then(size => { |
| | | resolve(size) |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | const ref = this.$refs['u-index-item'] |
| | | dom.getComponentRect(ref, res => { |
| | | resolve(res.size) |
| | | }) |
| | | // #endif |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // å³è¾¹éç¹éæ¿æ´»çé¢è² |
| | | inactiveColor: { |
| | | type: String, |
| | | default: uni.$u.props.indexList.inactiveColor |
| | | }, |
| | | // å³è¾¹éç¹æ¿æ´»çé¢è² |
| | | activeColor: { |
| | | type: String, |
| | | default: uni.$u.props.indexList.activeColor |
| | | }, |
| | | // ç´¢å¼å符åè¡¨ï¼æ°ç»å½¢å¼ |
| | | indexList: { |
| | | type: Array, |
| | | default: uni.$u.props.indexList.indexList |
| | | }, |
| | | // æ¯å¦å¼å¯éç¹èªå¨å¸é¡¶ |
| | | sticky: { |
| | | type: Boolean, |
| | | default: uni.$u.props.indexList.sticky |
| | | }, |
| | | // èªå®ä¹å¯¼èªæ çé«åº¦ |
| | | customNavHeight: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.indexList.customNavHeight |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-index-list"> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <list |
| | | :scrollTop="scrollTop" |
| | | enable-back-to-top |
| | | :offset-accuracy="1" |
| | | :style="{ |
| | | maxHeight: $u.addUnit(scrollViewHeight) |
| | | }" |
| | | @scroll="scrollHandler" |
| | | ref="uList" |
| | | > |
| | | <cell |
| | | v-if="$slots.header" |
| | | ref="header" |
| | | > |
| | | <slot name="header" /> |
| | | </cell> |
| | | <slot /> |
| | | <cell v-if="$slots.footer"> |
| | | <slot name="footer" /> |
| | | </cell> |
| | | </list> |
| | | <!-- #endif --> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <scroll-view |
| | | :scrollTop="scrollTop" |
| | | :scrollIntoView="scrollIntoView" |
| | | :offset-accuracy="1" |
| | | :style="{ |
| | | maxHeight: $u.addUnit(scrollViewHeight) |
| | | }" |
| | | scroll-y |
| | | @scroll="scrollHandler" |
| | | ref="uList" |
| | | > |
| | | <view v-if="$slots.header"> |
| | | <slot name="header" /> |
| | | </view> |
| | | <slot /> |
| | | <view v-if="$slots.footer"> |
| | | <slot name="footer" /> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- #endif --> |
| | | <view |
| | | class="u-index-list__letter" |
| | | ref="u-index-list__letter" |
| | | :style="{ top: $u.addUnit(letterInfo.top || 100) }" |
| | | @touchstart="touchStart" |
| | | @touchmove.stop.prevent="touchMove" |
| | | @touchend.stop.prevent="touchEnd" |
| | | @touchcancel.stop.prevent="touchEnd" |
| | | > |
| | | <view |
| | | class="u-index-list__letter__item" |
| | | v-for="(item, index) in uIndexList" |
| | | :key="index" |
| | | :style="{ |
| | | backgroundColor: activeIndex === index ? activeColor : 'transparent' |
| | | }" |
| | | > |
| | | <text |
| | | class="u-index-list__letter__item__index" |
| | | :style="{color: activeIndex === index ? '#fff' : inactiveColor}" |
| | | >{{ item }}</text> |
| | | </view> |
| | | </view> |
| | | <u-transition |
| | | mode="fade" |
| | | :show="touching" |
| | | :customStyle="{ |
| | | position: 'fixed', |
| | | right: '50px', |
| | | top: $u.addUnit(indicatorTop), |
| | | zIndex: 2 |
| | | }" |
| | | > |
| | | <view |
| | | class="u-index-list__indicator" |
| | | :class="['u-index-list__indicator--show']" |
| | | :style="{ |
| | | height: $u.addUnit(indicatorHeight), |
| | | width: $u.addUnit(indicatorHeight) |
| | | }" |
| | | > |
| | | <text class="u-index-list__indicator__text">{{ uIndexList[activeIndex] }}</text> |
| | | </view> |
| | | </u-transition> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const indexList = () => { |
| | | const indexList = []; |
| | | const charCodeOfA = 'A'.charCodeAt(0); |
| | | for (let i = 0; i < 26; i++) { |
| | | indexList.push(String.fromCharCode(charCodeOfA + i)); |
| | | } |
| | | return indexList; |
| | | } |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | // ç±äºweex为é¿éçKPIä¸ç»©èæ ¸ç产ç©ï¼æä»¥ä¸æ¯æç¾åæ¯åä½ï¼è¿ééè¦éè¿domæ¥è¯¢ç»ä»¶ç宽度 |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | /** |
| | | * IndexList ç´¢å¼å表 |
| | | * @description éè¿æå 颿¿æ¶çº³å
容åºå |
| | | * @tutorial https://uviewui.com/components/indexList.html |
| | | * @property {String} inactiveColor å³è¾¹éç¹éæ¿æ´»çé¢è² ( é»è®¤ '#606266' ) |
| | | * @property {String} activeColor å³è¾¹éç¹æ¿æ´»çé¢è² ( é»è®¤ '#5677fc' ) |
| | | * @property {Array} indexList ç´¢å¼å符åè¡¨ï¼æ°ç»å½¢å¼ |
| | | * @property {Boolean} sticky æ¯å¦å¼å¯éç¹èªå¨å¸é¡¶ ( é»è®¤ true ) |
| | | * @property {String | Number} customNavHeight èªå®ä¹å¯¼èªæ çé«åº¦ ( é»è®¤ 0 ) |
| | | * */ |
| | | export default { |
| | | name: 'u-index-list', |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | // #ifdef MP-WEIXIN |
| | | // å°èªå®ä¹èç¹è®¾ç½®æèæçï¼æ´å æ¥è¿Vueç»ä»¶ç表ç°ï¼è½æ´å¥½ç使ç¨flex屿§ |
| | | options: { |
| | | virtualHost: true |
| | | }, |
| | | // #endif |
| | | data() { |
| | | return { |
| | | // å½åæ£å¨è¢«éä¸çåæ¯ç´¢å¼ |
| | | activeIndex: -1, |
| | | touchmoveIndex: 1, |
| | | // ç´¢å¼åæ¯çä¿¡æ¯ |
| | | letterInfo: { |
| | | height: 0, |
| | | itemHeight: 0, |
| | | top: 0 |
| | | }, |
| | | // è®¾ç½®åæ¯æç¤ºå¨çé«åº¦ï¼åé¢ä¸ºäºè®©æç¤ºå¨è·é忝ï¼å¹¶å°å°è§é¨åæå忝çä¸é¨ï¼éè¦ä¾èµæ¤å¼ |
| | | indicatorHeight: 50, |
| | | // 忝æ¾å¤§æç¤ºå¨çtopå¼ï¼ä¸ºäºè®©å
¶æåå½åæ¿æ´»ç忝 |
| | | // indicatorTop: 0 |
| | | // å½åæ¯å¦æ£å¨è¢«è§¦æ¸ç¶æ |
| | | touching: false, |
| | | // æ»å¨æ¡é¡¶é¨topå¼ |
| | | scrollTop: 0, |
| | | // scroll-viewçé«åº¦ |
| | | scrollViewHeight: 0, |
| | | // ç³»ç»ä¿¡æ¯ |
| | | sys: uni.$u.sys(), |
| | | scrolling: false, |
| | | scrollIntoView: '', |
| | | } |
| | | }, |
| | | computed: { |
| | | // 妿æä¼ å
¥å¤é¨çindexListéç¹æ°ç»å使ç¨ï¼å¦å使ç¨å
é¨çæA-Z忝 |
| | | uIndexList() { |
| | | return this.indexList.length ? this.indexList : indexList() |
| | | }, |
| | | // 忝æ¾å¤§æç¤ºå¨çtopå¼ï¼ä¸ºäºè®©å
¶æåå½åæ¿æ´»ç忝 |
| | | indicatorTop() { |
| | | const { |
| | | top, |
| | | itemHeight |
| | | } = this.letterInfo |
| | | return Math.floor(top + itemHeight * this.activeIndex + itemHeight / 2 - this.indicatorHeight / 2) |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬åæ¯ç´¢å¼çååï¼éæ°è®¾ç½®å°ºå¯¸ |
| | | uIndexList: { |
| | | immediate: true, |
| | | handler() { |
| | | uni.$u.sleep().then(() => { |
| | | this.setIndexListLetterInfo() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.children = [] |
| | | this.anchors = [] |
| | | this.init() |
| | | }, |
| | | mounted() { |
| | | this.setIndexListLetterInfo() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // 设置å表çé«åº¦ä¸ºæ´ä¸ªå±å¹çé«åº¦ |
| | | //åå»this.customNavHeightï¼å¹¶å°this.scrollViewHeight设置为maxHeight |
| | | //è§£å³å½u-index-listç»ä»¶æ¾å¨tabbar页颿¶,scroll-viewå
容è¾å°æ¶ï¼è¿è½æ»å¨ |
| | | this.scrollViewHeight = this.sys.windowHeight - this.customNavHeight |
| | | }, |
| | | // ç´¢å¼åè¡¨è¢«è§¦æ¸ |
| | | touchStart(e) { |
| | | // è·å触æ¸ç¹ä¿¡æ¯ |
| | | const touchStart = e.changedTouches[0] |
| | | if (!touchStart) return |
| | | this.touching = true |
| | | const { |
| | | pageY |
| | | } = touchStart |
| | | // æ ¹æ®å½å触æ¸ç¹çåæ ï¼è·åå½å触æ¸ç为第å ä¸ªåæ¯ |
| | | const currentIndex = this.getIndexListLetter(pageY) |
| | | this.setValueForTouch(currentIndex) |
| | | }, |
| | | // ç´¢å¼åæ¯åè¡¨è¢«è§¦æ¸æ»å¨ä¸ |
| | | touchMove(e) { |
| | | // è·å触æ¸ç¹ä¿¡æ¯ |
| | | let touchMove = e.changedTouches[0] |
| | | if (!touchMove) return; |
| | | |
| | | // æ»å¨ç»æåè¿
éå¼å§ç¬¬äºæ¬¡æ»å¨æ¶å touching 为 false é æä¸æ¾ç¤º indicator é®é¢ |
| | | if (!this.touching) { |
| | | this.touching = true |
| | | } |
| | | const { |
| | | pageY |
| | | } = touchMove |
| | | const currentIndex = this.getIndexListLetter(pageY) |
| | | this.setValueForTouch(currentIndex) |
| | | }, |
| | | // 触æ¸ç»æ |
| | | touchEnd(e) { |
| | | // å»¶æ¶ä¸å®æ¶é´ååéèæç¤ºå¨ï¼ä¸ºäºè®©ç¨æ·ççæ´ç´è§ï¼åæ¶ä¹æ¯ä¸ºäºæ¶é¤å¿«é忢u-transitionçshow带æ¥çå½±å |
| | | uni.$u.sleep(300).then(() => { |
| | | this.touching = false |
| | | }) |
| | | }, |
| | | // è·åç´¢å¼å表ç尺寸以åå个å符çå°ºå¯¸ä¿¡æ¯ |
| | | getIndexListLetterRect() { |
| | | return new Promise(resolve => { |
| | | // å»¶æ¶ä¸å®æ¶é´ï¼ä»¥è·ådom尺寸 |
| | | // #ifndef APP-NVUE |
| | | this.$uGetRect('.u-index-list__letter').then(size => { |
| | | resolve(size) |
| | | }) |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | const ref = this.$refs['u-index-list__letter'] |
| | | dom.getComponentRect(ref, res => { |
| | | resolve(res.size) |
| | | }) |
| | | // #endif |
| | | }) |
| | | }, |
| | | // 设置indexListç´¢å¼çå°ºå¯¸ä¿¡æ¯ |
| | | setIndexListLetterInfo() { |
| | | this.getIndexListLetterRect().then(size => { |
| | | const { |
| | | height |
| | | } = size |
| | | const sys = uni.$u.sys() |
| | | const windowHeight = sys.windowHeight |
| | | let customNavHeight = 0 |
| | | // æ¶é¤åç«¯å¯¼èªæ éåçååç导è´çå·®å¼ï¼è®©ç´¢å¼åè¡¨åæ¯å¯¹å±å¹åç´å±
ä¸ |
| | | if (this.customNavHeight == 0) { |
| | | // #ifdef H5 |
| | | customNavHeight = sys.windowTop |
| | | // #endif |
| | | // #ifndef H5 |
| | | // å¨éH5ä¸ï¼ä¸ºåçå¯¼èªæ ï¼å
¶é«åº¦ä¸ç®å¨windowHeightå
ï¼è¿é设置为è´å¼ï¼åé¢ç¸å æ¶åæåå»å
¶é«åº¦çä¸å |
| | | customNavHeight = -(sys.statusBarHeight + 44) |
| | | // #endif |
| | | } else { |
| | | customNavHeight = uni.$u.getPx(this.customNavHeight) |
| | | } |
| | | this.letterInfo = { |
| | | height, |
| | | // 为äºè®©åæ¯å表对å±å¹ç»å¯¹å±
ä¸ï¼è®©å
¶å¯¹å¯¼èªæ è¿è¡ä¿®æ£ï¼ä¹å³å¾ä¸åç§»å¯¼èªæ çä¸åé«åº¦ |
| | | top: (windowHeight - height) / 2 + customNavHeight / 2, |
| | | itemHeight: Math.floor(height / this.uIndexList.length) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åå½å被触æ¸çç´¢å¼åæ¯ |
| | | getIndexListLetter(pageY) { |
| | | const { |
| | | top, |
| | | height, |
| | | itemHeight |
| | | } = this.letterInfo |
| | | // 对H5çpageYè¿è¡ä¿®æ£ï¼è¿æ¯ç±äºuni-appèªä½å¤æ
å¨H5ä¸å°è§¦æ¸ç¹çåæ è·H5çå¯¼èªæ ç»å导è´çé®é¢ |
| | | // #ifdef H5 |
| | | pageY += uni.$u.sys().windowTop |
| | | // #endif |
| | | // 对第ä¸åæåä¸ä¸ªåæ¯åè¾¹çå¤çï¼å ä¸ºç¨æ·å¯è½å¨åæ¯å表ä¸è§¦æ¸å°ä¸¤ç«¯ç尽头åä¾ç¶ç»§ç»æ»å¨ |
| | | if (pageY < top) { |
| | | return 0 |
| | | } else if (pageY >= top + height) { |
| | | // 妿è¶
åºäºï¼åæåä¸ä¸ªåæ¯ |
| | | return this.uIndexList.length - 1 |
| | | } else { |
| | | // å°è§¦æ¸ç¹çYè½´åç§»å¼ï¼åå»ç´¢å¼åæ¯çtopå¼ï¼é¤ä»¥æ¯ä¸ªåæ¯çé«åº¦ï¼å³å¯å¾å°å½å触æ¸ç¹è½å¨åªä¸ªåæ¯ä¸ |
| | | return Math.floor((pageY - top) / itemHeight); |
| | | } |
| | | }, |
| | | // 设置å项ç±è§¦æ¸è导è´ååçå¼ |
| | | setValueForTouch(currentIndex) { |
| | | // 妿åç§»é太å°ï¼ååå¾åºç伿¯åä¸ä¸ªç´¢å¼åæ¯ï¼ä¸ºäºé²æï¼è¿è¡è¿å |
| | | if (currentIndex === this.activeIndex) return |
| | | this.activeIndex = currentIndex |
| | | // #ifndef APP-NVUE || MP-WEIXIN |
| | | // å¨énvueä¸ï¼ç±äºanchoråitemé½å¨u-index-itemä¸ï¼æä»¥éè¦å¯¹index-itemè¿è¡åç§» |
| | | this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}` |
| | | // #endif |
| | | // #ifdef MP-WEIXIN |
| | | // 微信å°ç¨åºä¸ï¼scroll-viewçscroll-into-view屿§æ æ³å¯¹slotä¸çå
容çidçæï¼åªè½éè¿è®¾ç½®scrollTopçå½¢å¼å»ç§»å¨æ»å¨æ¡ |
| | | this.scrollTop = this.children[currentIndex].top |
| | | // #endif |
| | | // #ifdef APP-NVUE |
| | | // å¨nvueä¸ï¼ç±äºcellåheader为å级å
ç´ ï¼æä»¥å®é
æ¯éè¦å¯¹header(anchor)è¿è¡åç§» |
| | | const anchor = `u-index-anchor-${this.uIndexList[currentIndex]}` |
| | | dom.scrollToElement(this.anchors[currentIndex].$refs[anchor], { |
| | | offset: 0, |
| | | animated: false |
| | | }) |
| | | // #endif |
| | | }, |
| | | getHeaderRect() { |
| | | // è·åheader slotçé«åº¦ï¼å 为listç»ä»¶ä¸è·åå
ç´ çå°ºå¯¸æ¯æ²¡ætopå¼ç |
| | | return new Promise(resolve => { |
| | | dom.getComponentRect(this.$refs.header, res => { |
| | | resolve(res.size) |
| | | }) |
| | | }) |
| | | }, |
| | | // scroll-viewçæ»å¨äºä»¶ |
| | | async scrollHandler(e) { |
| | | if (this.touching || this.scrolling) return |
| | | // æ¯è¿ä¸å®æ¶é´åæ ·ä¸æ¬¡ï¼åå°èµæºæè以åå¯è½å¸¦æ¥çå¡é¡¿ |
| | | this.scrolling = true |
| | | uni.$u.sleep(10).then(() => { |
| | | this.scrolling = false |
| | | }) |
| | | let scrollTop = 0 |
| | | const len = this.children.length |
| | | let children = this.children |
| | | const anchors = this.anchors |
| | | // #ifdef APP-NVUE |
| | | // nvueä¸è·åçæ»å¨æ¡åç§»ä¸ºè´æ°ï¼éè¦è½¬ä¸ºæ£æ° |
| | | scrollTop = Math.abs(e.contentOffset.y) |
| | | // è·åheader slotçå°ºå¯¸ä¿¡æ¯ |
| | | const header = await this.getHeaderRect() |
| | | // itemçtopå¼ï¼å¨nvueä¸ï¼æ¨¡æåºçanchorçtopï¼ç±»ä¼¼énvueä¸çindex-itemçtop |
| | | let top = header.height |
| | | // ç±äºlistç»ä»¶æ æ³è·åcellçtopå¼ï¼è¿ééè¿header slotåå个itemä¹é´çheightï¼æ¨¡æåºç±»ä¼¼énvueä¸çä½ç½®ä¿¡æ¯ |
| | | children = this.children.map((item, index) => { |
| | | const child = { |
| | | height: item.height, |
| | | top |
| | | } |
| | | // è¿è¡ç´¯å ï¼ç»ä¸ä¸ä¸ªitemæä¾è®¡ç®ä¾æ® |
| | | top += item.height + anchors[index].height |
| | | return child |
| | | }) |
| | | // #endif |
| | | // #ifndef APP-NVUE |
| | | // énvueéè¿detailè·åæ»å¨æ¡ä½ç§» |
| | | scrollTop = e.detail.scrollTop |
| | | // #endif |
| | | for (let i = 0; i < len; i++) { |
| | | const item = children[i], |
| | | nextItem = children[i + 1] |
| | | // 妿æ»å¨æ¡é«åº¦å°äºç¬¬ä¸ä¸ªitemçtopå¼ï¼æ¤æ¶æ é设置任æåæ¯ä¸ºé«äº® |
| | | if (scrollTop <= children[0].top || scrollTop >= children[len - 1].top + children[len - |
| | | 1].height) { |
| | | this.activeIndex = -1 |
| | | break |
| | | } else if (!nextItem) { |
| | | // å½ä¸åå¨ä¸ä¸ä¸ªitemæ¶ï¼æå³çåéå°äºæåä¸ä¸ª |
| | | this.activeIndex = len - 1 |
| | | break |
| | | } else if (scrollTop > item.top && scrollTop < nextItem.top) { |
| | | this.activeIndex = i |
| | | break |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-index-list { |
| | | |
| | | &__letter { |
| | | position: fixed; |
| | | right: 0; |
| | | text-align: center; |
| | | z-index: 3; |
| | | padding: 0 6px; |
| | | |
| | | &__item { |
| | | width: 16px; |
| | | height: 16px; |
| | | border-radius: 100px; |
| | | margin: 1px 0; |
| | | @include flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | &--active { |
| | | background-color: $u-primary; |
| | | } |
| | | |
| | | &__index { |
| | | font-size: 12px; |
| | | text-align: center; |
| | | line-height: 12px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | &__indicator { |
| | | width: 50px; |
| | | height: 50px; |
| | | border-radius: 100px 100px 0 100px; |
| | | text-align: center; |
| | | color: #ffffff; |
| | | background-color: #c9c9c9; |
| | | transform: rotate(-45deg); |
| | | @include flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | &__text { |
| | | font-size: 28px; |
| | | line-height: 28px; |
| | | font-weight: bold; |
| | | color: #fff; |
| | | transform: rotate(45deg); |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // è¾å
¥çå¼ |
| | | value: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.value |
| | | }, |
| | | // è¾å
¥æ¡ç±»å |
| | | // number-æ°åè¾å
¥é®çï¼app-vueä¸å¯ä»¥è¾å
¥æµ®ç¹æ°ï¼app-nvueåå°ç¨åºå¹³å°ä¸åªè½è¾å
¥æ´æ° |
| | | // idcard-身份è¯è¾å
¥é®çï¼å¾®ä¿¡ãæ¯ä»å®ãç¾åº¦ãQQå°ç¨åº |
| | | // digit-另尿°ç¹çæ°åé®çï¼Appçnvue页é¢ãå¾®ä¿¡ãæ¯ä»å®ãç¾åº¦ã头æ¡ãQQå°ç¨åº |
| | | // text-ææ¬è¾å
¥é®ç |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.input.type |
| | | }, |
| | | // 妿 textarea æ¯å¨ä¸ä¸ª position:fixed çåºåï¼éè¦æ¾ç¤ºæå®å±æ§ fixed 为 trueï¼ |
| | | // å
¼å®¹æ§ï¼å¾®ä¿¡å°ç¨åºãç¾åº¦å°ç¨åºãåèè·³å¨å°ç¨åºãQQå°ç¨åº |
| | | fixed: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.fixed |
| | | }, |
| | | // æ¯å¦ç¦ç¨è¾å
¥æ¡ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.disabled |
| | | }, |
| | | // ç¦ç¨ç¶ææ¶çèæ¯è² |
| | | disabledColor: { |
| | | type: String, |
| | | default: uni.$u.props.input.disabledColor |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæ¸
餿§ä»¶ |
| | | clearable: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.clearable |
| | | }, |
| | | // æ¯å¦å¯ç ç±»å |
| | | password: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.password |
| | | }, |
| | | // æå¤§è¾å
¥é¿åº¦ï¼è®¾ç½®ä¸º -1 çæ¶åä¸é嶿大é¿åº¦ |
| | | maxlength: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.maxlength |
| | | }, |
| | | // è¾å
¥æ¡ä¸ºç©ºæ¶çå ä½ç¬¦ |
| | | placeholder: { |
| | | type: String, |
| | | default: uni.$u.props.input.placeholder |
| | | }, |
| | | // æå®placeholderçæ ·å¼ç±»ï¼æ³¨æé¡µé¢æç»ä»¶çstyleä¸åäºscopedæ¶ï¼éè¦å¨ç±»ååå/deep/ |
| | | placeholderClass: { |
| | | type: String, |
| | | default: uni.$u.props.input.placeholderClass |
| | | }, |
| | | // æå®placeholderçæ ·å¼ |
| | | placeholderStyle: { |
| | | type: [String, Object], |
| | | default: uni.$u.props.input.placeholderStyle |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¾å
¥åæ°ç»è®¡ï¼åªå¨ type ="text"ætype ="textarea"æ¶ææ |
| | | showWordLimit: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.showWordLimit |
| | | }, |
| | | // 设置å³ä¸è§æé®çæåï¼ææå¼ï¼send|search|next|go|doneï¼å
¼å®¹æ§è¯¦è§uni-appææ¡£ |
| | | // https://uniapp.dcloud.io/component/input |
| | | // https://uniapp.dcloud.io/component/textarea |
| | | confirmType: { |
| | | type: String, |
| | | default: uni.$u.props.input.confirmType |
| | | }, |
| | | // ç¹å»é®çå³ä¸è§æé®æ¶æ¯å¦ä¿æé®ç䏿¶èµ·ï¼H5æ æ |
| | | confirmHold: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.confirmHold |
| | | }, |
| | | // focusæ¶ï¼ç¹å»é¡µé¢çæ¶å䏿¶èµ·é®çï¼å¾®ä¿¡å°ç¨åºææ |
| | | holdKeyboard: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.holdKeyboard |
| | | }, |
| | | // èªå¨è·åç¦ç¹ |
| | | // å¨ H5 å¹³å°è½å¦èç¦ä»¥å软é®çæ¯å¦è·éå¼¹åºï¼åå³äºå½åæµè§å¨æ¬èº«çå®ç°ãnvue 页é¢ä¸æ¯æï¼é使ç¨ç»ä»¶ç focus()ãblur() æ¹æ³æ§å¶ç¦ç¹ |
| | | focus: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.focus |
| | | }, |
| | | // é®çæ¶èµ·æ¶ï¼æ¯å¦èªå¨å¤±å»ç¦ç¹ï¼ç®åä»
App3.0.0+ææ |
| | | autoBlur: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.autoBlur |
| | | }, |
| | | // æ¯å¦å»æ iOS ä¸çé»è®¤å
è¾¹è·ï¼ä»
微信å°ç¨åºï¼ä¸type=textareaæ¶ææ |
| | | disableDefaultPadding: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.disableDefaultPadding |
| | | }, |
| | | // æå®focusæ¶å
æ çä½ç½® |
| | | cursor: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.cursor |
| | | }, |
| | | // è¾å
¥æ¡èç¦æ¶åºé¨ä¸é®ççè·ç¦» |
| | | cursorSpacing: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.cursorSpacing |
| | | }, |
| | | // å
æ èµ·å§ä½ç½®ï¼èªå¨èéæ¶ææï¼éä¸selection-endæé
ä½¿ç¨ |
| | | selectionStart: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.selectionStart |
| | | }, |
| | | // å
æ ç»æä½ç½®ï¼èªå¨èéæ¶ææï¼éä¸selection-startæé
ä½¿ç¨ |
| | | selectionEnd: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.selectionEnd |
| | | }, |
| | | // é®ç弹起æ¶ï¼æ¯å¦èªå¨ä¸æ¨é¡µé¢ |
| | | adjustPosition: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.adjustPosition |
| | | }, |
| | | // è¾å
¥æ¡å
容坹齿¹å¼ï¼å¯éå¼ä¸ºï¼left|center|right |
| | | inputAlign: { |
| | | type: String, |
| | | default: uni.$u.props.input.inputAlign |
| | | }, |
| | | // è¾å
¥æ¡åä½çå¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.input.fontSize |
| | | }, |
| | | // è¾å
¥æ¡åä½é¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.input.color |
| | | }, |
| | | // è¾å
¥æ¡åç½®å¾æ |
| | | prefixIcon: { |
| | | type: String, |
| | | default: uni.$u.props.input.prefixIcon |
| | | }, |
| | | // åç½®å¾æ æ ·å¼ï¼å¯¹è±¡æå符串 |
| | | prefixIconStyle: { |
| | | type: [String, Object], |
| | | default: uni.$u.props.input.prefixIconStyle |
| | | }, |
| | | // è¾å
¥æ¡åç½®å¾æ |
| | | suffixIcon: { |
| | | type: String, |
| | | default: uni.$u.props.input.suffixIcon |
| | | }, |
| | | // åç½®å¾æ æ ·å¼ï¼å¯¹è±¡æå符串 |
| | | suffixIconStyle: { |
| | | type: [String, Object], |
| | | default: uni.$u.props.input.suffixIconStyle |
| | | }, |
| | | // è¾¹æ¡ç±»åï¼surround-åå¨è¾¹æ¡ï¼bottom-åºé¨è¾¹æ¡ï¼none-æ è¾¹æ¡ |
| | | border: { |
| | | type: String, |
| | | default: uni.$u.props.input.border |
| | | }, |
| | | // æ¯å¦åªè¯»ï¼ä¸disabledä¸åä¹å¤å¨äºdisabledä¼ç½®ç°ç»ä»¶ï¼èreadonlyåä¸ä¼ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: uni.$u.props.input.readonly |
| | | }, |
| | | // è¾å
¥æ¡å½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.input.shape |
| | | }, |
| | | // ç¨äºå¤çæè
è¿æ»¤è¾å
¥æ¡å
å®¹çæ¹æ³ |
| | | formatter: { |
| | | type: [Function, null], |
| | | default: uni.$u.props.input.formatter |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-input" :class="inputClass" :style="[wrapperStyle]"> |
| | | <view class="u-input__content"> |
| | | <view |
| | | class="u-input__content__prefix-icon" |
| | | v-if="prefixIcon || $slots.prefix" |
| | | > |
| | | <slot name="prefix"> |
| | | <u-icon |
| | | :name="prefixIcon" |
| | | size="18" |
| | | :customStyle="prefixIconStyle" |
| | | ></u-icon> |
| | | </slot> |
| | | </view> |
| | | <view class="u-input__content__field-wrapper" @tap="clickHandler"> |
| | | <!-- æ ¹æ®uni-appçinputç»ä»¶ææ¡£ï¼H5åAPPä¸åªè¦å£°æäºpasswordåæ°(æ 论trueè¿æ¯false)ï¼typeå失æï¼æ¤æ¶ |
| | | 为äºé²æ¢type=numberæ¶ï¼ååå¨password屿§ï¼typeæ æï¼æ¤æ¶éè¦è®¾ç½®password为undefined |
| | | --> |
| | | <input |
| | | class="u-input__content__field-wrapper__field" |
| | | :style="[inputStyle]" |
| | | :type="type" |
| | | :focus="focus" |
| | | :cursor="cursor" |
| | | :value="innerValue" |
| | | :auto-blur="autoBlur" |
| | | :disabled="disabled || readonly" |
| | | :maxlength="maxlength" |
| | | :placeholder="placeholder" |
| | | :placeholder-style="placeholderStyle" |
| | | :placeholder-class="placeholderClass" |
| | | :confirm-type="confirmType" |
| | | :confirm-hold="confirmHold" |
| | | :hold-keyboard="holdKeyboard" |
| | | :cursor-spacing="cursorSpacing" |
| | | :adjust-position="adjustPosition" |
| | | :selection-end="selectionEnd" |
| | | :selection-start="selectionStart" |
| | | :password="password || type === 'password' || undefined" |
| | | @input="onInput" |
| | | @blur="onBlur" |
| | | @focus="onFocus" |
| | | @confirm="onConfirm" |
| | | @keyboardheightchange="onkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | <view |
| | | class="u-input__content__clear" |
| | | v-if="isShowClear" |
| | | @tap="onClear" |
| | | > |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | <view |
| | | class="u-input__content__subfix-icon" |
| | | v-if="suffixIcon || $slots.suffix" |
| | | > |
| | | <slot name="suffix"> |
| | | <u-icon |
| | | :name="suffixIcon" |
| | | size="18" |
| | | :customStyle="suffixIconStyle" |
| | | ></u-icon> |
| | | </slot> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from "./props.js"; |
| | | /** |
| | | * Input è¾å
¥æ¡ |
| | | * @description æ¤ç»ä»¶ä¸ºä¸ä¸ªè¾å
¥æ¡ï¼é»è®¤æ²¡æè¾¹æ¡åæ ·å¼ï¼æ¯ä¸é¨ä¸ºé
å表åç»ä»¶u-formè设计çï¼å©ç¨å®å¯ä»¥å¿«éå®ç°è¡¨åéªè¯ï¼è¾å
¥å
容ï¼ä¸æéæ©çåè½ã |
| | | * @tutorial https://uviewui.com/components/input.html |
| | | * @property {String | Number} value è¾å
¥çå¼ |
| | | * @property {String} type è¾å
¥æ¡ç±»åï¼è§ä¸æ¹è¯´æ ï¼ é»è®¤ 'text' ï¼ |
| | | * @property {Boolean} fixed 妿 textarea æ¯å¨ä¸ä¸ª position:fixed çåºåï¼éè¦æ¾ç¤ºæå®å±æ§ fixed 为 trueï¼å
¼å®¹æ§ï¼å¾®ä¿¡å°ç¨åºãç¾åº¦å°ç¨åºãåèè·³å¨å°ç¨åºãQQå°ç¨åº ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨è¾å
¥æ¡ ï¼ é»è®¤ false ï¼ |
| | | * @property {String} disabledColor ç¦ç¨ç¶ææ¶çèæ¯è²ï¼ é»è®¤ '#f5f7fa' ï¼ |
| | | * @property {Boolean} clearable æ¯å¦æ¾ç¤ºæ¸
餿§ä»¶ ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} password æ¯å¦å¯ç ç±»å ï¼ é»è®¤ false ï¼ |
| | | * @property {String | Number} maxlength æå¤§è¾å
¥é¿åº¦ï¼è®¾ç½®ä¸º -1 çæ¶åä¸é嶿大é¿åº¦ ï¼ é»è®¤ -1 ï¼ |
| | | * @property {String} placeholder è¾å
¥æ¡ä¸ºç©ºæ¶çå ä½ç¬¦ |
| | | * @property {String} placeholderClass æå®placeholderçæ ·å¼ç±»ï¼æ³¨æé¡µé¢æç»ä»¶çstyleä¸åäºscopedæ¶ï¼éè¦å¨ç±»ååå/deep/ ï¼ é»è®¤ 'input-placeholder' ï¼ |
| | | * @property {String | Object} placeholderStyle æå®placeholderçæ ·å¼ï¼å符串/对象形å¼ï¼å¦"color: red;" |
| | | * @property {Boolean} showWordLimit æ¯å¦æ¾ç¤ºè¾å
¥åæ°ç»è®¡ï¼åªå¨ type ="text"ætype ="textarea"æ¶ææ ï¼ é»è®¤ false ï¼ |
| | | * @property {String} confirmType 设置å³ä¸è§æé®çæåï¼å
¼å®¹æ§è¯¦è§uni-appææ¡£ ï¼ é»è®¤ 'done' ï¼ |
| | | * @property {Boolean} confirmHold ç¹å»é®çå³ä¸è§æé®æ¶æ¯å¦ä¿æé®ç䏿¶èµ·ï¼H5æ æ ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} holdKeyboard focusæ¶ï¼ç¹å»é¡µé¢çæ¶å䏿¶èµ·é®çï¼å¾®ä¿¡å°ç¨åºææ ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} focus èªå¨è·åç¦ç¹ï¼å¨ H5 å¹³å°è½å¦èç¦ä»¥å软é®çæ¯å¦è·éå¼¹åºï¼åå³äºå½åæµè§å¨æ¬èº«çå®ç°ãnvue 页é¢ä¸æ¯æï¼é使ç¨ç»ä»¶ç focus()ãblur() æ¹æ³æ§å¶ç¦ç¹ ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} autoBlur é®çæ¶èµ·æ¶ï¼æ¯å¦èªå¨å¤±å»ç¦ç¹ï¼ç®åä»
App3.0.0+ææ ï¼ é»è®¤ false ï¼ |
| | | * @property {Boolean} disableDefaultPadding æ¯å¦å»æ iOS ä¸çé»è®¤å
è¾¹è·ï¼ä»
微信å°ç¨åºï¼ä¸type=textareaæ¶ææ ï¼ é»è®¤ false ï¼ |
| | | * @property {String ï½ Number} cursor æå®focusæ¶å
æ çä½ç½®ï¼ é»è®¤ -1 ï¼ |
| | | * @property {String ï½ Number} cursorSpacing è¾å
¥æ¡èç¦æ¶åºé¨ä¸é®ççè·ç¦» ï¼ é»è®¤ 30 ï¼ |
| | | * @property {String ï½ Number} selectionStart å
æ èµ·å§ä½ç½®ï¼èªå¨èéæ¶ææï¼éä¸selection-endæé
ä½¿ç¨ ï¼ é»è®¤ -1 ï¼ |
| | | * @property {String ï½ Number} selectionEnd å
æ ç»æä½ç½®ï¼èªå¨èéæ¶ææï¼éä¸selection-startæé
ä½¿ç¨ ï¼ é»è®¤ -1 ï¼ |
| | | * @property {Boolean} adjustPosition é®ç弹起æ¶ï¼æ¯å¦èªå¨ä¸æ¨é¡µé¢ ï¼ é»è®¤ true ï¼ |
| | | * @property {String} inputAlign è¾å
¥æ¡å
容坹齿¹å¼ï¼ é»è®¤ 'left' ï¼ |
| | | * @property {String | Number} fontSize è¾å
¥æ¡åä½çå¤§å° ï¼ é»è®¤ '15px' ï¼ |
| | | * @property {String} color è¾å
¥æ¡åä½é¢è² ï¼ é»è®¤ '#303133' ï¼ |
| | | * @property {Function} formatter å
容å¼å彿° |
| | | * @property {String} prefixIcon è¾å
¥æ¡åç½®å¾æ |
| | | * @property {String | Object} prefixIconStyle åç½®å¾æ æ ·å¼ï¼å¯¹è±¡æå符串 |
| | | * @property {String} suffixIcon è¾å
¥æ¡åç½®å¾æ |
| | | * @property {String | Object} suffixIconStyle åç½®å¾æ æ ·å¼ï¼å¯¹è±¡æå符串 |
| | | * @property {String} border è¾¹æ¡ç±»åï¼surround-åå¨è¾¹æ¡ï¼bottom-åºé¨è¾¹æ¡ï¼none-æ è¾¹æ¡ ï¼ é»è®¤ 'surround' ï¼ |
| | | * @property {Boolean} readonly æ¯å¦åªè¯»ï¼ä¸disabledä¸åä¹å¤å¨äºdisabledä¼ç½®ç°ç»ä»¶ï¼èreadonlyåä¸ä¼ ï¼ é»è®¤ false ï¼ |
| | | * @property {String} shape è¾å
¥æ¡å½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ ï¼ é»è®¤ 'square' ï¼ |
| | | * @property {Object} customStyle å®ä¹éè¦ç¨å°çå¤é¨æ ·å¼ |
| | | * |
| | | * @example <u-input v-model="value" :password="true" suffix-icon="lock-fill" /> |
| | | */ |
| | | export default { |
| | | name: "u-input", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin, props], |
| | | data() { |
| | | return { |
| | | // è¾å
¥æ¡çå¼ |
| | | innerValue: "", |
| | | // æ¯å¦å¤äºè·å¾ç¦ç¹ç¶æ |
| | | focused: false, |
| | | // valueæ¯å¦ç¬¬ä¸æ¬¡ååï¼å¨watchä¸ï¼ç±äºå å
¥immediate屿§ï¼ä¼å¨ç¬¬ä¸æ¬¡è§¦åï¼æ¤æ¶ä¸åºè¯¥è®¤ä¸ºvalueåçäºåå |
| | | firstChange: true, |
| | | // valueç»å®å¼çå忝ç±å
é¨è¿æ¯å¤é¨å¼èµ·ç |
| | | changeFromInner: false, |
| | | // è¿æ»¤å¤çæ¹æ³ |
| | | innerFormatter: value => value |
| | | }; |
| | | }, |
| | | watch: { |
| | | value: { |
| | | immediate: true, |
| | | handler(newVal, oldVal) { |
| | | this.innerValue = newVal; |
| | | /* #ifdef H5 */ |
| | | // å¨H5ä¸ï¼å¤é¨valueåååï¼ä¿®æ¹inputä¸çå¼ï¼ä¸ä¼è§¦å@inputäºä»¶ï¼æ¤æ¶æå¨è°ç¨å¼ååæ¹æ³ |
| | | if ( |
| | | this.firstChange === false && |
| | | this.changeFromInner === false |
| | | ) { |
| | | this.valueChange(); |
| | | } |
| | | /* #endif */ |
| | | this.firstChange = false; |
| | | // éç½®changeFromInnerçå¼ä¸ºfalseï¼æ è¯ä¸ä¸æ¬¡å¼èµ·é»è®¤ä¸ºå¤é¨å¼èµ·ç |
| | | this.changeFromInner = false; |
| | | }, |
| | | }, |
| | | }, |
| | | computed: { |
| | | // æ¯å¦æ¾ç¤ºæ¸
餿§ä»¶ |
| | | isShowClear() { |
| | | const { clearable, readonly, focused, innerValue } = this; |
| | | return !!clearable && !readonly && !!focused && innerValue !== ""; |
| | | }, |
| | | // ç»ä»¶çç±»å |
| | | inputClass() { |
| | | let classes = [], |
| | | { border, disabled, shape } = this; |
| | | border === "surround" && |
| | | (classes = classes.concat(["u-border", "u-input--radius"])); |
| | | classes.push(`u-input--${shape}`); |
| | | border === "bottom" && |
| | | (classes = classes.concat([ |
| | | "u-border-bottom", |
| | | "u-input--no-radius", |
| | | ])); |
| | | return classes.join(" "); |
| | | }, |
| | | // ç»ä»¶çæ ·å¼ |
| | | wrapperStyle() { |
| | | const style = {}; |
| | | // ç¦ç¨ç¶æä¸ï¼è¢«èæ¯è²å ä¸å¯¹åºçæ ·å¼ |
| | | if (this.disabled) { |
| | | style.backgroundColor = this.disabledColor; |
| | | } |
| | | // æ è¾¹æ¡æ¶ï¼å»é¤å
è¾¹è· |
| | | if (this.border === "none") { |
| | | style.padding = "0"; |
| | | } else { |
| | | // ç±äºuni-appçiOSå¼åè
è½åæéï¼å¯¼è´éè¦åå¼åæææ |
| | | style.paddingTop = "6px"; |
| | | style.paddingBottom = "6px"; |
| | | style.paddingLeft = "9px"; |
| | | style.paddingRight = "9px"; |
| | | } |
| | | return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); |
| | | }, |
| | | // è¾å
¥æ¡çæ ·å¼ |
| | | inputStyle() { |
| | | const style = { |
| | | color: this.color, |
| | | fontSize: uni.$u.addUnit(this.fontSize), |
| | | textAlign: this.inputAlign |
| | | }; |
| | | return style; |
| | | }, |
| | | }, |
| | | methods: { |
| | | // å¨å¾®ä¿¡å°ç¨åºä¸ï¼ä¸æ¯æå°å½æ°å½åpropsåæ°ï¼æ
åªè½éè¿refå½¢å¼è°ç¨ |
| | | setFormatter(e) { |
| | | this.innerFormatter = e |
| | | }, |
| | | // å½é®çè¾å
¥æ¶ï¼è§¦åinputäºä»¶ |
| | | onInput(e) { |
| | | let { value = "" } = e.detail || {}; |
| | | // æ ¼å¼åè¿æ»¤æ¹æ³ |
| | | const formatter = this.formatter || this.innerFormatter |
| | | const formatValue = formatter(value) |
| | | // 为äºé¿å
propsçååæ°æ®æµç¹æ§ï¼éè¦å
å°innerValueå¼è®¾ç½®ä¸ºå½åå¼ï¼åå¨$nextTickä¸éæ°èµäºè®¾ç½®åçå¼æææ |
| | | this.innerValue = value |
| | | this.$nextTick(() => { |
| | | this.innerValue = formatValue; |
| | | this.valueChange(); |
| | | }) |
| | | }, |
| | | // è¾å
¥æ¡å¤±å»ç¦ç¹æ¶è§¦å |
| | | onBlur(event) { |
| | | this.$emit("blur", event.detail.value); |
| | | // H5端çblurä¼å
äºç¹å»æ¸
餿§ä»¶çç¹å»clickäºä»¶è§¦åï¼å¯¼è´focused |
| | | // ç¬é´ä¸ºfalseï¼ä»èéèäºæ¸
餿§ä»¶èæ æ³è¢«ç¹å»å° |
| | | uni.$u.sleep(50).then(() => { |
| | | this.focused = false; |
| | | }); |
| | | // å°è¯è°ç¨u-formçéªè¯æ¹æ³ |
| | | uni.$u.formValidate(this, "blur"); |
| | | }, |
| | | // è¾å
¥æ¡èç¦æ¶è§¦å |
| | | onFocus(event) { |
| | | this.focused = true; |
| | | this.$emit("focus"); |
| | | }, |
| | | // ç¹å»å®ææé®æ¶è§¦å |
| | | onConfirm(event) { |
| | | this.$emit("confirm", this.innerValue); |
| | | }, |
| | | // é®çé«åº¦åçååçæ¶åè§¦åæ¤äºä»¶ |
| | | // å
¼å®¹æ§ï¼å¾®ä¿¡å°ç¨åº2.7.0+ãApp 3.1.0+ |
| | | onkeyboardheightchange() { |
| | | this.$emit("keyboardheightchange"); |
| | | }, |
| | | // å
容åçååï¼è¿è¡å¤ç |
| | | valueChange() { |
| | | const value = this.innerValue; |
| | | this.$nextTick(() => { |
| | | this.$emit("input", value); |
| | | // æ è¯valueå¼çå忝ç±å
é¨å¼èµ·ç |
| | | this.changeFromInner = true; |
| | | this.$emit("change", value); |
| | | // å°è¯è°ç¨u-formçéªè¯æ¹æ³ |
| | | uni.$u.formValidate(this, "change"); |
| | | }); |
| | | }, |
| | | // ç¹å»æ¸
餿§ä»¶ |
| | | onClear() { |
| | | this.innerValue = ""; |
| | | this.$nextTick(() => { |
| | | this.valueChange(); |
| | | this.$emit("clear"); |
| | | }); |
| | | }, |
| | | /** |
| | | * å¨å®ånvueä¸ï¼äºä»¶æ æ³å泡 |
| | | * å¨æäºæ¶é´ï¼æä»¬å¸æçå¬u-from-itemçç¹å»äºä»¶ï¼æ¤æ¶ä¼å¯¼è´ç¹å»u-form-itemå
çu-inputå |
| | | * æ æ³è§¦åu-form-itemçç¹å»äºä»¶ï¼è¿ééè¿æå¨è°ç¨u-form-itemçæ¹æ³è¿è¡è§¦å |
| | | */ |
| | | clickHandler() { |
| | | // #ifdef APP-NVUE |
| | | if (uni.$u.os() === "android") { |
| | | const formItem = uni.$u.$parent.call(this, "u-form-item"); |
| | | if (formItem) { |
| | | formItem.clickHandler(); |
| | | } |
| | | } |
| | | // #endif |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-input { |
| | | @include flex(row); |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex: 1; |
| | | |
| | | &--radius, |
| | | &--square { |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | &--no-radius { |
| | | border-radius: 0; |
| | | } |
| | | |
| | | &--circle { |
| | | border-radius: 100px; |
| | | } |
| | | |
| | | &__content { |
| | | flex: 1; |
| | | @include flex(row); |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | &__field-wrapper { |
| | | position: relative; |
| | | @include flex(row); |
| | | margin: 0; |
| | | flex: 1; |
| | | |
| | | &__field { |
| | | line-height: 26px; |
| | | text-align: left; |
| | | color: $u-main-color; |
| | | height: 24px; |
| | | font-size: 15px; |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | &__clear { |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 100px; |
| | | background-color: #c6c7cb; |
| | | @include flex(row); |
| | | align-items: center; |
| | | justify-content: center; |
| | | transform: scale(0.82); |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | &__subfix-icon { |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | &__prefix-icon { |
| | | margin-right: 4px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // é®ççç±»åï¼number-æ°åé®çï¼card-身份è¯é®çï¼car-车çå·é®ç |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.keyboard.mode |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºé®çç"."ç¬¦å· |
| | | dotDisabled: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.dotDisabled |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºé¡¶é¨å·¥å
·æ¡ |
| | | tooltip: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.tooltip |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå·¥å
·æ¡ä¸é´çæç¤º |
| | | showTips: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.showTips |
| | | }, |
| | | // å·¥å
·æ¡ä¸é´çæç¤ºæå |
| | | tips: { |
| | | type: String, |
| | | default: uni.$u.props.keyboard.tips |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå·¥å
·æ¡å·¦è¾¹ç"åæ¶"æé® |
| | | showCancel: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.showCancel |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå·¥å
·æ¡å³è¾¹ç"宿"æé® |
| | | showConfirm: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.showConfirm |
| | | }, |
| | | // æ¯å¦æä¹±é®çæé®çé¡ºåº |
| | | random: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.random |
| | | }, |
| | | // æ¯å¦å¼å¯åºé¨å®å
¨åºéé
ï¼å¼å¯çè¯ï¼ä¼å¨iPhoneXæºååºé¨æ·»å ä¸å®çå
è¾¹è· |
| | | safeAreaInsetBottom: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.safeAreaInsetBottom |
| | | }, |
| | | // æ¯å¦å
许éè¿ç¹å»é®ç½©å
³éé®ç |
| | | closeOnClickOverlay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.closeOnClickOverlay |
| | | }, |
| | | // æ§å¶é®ççå¼¹åºä¸æ¶èµ· |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.show |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºé®ç½©ï¼æäºæ¶åæ°åé®çæ¶ï¼ç¨æ·å¸æçå°èªå·±çæ°å¼ï¼æä»¥å¯è½ä¸æ³è¦é®ç½© |
| | | overlay: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.overlay |
| | | }, |
| | | // z-indexå¼ |
| | | zIndex: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.keyboard.zIndex |
| | | }, |
| | | // åæ¶æé®çæå |
| | | cancelText: { |
| | | type: String, |
| | | default: uni.$u.props.keyboard.cancelText |
| | | }, |
| | | // 确认æé®çæå |
| | | confirmText: { |
| | | type: String, |
| | | default: uni.$u.props.keyboard.confirmText |
| | | }, |
| | | // è¾å
¥ä¸ä¸ªä¸æåï¼æ¯å¦èªå¨åæ¢å°è±æ |
| | | autoChange: { |
| | | type: Boolean, |
| | | default: uni.$u.props.keyboard.autoChange |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-popup |
| | | :overlay="overlay" |
| | | :closeOnClickOverlay="closeOnClickOverlay" |
| | | mode="bottom" |
| | | :popup="false" |
| | | :show="show" |
| | | :safeAreaInsetBottom="safeAreaInsetBottom" |
| | | @close="popupClose" |
| | | :zIndex="zIndex" |
| | | :customStyle="{ |
| | | backgroundColor: 'rgb(214, 218, 220)' |
| | | }" |
| | | > |
| | | <view class="u-keyboard"> |
| | | <slot /> |
| | | <view |
| | | class="u-keyboard__tooltip" |
| | | v-if="tooltip" |
| | | > |
| | | <view |
| | | hover-class="u-hover-class" |
| | | :hover-stay-time="100" |
| | | > |
| | | <text |
| | | class="u-keyboard__tooltip__item u-keyboard__tooltip__cancel" |
| | | v-if="showCancel" |
| | | @tap="onCancel" |
| | | >{{showCancel && cancelText}}</text> |
| | | </view> |
| | | <view> |
| | | <text |
| | | v-if="showTips" |
| | | class="u-keyboard__tooltip__item u-keyboard__tooltip__tips" |
| | | >{{tips ? tips : mode == 'number' ? 'æ°åé®ç' : mode == 'card' ? '身份è¯é®ç' : '车çå·é®ç'}}</text> |
| | | </view> |
| | | <view |
| | | hover-class="u-hover-class" |
| | | :hover-stay-time="100" |
| | | > |
| | | <text |
| | | v-if="showConfirm" |
| | | @tap="onConfirm" |
| | | class="u-keyboard__tooltip__item u-keyboard__tooltip__submit" |
| | | hover-class="u-hover-class" |
| | | >{{showConfirm && confirmText}}</text> |
| | | </view> |
| | | </view> |
| | | <template v-if="mode == 'number' || mode == 'card'"> |
| | | <u-number-keyboard |
| | | :random="random" |
| | | @backspace="backspace" |
| | | @change="change" |
| | | :mode="mode" |
| | | :dotDisabled="dotDisabled" |
| | | ></u-number-keyboard> |
| | | </template> |
| | | <template v-else> |
| | | <u-car-keyboard |
| | | :random="random" |
| | | :autoChange="autoChange" |
| | | @backspace="backspace" |
| | | @change="change" |
| | | ></u-car-keyboard> |
| | | </template> |
| | | </view> |
| | | </u-popup> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | |
| | | /** |
| | | * keyboard é®ç |
| | | * @description æ¤ä¸ºuViwèªå®ä¹çé®ç颿¿ï¼å
å«äºæ°åé®çï¼è½¦çå·é®ï¼èº«ä»½è¯å·é®ç3䏿¨¡å¼ï¼é½æå¯ä»¥æä¹±æé®é¡ºåºçé项ã |
| | | * @tutorial https://www.uviewui.com/components/keyboard.html |
| | | * @property {String} mode é®çç±»åï¼è§å®ç½åºæ¬ä½¿ç¨ç说æ ï¼é»è®¤ 'number' ï¼ |
| | | * @property {Boolean} dotDisabled æ¯å¦æ¾ç¤º"."æé®ï¼åªå¨mode=numberæ¶ææ ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} tooltip æ¯å¦æ¾ç¤ºé®çé¡¶é¨å·¥å
·æ¡ ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} showTips æ¯å¦æ¾ç¤ºå·¥å
·æ¡ä¸é´çæç¤º ï¼é»è®¤ true ï¼ |
| | | * @property {String} tips å·¥å
·æ¡ä¸é´çæç¤ºæåï¼è§ä¸æ¹åºæ¬ä½¿ç¨ç说æï¼å¦ä¸éè¦ï¼è¯·ä¼ ""空å符 |
| | | * @property {Boolean} showCancel æ¯å¦æ¾ç¤ºå·¥å
·æ¡å·¦è¾¹ç"åæ¶"æé® ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} showConfirm æ¯å¦æ¾ç¤ºå·¥å
·æ¡å³è¾¹ç"宿"æé®ï¼ é»è®¤ true ï¼ |
| | | * @property {Boolean} random æ¯å¦æä¹±é®çæé®çé¡ºåº ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} safeAreaInsetBottom æ¯å¦å¼å¯åºé¨å®å
¨åºéé
ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} closeOnClickOverlay æ¯å¦å
许ç¹å»é®ç½©æ¶èµ·é®ç ï¼é»è®¤ true ï¼ |
| | | * @property {Boolean} show æ§å¶é®ççå¼¹åºä¸æ¶èµ·ï¼é»è®¤ false ï¼ |
| | | * @property {Boolean} overlay æ¯å¦æ¾ç¤ºé®ç½© ï¼é»è®¤ true ï¼ |
| | | * @property {String | Number} zIndex å¼¹åºé®ççz-indexå¼ ï¼é»è®¤ 1075 ï¼ |
| | | * @property {String} cancelText åæ¶æé®çæå ï¼é»è®¤ 'åæ¶' ï¼ |
| | | * @property {String} confirmText 确认æé®çæå ï¼é»è®¤ '确认' ï¼ |
| | | * @property {Object} customStyle èªå®ä¹æ ·å¼ï¼å¯¹è±¡å½¢å¼ |
| | | * @event {Function} change æé®è¢«ç¹å»(ä¸å
å«éæ ¼é®è¢«ç¹å») |
| | | * @event {Function} cancel é®çé¡¶é¨å·¥å
·æ¡å·¦è¾¹ç"åæ¶"æé®è¢«ç¹å» |
| | | * @event {Function} confirm é®çé¡¶é¨å·¥å
·æ¡å³è¾¹ç"宿"æé®è¢«ç¹å» |
| | | * @event {Function} backspace é®çéæ ¼é®è¢«ç¹å» |
| | | * @example <u-keyboard mode="number" v-model="show"></u-keyboard> |
| | | */ |
| | | export default { |
| | | name: "u-keyboard", |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | methods: { |
| | | change(e) { |
| | | this.$emit('change', e); |
| | | }, |
| | | // é®çå
³é |
| | | popupClose() { |
| | | this.$emit('close'); |
| | | }, |
| | | // è¾å
¥å®æ |
| | | onConfirm() { |
| | | this.$emit('confirm'); |
| | | }, |
| | | // åæ¶è¾å
¥ |
| | | onCancel() { |
| | | this.$emit('cancel'); |
| | | }, |
| | | // éæ ¼é® |
| | | backspace() { |
| | | this.$emit('backspace'); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-keyboard { |
| | | |
| | | &__tooltip { |
| | | @include flex; |
| | | justify-content: space-between; |
| | | background-color: #FFFFFF; |
| | | padding: 14px 12px; |
| | | |
| | | &__item { |
| | | color: #333333; |
| | | flex: 1; |
| | | text-align: center; |
| | | font-size: 15px; |
| | | } |
| | | |
| | | &__submit { |
| | | text-align: right; |
| | | color: $u-primary; |
| | | } |
| | | |
| | | &__cancel { |
| | | text-align: left; |
| | | color: #888888; |
| | | } |
| | | |
| | | &__tips { |
| | | color: $u-tips-color; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¿æ´»é¨åçé¢è² |
| | | activeColor: { |
| | | type: String, |
| | | default: uni.$u.props.lineProgress.activeColor |
| | | }, |
| | | inactiveColor: { |
| | | type: String, |
| | | default: uni.$u.props.lineProgress.color |
| | | }, |
| | | // è¿åº¦ç¾åæ¯ï¼æ°å¼ |
| | | percentage: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.lineProgress.inactiveColor |
| | | }, |
| | | // æ¯å¦å¨è¿åº¦æ¡å
鍿¾ç¤ºç¾åæ¯çå¼ |
| | | showText: { |
| | | type: Boolean, |
| | | default: uni.$u.props.lineProgress.showText |
| | | }, |
| | | // è¿åº¦æ¡çé«åº¦ï¼åä½px |
| | | height: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.lineProgress.height |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view |
| | | class="u-line-progress" |
| | | :style="[$u.addStyle(customStyle)]" |
| | | > |
| | | <view |
| | | class="u-line-progress__background" |
| | | ref="u-line-progress__background" |
| | | :style="[{ |
| | | backgroundColor: inactiveColor, |
| | | height: $u.addUnit(height), |
| | | }]" |
| | | > |
| | | </view> |
| | | <view |
| | | class="u-line-progress__line" |
| | | :style="[progressStyle]" |
| | | > |
| | | <slot> |
| | | <text v-if="showText && percentage >= 10" class="u-line-progress__text">{{innserPercentage + '%'}}</text> |
| | | </slot> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import props from './props.js'; |
| | | // #ifdef APP-NVUE |
| | | const dom = uni.requireNativePlugin('dom') |
| | | // #endif |
| | | /** |
| | | * lineProgress 线åè¿åº¦æ¡ |
| | | * @description å±ç¤ºæä½æä»»å¡çå½åè¿åº¦ï¼æ¯å¦ä¸ä¼ æä»¶ï¼æ¯ä¸ä¸ªçº¿å½¢çè¿åº¦æ¡ã |
| | | * @tutorial https://www.uviewui.com/components/lineProgress.html |
| | | * @property {String} activeColor æ¿æ´»é¨åçé¢è² ( é»è®¤ '#19be6b' ) |
| | | * @property {String} inactiveColor èæ¯è² ( é»è®¤ '#ececec' ) |
| | | * @property {String | Number} percentage è¿åº¦ç¾åæ¯ï¼æ°å¼ ( é»è®¤ 0 ) |
| | | * @property {Boolean} showText æ¯å¦å¨è¿åº¦æ¡å
鍿¾ç¤ºç¾åæ¯çå¼ ( é»è®¤ true ) |
| | | * @property {String | Number} height è¿åº¦æ¡çé«åº¦ï¼åä½px ( é»è®¤ 12 ) |
| | | * |
| | | * @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress> |
| | | */ |
| | | export default { |
| | | name: "u-line-progress", |
| | | mixins: [uni.$u.mpMixin, uni.$u.mixin,props], |
| | | data() { |
| | | return { |
| | | lineWidth: 0, |
| | | } |
| | | }, |
| | | watch: { |
| | | percentage(n) { |
| | | this.resizeProgressWidth() |
| | | } |
| | | }, |
| | | computed: { |
| | | progressStyle() { |
| | | let style = {} |
| | | style.width = this.lineWidth |
| | | style.backgroundColor = this.activeColor |
| | | style.height = uni.$u.addUnit(this.height) |
| | | return style |
| | | }, |
| | | innserPercentage() { |
| | | // æ§å¶èå´å¨0-100ä¹é´ |
| | | return uni.$u.range(0, 100, this.percentage) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.$u.sleep(20).then(() => { |
| | | this.resizeProgressWidth() |
| | | }) |
| | | }, |
| | | getProgressWidth() { |
| | | // #ifndef APP-NVUE |
| | | return this.$uGetRect('.u-line-progress__background') |
| | | // #endif |
| | | |
| | | // #ifdef APP-NVUE |
| | | // è¿åä¸ä¸ªpromise |
| | | return new Promise(resolve => { |
| | | dom.getComponentRect(this.$refs['u-line-progress__background'], (res) => { |
| | | resolve(res.size) |
| | | }) |
| | | }) |
| | | // #endif |
| | | }, |
| | | resizeProgressWidth() { |
| | | this.getProgressWidth().then(size => { |
| | | const { |
| | | width |
| | | } = size |
| | | // éè¿è®¾ç½®çpercentageå¼ï¼è®¡ç®å
¶æå æ»é¿åº¦çç¾åæ¯ |
| | | this.lineWidth = width * this.innserPercentage / 100 + 'px' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-line-progress { |
| | | align-items: stretch; |
| | | position: relative; |
| | | @include flex(row); |
| | | flex: 1; |
| | | overflow: hidden; |
| | | border-radius: 100px; |
| | | |
| | | &__background { |
| | | background-color: #ececec; |
| | | border-radius: 100px; |
| | | flex: 1; |
| | | } |
| | | |
| | | &__line { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | align-items: center; |
| | | @include flex(row); |
| | | color: #ffffff; |
| | | border-radius: 100px; |
| | | transition: width 0.5s ease; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | &__text { |
| | | font-size: 10px; |
| | | align-items: center; |
| | | text-align: right; |
| | | color: #FFFFFF; |
| | | margin-right: 5px; |
| | | transform: scale(0.9); |
| | | } |
| | | } |
| | | </style> |
uni_modules/uview-ui/components/u-line/props.js
uni_modules/uview-ui/components/u-line/u-line.vue
uni_modules/uview-ui/components/u-link/props.js
uni_modules/uview-ui/components/u-link/u-link.vue
uni_modules/uview-ui/components/u-list-item/props.js
uni_modules/uview-ui/components/u-list-item/u-list-item.vue
uni_modules/uview-ui/components/u-list/props.js
uni_modules/uview-ui/components/u-list/u-list.vue
uni_modules/uview-ui/components/u-loading-icon/props.js
uni_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue
uni_modules/uview-ui/components/u-loading-page/props.js
uni_modules/uview-ui/components/u-loading-page/u-loading-page.vue
uni_modules/uview-ui/components/u-loadmore/props.js
uni_modules/uview-ui/components/u-loadmore/u-loadmore.vue
uni_modules/uview-ui/components/u-modal/props.js
uni_modules/uview-ui/components/u-modal/u-modal.vue
uni_modules/uview-ui/components/u-navbar/props.js
uni_modules/uview-ui/components/u-navbar/u-navbar.vue
uni_modules/uview-ui/components/u-no-network/props.js
uni_modules/uview-ui/components/u-no-network/u-no-network.vue
uni_modules/uview-ui/components/u-notice-bar/props.js
uni_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue
uni_modules/uview-ui/components/u-notify/props.js
uni_modules/uview-ui/components/u-notify/u-notify.vue
uni_modules/uview-ui/components/u-number-box/props.js
uni_modules/uview-ui/components/u-number-box/u-number-box.vue
uni_modules/uview-ui/components/u-number-keyboard/props.js
uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue
uni_modules/uview-ui/components/u-overlay/props.js
uni_modules/uview-ui/components/u-overlay/u-overlay.vue
uni_modules/uview-ui/components/u-parse/node/node.vue
uni_modules/uview-ui/components/u-parse/parser.js
uni_modules/uview-ui/components/u-parse/props.js
uni_modules/uview-ui/components/u-parse/u-parse.vue
uni_modules/uview-ui/components/u-picker-column/props.js
uni_modules/uview-ui/components/u-picker-column/u-picker-column.vue
uni_modules/uview-ui/components/u-picker/props.js
uni_modules/uview-ui/components/u-picker/u-picker.vue
uni_modules/uview-ui/components/u-popup/props.js
uni_modules/uview-ui/components/u-popup/u-popup.vue
uni_modules/uview-ui/components/u-radio-group/props.js
uni_modules/uview-ui/components/u-radio-group/u-radio-group.vue
uni_modules/uview-ui/components/u-radio/props.js
uni_modules/uview-ui/components/u-radio/u-radio.vue
uni_modules/uview-ui/components/u-rate/props.js
uni_modules/uview-ui/components/u-rate/u-rate.vue
uni_modules/uview-ui/components/u-read-more/props.js
uni_modules/uview-ui/components/u-read-more/u-read-more.vue
uni_modules/uview-ui/components/u-row-notice/props.js
uni_modules/uview-ui/components/u-row-notice/u-row-notice.vue
uni_modules/uview-ui/components/u-row/props.js
uni_modules/uview-ui/components/u-row/u-row.vue
uni_modules/uview-ui/components/u-safe-bottom/props.js
uni_modules/uview-ui/components/u-safe-bottom/u-safe-bottom.vue
uni_modules/uview-ui/components/u-scroll-list/nvue.js
uni_modules/uview-ui/components/u-scroll-list/other.js
uni_modules/uview-ui/components/u-scroll-list/props.js
uni_modules/uview-ui/components/u-scroll-list/scrollWxs.wxs
uni_modules/uview-ui/components/u-scroll-list/u-scroll-list.vue
uni_modules/uview-ui/components/u-search/props.js
uni_modules/uview-ui/components/u-search/u-search.vue
uni_modules/uview-ui/components/u-skeleton/props.js
uni_modules/uview-ui/components/u-skeleton/u-skeleton.vue
uni_modules/uview-ui/components/u-slider/mpother.js
uni_modules/uview-ui/components/u-slider/mpwxs.js
uni_modules/uview-ui/components/u-slider/mpwxs.wxs
uni_modules/uview-ui/components/u-slider/nvue - 副本.js
uni_modules/uview-ui/components/u-slider/nvue.js
uni_modules/uview-ui/components/u-slider/props.js
uni_modules/uview-ui/components/u-slider/u-slider.vue
uni_modules/uview-ui/components/u-status-bar/props.js
uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue
uni_modules/uview-ui/components/u-steps-item/props.js
uni_modules/uview-ui/components/u-steps-item/u-steps-item.vue
uni_modules/uview-ui/components/u-steps/props.js
uni_modules/uview-ui/components/u-steps/u-steps.vue
uni_modules/uview-ui/components/u-sticky/props.js
uni_modules/uview-ui/components/u-sticky/u-sticky.vue
uni_modules/uview-ui/components/u-subsection/props.js
uni_modules/uview-ui/components/u-subsection/u-subsection.vue
uni_modules/uview-ui/components/u-swipe-action-item/index - backup.wxs
uni_modules/uview-ui/components/u-swipe-action-item/index.wxs
uni_modules/uview-ui/components/u-swipe-action-item/nvue - backup.js
uni_modules/uview-ui/components/u-swipe-action-item/nvue.js
uni_modules/uview-ui/components/u-swipe-action-item/props.js
uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
uni_modules/uview-ui/components/u-swipe-action-item/wxs.js
uni_modules/uview-ui/components/u-swipe-action/props.js
uni_modules/uview-ui/components/u-swipe-action/u-swipe-action.vue
uni_modules/uview-ui/components/u-swiper-indicator/props.js
uni_modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator.vue
uni_modules/uview-ui/components/u-swiper/props.js
uni_modules/uview-ui/components/u-swiper/u-swiper.vue
uni_modules/uview-ui/components/u-switch/props.js
uni_modules/uview-ui/components/u-switch/u-switch.vue
uni_modules/uview-ui/components/u-tabbar-item/props.js
uni_modules/uview-ui/components/u-tabbar-item/u-tabbar-item.vue
uni_modules/uview-ui/components/u-tabbar/props.js
uni_modules/uview-ui/components/u-tabbar/u-tabbar.vue
uni_modules/uview-ui/components/u-table/props.js
uni_modules/uview-ui/components/u-table/u-table.vue
uni_modules/uview-ui/components/u-tabs-item/props.js
uni_modules/uview-ui/components/u-tabs-item/u-tabs-item.vue
uni_modules/uview-ui/components/u-tabs/props.js
uni_modules/uview-ui/components/u-tabs/u-tabs.vue
uni_modules/uview-ui/components/u-tag/props.js
uni_modules/uview-ui/components/u-tag/u-tag.vue
uni_modules/uview-ui/components/u-td/props.js
uni_modules/uview-ui/components/u-td/u-td.vue
uni_modules/uview-ui/components/u-text/props.js
uni_modules/uview-ui/components/u-text/u-text.vue
uni_modules/uview-ui/components/u-text/value.js
uni_modules/uview-ui/components/u-textarea/props.js
uni_modules/uview-ui/components/u-textarea/u-textarea.vue
uni_modules/uview-ui/components/u-toast/u-toast.vue
uni_modules/uview-ui/components/u-toolbar/props.js
uni_modules/uview-ui/components/u-toolbar/u-toolbar.vue
uni_modules/uview-ui/components/u-tooltip/clipboard.min.js
uni_modules/uview-ui/components/u-tooltip/props.js
uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue
uni_modules/uview-ui/components/u-tr/props.js
uni_modules/uview-ui/components/u-tr/u-tr.vue
uni_modules/uview-ui/components/u-transition/nvue.ani-map.js
uni_modules/uview-ui/components/u-transition/props.js
uni_modules/uview-ui/components/u-transition/transition.js
uni_modules/uview-ui/components/u-transition/u-transition.vue
uni_modules/uview-ui/components/u-transition/vue.ani-style.scss
uni_modules/uview-ui/components/u-upload/mixin.js
uni_modules/uview-ui/components/u-upload/props.js
uni_modules/uview-ui/components/u-upload/u-upload.vue
uni_modules/uview-ui/components/u-upload/utils.js
uni_modules/uview-ui/components/uview-ui/uview-ui.vue
uni_modules/uview-ui/index.js
uni_modules/uview-ui/index.scss
uni_modules/uview-ui/libs/config/color.js
uni_modules/uview-ui/libs/config/config.js
uni_modules/uview-ui/libs/config/props.js
uni_modules/uview-ui/libs/config/props/actionSheet.js
uni_modules/uview-ui/libs/config/props/album.js
uni_modules/uview-ui/libs/config/props/alert.js
uni_modules/uview-ui/libs/config/props/avatar.js
uni_modules/uview-ui/libs/config/props/avatarGroup.js
uni_modules/uview-ui/libs/config/props/backtop.js
uni_modules/uview-ui/libs/config/props/badge.js
uni_modules/uview-ui/libs/config/props/button.js
uni_modules/uview-ui/libs/config/props/calendar.js
uni_modules/uview-ui/libs/config/props/carKeyboard.js
uni_modules/uview-ui/libs/config/props/cell.js
uni_modules/uview-ui/libs/config/props/cellGroup.js
uni_modules/uview-ui/libs/config/props/checkbox.js
uni_modules/uview-ui/libs/config/props/checkboxGroup.js
uni_modules/uview-ui/libs/config/props/circleProgress.js
uni_modules/uview-ui/libs/config/props/code.js
uni_modules/uview-ui/libs/config/props/codeInput.js
uni_modules/uview-ui/libs/config/props/col.js
uni_modules/uview-ui/libs/config/props/collapse.js
uni_modules/uview-ui/libs/config/props/collapseItem.js
uni_modules/uview-ui/libs/config/props/columnNotice.js
uni_modules/uview-ui/libs/config/props/countDown.js
uni_modules/uview-ui/libs/config/props/countTo.js
uni_modules/uview-ui/libs/config/props/datetimePicker.js
uni_modules/uview-ui/libs/config/props/divider.js
uni_modules/uview-ui/libs/config/props/empty.js
uni_modules/uview-ui/libs/config/props/form.js
uni_modules/uview-ui/libs/config/props/formItem.js
uni_modules/uview-ui/libs/config/props/gap.js
uni_modules/uview-ui/libs/config/props/grid.js
uni_modules/uview-ui/libs/config/props/gridItem.js
uni_modules/uview-ui/libs/config/props/icon.js
uni_modules/uview-ui/libs/config/props/image.js
uni_modules/uview-ui/libs/config/props/indexAnchor.js
uni_modules/uview-ui/libs/config/props/indexList.js
uni_modules/uview-ui/libs/config/props/input.js
uni_modules/uview-ui/libs/config/props/keyboard.js
uni_modules/uview-ui/libs/config/props/line.js
uni_modules/uview-ui/libs/config/props/lineProgress.js
uni_modules/uview-ui/libs/config/props/link.js
uni_modules/uview-ui/libs/config/props/list.js
uni_modules/uview-ui/libs/config/props/listItem.js
uni_modules/uview-ui/libs/config/props/loadingIcon.js
uni_modules/uview-ui/libs/config/props/loadingPage.js
uni_modules/uview-ui/libs/config/props/loadmore.js
uni_modules/uview-ui/libs/config/props/modal.js
uni_modules/uview-ui/libs/config/props/navbar.js
uni_modules/uview-ui/libs/config/props/noNetwork.js
uni_modules/uview-ui/libs/config/props/noticeBar.js
uni_modules/uview-ui/libs/config/props/notify.js
uni_modules/uview-ui/libs/config/props/numberBox.js
uni_modules/uview-ui/libs/config/props/numberKeyboard.js
uni_modules/uview-ui/libs/config/props/overlay.js
uni_modules/uview-ui/libs/config/props/parse.js
uni_modules/uview-ui/libs/config/props/picker.js
uni_modules/uview-ui/libs/config/props/popup.js
uni_modules/uview-ui/libs/config/props/radio.js
uni_modules/uview-ui/libs/config/props/radioGroup.js
uni_modules/uview-ui/libs/config/props/rate.js
uni_modules/uview-ui/libs/config/props/readMore.js
uni_modules/uview-ui/libs/config/props/row.js
uni_modules/uview-ui/libs/config/props/rowNotice.js
uni_modules/uview-ui/libs/config/props/scrollList.js
uni_modules/uview-ui/libs/config/props/search.js
uni_modules/uview-ui/libs/config/props/section.js
uni_modules/uview-ui/libs/config/props/skeleton.js
uni_modules/uview-ui/libs/config/props/slider.js
uni_modules/uview-ui/libs/config/props/statusBar.js
uni_modules/uview-ui/libs/config/props/steps.js
uni_modules/uview-ui/libs/config/props/stepsItem.js
uni_modules/uview-ui/libs/config/props/sticky.js
uni_modules/uview-ui/libs/config/props/subsection.js
uni_modules/uview-ui/libs/config/props/swipeAction.js
uni_modules/uview-ui/libs/config/props/swipeActionItem.js
uni_modules/uview-ui/libs/config/props/swiper.js
uni_modules/uview-ui/libs/config/props/swipterIndicator.js
uni_modules/uview-ui/libs/config/props/switch.js
uni_modules/uview-ui/libs/config/props/tabbar.js
uni_modules/uview-ui/libs/config/props/tabbarItem.js
uni_modules/uview-ui/libs/config/props/tabs.js
uni_modules/uview-ui/libs/config/props/tag.js
uni_modules/uview-ui/libs/config/props/text.js
uni_modules/uview-ui/libs/config/props/textarea.js
uni_modules/uview-ui/libs/config/props/toast.js
uni_modules/uview-ui/libs/config/props/toolbar.js
uni_modules/uview-ui/libs/config/props/tooltip.js
uni_modules/uview-ui/libs/config/props/transition.js
uni_modules/uview-ui/libs/config/props/upload.js
uni_modules/uview-ui/libs/config/zIndex.js
uni_modules/uview-ui/libs/css/color.scss
uni_modules/uview-ui/libs/css/common.scss
uni_modules/uview-ui/libs/css/components.scss
uni_modules/uview-ui/libs/css/flex.scss
uni_modules/uview-ui/libs/css/h5.scss
uni_modules/uview-ui/libs/css/mixin.scss
uni_modules/uview-ui/libs/css/mp.scss
uni_modules/uview-ui/libs/css/nvue.scss
uni_modules/uview-ui/libs/css/vue.scss
uni_modules/uview-ui/libs/function/colorGradient.js
uni_modules/uview-ui/libs/function/debounce.js
uni_modules/uview-ui/libs/function/digit.js
uni_modules/uview-ui/libs/function/index.js
uni_modules/uview-ui/libs/function/platform.js
uni_modules/uview-ui/libs/function/test.js
uni_modules/uview-ui/libs/function/throttle.js
uni_modules/uview-ui/libs/luch-request/adapters/index.js
uni_modules/uview-ui/libs/luch-request/core/InterceptorManager.js
uni_modules/uview-ui/libs/luch-request/core/Request.js
uni_modules/uview-ui/libs/luch-request/core/buildFullPath.js
uni_modules/uview-ui/libs/luch-request/core/defaults.js
uni_modules/uview-ui/libs/luch-request/core/dispatchRequest.js
uni_modules/uview-ui/libs/luch-request/core/mergeConfig.js
uni_modules/uview-ui/libs/luch-request/core/settle.js
uni_modules/uview-ui/libs/luch-request/helpers/buildURL.js
uni_modules/uview-ui/libs/luch-request/helpers/combineURLs.js
uni_modules/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js
uni_modules/uview-ui/libs/luch-request/index.d.ts
uni_modules/uview-ui/libs/luch-request/index.js
uni_modules/uview-ui/libs/luch-request/utils.js
uni_modules/uview-ui/libs/luch-request/utils/clone.js
uni_modules/uview-ui/libs/mixin/button.js
uni_modules/uview-ui/libs/mixin/mixin.js
uni_modules/uview-ui/libs/mixin/mpMixin.js
uni_modules/uview-ui/libs/mixin/mpShare.js
uni_modules/uview-ui/libs/mixin/openType.js
uni_modules/uview-ui/libs/mixin/style.js
uni_modules/uview-ui/libs/mixin/touch.js
uni_modules/uview-ui/libs/util/async-validator.js
uni_modules/uview-ui/libs/util/calendar.js
uni_modules/uview-ui/libs/util/dayjs.js
uni_modules/uview-ui/libs/util/emitter.js
uni_modules/uview-ui/libs/util/route.js
uni_modules/uview-ui/package.json
uni_modules/uview-ui/theme.scss
utils/storage.js
utils/verify.js
vue.config.js |