!function(){function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var e,n={},i=Object.prototype,r=i.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(e){c=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var r=e&&e.prototype instanceof _?e:_,a=Object.create(r.prototype),s=new P(i||[]);return o(a,"_invoke",{value:C(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var p="suspendedStart",f="suspendedYield",g="executing",m="completed",v={};function _(){}function x(){}function b(){}var w={};c(w,s,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(R([])));A&&A!==i&&r.call(A,s)&&(w=A);var T=b.prototype=_.prototype=Object.create(w);function M(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,o,a,s){var l=d(t[i],t,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==y(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function C(t,n,i){var r=p;return function(o,a){if(r===g)throw Error("Generator is already running");if(r===m){if("throw"===o)throw a;return{value:e,done:!0}}for(i.method=o,i.arg=a;;){var s=i.delegate;if(s){var l=D(s,i);if(l){if(l===v)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===p)throw r=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=g;var u=d(t,n,i);if("normal"===u.type){if(r=i.done?m:f,u.arg===v)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=m,i.method="throw",i.arg=u.arg)}}}function D(t,n){var i=n.method,r=t.iterator[i];if(r===e)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v;var o=d(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;L(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:R(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),v}},n}function e(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function n(t){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=t.apply(n,i);function s(t){e(a,r,o,s,l,"next",t)}function l(t){e(a,r,o,s,l,"throw",t)}s(void 0)}))}}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e,n){return(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);nul{display:flex;padding:10px 15px}.mainbox>ul>li{width:25%;padding:0}.mainbox>ul,.mainbox>ul>li{height:100%}.tit{padding:10px 10px 0 30px;font-size:16px;font-weight:500;color:#bcdcff;position:relative;font-weight:bolder;display:flex}.tit:before{transform:rotate(45deg);border-radius:3px;position:absolute;content:"";width:6px;height:6px;border:2px solid #81bcff;left:12px;top:16px}.card{position:relative;height:300px;margin-bottom:10px;backdrop-filter:blur(3px);background:linear-gradient(135deg,rgba(0,169,247,.2),transparent,transparent,rgba(0,169,247,.1));box-shadow:0 0 20px rgba(0,0,0,.1)}.card:before{position:absolute;right:0;top:0;pointer-events:none;content:"";border-right:2px solid #0793ff;border-top:2px solid #0793ff;width:calc(100% - 200px);height:calc(100% - 20px)}.card:after{position:absolute;left:190px;top:0;pointer-events:none;content:"";background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAALCAYAAADC6Ps2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGsWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4wLWMwMDAgNzkuMTM1N2M5ZSwgMjAyMS8wNy8xNC0wMDozOTo1NiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIyLjUgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMi0xMS0wN1QyMzoxOToxMSswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjItMTItMTRUMTc6MDY6MjArMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjItMTItMTRUMTc6MDY6MjArMDg6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDUwZjA4NWMtNmVmNC04NTQyLTkzOTUtNzAyN2VjNzNhOTUzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjAzZTQzZTc0LTk5NzItZDM0NS1iNjM2LTQwMjdmNjE5MzA2MyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjAzZTQzZTc0LTk5NzItZDM0NS1iNjM2LTQwMjdmNjE5MzA2MyI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MDNlNDNlNzQtOTk3Mi1kMzQ1LWI2MzYtNDAyN2Y2MTkzMDYzIiBzdEV2dDp3aGVuPSIyMDIyLTExLTA3VDIzOjE5OjExKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuNSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjBkMmVkZTE5LTVhMWMtNjM0My1iNGFiLWM3NTljYjA4MjA5NiIgc3RFdnQ6d2hlbj0iMjAyMi0xMi0xMFQxOTowNTowNSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjUgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NTBmMDg1Yy02ZWY0LTg1NDItOTM5NS03MDI3ZWM3M2E5NTMiIHN0RXZ0OndoZW49IjIwMjItMTItMTRUMTc6MDY6MjArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMi41IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Tw9zRAAABX0lEQVRIib3UvUpcQQCG4WejsImo9yAEUigoFhZeQ1qjJKkS8Qe0UC9AvQGDrMEfMJWCKSy9BYsUgoWF6FVIUKy0mFk8rrvrYVbmhYGBmfPOd74znEq19qANC6i12/AKW1h8A09utiptihnFKaqJ8jOMY7BDT27OMP6uxWI//gov8xuVkmM+Pn+Dyfh8iif3aMx9392imD18jO2ttNjTyAh+xfkMrnGU4MnNiJe5Nbsxs0JrN5jCfQl5n1DCe+wKt2QuwZObYu4dITdeFjPsqb1ZXJU8YAefcI6l6NlI8OSmmHu5uFAspldo7IPw1Y9KyqfxFf+FG9KV6MlNY+674mLxH7Pt+VcvwxA243welzhI8OSmmHtOyP2MejE/8D3Oj/G55AHr6MEfoZCf+JbgyU099z4Om22oVGsPg/gXN6ZwgTEMdOjJTT33bbPFbkzgpIMD1qL8S4ee3KxqUQo8AnjuT82IgM+GAAAAAElFTkSuQmCC);width:70px;height:11px}.boxnav{padding:10px 15px;height:calc(100% - 33px);position:relative;z-index:10}.boxnav:before{position:absolute;left:0;bottom:0;pointer-events:none;content:"";border-left:2px solid #0793ff;border-bottom:2px solid #0793ff;width:calc(100% - 100px);height:calc(100% - 50px)}.boxnav:after{position:absolute;right:0;bottom:0;pointer-events:none;content:"";background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAALCAYAAAA3FnCGAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGsWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4wLWMwMDAgNzkuMTM1N2M5ZSwgMjAyMS8wNy8xNC0wMDozOTo1NiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIyLjUgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMi0xMS0wN1QyMzoxOToxMSswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjItMTItMTRUMTc6MDY6MjYrMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjItMTItMTRUMTc6MDY6MjYrMDg6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ZTljMmIwNzQtZmJlYi0wMDRjLTg0NTgtODU3MWJiNDEyODY4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjcwZThkM2JjLTI0NGEtYzQ0My1hYzNjLTkzMDI4ODlkNWIyNCIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjcwZThkM2JjLTI0NGEtYzQ0My1hYzNjLTkzMDI4ODlkNWIyNCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NzBlOGQzYmMtMjQ0YS1jNDQzLWFjM2MtOTMwMjg4OWQ1YjI0IiBzdEV2dDp3aGVuPSIyMDIyLTExLTA3VDIzOjE5OjExKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuNSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmNkNWE1YmZmLTVjMzQtODA0MC1iODAyLTE0ZDU2MmU4MmFiNiIgc3RFdnQ6d2hlbj0iMjAyMi0xMi0xMFQxOTowNTowMSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjUgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplOWMyYjA3NC1mYmViLTAwNGMtODQ1OC04NTcxYmI0MTI4NjgiIHN0RXZ0OndoZW49IjIwMjItMTItMTRUMTc6MDY6MjYrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMi41IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5MxxvnAAAAfklEQVRIie2VQQrAIAwE1yJ47iv7IE9+sn1Cek2F0IghKjgniYkblgVDylSg4xLq9by2bzlCykTaXqFez2v7liOys1ciJJ2ZKcA3WX+JsEqWdD8zBADH6C1WYpvVwDargW1WA/w3PJ00vXTM4WbdTppeOuZEAE/nG9r5Xp3hvMzFFkni80T8AAAAAElFTkSuQmCC);width:75px;height:11px}.boxnav:after,.boxnav:before,.card:after,.card:before{opacity:.15}.fadeIn{opacity:0;animation:fadeIn 1.5s forwards}.fadeInDown{opacity:0;transform:translate3d(0,-100%,0);animation:fadeInDown .6s forwards}.fadeInUp{animation:fadeInUp 1s forwards;opacity:0}.fadeInLeft{animation:fadeInLeft .6s forwards}.bounceIn{transform:scaleX(0);animation:bounceIn .6s forwards}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.delay02{animation-delay:.2s}.delay04{animation-delay:.4s}.delay06{animation-delay:.6s}.delay08{animation-delay:.8s}.delay1{animation-delay:1s}.delay12{animation-delay:1.2s}.delay14{animation-delay:1.4s}.delay16{animation-delay:1.6s}.delay18{animation-delay:1.8s}.delay2{animation-delay:2s}.str_wrap{overflow:hidden;width:100%;position:relative;-moz-user-select:none;-khtml-user-select:none;user-select:none;white-space:nowrap}.str_move{white-space:nowrap;position:absolute;top:0;left:0;cursor:move}.str_move_clone{display:inline-block;vertical-align:top;position:absolute;left:100%;top:0}.str_vertical .str_move_clone{left:0;top:100%}.str_down .str_move_clone{left:0;bottom:100%}.str_down .str_move,.str_vertical .str_move{white-space:normal;width:100%}.noStop .str_move,.no_drag .str_move,.str_static .str_move{cursor:inherit}.str_wrap img{max-width:none!important}.listhead{display:flex;justify-content:space-between;color:rgba(255,255,255,.5);border-bottom:1px solid rgba(255,255,255,.1)}.listnav{height:calc(100% - 30px);border-bottom:1px solid rgba(255,255,255,.1);overflow-y:hidden}.listnav ul li{height:100%;display:flex;justify-content:space-between;border:1px solid rgba(255,255,255,.1);border-top:none;border-bottom:none}.listhead span,.listnav li span{padding:8px 0;text-align:center;font-size:13px}.listhead span{padding-top:0}.listhead span:nth-child(1),.listnav li span:nth-child(1){width:8%;white-space:nowrap}.listhead span:nth-child(2),.listnav li span:nth-child(2){width:52%;text-align:left;padding-right:10px}.listhead span:nth-child(3),.listnav li span:nth-child(3){width:23%;text-align:left}.listhead span:nth-child(4),.listnav li span:nth-child(4){width:12%;white-space:nowrap}.listnav ul li:nth-child(odd){background:rgba(255,255,255,.05)}.txtnum{height:100%;display:flex;align-items:center;justify-content:center}.txtnum li{text-align:center;position:relative;padding:0 30px}.txtnum li>div{position:relative;z-index:10}.txtnum span{color:rgba(255,255,255,.75);display:block;padding-top:5px;white-space:nowrap}.txtnum p{font-size:24px;font-style:normal;font-weight:bolder;color:#fff;display:inline;white-space:nowrap;background:linear-gradient(0deg,#f2f9ff,#bfe0ff);background-size:cover;font-family:等线;font-size:30px;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-fill-color:transparent}.txtnum li:after{height:100%;width:100%;content:"";left:0;top:-2px;position:absolute;background:-webkit-radial-gradient(50% 50%,farthest-corner,#0076d1 0,transparent,transparent);opacity:.4}.txtnum li:before{height:120%;width:1px;content:"";right:0;top:-10%;position:absolute;background:linear-gradient(to bottom,transparent,#a8d6ff,transparent);opacity:.5}.txtnum li:last-child:before{display:none}.maptabs{position:absolute;left:-30px;top:120px;z-index:11;padding:10px 20px}.maptabs li a{display:block;transition:all .5s;color:rgba(255,255,255,.75);text-align:center;height:48px;background:url('+new URL("btn1-CRKIxnkF.png",i.meta.url).href+") right top no-repeat;width:140px;padding:6px 0 0 10px;font-size:15px;margin:10px 0}.maptabs li.active a{background:url("+new URL("btn2-B0GpvJoC.png",i.meta.url).href+") right top no-repeat;color:#fff;font-weight:700}.maptabs li a:hover{transform:translate(10px);color:rgba(0,191,255,.85)}.maptabs p{padding:15px 30px;color:#07e5ff}.head{display:flex;justify-content:center;align-items:center}.head h1{flex-shrink:0;background:url("+new URL("headcenter-Njohw23C.png",i.meta.url).href+') no-repeat center bottom;background-size:100% auto;height:85px;line-height:85px}.head h1 span{font-size:46px;background:linear-gradient(to bottom,#00fff7,#37cdff);padding:0 20px;background-size:cover;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-fill-color:transparent;font-weight:700;font-family:Microsoft YaHei;line-height:1;letter-spacing:2px}.head:after,.head:before{height:85px;content:"";width:100%}.head:before{background:url('+new URL("headleft-BoeOVS0y.png",i.meta.url).href+") no-repeat right bottom}.head:after{background:url("+new URL("headright-C5bcIe9i.png",i.meta.url).href+') no-repeat left bottom}.timebox{position:absolute;right:30px;font-size:16px;color:#50c2ff;padding-bottom:42px}.timebox span{color:#fff;padding-left:10px}.map{display:flex;justify-content:center;align-items:center}.mapbox{width:90%;position:relative}.mapbox img{width:100%}.others{position:relative;height:100%;display:flex;align-items:center}.others>span{position:absolute}.others .img1{top:5px;width:200px;right:50px}.others .img2{width:180px;left:130px;top:-10px}.others .img3{width:100px;left:30px;transform:rotate(45deg);top:0}.drqk{height:100%;display:flex;align-items:center;flex-wrap:wrap;justify-content:center}.drqk li{width:50%;display:flex;align-items:center}.icon{display:flex;position:relative;justify-content:center;align-items:center;flex-shrink:0;margin-right:15px;padding:15px;width:60px;height:60px}.icon:before{position:absolute;content:"";background:url('+new URL("iconbg-un2BVcht.png",i.meta.url).href+') no-repeat center center;background-size:auto 100%;width:100%;height:100%;left:0;top:0}.drqk li em{background:linear-gradient(0deg,#f2f9ff,#bfe0ff);font-style:normal;background-size:cover;font-family:等线;font-weight:bolder;font-size:24px;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-fill-color:transparent}.linebox{position:absolute;width:100%;transform:scale(1.3,.65);overflow:hidden;height:100%;left:0;top:15%;display:flex;justify-content:center;align-items:center}.linebox>span{position:absolute;opacity:.1;width:100%;height:100%}.linebox>span img{width:100%;height:100%;object-fit:contain}.linebox .line1{width:30%;animation:scales1 60s linear infinite}.linebox .line2{width:40%;animation:scales2 55s linear infinite}.linebox .line3{width:47%;animation:scales1 50s linear infinite}.linebox .line4{width:60%;animation:scales2 45s linear infinite}.linebox .line5{width:20%;animation:scales1 40s linear infinite}.linebox .line6{width:70%;animation:scales2 35s linear infinite}.linebox .line7{width:75%;animation:scales1 30s linear infinite}@keyframes scales1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes scales2{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.marker{animation:fadeInDown 1s forwards;cursor:pointer;position:absolute;transition:all .5s;align-items:center;display:flex;justify-content:center}.marker:before{width:8px;height:8px;border-radius:5px;background:#0ff;position:absolute;content:"";transform:scaleY(.75)}.marker:hover span{display:block}.marker>i{width:20px;height:20px;position:absolute;display:flex;align-items:center;justify-content:center;transform:scaleY(.75)}.marker>i:after,.marker>i:before{position:absolute;content:"";background:rgba(0,179,255,.7);border:1px solid rgb(161,203,255);border-radius:100px;transform:scale(0);opacity:0}.marker>i:after{width:150%;height:150%;animation:fadein 2s infinite linear}.marker>i:before{width:200%;height:200%;animation:fadein 2s 1s infinite linear}@keyframes fadein{0%{transform:scale(0);opacity:0}50%{transform:scale(.5);opacity:1}to{transform:scale(1);opacity:0}}.user-container[data-v-87df4956],.user-container[data-v-f4a29e9a]{height:100%}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645,.045,.355,1);--el-transition-function-fast-bezier:cubic-bezier(.23,1,.32,1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0,0,0,.04),0px 8px 20px rgba(0,0,0,.08);--el-box-shadow-light:0px 0px 12px rgba(0,0,0,.12);--el-box-shadow-lighter:0px 0px 6px rgba(0,0,0,.12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0,0,0,.08),0px 12px 32px rgba(0,0,0,.12),0px 8px 16px -8px rgba(0,0,0,.16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0,0,0,.8);--el-overlay-color-light:rgba(0,0,0,.7);--el-overlay-color-lighter:rgba(0,0,0,.5);--el-mask-color:rgba(255,255,255,.9);--el-mask-color-extra-light:rgba(255,255,255,.3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transform-origin:center top;transition:var(--el-transition-md-fade)}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transform-origin:center bottom;transition:var(--el-transition-md-fade)}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transform-origin:top left;transition:var(--el-transition-md-fade)}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.el-icon{--color:inherit;align-items:center;display:inline-flex;height:1em;justify-content:center;line-height:1em;position:relative;width:1em;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-small);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{animation:dialog-fade-out var(--el-transition-duration)}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}.el-overlay{background-color:var(--el-overlay-color-lighter);bottom:0;height:100%;left:0;overflow:auto;position:fixed;right:0;top:0;z-index:2000}.el-overlay .el-overlay-root{height:0}.el-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-top{align-items:flex-start}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{display:block;min-height:1px}.el-col-0{flex:0 0 0%;max-width:0}.el-col-0,.el-col-0.is-guttered{display:none}.el-col-offset-0{margin-left:0}.el-col-pull-0{position:relative;right:0}.el-col-push-0{left:0;position:relative}.el-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-1,.el-col-1.is-guttered{display:block}.el-col-offset-1{margin-left:4.1666666667%}.el-col-pull-1{position:relative;right:4.1666666667%}.el-col-push-1{left:4.1666666667%;position:relative}.el-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-2,.el-col-2.is-guttered{display:block}.el-col-offset-2{margin-left:8.3333333333%}.el-col-pull-2{position:relative;right:8.3333333333%}.el-col-push-2{left:8.3333333333%;position:relative}.el-col-3{flex:0 0 12.5%;max-width:12.5%}.el-col-3,.el-col-3.is-guttered{display:block}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{left:12.5%;position:relative}.el-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-4,.el-col-4.is-guttered{display:block}.el-col-offset-4{margin-left:16.6666666667%}.el-col-pull-4{position:relative;right:16.6666666667%}.el-col-push-4{left:16.6666666667%;position:relative}.el-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-5,.el-col-5.is-guttered{display:block}.el-col-offset-5{margin-left:20.8333333333%}.el-col-pull-5{position:relative;right:20.8333333333%}.el-col-push-5{left:20.8333333333%;position:relative}.el-col-6{flex:0 0 25%;max-width:25%}.el-col-6,.el-col-6.is-guttered{display:block}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{left:25%;position:relative}.el-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-7,.el-col-7.is-guttered{display:block}.el-col-offset-7{margin-left:29.1666666667%}.el-col-pull-7{position:relative;right:29.1666666667%}.el-col-push-7{left:29.1666666667%;position:relative}.el-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-8,.el-col-8.is-guttered{display:block}.el-col-offset-8{margin-left:33.3333333333%}.el-col-pull-8{position:relative;right:33.3333333333%}.el-col-push-8{left:33.3333333333%;position:relative}.el-col-9{flex:0 0 37.5%;max-width:37.5%}.el-col-9,.el-col-9.is-guttered{display:block}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{left:37.5%;position:relative}.el-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-10,.el-col-10.is-guttered{display:block}.el-col-offset-10{margin-left:41.6666666667%}.el-col-pull-10{position:relative;right:41.6666666667%}.el-col-push-10{left:41.6666666667%;position:relative}.el-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-11,.el-col-11.is-guttered{display:block}.el-col-offset-11{margin-left:45.8333333333%}.el-col-pull-11{position:relative;right:45.8333333333%}.el-col-push-11{left:45.8333333333%;position:relative}.el-col-12{flex:0 0 50%;max-width:50%}.el-col-12,.el-col-12.is-guttered{display:block}.el-col-offset-12{margin-left:50%}.el-col-pull-12{position:relative;right:50%}.el-col-push-12{left:50%;position:relative}.el-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-13,.el-col-13.is-guttered{display:block}.el-col-offset-13{margin-left:54.1666666667%}.el-col-pull-13{position:relative;right:54.1666666667%}.el-col-push-13{left:54.1666666667%;position:relative}.el-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-14,.el-col-14.is-guttered{display:block}.el-col-offset-14{margin-left:58.3333333333%}.el-col-pull-14{position:relative;right:58.3333333333%}.el-col-push-14{left:58.3333333333%;position:relative}.el-col-15{flex:0 0 62.5%;max-width:62.5%}.el-col-15,.el-col-15.is-guttered{display:block}.el-col-offset-15{margin-left:62.5%}.el-col-pull-15{position:relative;right:62.5%}.el-col-push-15{left:62.5%;position:relative}.el-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-16,.el-col-16.is-guttered{display:block}.el-col-offset-16{margin-left:66.6666666667%}.el-col-pull-16{position:relative;right:66.6666666667%}.el-col-push-16{left:66.6666666667%;position:relative}.el-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-17,.el-col-17.is-guttered{display:block}.el-col-offset-17{margin-left:70.8333333333%}.el-col-pull-17{position:relative;right:70.8333333333%}.el-col-push-17{left:70.8333333333%;position:relative}.el-col-18{flex:0 0 75%;max-width:75%}.el-col-18,.el-col-18.is-guttered{display:block}.el-col-offset-18{margin-left:75%}.el-col-pull-18{position:relative;right:75%}.el-col-push-18{left:75%;position:relative}.el-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-19,.el-col-19.is-guttered{display:block}.el-col-offset-19{margin-left:79.1666666667%}.el-col-pull-19{position:relative;right:79.1666666667%}.el-col-push-19{left:79.1666666667%;position:relative}.el-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-20,.el-col-20.is-guttered{display:block}.el-col-offset-20{margin-left:83.3333333333%}.el-col-pull-20{position:relative;right:83.3333333333%}.el-col-push-20{left:83.3333333333%;position:relative}.el-col-21{flex:0 0 87.5%;max-width:87.5%}.el-col-21,.el-col-21.is-guttered{display:block}.el-col-offset-21{margin-left:87.5%}.el-col-pull-21{position:relative;right:87.5%}.el-col-push-21{left:87.5%;position:relative}.el-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-22,.el-col-22.is-guttered{display:block}.el-col-offset-22{margin-left:91.6666666667%}.el-col-pull-22{position:relative;right:91.6666666667%}.el-col-push-22{left:91.6666666667%;position:relative}.el-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-23,.el-col-23.is-guttered{display:block}.el-col-offset-23{margin-left:95.8333333333%}.el-col-pull-23{position:relative;right:95.8333333333%}.el-col-push-23{left:95.8333333333%;position:relative}.el-col-24{flex:0 0 100%;max-width:100%}.el-col-24,.el-col-24.is-guttered{display:block}.el-col-offset-24{margin-left:100%}.el-col-pull-24{position:relative;right:100%}.el-col-push-24{left:100%;position:relative}@media only screen and (max-width:767px){.el-col-xs-0{display:none;flex:0 0 0%;max-width:0}.el-col-xs-0.is-guttered{display:none}.el-col-xs-offset-0{margin-left:0}.el-col-xs-pull-0{position:relative;right:0}.el-col-xs-push-0{left:0;position:relative}.el-col-xs-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xs-1,.el-col-xs-1.is-guttered{display:block}.el-col-xs-offset-1{margin-left:4.1666666667%}.el-col-xs-pull-1{position:relative;right:4.1666666667%}.el-col-xs-push-1{left:4.1666666667%;position:relative}.el-col-xs-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xs-2,.el-col-xs-2.is-guttered{display:block}.el-col-xs-offset-2{margin-left:8.3333333333%}.el-col-xs-pull-2{position:relative;right:8.3333333333%}.el-col-xs-push-2{left:8.3333333333%;position:relative}.el-col-xs-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xs-3,.el-col-xs-3.is-guttered{display:block}.el-col-xs-offset-3{margin-left:12.5%}.el-col-xs-pull-3{position:relative;right:12.5%}.el-col-xs-push-3{left:12.5%;position:relative}.el-col-xs-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xs-4,.el-col-xs-4.is-guttered{display:block}.el-col-xs-offset-4{margin-left:16.6666666667%}.el-col-xs-pull-4{position:relative;right:16.6666666667%}.el-col-xs-push-4{left:16.6666666667%;position:relative}.el-col-xs-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xs-5,.el-col-xs-5.is-guttered{display:block}.el-col-xs-offset-5{margin-left:20.8333333333%}.el-col-xs-pull-5{position:relative;right:20.8333333333%}.el-col-xs-push-5{left:20.8333333333%;position:relative}.el-col-xs-6{flex:0 0 25%;max-width:25%}.el-col-xs-6,.el-col-xs-6.is-guttered{display:block}.el-col-xs-offset-6{margin-left:25%}.el-col-xs-pull-6{position:relative;right:25%}.el-col-xs-push-6{left:25%;position:relative}.el-col-xs-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xs-7,.el-col-xs-7.is-guttered{display:block}.el-col-xs-offset-7{margin-left:29.1666666667%}.el-col-xs-pull-7{position:relative;right:29.1666666667%}.el-col-xs-push-7{left:29.1666666667%;position:relative}.el-col-xs-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xs-8,.el-col-xs-8.is-guttered{display:block}.el-col-xs-offset-8{margin-left:33.3333333333%}.el-col-xs-pull-8{position:relative;right:33.3333333333%}.el-col-xs-push-8{left:33.3333333333%;position:relative}.el-col-xs-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xs-9,.el-col-xs-9.is-guttered{display:block}.el-col-xs-offset-9{margin-left:37.5%}.el-col-xs-pull-9{position:relative;right:37.5%}.el-col-xs-push-9{left:37.5%;position:relative}.el-col-xs-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xs-10.is-guttered{display:block}.el-col-xs-offset-10{margin-left:41.6666666667%}.el-col-xs-pull-10{position:relative;right:41.6666666667%}.el-col-xs-push-10{left:41.6666666667%;position:relative}.el-col-xs-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xs-11.is-guttered{display:block}.el-col-xs-offset-11{margin-left:45.8333333333%}.el-col-xs-pull-11{position:relative;right:45.8333333333%}.el-col-xs-push-11{left:45.8333333333%;position:relative}.el-col-xs-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xs-12.is-guttered{display:block}.el-col-xs-offset-12{margin-left:50%}.el-col-xs-pull-12{position:relative;right:50%}.el-col-xs-push-12{left:50%;position:relative}.el-col-xs-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xs-13.is-guttered{display:block}.el-col-xs-offset-13{margin-left:54.1666666667%}.el-col-xs-pull-13{position:relative;right:54.1666666667%}.el-col-xs-push-13{left:54.1666666667%;position:relative}.el-col-xs-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xs-14.is-guttered{display:block}.el-col-xs-offset-14{margin-left:58.3333333333%}.el-col-xs-pull-14{position:relative;right:58.3333333333%}.el-col-xs-push-14{left:58.3333333333%;position:relative}.el-col-xs-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xs-15.is-guttered{display:block}.el-col-xs-offset-15{margin-left:62.5%}.el-col-xs-pull-15{position:relative;right:62.5%}.el-col-xs-push-15{left:62.5%;position:relative}.el-col-xs-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xs-16.is-guttered{display:block}.el-col-xs-offset-16{margin-left:66.6666666667%}.el-col-xs-pull-16{position:relative;right:66.6666666667%}.el-col-xs-push-16{left:66.6666666667%;position:relative}.el-col-xs-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xs-17.is-guttered{display:block}.el-col-xs-offset-17{margin-left:70.8333333333%}.el-col-xs-pull-17{position:relative;right:70.8333333333%}.el-col-xs-push-17{left:70.8333333333%;position:relative}.el-col-xs-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xs-18.is-guttered{display:block}.el-col-xs-offset-18{margin-left:75%}.el-col-xs-pull-18{position:relative;right:75%}.el-col-xs-push-18{left:75%;position:relative}.el-col-xs-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xs-19.is-guttered{display:block}.el-col-xs-offset-19{margin-left:79.1666666667%}.el-col-xs-pull-19{position:relative;right:79.1666666667%}.el-col-xs-push-19{left:79.1666666667%;position:relative}.el-col-xs-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xs-20.is-guttered{display:block}.el-col-xs-offset-20{margin-left:83.3333333333%}.el-col-xs-pull-20{position:relative;right:83.3333333333%}.el-col-xs-push-20{left:83.3333333333%;position:relative}.el-col-xs-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xs-21.is-guttered{display:block}.el-col-xs-offset-21{margin-left:87.5%}.el-col-xs-pull-21{position:relative;right:87.5%}.el-col-xs-push-21{left:87.5%;position:relative}.el-col-xs-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xs-22.is-guttered{display:block}.el-col-xs-offset-22{margin-left:91.6666666667%}.el-col-xs-pull-22{position:relative;right:91.6666666667%}.el-col-xs-push-22{left:91.6666666667%;position:relative}.el-col-xs-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xs-23.is-guttered{display:block}.el-col-xs-offset-23{margin-left:95.8333333333%}.el-col-xs-pull-23{position:relative;right:95.8333333333%}.el-col-xs-push-23{left:95.8333333333%;position:relative}.el-col-xs-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xs-24.is-guttered{display:block}.el-col-xs-offset-24{margin-left:100%}.el-col-xs-pull-24{position:relative;right:100%}.el-col-xs-push-24{left:100%;position:relative}}@media only screen and (min-width:768px){.el-col-sm-0{display:none;flex:0 0 0%;max-width:0}.el-col-sm-0.is-guttered{display:none}.el-col-sm-offset-0{margin-left:0}.el-col-sm-pull-0{position:relative;right:0}.el-col-sm-push-0{left:0;position:relative}.el-col-sm-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-sm-1,.el-col-sm-1.is-guttered{display:block}.el-col-sm-offset-1{margin-left:4.1666666667%}.el-col-sm-pull-1{position:relative;right:4.1666666667%}.el-col-sm-push-1{left:4.1666666667%;position:relative}.el-col-sm-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-sm-2,.el-col-sm-2.is-guttered{display:block}.el-col-sm-offset-2{margin-left:8.3333333333%}.el-col-sm-pull-2{position:relative;right:8.3333333333%}.el-col-sm-push-2{left:8.3333333333%;position:relative}.el-col-sm-3{flex:0 0 12.5%;max-width:12.5%}.el-col-sm-3,.el-col-sm-3.is-guttered{display:block}.el-col-sm-offset-3{margin-left:12.5%}.el-col-sm-pull-3{position:relative;right:12.5%}.el-col-sm-push-3{left:12.5%;position:relative}.el-col-sm-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-sm-4,.el-col-sm-4.is-guttered{display:block}.el-col-sm-offset-4{margin-left:16.6666666667%}.el-col-sm-pull-4{position:relative;right:16.6666666667%}.el-col-sm-push-4{left:16.6666666667%;position:relative}.el-col-sm-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-sm-5,.el-col-sm-5.is-guttered{display:block}.el-col-sm-offset-5{margin-left:20.8333333333%}.el-col-sm-pull-5{position:relative;right:20.8333333333%}.el-col-sm-push-5{left:20.8333333333%;position:relative}.el-col-sm-6{flex:0 0 25%;max-width:25%}.el-col-sm-6,.el-col-sm-6.is-guttered{display:block}.el-col-sm-offset-6{margin-left:25%}.el-col-sm-pull-6{position:relative;right:25%}.el-col-sm-push-6{left:25%;position:relative}.el-col-sm-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-sm-7,.el-col-sm-7.is-guttered{display:block}.el-col-sm-offset-7{margin-left:29.1666666667%}.el-col-sm-pull-7{position:relative;right:29.1666666667%}.el-col-sm-push-7{left:29.1666666667%;position:relative}.el-col-sm-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-sm-8,.el-col-sm-8.is-guttered{display:block}.el-col-sm-offset-8{margin-left:33.3333333333%}.el-col-sm-pull-8{position:relative;right:33.3333333333%}.el-col-sm-push-8{left:33.3333333333%;position:relative}.el-col-sm-9{flex:0 0 37.5%;max-width:37.5%}.el-col-sm-9,.el-col-sm-9.is-guttered{display:block}.el-col-sm-offset-9{margin-left:37.5%}.el-col-sm-pull-9{position:relative;right:37.5%}.el-col-sm-push-9{left:37.5%;position:relative}.el-col-sm-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-sm-10.is-guttered{display:block}.el-col-sm-offset-10{margin-left:41.6666666667%}.el-col-sm-pull-10{position:relative;right:41.6666666667%}.el-col-sm-push-10{left:41.6666666667%;position:relative}.el-col-sm-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-sm-11.is-guttered{display:block}.el-col-sm-offset-11{margin-left:45.8333333333%}.el-col-sm-pull-11{position:relative;right:45.8333333333%}.el-col-sm-push-11{left:45.8333333333%;position:relative}.el-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.el-col-sm-12.is-guttered{display:block}.el-col-sm-offset-12{margin-left:50%}.el-col-sm-pull-12{position:relative;right:50%}.el-col-sm-push-12{left:50%;position:relative}.el-col-sm-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-sm-13.is-guttered{display:block}.el-col-sm-offset-13{margin-left:54.1666666667%}.el-col-sm-pull-13{position:relative;right:54.1666666667%}.el-col-sm-push-13{left:54.1666666667%;position:relative}.el-col-sm-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-sm-14.is-guttered{display:block}.el-col-sm-offset-14{margin-left:58.3333333333%}.el-col-sm-pull-14{position:relative;right:58.3333333333%}.el-col-sm-push-14{left:58.3333333333%;position:relative}.el-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-sm-15.is-guttered{display:block}.el-col-sm-offset-15{margin-left:62.5%}.el-col-sm-pull-15{position:relative;right:62.5%}.el-col-sm-push-15{left:62.5%;position:relative}.el-col-sm-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-sm-16.is-guttered{display:block}.el-col-sm-offset-16{margin-left:66.6666666667%}.el-col-sm-pull-16{position:relative;right:66.6666666667%}.el-col-sm-push-16{left:66.6666666667%;position:relative}.el-col-sm-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-sm-17.is-guttered{display:block}.el-col-sm-offset-17{margin-left:70.8333333333%}.el-col-sm-pull-17{position:relative;right:70.8333333333%}.el-col-sm-push-17{left:70.8333333333%;position:relative}.el-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.el-col-sm-18.is-guttered{display:block}.el-col-sm-offset-18{margin-left:75%}.el-col-sm-pull-18{position:relative;right:75%}.el-col-sm-push-18{left:75%;position:relative}.el-col-sm-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-sm-19.is-guttered{display:block}.el-col-sm-offset-19{margin-left:79.1666666667%}.el-col-sm-pull-19{position:relative;right:79.1666666667%}.el-col-sm-push-19{left:79.1666666667%;position:relative}.el-col-sm-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-sm-20.is-guttered{display:block}.el-col-sm-offset-20{margin-left:83.3333333333%}.el-col-sm-pull-20{position:relative;right:83.3333333333%}.el-col-sm-push-20{left:83.3333333333%;position:relative}.el-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-sm-21.is-guttered{display:block}.el-col-sm-offset-21{margin-left:87.5%}.el-col-sm-pull-21{position:relative;right:87.5%}.el-col-sm-push-21{left:87.5%;position:relative}.el-col-sm-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-sm-22.is-guttered{display:block}.el-col-sm-offset-22{margin-left:91.6666666667%}.el-col-sm-pull-22{position:relative;right:91.6666666667%}.el-col-sm-push-22{left:91.6666666667%;position:relative}.el-col-sm-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-sm-23.is-guttered{display:block}.el-col-sm-offset-23{margin-left:95.8333333333%}.el-col-sm-pull-23{position:relative;right:95.8333333333%}.el-col-sm-push-23{left:95.8333333333%;position:relative}.el-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.el-col-sm-24.is-guttered{display:block}.el-col-sm-offset-24{margin-left:100%}.el-col-sm-pull-24{position:relative;right:100%}.el-col-sm-push-24{left:100%;position:relative}}@media only screen and (min-width:992px){.el-col-md-0{display:none;flex:0 0 0%;max-width:0}.el-col-md-0.is-guttered{display:none}.el-col-md-offset-0{margin-left:0}.el-col-md-pull-0{position:relative;right:0}.el-col-md-push-0{left:0;position:relative}.el-col-md-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-md-1,.el-col-md-1.is-guttered{display:block}.el-col-md-offset-1{margin-left:4.1666666667%}.el-col-md-pull-1{position:relative;right:4.1666666667%}.el-col-md-push-1{left:4.1666666667%;position:relative}.el-col-md-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-md-2,.el-col-md-2.is-guttered{display:block}.el-col-md-offset-2{margin-left:8.3333333333%}.el-col-md-pull-2{position:relative;right:8.3333333333%}.el-col-md-push-2{left:8.3333333333%;position:relative}.el-col-md-3{flex:0 0 12.5%;max-width:12.5%}.el-col-md-3,.el-col-md-3.is-guttered{display:block}.el-col-md-offset-3{margin-left:12.5%}.el-col-md-pull-3{position:relative;right:12.5%}.el-col-md-push-3{left:12.5%;position:relative}.el-col-md-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-md-4,.el-col-md-4.is-guttered{display:block}.el-col-md-offset-4{margin-left:16.6666666667%}.el-col-md-pull-4{position:relative;right:16.6666666667%}.el-col-md-push-4{left:16.6666666667%;position:relative}.el-col-md-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-md-5,.el-col-md-5.is-guttered{display:block}.el-col-md-offset-5{margin-left:20.8333333333%}.el-col-md-pull-5{position:relative;right:20.8333333333%}.el-col-md-push-5{left:20.8333333333%;position:relative}.el-col-md-6{flex:0 0 25%;max-width:25%}.el-col-md-6,.el-col-md-6.is-guttered{display:block}.el-col-md-offset-6{margin-left:25%}.el-col-md-pull-6{position:relative;right:25%}.el-col-md-push-6{left:25%;position:relative}.el-col-md-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-md-7,.el-col-md-7.is-guttered{display:block}.el-col-md-offset-7{margin-left:29.1666666667%}.el-col-md-pull-7{position:relative;right:29.1666666667%}.el-col-md-push-7{left:29.1666666667%;position:relative}.el-col-md-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-md-8,.el-col-md-8.is-guttered{display:block}.el-col-md-offset-8{margin-left:33.3333333333%}.el-col-md-pull-8{position:relative;right:33.3333333333%}.el-col-md-push-8{left:33.3333333333%;position:relative}.el-col-md-9{flex:0 0 37.5%;max-width:37.5%}.el-col-md-9,.el-col-md-9.is-guttered{display:block}.el-col-md-offset-9{margin-left:37.5%}.el-col-md-pull-9{position:relative;right:37.5%}.el-col-md-push-9{left:37.5%;position:relative}.el-col-md-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-md-10.is-guttered{display:block}.el-col-md-offset-10{margin-left:41.6666666667%}.el-col-md-pull-10{position:relative;right:41.6666666667%}.el-col-md-push-10{left:41.6666666667%;position:relative}.el-col-md-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-md-11.is-guttered{display:block}.el-col-md-offset-11{margin-left:45.8333333333%}.el-col-md-pull-11{position:relative;right:45.8333333333%}.el-col-md-push-11{left:45.8333333333%;position:relative}.el-col-md-12{display:block;flex:0 0 50%;max-width:50%}.el-col-md-12.is-guttered{display:block}.el-col-md-offset-12{margin-left:50%}.el-col-md-pull-12{position:relative;right:50%}.el-col-md-push-12{left:50%;position:relative}.el-col-md-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-md-13.is-guttered{display:block}.el-col-md-offset-13{margin-left:54.1666666667%}.el-col-md-pull-13{position:relative;right:54.1666666667%}.el-col-md-push-13{left:54.1666666667%;position:relative}.el-col-md-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-md-14.is-guttered{display:block}.el-col-md-offset-14{margin-left:58.3333333333%}.el-col-md-pull-14{position:relative;right:58.3333333333%}.el-col-md-push-14{left:58.3333333333%;position:relative}.el-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-md-15.is-guttered{display:block}.el-col-md-offset-15{margin-left:62.5%}.el-col-md-pull-15{position:relative;right:62.5%}.el-col-md-push-15{left:62.5%;position:relative}.el-col-md-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-md-16.is-guttered{display:block}.el-col-md-offset-16{margin-left:66.6666666667%}.el-col-md-pull-16{position:relative;right:66.6666666667%}.el-col-md-push-16{left:66.6666666667%;position:relative}.el-col-md-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-md-17.is-guttered{display:block}.el-col-md-offset-17{margin-left:70.8333333333%}.el-col-md-pull-17{position:relative;right:70.8333333333%}.el-col-md-push-17{left:70.8333333333%;position:relative}.el-col-md-18{display:block;flex:0 0 75%;max-width:75%}.el-col-md-18.is-guttered{display:block}.el-col-md-offset-18{margin-left:75%}.el-col-md-pull-18{position:relative;right:75%}.el-col-md-push-18{left:75%;position:relative}.el-col-md-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-md-19.is-guttered{display:block}.el-col-md-offset-19{margin-left:79.1666666667%}.el-col-md-pull-19{position:relative;right:79.1666666667%}.el-col-md-push-19{left:79.1666666667%;position:relative}.el-col-md-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-md-20.is-guttered{display:block}.el-col-md-offset-20{margin-left:83.3333333333%}.el-col-md-pull-20{position:relative;right:83.3333333333%}.el-col-md-push-20{left:83.3333333333%;position:relative}.el-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-md-21.is-guttered{display:block}.el-col-md-offset-21{margin-left:87.5%}.el-col-md-pull-21{position:relative;right:87.5%}.el-col-md-push-21{left:87.5%;position:relative}.el-col-md-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-md-22.is-guttered{display:block}.el-col-md-offset-22{margin-left:91.6666666667%}.el-col-md-pull-22{position:relative;right:91.6666666667%}.el-col-md-push-22{left:91.6666666667%;position:relative}.el-col-md-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-md-23.is-guttered{display:block}.el-col-md-offset-23{margin-left:95.8333333333%}.el-col-md-pull-23{position:relative;right:95.8333333333%}.el-col-md-push-23{left:95.8333333333%;position:relative}.el-col-md-24{display:block;flex:0 0 100%;max-width:100%}.el-col-md-24.is-guttered{display:block}.el-col-md-offset-24{margin-left:100%}.el-col-md-pull-24{position:relative;right:100%}.el-col-md-push-24{left:100%;position:relative}}@media only screen and (min-width:1200px){.el-col-lg-0{display:none;flex:0 0 0%;max-width:0}.el-col-lg-0.is-guttered{display:none}.el-col-lg-offset-0{margin-left:0}.el-col-lg-pull-0{position:relative;right:0}.el-col-lg-push-0{left:0;position:relative}.el-col-lg-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-lg-1,.el-col-lg-1.is-guttered{display:block}.el-col-lg-offset-1{margin-left:4.1666666667%}.el-col-lg-pull-1{position:relative;right:4.1666666667%}.el-col-lg-push-1{left:4.1666666667%;position:relative}.el-col-lg-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-lg-2,.el-col-lg-2.is-guttered{display:block}.el-col-lg-offset-2{margin-left:8.3333333333%}.el-col-lg-pull-2{position:relative;right:8.3333333333%}.el-col-lg-push-2{left:8.3333333333%;position:relative}.el-col-lg-3{flex:0 0 12.5%;max-width:12.5%}.el-col-lg-3,.el-col-lg-3.is-guttered{display:block}.el-col-lg-offset-3{margin-left:12.5%}.el-col-lg-pull-3{position:relative;right:12.5%}.el-col-lg-push-3{left:12.5%;position:relative}.el-col-lg-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-lg-4,.el-col-lg-4.is-guttered{display:block}.el-col-lg-offset-4{margin-left:16.6666666667%}.el-col-lg-pull-4{position:relative;right:16.6666666667%}.el-col-lg-push-4{left:16.6666666667%;position:relative}.el-col-lg-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-lg-5,.el-col-lg-5.is-guttered{display:block}.el-col-lg-offset-5{margin-left:20.8333333333%}.el-col-lg-pull-5{position:relative;right:20.8333333333%}.el-col-lg-push-5{left:20.8333333333%;position:relative}.el-col-lg-6{flex:0 0 25%;max-width:25%}.el-col-lg-6,.el-col-lg-6.is-guttered{display:block}.el-col-lg-offset-6{margin-left:25%}.el-col-lg-pull-6{position:relative;right:25%}.el-col-lg-push-6{left:25%;position:relative}.el-col-lg-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-lg-7,.el-col-lg-7.is-guttered{display:block}.el-col-lg-offset-7{margin-left:29.1666666667%}.el-col-lg-pull-7{position:relative;right:29.1666666667%}.el-col-lg-push-7{left:29.1666666667%;position:relative}.el-col-lg-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-lg-8,.el-col-lg-8.is-guttered{display:block}.el-col-lg-offset-8{margin-left:33.3333333333%}.el-col-lg-pull-8{position:relative;right:33.3333333333%}.el-col-lg-push-8{left:33.3333333333%;position:relative}.el-col-lg-9{flex:0 0 37.5%;max-width:37.5%}.el-col-lg-9,.el-col-lg-9.is-guttered{display:block}.el-col-lg-offset-9{margin-left:37.5%}.el-col-lg-pull-9{position:relative;right:37.5%}.el-col-lg-push-9{left:37.5%;position:relative}.el-col-lg-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-lg-10.is-guttered{display:block}.el-col-lg-offset-10{margin-left:41.6666666667%}.el-col-lg-pull-10{position:relative;right:41.6666666667%}.el-col-lg-push-10{left:41.6666666667%;position:relative}.el-col-lg-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-lg-11.is-guttered{display:block}.el-col-lg-offset-11{margin-left:45.8333333333%}.el-col-lg-pull-11{position:relative;right:45.8333333333%}.el-col-lg-push-11{left:45.8333333333%;position:relative}.el-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.el-col-lg-12.is-guttered{display:block}.el-col-lg-offset-12{margin-left:50%}.el-col-lg-pull-12{position:relative;right:50%}.el-col-lg-push-12{left:50%;position:relative}.el-col-lg-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-lg-13.is-guttered{display:block}.el-col-lg-offset-13{margin-left:54.1666666667%}.el-col-lg-pull-13{position:relative;right:54.1666666667%}.el-col-lg-push-13{left:54.1666666667%;position:relative}.el-col-lg-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-lg-14.is-guttered{display:block}.el-col-lg-offset-14{margin-left:58.3333333333%}.el-col-lg-pull-14{position:relative;right:58.3333333333%}.el-col-lg-push-14{left:58.3333333333%;position:relative}.el-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-lg-15.is-guttered{display:block}.el-col-lg-offset-15{margin-left:62.5%}.el-col-lg-pull-15{position:relative;right:62.5%}.el-col-lg-push-15{left:62.5%;position:relative}.el-col-lg-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-lg-16.is-guttered{display:block}.el-col-lg-offset-16{margin-left:66.6666666667%}.el-col-lg-pull-16{position:relative;right:66.6666666667%}.el-col-lg-push-16{left:66.6666666667%;position:relative}.el-col-lg-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-lg-17.is-guttered{display:block}.el-col-lg-offset-17{margin-left:70.8333333333%}.el-col-lg-pull-17{position:relative;right:70.8333333333%}.el-col-lg-push-17{left:70.8333333333%;position:relative}.el-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.el-col-lg-18.is-guttered{display:block}.el-col-lg-offset-18{margin-left:75%}.el-col-lg-pull-18{position:relative;right:75%}.el-col-lg-push-18{left:75%;position:relative}.el-col-lg-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-lg-19.is-guttered{display:block}.el-col-lg-offset-19{margin-left:79.1666666667%}.el-col-lg-pull-19{position:relative;right:79.1666666667%}.el-col-lg-push-19{left:79.1666666667%;position:relative}.el-col-lg-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-lg-20.is-guttered{display:block}.el-col-lg-offset-20{margin-left:83.3333333333%}.el-col-lg-pull-20{position:relative;right:83.3333333333%}.el-col-lg-push-20{left:83.3333333333%;position:relative}.el-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-lg-21.is-guttered{display:block}.el-col-lg-offset-21{margin-left:87.5%}.el-col-lg-pull-21{position:relative;right:87.5%}.el-col-lg-push-21{left:87.5%;position:relative}.el-col-lg-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-lg-22.is-guttered{display:block}.el-col-lg-offset-22{margin-left:91.6666666667%}.el-col-lg-pull-22{position:relative;right:91.6666666667%}.el-col-lg-push-22{left:91.6666666667%;position:relative}.el-col-lg-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-lg-23.is-guttered{display:block}.el-col-lg-offset-23{margin-left:95.8333333333%}.el-col-lg-pull-23{position:relative;right:95.8333333333%}.el-col-lg-push-23{left:95.8333333333%;position:relative}.el-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.el-col-lg-24.is-guttered{display:block}.el-col-lg-offset-24{margin-left:100%}.el-col-lg-pull-24{position:relative;right:100%}.el-col-lg-push-24{left:100%;position:relative}}@media only screen and (min-width:1920px){.el-col-xl-0{display:none;flex:0 0 0%;max-width:0}.el-col-xl-0.is-guttered{display:none}.el-col-xl-offset-0{margin-left:0}.el-col-xl-pull-0{position:relative;right:0}.el-col-xl-push-0{left:0;position:relative}.el-col-xl-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xl-1,.el-col-xl-1.is-guttered{display:block}.el-col-xl-offset-1{margin-left:4.1666666667%}.el-col-xl-pull-1{position:relative;right:4.1666666667%}.el-col-xl-push-1{left:4.1666666667%;position:relative}.el-col-xl-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xl-2,.el-col-xl-2.is-guttered{display:block}.el-col-xl-offset-2{margin-left:8.3333333333%}.el-col-xl-pull-2{position:relative;right:8.3333333333%}.el-col-xl-push-2{left:8.3333333333%;position:relative}.el-col-xl-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xl-3,.el-col-xl-3.is-guttered{display:block}.el-col-xl-offset-3{margin-left:12.5%}.el-col-xl-pull-3{position:relative;right:12.5%}.el-col-xl-push-3{left:12.5%;position:relative}.el-col-xl-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xl-4,.el-col-xl-4.is-guttered{display:block}.el-col-xl-offset-4{margin-left:16.6666666667%}.el-col-xl-pull-4{position:relative;right:16.6666666667%}.el-col-xl-push-4{left:16.6666666667%;position:relative}.el-col-xl-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xl-5,.el-col-xl-5.is-guttered{display:block}.el-col-xl-offset-5{margin-left:20.8333333333%}.el-col-xl-pull-5{position:relative;right:20.8333333333%}.el-col-xl-push-5{left:20.8333333333%;position:relative}.el-col-xl-6{flex:0 0 25%;max-width:25%}.el-col-xl-6,.el-col-xl-6.is-guttered{display:block}.el-col-xl-offset-6{margin-left:25%}.el-col-xl-pull-6{position:relative;right:25%}.el-col-xl-push-6{left:25%;position:relative}.el-col-xl-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xl-7,.el-col-xl-7.is-guttered{display:block}.el-col-xl-offset-7{margin-left:29.1666666667%}.el-col-xl-pull-7{position:relative;right:29.1666666667%}.el-col-xl-push-7{left:29.1666666667%;position:relative}.el-col-xl-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xl-8,.el-col-xl-8.is-guttered{display:block}.el-col-xl-offset-8{margin-left:33.3333333333%}.el-col-xl-pull-8{position:relative;right:33.3333333333%}.el-col-xl-push-8{left:33.3333333333%;position:relative}.el-col-xl-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xl-9,.el-col-xl-9.is-guttered{display:block}.el-col-xl-offset-9{margin-left:37.5%}.el-col-xl-pull-9{position:relative;right:37.5%}.el-col-xl-push-9{left:37.5%;position:relative}.el-col-xl-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xl-10.is-guttered{display:block}.el-col-xl-offset-10{margin-left:41.6666666667%}.el-col-xl-pull-10{position:relative;right:41.6666666667%}.el-col-xl-push-10{left:41.6666666667%;position:relative}.el-col-xl-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xl-11.is-guttered{display:block}.el-col-xl-offset-11{margin-left:45.8333333333%}.el-col-xl-pull-11{position:relative;right:45.8333333333%}.el-col-xl-push-11{left:45.8333333333%;position:relative}.el-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xl-12.is-guttered{display:block}.el-col-xl-offset-12{margin-left:50%}.el-col-xl-pull-12{position:relative;right:50%}.el-col-xl-push-12{left:50%;position:relative}.el-col-xl-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xl-13.is-guttered{display:block}.el-col-xl-offset-13{margin-left:54.1666666667%}.el-col-xl-pull-13{position:relative;right:54.1666666667%}.el-col-xl-push-13{left:54.1666666667%;position:relative}.el-col-xl-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xl-14.is-guttered{display:block}.el-col-xl-offset-14{margin-left:58.3333333333%}.el-col-xl-pull-14{position:relative;right:58.3333333333%}.el-col-xl-push-14{left:58.3333333333%;position:relative}.el-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xl-15.is-guttered{display:block}.el-col-xl-offset-15{margin-left:62.5%}.el-col-xl-pull-15{position:relative;right:62.5%}.el-col-xl-push-15{left:62.5%;position:relative}.el-col-xl-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xl-16.is-guttered{display:block}.el-col-xl-offset-16{margin-left:66.6666666667%}.el-col-xl-pull-16{position:relative;right:66.6666666667%}.el-col-xl-push-16{left:66.6666666667%;position:relative}.el-col-xl-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xl-17.is-guttered{display:block}.el-col-xl-offset-17{margin-left:70.8333333333%}.el-col-xl-pull-17{position:relative;right:70.8333333333%}.el-col-xl-push-17{left:70.8333333333%;position:relative}.el-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xl-18.is-guttered{display:block}.el-col-xl-offset-18{margin-left:75%}.el-col-xl-pull-18{position:relative;right:75%}.el-col-xl-push-18{left:75%;position:relative}.el-col-xl-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xl-19.is-guttered{display:block}.el-col-xl-offset-19{margin-left:79.1666666667%}.el-col-xl-pull-19{position:relative;right:79.1666666667%}.el-col-xl-push-19{left:79.1666666667%;position:relative}.el-col-xl-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xl-20.is-guttered{display:block}.el-col-xl-offset-20{margin-left:83.3333333333%}.el-col-xl-pull-20{position:relative;right:83.3333333333%}.el-col-xl-push-20{left:83.3333333333%;position:relative}.el-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xl-21.is-guttered{display:block}.el-col-xl-offset-21{margin-left:87.5%}.el-col-xl-pull-21{position:relative;right:87.5%}.el-col-xl-push-21{left:87.5%;position:relative}.el-col-xl-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xl-22.is-guttered{display:block}.el-col-xl-offset-22{margin-left:91.6666666667%}.el-col-xl-pull-22{position:relative;right:91.6666666667%}.el-col-xl-push-22{left:91.6666666667%;position:relative}.el-col-xl-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xl-23.is-guttered{display:block}.el-col-xl-offset-23{margin-left:95.8333333333%}.el-col-xl-pull-23{position:relative;right:95.8333333333%}.el-col-xl-push-23{left:95.8333333333%;position:relative}.el-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xl-24.is-guttered{display:block}.el-col-xl-offset-24{margin-left:100%}.el-col-xl-pull-24{position:relative;right:100%}.el-col-xl-push-24{left:100%;position:relative}}.hukou-dialog{background-color:transparent;background-image:url('+new URL("eath-CHEjiCYl.png",i.meta.url).href+');background-size:100% 100%}.hukou-dialog .el-dialog__header{background:transparent;color:#00fff7}.hukou-dialog .el-dialog__header .el-dialog__title{color:#00fff7}.hukou-dialog .el-dialog__footer{padding:0}.drqk[data-v-6c25d3d0]{display:block;margin-top:4%}.weight-text[data-v-6c25d3d0]{position:absolute;right:8%;top:12%;color:#bfe0ff}.weight-text img[data-v-6c25d3d0]{width:40px}.drqk li[data-v-6c25d3d0]{display:inline-block;margin-top:10px}.people-content[data-v-6c25d3d0],.man-box[data-v-6c25d3d0]{display:flex;justify-content:space-around}.boxnav[data-v-6c25d3d0]{text-align:center;color:#bfe0ff}.man-box-item img[data-v-6c25d3d0]{width:50px}.largText[data-v-6c25d3d0]{font-size:1.2rem}.el-progress{align-items:center;display:flex;line-height:1;position:relative}.el-progress__text{color:var(--el-text-color-regular);font-size:14px;line-height:1;margin-left:5px;min-width:50px}.el-progress__text i{display:block;vertical-align:middle}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{left:0;margin:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);width:100%}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{display:inline-block;vertical-align:middle}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{display:block;margin-right:0;padding-right:0}.el-progress--text-inside .el-progress-bar{margin-right:0;padding-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bar__inner{background-color:var(--el-color-danger)}.el-progress.is-exception .el-progress__text{color:var(--el-color-danger)}.el-progress-bar{box-sizing:border-box;flex-grow:1}.el-progress-bar__outer{background-color:var(--el-border-color-lighter);border-radius:100px;height:6px;overflow:hidden;position:relative;vertical-align:middle}.el-progress-bar__inner{background-color:var(--el-color-primary);border-radius:100px;height:100%;left:0;line-height:1;position:absolute;text-align:right;top:0;transition:width .6s ease;white-space:nowrap}.el-progress-bar__inner:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-progress-bar__inner--indeterminate{animation:indeterminate 3s infinite;transform:translateZ(0)}.el-progress-bar__inner--striped{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0,transparent 50%,rgba(0,0,0,.1) 0,rgba(0,0,0,.1) 75%,transparent 0,transparent);background-size:1.25em 1.25em}.el-progress-bar__inner--striped.el-progress-bar__inner--striped-flow{animation:striped-flow 3s linear infinite}.el-progress-bar__innerText{color:#fff;display:inline-block;font-size:12px;margin:0 5px;vertical-align:middle}@keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@keyframes indeterminate{0%{left:-100%}to{left:100%}}@keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}.cancer-dialog{background-color:transparent;background-image:url('+new URL("eath-CHEjiCYl.png",i.meta.url).href+");background-size:100% 100%}.cancer-dialog .el-dialog__title{background:transparent;color:#00fff7}.cancer-progress .el-progress__text{color:#ddd}.cancer-progress .el-progress-bar__outer{background-color:transparent;border:1px solid #fff}.cancerName[data-v-a56edc48]{position:relative;height:100%}.cancerNameItem[data-v-a56edc48]{position:absolute;cursor:pointer;transform:translate(-50%,-50%)}.rolling_6[data-v-3ffbc59f]{animation:rolling_6-3ffbc59f 2.1s ease}@font-face{font-family:electronicFont;src:url("+new URL("DS-DIGIT-Bz4sH1xK.TTF",i.meta.url).href+")}.data_cage[data-v-3ffbc59f]{display:block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAABUCAYAAADaroR4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjYxNTBCMjE4RjlFNzExRThCOEQ4OUFCNzg1N0FDQUMwIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjYxNTBCMjE5RjlFNzExRThCOEQ4OUFCNzg1N0FDQUMwIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjE1MEIyMTZGOUU3MTFFOEI4RDg5QUI3ODU3QUNBQzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjE1MEIyMTdGOUU3MTFFOEI4RDg5QUI3ODU3QUNBQzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz68zp8VAAAD9ElEQVR42uRcXY6cMAy2h+xo97FHqDTPPUnVy/QefdyDbG/S51Y9Rlc7JS6EOAmB0PG+5RukCIaBkC/+jTFmehaKGzf29XEPm+wcr/auAKbtVO25U+DafLUP/7sK8NyGOCFDca4n8CXguY1T+xv3em5F8VP8/TC1c2zlBPQEvAT8Fts1/paS4krpGfTj1J7i/hzPDZ0BHyPQGfBrxLcSgZLiLgJ9unyi3xvVwI1H8ME5qdSj3Dh977lO2s/4+YM+VqxPNcXPgdIi29GK9i/TL87PEr1C8jNLwNqHVPvUcx55HjuHfmt0UqFenlWOUQdZ9hmOHyMHXFVs92T8rPf/+vr9C3W8Xb59fomTovoq6apTBXyRc5HN/Pa4STBgAcdDraTdjg0fCAN3FK1wMNR+iauEMTQRKWSvY9iSKL5xxNzeDUFdCADJfRvDaX+mIPg8Wux9LG5fKYAIuUg0kjcCJxSCi5nVUQguTRyuzSL9bzzjsMj4rA0RgAcHhowUJwQ7PitpNgBfbsDQ6i3krnU9Q/C60Y7PwiEorG6ScY9hyI/suGtqQwbx1e3KDYPibHVgcvim8+W4aZEiCKotOmJiZXUA38173yTgfiBinilmDIqbtLr8x9HtyI6zVaszSiBCDC7rcgNBULxlz/YpPnqI1RkdwGgvUghAxs0RGJBAxGTPjMtSmEVK2zodeG4I786srD56EFY3hpdRXhoG6+QN5sx7kEWKrs6GO9PqSUnfChxFqwdzZnFg6MDw9+fAGO04RiDCGoHxGL662Y7zPFOEsR4nMlIcgtl9m3jgMTexxdxQUmCCP2IyZ95jANc85rtbllrDy3Au6+0UhzDjkYCmxICJRTzIuzPyFlYnEogIjDnmhqHVF5G1UBzlNfG7EgMQWF28Na5Od2rOAqsj5MCQMQKDlPVkDkQwinKz5qt7kJROMcs4iB2nO5Txoy8OoAMRZpcVZllq/ibFY9hx9mRN28Zgd3P2MoqQ218hIX1pSGZWx0gFMWY2eoLJDPBkozjEdrC8dhXcpQlIzG0t6Cs37kTbKjmjHLBIV3Y8R2C0+M2mHEpZNOZKAhKBkZStd63AUw08VMpJH7FcPrxoqROKnbDKAnMqfZLLZOUCJ7JcsiQLqmotPvxLfUnsv7hGuLC/rKVWWH+mDwi56Ejy49OYilXmW8S2Al5Se6mUE6OTubxCrvUSBrQgWr+lUCZiPZ9nRBdJzJo/rtKXpjGvnTlHhMMEzNwaJnl9T9k3hzFpP0V1C0nz8BqxJaozPUtZ2GopgINX8ugPZfCh4JXbyHcyBOEYrchVoviejEsBHLGs2UrGqVL3I+EWstuYM6qMPHTpwn8CDAB3FsM1ar9q+gAAAABJRU5ErkJggg==);height:100%;width:38px;float:left;margin-left:1px;color:#fff;text-align:center;font-size:40px;line-height:52px;background-repeat:no-repeat;background-size:100%}.count-flop-num[data-v-3ffbc59f]{font-family:electronicFont}.count-flop[data-v-3ffbc59f]{margin:0 10px;display:inline-block;font-size:0;height:50px;line-height:50px;font-size:36px;color:#4898f1}.count-flop>div[data-v-3ffbc59f]{position:relative;display:inline-block;overflow:hidden;height:100%}.count-flop-box[data-v-3ffbc59f]{margin-right:5px;width:36px;border:1px solid rgba(72,152,241,.3);line-height:48px;border-radius:6px}.count-flop-point[data-v-3ffbc59f]{margin-right:5px;width:10px}.count-flop-content[data-v-3ffbc59f]{font-family:MicrosoftYaHei-Bold;text-align:center;position:absolute;left:0;top:0;width:100%;animation-fill-mode:forwards!important;transition:transform 2s linear}.rolling_0[data-v-3ffbc59f]{animation:rolling_0-3ffbc59f 2.1s ease}@keyframes rolling_0-3ffbc59f{0%{transform:translateY(-90%)}to{transform:translateY(0)}}.rolling_1[data-v-3ffbc59f]{animation:rolling_1-3ffbc59f 3s ease}@keyframes rolling_1-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-10%)}}.rolling_2[data-v-3ffbc59f]{animation:rolling_2-3ffbc59f 2.1s ease}@keyframes rolling_2-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-20%)}}.rolling_3[data-v-3ffbc59f]{animation:rolling_3-3ffbc59f 3s ease}@keyframes rolling_3-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-30%)}}.rolling_4[data-v-3ffbc59f]{animation:rolling_4-3ffbc59f 2.1s ease}@keyframes rolling_4-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-40%)}}.rolling_5[data-v-3ffbc59f]{animation:rolling_5-3ffbc59f 3s ease}@keyframes rolling_5-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-50%)}}@keyframes rolling_6-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-60%)}}.rolling_7[data-v-3ffbc59f]{animation:rolling_7-3ffbc59f 3.1s ease}@keyframes rolling_7-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-70%)}}.rolling_8[data-v-3ffbc59f]{animation:rolling_8-3ffbc59f 2.1s ease}@keyframes rolling_8-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-80%)}}.rolling_9[data-v-3ffbc59f]{animation:rolling_9-3ffbc59f 3.6s ease}@keyframes rolling_9-3ffbc59f{0%{transform:translateY(0)}to{transform:translateY(-90%)}}@font-face{font-family:electronicFont;src:url("+new URL("DS-DIGIT-Bz4sH1xK.TTF",i.meta.url).href+")}.born-box[data-v-76147bb7]{display:flex;height:45%;line-height:52px}.p_a01[data-v-76147bb7]{font-size:15px;color:#00aeff;float:left;margin-right:1%}\n",document.head.appendChild(dt);var pt=""+new URL("icon1-DzZ3EAAm.png",i.meta.url).href,ft=""+new URL("icon2-TfyNJkmG.png",i.meta.url).href,gt=""+new URL("icon3-CVEMzhGp.png",i.meta.url).href,mt=""+new URL("icon4-BG4veA_t.png",i.meta.url).href,vt=""+new URL("line1-B71bjm7p.png",i.meta.url).href,yt=""+new URL("line2-BHsY8Ivs.png",i.meta.url).href,_t=""+new URL("line3-CtTb4JFW.png",i.meta.url).href,xt=""+new URL("line4-CEdqVrZG.png",i.meta.url).href,bt=""+new URL("line5-CHX4vXjx.png",i.meta.url).href,wt=""+new URL("line6-CbecP0qS.png",i.meta.url).href,St=""+new URL("line7-CDANFz2y.png",i.meta.url).href,At=function(t,e){return At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},At(t,e)};function Tt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}At(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Mt=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},It=new function(){this.browser=new Mt,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"===("undefined"==typeof wx?"undefined":y(wx))&&"function"==typeof wx.getSystemInfoSync?(It.wxa=!0,It.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?It.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(It.node=!0,It.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,It);var Ct=12,Dt="sans-serif",Et=Ct+"px "+Dt;var Lt,Pt,Rt=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var a=0;a>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),s=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;a.push(d,p),l=l&&o&&d===o[h]&&p===o[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?hn(s,a):hn(a,s))}(a,o,r);if(s)return s(t,n,i),!0}return!1}function gn(t){return"CANVAS"===t.nodeName.toUpperCase()}var mn=/([&<>"'])/g,vn={"&":"&","<":"<",">":">",'"':""","'":"'"};function yn(t){return null==t?"":(t+"").replace(mn,(function(t,e){return vn[e]}))}var _n=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xn=[],bn=It.browser.firefox&&+It.browser.version.split(".")[0]<39;function wn(t,e,n,i){return n=n||{},i?Sn(t,e,n):bn&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Sn(t,e,n),n}function Sn(t,e,n){if(It.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(gn(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(fn(xn,t,i,r))return n.zrX=xn[0],void(n.zrY=xn[1])}n.zrX=n.zrY=0}function An(t){return t||window.event}function Tn(t,e,n){if(null!=(e=An(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&wn(t,r,e,n)}else{wn(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;var r=0!==i?Math.abs(i):Math.abs(n),o=i>0?-1:i<0?1:n>0?-1:1;return 3*r*o}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&_n.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Mn(t,e,n,i){t.addEventListener(e,n,i)}var In=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Cn(t){return 2===t.which||3===t.which}var Dn=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=En(r)/En(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function Pn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Rn(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 Nn(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function kn(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function On(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(n),h=Math.cos(n);return t[0]=r*h+s*c,t[1]=-r*c+s*h,t[2]=o*h+l*c,t[3]=-o*c+h*l,t[4]=h*(a-i[0])+c*(u-i[1])+i[0],t[5]=h*(u-i[1])-c*(a-i[0])+i[1],t}function Bn(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function zn(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}var Fn=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Vn=Math.min,Gn=Math.max,Un=new Fn,Hn=new Fn,Wn=new Fn,Xn=new Fn,jn=new Fn,Yn=new Fn,Zn=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Vn(t.x,this.x),n=Vn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Gn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Gn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return kn(r,r,[-e.x,-e.y]),Bn(r,r,[n,i]),kn(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Un.x=Wn.x=n.x,Un.y=Xn.y=n.y,Hn.x=Xn.x=n.x+n.width,Hn.y=Wn.y=n.y+n.height,Un.transform(i),Xn.transform(i),Hn.transform(i),Wn.transform(i),e.x=Vn(Un.x,Hn.x,Wn.x,Xn.x),e.y=Vn(Un.y,Hn.y,Wn.y,Xn.y);var l=Gn(Un.x,Hn.x,Wn.x,Xn.x),u=Gn(Un.y,Hn.y,Wn.y,Xn.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Qn="silent";function qn(){In(this.event)}var Jn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return Tt(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ln),Kn=function(t,e){this.x=t,this.y=e},$n=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ti=new Zn(0,0,0,0),ei=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new Kn(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new Jn,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new sn(a),a}return Tt(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(re($n,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=ri(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Kn(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Kn(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:qn}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new Kn(t,e);if(ii(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Zn(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var c=i[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(ti.copy(c.getBoundingRect()),c.transform&&ti.applyTransform(c.transform),ti.intersect(l)&&o.push(c))}if(o.length)for(var h=Math.PI/12,d=2*Math.PI,p=0;p=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=ni(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Qn)){e.target=a;break}}}function ri(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}re(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ei.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=ri(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||$e(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var oi=32,ai=7;function si(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function li(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function ui(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function ci(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function hi(t,e){var n,i,r=ai,o=0,a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=ci(t[c],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(h=ui(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,i,o,s){var l=0;for(l=0;l=ai||p>=ai);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[p+l]=t[d+l];return void(t[h]=a[c])}var f=r;for(;;){var g=0,m=0,v=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],g++,m=0,0==--i){v=!0;break}}else if(t[h--]=a[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)=0;l--)t[p+l]=t[d+l];if(0===i){v=!0;break}}if(t[h--]=a[c--],1==--s){v=!0;break}if(0!==(m=s-ui(t[u],a,0,s,s-1,e))){for(s-=m,p=(h-=m)+1,d=(c-=m)+1,l=0;l=ai||m>=ai);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(p=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)t[p+l]=t[d+l];t[h]=a[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=oi;)e|=1&t,t>>=1;return t+e}(r);do{if((o=si(t,n,i,e))s&&(l=s),li(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var pi=1,fi=4,gi=!1;function mi(){gi||(gi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function vi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var yi,_i=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=vi}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(mi(),u.z=0),isNaN(u.z2)&&(mi(),u.z2=0),isNaN(u.zlevel)&&(mi(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();yi=It.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var xi={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,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.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-xi.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*xi.bounceIn(2*t):.5*xi.bounceOut(2*t-1)+.5}},bi=Math.pow,wi=Math.sqrt,Si=1e-8,Ai=1e-4,Ti=wi(3),Mi=1/3,Ii=Ue(),Ci=Ue(),Di=Ue();function Ei(t){return t>-Si&&tSi||t<-Si}function Pi(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Ri(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Ni(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,p=0;if(Ei(c)&&Ei(h)){if(Ei(s))o[0]=0;else(A=-l/s)>=0&&A<=1&&(o[p++]=A)}else{var f=h*h-4*c*d;if(Ei(f)){var g=h/c,m=-g/2;(A=-s/a+g)>=0&&A<=1&&(o[p++]=A),m>=0&&m<=1&&(o[p++]=m)}else if(f>0){var v=wi(f),y=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(A=(-s-((y=y<0?-bi(-y,Mi):bi(y,Mi))+(_=_<0?-bi(-_,Mi):bi(_,Mi))))/(3*a))>=0&&A<=1&&(o[p++]=A)}else{var x=(2*c*s-3*a*h)/(2*wi(c*c*c)),b=Math.acos(x)/3,w=wi(c),S=Math.cos(b),A=(-s-2*w*S)/(3*a),T=(m=(-s+w*(S+Ti*Math.sin(b)))/(3*a),(-s+w*(S-Ti*Math.sin(b)))/(3*a));A>=0&&A<=1&&(o[p++]=A),m>=0&&m<=1&&(o[p++]=m),T>=0&&T<=1&&(o[p++]=T)}}return p}function ki(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Ei(a)){if(Li(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(Ei(u))r[0]=-o/(2*a);else if(u>0){var c,h=wi(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function Oi(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function Bi(t,e,n,i,r,o,a,s,l,u,c){var h,d,p,f,g,m=.005,v=1/0;Ii[0]=l,Ii[1]=u;for(var y=0;y<1;y+=.05)Ci[0]=Pi(t,n,r,a,y),Ci[1]=Pi(e,i,o,s,y),(f=tn(Ii,Ci))=0&&f=0&&m=1?1:Ni(0,i,o,1,t,s)&&Pi(0,r,a,1,s[0])}}}var Yi=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Ve,this.ondestroy=t.ondestroy||Ve,this.onrestart=t.onrestart||Ve,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=de(t)?t:xi[t]||ji(t)},t}(),Zi=function(t){this.value=t},Qi=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Zi(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),qi=function(){function t(t){this._list=new Qi,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Zi(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Ji={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ki(t){return(t=Math.round(t))<0?0:t>255?255:t}function $i(t){return t<0?0:t>1?1:t}function tr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Ki(parseFloat(e)/100*255):Ki(parseInt(e,10))}function er(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?$i(parseFloat(e)/100):$i(parseFloat(e))}function nr(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function ir(t,e,n){return t+(e-t)*n}function rr(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function or(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ar=new qi(20),sr=null;function lr(t,e){sr&&or(sr,e),sr=ar.put(t,sr||e.slice())}function ur(t,e){if(t){e=e||[];var n=ar.get(t);if(n)return or(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Ji)return or(e,Ji[i]),lr(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(rr(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),lr(t,e),e):void rr(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(rr(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),lr(t,e),e):void rr(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?rr(e,+u[0],+u[1],+u[2],1):rr(e,0,0,0,1);c=er(u.pop());case"rgb":return u.length>=3?(rr(e,tr(u[0]),tr(u[1]),tr(u[2]),3===u.length?c:er(u[3])),lr(t,e),e):void rr(e,0,0,0,1);case"hsla":return 4!==u.length?void rr(e,0,0,0,1):(u[3]=er(u[3]),cr(u,e),lr(t,e),e);case"hsl":return 3!==u.length?void rr(e,0,0,0,1):(cr(u,e),lr(t,e),e);default:return}}rr(e,0,0,0,1)}}function cr(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=er(t[1]),r=er(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return rr(e=e||[],Ki(255*nr(a,o,n+1/3)),Ki(255*nr(a,o,n)),Ki(255*nr(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function hr(t,e){var n=ur(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return gr(n,4===n.length?"rgba":"rgb")}}function dr(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Ki(ir(a[0],s[0],l)),n[1]=Ki(ir(a[1],s[1],l)),n[2]=Ki(ir(a[2],s[2],l)),n[3]=$i(ir(a[3],s[3],l)),n}}function pr(t,e,n,i){var r=ur(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-h:r===s?e=1/3+c-d:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=er(n)),null!=i&&(r[2]=er(i)),gr(cr(r),"rgba")}function fr(t,e){var n=ur(t);if(n&&null!=e)return n[3]=$i(e),gr(n,"rgba")}function gr(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function mr(t,e){var n=ur(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var vr=new qi(100);function yr(t){if(pe(t)){var e=vr.get(t);return e||(e=hr(t,-.1),vr.put(t,e)),e}if(xe(t)){var n=Kt({},t);return n.colorStops=oe(t.colorStops,(function(t){return{offset:t.offset,color:hr(t.color,-.1)}})),n}return t}var _r=Math.round;function xr(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=ur(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var br=1e-4;function wr(t){return t-br}function Sr(t){return _r(1e3*t)/1e3}function Ar(t){return _r(1e4*t)/1e4}var Tr={left:"start",right:"end",center:"middle",middle:"middle"};function Mr(t){return t&&!!t.image}function Ir(t){return Mr(t)||function(t){return t&&!!t.svgElement}(t)}function Cr(t){return"linear"===t.type}function Dr(t){return"radial"===t.type}function Er(t){return t&&("linear"===t.type||"radial"===t.type)}function Lr(t){return"url(#"+t+")"}function Pr(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Rr(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*Ge,r=Se(t.scaleX,1),o=Se(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+_r(a*Ge)+"deg, "+_r(s*Ge)+"deg)"),l.join(" ")}var Nr=It.hasGlobalWindow&&de(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},kr=Array.prototype.slice;function Or(t,e,n){return(e-t)*n+t}function Br(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(ie(e)){var l=function(t){return ie(t&&t[0])?2:1}(e);a=l,(1===l&&!ge(e[0])||2===l&&!ge(e[0][0]))&&(o=!0)}else if(ge(e)&&!be(e))a=0;else if(pe(e))if(isNaN(+e)){var u=ur(e);u&&(s=u,a=3)}else a=0;else if(xe(e)){var c=Kt({},s);c.colorStops=oe(e.colorStops,(function(t){return{offset:t.offset,color:ur(t.color)}})),Cr(e)?a=4:Dr(e)&&(a=5),s=c}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var h={time:t,value:s,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=de(n)?n:xi[n]||ji(n)),i.push(h),h},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Xr(i),l=Wr(i),u=0;u=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=d;ne);n++);n=p(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:p((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var m=o?this._additiveValue:h?jr:t[c];if(!Xr(s)&&!h||m||(m=this._additiveValue=[]),this.discrete)t[c]=g<1?i.rawValue:r.rawValue;else if(Xr(s))1===s?Br(m,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,Ur(l),i),this._trackKeys.push(a)}s.addKeyframe(t,Ur(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Qr(){return(new Date).getTime()}var qr,Jr,Kr=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return Tt(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Qr()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,yi((function e(){t._running&&(yi(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Qr(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Qr(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Qr()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Zr(t,e.loop);return this.addAnimator(n),n},e}(ln),$r=It.domSupported,to=(Jr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:qr=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:oe(qr,(function(t){var e=t.replace("mouse","pointer");return Jr.hasOwnProperty(e)?e:t}))}),eo=["mousemove","mouseup"],no=["pointermove","pointerup"],io=!1;function ro(t){var e=t.pointerType;return"pen"===e||"touch"===e}function oo(t){t&&(t.zrByTouch=!0)}function ao(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var so=function(t,e){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},lo={mousedown:function(t){t=Tn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Tn(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Tn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){ao(this,(t=Tn(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){io=!0,t=Tn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){io||(t=Tn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){oo(t=Tn(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),lo.mousemove.call(this,t),lo.mousedown.call(this,t)},touchmove:function(t){oo(t=Tn(this.dom,t)),this.handler.processGesture(t,"change"),lo.mousemove.call(this,t)},touchend:function(t){oo(t=Tn(this.dom,t)),this.handler.processGesture(t,"end"),lo.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&lo.click.call(this,t)},pointerdown:function(t){lo.mousedown.call(this,t)},pointermove:function(t){ro(t)||lo.mousemove.call(this,t)},pointerup:function(t){lo.mouseup.call(this,t)},pointerout:function(t){ro(t)||lo.mouseout.call(this,t)}};re(["click","dblclick","contextmenu"],(function(t){lo[t]=function(e){e=Tn(this.dom,e),this.trigger(t,e)}}));var uo={pointermove:function(t){ro(t)||uo.mousemove.call(this,t)},pointerup:function(t){uo.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function co(t,e){var n=e.domHandlers;It.pointerEventsSupported?re(to.pointer,(function(i){po(e,i,(function(e){n[i].call(t,e)}))})):(It.touchEventsSupported&&re(to.touch,(function(i){po(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),re(to.mouse,(function(i){po(e,i,(function(r){r=An(r),e.touching||n[i].call(t,r)}))})))}function ho(t,e){function n(n){po(e,n,(function(i){i=An(i),ao(t,i.target)||(i=function(t,e){return Tn(t.dom,new so(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}It.pointerEventsSupported?re(no,n):It.touchEventsSupported||re(eo,n)}function po(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Mn(t.domTarget,e,n,i)}function fo(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],e.removeEventListener(n,i,r));t.mounted={}}var go=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},mo=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new go(e,lo),$r&&(i._globalHandlerScope=new go(document,uo)),co(i,i._localHandlerScope),i}return Tt(e,t),e.prototype.dispose=function(){fo(this._localHandlerScope),$r&&fo(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,$r&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?ho(this,e):fo(e)}},e}(ln),vo=1;It.hasGlobalWindow&&(vo=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var yo=vo,_o="#333",xo="#ccc",bo=Pn,wo=5e-5;function So(t){return t>wo||t<-5e-5}var Ao=[],To=[],Mo=[1,0,0,1,0,0],Io=Math.abs,Co=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return So(this.rotation)||So(this.x)||So(this.y)||So(this.scaleX-1)||So(this.scaleY-1)||So(this.skewX)||So(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):bo(n),t&&(e?Nn(n,t,n):Rn(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(bo(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ao);var n=Ao[0]<0?-1:1,i=Ao[1]<0?-1:1,r=((Ao[0]-n)*e+n)/Ao[0]||0,o=((Ao[1]-i)*e+i)/Ao[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],zn(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],Nn(To,t.invTransform,e),e=To);var n=this.originX,i=this.originY;(n||i)&&(Mo[4]=n,Mo[5]=i,Nn(To,e,Mo),To[4]-=n,To[5]-=i,e=To),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&nn(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&nn(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Io(t[0]-1)>1e-10&&Io(t[3]-1)>1e-10?Math.sqrt(Io(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){Eo(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,c=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var p=n+a,f=i+s;e[4]=-p*r-h*f*o,e[5]=-f*o-d*p*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=d*r,e[2]=h*o,l&&On(e,e,l),e[4]+=n+u,e[5]+=i+c,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Do=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Eo(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Fo(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(i instanceof Array)l+=zo(i[0],n.width),u+=zo(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var Vo="__zr_normal__",Go=Do.concat(["ignore"]),Uo=ae(Do,(function(t,e){return t[e]=!0,t}),{ignore:!1}),Ho={},Wo=new Zn(0,0,0,0),Xo=function(){function t(t){this.id=Yt(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){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.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=Wo;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ho,n,u):Fo(Ho,n,u),r.x=Ho.x,r.y=Ho.y,o=Ho.align,a=Ho.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var h=void 0,d=void 0;"center"===c?(h=.5*u.width,d=.5*u.height):(h=zo(c[0],u.width),d=zo(c[1],u.height)),l=!0,r.originX=-r.x+h+(i?0:u.x),r.originY=-r.y+d+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var p=n.offset;p&&(r.x+=p[0],r.y+=p[1],l||(r.originX=-p[0],r.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=pi,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?xo:_o},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&ur(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,gr(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},Kt(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(me(t))for(var n=le(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Vo,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===Vo;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(te(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(t,e,n,l),c&&c.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pi),s}Zt("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,h),g&&g.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pi)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=te(i,t),o=te(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||r.force&&!a.length){var w,S=void 0,A=void 0,T=void 0;if(s){A={},d&&(S={});for(x=0;x<_;x++){A[v=g[x]]=n[v],d?S[v]=i[v]:n[v]=i[v]}}else if(d){T={};for(x=0;x<_;x++){T[v=g[x]]=Ur(n[v]),Zo(n,i,v)}}(w=new Zr(n,!1,!1,h?se(f,(function(t){return t.targetName===e})):null)).targetName=e,r.scope&&(w.scope=r.scope),d&&S&&w.whenWithKeys(0,S,g),T&&w.whenWithKeys(0,T,g),w.whenWithKeys(null==u?500:u,s?A:i,g).delay(c||0),t.addAnimator(w,e),a.push(w)}}ne(Xo,ln),ne(Xo,Co);var qo=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return Tt(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=te(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=te(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function oa(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 pe(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function aa(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),ia),t=(+t).toFixed(e),n?t:+t}function sa(t){return t.sort((function(t,e){return t-e})),t}function la(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return ua(t)}function ua(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function ca(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function ha(t,e){var n=Math.max(la(t),la(e)),i=t+e;return n>ia?i:aa(i,n)}var da=9007199254740991;function pa(t){var e=2*Math.PI;return(t%e+e)%e}function fa(t){return t>-na&&t=10&&e++,e}function ya(t,e){var n=va(t),i=Math.pow(10,n),r=t/i;return t=(r<1.5?1:r<2.5?2:r<4?3:r<7?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function _a(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function xa(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&te(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var us=ls([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),cs=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return us(this,t,e)},t}(),hs=new qi(50);function ds(t){if("string"==typeof t){var e=hs.get(t);return e&&e.image}return t}function ps(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=hs.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!gs(e=o.image)&&o.pending.push(a):((e=Nt.loadImage(t,fs,fs)).__zrImageSrc=t,hs.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function fs(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=Po(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function _s(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=Po(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?xs(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=Po(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function xs(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),h=!0),i.accumWidth=f}else{var g=Is(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var m=0;m=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!Ts[t]}function Is(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;hn:r+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=d,s="",c=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=d,c=p)):f?(o.push(l),a.push(u),l=d,u=p):(o.push(d),a.push(p)):(c+=p,f?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var Cs="__zr_style_"+Math.round(10*Math.random()),Ds={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Es={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ds[Cs]=!0;var Ls=["z","z2","invisible"],Ps=["invisible"],Rs=function(t){function e(e){return t.call(this,e)||this}var n;return Tt(e,t),e.prototype._init=function(e){for(var n=le(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Gs[0]=Fs(r)*n+t,Gs[1]=zs(r)*i+e,Us[0]=Fs(o)*n+t,Us[1]=zs(o)*i+e,u(s,Gs,Us),c(l,Gs,Us),(r%=Vs)<0&&(r+=Vs),(o%=Vs)<0&&(o+=Vs),r>o&&!a?o+=Vs:rr&&(Hs[0]=Fs(p)*n+t,Hs[1]=zs(p)*i+e,u(s,Hs,s),c(l,Hs,l))}var Js={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ks=[],$s=[],tl=[],el=[],nl=[],il=[],rl=Math.min,ol=Math.max,al=Math.cos,sl=Math.sin,ll=Math.abs,ul=Math.PI,cl=2*ul,hl="undefined"!=typeof Float32Array,dl=[];function pl(t){return Math.round(t/ul*1e8)/1e8%2*ul}function fl(t,e){var n=pl(t[0]);n<0&&(n+=cl);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=cl?r=n+cl:e&&n-r>=cl?r=n-cl:!e&&n>r?r=n+(cl-pl(n-r)):e&&n0&&(this._ux=ll(n/yo/t)||0,this._uy=ll(n/yo/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Js.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=ll(t-this._xi),i=ll(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Js.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Js.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Js.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),dl[0]=i,dl[1]=r,fl(dl,o),i=dl[0];var a=(r=dl[1])-i;return this.addData(Js.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=al(r)*n+t,this._yi=sl(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Js.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Js.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!hl||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){tl[0]=tl[1]=nl[0]=nl[1]=Number.MAX_VALUE,el[0]=el[1]=il[0]=il[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||ll(m)>i||h===e-1)&&(f=Math.sqrt(D*D+m*m),r=g,o=_);break;case Js.C:var v=t[h++],y=t[h++],_=(g=t[h++],t[h++]),x=t[h++],b=t[h++];f=zi(r,o,v,y,g,_,x,b,10),r=x,o=b;break;case Js.Q:f=Wi(r,o,v=t[h++],y=t[h++],g=t[h++],_=t[h++],10),r=g,o=_;break;case Js.A:var w=t[h++],S=t[h++],A=t[h++],T=t[h++],M=t[h++],I=t[h++],C=I+M;h+=1,p&&(a=al(M)*A+w,s=sl(M)*T+S),f=ol(A,T)*rl(cl,Math.abs(I)),r=al(C)*A+w,o=sl(C)*T+S;break;case Js.R:a=r=t[h++],s=o=t[h++],f=2*t[h++]+2*t[h++];break;case Js.Z:var D=a-r;m=s-o;f=Math.sqrt(D*D+m*m),r=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,c,h,d=this.data,p=this._ux,f=this._uy,g=this._len,m=e<1,v=0,y=0,_=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(c,h),_=0),b){case Js.M:n=r=d[x++],i=o=d[x++],t.moveTo(r,o);break;case Js.L:a=d[x++],s=d[x++];var S=ll(a-r),A=ll(s-o);if(S>p||A>f){if(m){if(v+(Z=l[y++])>u){var T=(u-v)/Z;t.lineTo(r*(1-T)+a*T,o*(1-T)+s*T);break t}v+=Z}t.lineTo(a,s),r=a,o=s,_=0}else{var M=S*S+A*A;M>_&&(c=a,h=s,_=M)}break;case Js.C:var I=d[x++],C=d[x++],D=d[x++],E=d[x++],L=d[x++],P=d[x++];if(m){if(v+(Z=l[y++])>u){Oi(r,I,D,L,T=(u-v)/Z,Ks),Oi(o,C,E,P,T,$s),t.bezierCurveTo(Ks[1],$s[1],Ks[2],$s[2],Ks[3],$s[3]);break t}v+=Z}t.bezierCurveTo(I,C,D,E,L,P),r=L,o=P;break;case Js.Q:I=d[x++],C=d[x++],D=d[x++],E=d[x++];if(m){if(v+(Z=l[y++])>u){Ui(r,I,D,T=(u-v)/Z,Ks),Ui(o,C,E,T,$s),t.quadraticCurveTo(Ks[1],$s[1],Ks[2],$s[2]);break t}v+=Z}t.quadraticCurveTo(I,C,D,E),r=D,o=E;break;case Js.A:var R=d[x++],N=d[x++],k=d[x++],O=d[x++],B=d[x++],z=d[x++],F=d[x++],V=!d[x++],G=k>O?k:O,U=ll(k-O)>.001,H=B+z,W=!1;if(m)v+(Z=l[y++])>u&&(H=B+z*(u-v)/Z,W=!0),v+=Z;if(U&&t.ellipse?t.ellipse(R,N,k,O,F,B,H,V):t.arc(R,N,G,B,H,V),W)break t;w&&(n=al(B)*k+R,i=sl(B)*O+N),r=al(H)*k+R,o=sl(H)*O+N;break;case Js.R:n=r=d[x],i=o=d[x+1],a=d[x++],s=d[x++];var X=d[x++],j=d[x++];if(m){if(v+(Z=l[y++])>u){var Y=u-v;t.moveTo(a,s),t.lineTo(a+rl(Y,X),s),(Y-=X)>0&&t.lineTo(a+X,s+rl(Y,j)),(Y-=j)>0&&t.lineTo(a+ol(X-Y,0),s+j),(Y-=X)>0&&t.lineTo(a,s+ol(j-Y,0));break t}v+=Z}t.rect(a,s,X,j);break;case Js.Z:if(m){var Z;if(v+(Z=l[y++])>u){T=(u-v)/Z;t.lineTo(r*(1-T)+n*T,o*(1-T)+i*T);break t}v+=Z}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Js,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function ml(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+h&&c>i+h&&c>o+h&&c>s+h||ct+h&&u>n+h&&u>r+h&&u>a+h||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||c+ur&&(r+=bl);var d=Math.atan2(l,s);return d<0&&(d+=bl),d>=i&&d<=r||d+bl>=i&&d+bl<=r}function Sl(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Al=gl.CMD,Tl=2*Math.PI,Ml=1e-4;var Il=[-1,-1,-1],Cl=[-1,-1];function Dl(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(c=void 0,c=Cl[0],Cl[0]=Cl[1],Cl[1]=c),f=Pi(e,i,o,s,Cl[0]),p>1&&(g=Pi(e,i,o,s,Cl[1]))),2===p?ve&&s>i&&s>o||s=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if(Ei(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=wi(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,i,o,s,Il);if(0===l)return 0;var u=Gi(e,i,o);if(u>=0&&u<=1){for(var c=0,h=Fi(e,i,o,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Il[0]=-l,Il[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Tl-1e-4){i=0,r=Tl;var c=o?1:-1;return a>=Il[0]+t&&a<=Il[1]+t?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=Tl,r+=Tl);for(var d=0,p=0;p<2;p++){var f=Il[p];if(f+t>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=Tl+g),(g>=i&&g<=r||g+Tl>=i&&g+Tl<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}function Pl(t,e,n,i,r){for(var o,a,s,l,u=t.data,c=t.len(),h=0,d=0,p=0,f=0,g=0,m=0;m1&&(n||(h+=Sl(d,p,f,g,i,r))),y&&(f=d=u[m],g=p=u[m+1]),v){case Al.M:d=f=u[m++],p=g=u[m++];break;case Al.L:if(n){if(ml(d,p,u[m],u[m+1],e,i,r))return!0}else h+=Sl(d,p,u[m],u[m+1],i,r)||0;d=u[m++],p=u[m++];break;case Al.C:if(n){if(vl(d,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],e,i,r))return!0}else h+=Dl(d,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],i,r)||0;d=u[m++],p=u[m++];break;case Al.Q:if(n){if(yl(d,p,u[m++],u[m++],u[m],u[m+1],e,i,r))return!0}else h+=El(d,p,u[m++],u[m++],u[m],u[m+1],i,r)||0;d=u[m++],p=u[m++];break;case Al.A:var _=u[m++],x=u[m++],b=u[m++],w=u[m++],S=u[m++],A=u[m++];m+=1;var T=!!(1-u[m++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,y?(f=o,g=a):h+=Sl(d,p,o,a,i,r);var M=(i-_)*w/b+_;if(n){if(wl(_,x,w,S,S+A,T,e,M,r))return!0}else h+=Ll(_,x,w,S,S+A,T,M,r);d=Math.cos(S+A)*b+_,p=Math.sin(S+A)*w+x;break;case Al.R:if(f=d=u[m++],g=p=u[m++],o=f+u[m++],a=g+u[m++],n){if(ml(f,g,o,g,e,i,r)||ml(o,g,o,a,e,i,r)||ml(o,a,f,a,e,i,r)||ml(f,a,f,g,e,i,r))return!0}else h+=Sl(o,g,o,a,i,r),h+=Sl(f,a,f,g,i,r);break;case Al.Z:if(n){if(ml(d,p,f,g,e,i,r))return!0}else h+=Sl(d,p,f,g,i,r);d=f,p=g}}return n||(s=p,l=g,Math.abs(s-l).5?_o:e>.2?"#eee":xo}if(t)return xo}return _o},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(pe(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===mr(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~fi},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new gl(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&fi)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Pl(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Pl(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=fi,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:Kt(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&fi)},e.prototype.createStyle=function(t){return Be(Rl,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=Kt({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=Kt({},i.shape),Kt(s,n.shape)):(s=Kt({},r?this.shape:i.shape),Kt(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=Kt({},this.shape);for(var u={},c=le(s),h=0;h0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Be(Bl,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=No(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Rs);zl.prototype.type="tspan";var Fl=$t({x:0,y:0},Ds),Vl={style:$t({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Es.style)};var Gl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.createStyle=function(t){return Be(Fl,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Vl},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Zn(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Rs);Gl.prototype.type="image";var Ul=Math.round;function Hl(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Ul(2*i)===Ul(2*r)&&(t.x1=t.x2=Xl(i,s,!0)),Ul(2*o)===Ul(2*a)&&(t.y1=t.y2=Xl(o,s,!0)),t):t}}function Wl(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Xl(i,s,!0),t.y=Xl(r,s,!0),t.width=Math.max(Xl(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Xl(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Xl(t,e,n){if(!e)return t;var i=Ul(2*t);return(i+Ul(e))%2==0?i/2:(i+(n?1:-1))/2}var jl=function(){this.x=0,this.y=0,this.width=0,this.height=0},Yl={},Zl=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.getDefaultShape=function(){return new jl},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Wl(Yl,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ol);Zl.prototype.type="rect";var Ql={fill:"#000"},ql={style:$t({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Es.style)},Jl=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ql,n.attr(e),n}return Tt(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&c){var f=Math.floor(p/l);n=n.slice(0,f)}if(t&&a&&null!=h)for(var g=ys(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;m0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),M=i.calculatedLineHeight,I=0;Il&&As(n,t.substring(l,u),e,s),As(n,i[2],e,s,i[1]),l=ms.lastIndex}lo){b>0?(y.tokens=y.tokens.slice(0,b),m(y,x,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var I=w.width,C=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))P.percentWidth=I,c.push(P),P.contentWidth=Po(P.text,T);else{if(C){var D=w.backgroundColor,E=D&&D.image;E&&gs(E=ds(E))&&(P.width=Math.max(P.width,E.width*M/E.height))}var L=f&&null!=r?r-x:null;null!=L&&L=0&&"right"===(I=_[M]).align;)this._placeToken(I,t,b,f,T,"right",m),w-=I.width,T-=I.width,M--;for(A+=(n-(A-p)-(g-T)-w)/2;S<=M;)I=_[S],this._placeToken(I,t,b,f,A+I.width/2,"center",m),A+=I.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&uu(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var c=!!s.backgroundColor,h=t.textPadding;h&&(r=su(r,o,h),u-=t.height/2-h[0]-t.innerHeight/2);var d=this._getOrCreateChild(zl),p=d.createStyle();d.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=au("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),y=ou("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=r,p.y=u,_&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=t.font||Et,p.opacity=Ae(s.opacity,e.opacity,1),nu(p,s),y&&(p.lineWidth=Ae(s.lineWidth,e.lineWidth,m),p.lineDash=Se(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var x=t.contentWidth,b=t.contentHeight;d.setBoundingRect(new Zn(ko(p.x,x,p.textAlign),Oo(p.y,b,p.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,d=u&&u.image,p=u&&!d,f=t.borderRadius,g=this;if(p||t.lineHeight||c&&h){(a=this._getOrCreateChild(Zl)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=i,m.width=r,m.height=o,m.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Se(t.fillOpacity,1);else if(d){(s=this._getOrCreateChild(Gl)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=Se(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=Ae(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return iu(t)&&(e=[t.fontStyle,t.fontWeight,eu(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&Ce(e)||t.textFont||t.font},e}(Rs),Kl={left:!0,right:1,center:1},$l={top:1,bottom:1,middle:1},tu=["fontStyle","fontWeight","fontSize","fontFamily"];function eu(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?Ct+"px":t+"px":t}function nu(t,e){for(var n=0;n=0,o=!1;if(t instanceof Ol){var a=fu(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Cu(s)||Cu(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=Kt({},i),(u=Kt({},u)).fill=s):!Cu(u.fill)&&Cu(s)?(o=!0,i=Kt({},i),(u=Kt({},u)).fill=yr(s)):!Cu(u.stroke)&&Cu(l)&&(o||(i=Kt({},i),u=Kt({},u)),u.stroke=yr(l)),i.style=u}}if(i&&null==i.z2){o||(i=Kt({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:bu)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=te(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function nc(t,e,n){lc(t,!0),Bu(t,Vu),rc(t,e,n)}function ic(t,e,n,i){i?function(t){lc(t,!1)}(t):nc(t,e,n)}function rc(t,e,n){var i=cu(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var oc=["emphasis","blur","select"],ac={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function sc(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=vc(f),s*=vc(f));var g=(r===o?-1:1)*vc((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,m=g*a*p/s,v=g*-s*d/a,y=(t+n)/2+_c(h)*m-yc(h)*v,_=(e+i)/2+yc(h)*m+_c(h)*v,x=Sc([1,0],[(d-m)/a,(p-v)/s]),b=[(d-m)/a,(p-v)/s],w=[(-1*d-m)/a,(-1*p-v)/s],S=Sc(b,w);if(wc(b,w)<=-1&&(S=xc),wc(b,w)>=1&&(S=0),S<0){var A=Math.round(S/xc*1e6)/1e6;S=2*xc+A%2*xc}c.addData(u,y,_,a,s,x,S,h,o)}var Tc=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mc=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Ic=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.applyTransform=function(t){},e}(Ol);function Cc(t){return null!=t.setData}function Dc(t,e){var n=function(t){var e=new gl;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=gl.CMD,l=t.match(Tc);if(!l)return e;for(var u=0;uE*E+L*L&&(A=M,T=I),{cx:A,cy:T,x0:-c,y0:-h,x1:A*(r/b-1),y1:T*(r/b-1)}}function Zc(t,e){var n,i=Wc(e.r,0),r=Wc(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,c=e.cy,h=!!e.clockwise,d=Uc(l-s),p=d>Bc&&d%Bc;if(p>jc&&(d=p),i>jc)if(d>Bc-jc)t.moveTo(u+i*Fc(s),c+i*zc(s)),t.arc(u,c,i,s,l,!h),r>jc&&(t.moveTo(u+r*Fc(l),c+r*zc(l)),t.arc(u,c,r,l,s,h));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,A=void 0,T=void 0,M=void 0,I=void 0,C=void 0,D=void 0,E=i*Fc(s),L=i*zc(s),P=r*Fc(l),R=r*zc(l),N=d>jc;if(N){var k=e.cornerRadius;k&&(n=function(t){var e;if(he(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(k),f=n[0],g=n[1],m=n[2],v=n[3]);var O=Uc(i-r)/2;if(y=Xc(O,m),_=Xc(O,v),x=Xc(O,f),b=Xc(O,g),A=w=Wc(y,_),T=S=Wc(x,b),(w>jc||S>jc)&&(M=i*Fc(l),I=i*zc(l),C=r*Fc(s),D=r*zc(s),djc){var W=Xc(m,A),X=Xc(v,A),j=Yc(C,D,E,L,i,W,h),Y=Yc(M,I,P,R,i,X,h);t.moveTo(u+j.cx+j.x0,c+j.cy+j.y0),A0&&t.arc(u+j.cx,c+j.cy,W,Gc(j.y0,j.x0),Gc(j.y1,j.x1),!h),t.arc(u,c,i,Gc(j.cy+j.y1,j.cx+j.x1),Gc(Y.cy+Y.y1,Y.cx+Y.x1),!h),X>0&&t.arc(u+Y.cx,c+Y.cy,X,Gc(Y.y1,Y.x1),Gc(Y.y0,Y.x0),!h))}else t.moveTo(u+E,c+L),t.arc(u,c,i,s,l,!h);else t.moveTo(u+E,c+L);if(r>jc&&N)if(T>jc){W=Xc(f,T),j=Yc(P,R,M,I,r,-(X=Xc(g,T)),h),Y=Yc(E,L,C,D,r,-W,h);t.lineTo(u+j.cx+j.x0,c+j.cy+j.y0),T0&&t.arc(u+j.cx,c+j.cy,X,Gc(j.y0,j.x0),Gc(j.y1,j.x1),!h),t.arc(u,c,r,Gc(j.cy+j.y1,j.cx+j.x1),Gc(Y.cy+Y.y1,Y.cx+Y.x1),h),W>0&&t.arc(u+Y.cx,c+Y.cy,W,Gc(Y.y1,Y.x1),Gc(Y.y0,Y.x0),!h))}else t.lineTo(u+P,c+R),t.arc(u,c,r,l,s,h);else t.lineTo(u+P,c+R)}else t.moveTo(u,c);t.closePath()}}}var Qc=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},qc=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.getDefaultShape=function(){return new Qc},e.prototype.buildPath=function(t,e){Zc(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ol);qc.prototype.type="sector";var Jc=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Kc=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.getDefaultShape=function(){return new Jc},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(Ol);function $c(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],c=[],h=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;dxh[1]){if(a=!1,r)return a;var u=Math.abs(xh[0]-_h[1]),c=Math.abs(_h[0]-xh[1]);Math.min(u,c)>i.len()&&(u0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Lh(t,e,n,i,r,o){Eh("update",t,e,n,i,r,o)}function Ph(t,e,n,i,r,o){Eh("enter",t,e,n,i,r,o)}function Rh(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function td(t){return!t.isGroup}function ed(t,e,n){if(t&&e){var i=function(t){var e={};return t.traverse((function(t){td(t)&&t.anid&&(e[t.anid]=t)})),e}(t);e.traverse((function(t){if(td(t)&&t.anid){var e=i[t.anid];if(e){var o=r(t);t.attr(r(e)),Lh(t,o,n,cu(t).dataIndex)}}}))}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=Kt({},t.shape)),e}}function nd(t,e){return oe(t,(function(t){var n=t[0];n=zh(n,e.x),n=Fh(n,e.x+e.width);var i=t[1];return i=zh(i,e.y),[n,i=Fh(i,e.y+e.height)]}))}function id(t,e,n){var i=Kt({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),$t(r,n),new Gl(i)):Wh(t.replace("path://",""),i,n,"center")}function rd(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,m=ad(f,g,u,c)/p;if(m<0||m>1)return!1;var v=ad(f,g,h,d)/p;return!(v<0||v>1)}function ad(t,e,n,i){return t*i-n*e}function sd(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=pe(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&re(le(l),(function(t){Fe(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=cu(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:$t({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function ld(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function ud(t,e){if(t)if(he(t))for(var n=0;n=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}},createIcon:id,extendPath:function(t,e){return Gh(t,e)},extendShape:function(t){return Ol.extend(t)},getShapeClass:Hh,getTransform:Jh,groupTransition:ed,initProps:Ph,isElementRemoved:Rh,lineLineIntersect:od,linePolygonIntersect:rd,makeImage:Xh,makePath:Wh,mergePath:Yh,registerShape:Uh,removeElement:Nh,removeElementWithFadeOut:Oh,resizePath:Zh,setTooltipConfig:sd,subPixelOptimize:qh,subPixelOptimizeLine:Qh,subPixelOptimizeRect:function(t){return Wl(t.shape,t.shape,t.style),t},transformDirection:$h,traverseElements:ud,updateProps:Lh},Symbol.toStringTag,{value:"Module"})),hd={};function dd(t,e){for(var n=0;n<_u.length;n++){var i=_u[n],r=e[i],o=t.ensureState(i);o.style=o.style||{},o.style.text=r}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(a,!0)}function pd(t,e,n){var i,r=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;r&&(i=r.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=de(t.defaultText)?t.defaultText(o,t,n):t.defaultText);for(var l={normal:i},u=0;u<_u.length;u++){var c=_u[u],h=e[c];l[c]=Se(r?r.getFormattedLabel(o,c,null,a,h&&h.get("formatter")):null,i)}return l}function fd(t,e,n,i){n=n||hd;for(var r=t instanceof Jl,o=!1,a=0;a-1?Ud:Wd;function Zd(t,e){t=t.toUpperCase(),jd[t]=new zd(e),Xd[t]=e}function Qd(t){return jd[t]}Zd(Hd,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Zd(Ud,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},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:"旭日图",custom:"自定义图表",chart:"图表"}},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:""}}}});var qd=1e3,Jd=60*qd,Kd=60*Jd,$d=24*Kd,tp=365*$d,ep={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},np="{yyyy}-{MM}-{dd}",ip={year:"{yyyy}",month:"{yyyy}-{MM}",day:np,hour:np+" "+ep.hour,minute:np+" "+ep.minute,second:np+" "+ep.second,millisecond:ep.none},rp=["year","month","day","hour","minute","second","millisecond"],op=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ap(t,e){return"0000".substr(0,e-(t+="").length)+t}function sp(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function lp(t){return t===sp(t)}function up(t,e,n,i){var r=ma(t),o=r[dp(n)](),a=r[pp(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[fp(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[gp(n)](),h=(c-1)%12+1,d=r[mp(n)](),p=r[vp(n)](),f=r[yp(n)](),g=c>=12?"pm":"am",m=g.toUpperCase(),v=(i instanceof zd?i:Qd(i||Yd)||jd[Wd]).getModel("time"),y=v.get("month"),_=v.get("monthAbbr"),x=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,ap(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,_[a-1]).replace(/{MM}/g,ap(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,ap(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ap(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,ap(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,ap(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,ap(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,ap(f,3)).replace(/{S}/g,f+"")}function cp(t,e){var n=ma(t),i=n[pp(e)]()+1,r=n[fp(e)](),o=n[gp(e)](),a=n[mp(e)](),s=n[vp(e)](),l=0===n[yp(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===r;return d&&1===i?"year":d?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function hp(t,e,n){var i=ge(t)?ma(t):t;switch(e=e||cp(t,n)){case"year":return i[dp(n)]();case"half-year":return i[pp(n)]()>=6?1:0;case"quarter":return Math.floor((i[pp(n)]()+1)/4);case"month":return i[pp(n)]();case"day":return i[fp(n)]();case"half-day":return i[gp(n)]()/24;case"hour":return i[gp(n)]();case"minute":return i[mp(n)]();case"second":return i[vp(n)]();case"millisecond":return i[yp(n)]()}}function dp(t){return t?"getUTCFullYear":"getFullYear"}function pp(t){return t?"getUTCMonth":"getMonth"}function fp(t){return t?"getUTCDate":"getDate"}function gp(t){return t?"getUTCHours":"getHours"}function mp(t){return t?"getUTCMinutes":"getMinutes"}function vp(t){return t?"getUTCSeconds":"getSeconds"}function yp(t){return t?"getUTCMilliseconds":"getMilliseconds"}function _p(t){return t?"setUTCFullYear":"setFullYear"}function xp(t){return t?"setUTCMonth":"setMonth"}function bp(t){return t?"setUTCDate":"setDate"}function wp(t){return t?"setUTCHours":"setHours"}function Sp(t){return t?"setUTCMinutes":"setMinutes"}function Ap(t){return t?"setUTCSeconds":"setSeconds"}function Tp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Mp(t){if(!wa(t))return pe(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Ip(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}var Cp=Me;function Dp(t,e,n){function i(t){return t&&Ce(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?ma(t):t;if(!isNaN(+s))return up(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return fe(t)?i(t):ge(t)&&r(t)?t+"":"-";var l=ba(t);return r(l)?Mp(l):fe(t)?i(t):"boolean"==typeof t?t+"":"-"}var Ep=["a","b","c","d","e","f","g"],Lp=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Pp(t,e,n){he(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Np(t,e){return e=e||"transparent",pe(t)?t:me(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function kp(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Op=re,Bp=["left","right","top","bottom","width","height"],zp=[["width","left","right"],["height","top","bottom"]];function Fp(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var c,h,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(h=a+m)>r||l.newline?(o+=s+n,a=0,h=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)}))}var Vp=Fp;function Gp(t,e,n){n=Cp(n||0);var i=e.width,r=e.height,o=oa(t.left,i),a=oa(t.top,r),s=oa(t.right,i),l=oa(t.bottom,r),u=oa(t.width,i),c=oa(t.height,r),h=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(c)&&(c=r-l-h-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-c-h),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var f=new Zn(o+n[3],a+n[0],u,c);return f.margin=n,f}function Up(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new Zn(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(a=a.clone()).applyTransform(c)}var h=Gp($t({width:a.width,height:a.height},e),n,i),d=s?h.x-a.x:0,p=l?h.y-a.y:0;return"raw"===u?(o.x=d,o.y=p):(o.x+=d,o.y+=p),o===t&&t.markRedraw(),!0}function Hp(t){var e=t.layoutMode||t.constructor.layoutMode;return me(e)?e:e?{type:e}:null}function Wp(t,e,n){var i=n&&n.ignoreSize;!he(i)&&(i=[i,i]);var r=a(zp[0],0),o=a(zp[1],1);function a(n,r){var o={},a=0,u={},c=0;if(Op(n,(function(e){u[e]=t[e]})),Op(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&c++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var h=0;h=0;a--)o=qt(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Za(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(zd);is(Zp,zd),ss(Zp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=es(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=es(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Zp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return re(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return re(t,(function(t){te(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),re(s,(function(t){te(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);te(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(re(t,(function(t){u[t]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(r.call(o,c,h.originalDeps.slice()),delete u[c]),re(h.successor,d?f:p)}re(u,(function(){throw new Error("")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,p(t)}}}(Zp,(function(t){var e=[];re(Zp.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=oe(e,(function(t){return es(t).main})),"dataset"!==t&&te(e,"dataset")<=0&&e.unshift("dataset");return e}));var Qp="";"undefined"!=typeof navigator&&(Qp=navigator.platform||"");var qp="rgba(0, 0, 0, 0.2)",Jp={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:qp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:qp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:qp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:qp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:qp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:qp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Qp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Kp=ke(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),$p="original",tf="arrayRows",ef="objectRows",nf="keyedColumns",rf="typedArray",of="unknown",af="column",sf="row",lf={Must:1,Might:2,Not:3},uf=Ua();function cf(t,e,n){var i={},r=df(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,c=uf(u).datasetMap,h=r.uid+"_"+n.seriesLayoutBy;re(t=t.slice(),(function(e,n){var r=me(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function p(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}var Af="\0_ec_inner",Tf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new zd(i),this._locale=new zd(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=Cf(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Cf(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):yf(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&re(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ke(),s=e&&e.replaceMergeMainTypeMap;uf(this).datasetMap=ke(),re(t,(function(t,e){null!=t&&(Zp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?Qt(t):qt(n[e],t,!0))})),s&&s.each((function(t,e){Zp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Zp.topologicalTravel(o,Zp.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=gf.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,Ea(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=ka(a,o,l);(function(t,e,n){re(t,(function(t){var i=t.newOption;me(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Zp),n[e]=null,i.set(e,null),r.set(e,0);var c,h=[],d=[],p=0;re(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=Zp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(c)return;c=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=Kt({componentIndex:n},t.keyInfo);Kt(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),d.push(i),p++):(h.push(void 0),d.push(void 0))}),this),n[e]=h,i.set(e,d),r.set(e,p),"series"===e&&mf(this)}),this),this._seriesIndices||mf(this)},e.prototype.getOption=function(){var t=Qt(this.option);return re(t,(function(e,n){if(Zp.hasClass(n)){for(var i=Ea(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Va(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t[Af],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Of=re,Bf=me,zf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ff(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=zf.length;n=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,h)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=ha(p,v),f=v;break}}}return i[0]=p,i[1]=f,i}))}))}var ig,rg,og,ag,sg,lg=function(){return function(t){this.data=t.data||(t.sourceFormat===nf?{}:[]),this.sourceFormat=t.sourceFormat||of,this.seriesLayoutBy=t.seriesLayoutBy||af,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return Ig(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function Eg(t){var e,n;return me(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Lg(t){return new Pg(t)}var Pg=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(o||d1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},zg=function(){function t(t,e){if(!ge(e)){Ma("")}this._opFn=Bg[t],this._rvalFloat=ba(e)}return t.prototype.evaluate=function(t){return ge(t)?this._opFn(t,this._rvalFloat):this._opFn(ba(t),this._rvalFloat)},t}(),Fg=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=ge(t)?t:ba(t),i=ge(e)?e:ba(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=pe(t),s=pe(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}(),Vg=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=y(e),this._rvalFloat=ba(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=y(t);n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=ba(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Gg(t,e){return"eq"===t||"ne"===t?new Vg("eq"===t,e):Fe(Bg,t)?new zg(t,e):null}var Ug=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Ng(t,e)},t}();function Hg(t){if(!Qg(t.sourceFormat)){Ma("")}return t.data}function Wg(t){var e=t.sourceFormat,n=t.data;if(!Qg(e)){Ma("")}if(e===tf){for(var i=[],r=0,o=n.length;r65535?Kg:$g}function rm(t,e,n,i,r){var o=nm[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=oe(o,(function(t){return t.property})),u=0;um[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=h,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}d=!0}else if(2===r){f=h[i[0]];var m=h[i[1]],v=t[i[1]][0],y=t[i[1]][1];for(g=0;g=u&&_<=c||isNaN(_))&&(x>=v&&x<=y||isNaN(x))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===r)for(g=0;g=u&&_<=c||isNaN(_))&&(a[s++]=b)}else for(g=0;gt[A][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sm[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),h=new(im(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));h[l++]=c;for(var d=1;dn&&(n=i,r=T)}A>0&&Au-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=m),h[d++]=v}return r._count=d,r._indices=h,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return Ng(t[i],this._dimensions[i])}qg={arrayRows:t,objectRows:function(t,e,n,i){return Ng(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return Ng(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),am=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(lm(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=ye(a=o.get("data",!0))?rf:$p,e=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=Se(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=Se(c.sourceHeader,h.sourceHeader),f=Se(c.dimensions,h.dimensions);t=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||f?[cg(a,{seriesLayoutBy:d,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(r){var m=this._applyTransform(i);t=m.sourceList,e=m.upstreamSignList}else{t=[cg(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){1!==t.length&&um("")}var o,a=[],s=[];return re(t,(function(t){t.prepareSource();var e=t.getSource(r||0);null==r||e||um(""),a.push(e),s.push(t._getVersionSign())})),i?e=function(t,e){var n=Ea(t),i=n.length;i||Ma("");for(var r=0,o=i;r1||n>0&&!t.noHeader;return re(t.blocks,(function(t){var n=vm(t);n>=e&&(e=n+ +(i&&(!n||gm(t)&&!t.noHeader)))})),e}return 0}function ym(t,e,n,i){var r,o=e.noHeader,a=(r=vm(e),{html:dm[r],richText:pm[r]}),s=[],l=e.blocks||[];Ie(!l||he(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Fe(c,u)){var h=new Fg(c[u],null);l.sort((function(t,e){return h.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}re(l,(function(n,r){var o=e.valueFormatter,l=mm(n)(o?Kt(Kt({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var d="richText"===t.renderMode?s.join(a.richText):bm(s.join(""),o?n:a.html);if(o)return d;var p=Dp(e.header,"ordinal",t.useUTC),f=hm(i,t.renderMode).nameStyle;return"richText"===t.renderMode?wm(t,p,f)+a.richText+d:bm('
'+yn(p)+"
"+d,n)}function _m(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(t){return oe(t=he(t)?t:[t],(function(t,e){return Dp(t,he(p)?p[e]:p,u)}))};if(!o||!a){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),d=o?"":Dp(l,"ordinal",u),p=e.valueType,f=a?[]:c(e.value,e.dataIndex),g=!s||!o,m=!s&&o,v=hm(i,r),y=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":h)+(o?"":wm(t,d,y))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(he(e)?e.join(" "):e,o)}(t,f,g,m,_)):bm((s?"":h)+(o?"":function(t,e,n){return''+yn(t)+""}(d,!s,y))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=he(t)?t:[t],''+oe(t,(function(t){return yn(t)})).join("  ")+""}(f,g,m,_)),n)}}function xm(t,e,n,i,r,o){if(t)return mm(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function bm(t,e){return'
'+t+'
'}function wm(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Sm(t,e){return Np(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Am(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Tm=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Sa()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Rp({color:e,type:t,renderMode:n,markerId:i});return pe(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};he(e)?re(e,(function(t){return Kt(n,t)})):Kt(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function Mm(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=he(h),p=Sm(o,a);if(c>1||d&&!c){var f=function(t,e,n,i,r){var o=e.getData(),a=ae(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(fm("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?re(i,(function(t){c(Ig(o,n,t),t)})):re(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,p);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);r=e=Ig(l,a,u[0]),n=g.type}else r=e=d?h[0]:h;var m=Fa(o),v=m&&o.name||"",y=l.getName(a),_=s?v:y;return fm("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[fm("nameValue",{markerType:"item",markerColor:p,name:_,noName:!Ce(_),value:e,valueType:n,dataIndex:a})].concat(i||[])})}var Im=Ua();function Cm(t,e){return t.getName(e)||t.getId(e)}var Dm="__universalTransitionEnabled",Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return Tt(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Lg({count:Pm,reset:Rm}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Im(this).sourceManager=new am(this)).prepareSource();var i=this.getInitialData(t,n);km(i,this),this.dataTask.context.data=i,Im(this).dataBeforeProcessed=i,Lm(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Hp(this),i=n?Xp(t):{},r=this.subType;Zp.hasClass(r)&&(r+="Series"),qt(t,e.getTheme().get(this.subType)),qt(t,this.getDefaultOption()),La(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Wp(t,i,n)},e.prototype.mergeOption=function(t,e){t=qt(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Hp(this);n&&Wp(this.option,t,n);var i=Im(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);km(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Im(this).dataBeforeProcessed=r,Lm(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!ye(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=bf.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[Cm(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Dm])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){me(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Zp.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Zp);function Lm(t){var e=t.name;Fa(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return re(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Pm(t){return t.model.getRawData().count()}function Rm(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Nm}function Nm(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function km(t,e){re(Oe(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,ce(Om,e))}))}function Om(t,e){var n=Bm(t);return n&&n.setOutputEnd((e||this).count()),e}function Bm(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}ne(Em,Dg),ne(Em,bf),is(Em,Zp);var zm=function(){function t(){this.group=new qo,this.uid=Vd("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function Fm(){var t=Ua();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}ns(zm),ss(zm);var Vm=Ua(),Gm=Fm(),Um=function(){function t(){this.group=new qo,this.uid=Vd("viewChart"),this.renderTask=Lg({plan:Xm,reset:jm}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Wm(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Wm(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){ud(this.group,t)},t.markUpdateMethod=function(t,e){Vm(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Hm(t,e,n){t&&uc(t)&&("emphasis"===e?Hu:Wu)(t,n)}function Wm(t,e,n){var i=Ga(t,e),r=e&&null!=e.highlightKey?function(t){var e=pu[t];return null==e&&du<=32&&(e=pu[t]=du++),e}(e.highlightKey):null;null!=i?re(Ea(i),(function(e){Hm(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Hm(t,n,r)}))}function Xm(t){return Gm(t.model)}function jm(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Vm(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Ym[l]}ns(Um),ss(Um);var Ym={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)}}},Zm="\0__throttleOriginMethod",Qm="\0__throttleRate",qm="\0__throttleType";function Jm(t,e,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function Km(t,e,n,i){var r=t[e];if(r){var o=r[Zm]||r,a=r[qm];if(r[Qm]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Jm(o,n,"debounce"===i))[Zm]=o,r[qm]=i,r[Qm]=n}return r}}function $m(t,e){var n=t[e];n&&n[Zm]&&(n.clear&&n.clear(),t[e]=n[Zm])}var tv=Ua(),ev={itemStyle:ls(kd,!0),lineStyle:ls(Pd,!0)},nv={lineStyle:"stroke",itemStyle:"fill"};function iv(t,e){var n=t.visualStyleMapper||ev[e];return n||(console.warn("Unknown style type '"+e+"'."),ev.itemStyle)}function rv(t,e){var n=t.visualDrawType||nv[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var ov={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=iv(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=rv(t,i),l=o[s],u=de(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||de(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||de(o.stroke)?h:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=Kt({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},av=new zd,sv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=iv(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){av.option=n[i];var a=r(av);Kt(t.ensureUniqueItemVisual(e,"style"),a),av.option.decal&&(t.setItemVisual(e,"decal",av.option.decal),av.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},lv={performRawSeries:!0,overallReset:function(t){var e=ke();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),tv(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=tv(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=rv(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,o,c)}}))}}))}},uv=Math.PI;var cv=function(){function t(t,e,n,i){this._stageTaskMap=ke(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ke();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;re(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});Ie(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}re(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(t){a(i,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each((function(t){t.perform(p)})),c.perform(p)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ke(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Lg({plan:gv,reset:mv,count:_v}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Lg({reset:hv});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ke(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,Lg({reset:dv,onDirty:fv})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,r._pipe(t,n)}Ie(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(c=!1,re(n.getSeries(),d)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return de(t)&&(t={overallReset:t,seriesType:xv(t)}),t.uid=Vd("stageHandler"),e&&(t.visualType=e),t},t}();function hv(t){t.overallReset(t.ecModel,t.api,t.payload)}function dv(t){return t.overallProgress&&pv}function pv(){this.agent.dirty(),this.getDownstream().dirty()}function fv(){this.agent&&this.agent.dirty()}function gv(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function mv(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ea(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?oe(e,(function(t,e){return yv(e)})):vv}var vv=yv(0);function yv(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Rv=["symbol","symbolSize","symbolRotate","symbolOffset"],Nv=Rv.concat(["symbolKeepAspect"]),kv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&iy(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=iy(i)?i:0,r=iy(r)?r:1,o=iy(o)?o:0,a=iy(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:ge(e)?[e]:he(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=oe(r,(function(t){return t/a})),o/=a)}return[r,o]}var ly=new gl(!0);function uy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function cy(t){return"string"==typeof t&&"none"!==t}function hy(t){var e=t.fill;return null!=e&&"none"!==e}function dy(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function py(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function fy(t,e,n){var i=ps(e.image,e.__image,n);if(gs(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*Ge),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var gy=["shadowBlur","shadowOffsetX","shadowOffsetY"],my=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function vy(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){Ay(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Ds.opacity:a}(i||e.blend!==n.blend)&&(o||(Ay(t,r),o=!0),t.globalCompositeOperation=e.blend||Ds.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Gy])if(this._disposed)this.id;else{var i,r,o;if(me(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Gy]=!0,!this._model||e){var a=new Nf(this._api),s=this._theme,l=this._model=new Tf;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},b_);var u={seriesTransition:o,optionChanged:!0};if(n)this[Uy]={silent:i,updateParams:u},this[Gy]=!1,this.getZr().wakeUp();else{try{Qy(this),Ky.update.call(this,null,u)}catch(KJ){throw this[Uy]=null,this[Gy]=!1,KJ}this._ssr||this._zr.flush(),this[Uy]=null,this[Gy]=!1,n_.call(this,i),i_.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||It.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(It.svgSupported){var t=this._zr;return re(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;re(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return re(i,(function(t){t.group.ignore=!1})),o}this.id},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(M_[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();re(T_,(function(o,h){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(Qt(t)),p=o.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),c.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=h)-(a*=h),p=(u*=h)-(s*=h),f=Nt.createCanvas(),g=ea(f,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:p}),e){var m="";return re(c,(function(t){var e=t.left-a,n=t.top-s;m+=''+t.dom+""})),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new Zl({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),re(c,(function(t){var e=new Gl({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}this.id},e.prototype.convertToPixel=function(t,e){return $y(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return $y(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return re(Wa(this._model,t),(function(t,i){i.indexOf("Models")>=0&&re(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}}),this)}),this),!!n;this.id},e.prototype.getVisual=function(t,e){var n=Wa(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?Bv(i,r,e):zv(i,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;re(v_,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target;if("globalout"===t?n={}:o&&Uv(o,(function(t){var e=cu(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=Kt({},e.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&i["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),re(__,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),re(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(Gv("map","selectchanged",e,i,t),Gv("pie","selectchanged",e,i,t)):"select"===t.fromAction?(Gv("map","selected",e,i,t),Gv("pie","selected",e,i,t)):"unselect"===t.fromAction&&(Gv("map","unselected",e,i,t),Gv("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Qa(this.getDom(),C_,"");var t=this,e=t._api,n=t._model;re(t._componentsViews,(function(t){t.dispose(n,e)})),re(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete T_[t.id]}},e.prototype.resize=function(t){if(!this[Gy])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Uy]&&(null==i&&(i=this[Uy].silent),n=!0,this[Uy]=null),this[Gy]=!0;try{n&&Qy(this),Ky.update.call(this,{type:"resize",animation:Kt({duration:0},t&&t.animation)})}catch(KJ){throw this[Gy]=!1,KJ}this[Gy]=!1,n_.call(this,i),i_.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(me(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),A_[t]){var n=A_[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=Kt({},t);return e.type=__[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(me(e)||(e={silent:!!e}),y_[t.type]&&this._model)if(this[Gy])this._pendingActions.push(t);else{var n=e.silent;e_.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&It.browser.weChat&&this._throttledZrFlush(),n_.call(this,n),i_.call(this,n)}},e.prototype.updateLabelLayout=function(){ky.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Rh(t))return;if(t instanceof Ol&&function(t){var e=fu(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Qy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),qy(t,!0),qy(t,!1),e.plan()},qy=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!It.node&&!It.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),ky.trigger("series:afterupdate",e,i,s)},h_=function(t){t[Hy]=!0,t.getZr().wakeUp()},d_=function(t){t[Hy]&&(t.getZr().storage.traverse((function(t){Rh(t)||e(t)})),t[Hy]=!1)},u_=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Tt(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){Hu(e,n),h_(t)},n.prototype.leaveEmphasis=function(e,n){Wu(e,n),h_(t)},n.prototype.enterBlur=function(e){Xu(e),h_(t)},n.prototype.leaveBlur=function(e){ju(e),h_(t)},n.prototype.enterSelect=function(e){Yu(e),h_(t)},n.prototype.leaveSelect=function(e){Zu(e),h_(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Ef))(t)},c_=function(t){function e(t,e){for(var n=0;n=0)){V_.push(n);var o=cv.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function U_(t,e){A_[t]=e}function H_(t,e,n){var i=By("registerMap");i&&i(t,e,n)}function W_(t){var e=By("getMap");return e&&e(t)}var X_=function(t){var e=(t=Qt(t)).type;e||Ma("");var n=e.split(":");2!==n.length&&Ma("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,Yg.set(e,t)};F_(zy,ov),F_(Fy,sv),F_(Fy,lv),F_(zy,kv),F_(Fy,Ov),F_(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=Ly(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=Ly(r,e)}}))})),L_(eg),P_(900,(function(t){var e=ke();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(ng)})),U_("default",(function(t,e){$t(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new qo,i=new Zl({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Jl({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Zl({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new dh({shape:{startAngle:-uv/2,endAngle:-uv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*uv/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*uv/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),O_({type:Su,event:Su,update:Su},Ve),O_({type:Au,event:Au,update:Au},Ve),O_({type:Tu,event:Tu,update:Tu},Ve),O_({type:Mu,event:Mu,update:Mu},Ve),O_({type:Iu,event:Iu,update:Iu},Ve),E_("light",Mv),E_("dark",Lv);var j_=[],Y_={registerPreprocessor:L_,registerProcessor:P_,registerPostInit:R_,registerPostUpdate:N_,registerUpdateLifecycle:k_,registerAction:O_,registerCoordinateSystem:function(t,e){Pf.register(t,e)},registerLayout:z_,registerVisual:F_,registerTransform:X_,registerLoading:U_,registerMap:H_,registerImpl:function(t,e){Oy[t]=e},PRIORITY:Vy,ComponentModel:Zp,ComponentView:zm,SeriesModel:Em,ChartView:Um,registerComponentModel:function(t){Zp.registerClass(t)},registerComponentView:function(t){zm.registerClass(t)},registerSeriesModel:function(t){Em.registerClass(t)},registerChartView:function(t){Um.registerClass(t)},registerSubTypeDefaulter:function(t,e){Zp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){var n;n=e,Jo[t]=n}};function Z_(t){he(t)?re(t,(function(t){Z_(t)})):te(j_,t)>=0||(j_.push(t),de(t)&&(t={install:t}),t.install(Y_))}function Q_(t){return null==t?0:t.length||1}function q_(t){return t}var J_=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||q_,this._newKeyGetter=i||q_,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),i[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var d=0;d1)for(var a=0;a30}var ux,cx,hx,dx,px,fx,gx,mx=me,vx=oe,yx="undefined"==typeof Int32Array?Array:Int32Array,_x=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],xx=["_approximateExtent"],bx=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;ox(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===$p&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(he(r=this.getVisual(e))?r=r.slice():mx(r)&&(r=Kt({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,mx(e)?Kt(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){mx(t)?Kt(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?Kt(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;hu(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){re(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:vx(this.dimensions,this._getDimInfo,this),this.hostModel)),px(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];de(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(Te(arguments)))})},t.internalField=(ux=function(t){var e=t._invertedIndicesMap;re(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new yx(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function Sx(t,e){return Ax(t,e).dimensions}function Ax(t,e){ug(t)||(t=hg(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=ke(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return re(e,(function(t){var e;me(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&lx(a),l=i===t.dimensionsDefine,u=l?sx(t):ax(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=ke(c),d=new tm(a),p=0;p0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new rx({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function Tx(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var Mx=function(){return function(t){this.coordSysDims=[],this.axisMap=ke(),this.categoryAxisMap=ke(),this.coordSysName=t}}();var Ix={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",ja).models[0],o=t.getReferringComponents("yAxis",ja).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),Cx(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Cx(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",ja).models[0];e.coordSysDims=["single"],n.set("single",r),Cx(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",ja).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),Cx(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Cx(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();re(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),Cx(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function Cx(t){return"category"===t.get("type")}function Dx(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!ox(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,c,h,d=!(!t||!t.get("stack"));if(re(i,(function(t,e){pe(t)&&(i[e]=t={name:t}),d&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;re(i,(function(t){t.coordDim===p&&g++}));var m={name:c,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(m.storeDimIndex=o.ensureCalculationDimension(h,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),r.appendCalculationDimension(m),r.appendCalculationDimension(v)):(i.push(m),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function Ex(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Lx(t,e){return Ex(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Px(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=hg(t)):o=(i=r.getSource()).sourceFormat===$p;var a=function(t){var e=t.get("coordinateSystem"),n=new Mx(e),i=Ix[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=Pf.get(i);return e&&e.coordSysDims&&(n=oe(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=tx(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=de(l)?l:l?ce(cf,s,e):null,c=Ax(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),h=function(t,e,n){var i,r;return n&&re(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(c.dimensions,n.createInvertedIndices,a),d=o?null:r.getSharedDataStore(c),p=Dx(e,{schema:c,store:d}),f=new bx(c,e);f.setCalculationInfo(p);var g=null!=h&&function(t){if(t.sourceFormat===$p){var e=function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();ss(Rx);var Nx=0,kx=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Nx}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&oe(i,Ox);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!pe(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ke(this.categories))},t}();function Ox(t){return me(t)&&null!=t.value?t.value:t+""}function Bx(t){return"interval"===t.type||"log"===t.type}function zx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=ya(o/e);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Vx(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Gx(t,0,e),Gx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[aa(Math.ceil(t[0]/a)*a,s),aa(Math.floor(t[1]/a)*a,s)],t),r}function Fx(t){var e=Math.pow(10,va(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,aa(n*e)}function Vx(t){return la(t)+2}function Gx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Ux(t,e){return t>=e[0]&&t<=e[1]}function Hx(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Wx(t,e){return t*(e[1]-e[0])+e[0]}var Xx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new kx({})),he(i)&&(i=new kx({categories:oe(i,(function(t){return me(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return Tt(e,t),e.prototype.parse=function(t){return null==t?NaN:pe(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Ux(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return Hx(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Wx(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Rx);Rx.registerClass(Xx);var jx=aa,Yx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return Tt(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Ux(t,this._extent)},e.prototype.normalize=function(t){return Hx(t,this._extent)},e.prototype.scale=function(t){return Wx(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Vx(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:jx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&c0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return re(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=t.getData();i=Math.abs(o[1]-o[0])/h.count()}var d=oa(t.get("barWidth"),i),p=oa(t.get("barMaxWidth"),i),f=oa(t.get("barMinWidth")||(ab(t)?.5:1),i),g=t.get("barGap"),m=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:$x(r),stackId:Kx(t)})})),nb(n)}function nb(t){var e={};re(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return re(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=le(i).length;o=Math.max(35-4*a,15)+"%"}var s=oa(o,r),l=oa(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),re(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,c--}else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,u-=i+l*i,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,p=0;re(i,(function(t,e){t.width||(t.width=h),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;re(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function ib(t,e){var n=tb(t,e),i=eb(n);re(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=Kx(t),o=i[$x(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function rb(t){return{seriesType:t,plan:Fm(),reset:function(t){if(ob(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),c=Ex(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),h=r.isHorizontal(),d=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,r),p=ab(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),m=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=p&&qx(3*r),u=p&&s&&qx(3*r),y=p&&qx(r),_=n.master.getRect(),x=h?_.width:_.height,b=e.getStore(),w=0;null!=(i=t.next());){var S=b.get(c?g:o,i),A=b.get(a,i),T=d,M=void 0;c&&(M=+S-b.get(o,i));var I=void 0,C=void 0,D=void 0,E=void 0;if(h){var L=n.dataToPoint([S,A]);if(c)T=n.dataToPoint([M,A])[0];I=T,C=L[1]+v,D=L[0]-T,E=m,Math.abs(D)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(he(o)){var c=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[c=Math.min(c,o.length-1)]}}return up(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=op,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,c=l[r]();u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=i[0]&&v<=i[1]&&h++)}var y=(i[1]-i[0])/e;if(h>1.5*y&&d>y/1.5)break;if(u.push(g),h>y||t===o[p])break}c=[]}}var _=se(oe(u,(function(t){return se(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(p=0;p<_.length;++p)for(var w=_[p],S=0;Sn&&(this._approxInterval=n);var o=lb.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function cb(t){return(t/=30*$d)>6?6:t>3?3:t>2?2:1}function hb(t){return(t/=Kd)>12?12:t>6?6:t>3.5?4:t>2?2:1}function db(t,e){return(t/=e?Jd:qd)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function pb(t){return ya(t)}function fb(t,e,n){var i=new Date(t);switch(sp(e)){case"year":case"month":i[xp(n)](0);case"day":i[bp(n)](1);case"hour":i[wp(n)](0);case"minute":i[Sp(n)](0);case"second":i[Ap(n)](0),i[Tp(n)](0)}return i.getTime()}Rx.registerClass(sb);var gb=Rx.prototype,mb=Yx.prototype,vb=aa,yb=Math.floor,_b=Math.ceil,xb=Math.pow,bb=Math.log,wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Yx,e._interval=0,e}return Tt(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return oe(mb.getTicks.call(this,t),(function(t){var e=t.value,r=aa(xb(this.base,e));return r=e===n[0]&&this._fixMin?Ab(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?Ab(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=bb(this.base);t=bb(Math.max(0,t))/n,e=bb(Math.max(0,e))/n,mb.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=gb.getExtent.call(this);e[0]=xb(t,e[0]),e[1]=xb(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=Ab(e[0],n[0])),this._fixMax&&(e[1]=Ab(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=bb(t[0])/bb(e),t[1]=bb(t[1])/bb(e),gb.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i,r=(i=n,Math.pow(10,va(i)));for(t/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var o=[aa(_b(e[0]/r)*r),aa(yb(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){mb.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Ux(t=bb(t)/bb(this.base),this._extent)},e.prototype.normalize=function(t){return Hx(t=bb(t)/bb(this.base),this._extent)},e.prototype.scale=function(t){return t=Wx(t,this._extent),xb(this.base,t)},e.type="log",e}(Rx),Sb=wb.prototype;function Ab(t,e){return vb(t,la(e))}Sb.getMinorTicks=mb.getMinorTicks,Sb.getLabel=mb.getLabel,Rx.registerClass(wb);var Tb=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,d=this._determinedMax;return null!=h&&(a=h,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[Ib[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[Mb[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),Mb={min:"_determinedMin",max:"_determinedMax"},Ib={min:"_dataMin",max:"_dataMax"};function Cb(t,e,n){var i=t.rawExtentInfo;return i||(i=new Tb(t,e,n),t.rawExtentInfo=i,i)}function Db(t,e){return null==e?null:be(e)?NaN:t.parse(e)}function Eb(t,e){var n=t.type,i=Cb(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=tb("bar",a),l=!1;if(re(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=eb(s),c=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[$x(e)];return null!=i&&null!=n?i[Kx(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;re(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;re(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=c/(1-(s+l)/o)-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}(r,o,e,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Lb(t,e){var n=e,i=Eb(t,n),r=i.extent,o=n.get("splitNumber");t instanceof wb&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function Pb(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Xx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new sb({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Rx.getClass(e)||Yx)}}function Rb(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):pe(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):de(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(Nb(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function Nb(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function kb(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new Zn(t.x,t.y,o,a)}function Ob(t){var e=t.get("interval");return null==e?"auto":e}function Bb(t){return"category"===t.type&&0===Ob(t.getLabelModel())}function zb(t,e){var n={};return re(t.mapDimensionsAll(e),(function(e){n[Lx(t,e)]=!0})),le(n)}var Fb=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var Vb={isDimensionStacked:Ex,enableDataStack:Dx,getStackedDimension:Lx};function Gb(t,e){var n=e;e instanceof zd||(n=new zd(e));var i=Pb(n);return i.setExtent(t[0],t[1]),Lb(i,n),i}function Ub(t,e){return md(t,null,null,"normal"!==(e=e||{}).state)}var Hb=1e-8;function Wb(t,e){return Math.abs(t-e)n&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function nw(t,e){return oe(se((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),re(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=ew(r,i,n);break;case"Polygon":case"MultiLineString":tw(r,i,n);break;case"MultiPolygon":re(r,(function(t,e){return tw(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new qb(o[0],o.slice(1)));break;case"MultiPolygon":re(i.coordinates,(function(t){t[0]&&r.push(new qb(t[0],t.slice(1)))}));break;case"LineString":r.push(new Jb([i.coordinates]));break;case"MultiLineString":r.push(new Jb(i.coordinates))}var a=new Kb(n[e||"name"],r,n.cp);return a.properties=n,a}))}var iw=Ua();function rw(t,e){var n=oe(e,(function(e){return t.scale.parse(e)}));return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function ow(t){var e=t.getLabelModel().get("customValues");if(e){var n=Rb(t);return{labels:rw(t,e).map((function(e){var i={value:e};return{formattedLabel:n(i),rawLabel:t.scale.getLabel(i),tickValue:e}}))}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=sw(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=Rb(t);return{labels:oe(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function aw(t,e){var n=t.getTickModel().get("customValues");return n?{ticks:rw(t,n)}:"category"===t.type?function(t,e){var n,i,r=lw(t,"ticks"),o=Ob(e),a=uw(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(de(o))n=dw(t,o,!0);else if("auto"===o){var s=sw(t,t.getLabelModel());i=s.labelCategoryInterval,n=oe(s.labels,(function(t){return t.tickValue}))}else n=hw(t,i=o,!0);return cw(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:oe(t.scale.getTicks(),(function(t){return t.value}))}}function sw(t,e){var n,i,r=lw(t,"labels"),o=Ob(e),a=uw(r,o);return a||(de(o)?n=dw(t,o):(i="auto"===o?function(t){var e=iw(t).autoInterval;return null!=e?e:iw(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=hw(t,i)),cw(r,o,{labels:n,labelCategoryInterval:i}))}function lw(t,e){return iw(t)[e]||(iw(t)[e]=[])}function uw(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Bb(t),d=a.get("showMinLabel")||h,p=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return p&&f-l!==o[1]&&g(o[1]),s}function dw(t,e,n){var i=t.scale,r=Rb(t),o=[];return re(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var pw=[0,1],fw=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return ca(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&gw(n=n.slice(),i.count()),ra(t,pw,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&gw(n=n.slice(),i.count());var r=ra(t,n,pw,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=oe(aw(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[1]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;re(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var c=s[0]>s[1];h(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&h(s[0],e[0].coord)&&e.unshift({coord:s[0]});h(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&h(o.coord,s[1])&&e.push({coord:s[1]});function h(t,e){return t=aa(t),e=aa(e),c?t>e:t0&&t<100||(t=5),oe(this.scale.getMinorTicks(t),(function(t){return oe(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return ow(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(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()}}(t),n=Rb(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,p=0;l<=o[1];l+=s){var f,g,m=No(n({value:l}),e.font,"center","top");f=1.3*m.width,g=1.3*m.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/c,y=p/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=iw(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function gw(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var mw=2*Math.PI,vw=gl.CMD,yw=["top","right","bottom","left"];function _w(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function xw(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(i-r)%mw<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=i;i=xl(r),r=xl(d)}else i=xl(i),r=xl(r);i>r&&(r+=mw);var p=Math.atan2(s,a);if(p<0&&(p+=mw),p>=i&&p<=r||p+mw>=i&&p+mw<=r)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,m=n*Math.cos(r)+t,v=n*Math.sin(r)+e,y=(f-a)*(f-a)+(g-s)*(g-s),_=(m-a)*(m-a)+(v-s)*(v-s);return y<_?(l[0]=f,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(_))}function bw(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,c=n-t,h=i-e,d=Math.sqrt(c*c+h*h),p=(l*(c/=d)+u*(h/=d))/d;s&&(p=Math.min(Math.max(p,0),1)),p*=d;var f=a[0]=t+p*c,g=a[1]=e+p*h;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function ww(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var Sw=[];function Aw(t,e,n){var i=ww(e.x,e.y,e.width,e.height,t.x,t.y,Sw);return n.set(Sw[0],Sw[1]),i}function Tw(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,d=t.y,p=0;p0){e=e/180*Math.PI,Mw.fromArray(t[0]),Iw.fromArray(t[1]),Cw.fromArray(t[2]),Fn.sub(Dw,Mw,Iw),Fn.sub(Ew,Cw,Iw);var n=Dw.len(),i=Ew.len();if(!(n<.001||i<.001)){Dw.scale(1/n),Ew.scale(1/i);var r=Dw.dot(Ew);if(Math.cos(e)1&&Fn.copy(Rw,Cw),Rw.toArray(t[1])}}}}function kw(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,Mw.fromArray(t[0]),Iw.fromArray(t[1]),Cw.fromArray(t[2]),Fn.sub(Dw,Iw,Mw),Fn.sub(Ew,Cw,Iw);var i=Dw.len(),r=Ew.len();if(!(i<.001||r<.001))if(Dw.scale(1/i),Ew.scale(1/r),Dw.dot(e)=a)Fn.copy(Rw,Cw);else{Rw.scaleAndAdd(Ew,o/Math.tan(Math.PI/2-s));var l=Cw.x!==Iw.x?(Rw.x-Iw.x)/(Cw.x-Iw.x):(Rw.y-Iw.y)/(Cw.y-Iw.y);if(isNaN(l))return;l<0?Fn.copy(Rw,Iw):l>1&&Fn.copy(Rw,Cw)}Rw.toArray(t[1])}}}function Ow(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Bw(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=$e(i[0],i[1]),o=$e(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=en([],i[1],i[0],a/r),l=en([],i[1],i[2],a/o),u=en([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&x(-c/a,0,a);var f,g,m=t[0],v=t[a-1];return y(),f<0&&b(-f,.8),g<0&&b(g,.8),y(),_(f,g,1),_(g,f,-1),y(),f<0&&w(-f),g<0&&w(g),u}function y(){f=m.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(o[l-1]*h),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function Uw(t,e,n,i){return Gw(t,"y","height",e,n,i)}function Hw(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Zn(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(p.oldLayoutSelect),te(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Lh(n,s,e,a)}else if(n.attr(s),!Sd(n).valueAnimation){var c=Se(n.style.opacity,1);n.style.opacity=0,Ph(n,{style:{opacity:c}},e,a)}if(p.oldLayout=s,n.states.select){var h=p.oldLayoutSelect={};qw(h,s,Jw),qw(h,n.states.select,Jw)}if(n.states.emphasis){var d=p.oldLayoutEmphasis={};qw(d,s,Jw),qw(d,n.states.emphasis,Jw)}Td(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(p=Qw(i)).oldLayout;var p,f={points:i.shape.points};r?(i.attr({shape:r}),Lh(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Ph(i,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}(),$w=Ua();function tS(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=$w(e).labelManager;i||(i=$w(e).labelManager=new Kw),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=$w(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}var eS=Math.sin,nS=Math.cos,iS=Math.PI,rS=2*Math.PI,oS=180/iS,aS=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,c=Math.abs(l),h=wr(c-rS)||(u?l>=rS:-l>=rS),d=l>0?l%rS:l%rS+rS,p=!1;p=!!h||!wr(c)&&d>=iS==!!u;var f=t+n*nS(o),g=e+i*eS(o);this._start&&this._add("M",f,g);var m=Math.round(r*oS);if(h){var v=1/this._p,y=(u?1:-1)*(rS-v);this._add("A",n,i,m,1,+u,t+n*nS(o+y),e+i*eS(o+y)),v>.01&&this._add("A",n,i,m,0,+u,f,g)}else{var _=t+n*nS(a),x=e+i*eS(a);this._add("A",n,i,m,+p,+u,_,x)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],c=this._p,h=1;h"}(r,o)+("style"!==r?yn(a):a||"")+(i?""+n+oe(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function xS(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function bS(t,e,n,i){return yS("svg","root",{width:t,height:e,xmlns:dS,"xmlns:xlink":pS,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var wS=0;function SS(){return wS++}var AS={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},TS="transform-origin";function MS(t,e,n){var i=Kt({},t.shape);Kt(i,e),t.buildPath(n,i);var r=new aS;return r.reset(Pr(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function IS(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[TS]=n+"px "+i+"px")}var CS={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function DS(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function ES(t){return pe(t)?AS[t]?"cubic-bezier("+AS[t]+")":ji(t)?t:"":""}function LS(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof fh){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(re(o,(function(t){var e=xS(n.zrId);e.animation=!0,LS(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=le(o),u=l.length;if(u){var c=o[r=l[u-1]];for(var h in c){var d=c[h];a[h]=a[h]||{d:""},a[h].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=DS(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return DS(c,n)+" "+r[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+SS();n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}function PS(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+SS(),n.cssStyleCache[r]=o,n.cssNodes["."+o+":hover"]=t),e.class=e.class?e.class+" "+o:o}var RS=Math.round;function NS(t){return t&&pe(t.src)}function kS(t){return t&&de(t.toDataURL)}function OS(t,e,n,i){hS((function(r,o){var a="fill"===r||"stroke"===r;a&&Er(o)?YS(e,t,r,i):a&&Ir(o)?ZS(n,t,r,i):t[r]=a&&"none"===o?"transparent":o}),e,n,!1),function(t,e,n){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var r=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[r];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=i.shadowOffsetX||0,h=i.shadowOffsetY||0,d=i.shadowBlur,p=xr(i.shadowColor),f=p.opacity,g=p.color,m=d/2/l+" "+d/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=yS("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yS("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[r]=a}e.filter=Lr(a)}}(n,t,i)}function BS(t,e){var n=function(t){if("function"==typeof $o)return $o(t)}(e);n&&(n.each((function(e,n){null!=e&&(t[(mS+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[mS+"silent"]="true"))}function zS(t){return wr(t[0]-1)&&wr(t[1])&&wr(t[2])&&wr(t[3]-1)}function FS(t,e,n){if(e&&(!function(t){return wr(t[4])&&wr(t[5])}(e)||!zS(e))){var i=1e4;t.transform=zS(e)?"translate("+RS(e[4]*i)/i+" "+RS(e[5]*i)/i+")":function(t){return"matrix("+Sr(t[0])+","+Sr(t[1])+","+Sr(t[2])+","+Sr(t[3])+","+Ar(t[4])+","+Ar(t[5])+")"}(e)}}function VS(t,e,n){for(var i=t.points,r=[],o=0;o=0&&a||o;s&&(r=yr(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};r&&(u.fill=r),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),PS(u,e,n)}}(t,o,e),yS(s,t.id+"",o)}function jS(t,e){return t instanceof Ol?XS(t,e):t instanceof Gl?function(t,e){var n=t.style,i=n.image;if(i&&!pe(i)&&(NS(i)?i=i.src:kS(i)&&(i=i.toDataURL())),i){var r=n.x||0,o=n.y||0,a={href:i,width:n.width,height:n.height};return r&&(a.x=r),o&&(a.y=o),FS(a,t.transform),OS(a,n,t,e),BS(a,t),e.animation&&LS(t,a,e),yS("image",t.id+"",a)}}(t,e):t instanceof zl?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var r=n.font||Et,o=n.x||0,a=function(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}(n.y||0,Bo(r),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Tr[n.textAlign]||n.textAlign};if(iu(n)){var l="",u=n.fontStyle,c=eu(n.fontSize);if(!parseFloat(c))return;var h=n.fontFamily||Dt,d=n.fontWeight;l+="font-size:"+c+";font-family:"+h+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),d&&"normal"!==d&&(l+="font-weight:"+d+";"),s.style=l}else s.style="font: "+r;return i.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),FS(s,t.transform),OS(s,n,t,e),BS(s,t),e.animation&&LS(t,s,e),yS("text",t.id+"",s,void 0,i)}}(t,e):void 0}function YS(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Cr(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Dr(o))return;r="radialGradient",a.cx=Se(o.x,.5),a.cy=Se(o.y,.5),a.r=Se(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;ul?hA(t,null==n[h+1]?null:n[h+1].elm,n,s,h):dA(t,e,a,l))}(n,i,r):sA(r)?(sA(t.text)&&nA(n,""),hA(n,null,r,0,r.length-1)):sA(i)?dA(n,i,0,i.length-1):sA(t.text)&&nA(n,""):t.text!==e.text&&(sA(i)&&dA(n,i,0,i.length-1),nA(n,e.text)))}var gA=0,mA=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=n=Kt({},n),this.root=t,this._id="zr"+gA++,this._oldVNode=bS(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=vS("svg");pA(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(uA(t,e))fA(t,e);else{var n=t.elm,i=tA(n);cA(e),null!==i&&(JS(i,e.elm,eA(n)),dA(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return jS(t,xS(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=xS(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=yS("rect","bg",{width:t,height:e,x:"0",y:"0"}),Er(n))YS({fill:n},r.attrs,"fill",i);else if(Ir(n))ZS({style:{fill:n},dirty:Ve,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=xr(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=yS("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=oe(le(r.defs),(function(t){return r.defs[t]}));if(l.length&&o.push(yS("defs","defs",{},l)),t.animation){var u=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=oe(le(t),(function(e){return e+r+oe(le(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=oe(le(e),(function(t){return"@keyframes "+t+r+oe(le(e[t]),(function(n){return n+r+oe(le(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var c=yS("style","stl",{},[],u);o.push(c)}}return bS(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},_S(this.renderToVNode({animation:Se(t.cssAnimation,!0),emphasis:Se(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Se(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!h||!r||h[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&h.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?bA:0),this._needsManuallyCompositing),u.__builtin__||Zt("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),s.__dirty&pi&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),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)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,re(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?qt(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Em);function TA(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Ig(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var IA=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return Tt(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=ty(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=CA,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Hu(this.childAt(0))},e.prototype.downplay=function(){Wu(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,c)}else{(d=this.childAt(0)).silent=!1;var h={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(h):Lh(d,h,a,n),Bh(d)}if(this._updateCommon(t,n,s,i,r),l){var d=this.childAt(0);if(!u){h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Ph(d,h,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,c,h,d,p,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,h=i.labelStatesModels,d=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),h=gd(m),d=v.getShallow("scale"),p=m.getShallow("cursor")}var y=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var _=ny(t.getItemVisual(e,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),p&&f.attr("cursor",p);var x=t.getItemVisual(e,"style"),b=x.fill;if(f instanceof Gl){var w=f.style;f.useStyle(Kt({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},x))}else f.__isEmptyBrush?f.useStyle(Kt({},x)):f.useStyle(x),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),A=this._z2;null!=S?null==A&&(this._z2=f.z2,f.z2+=S):null!=A&&(f.z2=A,this._z2=null);var T=r&&r.useNameLabel;fd(f,h,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return T?t.getName(e):TA(t,e)},inheritColor:b,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var I=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;M.scaleX=this._sizeX*I,M.scaleY=this._sizeY*I,this.setSymbolScale(1),ic(this,l,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=cu(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&Nh(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Nh(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return ey(t.getItemVisual(e,"symbolSize"))},e}(qo);function CA(t,e){this.parent.drift(t,e)}function DA(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function EA(t){return null==t||me(t)||(t={isIgnore:t}),t||{}}function LA(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:gd(e),cursorStyle:e.get("cursor")}}var PA=function(){function t(t){this.group=new qo,this._SymbolCtor=t||IA}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=EA(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=LA(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(DA(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,h){var d=r.getItemGraphicEl(h),p=u(c);if(DA(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),(d=new o(t,c,s,l)).setPosition(p);else{d.updateData(t,c,s,l);var m={x:p[0],y:p[1]};a?d.attr(m):Lh(d,m,i)}n.add(d),t.setItemGraphicEl(c,d)}else n.remove(d)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=LA(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=EA(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),c="x"===s||"radius"===s?1:0,h=oe(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,p=e.getCalculationInfo("stackResultDimension");return Ex(e,h[0])&&(d=!0,h[0]=p),Ex(e,h[1])&&(d=!0,h[1]=p),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function NA(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var kA=Math.min,OA=Math.max;function BA(t,e){return isNaN(t)||isNaN(e)}function zA(t,e,n,i,r,o,a,s,l){for(var u,c,h,d,p,f,g=n,m=0;m=r||g<0)break;if(BA(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),h=v,d=y;else{var _=v-u,x=y-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===y&&m=i||BA(w,S))p=v,f=y;else{M=w-u,I=S-c;var E=v-u,L=w-v,P=y-c,R=S-y,N=void 0,k=void 0;if("x"===s){var O=M>0?1:-1;p=v-O*(N=Math.abs(E))*a,f=y,C=v+O*(k=Math.abs(L))*a,D=y}else if("y"===s){var B=I>0?1:-1;p=v,f=y-B*(N=Math.abs(P))*a,C=v,D=y+B*(k=Math.abs(R))*a}else N=Math.sqrt(E*E+P*P),p=v-M*a*(1-(T=(k=Math.sqrt(L*L+R*R))/(k+N))),f=y-I*a*(1-T),D=y+I*a*T,C=kA(C=v+M*a*T,OA(w,v)),D=kA(D,OA(S,y)),C=OA(C,kA(w,v)),f=y-(I=(D=OA(D,kA(S,y)))-y)*N/k,p=kA(p=v-(M=C-v)*N/k,OA(u,v)),f=kA(f,OA(c,y)),C=v+(M=v-(p=OA(p,kA(u,v))))*k/N,D=y+(I=y-(f=OA(f,kA(c,y))))*k/N}t.bezierCurveTo(h,d,p,f,v,y),h=C,d=D}else t.lineTo(v,y)}u=v,c=y,g+=o}return m}var FA=function(){this.smooth=0,this.smoothConstraint=!0},VA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return Tt(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new FA},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&BA(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(c-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],h=r[l++],d=r[l++],p=r[l++],f=r[l++];var v=a?Ni(n,u,h,p,t,s):Ni(i,c,d,f,t,s);if(v>0)for(var y=0;y=0){m=a?Pi(i,c,d,f,_):Pi(n,u,h,p,_);return a?[t,m]:[m,t]}}n=p,i=f}}},e}(Ol),GA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e}(FA),UA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new GA},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&BA(n[2*o-2],n[2*o-1]);o--);for(;r=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=ur(e[r]),s=ur(e[o]),l=i-r,u=gr([Ki(ir(a[0],s[0],l)),Ki(ir(a[1],s[1],l)),Ki(ir(a[2],s[2],l)),$i(ir(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}function $A(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return re(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function tT(t,e){return[t[2*e],t[2*e+1]]}function eT(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<_u.length;e++)if(t.get([_u[e],"endLabel","show"]))return!0;return!1}function nT(t,e,n,i){if(jA(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=eT(i)?function(n,i){t._endLabelOnDuring(n,i,a,s,o,r,e)}:null,u=e.getBaseAxis().isHorizontal(),c=HA(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})}),l);if(!i.get("clip",!0)){var h=c.shape,d=Math.max(h.width,h.height);u?(h.y-=d,h.height+=2*d):(h.x-=d,h.width+=2*d)}return l&&l(1,c),c}return WA(e,n,i)}var iT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.init=function(){var t=new qo,e=new PA;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===r.type,h=this._coordSys,d=this._symbolDraw,p=this._polyline,f=this._polygon,g=this._lineGroup,m=!e.ssr&&t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),_=RA(r,a,y),x=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=qx(2*i),o=0;o=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=oe(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),c=u.length,h=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=KA(u,"x"===r?n.getWidth():n.getHeight()),p=d.length;if(!p&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,m=g-f;if(m<.001)return"transparent";re(d,(function(t){t.offset=(t.coord-f)/m})),d.push({offset:p?d[p-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:h[0]||"transparent"});var v=new mh(0,0,0,0,d,!0);return v[r]=f,v[r+"2"]=g,v}}}(a,r,n)||a.getVisual("style")[a.getVisual("drawType")];if(p&&h.type===r.type&&M===this._step){v&&!f?f=this._newPolygon(u,x):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,Np(I));var C=g.getClipPath();if(C)Ph(C,{shape:nT(this,r,!1,t).shape},t);else g.setClipPath(nT(this,r,!0,t));b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),YA(this._stackedOnPoints,x)&&YA(this._points,u)||(m?this._doUpdateAnimation(a,x,r,n,M,y,w):(M&&(u=JA(u,r,M,w),x&&(x=JA(x,r,M,w))),p.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))}else b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,r,T),M&&(u=JA(u,r,M,w),x&&(x=JA(x,r,M,w))),p=this._newPolyline(u),v?f=this._newPolygon(u,x):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,Np(I)),g.setClipPath(nT(this,r,!0,t));var D=t.getModel("emphasis"),E=D.get("focus"),L=D.get("blurScope"),P=D.get("disabled");(p.useStyle($t(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),sc(p,t,"lineStyle"),p.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);cu(p).seriesIndex=t.seriesIndex,ic(p,E,L,P);var R=qA(t.get("smooth")),N=t.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var k=a.getCalculationInfo("stackedOnSeries"),O=0;f.useStyle($t(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),k&&(O=qA(k.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:O,smoothMonotone:N,connectNulls:w}),sc(f,t,"areaStyle"),cu(f).seriesIndex=t.seriesIndex,ic(f,E,L,P)}var B=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=M,this._valueOrigin=y,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){cu(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Ga(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,h=t.get("z")||0;(s=new IA(r,o)).x=l,s.y=u,s.setZ(c,h);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=h,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Um.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Ga(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Um.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;zu(this._polyline,t),e&&zu(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new VA({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new UA({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");de(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=de(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],d=void 0,p=void 0,f=void 0;if(n)if(r){var g=n,m=e.pointToCoord(h);i?(d=g.startAngle,p=g.endAngle,f=-m[1]/180*Math.PI):(d=g.r0,p=g.r,f=m[0])}else{var v=n;i?(d=v.x,p=v.x+v.width,f=t.x):(d=v.y+v.height,p=v.y,f=t.y)}var y=p===d?0:(f-d)/(p-d);a&&(y=1-y);var _=de(u)?u(o):l*y+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(eT(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Jl({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(fd(o,gd(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?MA(r,n):TA(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),S=w.range,A=S[1]-S[0],T=void 0;if(A>=1){if(A>1&&!h){var M=tT(u,S[0]);s.attr({x:M[0]+_,y:M[1]+x}),r&&(T=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+_,y:M[1]+x});var I=c.getRawValue(S[0]),C=c.getRawValue(S[1]);r&&(T=Ja(n,d,I,C,w.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0;M=tT(u,D);r&&(T=c.getRawValue(D)),s.attr({x:M[0]+_,y:M[1]+x})}if(r){var E=Sd(s);"function"==typeof E.setLabelText&&E.setLabelText(T)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,i,r,o,a){for(var s=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),l=[],u=[],c=[],h=[],d=[],p=[],f=[],g=RA(r,e,a),m=t.getLayout("points")||[],v=e.getLayout("points")||[],y=0;y3e3||l&&QA(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),Lh(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),Lh(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne&&(e=o,n=r)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},aT=function(t){return Math.round(t.length/2)};function sT(t){return{seriesType:t,reset:function(t,e,n){var i=t.getData(),r=t.get("sampling"),o=t.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),d=Math.round(a/h);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;pe(r)?p=oT[r]:de(r)&&(p=r),p&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,p,aT))}}}}}var lT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.getInitialData=function(t,e){return Px(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)re(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,h=1,d=0;ds){c=(p+u)/2;break}1===d&&(h=f-i[0].tickValue)}null==c&&(u?u&&(c=i[i.length-1].coord):c=i[0].coord),o[n]=t.toGlobalCoord(c)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Em);Em.registerClass(lT);var uT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.getInitialData=function(){return Px(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Gd(lT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(lT),cT=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},hT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new cT},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=2*Math.PI,d=c?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Oh(e,t,cu(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Um),yT={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=gT(e.x,t.x),s=mT(e.x+e.width,r),l=gT(e.y,t.y),u=mT(e.y+e.height,o),c=sr?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=mT(e.r,t.r),o=gT(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},_T={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new Zl({shape:Kt({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?hT:qc,c=new u({shape:i,z2:1});c.name="item";var h,d,p=MT(r);if(c.calculateTextPosition=(h=p,d=({isRoundCap:u===hT}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Fo(t,e,n);var r=h(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(u-c)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(r){case"startArc":x=s+(c-o)*y(m),b=l+(c-o)*_(m),w="center",S="top";break;case"insideStartArc":x=s+(c+o)*y(m),b=l+(c+o)*_(m),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+dT(f,o+v,!1),b=l+p*_(f)+pT(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+dT(f,-o+v,!1),b=l+p*_(f)+pT(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*y(m),b=l+p*_(m),w="center",S="middle";break;case"endArc":x=s+(u+o)*y(m),b=l+(u+o)*_(m),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*y(m),b=l+(u-o)*_(m),w="center",S="top";break;case"endAngle":x=s+p*y(g)+dT(g,o+v,!0),b=l+p*_(g)+pT(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(g)+dT(g,-o+v,!0),b=l+p*_(g)+pT(g,-o+v,!0),w="right",S="middle";break;default:return Fo(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};c.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?Lh:Ph)(c,{shape:g},o)}return c}};function xT(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?Lh:Ph)(n,{shape:l},e,r,null),(a?Lh:Ph)(n,{shape:u},e?t.baseAxis.model:null,r)}function bT(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function MT(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function IT(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;Kt(u,fT(i.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var c=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",c)}t.useStyle(l);var h=i.getShallow("cursor");h&&t.attr("cursor",h);var d=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",p=gd(i);fd(t,p,{labelFetcher:o,labelDataIndex:n,defaultText:TA(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var f=t.getTextContent();if(s&&f){var g=i.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,i){if(ge(i))t.setTextConfig({rotation:i});else if(he(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var c=1.5*Math.PI-r;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}(t,"outside"===g?d:g,MT(a),i.get(["label","rotate"]))}Ad(f,p,o.getRawValue(n),(function(t){return MA(e,t)}));var m=i.getModel(["emphasis"]);ic(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),sc(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",re(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var CT=function(){return function(){}}(),DT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new CT},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);cu(this).dataIndex=e>=0?e:null}),30,!1);function PT(t,e,n){if(jA(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var RT=2*Math.PI,NT=Math.PI/180;function kT(t,e){return Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function OT(t,e){var n=kT(t,e),i=t.get("center"),r=t.get("radius");he(r)||(r=[0,r]);var o,a,s=oa(n.width,e.getWidth()),l=oa(n.height,e.getHeight()),u=Math.min(s,l),c=oa(r[0],u/2),h=oa(r[1],u/2),d=t.coordinateSystem;if(d){var p=d.dataToPoint(i);o=p[0]||0,a=p[1]||0}else he(i)||(i=[i,i]),o=oa(i[0],s)+n.x,a=oa(i[1],l)+n.y;return{cx:o,cy:a,r0:c,r:h}}function BT(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=kT(t,n),o=OT(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-t.get("startAngle")*NT,h=t.get("endAngle"),d=t.get("padAngle")*NT;h="auto"===h?c-RT:-h*NT;var p=t.get("minAngle")*NT+d,f=0;e.each(i,(function(t){!isNaN(t)&&f++}));var g=e.getSum(i),m=Math.PI/(g||f)*2,v=t.get("clockwise"),y=t.get("roseType"),_=t.get("stillShowZeroSum"),x=e.getDataExtent(i);x[0]=0;var b=v?1:-1,w=[c,h],S=b*d/2;fl(w,!v),c=w[0],h=w[1];var A=zT(t);A.startAngle=c,A.endAngle=h,A.clockwise=v;var T=Math.abs(h-c),M=T,I=0,C=c;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(i="area"!==y?0===g&&_?m:t*m:T/f)i?c=o=C+b*i/2:(o=C+S,c=r-S),e.setItemLayout(n,{angle:i,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?ra(t,x,[u,l]):l}),C=r}})),Mn?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(h)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-h)/2}}}function HT(t){return"center"===t.position}function WT(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*VT,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,h=s.y,d=s.height;function p(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),h=s.shape,d=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),m=g.getModel("label"),v=m.get("position")||g.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),_=m.get("alignTo"),x=oa(m.get("edgeDistance"),u),b=m.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=oa(S,u);var A=w.get("length2");if(A=oa(A,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":E>0?"left":"right"}var z=Math.PI,F=0,V=m.get("rotate");if(ge(V))F=V*(z/180);else if("center"===v)F=0;else if("radial"===V||!0===V){F=E<0?-D+z:-D}else if("tangential"===V&&"outside"!==v&&"outer"!==v){var G=Math.atan2(E,L);G<0&&(G=2*z+G),L>0&&(G=z+G),F=G-z}if(o=!!F,d.x=T,d.y=M,d.rotation=F,d.setStyle({verticalAlign:"middle"}),P){d.setStyle({align:C});var U=d.states.select;U&&(U.x+=d.x,U.y+=d.y)}else{var H=d.getBoundingRect().clone();H.applyTransform(d.getComputedTransform());var W=(d.style.margin||0)+2.1;H.y-=W/2,H.height+=W,r.push({label:d,labelLine:f,position:v,len:S,len2:A,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new Fn(E,L),linePoints:I,textAlign:C,labelDistance:y,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:H,unconstrainedWidth:H.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Um);function YT(t,e,n){e=he(e)&&{coordDimensions:e}||Kt({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=Ax(i,e).dimensions,o=new bx(r,t);return o.initData(i,n),o}var ZT=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),QT=Ua(),qT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZT(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return YT(this,{coordDimensions:["value"],encodeDefaulter:ce(hf,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=QT(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),r=i.seats=function(t,e){var n=ae(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var i=Math.pow(10,e),r=oe(t,(function(t){return(isNaN(t)?0:t)/n*i*100})),o=100*i,a=oe(r,(function(t){return Math.floor(t)})),s=ae(a,(function(t,e){return t+e}),0),l=oe(r,(function(t,e){return t-a[e]}));su&&(u=l[h],c=h);++a[c],l[c]=0,++s}return oe(a,(function(t){return t/i}))}(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){La(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Em);var JT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return Tt(e,t),e.prototype.getInitialData=function(t,e){return Px(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Em),KT=function(){},$T=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new KT},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),eM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=rT("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new tM:new PA,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Um),nM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Zp),iM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ja).models[0]},e.type="cartesian2dAxis",e}(Zp);ne(iM,Fb);var rM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},oM=qt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},rM),aM=qt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},rM),sM={category:oM,value:aM,time:qt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},aM),log:$t({logBase:10},aM)},lM={value:1,category:1,time:1,log:1};function uM(t,e,n,i){re(lM,(function(r,o){var a=qt(qt({},sM[o],!0),i,!0),s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return Tt(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=Hp(this),i=n?Xp(t):{};qt(t,e.getTheme().get(o+"Axis")),qt(t,this.getDefaultOption()),t.type=cM(t),n&&Wp(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=kx.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(e+"Axis",cM)}function cM(t){return t.type||(t.data?"category":"value")}var hM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return oe(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),se(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),dM=["x","y"];function pM(t){return"interval"===t.type||"time"===t.type}var fM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=dM,e}return Tt(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(pM(t)&&pM(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,h=r[1]-i[0]*u,d=this._transform=[l,0,0,u,c,h];this._invTransform=zn([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new Zn(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return nn(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return nn(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new Zn(i,r,o,a)},e}(hM),gM=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return Tt(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.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},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(fw);function mM(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[d[l]]:h[0],"x"===u?f[d[l]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[d[s]]-f[d.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),we(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function vM(t){return"cartesian2d"===t.get("coordinateSystem")}function yM(t){var e={xAxisModel:null,yAxisModel:null};return re(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,ja).models[0];e[i]=o})),e}var _M=Math.log;function xM(t,e,n){var i=Yx.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=Eb(t,e),u=l.extent,c=l.fixMin,h=l.fixMax;if("log"===t.type){var d=_M(t.base);u=[_M(u[0])/d,_M(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var p=i.getExtent.call(t);c&&(u[0]=p[0]),h&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],m=u[1];if(c&&h)f=(m-g)/a;else if(c)for(m=u[0]+f*a;mu[0]&&isFinite(g)&&isFinite(u[0]);)f=Fx(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Fx(f));var v=f*a;(g=aa((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=aa(v)):m>0&&u[1]<=0&&(m=0,g=-aa(v))}var y=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,m+f*_),i.setInterval.call(t,f),(y||_)&&i.setNiceExtent.call(t,g+f,m-f)}var bM=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dM,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=le(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;Bx(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(Lb(l,s),Bx(l)&&(e=a))}r.length&&(e||Lb((e=r.pop()).scale,e.model),re(r,(function(t){xM(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};re(n.x,(function(t){SM(n,"y",t,r)})),re(n.y,(function(t){SM(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=Gp(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){re(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(re(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Xx?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=Rb(t),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;c0&&i>0||n<0&&i<0)}(t)}var TM=Math.PI,MM=function(){function t(t,e){this.group=new qo,this.opt=e,this.axisModel=t,$t(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new qo({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!IM[t]},t.prototype.add=function(t){IM[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=pa(e-t);return fa(o)?(r=n>0?"top":"bottom",i="center"):fa(o-TM)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),IM={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(nn(s,s,a),nn(l,l,a));var c=Kt({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ah({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Qh(h.shape,h.style.lineWidth),h.anid="line",n.add(h);var d=e.get(["axisLine","symbol"]);if(null!=d){var p=e.get(["axisLine","symbolSize"]);pe(d)&&(d=[d,d]),(pe(p)||ge(p))&&(p=[p,p]);var f=ny(e.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];re([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==d[i]&&null!=d[i]){var r=ty(d[i],-g/2,-m/2,g,m,c.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=LM(r.getTicksCoords(),e.transform,l,$t(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;ch[1]?-1:1,p=["start"===s?h[0]-d*c:"end"===s?h[1]+d*c:(h[0]+h[1])/2,EM(s)?t.labelOffset+l*c:0],f=e.get("nameRotate");null!=f&&(f=f*TM/180),EM(s)?o=MM.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=pa(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;fa(a-TM/2)?(o=l?"bottom":"top",r="center"):fa(a-1.5*TM)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*TM&&a>TM/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,y=we(t.nameTruncateMaxWidth,m.maxWidth,a),_=new Jl({x:p[0],y:p[1],rotation:o.rotation,silent:MM.isLabelSilent(e),style:md(u,{text:r,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(sd({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var x=MM.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,cu(_).eventData=x}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function CM(t){t&&(t.ignore=!0)}function DM(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Pn([]);return On(r,r,-t.rotation),n.applyTransform(Nn([],r,t.getLocalTransform())),i.applyTransform(Nn([],r,e.getLocalTransform())),n.intersect(i)}}function EM(t){return"middle"===t||"center"===t}function LM(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function NM(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[OM(t)]}function kM(t){return!!t.get(["handle","show"])}function OM(t){return t.type+"||"+t.id}var BM={},zM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(e,n,i,r){this.axisPointerClass&&function(t){var e=NM(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=kM(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!h.min?h.min=0:null!=h.min&&h.min<0&&!h.max&&(h.max=0);var d=a;null!=h.color&&(d=$t({color:h.color},a));var p=qt(Qt(h),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:h.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:c},!1);if(pe(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else de(l)&&(p.name=l(p.name,p));var g=new zd(p,null,this.ecModel);return ne(g,Fb.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:qt({lineStyle:{color:"#bbb"}},iI.axisLine),axisLabel:rI(iI.axisLabel,!1),axisTick:rI(iI.axisTick,!1),splitLine:rI(iI.splitLine,!0),splitArea:rI(iI.splitArea,!0),indicator:[]},e}(Zp),aI=["axisLine","axisTickLabel","axisName"],sI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;re(oe(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new MM(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){re(aI,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),c=a.get("color"),h=s.get("color"),d=he(c)?c:[c],p=he(h)?h:[h],f=[],g=[];if("circle"===i)for(var m=n[0].getTicksCoords(),v=e.cx,y=e.cy,_=0;_3?1.4:r>1?1.2:1.1;gI(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);gI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){dI(this._zr,"globalPan")||gI(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(ln);function gI(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(In(i.event),mI(t,e,n,i,r))}function mI(t,e,n,i,r){r.isAvailableBehavior=ue(vI,null,n,i),t.trigger(e,r)}function vI(t,e,n){var i=n[t];return!t||i&&(!pe(i)||e.event[i+"Key"])}function yI(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function _I(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var xI,bI={axisPointer:1,tooltip:1,brush:1};function wI(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!bI.hasOwnProperty(i.mainType)&&r&&r.model!==n}function SI(t){pe(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var AI={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},TI=le(AI),MI={"alignment-baseline":"textBaseline","stop-color":"stopColor"},II=le(MI),CI=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=SI(t);this._defsUsePending=[];var i=new qo;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),NI(n,i,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,i,r,null,!1,!1),c=c.nextSibling;if(function(t,e){for(var n=0;n=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!=s&&(u=HI(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=i;(i=new qo).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new Zl({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=xI[s];if(u&&Fe(xI,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(h),"g"===s&&(l=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=DI[s];if(d&&Fe(DI,s)){var p=d.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new zl({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});PI(e,n),NI(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(xI={g:function(t,e){var n=new qo;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Zl;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Rc;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new ah;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new kc;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=RI(i));var r=new eh({shape:{points:n||[]},silent:!0});return PI(e,r),NI(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=RI(i));var r=new ih({shape:{points:n||[]},silent:!0});return PI(e,r),NI(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new Gl;return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new qo;return PI(e,a),NI(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new qo;return PI(e,a),NI(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=Ec(t.getAttribute("d")||"");return PI(e,n),NI(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),DI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new mh(e,n,i,r);return EI(t,o),LI(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new yh(e,n,i);return EI(t,r),LI(t,r),r}};function EI(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function LI(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};UI(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function PI(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),$t(e.__inheritedStyle,t.__inheritedStyle))}function RI(t){for(var e=zI(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=zI(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":kn(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Bn(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":On(r,r,-parseFloat(l[0])*VI,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":Nn(r,[1,0,Math.tan(parseFloat(l[0])*VI),1,0,0],r);break;case"skewY":Nn(r,[1,Math.tan(parseFloat(l[0])*VI),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),UI(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:h};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=ke(),n=ke(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function c(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;fd(e,gd(i),{labelFetcher:d,labelDataIndex:h,defaultText:n},p);var f=e.getTextContent();if(f&&(lC(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function fC(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):cu(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function gC(t,e,n,i,r){t.data||sd({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function mC(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return ic(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var i=cu(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}function vC(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),re(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Em);function xC(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),re(e,(function(t,e){for(var n,i,r,o=(n=oe(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},re(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,c=0;c1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=h[1]-p.height/2,p.x=h[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Gp(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var LC=function(){function t(){this.dimensions=MC}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new DC(o+r,o,Kt({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=EC,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),re(r,(function(t,r){var o=oe(t,(function(t){return t.get("nameMap")})),a=new DC(r,r,Kt({nameMap:Jt(o)},i(t[0])));a.zoomLimit=we.apply(null,oe(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=EC,a.resize(t[0],e),re(t,(function(t){t.coordinateSystem=a,function(t,e){re(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=ke(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,h=s.hierNode.modifier;s=HC(s),o=WC(o),s&&o;){r=HC(r),a=WC(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+h-o.hierNode.prelim-u+i(s,o);d>0&&(jC(XC(s,t,n),t,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!HC(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),o&&!WC(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function VC(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function GC(t){return arguments.length?t:YC}function UC(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function HC(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function WC(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function XC(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function jC(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function YC(t,e){return t.parentNode===e.parentNode?1:2}var ZC=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),QC=function(t){function e(e){return t.call(this,e)||this}return Tt(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ZC},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=oa(e.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(a[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(o[0],o[1]),h[l]=o[l],t.lineTo(h[0],h[1]),h[l]=a[l],t.lineTo(h[0],h[1]),t.lineTo(a[0],a[1]);for(var d=1;dy.x)||(x-=Math.PI);var S=b?"left":"right",A=s.getModel("label"),T=A.get("rotate"),M=T*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:A.get("position")||S,rotation:null==T?-x:M,origin:"center"}),I.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),D="relative"===C?Oe(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===C?a.getAncestorsIndices():"descendant"===C?a.getDescendantIndices():null;D&&(cu(n).focus=D),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),d=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new ch({shape:nD(c,h,d,r,r)})),Lh(g,{shape:nD(c,h,d,o,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,v=[],y=0;ye&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(pe(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function gD(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function mD(t,e){return te(gD(t),e)>=0}function vD(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var yD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return Tt(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new zd(n,this,this.ecModel),r=pD.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return fm("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=vD(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Em);function _D(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function xD(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=GC((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=GC());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.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},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:a(u,c)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(c.getLayout().x+d+p),g=o/(h.depth-1||1),_D(l,(function(t){m=(t.getLayout().x+p)*f,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=o/(c.getLayout().x+d+p),f=r/(h.depth-1||1),_D(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(c.getLayout().x+d+p),g=o/(h.depth-1||1),_D(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function bD(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();Kt(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var wD=["treemapZoomToNode","treemapRender","treemapMove"];function SD(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=wf(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var AD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return Tt(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};TD(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new zd({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=Ea(e.get("color")),o=Ea(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],re(t,(function(t){var e=new zd(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=oe(i||[],(function(t){return new zd(t,o,e)}),this),s=pD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return fm("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=vD(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},Kt(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ke(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.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)},e.prototype.enableAriaDecal=function(){SD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Em);function TD(t){var e=0;re(t.children,(function(t){TD(t);var n=t.value;he(n)&&(n=n[0]),e+=n}));var n=t.value;he(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),he(t.value)?t.value[0]=n:t.value=n}var MD=function(){function t(t){this.group=new qo,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(t,c,a,s,l,u,i),Up(o,c.pos,c.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=za(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r,o,a){for(var s,l,u,c,h,d,p,f,g,m=0,v=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),_=(s=e.pos,l=e.box,c=l.width,h=l.height,d=oa(s.left,c),p=oa(s.top,h),f=oa(s.right,c),g=oa(s.bottom,h),(isNaN(d)||isNaN(parseFloat(s.left)))&&(d=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=h),u=Cp(u||0),{width:Math.max(f-d-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),x=e.totalWidth,b=e.renderList,w=i.getModel("itemStyle").getItemStyle(),S=b.length-1;S>=0;S--){var A=b[S],T=A.node,M=A.width,I=A.text;x>_.width&&(x-=M-v,M=v,I=null);var C=new eh({shape:{points:ID(m,0,M,y,S===b.length-1,0===S)},style:$t(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Jl({style:md(r,{text:I})}),textConfig:{position:"inside"},z2:1e4*bu,onclick:ce(a,T)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=md(o,{text:I}),C.ensureState("emphasis").style=w,ic(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),CD(C,t,T),m+=M+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function ID(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function CD(t,e,n){cu(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&vD(n,e)}}var DD=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a,s=new Zn(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var c=a.min||0,h=a.max||1/0;u=Math.max(Math.min(h,u),c)}var d=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];kn(f,f,[-(e-=p.x),-(n-=p.y)]),Bn(f,f,[d,d]),kn(f,f,[e,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&kp(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new MD(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(mD(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(Um);var GD=re,UD=me,HD=-1,WD=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=Qt(e);this.type=i,this.mappingMethod=n,this._normalizeData=tE[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(XD(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,re(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(GD(e,(function(t,e){n[t]=e})),!he(i)){var r=[];me(i)?GD(i,(function(t,e){var i=n[e];r[null!=i?i:HD]=t})):r[HD]=i,i=$D(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):XD(r,!0):(Ie("linear"!==n||r.dataExtent),XD(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return ue(this._normalizeData,this)},t.listVisualTypes=function(){return le(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){me(t)?re(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=he(e)?[]:me(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&GD(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(he(t))t=t.slice();else{if(!UD(t))return[];var e=[];GD(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:a.name,dataExtent:u,visual:a.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new WD(h);return nE(d).drColorMappingBy=c,d}(0,r,o,0,u,p);re(p,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=Kt({},e);if(r){var s=r.type,l="color"===s&&nE(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);rE(t,o,n,i)}}))}else s=oE(u),c.fill=s}}function oE(t){var e=aE(t,"color");if(e){var n=aE(t,"colorAlpha"),i=aE(t,"colorSaturation");return i&&(e=pr(e,null,null,i)),n&&(e=fr(e,n)),e}}function aE(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function sE(t,e){var n=t.get(e);return he(n)&&n.length?{name:e,range:n}:null}var lE=Math.max,uE=Math.min,cE=we,hE=re,dE=["itemStyle","borderWidth"],pE=["itemStyle","gapWidth"],fE=["upperLabel","show"],gE=["upperLabel","height"],mE={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Gp(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=oa(cE(s.width,l[0]),r),c=oa(cE(s.height,l[1]),o),h=i&&i.type,d=fD(i,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===h||"treemapMove"===h?i.rootRect:null,f=t.getViewRoot(),g=gD(f);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var c=0,h=o.children,d=0,p=h.length;dda&&(u=da),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?lE(u*i/l,l/(u*r)):1/0}function _E(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=t.length;hi&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],h=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+w,h=v[0]<0?"right":"left",i.originX=-f*x,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+w,h="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+w,h=v[0]>=0?"right":"left",i.originX=f*x,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||h})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(qo),aL=function(){function t(t){this.group=new qo,this._LineCtor=t||oL}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=sL(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=sL(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function vL(t,e){var n=[],i=Ui,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[We(l[0]),We(l[1])],l[2]&&l.__original.push(We(l[2])));var h=l.__original;if(null!=l[2]){if(He(r[0],h[0]),He(r[1],h[2]),He(r[2],h[1]),u&&"none"!==u){var d=FE(t.node1),p=mL(r,h[0],d*e);i(r[0][0],r[1][0],r[2][0],p,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],p,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){d=FE(t.node2),p=mL(r,h[1],d*e);i(r[0][0],r[1][0],r[2][0],p,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],p,n),r[1][1]=n[1],r[2][1]=n[2]}He(l[0],r[0]),He(l[1],r[2]),He(l[2],r[1])}else{if(He(o[0],h[0]),He(o[1],h[1]),Ze(a,o[1],o[0]),Je(a,a),u&&"none"!==u){d=FE(t.node1);Ye(o[0],o[0],a,d*e)}if(c&&"none"!==c){d=FE(t.node2);Ye(o[1],o[1],a,-d*e)}He(l[0],o[0]),He(l[1],o[1])}}))}function yL(t){return"view"===t.type}var _L=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(t,e){var n=new PA,i=new aL,r=this.group;this._controller=new fI(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(yL(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Lh(s,l,t)}vL(t.getGraph(),zE(t));var u=t.getData();o.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,r=e.getGraphicEl(),o=e.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",(function(o){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),e.setLayout({fixed:!0},!0),UE(t,"symbolSize",e,[o.offsetX,o.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[r.x,r.y]),OE(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){h&&h.setUnfixed(n)})),r.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(cu(r).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(cu(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),m=u.getLayout("cy");u.graph.eachNode((function(t){WE(t,f,g,m)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},e.prototype._updateController=function(t,e,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker((function(e,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!wI(e,n,t)})),yL(t.coordinateSystem)?(r.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(e){yI(o,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){_I(o,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),vL(t.getGraph(),zE(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):r.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=zE(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){vL(t.getGraph(),zE(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Um);function xL(t){return"_EC_"+t}var bL=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[xL(t)]){var i=new wL(t,e);return i.hostGraph=this,this.nodes.push(i),n[xL(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[xL(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if(ge(t)&&(t=this.nodes[t]),ge(e)&&(e=this.nodes[e]),t instanceof wL||(t=i[xL(t)]),e instanceof wL||(e=i[xL(e)]),t&&e){var o=t.id+"-"+e.id,a=new SL(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof wL&&(t=t.id),e instanceof wL&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof wL||(e=this._nodesMap[xL(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},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)}}}function TL(t,e,n,i,r){for(var o=new bL(i),a=0;a "+d)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=Px(t,n);else{var g=Pf.get(f),m=g&&g.dimensions||[];te(m,"value")<0&&m.concat(["value"]);var v=Ax(t,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(p=new bx(v,n)).initData(t)}var y=new bx(["value"],n);return y.initData(l,s),r&&r(p,y),rD({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}ne(wL,AL("hostGraph","data")),ne(SL,AL("hostGraph","edgeData"));var ML=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return Tt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new ZT(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),La(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){IE(n=this)&&(n.__curvenessList=[],n.__edgeMap={},CE(n));var a=TL(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=zd.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return re(a.edges,(function(t){!function(t,e,n,i){if(IE(n)){var r=DE(t,e,n),o=n.__edgeMap,a=o[EE(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),fm("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return Mm({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=oe(this.option.categories||[],(function(t){return null!=t.value?t:Kt({value:0},t)})),e=new bx(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Em),IL={type:"graphRoam",event:"graphRoam",update:"none"};var CL=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},DL=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new CL},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(Ol);function EL(t,e){var n=null==t?"":t+"";return e&&(pe(e)?n=e.replace("{value}",n):de(e)&&(n=e(t))),n}var LL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:oa(n[0],e.getWidth()),cy:oa(n[1],e.getHeight()),r:oa(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?hT:qc,h=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];fl(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=[],y=0;h&&y=t&&(0===e?0:i[e-1][0])Math.PI/2&&(z+=Math.PI):"tangential"===B?z=-A-Math.PI/2:ge(B)&&(z=B*Math.PI/180),0===z?h.add(new Jl({style:md(_,{text:R,x:k,y:O,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:N}),silent:!0})):h.add(new Jl({style:md(_,{text:R,x:k,y:O,verticalAlign:"middle",align:"center"},{inheritColor:N}),silent:!0,originX:k,originY:O,rotation:z}))}if(y.get("show")&&E!==x){P=(P=y.get("distance"))?P+l:l;for(var F=0;F<=b;F++){u=Math.cos(A),c=Math.sin(A);var V=new ah({shape:{x1:u*(f-P)+d,y1:c*(f-P)+p,x2:u*(f-S-P)+d,y2:c*(f-S-P)+p},silent:!0,style:C});"auto"===C.stroke&&V.setStyle({stroke:i((E+F/b)/x)}),h.add(V),A+=M}A-=M}else A+=T}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),m=t.getData(),v=m.mapDimension("value"),y=+t.get("min"),_=+t.get("max"),x=[y,_],b=[o,a];function w(e,n){var i,o=m.getItemModel(e).getModel("pointer"),a=oa(o.get("width"),r.r),s=oa(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=oa(u[0],r.r),h=oa(u[1],r.r),d=o.get("keepAspect");return(i=l?ty(l,c-a/2,h-s,a,s,null,d):new DL({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?hT:qc,i=f.get("overlap"),a=i?f.get("width"):l/m.count(),u=i?r.r-a:r.r-(t+1)*a,c=i?r.r:r.r-t*a,h=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:c}});return i&&(h.z2=_-m.get(v,t)%_),h}(g||p)&&(m.diff(c).add((function(e){var n=m.get(v,e);if(p){var i=w(e,o);Ph(i,{rotation:-((isNaN(+n)?b[0]:ra(n,x,b,!0))+Math.PI/2)},t),u.add(i),m.setItemGraphicEl(e,i)}if(g){var r=S(e,o),a=f.get("clip");Ph(r,{shape:{endAngle:ra(n,x,b,a)}},t),u.add(r),hu(t.seriesIndex,m.dataType,e,r),d[e]=r}})).update((function(e,n){var i=m.get(v,e);if(p){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,Lh(s,{rotation:-((isNaN(+i)?b[0]:ra(i,x,b,!0))+Math.PI/2)},t),u.add(s),m.setItemGraphicEl(e,s)}if(g){var l=h[n],y=S(e,l?l.shape.endAngle:o),_=f.get("clip");Lh(y,{shape:{endAngle:ra(i,x,b,_)}},t),u.add(y),hu(t.seriesIndex,m.dataType,e,y),d[e]=y}})).execute(),m.each((function(t){var e=m.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),u=l.fill;if(s instanceof Gl){var c=s.style;s.useStyle(Kt({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(ra(m.get(v,t),x,[0,1],!0))),s.z2EmphasisLift=0,sc(s,e),ic(s,r,o,a)}if(g){var h=d[t];h.useStyle(m.getItemVisual(t,"style")),h.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,sc(h,e),ic(h,r,o,a)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=ty(r,e.cx-i/2+oa(o[0],e.r),e.cy-i/2+oa(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new qo,h=[],d=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){h[t]=new Jl({silent:!0}),d[t]=new Jl({silent:!0})})).update((function(t,e){h[t]=o._titleEls[e],d[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new qo,m=i(ra(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),_=r.cx+oa(y[0],r.r),x=r.cy+oa(y[1],r.r);(C=h[e]).attr({z2:f?0:2,style:md(v,{x:_,y:x,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(C)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=r.cx+oa(w[0],r.r),A=r.cy+oa(w[1],r.r),T=oa(b.get("width"),r.r),M=oa(b.get("height"),r.r),I=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:m,C=d[e],D=b.get("formatter");C.attr({z2:f?0:2,style:md(b,{x:S,y:A,text:EL(o,D),width:isNaN(T)?null:T,height:isNaN(M)?null:M,align:"center",verticalAlign:"middle"},{inheritColor:I})}),Ad(C,{normal:b},o,(function(t){return EL(t,D)})),p&&Td(C,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return EL(a?a.interpolatedValue:o,D)}}),g.add(C)}c.add(g)})),this.group.add(c),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(Um),PL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return Tt(e,t),e.prototype.getInitialData=function(t,e){return YT(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Em);var RL=["itemStyle","opacity"],NL=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new ih,a=new Jl;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return Tt(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(RL);l=null==l?1:l,n||Bh(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Ph(i,{style:{opacity:l}},r,e)):Lh(i,{style:{opacity:l},shape:{points:a.points}},r,e),sc(i,o),this._updateLabel(t,e),ic(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;fd(r,gd(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new Fn(c[0][0],c[0][1]):null},Lh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),zw(n,Fw(a),{stroke:u})},e}(eh),kL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new NL(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){Oh(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Um),OL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZT(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return YT(this,{coordDimensions:["value"],encodeDefaulter:ce(hf,this)})},e.prototype._defaultLabelLine=function(t){La(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Em);function BL(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&qL(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function qL(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var JL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&qt(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){re(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];re(se(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Zp),KL=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return Tt(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(fw);function $L(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=eP(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=eP(s,[0,a]),r=o=eP(s,[r,o]),i=0}e[0]=eP(e[0],n),e[1]=eP(e[1],n);var l=tP(e,i);e[i]+=t;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[i]=eP(e[i],h),u=tP(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function tP(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function eP(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var nP=re,iP=Math.min,rP=Math.max,oP=Math.floor,aP=Math.ceil,sP=aa,lP=Math.PI,uP=function(){function t(t,e,n){this.type="parallel",this._axesMap=ke(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;nP(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new KL(t,Pb(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();nP(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Lb(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=cP(e.get("axisExpandWidth"),l),h=cP(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,p=e.get("axisExpandWindow");p?(t=cP(p[1]-p[0],l),p[1]=p[0]+t):(t=cP(c*(h-1),l),(p=[c*(e.get("axisExpandCenter")||oP(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-h);f<3&&(f=0);var g=[oP(sP(p[0]/c,1))+1,aP(sP(p[1]/c,1))-1],m=f/c*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),nP(n,(function(e,n){var o=(i.axisExpandable?dP:hP)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:lP/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],c=[1,0,0,1,0,0];On(c,c,u),kn(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];re(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-c[0])?(l="jump",a=s-r*(1-c[2])):(a=s-r*c[1])>=0&&(a=s-r*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?$L(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[rP(0,o[1]*s/d-d/2)])[1]=iP(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function cP(t,e){return iP(rP(t,e[0]),e[1])}function hP(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function dP(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t=0;n--)sa(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;ixP}(t)||o){if(a&&!o){"single"===s.brushMode&&OP(t);var l=Qt(s);l.brushType=$P(l.brushType,a),l.panelId=a===gP?null:a.panelId,o=t._creatingCover=CP(t,l),t._covers.push(o)}if(o){var u=nR[$P(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(QP(t,o,t._track)),i&&(DP(t,o),u.updateCommon(t,o)),EP(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&NP(t,e,n)&&OP(t)&&(r={isEnd:i,removeOnClick:!0});return r}function $P(t,e){return"auto"===t?e.defaultBrushType:t}var tR={mousedown:function(t){if(this._dragging)eR(this,t);else if(!t.target||!t.target.draggable){qP(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=NP(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=NP(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new zd(r[a],this,e));if(i&&n){var s=TL(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return fm("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return fm("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Em);function yR(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){re(t,(function(t){var e=CR(t.outEdges,IR),n=CR(t.inEdges,IR),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],c=[],h=0,d=0;d=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:h},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;yh-1?p:h-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)bR(s,l*=.99,a),xR(s,r,n,i,a),DR(s,l,a),xR(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";re(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),re(t,(function(t){var e=0,n=0;re(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),re(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==se(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function _R(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function xR(t,e,n,i,r){var o="vertical"===r?"x":"y";re(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,c=t.length,h="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[h]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=c-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[h]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function bR(t,e,n){re(t.slice().reverse(),(function(t){re(t,(function(t){if(t.outEdges.length){var i=CR(t.outEdges,wR,n)/CR(t.outEdges,IR);if(isNaN(i)){var r=t.outEdges.length;i=r?CR(t.outEdges,SR,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-MR(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-MR(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function wR(t,e){return MR(t.node2,e)*t.getValue()}function SR(t,e){return MR(t.node2,e)}function AR(t,e){return MR(t.node1,e)*t.getValue()}function TR(t,e){return MR(t.node1,e)}function MR(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function IR(t){return t.getValue()}function CR(t,e,n){for(var i=0,r=t.length,o=-1;++oo&&(o=e)})),re(n,(function(e){var n=new WD({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&re(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var LR=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[r,o],p=d[u].get("type"),f=d[1-u].get("type"),g=t.data;if(g&&i){var m=[];re(g,(function(t,e){var n;he(t)?(n=t.slice(),t.unshift(e)):he(t.value)?((n=Kt({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,m.push(n)})),t.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:tx(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:tx(f),dimsDef:v.slice()}];return YT(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:ce(cf,y,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),PR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return Tt(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Em);ne(PR,LR,!0);var RR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=OR(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(Bh(n),BR(s,n,i,t)):n=OR(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(Um),NR=function(){},kR=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new NR},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var x=[v,_];i.push(x)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var UR=["color","borderColor"],HR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ud(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&YR(s,a))return;var l=jR(a,n,!0);Ph(l,{shape:{points:a.ends}},t,n),ZR(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);o&&YR(s,c)?i.remove(u):(u?(Lh(u,{shape:{points:c.ends}},t,a),Bh(u)):u=jR(c),ZR(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),KR(t,this.group);var e=t.get("clip",!0)?XA(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=jR(i.getItemLayout(n));ZR(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){KR(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Um),WR=function(){},XR=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return Tt(e,t),e.prototype.getDefaultShape=function(){return new WR},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Ol);function jR(t,e,n){var i=t.ends;return new XR({shape:{points:n?QR(i,t):i},z2:100})}function YR(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(r=n.get(["itemStyle","borderColorDoji"]));var o=n.getModel("itemStyle").getItemStyle(UR);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var tN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return Tt(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Em);function eN(t){t&&he(t.series)&&re(t.series,(function(t){me(t)&&"k"===t.type&&(t.type="candlestick")}))}ne(tN,LR,!0);var nN=["itemStyle","borderColor"],iN=["itemStyle","borderColor0"],rN=["itemStyle","borderColorDoji"],oN=["itemStyle","color"],aN=["itemStyle","color0"],sN={seriesType:"candlestick",plan:Fm(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?oN:aN)}function i(t,e){return e.get(0===t?rN:t>0?nN:iN)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,Kt(e.ensureUniqueItemVisual(r,"style"),s)}}}}},lN={seriesType:"candlestick",plan:Fm(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=oa(Se(t.get("barMaxWidth"),r),r),a=oa(Se(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?oa(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=oe(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(n,i){var r,a,h=qx(4*n.count),d=0,p=[],f=[],g=i.getStore(),m=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(o,a),y=g.get(s,a),_=g.get(l,a),x=g.get(u,a),b=g.get(c,a);isNaN(v)||isNaN(x)||isNaN(b)?(h[d++]=NaN,d+=3):(h[d++]=uN(g,a,y,_,l,m),p[0]=v,p[1]=x,r=e.dataToPoint(p,null,f),h[d++]=r?r[0]:NaN,h[d++]=r?r[1]:NaN,p[1]=b,r=e.dataToPoint(p,null,f),h[d++]=r?r[1]:NaN)}i.setLayout("largePoints",h)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var h=a.get(o,r),d=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(c,r),m=Math.min(d,p),v=Math.max(d,p),y=A(m,h),_=A(v,h),x=A(f,h),b=A(g,h),w=[];T(w,_,0),T(w,y,1),w.push(I(b),I(_),I(x),I(y));var S=!!n.getItemModel(r).get(["itemStyle","borderColorDoji"]);n.setItemLayout(r,{sign:uN(a,r,d,p,l,S),initBaseline:d>p?_[1]:y[1],ends:w,brushRect:M(f,g,h)})}function A(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var r=e.slice(),o=e.slice();r[0]=qh(r[0]+i/2,1,!1),o[0]=qh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=A(t,n),o=A(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function I(t){return t[0]=qh(t[0],1),t}}}}};function uN(t,e,n,i,r,o){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function cN(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var hN=function(t){function e(e,n){var i=t.call(this)||this,r=new IA(e,n),o=new qo;return i.add(r),i.add(o),i.updateData(e,n),i}return Tt(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=de(u)?u(n):u,i.__t>0&&(c=-o*i.__t),this._animateSymbol(i,o,c,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,r){if(e>0){t.__t=0;var o=this,a=t.animate("",i).when(r?2*e:e,{__t:r?2:1}).delay(n).during((function(){o._updateSymbolPosition(t)}));i||a.done((function(){o.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return $e(t.__p1,t.__cp1)+$e(t.__cp1,t.__p2)},e.prototype._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]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice(),s=Fi,l=Vi;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=t.__t<1?l(e[0],i[0],n[0],r):l(n[0],i[0],e[0],1-r),c=t.__t<1?l(e[1],i[1],n[1],r):l(n[1],i[1],e[1],1-r);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],h=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(h,c)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(fN),vN=function(){this.polyline=!1,this.curveness=0,this.segs=[]},yN=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return Tt(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new vN},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var h=(s+u)/2-(l-c)*r,d=(l+c)/2-(u-s)*r;t.quadraticCurveTo(h,d,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],h=1;h0){if(yl(u,c,(u+d)/2-(c-p)*r,(c+p)/2-(d-u)*r,d,p,o,t,e))return a}else if(ml(u,c,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),xN={seriesType:"lines",plan:Fm(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,c=r.start;c0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&XA(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=xN.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new _N:new aL(r?i?mN:gN:i?fN:oL),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(Um),wN="undefined"==typeof Uint32Array?Array:Uint32Array,SN="undefined"==typeof Float64Array?Array:Float64Array;function AN(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=oe(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),Jt([e,t[0],t[1]])})))}var TN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Tt(e,t),e.prototype.init=function(e){e.data=e.data||[],AN(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(AN(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Oe(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Oe(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Em);function MN(t){return t instanceof Array||(t=[t,t]),t}var IN={seriesType:"lines",reset:function(t){var e=MN(t.get("symbol")),n=MN(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=MN(n.getShallow("symbol",!0)),r=MN(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var CN=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Nt.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=t.length;c.width=e,c.height=n;for(var p=0;p0){var T=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=T[A],_[x++]=T[A+1],_[x++]=T[A+2],_[x++]=T[A+3]*v*256}else x+=4}return h.putImageData(y,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Nt.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function DN(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var EN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):DN(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(DN(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ud(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,c=jA(u,"cartesian2d");if(c){var h=u.getAxis("x"),d=u.getAxis("y");o=h.getBandWidth()+.5,a=d.getBandWidth()+.5,s=h.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),_=gd(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),A=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],T=n;Ts[1]||Dl[1])continue;var E=u.dataToPoint([C,D]);M=new Zl({shape:{x:E[0]-o/2,y:E[1]-a/2,width:o,height:a},style:I})}else{if(isNaN(f.get(A[1],T)))continue;M=new Zl({z2:1,shape:u.dataToRect([f.get(A[0],T)]).contentShape,style:I})}if(f.hasItemOption){var L=f.getItemModel(T),P=L.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),m=L.getModel(["blur","itemStyle"]).getItemStyle(),v=L.getModel(["select","itemStyle"]).getItemStyle(),y=L.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),_=gd(L)}M.shape.r=y;var R=t.getRawValue(T),N="-";R&&null!=R[2]&&(N=R[2]+""),fd(M,_,{labelFetcher:t,labelDataIndex:T,defaultOpacity:I.opacity,defaultText:N}),M.ensureState("emphasis").style=g,M.ensureState("blur").style=m,M.ensureState("select").style=v,ic(M,b,w,S),M.incremental=r,r&&(M.states.emphasis.hoverLayer=!0),p.add(M),f.setItemGraphicEl(T,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new CN;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 c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),p=Math.min(l.height+l.y,i.getHeight()),f=d-c,g=p-h,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=c,r[1]-=h,r.push(i),r})),y=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(y,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=oe(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,h),function(t,e,n,i,r,o,a,s,l,u){var c,h=l.valueDim,d=l.categoryDim,p=Math.abs(n[d.wh]),f=t.getItemVisual(e,"symbolSize");c=he(f)?f.slice():null==f?["100%","100%"]:[f,f];c[d.index]=oa(c[d.index],p),c[h.index]=oa(c[h.index],i?p:Math.abs(o)),u.symbolSize=c;var g=u.symbolScale=[c[0]/s,c[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,h.boundingLength,h.pxSign,u,i,h),function(t,e,n,i,r){var o=t.get(PN)||0;o&&(NN.attr({scaleX:e[0],scaleY:e[1],rotation:n}),NN.updateTransform(),o/=NN.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,h.symbolScale,l,i,h);var d=h.symbolSize,p=ny(n.get("symbolOffset"),d);return function(t,e,n,i,r,o,a,s,l,u,c,h){var d=c.categoryDim,p=c.valueDim,f=h.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(i){var v=Math.abs(l),y=we(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=oa(y,e[p.index]),b=Math.max(g+2*x,0),w=_?0:2*x,S=wa(i),A=S?i:KN((v+w)/b);b=g+2*(x=(v-A*g)/2/(_?A:Math.max(A-1,1))),w=_?0:2*x,S||"fixed"===i||(A=u?KN((Math.abs(u)+w)/b):0),m=A*b-w,h.repeatTimes=A,h.symbolMargin=x}var T=f*(m/2),M=h.pathPosition=[];M[d.index]=n[d.wh]/2,M[p.index]="start"===a?T:"end"===a?l-T:l/2,o&&(M[0]+=o[0],M[1]+=o[1]);var I=h.bundlePosition=[];I[d.index]=n[d.xy],I[p.index]=n[p.xy];var C=h.barRectShape=Kt({},n);C[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(M[p.index]+T)),C[d.wh]=n[d.wh];var D=h.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=c.ecSize[d.wh],D[p.xy]=0,D[p.wh]=n[p.wh]}(n,d,r,o,0,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function BN(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function zN(t){var e=t.symbolPatternSize,n=ty(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function FN(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,h=o[e.valueDim.index]+a+2*n.symbolMargin;for(QN(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0:i<0)&&(r=u-1-t),e[l.index]=h*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function VN(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?qN(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=zN(n),r.add(o),qN(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function GN(t,e,n){var i=Kt({},e.barRectShape),r=t.__pictorialBarRect;r?qN(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new Zl({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function UN(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=Kt({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Lh(r,{shape:o},s,l);else{o[a.wh]=0,r=new Zl({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],cd[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function HN(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=WN,n.isAnimationEnabled=XN,n}function WN(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function XN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function jN(t,e,n,i){var r=new qo,o=new qo;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?FN(r,e,n):VN(r,0,n),GN(r,n,i),UN(r,e,n,i),r.__pictorialShapeStr=ZN(t,n),r.__pictorialSymbolMeta=n,r}function YN(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];QN(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),re(o,(function(t){Nh(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function ZN(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function QN(t,e,n){re(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function qN(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&cd[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function JN(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),d=o.get("scale");QN(t,(function(t){if(t instanceof Gl){var e=t.style;t.useStyle(Kt({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var p=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,fd(f,gd(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:TA(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),ic(t,c,h,o.get("disabled"))}function KN(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var $N=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return Tt(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Gd(lT.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(lT);var tk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}o.x=0,o.y=l.y+u[0];var h=new J_(this._layersSeries||[],a,c,c),d=[];function p(e,n,s){var l=r._layers;if("remove"!==e){for(var u,c,h=[],p=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=h)}return{y0:r,max:o}}(l),c=u.y0,h=n/u.max,d=o.length,p=o[0].indices.length,f=0;fT&&!fa(I-T)&&I0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new rk(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)kp(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ok,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Um),uk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return Tt(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ck(n);var i=this._levelModels=oe(t.levels||[],(function(t){return new zd(t,this,e)}),this),r=pD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=vD(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.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)},e.prototype.enableAriaDecal=function(){SD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Em);function ck(t){var e=0;re(t.children,(function(t){ck(t);var n=t.value;he(n)&&(n=n[0]),e+=n}));var n=t.value;he(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),he(t.value)?t.value[0]=n:t.value=n}var hk=Math.PI/180;function dk(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");he(i)||(i=[0,i]),he(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=oa(e[0],r),l=oa(e[1],o),u=oa(i[0],a/2),c=oa(i[1],a/2),h=-t.get("startAngle")*hk,d=t.get("minAngle")*hk,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,m=t.get("sort");null!=m&&pk(f,m);var v=0;re(f.children,(function(t){!isNaN(t.getValue())&&v++}));var y=f.getValue(),_=Math.PI/(y||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(c-u)/(b||1),S=t.get("clockwise"),A=t.get("stillShowZeroSum"),T=S?1:-1,M=function(e,n){if(e){var i=n;if(e!==p){var r=e.getValue(),o=0===y&&A?_:r*_;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&pe(o)&&(o=hr(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),Kt(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}var gk={color:"fill",borderColor:"stroke"},mk={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},vk=Ua(),yk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return Px(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=vk(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Em);function _k(t,e){return e=e||[0,0],oe(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function xk(t,e){return e=e||[0,0],oe([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function bk(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function wk(t,e){return e=e||[0,0],oe(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function Sk(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||Fe(t,"text")))}function Ak(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},Fe(a,"text")&&(o.text=a.text),Fe(a,"rich")&&(o.rich=a.rich),Fe(a,"textFill")&&(o.fill=a.textFill),Fe(a,"textStroke")&&(o.stroke=a.textStroke),Fe(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Fe(a,"fontSize")&&(o.fontSize=a.fontSize),Fe(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Fe(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=Fe(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),Fe(a,"textPosition")&&(i.position=a.textPosition),Fe(a,"textOffset")&&(i.offset=a.textOffset),Fe(a,"textRotation")&&(i.rotation=a.textRotation),Fe(a,"textDistance")&&(i.distance=a.textDistance)}return Tk(o,t),re(o.rich,(function(t){Tk(t,t)})),{textConfig:i,textContent:r}}function Tk(t,e){e&&(e.font=e.textFont||e.font,Fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),Fe(e,"textAlign")&&(t.align=e.textAlign),Fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),Fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),Fe(e,"textWidth")&&(t.width=e.textWidth),Fe(e,"textHeight")&&(t.height=e.textHeight),Fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),Fe(e,"textPadding")&&(t.padding=e.textPadding),Fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),Fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),Fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),Fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),Fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),Fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),Fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function Mk(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Ik(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,re(e.rich,(function(t){Ik(t,t)})),i}function Ik(t,e){e&&(Fe(e,"fill")&&(t.textFill=e.fill),Fe(e,"stroke")&&(t.textStroke=e.fill),Fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),Fe(e,"font")&&(t.font=e.font),Fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),Fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),Fe(e,"fontSize")&&(t.fontSize=e.fontSize),Fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),Fe(e,"align")&&(t.textAlign=e.align),Fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),Fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),Fe(e,"width")&&(t.textWidth=e.width),Fe(e,"height")&&(t.textHeight=e.height),Fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),Fe(e,"padding")&&(t.textPadding=e.padding),Fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),Fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),Fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),Fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),Fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),Fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),Fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),Fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),Fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),Fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),Fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Ck={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Dk=le(Ck);ae(Do,(function(t,e){return t[e]=1,t}),{}),Do.join(", ");var Ek=["","style","shape","extra"],Lk=Ua();function Pk(t,e,n,i,r){var o=t+"Animation",a=Dh(t,i,r)||{},s=Lk(e).userDuring;return a.duration>0&&(a.during=s?ue(Fk,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),Kt(a,n[o]),a}function Rk(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Lk(t),u=e.style;l.userDuring=e.during;var c={},h={};if(function(t,e,n){for(var i=0;i=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!r&&(r=i.style={});var p=le(n);for(u=0;u0&&t.animateFrom(d,p)}else!function(t,e,n,i,r){if(r){var o=Pk("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,c);Nk(t,e),u?t.dirty():t.markRedraw()}function Nk(t,e){for(var n=Lk(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=le(a);for(c=0;ci[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:ue(wk,t)}}},calendar:function(t){var e=t.getRect(),n=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:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function rO(t){return t instanceof Ol}function oO(t){return t instanceof Rs}var aO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=hO(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){pO(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);n&&kk(n,vk(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);pO(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?XA(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=hO(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){null==i&&(i=s);var r=y(i,Yk).getItemStyle(),o=_(i,Yk),a=md(o,null,null,!0,!0);a.text=o.getShallow("show")?Ae(t.getFormattedLabel(i,Yk),t.getFormattedLabel(i,Zk),TA(e,i)):null;var l=vd(o,null,!0);return b(n,r),r=Mk(r,a,l),n&&x(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),Fe(gk,t)){var i=e.getItemVisual(n,"style");return i?i[gk[t]]:null}if(Fe(mk,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o=h;f--){var g=e.childAt(f);_O(e,g,r)}}(t,h,n,i,r),a>=0?o.replaceAt(h,a):o.add(h),h}function gO(t,e,n){var i,r=vk(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(Fe(i,"pathData")||Fe(i,"d")))&&SO(a)!==r.customPathData||"image"===o&&Fe(s,"image")&&s.image!==r.customImagePath}function mO(t,e,n){var i=e?vO(t,e):t,r=e?yO(t,i,Yk):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?vO(s,e):s:null;if(r&&(n.isLegacy||Sk(r,o,!!a,!!l))){n.isLegacy=!0;var u=Ak(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?n[e]:n.normal;h.cfg=a,h.conOpt=l}function vO(t,e){return e?t?t[e]:null:t}function yO(t,e,n){var i=e&&e.style;return null==i&&n===Yk&&t&&(i=t.styleEmphasis),i}function _O(t,e,n){e&&kk(e,vk(t).option,n)}function xO(t,e){var n=t&&t.name;return null!=n?n:eO+e}function bO(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;fO(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function wO(t){var e=this.context,n=e.oldChildren[t];n&&kk(n,vk(n).option,e.seriesModel)}function SO(t){return t&&(t.pathData||t.d)}var AO=Ua(),TO=Qt,MO=ue,IO=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var h=ce(CO,e,c);this.updatePointerEl(a,l,h),this.updateLabelEl(a,l,h,e)}else a=this._group=new qo,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);PO(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=NM(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=AO(t).pointerEl=new cd[r.type](TO(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=AO(t).labelEl=new Jl(TO(e.label));t.add(r),EO(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=AO(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=AO(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),EO(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=id(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){In(t.event)},onmousedown:MO(this._onHandleDragMove,this,0,0),drift:MO(this._onHandleDragMove,this),ondragend:MO(this._onHandleDragEnd,this)}),i.add(r)),PO(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");he(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Km(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){CO(this._axisPointerModel,!e&&this._moveAnimation,this._handle,LO(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(LO(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(LO(i)),AO(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._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}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),$m(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function CO(t,e,n,i){DO(AO(n).lastProp,i)||(AO(n).lastProp=i,e?Lh(n,i,t):(n.stopAnimation(),n.attr(i)))}function DO(t,e){if(me(t)&&me(e)){var n=!0;return re(e,(function(e,i){n=n&&DO(t[i],e)})),!!n}return t===e}function EO(t,e){t[e.get(["label","show"])?"show":"hide"]()}function LO(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function PO(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function RO(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function NO(t,e,n,i,r){var o=kO(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Cp(a.get("padding")||0),l=a.getFont(),u=No(o,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=r.align;"right"===p&&(c[0]-=h),"center"===p&&(c[0]-=h/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=d),"middle"===f&&(c[1]-=d/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:md(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function kO(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:Nb(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};re(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),pe(a)?o=a.replace("{value}",o):de(a)&&(o=a(s))}return o}function OO(t,e,n){var i=[1,0,0,1,0,0];return On(i,i,n.rotation),kn(i,i,n.position),Kh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function BO(t,e,n,i,r,o){var a=MM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),NO(e,i,r,o,{position:OO(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function zO(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function FO(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function VO(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var GO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=UO(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=RO(i),h=HO[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}BO(e,t,mM(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=mM(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=OO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=UO(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(IO);function UO(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var HO={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:zO([e,n[0]],[e,n[1]],WO(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:FO([e-i/2,n[0]],[i,r],WO(t))}}};function WO(t){return"x"===t.dim?0:1}var XO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Zp),jO=Ua(),YO=re;function ZO(t,e,n){if(!It.node){var i=e.getZr();jO(i).records||(jO(i).records={}),function(t,e){if(jO(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);YO(jO(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}jO(t).initialized=!0,n("click",ce(qO,"click")),n("mousemove",ce(qO,"mousemove")),n("globalout",QO)}(i,e),(jO(i).records[t]||(jO(i).records[t]={})).handler=n}}function QO(t,e,n){t.handler("leave",null,n)}function qO(t,e,n,i){e.handler(t,n,i)}function JO(t,e){if(!It.node){var n=e.getZr();(jO(n).records||{})[t]&&(jO(n).records[t]=null)}}var KO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";ZO("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){JO("axisPointer",e)},e.prototype.dispose=function(t,e){JO("axisPointer",e)},e.type="axisPointer",e}(zm);function $O(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Ga(o,t);if(null==a||a<0||he(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h=u.dim,d="x"===c||"radius"===c?1:0,p=o.mapDimension(h),f=[];f[d]=o.get(p,a),f[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(oe(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var tB=Ua();function eB(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||ue(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){aB(r)&&(r=$O({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=aB(r),u=o.axesInfo,c=s.axesInfo,h="leave"===i||aB(r),d={},p={},f={list:[],map:{}},g={showPointer:ce(iB,p),showTooltip:ce(rB,f)};re(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);re(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&nB(t,a,g,!1,d)}}))}));var m={};return re(c,(function(t,e){var n=t.linkGroup;n&&!p[e]&&re(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,oB(e),oB(t)))),m[t.key]=o}}))})),re(m,(function(t,e){nB(c[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];re(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,c,d),function(t,e,n,i){if(aB(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=tB(i)[r]||{},a=tB(i)[r]={};re(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&re(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];re(o,(function(t,e){!a[e]&&l.push(t)})),re(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),d}}function nB(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return re(e.seriesModels,(function(e,l){var u,c,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(h,t,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),re(c,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&Kt(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function iB(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function rB(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=OM(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function oB(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function aB(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function sB(t){zM.registerAxisPointerClass("CartesianAxisPointer",GO),t.registerComponentModel(XO),t.registerComponentView(KO),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!he(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=PM(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},eB)}var lB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var c=RO(i),h=uB[u](o,a,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=[1,0,0,1,0,0];On(d,d,s),kn(d,d,[i.cx,i.cy]),l=Kh([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=MM.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));NO(t,n,i,r,d)},e}(IO);var uB={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:zO(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:VO(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:VO(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},cB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Zp),hB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ja).models[0]},e.type="polarAxis",e}(Zp);ne(hB,Fb);var dB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="angleAxis",e}(hB),pB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="radiusAxis",e}(hB),fB=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return Tt(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(fw);fB.prototype.dataToRadius=fw.prototype.dataToCoord,fB.prototype.radiusToData=fw.prototype.coordToData;var gB=Ua(),mB=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return Tt(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=No(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=gB(t.model),d=h.lastAutoInterval,p=h.lastTickCount;return null!=d&&null!=p&&Math.abs(d-c)<=1&&Math.abs(p-r)<=1&&d>c?c=d:(h.lastTickCount=r,h.lastAutoInterval=c),c},e}(fw);mB.prototype.dataToAngle=fw.prototype.dataToCoord,mB.prototype.angleToData=fw.prototype.coordToData;var vB=["radius","angle"],yB=function(){function t(t){this.dimensions=vB,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new fB,this._angleAxis=new mB,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return _B(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return _B(e)===this?this.pointToData(n):null},t}();function _B(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var xB=yB;function bB(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();re(zb(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),re(zb(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),Lb(i.scale,i.model),Lb(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function wB(t,e){var n;if(t.type=e.get("type"),t.scale=Pb(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,r)}e.axis=t,t.model=e}var SB={dimensions:vB,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new xB(i+"");r.update=bB;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");wB(o,s),wB(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=oa(i[0],r),t.cy=oa(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:he(l)||(l=[0,l]);var u=[oa(l[0],s),oa(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",ja).models[0];t.coordinateSystem=e.coordinateSystem}})),n}},AB=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function TB(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function MB(t){return t.getRadiusAxis().inverse?0:1}function IB(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var CB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return Tt(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=oe(n.getViewLabels(),(function(t){t=Qt(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));IB(s),IB(o),re(AB,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||DB[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(zM),DB={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),h=MB(n),d=h?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===o[d]?new cd[p]({shape:{cx:n.cx,cy:n.cy,r:o[h],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Kc({shape:{cx:n.cx,cy:n.cy,r:o[h],r0:o[d]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[MB(n)],u=oe(i,(function(t){return new ah({shape:TB(n,[l,l+s],t.coord)})}));t.add(Yh(u,{style:$t(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[MB(n)],c=[],h=0;hf?"left":"right",v=Math.abs(p[1]-g)/d<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[h]){var y=s[h];me(y)&&y.textStyle&&(a=new zd(y.textStyle,l,l.ecModel))}var _=new Jl({silent:MM.isLabelSilent(e),style:md(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(t.add(_),c){var x=MM.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=i.rawLabel,cu(_).eventData=x}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",I=b;y&&(i[s][T]||(i[s][T]={p:b,n:b}),I=i[s][T][M]);var C=void 0,D=void 0,E=void 0,L=void 0;if("radius"===h.dim){var P=h.dataToCoord(A)-b,R=o.dataToCoord(T);Math.abs(P)=L})}}}))}var BB={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},zB={splitNumber:5},FB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="polar",e}(zm);function VB(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),we(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-c:c,r.z2=1,r}var GB=["axisLine","axisTickLabel","axisName"],UB=["splitArea","splitLine"],HB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return Tt(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new qo;var s=VB(e),l=new MM(e,s);re(GB,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),re(UB,(function(t){e.get([t,"show"])&&WB[t](this,this.group,this._axisGroup,e)}),this),ed(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){GM(this)},e.type="singleAxis",e}(zM),WB={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),c=r.isHorizontal(),h=[],d=0,p=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return QB(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return QB(e)===this?this.pointToData(n):null},t}();function QB(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var qB={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new ZB(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",ja).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:YB},JB=["x","y"],KB=["width","height"],$B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=nz(a,1-ez(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=RO(i),h=tz[u](o,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}BO(e,t,VB(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=VB(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=OO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=ez(r),s=nz(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=nz(o,1-a),c=(u[1]+u[0])/2,h=[c,c];return h[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(IO),tz={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:zO([e,n[0]],[e,n[1]],ez(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:FO([e-i/2,n[0]],[i,r],ez(t))}}};function ez(t){return t.isHorizontal()?0:1}function nz(t,e){var n=t.getRect();return[n[JB[e]],n[JB[e]]+n[KB[e]]]}var iz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="single",e}(zm);var rz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(e,n,i){var r=Xp(e);t.prototype.init.apply(this,arguments),oz(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),oz(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Zp);function oz(t,e){var n,i=t.cellSize;1===(n=he(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=oe([0,1],(function(t){return function(t,e){return null!=t[zp[e][0]]||null!=t[zp[e][1]]&&null!=t[zp[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Wp(t,e,{type:"box",ignoreSize:r})}var az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Zl({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=o.getDateInfo(h)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new ih({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return pe(t)&&t?(n=t,re(e,(function(t,e){n=n.replace("{"+e+"}",t)})),n):de(t)?t(e):e.nameMap;var n},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new Jl({z2:30,style:md(r,{text:g})});m.attr(this._yearTextPositionControl(m,h[a],n,a,o)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!pe(o)||(o&&(e=Qd(o)||e),o=e.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,h="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,p=0;p=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/sz)-Math.floor(n[0].time/sz)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(e){var n=new t(e);i.push(n),e.coordinateSystem=n})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function uz(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function cz(t,e){var n;return re(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var hz=["transition","enterFrom","leaveTo"],dz=hz.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function pz(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?hz:dz,r=0;r=0;l--){var d,p,f;if(f=null!=(p=za((d=n[l]).id,null))?r.get(p):null){var g=f.parent,m=(h=mz(g),{}),v=Up(f,d,g===i?{width:o,height:a}:{width:h.width,height:h.height},null,{hv:d.hv,boundingMode:d.bounding},m);if(!mz(f).isNew&&v){for(var y=d.transition,_={},x=0;x=0)?_[b]=w:f[b]=w}Lh(f,_,t,0)}else f.attr(m)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){xz(n,mz(n).option,e,t._lastGraphicModel)})),this._elMap=ke()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(zm);function yz(t){var e=new(Fe(gz,t)?gz[t]:Hh(t))({});return mz(e).type=t,e}function _z(t,e,n,i){var r=yz(n);return e.add(r),i.set(t,r),mz(r).id=t,mz(r).isNew=!0,r}function xz(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){xz(t,e,n,i)})),kk(t,e,i),n.removeKey(mz(t).id))}function bz(t,e,n,i){t.isGroup||re([["cursor",Rs.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];Fe(e,i)?t[i]=Se(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),re(le(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=de(i)?i:null}})),Fe(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var wz=["x","y","radius","angle","single"],Sz=["cartesian2d","polar","singleAxis"];function Az(t){return t+"Axis"}function Tz(t,e){var n,i=ke(),r=[],o=ke();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function Mz(t){var e=t.ecModel,n={infoList:[],infoMap:ke()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(Az(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var Iz=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),Cz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Tt(e,t),e.prototype.init=function(t,e,n){var i=Dz(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=Dz(t);qt(this.option,t,!0),qt(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;re([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ke();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return re(wz,(function(n){var i=this.getReferringComponents(Az(n),Ya);if(i.specified){e=!0;var r=new Iz;re(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new Iz;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",ja).models[0];a&&re(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",ja).models[0]&&o.add(t.componentIndex)}))}}}i&&re(wz,(function(e){if(i){var r=n.findComponents({mainType:Az(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new Iz;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._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}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");re([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(Az(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){re(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(Az(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;re([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;re(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=Az(this._dimName),i=e.getReferringComponents(n,ja).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return Qt(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];Rz(["start","end"],(function(l,u){var c=t[l],h=t[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(ra(c,o,n))):(e=!0,c=ra(h=null==h?n[u]:i.parse(h),n,o)),s[u]=null==h||isNaN(h)?n[u]:h,a[u]=null==c||isNaN(c)?o[u]:c})),Nz(s),Nz(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";$L(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ra(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];Rz(n,(function(t){!function(t,e,n){e&&re(zb(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=Cb(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&Rz(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=oe(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(c&&!h&&!d)return!0;c&&(r=!0),h&&(e=!0),d&&(n=!0)}return r&&e&&n}))}else Rz(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));Rz(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;Rz(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=ra(n[0]+o,n,[0,100],!0):null!=r&&(o=ra(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=ca(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var Oz={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(Az(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new kz(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ke();return re(n,(function(t){re(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var Bz=!1;function zz(t){Bz||(Bz=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Oz),function(t){t.registerAction("dataZoom",(function(t,e){re(Tz(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function Fz(t){t.registerComponentModel(Ez),t.registerComponentView(Pz),zz(t)}var Vz=function(){},Gz={};function Uz(t,e){Gz[t]=e}function Hz(t){return Gz[t]}var Wz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;re(this.option.feature,(function(t,n){var i=Hz(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),qt(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Zp);function Xz(t,e){var n=Cp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Zl({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var jz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];re(s,(function(t,e){u.push(e)})),new J_(this._featureNames||[],u).add(c).update(c).remove(ce(c,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Gp(i,o,r);Vp(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Up(t,i,o,r)}(r,t,n),r.add(Xz(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!de(l)&&e){var u=l.style||(l.style={}),c=No(e,Jl.makeFont(u)),h=t.x+r.x,d=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",d=!0);var p=d?-5-c.height:o+10;h+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):h-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,h){var d,p=u[c],f=u[h],g=s[p],m=new zd(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(g.title=i.newTitle),p&&!f){if(function(t){return 0===t.indexOf("my")}(p))d={onclick:m.option.onclick,featureName:p};else{var v=Hz(p);if(!v)return;d=new v}l[p]=d}else if(!(d=l[f]))return;d.uid=Vd("toolbox-feature"),d.model=m,d.ecModel=e,d.api=n;var y=d instanceof Vz;p||!f?!m.get("show")||y&&d.unusable?y&&d.remove&&d.remove(e,n):(!function(i,s,l){var u,c,h=i.getModel("iconStyle"),d=i.getModel(["emphasis","iconStyle"]),p=s instanceof Vz&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};pe(p)?(u={})[l]=p:u=p;pe(f)?(c={})[l]=f:c=f;var g=i.iconPaths={};re(u,(function(l,u){var p=id(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=d.getItemStyle();var f=new Jl({style:{text:c[u],align:d.get("textAlign"),borderRadius:d.get("textBorderRadius"),padding:d.get("textPadding"),fill:null,font:wd({fontStyle:d.get("textFontStyle"),fontFamily:d.get("textFontFamily"),fontSize:d.get("textFontSize"),fontWeight:d.get("textFontWeight")},e)},ignore:!0});p.setTextContent(f),sd({el:p,componentModel:t,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var e=d.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:d.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:d.get("textBackgroundColor")}),p.setTextConfig({position:d.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?Hu:Wu)(p),r.add(p),p.on("click",ue(s.onclick,s,e,n,u)),g[u]=p}))}(m,d,p),m.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Hu:Wu)(i[t])},d instanceof Vz&&d.render&&d.render(m,e,n,i)):y&&d.dispose&&d.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){re(this._features,(function(t){t instanceof Vz&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){re(this._features,(function(n){n instanceof Vz&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){re(this._features,(function(n){n instanceof Vz&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(zm);var Yz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=It.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=r?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var h=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=c.length,p=new Uint8Array(d);d--;)p[d]=c.charCodeAt(d);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,h)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,v=m.document;v.open("image/svg+xml","replace"),v.write(c),v.close(),m.focus(),v.execCommand("SaveAs",!0,h),document.body.removeChild(g)}}else{var y=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=a;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(Vz),Zz="__ec_magicType_stack__",Qz=[["line","bar"],["stack"]],qz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return re(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(Jz[n]){var o,a={series:[]};re(Qz,(function(t){te(t,n)>=0&&re(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=Jz[n](e,r,t,i);o&&($t(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,ja).models[0].componentIndex;a[u]=a[u]||[];for(var h=0;h<=c;h++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=qt({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(Vz),Jz={line:function(t,e,n,i){if("bar"===t)return qt({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return qt({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===Zz;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),qt({id:e,stack:r?"":Zz},i.get(["option","stack"])||{},!0)}};O_({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var Kz=new Array(60).join("-"),$z="\t";function tF(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var eF=new RegExp("["+$z+"]+","g");function nF(t,e){var n=t.split(new RegExp("\n*"+Kz+"\n*","g")),i={series:[]};return re(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf($z)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=oe(tF(e.shift()).split(eF),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=mF[t.brushType](0,n,e);t.__rangeOffset={offset:yF[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){re(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&re(i.coordSyses,(function(i){var r=mF[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){re(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=mF[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?yF[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=xF(n),o=xF(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return oe(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:rR(i),isTargetByCursor:aR(i,t,n.coordSysModel),getLinearBrushOtherExtent:oR(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&te(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=dF(e,t),r=0;rt[1]&&t.reverse(),t}function dF(t,e){return Wa(t,e,{includeMainTypes:uF})}var pF={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ke(),a={},s={};(n||i||r)&&(re(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),re(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),re(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];re(r.getCartesians(),(function(t,e){(te(n,t.getAxis("x").model)>=0||te(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:gF.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){re(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:gF.geo})}))}},fF=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],gF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Jh(t)),e}},mF={lineX:ce(vF,0),lineY:ce(vF,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[hF([r[0],o[0]]),hF([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:oe(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function vF(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=hF(oe([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var yF={lineX:ce(_F,0),lineY:ce(_F,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return oe(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function _F(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function xF(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var bF,wF,SF=re,AF=Da+"toolbox-dataZoom_",TF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new IP(n.getZr()),this._brushController.on("brush",ue(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new cF(IF(t),e,{include:["grid"]}),s=a.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return sF(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){MF[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new cF(IF(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=sF(t);oF(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=$L(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];SF(t,(function(t,n){e.push(Qt(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(Vz),MF={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=sF(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return oF(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function IF(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}bF="dataZoom",wF=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Wa(t,IF(i));return SF(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),SF(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:AF+e+o};a[n]=o,r.push(a)}},Ie(null==gf.get(bF)&&wF),gf.set(bF,wF);var CF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Zp);function DF(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function EF(t){if(It.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var h=a*Math.PI/180,d=l+r,p=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h)),f=e+" solid "+r+"px;";return'
'}(n,i,r)),pe(t))o.innerHTML=t+a;else if(t){o.innerHTML="",he(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!It.node&&n.getDom()){var r=YF(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=Xa(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=Za(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=cu(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:r,componentIndex:a.componentIndex,el:s}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=WF;l.x=i.x,l.y=i.y,l.update(),cu(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=$O(i,e),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(YF(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===jF([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;if("legend"===cu(n).ssrType)return;this._lastDataByCoordSys=null,Uv(n,(function(t){return null!=cu(t).dataIndex?(r=t,!0):null!=cu(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=ue(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=jF([e.tooltipOption],i),a=this._renderMode,s=[],l=fm("section",{blocks:[],noHeader:!0}),u=[],c=new Tm;re(t,(function(t){re(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=kO(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),h=fm("section",{header:o,noHeader:!Ce(o),sortBlocks:!0,blocks:[]});l.blocks.push(h),re(t.seriesDataIndices,(function(l){var d=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Nb(e.axis,{value:r}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",Np(f.color),a);var g=Eg(d.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=jF([d],i).get("valueFormatter");h.blocks.push(v?Kt({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var h=e.position,d=o.get("order"),p=xm(l,c,a,d,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,h,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],h,null,c)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=cu(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),h=this._renderMode,d=t.positionDefault,p=jF([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new Tm;g.marker=m.makeTooltipMarker("item",Np(g.color),h);var v=Eg(s.formatTooltip(l,!1,u)),y=p.get("order"),_=p.get("valueFormatter"),x=v.frag,b=x?xm(_?Kt({valueFormatter:_},x):x,m,h,y,i.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,b,g,w,t.offsetX,t.offsetY,t.position,t.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=cu(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(pe(o)){o={content:o,formatter:o},a=!0}a&&i&&o.content&&((o=Qt(o)).content=yn(o.content));var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=t.positionDefault,c=jF(s,this._tooltipModel,u?{position:u}:null),h=c.get("content"),d=Math.random()+"",p=new Tm;this._showOrMove(c,(function(){var n=Qt(c.get("formatterParams")||{});this._showTooltipContent(c,h,n,d,t.offsetX,t.offsetY,t.position,e,p)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var c=t.get("formatter");a=a||t.get("position");var h=e,d=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(c)if(pe(c)){var p=t.ecModel.get("useUTC"),f=he(n)?n[0]:n;h=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(h=up(f.axisValue,h,p)),h=Pp(h,n,!0)}else if(de(c)){var g=ue((function(e,i){e===this._ticket&&(u.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,h=c(n,i,g)}else h=c;u.setContent(h,l,t,d,a),u.show(t,d),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||he(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:he(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),c=t.get("align"),h=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),de(e)&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),he(e))n=oa(e[0],s),i=oa(e[1],l);else if(me(e)){var p=e;p.width=u[0],p.height=u[1];var f=Gp(p,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if(pe(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+c/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+c+a;break;case"left":s=e.x-r-a,l=e.y+c/2-o/2;break;case"right":s=e.x+u+a,l=e.y+c/2-o/2}return[s,l]}(e,d,u,t.get("borderWidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,c?null:20,h?null:20);n=g[0],i=g[1]}if(c&&(n-=ZF(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=ZF(h)?u[1]/2:"bottom"===h?u[1]:0),DF(t)){g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&re(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&re(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&re(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&re(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!It.node&&e.getDom()&&($m(this,"_updatePosition"),this._tooltipContent.dispose(),JO("itemTooltip",e))},e.type="tooltip",e}(zm);function jF(t,e,n){var i,r=e.ecModel;n?(i=new zd(n,r,r),i=new zd(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof zd&&(a=a.get("tooltip",!0)),pe(a)&&(a={formatter:a}),a&&(i=new zd(a,i,r)))}return i}function YF(t,e){return t.dispatchAction||ue(e.dispatchAction,e)}function ZF(t){return"center"===t||"middle"===t}var QF=["rect","polygon","keep","clear"];function qF(t,e){var n=Ea(t?t.brush:[]);if(n.length){var i=[];re(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;he(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};re(t,(function(t){e[t]=1})),t.length=0,re(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,QF)}}var JF=re;function KF(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function $F(t,e,n){var i={};return JF(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);JF(t[e],(function(t,i){if(WD.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new WD(r),"opacity"===i&&((r=Qt(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new WD(r))}}))})),i}function tV(t,e,n){var i;re(n,(function(t){e.hasOwnProperty(t)&&KF(e[t])&&(i=!0)})),i&&re(n,(function(n){e.hasOwnProperty(n)&&KF(e[n])?t[n]=Qt(e[n]):delete t[n]}))}var eV={lineX:nV(0),lineY:nV(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Xb(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(Xb(i,r,o)||Xb(i,r+a,o)||Xb(i,r,o+s)||Xb(i,r+a,o+s)||Zn.create(t).contain(l[0],l[1])||rd(r,o,r+a,o,i)||rd(r,o,r,o+s,i)||rd(r+a,o,r+a,o+s,i)||rd(r,o+s,r+a,o+s,i))||void 0}}};function nV(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return iV(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&dV(e)}};function dV(t){return new Zn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var pV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new IP(e.getZr())).on("brush",ue(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){sV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:Qt(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:Qt(n),$from:e})},e.type="brush",e}(zm),fV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return Tt(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&tV(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=oe(t,(function(t){return gV(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=gV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Zp);function gV(t,e){return qt({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new zd(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var mV=["rect","polygon","lineX","lineY","keep","clear"],vV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tt(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,re(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return re(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:mV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(Vz);var yV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Tt(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Zp),_V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=Se(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Jl({style:md(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),h=new Jl({style:md(o,{text:c,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",(function(){kp(d,"_"+t.get("target"))})),p&&h.on("click",(function(){kp(p,"_"+t.get("subtarget"))})),cu(l).eventData=cu(h).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Gp(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(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"),i.x=v.x,i.y=v.y,i.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new Zl({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(zm);var xV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return Tt(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.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},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],re(n,(function(e,n){var i,o=za(Ra(e),"");me(e)?(i=Qt(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new bx([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Zp),bV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="timeline.slider",e.defaultOption=Gd(xV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(xV);ne(bV,Dg.prototype);var wV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="timeline",e}(zm),SV=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return Tt(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(fw),AV=Math.PI,TV=Ua(),MV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return fm("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},re(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:AV/2},d="vertical"===s?l.height:l.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=t.get(["label","rotate"])||0;y=y*AV/180;var _=p.get("position",!0),x=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,A=d;"left"===_||"bottom"===_?(x&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[A-g,0],A-=v)):(x&&(i=[A-g,0],A-=v),b&&(r=[0,0],S+=v),w&&(o=[A-g,0],A-=v));var T=[S,A];return t.get("inverse")&&T.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:h[s],labelRotation:y,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:T,controlSize:g,controlGap:m}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;kn(o,o,[-a,-s]),On(o,o,-AV/2),kn(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=m(r),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=l[0][0];var p,f=t.labelPosOpt;null==f||pe(f)?(v(h,u,l,1,p="+"===f?0:1),v(d,c,l,1,1-p)):(v(h,u,l,1,p=f>=0?0:1),d[1]=h[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Xx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new sb({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Yx}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new SV("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new qo;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new ah({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:Kt({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new ah({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:$t({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],re(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),h={x:a,y:0,onclick:ue(r._changeTimeline,r,t.value)},d=IV(s,l,e,h);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),nc(d);var p=cu(d);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=i):p.dataIndex=p.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],re(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),h=n.dataToCoord(i.tickValue),d=new Jl({x:h,y:0,rotation:t.labelRotation-t.rotation,onclick:ue(r._changeTimeline,r,a),silent:!1,style:md(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=md(u),d.ensureState("progress").style=md(c),e.add(d),nc(d),TV(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=zo(Se(i.get(["controlStyle",n+"BtnSize"]),r),r),h=function(t,e,n,i){var r=i.style,o=id(t.get(["controlStyle",e]),i||{},new Zn(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});h.ensureState("emphasis").style=s,e.add(h),nc(h)}}c(t.nextBtnPosition,"next",ue(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",ue(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",ue(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=ue(s._handlePointerDrag,s),t.ondragend=ue(s._handlePointerDragend,s),CV(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){CV(t,s._progressLine,o,n,i)}};this._currentPointer=IV(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=sa(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var FV={min:ce(zV,"min"),max:ce(zV,"max"),average:ce(zV,"average"),median:ce(zV,"median")};function VV(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!he(e.coord)&&he(r)){var o=GV(e,n,i,t);if((e=Qt(e)).type&&FV[e.type]&&o.baseAxis&&o.valueAxis){var a=te(r,o.baseAxis.dim),s=te(r,o.valueAxis.dim),l=FV[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&he(r))for(var u=e.coord,c=0;c<2;c++)FV[u[c]]&&(u[c]=WV(n,n.mapDimension(r[c]),u[c]));else e.coord=[];return e}}function GV(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function UV(t,e){return!(t&&t.containData&&e.coord&&!BV(e))||t.containData(e.coord)}function HV(t,e){return t?function(t,n,i,r){return Ng(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return Ng(t.value,e[r])}}function WV(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var XV=Ua(),jV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.init=function(){this.markerGroupMap=ke()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){XV(t).keep=!1})),e.eachSeries((function(t){var r=kV.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!XV(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){XV(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;re(t,(function(t){var i=kV.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Xu(t):ju(t))}))}))},e.type="marker",e}(zm);function YV(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=oa(a.get("x"),n.getWidth()),l=oa(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),c=t.get(i.dimensions[1],r);o=i.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var ZV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=kV.getMarkerModelFromSeries(t,"markPoint");e&&(YV(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new PA),u=function(t,e,n){var i;i=t?oe(t&&t.dimensions,(function(t){return Kt(Kt({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new bx(i,n),o=oe(n.get("data"),ce(VV,e));t&&(o=se(o,ce(UV,t)));var a=HV(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),YV(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(de(i)||de(r)||de(o)||de(s)){var c=e.getRawValue(t),h=e.getDataParams(t);de(i)&&(i=i(c,h)),de(r)&&(r=r(c,h)),de(o)&&(o=o(c,h)),de(s)&&(s=s(c,h))}var d=n.getModel("itemStyle").getItemStyle(),p=zv(a,"color");d.fill||(d.fill=p),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){cu(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(jV);var QV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(kV),qV=Ua(),JV=function(t,e,n,i){var r,o=t.getData();if(he(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=we(i.yAxis,i.xAxis);else{var u=GV(i,o,e,t);s=u.valueAxis,l=WV(o,Lx(o,u.valueDataDim),a)}var c="x"===s.dim?0:1,h=1-c,d=Qt(i),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var f=n.get("precision");f>=0&&ge(l)&&(l=+l.toFixed(Math.min(f,20))),d.coord[c]=p.coord[c]=l,r=[d,p,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[VV(t,r[0]),VV(t,r[1]),Kt({},r[2])];return g[2].type=g[2].type||null,qt(g[2],g[0]),qt(g[2],g[1]),g};function KV(t){return!isNaN(t)&&!isFinite(t)}function $V(t,e,n,i){var r=1-t,o=i.dimensions[t];return KV(e[r])&&KV(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function tG(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&($V(1,n,i,t)||$V(0,n,i,t)))return!0}return UV(t,e[0])&&UV(t,e[1])}function eG(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=oa(s.get("x"),r.getWidth()),u=oa(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,h=t.get(c[0],e),d=t.get(c[1],e);o=a.dataToPoint([h,d])}if(jA(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;KV(t.get(c[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):KV(t.get(c[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var nG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=kV.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=qV(e).from,o=qV(e).to;r.each((function(e){eG(r,e,!0,t,n),eG(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new aL);this.group.add(l.group);var u=function(t,e,n){var i;i=t?oe(t&&t.dimensions,(function(t){return Kt(Kt({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new bx(i,n),o=new bx(i,n),a=new bx([],n),s=oe(n.get("data"),ce(JV,e,t,n));t&&(s=se(s,ce(tG,t)));var l=HV(!!t,i);return r.initData(oe(s,(function(t){return t[0]})),null,l),o.initData(oe(s,(function(t){return t[1]})),null,l),a.initData(oe(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),c=u.from,h=u.to,d=u.line;qV(e).from=c,qV(e).to=h,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),m=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);eG(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=zv(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Se(o.get("symbolOffset",!0),m[r?0:1]),symbolRotate:Se(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:Se(o.get("symbolSize"),f[r?0:1]),symbol:Se(o.get("symbol",!0),p[r?0:1]),style:s})}he(p)||(p=[p,p]),he(f)||(f=[f,f]),he(g)||(g=[g,g]),he(m)||(m=[m,m]),u.from.each((function(t){v(c,t,!0),v(h,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[c.getItemLayout(t),h.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(t,"symbolOffset"),toSymbolRotate:h.getItemVisual(t,"symbolRotate"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){cu(t).dataModel=e,t.traverse((function(t){cu(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(jV);var iG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(kV),rG=Ua(),oG=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=VV(t,r),s=VV(t,o),l=a.coord,u=s.coord;l[0]=we(l[0],-1/0),l[1]=we(l[1],-1/0),u[0]=we(u[0],1/0),u[1]=we(u[1],1/0);var c=Jt([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function aG(t){return!isNaN(t)&&!isFinite(t)}function sG(t,e,n,i){var r=1-t;return aG(e[r])&&aG(n[r])}function lG(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return jA(t,"cartesian2d")?!(!n||!i||!sG(1,n,i)&&!sG(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!BV(e)&&!BV(n))||t.containZone(e.coord,n.coord)}(t,r,o):UV(t,r)||UV(t,o)}function uG(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=oa(s.get(n[0]),r.getWidth()),u=oa(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),d=a.clampData(c),p=a.clampData(h),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?h[0]:c[0]:f[0]=d[0]>p[0]?c[0]:h[0],"y0"===n[1]?f[1]=d[1]>p[1]?h[1]:c[1]:f[1]=d[1]>p[1]?c[1]:h[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[y=t.get(n[0],e),_=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(jA(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=t.get(n[0],e),_=t.get(n[1],e);aG(y)?o[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):aG(_)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var cG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],hG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=kV.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=oe(cG,(function(r){return uG(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new qo});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=oe(t&&t.dimensions,(function(t){var n=e.getData();return Kt(Kt({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=oe(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new bx(r,n)}else i=new bx(r=[{name:"value",type:"float"}],n);var s=oe(n.get("data"),ce(oG,e,t,n));t&&(s=se(s,ce(lG,t)));var l=t?function(t,e,n,i){return Ng(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return Ng(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=oe(cG,(function(n){return uG(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];sa(h),sa(d);var p=!!(l[0]>h[1]||l[1]d[1]||c[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Zp),pG=ce,fG=re,gG=qo,mG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return Tt(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new gG),this.group.add(this._selectorGroup=new gG),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),h=Gp(l,u,c),d=this.layoutInner(t,r,h,i,a,s),p=Gp($t({width:d.width,height:d.height},l),u,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Xz(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ke(),u=e.get("selectedMode"),c=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&c.push(t.id)})),fG(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var h=new gG;return h.newline=!0,void s.add(h)}var d=n.getSeriesByName(a)[0];if(!l.get(a))if(d){var p=d.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(d,a,o,r,e,t,f,m,g,u,i);v.on("click",pG(vG,a,null,i,c)).on("mouseover",pG(_G,d.name,null,i,c)).on("mouseout",pG(xG,d.name,null,i,c)),n.ssr&&v.eachChild((function(t){var e=cu(t);e.seriesIndex=d.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var h=s.legendVisualProvider;if(!h.containName(a))return;var d=h.indexOfName(a),p=h.getItemVisual(d,"style"),f=h.getItemVisual(d,"legendIcon"),g=ur(p.fill);g&&0===g[3]&&(g[3]=.2,p=Kt(Kt({},p),{fill:gr(g,"rgba")}));var m=this._createItem(s,a,o,r,e,t,{},p,f,u,i);m.on("click",pG(vG,null,a,i,c)).on("mouseover",pG(_G,null,a,i,c)).on("mouseout",pG(xG,null,a,i,c)),n.ssr&&m.eachChild((function(t){var e=cu(t);e.seriesIndex=s.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}}),this)}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();fG(t,(function(t){var i=t.type,r=new Jl({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),fd(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),nc(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,c){var h=t.visualDrawType,d=r.get("itemWidth"),p=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),v=i.get("icon"),y=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),fG(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",h=l.getShallow("decal");u.decal=h&&"inherit"!==h?Ly(h,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",i,a,s,h,f,c),_=new gG,x=i.getModel("textStyle");if(!de(t.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;_.add(function(t){var e=t.icon||"roundRect",n=ty(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:d,itemHeight:p,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else _.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?d+5:-5,S=o,A=r.get("formatter"),T=e;pe(A)&&A?T=A.replace("{name}",null!=e?e:""):de(A)&&(T=A(e));var M=f?x.getTextColor():i.get("inactiveColor");_.add(new Jl({style:md(x,{text:T,x:w,y:p/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var I=new Zl({shape:_.getBoundingRect(),style:{fill:"transparent"}}),C=i.getModel("tooltip");return C.get("show")&&sd({el:I,componentModel:r,itemName:e,itemTooltipOption:C.option}),_.add(I),_.eachChild((function(t){t.silent=!0})),I.silent=!u,this.getContentGroup().add(_),nc(_),_.__legendDataIndex=n,_},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Vp(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Vp("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(zm);function vG(t,e,n,i){xG(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),_G(t,e,n,i)}function yG(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-h.x,-h.y];e||(f[i]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=Se(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?m[i]+=n[r]-d[r]:g[i]+=d[r]+v);m[1-i]+=h[o]/2-d[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[r]=p?n[r]:h[r],y[o]=Math.max(h[o],d[o]),y[a]=Math.min(0,d[a]+m[1-i]),u.__rectSize=n[r],p){var _={x:0,y:0};_[r]=Math.max(n[r]-d[r]-v,0),_[o]=y[o],u.setClipPath(new Zl({shape:_})),u.__rectSize=_[r]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Lh(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?t:null),this._updatePageInfoView(t,x),y},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;re(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",pe(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=IG[r],a=CG[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(mG);function EG(t){Z_(SG),t.registerComponentModel(AG),t.registerComponentView(DG),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var LG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="dataZoom.inside",e.defaultOption=Gd(Cz.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Cz),PG=Ua();function RG(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function NG(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function kG(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function OG(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=PG(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ke());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){re(Mz(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:ce(kG,e),dispatchAction:ce(NG,t),dataZoomInfoMap:null,controller:null},i=n.controller=new fI(t.getZr());return re(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ke())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Km(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else RG(i,t)}))}))}var BG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return Tt(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){PG(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}(i,e,{pan:ue(zG.pan,this),zoom:ue(zG.zoom,this),scrollMove:ue(zG.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=PG(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return $L(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:FG((function(t,e,n,i,r,o){var a=VG[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:FG((function(t,e,n,i,r,o){return VG[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function FG(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return $L(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var VG={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function GG(t){zz(t),t.registerComponentModel(LG),t.registerComponentView(BG),OG(t)}var UG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Gd(Cz.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Cz),HG=Zl,WG="horizontal",XG="vertical",jG=["line","bar","candlestick","scatter"],YG={easing:"cubicOut",duration:100,delay:0},ZG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return Tt(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=ue(this._onBrush,this),this._onBrushEnd=ue(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Km(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){$m(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new qo;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===WG?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Xp(t.option);re(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Gp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===XG&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==WG||r?n===WG&&r?{scaleY:a?1:-1,scaleX:-1}:n!==XG||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new HG({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new HG({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:ue(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=r.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/e[0]);r.each([a],(function(t,e){if(y>0&&e%y)v+=m;else{var n=null==t||isNaN(t)||""===t,i=n?0:ra(t,u,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,h=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var _,x,b,w,S,A=this.dataZoomModel,T=0;T<3;T++){var M=(_=1===T,x=void 0,b=void 0,w=void 0,S=void 0,x=A.getModel(_?"selectedDataBackground":"dataBackground"),b=new qo,w=new eh({shape:{points:s},segmentIgnoreThreshold:1,style:x.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),S=new ih({shape:{points:l},segmentIgnoreThreshold:1,style:x.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),b.add(w),b.add(S),b);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}}}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){re(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&te(jG,t.get("type"))<0)){var a,s=i.getComponent(Az(r),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new HG({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new HG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),re([0,1],(function(e){var o=a.get("handleIcon");!Jv[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=ty(o,-1,0,2,2,null,!0);s.attr({cursor:QG(this._orient),draggable:!0,drift:ue(this._onDragMove,this,e),ondragend:ue(this._onDragEnd,this),onmouseover:ue(this._showDataInfo,this,!0),onmouseout:ue(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=oa(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),nc(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var h=a.getModel("textStyle");t.add(i[e]=new Jl({silent:!0,invisible:!0,style:md(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))}),this);var h=c;if(u){var d=oa(a.get("moveHandleSize"),o[1]),p=e.moveHandle=new Zl({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,g=e.moveHandleIcon=ty(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(h=e.moveZone=new Zl({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),r.add(p),r.add(g),r.add(h)}h.attr({draggable:!0,cursor:QG(this._orient),drift:ue(this._onDragMove,this,"all"),ondragstart:ue(this._showDataInfo,this,!0),ondragend:ue(this._onDragEnd,this),onmouseover:ue(this._showDataInfo,this,!0),onmouseout:ue(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[ra(t[0],[0,100],e,!0),ra(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];$L(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?ra(o.minSpan,a,r,!0):null,null!=o.maxSpan?ra(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=sa([ra(i[0],r,a,!0),ra(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=sa(n.slice()),r=this._size;re([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Fn(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=sa([ra(n.x,i,r,!0),ra(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(In(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new HG({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?YG:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=Mz(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lz);function QG(t){return"vertical"===t?"ns-resize":"ew-resize"}function qG(t){t.registerComponentModel(UG),t.registerComponentView(ZG),zz(t)}var JG=function(t,e,n){var i=Qt((KG[t]||{})[e]);return n&&he(i)?i[i.length-1]:i},KG={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]}},$G=WD.mapVisual,tU=WD.eachVisual,eU=he,nU=re,iU=sa,rU=ra,oU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return Tt(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&tV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=ue(t,this),this.controllerVisuals=$F(this.option.controller,e,t),this.targetVisuals=$F(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=Ea(t),e},e.prototype.eachTargetSeries=function(t,e){re(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],he(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return pe(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):de(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=iU([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});qt(i,n),qt(r,n);var o=this.isCategory();function a(n){eU(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},nU(i,(function(t,e){if(WD.isValidType(e)){var n=JG(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";nU(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&Qt(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&Qt(n)||(o?s[0]:[s[0],s[0]])),l.symbol=$G(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;tU(u,(function(t){t>c&&(c=t)})),l.symbolSize=$G(u,(function(t){return rU(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Zp),aU=[20,140],sU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=aU[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=aU[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):he(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),re(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=sa((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=lU(this,"outOfRange",this.getExtent()),n=lU(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new qo("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();fU([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=pU(t[l],[0,a[1]],s,!0),h=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=h/a[0],u.x=a[0]-h/2;var d=Kh(n.handleLabelPoints[l],Jh(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(t,"symbolSize"),d=pU(t,o,s,!0),p=a[0]-h/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=Kh(l.indicatorLabelPoint,Jh(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:p,y:d,style:{fill:c}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),m.animateTo(x,b)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,h=[];(e||_U(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function AU(t,e,n,i){for(var r=e.targetVisuals[i],o=WD.prepareVisualTypes(r),a={color:zv(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(bU,wU),re(SU,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(MU))}function EU(t){t.registerComponentModel(sU),t.registerComponentView(vU),DU(t)}var LU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return Tt(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],PU[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=Qt(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=oe(this._pieceList,(function(t){return t=Qt(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=WD.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}re(e.pieces,(function(t){re(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),re(n,(function(t,n){var i=!1;re(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&re(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=JG(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,re(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;re(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Qt(t)},e.prototype.getValueState=function(t){var e=WD.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){WD.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return re(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Gd(oU.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(oU),PU={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function RU(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var NU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Tt(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=we(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,c,a),re(l.viewPieceList,(function(i){var l=i.piece,u=new qo;u.onclick=ue(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=e.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new Jl({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===d?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,c,a),Vp(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:dU(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return hU(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new qo,a=this.visualMapModel.textStyleModel;o.add(new Jl({style:md(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=oe(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(ty(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=Qt(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,re(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(uU);function kU(t){t.registerComponentModel(LU),t.registerComponentView(NU),DU(t)}var OU={label:{enabled:!0},decal:{show:!1}},BU=Ua(),zU={};function FU(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=Qt(OU);qt(i.label,t.getLocaleModel().get("aria"),!1),qt(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ke();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),BU(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(de(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=wf(e.ecModel,e.name,zU,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=BU(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",c=wf(e.ecModel,r,s,l),h=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(h,c))}))}}function u(t,e){var n=t?Kt(Kt({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=e.getZr().dom;if(!i)return;var a=t.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=$t(s.option,a),!s.get("enabled"))return;if(s.get("description"))return void i.setAttribute("aria-label",s.get("description"));var l,u=t.getSeriesCount(),c=s.get(["data","maxCount"])||10,h=s.get(["series","maxCount"])||10,d=Math.min(u,h);if(u<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();l=p?r(s.get(["general","withTitle"]),{title:p}):s.get(["general","withoutTitle"]);var f=[];l+=r(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),t.eachSeries((function(t,e){if(e1?s.get(["series","multiple",i]):s.get(["series","single",i]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var a=t.getData();if(a.count()>c)n+=r(s.get(["data","partialData"]),{displayCnt:c});else n+=s.get(["data","allData"]);for(var l=s.get(["data","separator","middle"]),h=s.get(["data","separator","end"]),p=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},UU=function(){function t(t){var e;if(null==(this._condVal=pe(t)?new RegExp(t):(e=t,"[object RegExp]"===Bt.call(e)?t:null))){Ma("")}}return t.prototype.evaluate=function(t){var e=y(t);return pe(e)?this._condVal.test(t):!!ge(e)&&this._condVal.test(t+"")},t}(),HU=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),WU=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){rH(t,i)&&rH(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nA:I2&&l.push(e),l}function aH(t,e,n,i,r,o,a,s,l,u){if(rH(t,n)&&rH(e,i)&&rH(r,a)&&rH(o,s))l.push(a,s);else{var c=2/u,h=c*c,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,m=i-e,v=r-a,y=o-s,_=g*g+m*m,x=v*v+y*y;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],A=[];Oi(t,n,r,a,.5,S),Oi(e,i,o,s,.5,A),aH(S[0],A[0],S[1],A[1],S[2],A[2],S[3],A[3],l,u),aH(S[4],A[4],S[5],A[5],S[6],A[6],S[7],A[7],l,u)}}}}function sH(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),h=sH([l,u],c?0:1,e),d=(c?s:u)/h.length,p=0;p1?null:new Fn(p*l+t,p*u+e)}function hH(t,e,n){var i=new Fn;Fn.sub(i,n,e),i.normalize();var r=new Fn;return Fn.sub(r,t,e),r.dot(i)}function dH(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function pH(t){var e=t.points,n=[],i=[];Ws(e,n,i);var r=new Zn(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Fn,c=new Fn;return o>a?(u.x=c.x=s+o/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=sH([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",c=o?"y":"x",h=t[s]/a.length,d=0;d0;l/=2){var u=0,c=0;(t&l)>0&&(u=1),(e&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function EH(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=oe(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return oe(o,(function(o,a){return{cp:o,z:DH(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function LH(t){return mH(t.path,t.count)}function PH(t){return he(t[0])}function RH(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var NH={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);PH(t)&&(s=t,l=e),PH(e)&&(s=e,l=t);for(var h=s?s===t:t.length>e.length,d=s?RH(l,s):RH(h?e:t,[h?t:e]),p=0,f=0;fBH))for(var r=n.getIndices(),o=0;o0&&i.group.traverse((function(t){t instanceof Ol&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function QH(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function qH(t){return he(t)?t.sort().join(","):t}function JH(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function KH(t,e){for(var n=0;n=0&&r.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:JH(e.oldData[n]),groupIdDim:t.dimension})})),re(Ea(t.to),(function(t){var i=KH(n.updatedSeries,t);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:e.oldDataGroupIds[i],data:r,divide:JH(r),groupIdDim:t.dimension})}})),r.length>0&&o.length>0&&ZH(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=ke(),i=ke(),r=ke();return re(t.oldSeries,(function(e,n){var o=t.oldDataGroupIds[n],a=t.oldData[n],s=QH(e),l=qH(s);i.set(l,{dataGroupId:o,data:a}),he(s)&&re(s,(function(t){r.set(t,{key:l,dataGroupId:o,data:a})}))})),re(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),a=QH(t),s=qH(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:JH(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:JH(o),data:o}]});else if(he(a)){var u=[];re(a,(function(t){var e=i.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:JH(e.data),data:e.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:JH(o)}]})}else{var c=r.get(a);if(c){var h=n.get(c.key);h||(h={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:JH(c.data)}],newSeries:[]},n.set(c.key,h)),h.newSeries.push({dataGroupId:e,data:o,divide:JH(o)})}}}})),n}(i,n);re(o.keys(),(function(t){var n=o.get(t);ZH(n.oldSeries,n.newSeries,e)}))}re(n.updatedSeries,(function(t){t[Dm]&&(t[Dm]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],u=i.oldData=[],c=0;c=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}},fW={supportWebGL:function(){if(null==dW)try{var t=document.createElement("canvas");if(!(t.getContext("webgl")||t.getContext("experimental-webgl")))throw new Error}catch(KJ){dW=!1}return dW}};fW.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,fW.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,fW.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,fW.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,fW.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,fW.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,fW.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var gW={};"undefined"!=typeof window?gW=window:"undefined"!=typeof global&&(gW=global),fW.requestAnimationFrame=gW.requestAnimationFrame||gW.msRequestAnimationFrame||gW.mozRequestAnimationFrame||gW.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},fW.createCanvas=function(){return document.createElement("canvas")},fW.createImage=function(){return new gW.Image},fW.request={get:pW.get},fW.addEventListener=function(t,e,n,i){t.addEventListener(e,n,i)},fW.removeEventListener=function(t,e,n){t.removeEventListener(e,n)};var mW=function(){this.head=null,this.tail=null,this._length=0};mW.prototype.insert=function(t){var e=new mW.Entry(t);return this.insertEntry(e),e},mW.prototype.insertAt=function(t,e){if(!(t<0)){for(var n=this.head,i=0;n&&i!=t;)n=n.next,i++;if(n){var r=new mW.Entry(e),o=n.prev;o?(o.next=r,r.prev=o):this.head=r,r.next=n,n.prev=r}else this.insert(e)}},mW.prototype.insertBeforeEntry=function(t,e){var n=new mW.Entry(t),i=e.prev;i?(i.next=n,n.prev=i):this.head=n,n.next=e,e.prev=n,this._length++},mW.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},mW.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._length--},mW.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e?(this.remove(e),e.value):void 0}},mW.prototype.getHead=function(){if(this.head)return this.head.value},mW.prototype.getTail=function(){if(this.tail)return this.tail.value},mW.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e.value}},mW.prototype.indexOf=function(t){for(var e=this.head,n=0;e;){if(e.value===t)return n;e=e.next,n++}},mW.prototype.length=function(){return this._length},mW.prototype.isEmpty=function(){return 0===this._length},mW.prototype.forEach=function(t,e){for(var n=this.head,i=0,r=void 0!==e;n;)r?t.call(e,n.value,i):t(n.value,i),n=n.next,i++},mW.prototype.clear=function(){this.tail=this.head=null,this._length=0},mW.Entry=function(t){this.value=t,this.next=null,this.prev=null};var vW=function(t){this._list=new mW,this._map={},this._maxSize=t||10};vW.prototype.setMaxSize=function(t){this._maxSize=t},vW.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var n=this._list.length();if(n>=this._maxSize&&n>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},vW.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},vW.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},vW.prototype.clear=function(){this._list.clear(),this._map={}};var yW={},_W={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function xW(t){return(t=Math.round(t))<0?0:t>255?255:t}function bW(t){return t<0?0:t>1?1:t}function wW(t){return t.length&&"%"===t.charAt(t.length-1)?xW(parseFloat(t)/100*255):xW(parseInt(t,10))}function SW(t){return t.length&&"%"===t.charAt(t.length-1)?bW(parseFloat(t)/100):bW(parseFloat(t))}function AW(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function TW(t,e,n){return t+(e-t)*n}function MW(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function IW(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var CW=new vW(20),DW=null;function EW(t,e){DW&&IW(DW,e),DW=CW.put(t,DW||e.slice())}function LW(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=SW(t[1]),r=SW(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return MW(e=e||[],xW(255*AW(a,o,n+1/3)),xW(255*AW(a,o,n)),xW(255*AW(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}yW.parse=function(t,e){if(t){e=e||[];var n=CW.get(t);if(n)return IW(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in _W)return IW(e,_W[r]),EW(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?(MW(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),EW(t,e),e):void MW(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?(MW(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),EW(t,e),e):void MW(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void MW(e,0,0,0,1);u=SW(l.pop());case"rgb":return 3!==l.length?void MW(e,0,0,0,1):(MW(e,wW(l[0]),wW(l[1]),wW(l[2]),u),EW(t,e),e);case"hsla":return 4!==l.length?void MW(e,0,0,0,1):(l[3]=SW(l[3]),LW(l,e),EW(t,e),e);case"hsl":return 3!==l.length?void MW(e,0,0,0,1):(LW(l,e),EW(t,e),e);default:return}}MW(e,0,0,0,1)}},yW.parseToFloat=function(t,e){if(e=yW.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},yW.lift=function(t,e){var n=yW.parse(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return yW.stringify(n,4===n.length?"rgba":"rgb")}},yW.toHex=function(t){var e=yW.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},yW.fastLerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=xW(TW(a[0],s[0],l)),n[1]=xW(TW(a[1],s[1],l)),n[2]=xW(TW(a[2],s[2],l)),n[3]=bW(TW(a[3],s[3],l)),n}},yW.fastMapToColor=yW.fastLerp,yW.lerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=yW.parse(e[r]),s=yW.parse(e[o]),l=i-r,u=yW.stringify([xW(TW(a[0],s[0],l)),xW(TW(a[1],s[1],l)),xW(TW(a[2],s[2],l)),bW(TW(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}},yW.mapToColor=yW.lerp,yW.modifyHSL=function(t,e,n,i){if(t=yW.parse(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-h:r===s?e=1/3+c-d:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(t[1]=SW(n)),null!=i&&(t[2]=SW(i)),yW.stringify(LW(t),"rgba")},yW.modifyAlpha=function(t,e){if((t=yW.parse(t))&&null!=e)return t[3]=bW(e),yW.stringify(t,"rgba")},yW.stringify=function(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}};var PW=yW.parseToFloat,RW={};function NW(t){var e=Object.keys(t);e.sort();for(var n=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"===y(t))for(var n in t){var i=t[n];this.setUniform(n,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var n=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var r=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=aW.clone(t.vertexDefines),this.fragmentDefines=aW.clone(t.fragmentDefines),e){for(var a in n)i[a]&&(i[a].value=n[a].value);aW.defaults(this.vertexDefines,r),aW.defaults(this.fragmentDefines,o)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:!(!e||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=aW.clone(this.vertexDefines),t.fragmentDefines=aW.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,n){var i=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(n=e,e=t,t="both"),n=null!=n?n:null,"vertex"!==t&&"both"!==t||i[e]!==n&&(i[e]=n,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==n&&(r[e]=n,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},VW.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},VW.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},VW.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},VW.random=function(t,e){e=e||1;var n=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},VW.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},VW.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},VW.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},VW.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},VW.forEach=(kW=VW.create(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0&&i.push("#define "+r.toUpperCase()+"_COUNT "+o)}if(n)for(var a=0;al.getMaxJointNumber()&&(d.USE_SKIN_MATRICES_TEXTURE=null),h+="\n"+qW(d)+"\n"}o&&(h+="\n#define INSTANCING\n");var p=h+qW(e.vertexDefines,s,c),f=h+qW(e.fragmentDefines,s,c),g=p+"\n"+e.shader.vertex,m=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=l.getGLExtension(t)}));m.indexOf("EXT_shader_texture_lod")>=0&&(f+="\n#define SUPPORT_TEXTURE_LOD"),m.indexOf("OES_standard_derivatives")>=0&&(f+="\n#define SUPPORT_STANDARD_DERIVATIVES");var v,y,_=function(t){for(var e=[],n=0;n=0){if(1!==s&&4!==s){hX();break}s=2,u=[]}else if(1!==s)if(4!==s)c(h),s=0;else{var d=h;rX.indexOf(d)>=0||oX.indexOf(d)>=0||aX.indexOf(d)>=0?l[a].semantic=d:"ignore"===d||"unconfigurable"===d?l[a].ignore=!0:l[a].value="bool"===t?"true"===d:parseFloat(d)}else l[a].value="bool"===t?"true"===h:parseFloat(h),u=null;else{if(2!==s){hX();break}if(!(u instanceof Array)){hX();break}u.push(+i[++o])}else l[a].value=new fW.Float32Array(u),u=null,s=5;else if(2===s){if(!(u instanceof Array)){hX();break}u.push(+i[++o])}else s=5;else s=4;else{if(0!==s&&3!==s){hX();break}s=1}}return l}function pX(t,e){"object"===y(t)&&(e=t.fragment,t=t.vertex),t=cX(t),e=cX(e),this._shaderID=function(t,e){var n="vertex:"+t+"fragment:"+e;if(lX[n])return lX[n];var i=aW.genGUID();return lX[n]=i,uX[i]={vertex:t,fragment:e},i}(t,e),this._vertexCode=pX.parseImport(t),this._fragmentCode=pX.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}pX.prototype={constructor:pX,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var n=this.uniformTemplates[e];t[e]={type:n.type,value:n.value()}}return t},_parseImport:function(){this._vertexCode=pX.parseImport(this.vertex),this._fragmentCode=pX.parseImport(this.fragment)},_addSemanticUniform:function(t,e,n){if(rX.indexOf(n)>=0)this.attributeSemantics[n]={symbol:t,type:e};else if(aX.indexOf(n)>=0){var i=!1,r=n;n.match(/TRANSPOSE$/)&&(i=!0,r=n.slice(0,-9)),this.matrixSemantics[n]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:r}}else oX.indexOf(n)>=0&&(this.uniformSemantics[n]={symbol:t,type:e})},_addMaterialUniform:function(t,e,n,i,r,o){o[t]={type:n,value:r?iX.array:i||iX[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function n(t){return null!=t?function(){return t}:null}function i(i,r,o){var a=dX(r,o),s=[];for(var l in a){var u=a[l],c=u.semantic,h=l,d=eX[r],p=n(a[l].value);a[l].isArray&&(h+="["+a[l].arraySize+"]",d+="v"),s.push(h),e._uniformList.push(l),u.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[l]={shaderType:"fragment",type:r}),c?e._addSemanticUniform(l,d,c):e._addMaterialUniform(l,r,d,p,a[l].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(KW,i),this._fragmentCode=this._fragmentCode.replace(KW,i),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace($W,(function(n,i,r){var o=dX(i,r),a=sX[i]||1,s=[];for(var l in o){var u=o[l].semantic;if(t[l]={type:"float",size:a,semantic:u||null},u){if(rX.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:i}}s.push(l)}return"attribute "+i+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,n,i){var r=t.fragmentDefines;return r[n]||(r[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}this._vertexCode=this._vertexCode.replace(tX,e),this._fragmentCode=this._fragmentCode.replace(tX,e)},clone:function(){var t=uX[this._shaderID];return new pX(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(pX.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(pX.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(pX.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(pX.prototype,"uniforms",{get:function(){return this._uniformList}}));var fX=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;pX.parseImport=function(t){return t=t.replace(fX,(function(t,e,n){return(t=pX.source(n))?pX.parseImport(t):(console.error('Shader chunk "'+n+'" not existed in library'),"")}))};var gX=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;pX.import=function(t){t.replace(gX,(function(t,e,n,i){if(i=i.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,o=n.split("."),a=pX.codes,s=0;s0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},yX.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},yX.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},yX.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},yX.random=function(t,e){e=e||1;var n=2*FW()*Math.PI,i=2*FW()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t},yX.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},yX.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},yX.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,h=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=c*u+p*-a+h*-l-d*-s,t[1]=h*u+p*-s+d*-a-c*-l,t[2]=d*u+p*-l+c*-s-h*-a,t},yX.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},yX.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},yX.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},yX.forEach=function(){var t=yX.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=3),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s1?0:Math.acos(r)},pX.import(mX);var _X=vX.create,xX={};function bX(t){return t.material}function wX(t,e,n){return e.uniforms[n].value}function SX(t,e,n,i){return n!==i}function AX(t){return!0}function TX(){}var MX={float:hW.FLOAT,byte:hW.BYTE,ubyte:hW.UNSIGNED_BYTE,short:hW.SHORT,ushort:hW.UNSIGNED_SHORT};function IX(t,e,n){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=n,this.vao=null}function CX(t){var e,n;this.bind=function(t){e||((e=fW.createCanvas()).width=e.height=1,e.getContext("2d"));var i=t.gl,r=!n;r&&(n=i.createTexture()),i.bindTexture(i.TEXTURE_2D,n),r&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var DX=sW.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=fW.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new cW(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(KJ){throw"Error creating WebGL Context "+KJ}this._programMgr=new JW(this),this._placeholderTexture=new CX}),{resize:function(t,e){var n=this.canvas,i=this.devicePixelRatio;null!=t?(n.style&&(n.style.width=t+"px",n.style.height=e+"px"),n.width=t*i,n.height=e*i,this._width=t,this._height=e):(this._width=n.width/i,this._height=n.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,n,i,r){if("object"===y(t)){var o=t;t=o.x,e=o.y,n=o.width,i=o.height,r=o.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,n*r,i*r),this.viewport={x:t,y:e,width:n,height:i,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,n,i){var r=this.gl,o=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var a=this.viewport,s=!1,l=a.devicePixelRatio;(a.width!==this._width||a.height!==this._height||l&&l!==this.devicePixelRatio||a.x||a.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(a.x*l,a.y*l,a.width*l,a.height*l)),r.clearColor(o[0],o[1],o[2],o[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(n||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var c=u.opaque,h=u.transparent,d=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(c,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var p=_X(),f=yX.create(),g=0;g0){var s=t[r-1],l=s.joints?s.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===s.material&&o.lightGroup===s.lightGroup){o.__program=s.__program;continue}}var u=this._programMgr.getProgram(o,a,e);this.validateProgram(u),o.__program=u}},renderPass:function(t,e,n){this.trigger("beforerenderpass",this,t,e,n),(n=n||{}).getMaterial=n.getMaterial||bX,n.getUniform=n.getUniform||wX,n.isMaterialChanged=n.isMaterialChanged||SX,n.beforeRender=n.beforeRender||TX,n.afterRender=n.afterRender||TX;var i=n.ifRender||AX;this.updatePrograms(t,this._sceneRendering,n),n.sortCompare&&t.sort(n.sortCompare);var r=this.viewport,o=r.devicePixelRatio,a=[r.x*o,r.y*o,r.width*o,r.height*o],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[a[2],a[3]],c=Date.now();e?(vX.copy(EX.VIEW,e.viewMatrix.array),vX.copy(EX.PROJECTION,e.projectionMatrix.array),vX.copy(EX.VIEWINVERSE,e.worldTransform.array)):(vX.identity(EX.VIEW),vX.identity(EX.PROJECTION),vX.identity(EX.VIEWINVERSE)),vX.multiply(EX.VIEWPROJECTION,EX.PROJECTION,EX.VIEW),vX.invert(EX.PROJECTIONINVERSE,EX.PROJECTION),vX.invert(EX.VIEWPROJECTIONINVERSE,EX.VIEWPROJECTION);for(var h,d,p,f,g,m,v,y,_,x,b,w,S=this.gl,A=this._sceneRendering,T=null,M=0;Mthis.getMaxJointNumber()){var o=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,o,n),e.setUniform(i,"1i","skinMatricesTexture",n),e.setUniform(i,"1f","skinMatricesTextureSize",o.width)}else{var a=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",a)}},_renderObject:function(t,e,n){var i=this.gl,r=t.geometry,o=t.mode;null==o&&(o=4);var a=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(!s||(a=this.getGLExtension("ANGLE_instanced_arrays"))){var l;if(s&&(l=this._bindInstancedAttributes(t,n,a)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint")&&r.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?a.drawElementsInstancedANGLE(o,e.indicesBuffer.count,u,0,t.getInstanceCount()):i.drawElements(o,e.indicesBuffer.count,u,0)}else s?a.drawArraysInstancedANGLE(o,0,r.vertexCount,t.getInstanceCount()):i.drawArrays(o,0,r.vertexCount);if(s)for(var c=0;cn?n:t}LX.add=function(t,e,n){return yX.add(t.array,e.array,n.array),t._dirty=!0,t},LX.set=function(t,e,n,i){yX.set(t.array,e,n,i),t._dirty=!0},LX.copy=function(t,e){return yX.copy(t.array,e.array),t._dirty=!0,t},LX.cross=function(t,e,n){return yX.cross(t.array,e.array,n.array),t._dirty=!0,t},LX.dist=function(t,e){return yX.distance(t.array,e.array)},LX.distance=LX.dist,LX.div=function(t,e,n){return yX.divide(t.array,e.array,n.array),t._dirty=!0,t},LX.divide=LX.div,LX.dot=function(t,e){return yX.dot(t.array,e.array)},LX.len=function(t){return yX.length(t.array)},LX.lerp=function(t,e,n,i){return yX.lerp(t.array,e.array,n.array,i),t._dirty=!0,t},LX.min=function(t,e,n){return yX.min(t.array,e.array,n.array),t._dirty=!0,t},LX.max=function(t,e,n){return yX.max(t.array,e.array,n.array),t._dirty=!0,t},LX.mul=function(t,e,n){return yX.multiply(t.array,e.array,n.array),t._dirty=!0,t},LX.multiply=LX.mul,LX.negate=function(t,e){return yX.negate(t.array,e.array),t._dirty=!0,t},LX.normalize=function(t,e){return yX.normalize(t.array,e.array),t._dirty=!0,t},LX.random=function(t,e){return yX.random(t.array,e),t._dirty=!0,t},LX.scale=function(t,e,n){return yX.scale(t.array,e.array,n),t._dirty=!0,t},LX.scaleAndAdd=function(t,e,n,i){return yX.scaleAndAdd(t.array,e.array,n.array,i),t._dirty=!0,t},LX.sqrDist=function(t,e){return yX.sqrDist(t.array,e.array)},LX.squaredDistance=LX.sqrDist,LX.sqrLen=function(t){return yX.sqrLen(t.array)},LX.squaredLength=LX.sqrLen,LX.sub=function(t,e,n){return yX.subtract(t.array,e.array,n.array),t._dirty=!0,t},LX.subtract=LX.sub,LX.transformMat3=function(t,e,n){return yX.transformMat3(t.array,e.array,n.array),t._dirty=!0,t},LX.transformMat4=function(t,e,n){return yX.transformMat4(t.array,e.array,n.array),t._dirty=!0,t},LX.transformQuat=function(t,e,n){return yX.transformQuat(t.array,e.array,n.array),t._dirty=!0,t};var kX=Math.atan2,OX=Math.asin,BX=Math.abs;LX.eulerFromQuat=function(t,e,n){t._dirty=!0,e=e.array;var i=t.array,r=e[0],o=e[1],a=e[2],s=e[3],l=r*r,u=o*o,c=a*a,h=s*s;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":i[0]=kX(2*(r*s-o*a),h-l-u+c),i[1]=OX(NX(2*(r*a+o*s),-1,1)),i[2]=kX(2*(a*s-r*o),h+l-u-c);break;case"YXZ":i[0]=OX(NX(2*(r*s-o*a),-1,1)),i[1]=kX(2*(r*a+o*s),h-l-u+c),i[2]=kX(2*(r*o+a*s),h-l+u-c);break;case"ZXY":i[0]=OX(NX(2*(r*s+o*a),-1,1)),i[1]=kX(2*(o*s-a*r),h-l-u+c),i[2]=kX(2*(a*s-r*o),h-l+u-c);break;case"ZYX":i[0]=kX(2*(r*s+a*o),h-l-u+c),i[1]=OX(NX(2*(o*s-r*a),-1,1)),i[2]=kX(2*(r*o+a*s),h+l-u-c);break;case"YZX":i[0]=kX(2*(r*s-a*o),h-l+u-c),i[1]=kX(2*(o*s-r*a),h+l-u-c),i[2]=OX(NX(2*(r*o+a*s),-1,1));break;case"XZY":i[0]=kX(2*(r*s+o*a),h-l+u-c),i[1]=kX(2*(r*a+o*s),h+l-u-c),i[2]=OX(NX(2*(a*s-r*o),-1,1));break;default:console.warn("Unkown order: "+n)}return t},LX.eulerFromMat3=function(t,e,n){var i=e.array,r=i[0],o=i[3],a=i[6],s=i[1],l=i[4],u=i[7],c=i[2],h=i[5],d=i[8],p=t.array;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":p[1]=OX(NX(a,-1,1)),BX(a)<.99999?(p[0]=kX(-u,d),p[2]=kX(-o,r)):(p[0]=kX(h,l),p[2]=0);break;case"YXZ":p[0]=OX(-NX(u,-1,1)),BX(u)<.99999?(p[1]=kX(a,d),p[2]=kX(s,l)):(p[1]=kX(-c,r),p[2]=0);break;case"ZXY":p[0]=OX(NX(h,-1,1)),BX(h)<.99999?(p[1]=kX(-c,d),p[2]=kX(-o,l)):(p[1]=0,p[2]=kX(s,r));break;case"ZYX":p[1]=OX(-NX(c,-1,1)),BX(c)<.99999?(p[0]=kX(h,d),p[2]=kX(s,r)):(p[0]=0,p[2]=kX(-o,l));break;case"YZX":p[2]=OX(NX(s,-1,1)),BX(s)<.99999?(p[0]=kX(-u,l),p[1]=kX(-c,r)):(p[0]=0,p[1]=kX(a,d));break;case"XZY":p[2]=OX(-NX(o,-1,1)),BX(o)<.99999?(p[0]=kX(h,l),p[1]=kX(a,r)):(p[0]=kX(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+n)}return t._dirty=!0,t},Object.defineProperties(LX,{POSITIVE_X:{get:function(){return new LX(1,0,0)}},NEGATIVE_X:{get:function(){return new LX(-1,0,0)}},POSITIVE_Y:{get:function(){return new LX(0,1,0)}},NEGATIVE_Y:{get:function(){return new LX(0,-1,0)}},POSITIVE_Z:{get:function(){return new LX(0,0,1)}},NEGATIVE_Z:{get:function(){return new LX(0,0,-1)}},UP:{get:function(){return new LX(0,1,0)}},ZERO:{get:function(){return new LX}}});var zX,FX,VX,GX,UX,HX=1e-5,WX=function(t,e){this.origin=t||new LX,this.direction=e||new LX};WX.prototype={constructor:WX,intersectPlane:function(t,e){var n=t.normal.array,i=t.distance,r=this.origin.array,o=this.direction.array,a=yX.dot(n,o);if(0===a)return null;e||(e=new LX);var s=(yX.dot(n,r)-i)/a;return yX.scaleAndAdd(e.array,r,o,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=yX.dot(t.normal.array,this.direction.array);yX.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,2*-e),this.direction._dirty=!0},distanceToPoint:(UX=yX.create(),function(t){yX.sub(UX,t,this.origin.array);var e=yX.dot(UX,this.direction.array);if(e<0)return yX.distance(this.origin.array,t);var n=yX.lenSquared(UX);return Math.sqrt(n-e*e)}),intersectSphere:function(){var t=yX.create();return function(e,n,i){var r=this.origin.array,o=this.direction.array;e=e.array,yX.sub(t,e,r);var a=yX.dot(t,o),s=yX.squaredLength(t)-a*a,l=n*n;if(!(s>l)){var u=Math.sqrt(l-s),c=a-u,h=a+u;return i||(i=new LX),c<0?h<0?null:(yX.scaleAndAdd(i.array,r,o,h),i):(yX.scaleAndAdd(i.array,r,o,c),i)}}}(),intersectBoundingBox:function(t,e){var n,i,r,o,a,s,l=this.direction.array,u=this.origin.array,c=t.min.array,h=t.max.array,d=1/l[0],p=1/l[1],f=1/l[2];if(d>=0?(n=(c[0]-u[0])*d,i=(h[0]-u[0])*d):(i=(c[0]-u[0])*d,n=(h[0]-u[0])*d),p>=0?(r=(c[1]-u[1])*p,o=(h[1]-u[1])*p):(o=(c[1]-u[1])*p,r=(h[1]-u[1])*p),n>o||r>i)return null;if((r>n||n!=n)&&(n=r),(o=0?(a=(c[2]-u[2])*f,s=(h[2]-u[2])*f):(s=(c[2]-u[2])*f,a=(h[2]-u[2])*f),n>s||a>i)return null;if((a>n||n!=n)&&(n=a),(s=0?n:i;return e||(e=new LX),yX.scaleAndAdd(e.array,u,l,g),e},intersectTriangle:(zX=yX.create(),FX=yX.create(),VX=yX.create(),GX=yX.create(),function(t,e,n,i,r,o){var a=this.direction.array,s=this.origin.array;t=t.array,e=e.array,n=n.array,yX.sub(zX,e,t),yX.sub(FX,n,t),yX.cross(GX,FX,a);var l=yX.dot(zX,GX);if(i){if(l>-1e-5)return null}else if(l>-1e-5&&l1)return null;yX.cross(GX,zX,VX);var c=yX.dot(a,GX)/l;if(c<0||c>1||u+c>1)return null;yX.cross(GX,zX,FX);var h=-yX.dot(VX,GX)/l;return h<0?null:(r||(r=new LX),o&&LX.set(o,1-u-c,u,c),yX.scaleAndAdd(r.array,s,a,h),r)}),applyTransform:function(t){LX.add(this.direction,this.direction,this.origin),LX.transformMat4(this.origin,this.origin,t),LX.transformMat4(this.direction,this.direction,t),LX.sub(this.direction,this.direction,this.origin),LX.normalize(this.direction,this.direction)},copy:function(t){LX.copy(this.origin,t.origin),LX.copy(this.direction,t.direction)},clone:function(){var t=new WX;return t.copy(this),t}};var XX={create:function(){var t=new zW(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var e=new zW(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},fromValues:function(t,e,n,i){var r=new zW(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},set:function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},subtract:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}};XX.sub=XX.subtract,XX.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},XX.mul=XX.multiply,XX.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},XX.div=XX.divide,XX.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},XX.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},XX.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},XX.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},XX.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},XX.dist=XX.distance,XX.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},XX.sqrDist=XX.squaredDistance,XX.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},XX.len=XX.length,XX.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},XX.sqrLen=XX.squaredLength,XX.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},XX.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},XX.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},XX.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},XX.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},XX.random=function(t,e){return e=e||1,t[0]=FW(),t[1]=FW(),t[2]=FW(),t[3]=FW(),XX.normalize(t,t),XX.scale(t,t,e),t},XX.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},XX.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,h=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=c*u+p*-a+h*-l-d*-s,t[1]=h*u+p*-s+d*-a-c*-l,t[2]=d*u+p*-l+c*-s-h*-a,t},XX.forEach=function(){var t=XX.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=4),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(yX.cross(YX,e,n),t[0]=YX[0],t[1]=YX[1],t[2]=YX[2],t[3]=1+i,JX.normalize(t,t))}),JX.setAxes=(qX=jX.create(),function(t,e,n,i){return qX[0]=n[0],qX[3]=n[1],qX[6]=n[2],qX[1]=i[0],qX[4]=i[1],qX[7]=i[2],qX[2]=-e[0],qX[5]=-e[1],qX[8]=-e[2],JX.normalize(t,JX.fromMat3(t,qX))}),JX.clone=XX.clone,JX.fromValues=XX.fromValues,JX.copy=XX.copy,JX.set=XX.set,JX.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},JX.setAxisAngle=function(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},JX.add=XX.add,JX.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],c=n[3];return t[0]=i*c+a*s+r*u-o*l,t[1]=r*c+a*l+o*s-i*u,t[2]=o*c+a*u+i*l-r*s,t[3]=a*c-i*s-r*l-o*u,t},JX.mul=JX.multiply,JX.scale=XX.scale,JX.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+a*s,t[1]=r*l+o*s,t[2]=o*l-r*s,t[3]=a*l-i*s,t},JX.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*s,t[1]=r*l+a*s,t[2]=o*l+i*s,t[3]=a*l-r*s,t},JX.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*s,t[1]=r*l-i*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},JX.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},JX.dot=XX.dot,JX.lerp=XX.lerp,JX.slerp=function(t,e,n,i){var r,o,a,s,l,u=e[0],c=e[1],h=e[2],d=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return(o=u*p+c*f+h*g+d*m)<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,l=Math.sin(i*r)/a):(s=1-i,l=i),t[0]=s*u+l*p,t[1]=s*c+l*f,t[2]=s*h+l*g,t[3]=s*d+l*m,t},JX.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},JX.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},JX.length=XX.length,JX.len=JX.length,JX.squaredLength=XX.squaredLength,JX.sqrLen=JX.squaredLength,JX.normalize=XX.normalize,JX.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t};var KX,$X,tj,ej,nj=function(){this._axisX=new LX,this._axisY=new LX,this._axisZ=new LX,this.array=vX.create(),this._dirty=!0};nj.prototype={constructor:nj,setArray:function(t){for(var e=0;e0){var e=this.min,n=this.max,i=e.array,r=n.array;gj(i,t[0]),gj(r,t[0]);for(var o=1;or[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1]),a[2]>r[2]&&(r[2]=a[2])}e._dirty=!0,n._dirty=!0}},union:function(t){var e=this.min,n=this.max;return yX.min(e.array,e.array,t.min.array),yX.max(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersection:function(t){var e=this.min,n=this.max;return yX.max(e.array,e.array,t.min.array),yX.min(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,n=this.max.array,i=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||n[0]=r[0]&&n[1]>=r[1]&&n[2]>=r[2]},containPoint:function(t){var e=this.min.array,n=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&n[0]>=i[0]&&n[1]>=i[1]&&n[2]>=i[2]},isFinite:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])})),applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(lj=yX.create(),uj=yX.create(),cj=yX.create(),hj=yX.create(),dj=yX.create(),pj=yX.create(),function(t,e){var n=t.min.array,i=t.max.array,r=e.array;return lj[0]=r[0]*n[0],lj[1]=r[1]*n[0],lj[2]=r[2]*n[0],uj[0]=r[0]*i[0],uj[1]=r[1]*i[0],uj[2]=r[2]*i[0],cj[0]=r[4]*n[1],cj[1]=r[5]*n[1],cj[2]=r[6]*n[1],hj[0]=r[4]*i[1],hj[1]=r[5]*i[1],hj[2]=r[6]*i[1],dj[0]=r[8]*n[2],dj[1]=r[9]*n[2],dj[2]=r[10]*n[2],pj[0]=r[8]*i[2],pj[1]=r[9]*i[2],pj[2]=r[10]*i[2],n=this.min.array,i=this.max.array,n[0]=Math.min(lj[0],uj[0])+Math.min(cj[0],hj[0])+Math.min(dj[0],pj[0])+r[12],n[1]=Math.min(lj[1],uj[1])+Math.min(cj[1],hj[1])+Math.min(dj[1],pj[1])+r[13],n[2]=Math.min(lj[2],uj[2])+Math.min(cj[2],hj[2])+Math.min(dj[2],pj[2])+r[14],i[0]=Math.max(lj[0],uj[0])+Math.max(cj[0],hj[0])+Math.max(dj[0],pj[0])+r[12],i[1]=Math.max(lj[1],uj[1])+Math.max(cj[1],hj[1])+Math.max(dj[1],pj[1])+r[13],i[2]=Math.max(lj[2],uj[2])+Math.max(cj[2],hj[2])+Math.max(dj[2],pj[2])+r[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,n=this.max.array,i=t.array,r=e[0],o=e[1],a=e[2],s=n[0],l=n[1],u=e[2],c=n[0],h=n[1],d=n[2];if(1===i[15])e[0]=i[0]*r+i[12],e[1]=i[5]*o+i[13],n[2]=i[10]*a+i[14],n[0]=i[0]*c+i[12],n[1]=i[5]*h+i[13],e[2]=i[10]*d+i[14];else{var p=-1/a;e[0]=i[0]*r*p,e[1]=i[5]*o*p,n[2]=(i[10]*a+i[14])*p,p=-1/u,n[0]=i[0]*s*p,n[1]=i[5]*l*p,p=-1/d,e[2]=(i[10]*d+i[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=yX.fromValues(0,0,0);this.vertices=t}var n=this.min.array,i=this.max.array;return fj(t[0],n[0],n[1],n[2]),fj(t[1],n[0],i[1],n[2]),fj(t[2],i[0],n[1],n[2]),fj(t[3],i[0],i[1],n[2]),fj(t[4],n[0],n[1],i[2]),fj(t[5],n[0],i[1],i[2]),fj(t[6],i[0],n[1],i[2]),fj(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,n=this.max;return gj(e.array,t.min.array),gj(n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},clone:function(){var t=new mj;return t.copy(this),t}};var vj,yj,_j=0,xj=sW.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},(function(){this.name||(this.name=(this.type||"NODE")+"_"+_j++),this.position||(this.position=new LX),this.rotation||(this.rotation=new oj),this.scale||(this.scale=new LX(1,1,1)),this.worldTransform=new nj,this.localTransform=new nj,this._children=[]}),{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var n=e._nodeRepository;delete n[this.name],n[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var n=this._scene;n&&n!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,n=e.indexOf(t);n<0||(e.splice(n,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=xj.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(yj=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=xj.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e=0&&b[_]>1e-4&&(yX.transformMat4(A,x,v[w[_]]),yX.scaleAndAdd(S,S,A,b[_]));T.set(y,S)}}for(y=0;y>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var n=e.get("webgl_texture");n&&t.gl.deleteTexture(n),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(Tj.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(Tj.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),Tj.BYTE=hW.BYTE,Tj.UNSIGNED_BYTE=hW.UNSIGNED_BYTE,Tj.SHORT=hW.SHORT,Tj.UNSIGNED_SHORT=hW.UNSIGNED_SHORT,Tj.INT=hW.INT,Tj.UNSIGNED_INT=hW.UNSIGNED_INT,Tj.FLOAT=hW.FLOAT,Tj.HALF_FLOAT=36193,Tj.UNSIGNED_INT_24_8_WEBGL=34042,Tj.DEPTH_COMPONENT=hW.DEPTH_COMPONENT,Tj.DEPTH_STENCIL=hW.DEPTH_STENCIL,Tj.ALPHA=hW.ALPHA,Tj.RGB=hW.RGB,Tj.RGBA=hW.RGBA,Tj.LUMINANCE=hW.LUMINANCE,Tj.LUMINANCE_ALPHA=hW.LUMINANCE_ALPHA,Tj.SRGB=35904,Tj.SRGB_ALPHA=35906,Tj.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,Tj.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,Tj.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,Tj.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,Tj.NEAREST=hW.NEAREST,Tj.LINEAR=hW.LINEAR,Tj.NEAREST_MIPMAP_NEAREST=hW.NEAREST_MIPMAP_NEAREST,Tj.LINEAR_MIPMAP_NEAREST=hW.LINEAR_MIPMAP_NEAREST,Tj.NEAREST_MIPMAP_LINEAR=hW.NEAREST_MIPMAP_LINEAR,Tj.LINEAR_MIPMAP_LINEAR=hW.LINEAR_MIPMAP_LINEAR,Tj.REPEAT=hW.REPEAT,Tj.CLAMP_TO_EDGE=hW.CLAMP_TO_EDGE,Tj.MIRRORED_REPEAT=hW.MIRRORED_REPEAT;var Mj=bj.extend({skeleton:null,joints:null},(function(){this.joints||(this.joints=[])}),{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=bj.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});Mj.POINTS=hW.POINTS,Mj.LINES=hW.LINES,Mj.LINE_LOOP=hW.LINE_LOOP,Mj.LINE_STRIP=hW.LINE_STRIP,Mj.TRIANGLES=hW.TRIANGLES,Mj.TRIANGLE_STRIP=hW.TRIANGLE_STRIP,Mj.TRIANGLE_FAN=hW.TRIANGLE_FAN,Mj.BACK=hW.BACK,Mj.FRONT=hW.FRONT,Mj.FRONT_AND_BACK=hW.FRONT_AND_BACK,Mj.CW=hW.CW,Mj.CCW=hW.CCW;var Ij={isPowerOfTwo:function(t){return!(t&t-1)},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}},Cj=Ij.isPowerOfTwo;function Dj(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var Ej=Tj.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type,r=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==Tj.REPEAT&&this.wrapT!==Tj.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r?this.minFilter:this.getAvailableMinFilter());var o=t.getGLExtension("EXT_texture_filter_anisotropic");(o&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,o.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i)&&(t.getGLExtension("OES_texture_half_float")||(i=hW.FLOAT));if(this.mipmaps.length)for(var a=this.width,s=this.height,l=0;l=Tj.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,n,o,i,r,0,e.pixels):t.texImage2D(t.TEXTURE_2D,n,o,i,r,0,o,a,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return Cj(this.width)&&Cj(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var n=fW.createImage();e&&(n.crossOrigin=e);var i=this;return n.onload=function(){i.dirty(),i.trigger("success",i)},n.onerror=function(){i.trigger("error",i)},n.src=t,this.image=n,this}});function Lj(t){return{byte:fW.Int8Array,ubyte:fW.Uint8Array,short:fW.Int16Array,ushort:fW.Uint16Array}[t]||fW.Float32Array}function Pj(t){return"attr_"+t}function Rj(t,e,n,i){switch(this.name=t,this.type=e,this.size=n,this.semantic=i||"",this.value=null,n){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var n=this.value;return e[0]=n[2*t],e[1]=n[2*t+1],e},this.set=function(t,e){var n=this.value;n[2*t]=e[0],n[2*t+1]=e[1]},this.copy=function(t,e){var n=this.value;e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]};break;case 3:this.get=function(t,e){var n=3*t,i=this.value;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e},this.set=function(t,e){var n=3*t,i=this.value;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2]},this.copy=function(t,e){var n=this.value;e*=3,n[t*=3]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2]};break;case 4:this.get=function(t,e){var n=this.value,i=4*t;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e[3]=n[i+3],e},this.set=function(t,e){var n=this.value,i=4*t;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3]},this.copy=function(t,e){var n=this.value;e*=4,n[t*=4]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2],n[t+3]=n[e+3]}}}function Nj(t,e,n,i,r){this.name=t,this.type=e,this.buffer=n,this.size=i,this.semantic=r,this.symbol="",this.needsRemove=!1}function kj(t){this.buffer=t,this.count=0}Object.defineProperty(Ej.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Ej.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}}),Rj.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=Lj(this.type);this.value=new e(t*this.size)}},Rj.prototype.fromArray=function(t){var e,n=Lj(this.type);if(t[0]&&t[0].length){var i=0,r=this.size;e=new n(t.length*r);for(var o=0;o=0){e||(e=[]);var n=this.indices;return e[0]=n[3*t],e[1]=n[3*t+1],e[2]=n[3*t+2],e}},setTriangleIndices:function(t,e){var n=this.indices;n[3*t]=e[0],n[3*t+1]=e[1],n[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,n=this.vertexCount>65535?fW.Uint32Array:fW.Uint16Array;if(t[0]&&t[0].length){var i=0;e=new n(3*t.length);for(var r=0;r=0&&(e.splice(n,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var n=[],i=this.vertexCount,r=0;ro[0]&&(o[0]=s),l>o[1]&&(o[1]=l),u>o[2]&&(o[2]=u)}n._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,n=e.position.value,i=e.normal.value;if(i&&i.length===n.length)for(var r=0;r65535&&(this.indices=new fW.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,n=this.getEnabledAttributes(),i={},r=0;rthis.distance,r=1;r<8;r++)if(yX.dot(e[r].array,n)>this.distance!=i)return!0},intersectLine:(Jj=yX.create(),function(t,e,n){var i=this.distanceToPoint(t),r=this.distanceToPoint(e);if(i>0&&r>0||i<0&&r<0)return null;var o=this.normal.array,a=this.distance,s=t.array;yX.sub(Jj,e.array,t.array),yX.normalize(Jj,Jj);var l=yX.dot(o,Jj);if(0===l)return null;n||(n=new LX);var u=(yX.dot(o,s)-a)/l;return yX.scaleAndAdd(n.array,s,Jj,-u),n._dirty=!0,n}),applyTransform:(Zj=vX.create(),Qj=XX.create(),qj=XX.create(),qj[3]=1,function(t){t=t.array,yX.scale(qj,this.normal.array,this.distance),XX.transformMat4(qj,qj,t),this.distance=yX.dot(qj,this.normal.array),vX.invert(Zj,t),vX.transpose(Zj,Zj),Qj[3]=0,yX.copy(Qj,this.normal.array),XX.transformMat4(Qj,Qj,Zj),yX.copy(this.normal.array,Qj)}),copy:function(t){yX.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new $j;return t.copy(this),t}};var tY,eY=yX.set,nY=yX.copy,iY=yX.transformMat4,rY=Math.min,oY=Math.max,aY=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new $j);this.boundingBox=new mj,this.vertices=[];for(t=0;t<8;t++)this.vertices[t]=yX.fromValues(0,0,0)};aY.prototype={setFromProjection:function(t){var e=this.planes,n=t.array,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],h=n[8],d=n[9],p=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];eY(e[0].normal.array,a-i,c-s,f-h),e[0].distance=-(y-g),e[0].normalize(),eY(e[1].normal.array,a+i,c+s,f+h),e[1].distance=-(y+g),e[1].normalize(),eY(e[2].normal.array,a+r,c+l,f+d),e[2].distance=-(y+m),e[2].normalize(),eY(e[3].normal.array,a-r,c-l,f-d),e[3].distance=-(y-m),e[3].normalize(),eY(e[4].normal.array,a-o,c-u,f-p),e[4].distance=-(y-v),e[4].normalize(),eY(e[5].normal.array,a+o,c+u,f+p),e[5].distance=-(y+v),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(0===y){var b=l/i,w=-v/(p-1),S=-v/(p+1),A=-S/l,T=-w/l;_.min.set(-A*b,-A,S),_.max.set(A*b,A,w),eY(x[0],-A*b,-A,S),eY(x[1],-A*b,A,S),eY(x[2],A*b,-A,S),eY(x[3],A*b,A,S),eY(x[4],-T*b,-T,w),eY(x[5],-T*b,T,w),eY(x[6],T*b,-T,w),eY(x[7],T*b,T,w)}else{var M=(-1-g)/i,I=(1-g)/i,C=(1-m)/l,D=(-1-m)/l,E=(-1-v)/p,L=(1-v)/p;_.min.set(Math.min(M,I),Math.min(D,C),Math.min(L,E)),_.max.set(Math.max(I,M),Math.max(C,D),Math.max(E,L));var P=_.min.array,R=_.max.array;eY(x[0],P[0],P[1],P[2]),eY(x[1],P[0],R[1],P[2]),eY(x[2],R[0],P[1],P[2]),eY(x[3],R[0],R[1],P[2]),eY(x[4],P[0],P[1],R[2]),eY(x[5],P[0],R[1],R[2]),eY(x[6],R[0],P[1],R[2]),eY(x[7],R[0],R[1],R[2])}},getTransformedBoundingBox:(tY=yX.create(),function(t,e){var n=this.vertices,i=e.array,r=t.min,o=t.max,a=r.array,s=o.array,l=n[0];iY(tY,l,i),nY(a,tY),nY(s,tY);for(var u=1;u<8;u++)l=n[u],iY(tY,l,i),a[0]=rY(tY[0],a[0]),a[1]=rY(tY[1],a[1]),a[2]=rY(tY[2],a[2]),s[0]=oY(tY[0],s[0]),s[1]=oY(tY[1],s[1]),s[2]=oY(tY[2],s[2]);return r._dirty=!0,o._dirty=!0,t})};var sY,lY=xj.extend((function(){return{projectionMatrix:new nj,invProjectionMatrix:new nj,viewMatrix:new nj,frustum:new aY}}),(function(){this.update(!0)}),{update:function(t){xj.prototype.update.call(this,t),nj.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),nj.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){nj.copy(this.viewMatrix,t),nj.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){nj.copy(this.projectionMatrix,t),nj.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(sY=XX.create(),function(t,e){var n=void 0!==e?e:new WX,i=t.array[0],r=t.array[1];return XX.set(sY,i,r,-1,1),XX.transformMat4(sY,sY,this.invProjectionMatrix.array),XX.transformMat4(sY,sY,this.worldTransform.array),yX.scale(n.origin.array,sY,1/sY[3]),XX.set(sY,i,r,1,1),XX.transformMat4(sY,sY,this.invProjectionMatrix.array),XX.transformMat4(sY,sY,this.worldTransform.array),yX.scale(sY,sY,1/sY[3]),yX.sub(n.direction.array,sY,n.origin.array),yX.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n})}),uY=vX.create(),cY=vX.create(),hY={};function dY(t){var e=[],n=Object.keys(t);n.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof Kj&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof lY?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof Kj&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},n=0;n0&&this._doUpdateRenderList(a,e,n,i,r)}},isFrustumCulled:(fY=new mj,gY=new nj,function(t,e,n){var i=t.boundingBox;if(i||(i=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!i)return!1;if(gY.array=n,fY.transformFrom(i,gY),t.castShadow&&this.viewBoundingBoxLastFrame.union(fY),t.frustumCulling){if(!fY.intersectBoundingBox(e.frustum.boundingBox))return!0;gY.array=e.projectionMatrix.array,fY.max.array[2]>0&&fY.min.array[2]<0&&(fY.max.array[2]=-1e-20),fY.applyProjection(gY);var r=fY.min.array,o=fY.max.array;if(o[0]<-1||r[0]>1||o[1]<-1||r[1]>1||o[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(vY);var e=this._lightUniforms;for(var n in e)for(var i in e[n])e[n][i].value.length=0;for(var r=0;r1&&e.texParameterf(e.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i)&&(t.getGLExtension("OES_texture_half_float")||(i=hW.FLOAT));if(this.mipmaps.length)for(var o=this.width,a=this.height,s=0;s0&&t.height>0}Object.defineProperty(xY.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(xY.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});var wY=lY.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=lY.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}}),SY="framebuffer",AY="renderbuffer",TY=AY+"_width",MY=AY+"_height",IY=AY+"_attached",CY="depthtexture_attached",DY=hW.FRAMEBUFFER,EY=hW.RENDERBUFFER,LY=hW.DEPTH_ATTACHMENT,PY=hW.COLOR_ATTACHMENT0,RY=sW.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},(function(){this._cache=new Aj,this._textures={}}),{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(DY,this._getFrameBufferGL(t)),this._boundRenderer=t;var n=this._cache;n.put("viewport",t.viewport);var i,r,o=!1;for(var a in this._textures){o=!0;var s=this._textures[a];s&&(i=s.texture.width,r=s.texture.height,this._doAttach(t,s.texture,a,s.target))}this._width=i,this._height=r,!o&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,i,r,1);var l=n.get("attached_textures");if(l)for(var a in l)if(!this._textures[a]){var u=l[a];this._doDetach(e,a,u)}if(!n.get(CY)&&this.depthBuffer){n.miss(AY)&&n.put(AY,e.createRenderbuffer());var c=n.get(AY);i===n.get(TY)&&r===n.get(MY)||(e.bindRenderbuffer(EY,c),e.renderbufferStorage(EY,e.DEPTH_COMPONENT16,i,r),n.put(TY,i),n.put(MY,r),e.bindRenderbuffer(EY,null)),n.get(IY)||(e.framebufferRenderbuffer(DY,LY,EY,c),n.put(IY,!0))}},unbind:function(t){t.__currentFrameBuffer=null,t.gl.bindFramebuffer(DY,null),this._boundRenderer=null,this._cache.use(t.__uid__);var e=this._cache.get("viewport");e&&t.setViewport(e),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var n in this._textures){var i=this._textures[n];if(i){var r=i.texture;if(!r.NPOT&&r.useMipmap&&r.minFilter===Tj.LINEAR_MIPMAP_LINEAR){var o="textureCube"===r.textureType?hW.TEXTURE_CUBE_MAP:hW.TEXTURE_2D;e.bindTexture(o,r.getWebGLTexture(t)),e.generateMipmap(o),e.bindTexture(o,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(DY)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(SY)&&e.put(SY,t.gl.createFramebuffer()),e.get(SY)},attach:function(t,e,n){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||PY,n=n||hW.TEXTURE_2D;var i,r=this._boundRenderer;if(r&&r.gl){var o=this._cache;o.use(r.__uid__),i=o.get("attached_textures")}var a=this._textures[e];if(!a||a.target!==n||a.texture!==t||!i||null==i[e]){var s=!0;r&&(s=this._doAttach(r,t,e,n),this.viewport||r.setViewport(0,0,t.width,t.height,1)),s&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=n)}},_doAttach:function(t,e,n,i){var r=t.gl,o=e.getWebGLTexture(t),a=this._cache.get("attached_textures");if(a&&a[n]){var s=a[n];if(s.texture===e&&s.target===i)return}var l=!0;if(((n=+n)===LY||n===hW.DEPTH_STENCIL_ATTACHMENT)&&(t.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==hW.DEPTH_COMPONENT&&e.format!==hW.DEPTH_STENCIL&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l)){var u=this._cache.get(AY);u&&(r.framebufferRenderbuffer(DY,LY,EY,null),r.deleteRenderbuffer(u),this._cache.put(AY,!1)),this._cache.put(IY,!1),this._cache.put(CY,!0)}return r.framebufferTexture2D(DY,n,i,o,0),a||(a={},this._cache.put("attached_textures",a)),a[n]=a[n]||{},a[n].texture=e,a[n].target=i,l},_doDetach:function(t,e,n){t.framebufferTexture2D(DY,e,n,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),e!==LY&&e!==hW.DEPTH_STENCIL_ATTACHMENT||this._cache.put(CY,!1)},detach:function(t,e){(this._textures[t]=null,this._boundRenderer)&&(this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e))},dispose:function(t){var e=t.gl,n=this._cache;n.use(t.__uid__);var i=n.get(AY);i&&e.deleteRenderbuffer(i);var r=n.get(SY);r&&e.deleteFramebuffer(r),n.deleteContext(t.__uid__),this._textures={}}});RY.DEPTH_ATTACHMENT=LY,RY.COLOR_ATTACHMENT0=PY,RY.STENCIL_ATTACHMENT=hW.STENCIL_ATTACHMENT,RY.DEPTH_STENCIL_ATTACHMENT=hW.DEPTH_STENCIL_ATTACHMENT;var NY=["px","nx","py","ny","pz","nz"],kY=sW.extend((function(){var t={position:new LX,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new wY({fov:90}),nx:new wY({fov:90}),py:new wY({fov:90}),ny:new wY({fov:90}),pz:new wY({fov:90}),nz:new wY({fov:90})};return e.px.lookAt(LX.POSITIVE_X,LX.NEGATIVE_Y),e.nx.lookAt(LX.NEGATIVE_X,LX.NEGATIVE_Y),e.py.lookAt(LX.POSITIVE_Y,LX.POSITIVE_Z),e.ny.lookAt(LX.NEGATIVE_Y,LX.NEGATIVE_Z),e.pz.lookAt(LX.POSITIVE_Z,LX.NEGATIVE_Y),e.nz.lookAt(LX.NEGATIVE_Z,LX.NEGATIVE_Y),t._frameBuffer=new RY,t}),{getCamera:function(t){return this._cameras[t]},render:function(t,e,n){var i=t.gl;n||e.update();for(var r=this.texture.width,o=2*Math.atan(r/(r-.5))/Math.PI*180,a=0;a<6;a++){var s=NY[a],l=this._cameras[s];if(LX.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=o,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),OY=Gj.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,n=this.attributes,i=[],r=[],o=[],a=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var c=u/e;if(i.push([2*c-1,2*l-1,0]),r&&r.push([c,l]),o&&o.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],n)}});function GY(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var UY=GY("DXT1"),HY=GY("DXT3"),WY=GY("DXT5"),XY=function(t,e){var n=new Int32Array(t,0,31);if(542327876!==n[0])return null;if(4&!n(20))return null;var i,r,o=n(21),a=n[4],s=n[3],l=512&n[28],u=131072&n[2];switch(o){case UY:i=8,r=Tj.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case HY:i=16,r=Tj.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case WY:i=16,r=Tj.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var c=n[1]+4,h=l?6:1,d=1;u&&(d=Math.max(1,n[7]));for(var p=[],f=0;f0){var r=Math.pow(2,t[3]-128-8+i);e[n+0]=t[0]*r,e[n+1]=t[1]*r,e[n+2]=t[2]*r}else e[n+0]=0,e[n+1]=0,e[n+2]=0;return e[n+3]=1,e}function ZY(t,e,n,i){for(var r,o,a=0,s=0,l=i;l>0;)if(t[s][0]=e[n++],t[s][1]=e[n++],t[s][2]=e[n++],t[s][3]=e[n++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(o=t[s])[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],s++,l--;a+=8}else s++,l--,a=0;return n}function QY(t,e,n,i){if(i<8|i>32767)return ZY(t,e,n,i);if(2!=(r=e[n++]))return ZY(t,e,n-1,i);if(t[0][1]=e[n++],t[0][2]=e[n++],r=e[n++],(t[0][2]<<8>>>0|r)>>>0!==i)return null;for(var r=0;r<4;r++)for(var o=0;o128){a=(127&a)>>>0;for(var s=e[n++];a--;)t[o++][r]=s}else for(;a--;)t[o++][r]=e[n++]}return n}var qY=function(t,e,n){null==n&&(n=0);var i=new Uint8Array(t),r=i.length;if("#?"===function(t,e,n){for(var i="",r=e;r=r)){o+=2;for(var a="";o20)return console.warn("Given image is not a height map"),t}var d,p,f,g;l%(4*i)==0?(d=a.data[l],f=a.data[l+4]):l%(4*i)==4*(i-1)?(d=a.data[l-4],f=a.data[l]):(d=a.data[l-4],f=a.data[l+4]),l<4*i?(p=a.data[l],g=a.data[l+4*i]):l>i*(r-1)*4?(p=a.data[l-4*i],g=a.data[l]):(p=a.data[l-4*i],g=a.data[l+4*i]),s.data[l]=d-f+127,s.data[l+1]=p-g+127,s.data[l+2]=255,s.data[l+3]=255}return o.putImageData(s,0,0),n},isHeightImage:function(t,e,n){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),r=i.getContext("2d"),o=e||32;n=n||20,i.width=i.height=o,r.drawImage(t,0,0,o,o);for(var a=r.getImageData(0,0,o,o),s=0;sn)return!1}return!0},_fetchTexture:function(t,e,n){fW.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:n})},createChessboard:function(t,e,n,i){t=t||512,e=e||64,n=n||"black",i=i||"white";var r=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var a=o.getContext("2d");a.fillStyle=i,a.fillRect(0,0,t,t),a.fillStyle=n;for(var s=0;s=0||(KY.forEach((function(e){t.on(e,this[$Y(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),KY.forEach((function(e){t.off(e,this[$Y(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}};var eZ=lY.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=lY.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});pX.import("\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end");var nZ=new OY,iZ=new Mj({geometry:nZ,frustumCulling:!1}),rZ=new eZ,oZ=sW.extend((function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}}),(function(){var t=new pX(pX.source("clay.compositor.vertex"),this.fragment),e=new OW({shader:t});e.enableTexturesAll(),this.material=e}),{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||hW.COLOR_ATTACHMENT0,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var n in this.outputs){var i=this.outputs[n];i&&e.attach(i,n)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var n=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var r=[];for(var o in this.outputs)(o=+o)>=n.COLOR_ATTACHMENT0&&o<=n.COLOR_ATTACHMENT0+8&&r.push(o);i.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var a=this.clearDepth?n.DEPTH_BUFFER_BIT:0;if(n.depthMask(!0),this.clearColor){a|=n.COLOR_BUFFER_BIT,n.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&n.clearColor(s[0],s[1],s[2],s[3])}n.clear(a),this.blendWithPrevious?(n.enable(n.BLEND),this.material.transparent=!0):(n.disable(n.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){iZ.material=this.material,t.renderPass([iZ],rZ)},dispose:function(t){}}),aZ={},sZ=["px","nx","py","ny","pz","nz"];aZ.prefilterEnvironmentMap=function(t,e,n,i,r){r&&i||(i=aZ.generateNormalDistribution(),r=aZ.integrateBRDF(t,i));var o=(n=n||{}).width||64,a=n.height||64,s=n.type||e.type,l=new xY({width:o,height:a,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(o,a),c=Math.log(u)/Math.log(2)+1,h=new OW({shader:new pX({vertex:pX.source("clay.skybox.vertex"),fragment:"#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"})});h.set("normalDistribution",i),n.encodeRGBM&&h.define("fragment","RGBM_ENCODE"),n.decodeRGBM&&h.define("fragment","RGBM_DECODE");var d,p=new mY;if("texture2D"===e.textureType){var f=new xY({width:o,height:a,type:s===Tj.FLOAT?Tj.HALF_FLOAT:s});JY.panoramaToCubeMap(t,e,f,{encodeRGBM:n.decodeRGBM}),e=f}(d=new VY({scene:p,material:h})).material.set("environmentMap",e);var g=new kY({texture:l});n.encodeRGBM&&(s=l.type=Tj.UNSIGNED_BYTE);for(var m=new Ej({width:o,height:a,type:s}),v=new RY({depthBuffer:!1}),y=fW[s===Tj.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_ 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"}),r=new Ej({width:512,height:256,type:Tj.HALF_FLOAT,wrapS:Tj.CLAMP_TO_EDGE,wrapT:Tj.CLAMP_TO_EDGE,minFilter:Tj.NEAREST,magFilter:Tj.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",e),i.setUniform("viewportSize",[512,256]),i.attachOutput(r),i.render(t,n),n.dispose(t),r},aZ.generateNormalDistribution=function(t,e){for(var n=new Ej({width:t=t||256,height:e=e||1024,type:Tj.FLOAT,minFilter:Tj.NEAREST,magFilter:Tj.NEAREST,wrapS:Tj.CLAMP_TO_EDGE,wrapT:Tj.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(e*t*4),r=[],o=0;o>>16)>>>0;u=(((16711935&(u=((252645135&(u=((858993459&(u=((1431655765&u)<<1|(2863311530&u)>>>1)>>>0))<<2|(3435973836&u)>>>2)>>>0))<<4|(4042322160&u)>>>4)>>>0))<<8|(4278255360&u)>>>8)>>>0)/4294967296;var c=Math.sqrt((1-u)/(1+(s*s-1)*u));r[l]=c}for(l=0;l65535?Uint32Array:Uint16Array,y=this.indices=new v(e*t*6),_=this.radius,x=this.phiStart,b=this.phiLength,w=this.thetaStart,S=this.thetaLength,A=[],T=[],M=0,I=1/(_=this.radius);for(d=0;d<=t;d++)for(h=0;h<=e;h++)u=h/e,c=d/t,a=-_*Math.cos(x+u*b)*Math.sin(w+c*S),s=_*Math.cos(w+c*S),l=_*Math.sin(x+u*b)*Math.sin(w+c*S),A[0]=a,A[1]=s,A[2]=l,T[0]=u,T[1]=c,n.set(M,A),i.set(M,T),A[0]*=I,A[1]*=I,A[2]*=I,r.set(M,A),M++;var C=e+1,D=0;for(d=0;d=0&&s.splice(t,1)})),s.push(l),this.__zr&&this.__zr.animation.addAnimator(l),l},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,n=e.length,i=0;i 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.chunk.instancing_header\n#ifdef INSTANCING\nattribute vec4 instanceMat1;\nattribute vec4 instanceMat2;\nattribute vec4 instanceMat3;\n#endif\n@end\n@export clay.chunk.instancing_matrix\nmat4 instanceMat = mat4(\n vec4(instanceMat1.xyz, 0.0),\n vec4(instanceMat2.xyz, 0.0),\n vec4(instanceMat3.xyz, 0.0),\n vec4(instanceMat1.w, instanceMat2.w, instanceMat3.w, 1.0)\n);\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end";function LZ(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}Object.assign(xj.prototype,DZ),pX.import(EZ),pX.import(mX),pX.import("\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"),pX.import("@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\nattribute vec3 normal: NORMAL;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nvarying vec3 v_Normal;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\nvarying vec3 v_Normal;\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"),pX.import("/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),pX.import("@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),pX.import("@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"),pX.import("@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end");var PZ=mY.prototype.addToScene,RZ=mY.prototype.removeFromScene;mY.prototype.addToScene=function(t){if(PZ.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},mY.prototype.removeFromScene=function(t){RZ.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},OW.prototype.setTextureImage=function(t,e,n,i){if(this.shader){var r,o,a=n.getZr(),s=this;return s.autoUpdateTextureStatus=!1,s.disableTexture(t),(o=e)&&"none"!==o&&(r=NZ.loadTexture(e,n,i,(function(e){s.enableTexture(t),a&&a.refresh()})),s.set(t,r)),r}};var NZ={};NZ.Renderer=DX,NZ.Node=xj,NZ.Mesh=Mj,NZ.Shader=pX,NZ.Material=OW,NZ.Texture=Tj,NZ.Texture2D=Ej,NZ.Geometry=Gj,NZ.SphereGeometry=mZ,NZ.PlaneGeometry=OY,NZ.CubeGeometry=zY,NZ.AmbientLight=vZ,NZ.DirectionalLight=yZ,NZ.PointLight=_Z,NZ.SpotLight=xZ,NZ.PerspectiveCamera=wY,NZ.OrthographicCamera=eZ,NZ.Vector2=GW,NZ.Vector3=LX,NZ.Vector4=bZ,NZ.Quaternion=oj,NZ.Matrix2=TZ,NZ.Matrix2d=IZ,NZ.Matrix3=CZ,NZ.Matrix4=nj,NZ.Plane=$j,NZ.Ray=WX,NZ.BoundingBox=mj,NZ.Frustum=aY;var kZ=null;function OZ(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function BZ(t){if((t.wrapS===Tj.REPEAT||t.wrapT===Tj.REPEAT)&&t.image){var e=OZ(t.width),n=OZ(t.height);if(e!==t.width||n!==t.height){var i=document.createElement("canvas");i.width=e,i.height=n,i.getContext("2d").drawImage(t.image,0,0,e,n),t.image=i}}}NZ.loadTexture=function(t,e,n,i){"function"==typeof n&&(i=n,n={}),n=n||{};for(var r=Object.keys(n).sort(),o="",a=0;a3?e[3]=t[3]:e[3]=1,e):((e=ur(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},NZ.directionFromAlphaBeta=function(t,e){var n=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,r=[],o=Math.sin(n);return r[0]=o*Math.cos(i),r[1]=-Math.cos(n),r[2]=o*Math.sin(i),r},NZ.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},NZ.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"],NZ.createShader=function(t){"ecgl.shadow"===t&&(t="ecgl.displayShadow");var e=pX.source(t+".vertex"),n=pX.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),n||console.error("Fragment shader of '%s' not exits",t);var i=new pX(e,n);return i.name=t,i},NZ.createMaterial=function(t,e){e instanceof Array||(e=[e]);var n=NZ.createShader(t),i=new OW({shader:n});return e.forEach((function(t){"string"==typeof t&&i.define(t)})),i},NZ.setMaterialFromModel=function(t,e,n,i){e.autoUpdateTextureStatus=!1;var r=n.getModel(t+"Material"),o=r.get("detailTexture"),a=fZ(r.get("textureTiling"),1),s=fZ(r.get("textureOffset"),0);"number"==typeof a&&(a=[a,a]),"number"==typeof s&&(s=[s,s]);var l=a[0]>1||a[1]>1?NZ.Texture.REPEAT:NZ.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var c=r.get("roughness"),h=r.get("metalness");null!=h?isNaN(h)&&(e.setTextureImage("metalnessMap",h,i,u),h=fZ(r.get("metalnessAdjust"),.5)):h=0,null!=c?isNaN(c)&&(e.setTextureImage("roughnessMap",c,i,u),c=fZ(r.get("roughnessAdjust"),.5)):c=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",o,i,u),e.setTextureImage("normalMap",d,i,u),e.set({roughness:c,metalness:h,detailUvRepeat:a,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("hatching"===t){var p=r.get("hatchingTextures")||[];p.length;for(var f=0;f<6;f++)e.setTextureImage("hatch"+(f+1),p[f],i,{anisotropic:8,wrapS:NZ.Texture.REPEAT,wrapT:NZ.Texture.REPEAT});e.set({detailUvRepeat:a,detailUvOffset:s})}},NZ.updateVertexAnimation=function(t,e,n,i){var r=i.get("animation"),o=i.get("animationDurationUpdate"),a=i.get("animationEasingUpdate"),s=n.shadowDepthMaterial;if(r&&e&&o>0&&e.geometry.vertexCount===n.geometry.vertexCount){n.material.define("vertex","VERTEX_ANIMATION"),n.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var n=this.zr;t.scene.traverse((function(t){t.__zr=n,t.addAnimatorsToZr&&t.addAnimatorsToZr(n)}))}},zZ.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(FZ,this),t.layer=null,this._viewsToDispose.push(t))}},zZ.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(FZ,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},zZ.prototype.resize=function(t,e){this.renderer.resize(t,e)},zZ.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},zZ.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},zZ.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},zZ.prototype.needsRefresh=function(){this.zr.refresh()},zZ.prototype.refresh=function(t){this._backgroundColor=t?NZ.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var r=this._clickToSetFocusPoint(t);if(r)r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},zZ.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,n=e.viewport,i=this.views.length-1;i>=0;i--){var r=this.views[i];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var o=this._picking.pick(t.offsetX,t.offsetY,!0);if(o)return o.view=r,o}}e.viewport=n},zZ.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},zZ.prototype.pickObject=function(t,e){for(var n=[],i=this.renderer,r=i.viewport,o=0;o=0&&(c.dataIndex=this._lastDataIndex,c.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0):null!=a&&a!==this._lastEventData&&(null!=this._lastEventData&&(c.eventData=this._lastEventData,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0),this._lastEventData=a,this._lastDataIndex=r,this._lastSeriesIndex=o),c.eventData=a,c.dataIndex=r,c.seriesIndex=o,(null!=a||parseInt(r,10)>=0&&parseInt(o,10)>=0)&&(this.zr.handler.dispatchToElement(u,t,e),s&&this.zr.handler.dispatchToElement(u,"mouseover",e))},zZ.prototype._dispatchToView=function(t,e){for(var n=0;nt&&a=0&&(!function(t){jZ(t,"itemStyle"),jZ(t,"lineStyle"),jZ(t,"areaStyle"),jZ(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),YZ(t.xAxis3D),YZ(t.yAxis3D),YZ(t.zAxis3D),YZ(t.grid3D),jZ(t.geo3D)}));var QZ={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(t){t=t||{},this.option.viewControl=this.option.viewControl||{},null!=t.alpha&&(this.option.viewControl.alpha=t.alpha),null!=t.beta&&(this.option.viewControl.beta=t.beta),null!=t.distance&&(this.option.viewControl.distance=t.distance),null!=t.center&&(this.option.viewControl.center=t.center)}},qZ={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}},JZ={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}},KZ=Zp.extend({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{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)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});qt(KZ.prototype,QZ),qt(KZ.prototype,qZ),qt(KZ.prototype,JZ);var $Z=fZ,tQ={left:0,middle:1,right:2};function eQ(t){return t instanceof Array||(t=[t,t]),t}var nQ=sW.extend((function(){return{zr:null,viewGL:null,_center:new LX,minDistance:.5,maxDistance:1.5,maxOrthographicSize:300,minOrthographicSize:30,minAlpha:-90,maxAlpha:90,minBeta:-1/0,maxBeta:1/0,autoRotateAfterStill:0,autoRotateDirection:"cw",autoRotateSpeed:60,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",_mode:"rotate",_camera:null,_needsUpdate:!1,_rotating:!1,_phi:0,_theta:0,_mouseX:0,_mouseY:0,_rotateVelocity:new GW,_panVelocity:new GW,_distance:500,_zoomSpeed:0,_stillTimeout:0,_animators:[]}}),(function(){["_mouseDownHandler","_mouseWheelHandler","_mouseMoveHandler","_mouseUpHandler","_pinchHandler","_contextMenuHandler","_update"].forEach((function(t){this[t]=this[t].bind(this)}),this)}),{init:function(){var t=this.zr;t&&(t.on("mousedown",this._mouseDownHandler),t.on("globalout",this._mouseUpHandler),t.on("mousewheel",this._mouseWheelHandler),t.on("pinch",this._pinchHandler),t.animation.on("frame",this._update),t.dom.addEventListener("contextmenu",this._contextMenuHandler))},dispose:function(){var t=this.zr;t&&(t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("pinch",this._pinchHandler),t.off("globalout",this._mouseUpHandler),t.dom.removeEventListener("contextmenu",this._contextMenuHandler),t.animation.off("frame",this._update)),this.stopAllAnimation()},getDistance:function(){return this._distance},setDistance:function(t){this._distance=t,this._needsUpdate=!0},getOrthographicSize:function(){return this._orthoSize},setOrthographicSize:function(t){this._orthoSize=t,this._needsUpdate=!0},getAlpha:function(){return this._theta/Math.PI*180},getBeta:function(){return-this._phi/Math.PI*180},getCenter:function(){return this._center.toArray()},setAlpha:function(t){t=Math.max(Math.min(this.maxAlpha,t),this.minAlpha),this._theta=t/180*Math.PI,this._needsUpdate=!0},setBeta:function(t){t=Math.max(Math.min(this.maxBeta,t),this.minBeta),this._phi=-t/180*Math.PI,this._needsUpdate=!0},setCenter:function(t){this._center.setArray(t)},setViewGL:function(t){this.viewGL=t},getCamera:function(){return this.viewGL.camera},setFromViewControlModel:function(t,e){var n=(e=e||{}).baseDistance||0,i=e.baseOrthoSize||1,r=t.get("projection");"perspective"!==r&&"orthographic"!==r&&"isometric"!==r&&(r="perspective"),this._projection=r,this.viewGL.setProjection(r);var o=t.get("distance")+n,a=t.get("orthographicSize")+i;[["damping",.8],["autoRotate",!1],["autoRotateAfterStill",3],["autoRotateDirection","cw"],["autoRotateSpeed",10],["minDistance",30],["maxDistance",400],["minOrthographicSize",30],["maxOrthographicSize",300],["minAlpha",-90],["maxAlpha",90],["minBeta",-1/0],["maxBeta",1/0],["rotateSensitivity",1],["zoomSensitivity",1],["panSensitivity",1],["panMouseButton","left"],["rotateMouseButton","middle"]].forEach((function(e){this[e[0]]=$Z(t.get(e[0]),e[1])}),this),this.minDistance+=n,this.maxDistance+=n,this.minOrthographicSize+=i,this.maxOrthographicSize+=i;var s=t.ecModel,l={};["animation","animationDurationUpdate","animationEasingUpdate"].forEach((function(e){l[e]=$Z(t.get(e),s&&s.get(e))}));var u=$Z(e.alpha,t.get("alpha"))||0,c=$Z(e.beta,t.get("beta"))||0,h=$Z(e.center,t.get("center"))||[0,0,0];l.animation&&l.animationDurationUpdate>0&&this._notFirst?this.animateTo({alpha:u,beta:c,center:h,distance:o,orthographicSize:a,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(o),this.setAlpha(u),this.setBeta(c),this.setCenter(h),this.setOrthographicSize(a)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,n=this,i={},r={};return null!=t.distance&&(i.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(i.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(i.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(i.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(i.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,r).during((function(){null!=i.alpha&&n.setAlpha(i.alpha),null!=i.beta&&n.setBeta(i.beta),null!=i.distance&&n.setDistance(i.distance),null!=i.center&&n.setCenter(i.center),null!=i.orthographicSize&&n.setOrthographicSize(i.orthographicSize),n._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),n=this._orthoSize,i=n/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=n/2,e.bottom=-n/2},_updatePan:function(t){var e=this._panVelocity,n=this._distance,i=this.getCamera(),r=i.worldTransform.y,o=i.worldTransform.x;this._center.scaleAndAdd(o,-e.x*n/200).scaleAndAdd(r,-e.y*n/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new LX,n=this._theta+Math.PI/2,i=this._phi+Math.PI/2,r=Math.sin(n);e.x=r*Math.cos(i),e.y=-Math.cos(n),e.z=r*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var n=t.len();(n*=e)<1e-4&&(n=0),t.normalize().scale(n)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),n=Math.atan2(t.x,t.z);this._theta=e,this._phi=-n,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,n=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,n)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===tQ[this.rotateMouseButton]?this._mode="rotate":t.event.button===tQ[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=eQ(this.panSensitivity),n=eQ(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*n[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*n[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var n,i=t.offsetX,r=t.offsetY;if(!this.viewGL||this.viewGL.containPoint(i,r))n="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault()}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),t}});Object.defineProperty(nQ.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});var iQ={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var n in e)t||!e[n].value?e[n].value=[]:e[n].value=Array.prototype.slice.call(e[n].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},rQ={vec2:VW,vec3:yX,vec4:XX,mat2:AZ,mat2d:MZ,mat3:jX,mat4:vX,quat:JX},oQ=rQ.vec3,aQ=[[0,0],[1,1]],sQ=Gj.extend((function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new Gj.Attribute("position","float",3,"POSITION"),positionPrev:new Gj.Attribute("positionPrev","float",3),positionNext:new Gj.Attribute("positionNext","float",3),prevPositionPrev:new Gj.Attribute("prevPositionPrev","float",3),prevPosition:new Gj.Attribute("prevPosition","float",3),prevPositionNext:new Gj.Attribute("prevPositionNext","float",3),offset:new Gj.Attribute("offset","float",1),color:new Gj.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(oQ.dist(t,e)+oQ.dist(n,e)+oQ.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(aQ)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(aQ)},getPolylineVertexCount:function(t){var e;"number"==typeof t?e=t:e="number"!=typeof t[0]?t.length:t.length/3;return this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;"number"==typeof t?e=t:e="number"!=typeof t[0]?t.length:t.length/3;return this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=t[2],u=e[0],c=e[1],h=e[2],d=n[0],p=n[1],f=n[2],g=i[0],m=i[1],v=i[2],y=this._getCubicCurveApproxStep(t,e,n,i),_=y*y,x=_*y,b=3*y,w=3*_,S=6*_,A=6*x,T=a-2*u+d,M=s-2*c+p,I=l-2*h+f,C=3*(u-d)-a+g,D=3*(c-p)-s+m,E=3*(h-f)-l+v,L=a,P=s,R=l,N=(u-a)*b+T*w+C*x,k=(c-s)*b+M*w+D*x,O=(h-l)*b+I*w+E*x,B=T*S+C*A,z=M*S+D*A,F=I*S+E*A,V=C*A,G=D*A,U=E*A,H=0,W=0,X=Math.ceil(1/y),j=new Float32Array(3*(X+1)),Y=(j=[],0);for(W=0;W1&&(L=N>0?Math.min(L,g):Math.max(L,g),P=k>0?Math.min(P,m):Math.max(P,m),R=O>0?Math.min(R,v):Math.max(R,v));return this.addPolyline(j,r,o)},addLine:function(t,e,n,i){return this.addPolyline([t,e],n,i)},addPolyline:function(t,e,n,i,r){if(t.length){var o="number"!=typeof t[0];if(null==r&&(r=o?t.length:t.length/3),!(r<2)){null==i&&(i=0),null==n&&(n=1),this._itemVertexOffsets.push(this._vertexOffset);var a,s,l=(o="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,c=this.attributes.positionPrev,h=this.attributes.positionNext,d=this.attributes.color,p=this.attributes.offset,f=this.indices,g=this._vertexOffset;n=Math.max(n,.01);for(var m=i;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(h.set(g-2,a),h.set(g-1,a)),u.set(g,a),u.set(g+1,a),d.set(g,s),d.set(g+1,s),p.set(g,n/2),p.set(g+1,-n/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,a),g++;else if(m>0){var _=3*this._triangleOffset;(f=this.indices)[_]=g-4,f[_+1]=g-3,f[_+2]=g-2,f[_+3]=g-3,f[_+4]=g-1,f[_+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;c.copy(x,x+2),c.copy(x+1,x+3),h.copy(b-1,b-3),h.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=ta&&(r=this._x=0,o+=this._rowHeight+l,this._y=o,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,n),o+n+l>s)return null;t.x+=this.offsetX*this.dpr+r,t.y+=this.offsetY*this.dpr+o,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/a+u[0],o/s+u[1]],[(r+e)/a+u[0],(o+n)/s+u[1]]]},_fitElement:function(t,e,n){var i=t.getBoundingRect(),r=e/i.width,o=n/i.height;t.x=-i.x*r,t.y=-i.y*o,t.scaleX=r,t.scaleY=o,t.update()}},uQ.prototype={clear:function(){for(var t=0;t=t)){var r=(n+this._nodeWidth)*this._dpr,o=(i+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:o})}catch(KJ){this._canvas.width=r,this._canvas.height=o}var a=new lQ(this._zr,n,i,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(a),a}},add:function(t,e,n){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,n);if(!i){var r=this._expand();if(!r)return;i=r.add(t,e,n)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}},cQ.prototype={constructor:cQ,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new NZ.DirectionalLight({shadowBias:.005}),this.ambientLight=new NZ.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,n=this.ambientLight,i=t.getModel("light"),r=i.getModel("main"),o=i.getModel("ambient");e.intensity=r.get("intensity"),n.intensity=o.get("intensity"),e.color=NZ.parseColor(r.get("color")).slice(0,3),n.color=NZ.parseColor(o.get("color")).slice(0,3);var a=r.get("alpha")||0,s=r.get("beta")||0;e.position.setArray(NZ.directionFromAlphaBeta(a,s)),e.lookAt(NZ.Vector3.ZERO),e.castShadow=r.get("shadow"),e.shadowResolution=NZ.getShadowResolution(r.get("shadowQuality"))},updateAmbientCubemap:function(t,e,n){var i=e.getModel("light.ambientCubemap"),r=i.get("texture");if(r){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[r];if(!o){var a=this;o=this._cubemapLightsCache[r]=NZ.createAmbientCubemap(i.option,t,n,(function(){a._isSkyboxFromAmbientCubemap&&a._skybox.setEnvironmentMap(o.specular.cubemap),n.getZr().refresh()}))}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,n){var i=e.get("environment"),r=this;var o=(r._skybox=r._skybox||new VY,r._skybox);if(i&&"none"!==i)if("auto"===i)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var a=this._currentCubemapLights.specular.cubemap;o.setEnvironmentMap(a),this._scene&&o.attachScene(this._scene),o.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"===y(i)&&i.colorStops||"string"==typeof i&&ur(i)){this._isSkyboxFromAmbientCubemap=!1;var s=new NZ.Texture2D({anisotropic:8,flipY:!1});o.setEnvironmentMap(s);var l=s.image=document.createElement("canvas");l.width=l.height=16,My(l.getContext("2d"),new Zl({shape:{x:0,y:0,width:16,height:16},style:{fill:i}})),o.attachScene(this._scene)}else{this._isSkyboxFromAmbientCubemap=!1;s=NZ.loadTexture(i,n,{anisotropic:8,flipY:!1});o.setEnvironmentMap(s),o.attachScene(this._scene)}else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var u=e.coordinateSystem;if(this._skybox)if(!u||!u.viewGL||"auto"===i||i.match&&i.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var c=u.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[c]("fragment","SRGB_DECODE")}}};var hQ=rQ.vec3,dQ=Gj.extend((function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new Gj.Attribute("position","float",3,"POSITION"),normal:new Gj.Attribute("normal","float",3,"NORMAL"),color:new Gj.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,n=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==n&&(e.position.init(n),e.normal.init(n),e.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=hQ.create(),e=hQ.create(),n=hQ.create(),i=[0,3,1,3,2,1];return function(r,o){var a=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;hQ.sub(t,r[1],r[0]),hQ.sub(e,r[2],r[1]),hQ.cross(n,t,e),hQ.normalize(n,n);for(var u=0;u<4;u++)a.set(this._vertexOffset+u,r[u]),l.set(this._vertexOffset+u,o),s.set(this._vertexOffset+u,n);var c=3*this._faceOffset;for(u=0;u<6;u++)this.indices[c+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});$t(dQ.prototype,iQ);var pQ=fZ,fQ={x:0,y:2,z:1};function gQ(t,e,n){this.rootNode=new NZ.Node;var i=new NZ.Mesh({geometry:new sQ({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),r=new NZ.Mesh({geometry:new dQ,material:n,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(r),this.rootNode.add(i),this.faceInfo=t,this.plane=new NZ.Plane,this.linesMesh=i,this.quadsMesh=r}gQ.prototype.update=function(t,e,n){var i=t.coordinateSystem,r=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,a=this.quadsMesh.geometry;o.convertToDynamicArray(!0),a.convertToDynamicArray(!0),this._updateSplitLines(o,r,t,n),this._udpateSplitAreas(a,r,t,n),o.convertToTypedArray(),a.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);!function(t,e,n,i){var r=[0,0,0],o=i<0?n.getExtentMin():n.getExtentMax();r[fQ[n.dim]]=o,t.position.setArray(r),t.rotation.identity(),e.distance=-Math.abs(o),e.normal.set(0,0,0),"x"===n.dim?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):"z"===n.dim?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}(this.rootNode,this.plane,s,this.faceInfo[3])},gQ.prototype._updateSplitLines=function(t,e,n,i){var r=i.getDevicePixelRatio();e.forEach((function(i,o){var a=i.model,s=e[1-o].getExtent();if(!i.scale.isBlank()){var l=a.getModel("splitLine",n.getModel("splitLine"));if(l.get("show")){var u=l.getModel("lineStyle"),c=u.get("color"),h=pQ(u.get("opacity"),1),d=pQ(u.get("width"),1);c=he(c)?c:[c];for(var p=i.getTicksCoords({tickModel:l}),f=0,g=0;g65535?new Uint32Array(3*n):new Uint16Array(3*n))},setSpriteAlign:function(t,e,n,i,r){var o,a,s,l;switch(null==n&&(n="left"),null==i&&(i="top"),r=r||0,n){case"left":o=r,s=e[0]+r;break;case"center":case"middle":o=-e[0]/2,s=e[0]/2;break;case"right":o=-e[0]-r,s=-r}switch(i){case"bottom":a=r,l=e[1]+r;break;case"middle":a=-e[1]/2,l=e[1]/2;break;case"top":a=-e[1]-r,l=-r}var u=4*t,c=this.attributes.offset;c.set(u,[o,l]),c.set(u+1,[s,l]),c.set(u+2,[s,a]),c.set(u+3,[o,a])},addSprite:function(t,e,n,i,r,o){var a=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,n,i,r,o);for(var s=0;si[1]?0:1,a=this._faces[2*n+o],s=this._faces[2*n+1-o];a.rootNode.invisible=!0,s.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),n=t.getAxis("y"),i=t.getAxis("z"),r=i.getExtentMax(),o=i.getExtentMin(),a=e.getExtentMin(),s=e.getExtentMax(),l=n.getExtentMax(),u=n.getExtentMin(),c=this._axes[0].rootNode,h=this._axes[1].rootNode,d=this._axes[2].rootNode,p=this._faces,f=p[4].rootNode.invisible?u:l,g=p[2].rootNode.invisible?r:o,m=p[0].rootNode.invisible?a:s,v=p[2].rootNode.invisible?r:o,y=p[0].rootNode.invisible?s:a,_=p[4].rootNode.invisible?u:l;c.rotation.identity(),h.rotation.identity(),d.rotation.identity(),p[4].rootNode.invisible&&(this._axes[0].flipped=!0,c.rotation.rotateX(Math.PI)),p[0].rootNode.invisible&&(this._axes[1].flipped=!0,h.rotation.rotateZ(Math.PI)),p[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),c.position.set(0,g,f),h.position.set(m,v,0),d.position.set(y,0,_),c.update(),h.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new NZ.Vector4,new NZ.Vector4],n=new NZ.Vector4;this.groupGL.getWorldPosition(n),n.w=1,n.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),n.x/=n.w,n.y/=n.w,this._axes.forEach((function(i){var r=i.axisLineCoords;i.labelsMesh.geometry;for(var o=0;on.y?"bottom":"top"):(s="middle",a=c>n.x?"left":"right"),i.setSpriteAlign(a,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,n=e.dataToPoint(t),i=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function a(t){return fZ(t.model.get("axisPointer.show"),r.get("show"))}function s(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),n=NZ.parseColor(e.get("color")),i=AQ(e.get("width"),1),o=AQ(e.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}i.convertToDynamicArray(!0);for(var l=0;l 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n #endif\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n #else\n depth += bias;\n #endif\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec4 P = vec4(position, 1.0);\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = skinMatrixWS * P;\n#endif\n#ifdef INSTANCING\n @import clay.chunk.instancing_matrix\n P = instanceMat * P;\n#endif\n gl_Position = worldViewProjection * P;\n v_WorldPosition = (world * P).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end");var OQ,BQ,zQ,FQ,VQ,GQ,UQ,HQ=sW.extend((function(){return{softShadow:HQ.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new RY,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new DQ}}),(function(){this._gaussianPassH=new oZ({fragment:pX.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new oZ({fragment:pX.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new oZ({fragment:pX.source("clay.sm.debug_depth")})}),{render:function(t,e,n,i){n||(n=e.getMainCamera()),this.trigger("beforerender",this,t,e,n),this._renderShadowPass(t,e,n,i),this.trigger("afterrender",this,t,e,n)},renderDebug:function(t,e){t.saveClear();var n=t.viewport,i=0,r=e||n.width/4,o=r;for(var a in this.softShadow===HQ.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM"),this._textures){var s=this._textures[a];t.setViewport(i,0,r*s.width/s.height,o),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(t),i+=r*s.width/s.height}t.setViewport(n),t.restoreClear()},_updateReceivers:function(t,e){if(e.receiveShadow?(this._receivers.push(e),e.material.set("shadowEnabled",1),e.material.set("pcfKernel",this.kernelPCF)):e.material.set("shadowEnabled",0),this.softShadow===HQ.VSM)e.material.define("fragment","USE_VSM"),e.material.undefine("fragment","PCF_KERNEL_SIZE");else{e.material.undefine("fragment","USE_VSM");var n=this.kernelPCF;n&&n.length?e.material.define("fragment","PCF_KERNEL_SIZE",n.length/2):e.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(t,e){var n=this;e.traverse((function(e){e.isRenderable()&&n._updateReceivers(t,e)}));for(var i=0;i4){console.warn("Support at most 4 cascade");continue}f.shadowCascade>1&&(a=f),this.renderDirectionalLightShadow(t,e,n,f,h,c,u)}else"SPOT_LIGHT"===f.type?this.renderSpotLightShadow(t,e,f,l,s):"POINT_LIGHT"===f.type&&this.renderPointLightShadow(t,e,f,d);this._shadowMapNumber[f.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(p=0;p0?y.define("fragment",v,m):y.isDefined("fragment",v)&&y.undefine("fragment",v))}}for(p=0;p0){var x=u.map(A);if(_.directionalLightShadowMaps={value:u,type:"tv"},_.directionalLightMatrices={value:c,type:"m4v"},_.directionalLightShadowMapSizes={value:x,type:"1fv"},a){var b=h.slice(),w=h.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),c.reverse(),_.shadowCascadeClipsNear={value:b,type:"1fv"},_.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var S=s.map(A);(_=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},_.spotLightMatrices={value:l,type:"m4v"},_.spotLightShadowMapSizes={value:S,type:"1fv"}}d.length>0&&(_.pointLightShadowMaps={value:d,type:"tv"})}function A(t){return t.height}},renderDirectionalLightShadow:(OQ=new aY,BQ=new nj,zQ=new mj,FQ=new nj,VQ=new nj,GQ=new nj,UQ=new nj,function(t,e,n,i,r,o,a){var s=this._getDepthMaterial(i),l={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:kQ,getUniform:NQ,ifRender:function(t){return t.castShadow},sortCompare:DX.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var u=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(u).applyTransform(n.viewMatrix)}var c=Math.min(-e.viewBoundingBoxLastFrame.min.z,n.far),h=Math.max(-e.viewBoundingBoxLastFrame.max.z,n.near),d=this._getDirectionalLightCamera(i,e,n),p=GQ.array;UQ.copy(d.projectionMatrix),vX.invert(VQ.array,d.worldTransform.array),vX.multiply(VQ.array,VQ.array,n.worldTransform.array),vX.multiply(p,UQ.array,VQ.array);for(var f=[],g=n instanceof wY,m=(n.near+n.far)/(n.near-n.far),v=2*n.near*n.far/(n.near-n.far),y=0;y<=i.shadowCascade;y++){var _=h*Math.pow(c/h,y/i.shadowCascade),x=h+(c-h)*y/i.shadowCascade,b=_*i.cascadeSplitLogFactor+x*(1-i.cascadeSplitLogFactor);f.push(b),r.push(-(-b*m+v)/-b)}var w=this._getTexture(i,i.shadowCascade);a.push(w);var S=t.viewport,A=t.gl;for(this._frameBuffer.attach(w),this._frameBuffer.bind(t),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT),y=0;yd?s>p?f[r>0?"px":"nx"]=!0:f[a>0?"pz":"nz"]=!0:d>p?f[o>0?"py":"ny"]=!0:f[a>0?"pz":"nz"]=!0}for(n=0;n0)this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t])}}}),XQ=sW.extend((function(){return{nodes:[]}}),{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=n.COLOR_ATTACHMENT0&&c<=n.COLOR_ATTACHMENT0+8&&u.push(c);l.drawBuffersEXT(u)}t.saveClear(),t.clearBit=hW.DEPTH_BUFFER_BIT|hW.COLOR_BUFFER_BIT,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}}),ZQ=WQ.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),QQ=WQ.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new oZ({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var n=t.gl;for(var i in this.inputLinks){var r=(h=this.inputLinks[i]).node.getOutput(t,h.pin);this.pass.setUniform(i,r)}if(this.outputs){this.pass.outputs={};var o={};for(var a in this.outputs){var s=this.updateParameter(a,t);isNaN(s.width)&&this.updateParameter(a,t);var l=this.outputs[a],u=this._compositor.allocateTexture(s);this._outputTextures[a]=u,"string"==typeof(c=l.attachment||n.COLOR_ATTACHMENT0)&&(c=n[c]),o[c]=u}for(var c in this._compositor.getFrameBuffer().bind(t),o)this._compositor.getFrameBuffer().attach(o[c],c);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var i in this.inputLinks){var h;(h=this.inputLinks[i]).node.removeReference(h.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var n,i,r=this.outputs[t],o=r.parameters,a=r._parametersCopy;if(a||(a=r._parametersCopy={}),o)for(var s in o)"width"!==s&&"height"!==s&&(a[s]=o[s]);return n="function"==typeof o.width?o.width.call(this,e):o.width,i="function"==typeof o.height?o.height.call(this,e):o.height,n=Math.ceil(n),i=Math.ceil(i),a.width===n&&a.height===i||this._outputTextures[t]&&this._outputTextures[t].dispose(e),a.width=n,a.height=i,a},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){(this._outputReferences[t]--,0===this._outputReferences[t])&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){WQ.prototype.clear.call(this),this.pass.material.disableTexturesAll()}}),qQ="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",JQ="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",KQ="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",$Q="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",tq="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",eq="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",nq="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",iq="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",rq="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";!function(t){t.import("@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"),t.import(qQ),t.import("@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"),t.import(JQ),t.import("@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"),t.import(KQ),t.import($Q),t.import(tq),t.import(eq),t.import(nq),t.import("@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"),t.import(iq),t.import(rq)}(pX);var oq=/^#source\((.*?)\)/;function aq(t,e){var n=new jQ;e=e||{};var i={textures:{},parameters:{}};for(var r in t.parameters){var o=t.parameters[r];i.parameters[r]=cq(o)}return function(t,e,n,i){if(!t.textures)return void i({});var r={},o=0,a=!1,s=n.textureRootPath;aW.each(t.textures,(function(t,e){var n,l=t.path,u=cq(t.parameters);if(Array.isArray(l)&&6===l.length)s&&(l=l.map((function(t){return aW.relative2absolute(t,s)}))),n=new xY(u);else{if("string"!=typeof l)return;s&&(l=aW.relative2absolute(l,s)),n=new Ej(u)}n.load(l),o++,n.once("success",(function(){r[e]=n,0===--o&&(i(r),a=!0)}))})),0!==o||a||i(r)}(t,0,e,(function(r){i.textures=r,function(){for(var r=0;r0;)n+=i*(r%e),r=Math.floor(r/e),i/=e;return n}function fq(t){for(var e=new Uint8Array(t*t*4),n=0,i=new LX,r=0;r 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"),vq.prototype.setDepthTexture=function(t){this._depthTex=t},vq.prototype.setNormalTexture=function(t){this._normalTex=t,this._ssaoPass.material[t?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},vq.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._ssaoPass,a=this._blurPass;o.setUniform("kernel",this._kernels[n%this._kernels.length]),o.setUniform("depthTex",this._depthTex),null!=this._normalTex&&o.setUniform("normalTex",this._normalTex),o.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var s=new nj;nj.transpose(s,e.worldTransform),o.setUniform("projection",e.projectionMatrix.array),o.setUniform("projectionInv",e.invProjectionMatrix.array),o.setUniform("viewInverseTranspose",s.array);var l=this._ssaoTexture,u=this._blurTexture,c=this._blurTexture2;l.width=i/2,l.height=r/2,u.width=i,u.height=r,c.width=i,c.height=r,this._framebuffer.attach(l),this._framebuffer.bind(t),t.gl.clearColor(1,1,1,1),t.gl.clear(t.gl.COLOR_BUFFER_BIT),o.render(t),a.setUniform("textureSize",[i/2,r/2]),a.setUniform("projection",e.projectionMatrix.array),this._framebuffer.attach(u),a.setUniform("direction",0),a.setUniform("ssaoTexture",l),a.render(t),this._framebuffer.attach(c),a.setUniform("textureSize",[i,r]),a.setUniform("direction",1),a.setUniform("ssaoTexture",u),a.render(t),this._framebuffer.unbind(t);var h=t.clearColor;t.gl.clearColor(h[0],h[1],h[2],h[3])},vq.prototype.getTargetTexture=function(){return this._blurTexture2},vq.prototype.setParameter=function(t,e){"noiseTexSize"===t?this.setNoiseSize(e):"kernelSize"===t?this.setKernelSize(e):"intensity"===t?this._ssaoPass.material.set("intensity",e):this._ssaoPass.setUniform(t,e)},vq.prototype.setKernelSize=function(t){this._kernelSize=t,this._ssaoPass.material.define("fragment","KERNEL_SIZE",t),this._kernels=this._kernels||[];for(var e=0;e<30;e++)this._kernels[e]=mq(t,e*t,!!this._normalTex)},vq.prototype.setNoiseSize=function(t){var e=this._ssaoPass.getUniform("noiseTex");e?(e.data=fq(t),e.width=e.height=t,e.dirty()):(e=gq(t),this._ssaoPass.setUniform("noiseTex",gq(t))),this._ssaoPass.setUniform("noiseTexSize",[t,t])},vq.prototype.dispose=function(t){this._blurTexture.dispose(t),this._ssaoTexture.dispose(t),this._blurTexture2.dispose(t)};function yq(t){t=t||{},this._ssrPass=new oZ({fragment:pX.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new oZ({fragment:pX.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new oZ({fragment:pX.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new oZ({fragment:pX.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",t.normalTexture),this._ssrPass.setUniform("gBufferTexture2",t.depthTexture),this._blurPass1.setUniform("gBufferTexture1",t.normalTexture),this._blurPass1.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.setUniform("gBufferTexture1",t.normalTexture),this._blurPass2.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new Ej({type:Tj.HALF_FLOAT}),this._texture2=new Ej({type:Tj.HALF_FLOAT}),this._texture3=new Ej({type:Tj.HALF_FLOAT}),this._prevTexture=new Ej({type:Tj.HALF_FLOAT}),this._currentTexture=new Ej({type:Tj.HALF_FLOAT}),this._frameBuffer=new RY({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}pX.import("@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"),yq.prototype.setAmbientCubemap=function(t,e){this._ssrPass.material.set("specularCubemap",t),this._ssrPass.material.set("specularIntensity",e);var n=t&&e;this._ssrPass.material[n?"enableTexture":"disableTexture"]("specularCubemap")},yq.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._ssrTexture,s=this._texture2,l=this._texture3;a.width=this._prevTexture.width=this._currentTexture.width=r/this._downScale,a.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,s.width=l.width=r,s.height=l.height=o;var u=this._frameBuffer,c=this._ssrPass,h=this._blurPass1,d=this._blurPass2,p=this._blendPass,f=new nj,g=new nj;nj.transpose(f,e.worldTransform),nj.transpose(g,e.viewMatrix),c.setUniform("sourceTexture",n),c.setUniform("projection",e.projectionMatrix.array),c.setUniform("projectionInv",e.invProjectionMatrix.array),c.setUniform("toViewSpace",f.array),c.setUniform("toWorldSpace",g.array),c.setUniform("nearZ",e.near);var m=i/this._totalSamples*this._samplePerFrame;if(c.setUniform("jitterOffset",m),c.setUniform("sampleOffset",i*this._samplePerFrame),h.setUniform("textureSize",[a.width,a.height]),d.setUniform("textureSize",[r,o]),d.setUniform("sourceTexture",n),h.setUniform("projection",e.projectionMatrix.array),d.setUniform("projection",e.projectionMatrix.array),u.attach(a),u.bind(t),c.render(t),this._physicallyCorrect&&(u.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",a),p.material.set({weight1:i>=1?.95:0,weight2:i>=1?.05:1}),p.render(t)),u.attach(s),h.setUniform("texture",this._physicallyCorrect?this._currentTexture:a),h.render(t),u.attach(l),d.setUniform("texture",s),d.render(t),u.unbind(t),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},yq.prototype.getTargetTexture=function(){return this._texture3},yq.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},yq.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=aZ.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},yq.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},yq.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},yq.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};var _q=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925];function xq(t,e,n,i,r){var o=t.gl;e.setUniform(o,"1i",n,r),o.activeTexture(o.TEXTURE0+r),i.isRenderable()?i.bind(t):i.unbind(t)}function bq(t,e,n,i,r){var o,a,s,l,u=t.gl;return function(r,c,h){if(!l||l.material!==r.material){var d=r.material,p=r.__program,f=d.get("roughness");null==f&&(f=1);var g=d.get("normalMap")||e,m=d.get("roughnessMap"),v=d.get("bumpMap"),y=d.get("uvRepeat"),_=d.get("uvOffset"),x=d.get("detailUvRepeat"),b=d.get("detailUvOffset"),w=!!v&&d.isTextureEnabled("bumpMap"),S=!!m&&d.isTextureEnabled("roughnessMap"),A=d.isDefined("fragment","DOUBLE_SIDED");v=v||n,m=m||i,h!==c?(c.set("normalMap",g),c.set("bumpMap",v),c.set("roughnessMap",m),c.set("useBumpMap",w),c.set("useRoughnessMap",S),c.set("doubleSide",A),null!=y&&c.set("uvRepeat",y),null!=_&&c.set("uvOffset",_),null!=x&&c.set("detailUvRepeat",x),null!=b&&c.set("detailUvOffset",b),c.set("roughness",f)):(p.setUniform(u,"1f","roughness",f),o!==g&&xq(t,p,"normalMap",g,0),a!==v&&v&&xq(t,p,"bumpMap",v,1),s!==m&&m&&xq(t,p,"roughnessMap",m,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=_&&p.setUniform(u,"2f","uvOffset",_),null!=x&&p.setUniform(u,"2f","detailUvRepeat",x),null!=b&&p.setUniform(u,"2f","detailUvOffset",b),p.setUniform(u,"1i","useBumpMap",+w),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+A)),o=g,a=v,s=m,l=r}}}function wq(t){this._depthTex=new Ej({format:Tj.DEPTH_COMPONENT,type:Tj.UNSIGNED_INT}),this._normalTex=new Ej({type:Tj.HALF_FLOAT}),this._framebuffer=new RY,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,RY.DEPTH_ATTACHMENT),this._normalMaterial=new OW({shader:new pX(pX.source("ecgl.normal.vertex"),pX.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=JY.createBlank("#000"),this._defaultBumpMap=JY.createBlank("#000"),this._defaultRoughessMap=JY.createBlank("#000"),this._debugPass=new oZ({fragment:pX.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}function Sq(t){t=t||{},this._edgePass=new oZ({fragment:pX.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Ej({type:Tj.HALF_FLOAT}),this._frameBuffer=new RY,this._frameBuffer.attach(this._targetTexture)}pX.import("@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"),wq.prototype.getDepthTexture=function(){return this._depthTex},wq.prototype.getNormalTexture=function(){return this._normalTex},wq.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._depthTex,a=this._normalTex,s=this._normalMaterial;o.width=i,o.height=r,a.width=i,a.height=r;var l=e.getRenderList(n).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,n,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:bq(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},wq.prototype.renderDebug=function(t){this._debugPass.render(t)},wq.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)},Sq.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._targetTexture;a.width=r,a.height=o;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,o]),this._edgePass.setUniform("texture",n),this._edgePass.render(t),s.unbind(t)},Sq.prototype.getTargetTexture=function(){return this._targetTexture},Sq.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},Sq.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};var Aq={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]};function Tq(t,e){return{color:{parameters:{width:t,height:e}}}}pX.import(qQ),pX.import(JQ),pX.import(KQ),pX.import($Q),pX.import(tq),pX.import(eq),pX.import(nq),pX.import(iq),pX.import(rq),pX.import("@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"),pX.import("@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end");var Mq=["composite","FXAA"];function Iq(){this._width,this._height,this._dpr,this._sourceTexture=new Ej({type:Tj.HALF_FLOAT}),this._depthTexture=new Ej({format:Tj.DEPTH_COMPONENT,type:Tj.UNSIGNED_INT}),this._framebuffer=new RY,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,RY.DEPTH_ATTACHMENT),this._normalPass=new wq,this._compositor=aq(Aq);var t=this._compositor.getNodeByName("source");t.texture=this._sourceTexture;var e=this._compositor.getNodeByName("coc");this._sourceNode=t,this._cocNode=e,this._compositeNode=this._compositor.getNodeByName("composite"),this._fxaaNode=this._compositor.getNodeByName("FXAA"),this._dofBlurNodes=["dof_far_blur","dof_near_blur","dof_coc_blur"].map((function(t){return this._compositor.getNodeByName(t)}),this),this._dofBlurKernel=0,this._dofBlurKernelSize=new Float32Array(0),this._finalNodesChain=Mq.map((function(t){return this._compositor.getNodeByName(t)}),this);var n={normalTexture:this._normalPass.getNormalTexture(),depthTexture:this._normalPass.getDepthTexture()};this._ssaoPass=new vq(n),this._ssrPass=new yq(n),this._edgePass=new Sq(n)}function Cq(t){for(var e=[],n=0;n<30;n++)e.push([pq(n,2),pq(n,3)]);this._haltonSequence=e,this._frame=0,this._sourceTex=new Ej,this._sourceFb=new RY,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new Ej,this._outputTex=new Ej;var i=this._blendPass=new oZ({fragment:pX.source("clay.compositor.blend")});i.material.disableTexturesAll(),i.material.enableTexture(["texture1","texture2"]),this._blendFb=new RY({depthBuffer:!1}),this._outputPass=new oZ({fragment:pX.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(t){t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)}}function Dq(t){t=t||"perspective",this.layer=null,this.scene=new mY,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new Iq,this._temporalSS=new Cq,this._shadowMapPass=new HQ;for(var e=[],n=0,i=0;i<30;i++){for(var r=[],o=0;o<6;o++)r.push(4*pq(n,2)-2),r.push(4*pq(n,3)-2),n++;e.push(r)}this._pcfKernels=e,this.scene.on("beforerender",(function(t,e,n){this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n)}),this)}Iq.prototype.resize=function(t,e,n){t*=n=n||1,e*=n;var i=this._sourceTexture,r=this._depthTexture;i.width=t,i.height=e,r.width=t,r.height=e;var o={getWidth:function(){return t},getHeight:function(){return e},getDevicePixelRatio:function(){return n}};function a(t,e){if("function"==typeof t[e]){var n=t[e].__original||t[e];t[e]=function(t){return n.call(this,o)},t[e].__original=n}}this._compositor.nodes.forEach((function(t){for(var e in t.outputs){var n=t.outputs[e].parameters;n&&(a(n,"width"),a(n,"height"))}for(var i in t.parameters)a(t.parameters,i)})),this._width=t,this._height=e,this._dpr=n},Iq.prototype.getWidth=function(){return this._width},Iq.prototype.getHeight=function(){return this._height},Iq.prototype._ifRenderNormalPass=function(){return this._enableSSAO||this._enableEdge||this._enableSSR},Iq.prototype._getPrevNode=function(t){for(var e=Mq.indexOf(t.name)-1,n=this._finalNodesChain[e];n&&!this._compositor.getNodeByName(n.name);)e-=1,n=this._finalNodesChain[e];return n},Iq.prototype._getNextNode=function(t){for(var e=Mq.indexOf(t.name)+1,n=this._finalNodesChain[e];n&&!this._compositor.getNodeByName(n.name);)e+=1,n=this._finalNodesChain[e];return n},Iq.prototype._addChainNode=function(t){var e=this._getPrevNode(t),n=this._getNextNode(t);e&&(t.inputs.texture=e.name,n?(t.outputs=Tq(this.getWidth.bind(this),this.getHeight.bind(this)),n.inputs.texture=t.name):t.outputs=null,this._compositor.addNode(t))},Iq.prototype._removeChainNode=function(t){var e=this._getPrevNode(t),n=this._getNextNode(t);e&&(n?(e.outputs=Tq(this.getWidth.bind(this),this.getHeight.bind(this)),n.inputs.texture=e.name):e.outputs=null,this._compositor.removeNode(t))},Iq.prototype.updateNormal=function(t,e,n,i){this._ifRenderNormalPass()&&this._normalPass.update(t,e,n)},Iq.prototype.updateSSAO=function(t,e,n,i){this._ssaoPass.update(t,n,i)},Iq.prototype.enableSSAO=function(){this._enableSSAO=!0},Iq.prototype.disableSSAO=function(){this._enableSSAO=!1},Iq.prototype.enableSSR=function(){this._enableSSR=!0},Iq.prototype.disableSSR=function(){this._enableSSR=!1},Iq.prototype.getSSAOTexture=function(){return this._ssaoPass.getTargetTexture()},Iq.prototype.getSourceFrameBuffer=function(){return this._framebuffer},Iq.prototype.getSourceTexture=function(){return this._sourceTexture},Iq.prototype.disableFXAA=function(){this._removeChainNode(this._fxaaNode)},Iq.prototype.enableFXAA=function(){this._addChainNode(this._fxaaNode)},Iq.prototype.enableBloom=function(){this._compositeNode.inputs.bloom="bloom_composite",this._compositor.dirty()},Iq.prototype.disableBloom=function(){this._compositeNode.inputs.bloom=null,this._compositor.dirty()},Iq.prototype.enableDOF=function(){this._compositeNode.inputs.texture="dof_composite",this._compositor.dirty()},Iq.prototype.disableDOF=function(){this._compositeNode.inputs.texture="source",this._compositor.dirty()},Iq.prototype.enableColorCorrection=function(){this._compositeNode.define("COLOR_CORRECTION"),this._enableColorCorrection=!0},Iq.prototype.disableColorCorrection=function(){this._compositeNode.undefine("COLOR_CORRECTION"),this._enableColorCorrection=!1},Iq.prototype.enableEdge=function(){this._enableEdge=!0},Iq.prototype.disableEdge=function(){this._enableEdge=!1},Iq.prototype.setBloomIntensity=function(t){this._compositeNode.setParameter("bloomIntensity",t)},Iq.prototype.setSSAOParameter=function(t,e){switch(t){case"quality":var n={low:6,medium:12,high:32,ultra:62}[e]||12;this._ssaoPass.setParameter("kernelSize",n);break;case"radius":this._ssaoPass.setParameter(t,e),this._ssaoPass.setParameter("bias",e/200);break;case"intensity":this._ssaoPass.setParameter(t,e)}},Iq.prototype.setDOFParameter=function(t,e){switch(t){case"focalDistance":case"focalRange":case"fstop":this._cocNode.setParameter(t,e);break;case"blurRadius":for(var n=0;n=this._haltonSequence.length},render:function(t,e,n){var i=this._blendPass;0===this._frame?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),n||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}},Dq.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),"perspective"===t?this.camera instanceof wY||(this.camera=new wY,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof eZ||(this.camera=new eZ,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3},Dq.prototype.setViewport=function(t,e,n,i,r){this.camera instanceof wY&&(this.camera.aspect=n/i),r=r||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=n,this.viewport.height=i,this.viewport.devicePixelRatio=r,this._compositor.resize(n*r,i*r),this._temporalSS.resize(n*r,i*r)},Dq.prototype.containPoint=function(t,e){var n=this.viewport;return e=this.layer.renderer.getHeight()-e,t>=n.x&&e>=n.y&&t<=n.x+n.width&&e<=n.y+n.height};var Eq=new GW;function Lq(t,e){var n=Gp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});n.y=e.getHeight()-n.y-n.height,this.viewGL.setViewport(n.x,n.y,n.width,n.height,e.getDevicePixelRatio());var i=t.get("boxWidth"),r=t.get("boxHeight"),o=t.get("boxDepth");this.getAxis("x").setExtent(-i/2,i/2),this.getAxis("y").setExtent(o/2,-o/2),this.getAxis("z").setExtent(-r/2,r/2),this.size=[i,r,o]}function Pq(t,e){var n={};t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();["x","y","z"].forEach((function(t){e.mapDimensionsAll(t,!0).forEach((function(i){!function(t,e){n[t]=n[t]||[1/0,-1/0],n[t][0]=Math.min(e[0],n[t][0]),n[t][1]=Math.max(e[1],n[t][1])}(t,e.getDataExtent(i,!0))}))}))}}),this),["xAxis3D","yAxis3D","zAxis3D"].forEach((function(e){t.eachComponent(e,(function(t){var i=e.charAt(0),r=t.getReferringComponents("grid3D").models[0],o=r.coordinateSystem;if(o===this){var a=o.getAxis(i);if(!a){(a=new CQ(i,Gb(n[i]||[1/0,-1/0],t))).type=t.get("type");var s="category"===a.type;a.onBand=s&&t.get("boundaryGap"),a.inverse=t.get("inverse"),t.axis=a,a.model=t,a.getLabelModel=function(){return t.getModel("axisLabel",r.getModel("axisLabel"))},a.getTickModel=function(){return t.getModel("axisTick",r.getModel("axisTick"))},o.addAxis(a)}}}),this)}),this),this.resize(this.model,e)}Dq.prototype.castRay=function(t,e,n){var i=this.layer.renderer,r=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,Eq),this.camera.castRay(Eq,n),i.viewport=r,n},Dq.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},Dq.prototype._doRender=function(t,e,n){var i=this.scene,r=this.camera;n=n||0,this._updateTransparent(t,i,r,n),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,r,!0)),this._updateShadowPCFKernel(n);var o,a=t.clearColor;(t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,i,r,this._temporalSS.getFrame())),this._updateSSAO(t,i,r,this._temporalSS.getFrame()),this._enablePostEffect)?((o=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,r,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,r,null,0))):this.needsTemporalSS()&&e?((o=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,r,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(i,r,!0,!0))},Dq.prototype._updateTransparent=function(t,e,n,i){for(var r=new LX,o=new nj,a=n.getWorldPosition(),s=e.getRenderList(n).transparent,l=0;lthis.camera.far||t80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);u=Math.max(o-i,a-r)}return Qq(d,p,n,i,r,u),p}function Yq(t,e,n,i,r){var o,a;if(r===fJ(t,e,n,i)>0)for(o=e;o=e;o-=i)a=hJ(o,t[o],t[o+1],a);return a&&sJ(a,a.next)&&(dJ(a),a=a.next),a}function Zq(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!sJ(i,i.next)&&0!==aJ(i.prev,i,i.next))i=i.next;else{if(dJ(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function Qq(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=nJ(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?Jq(t,i,r,o):qq(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),dJ(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Qq(t=Kq(t,e,n),e,n,i,r,o,2):2===a&&$q(t,e,n,i,r,o):Qq(Zq(t),e,n,i,r,o,1);break}}}function qq(t){var e=t.prev,n=t,i=t.next;if(aJ(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(rJ(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&aJ(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Jq(t,e,n,i){var r=t.prev,o=t,a=t.next;if(aJ(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=nJ(s,l,e,n,i),d=nJ(u,c,e,n,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&rJ(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&aJ(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&rJ(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&aJ(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function Kq(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!sJ(r,o)&&lJ(r,i,i.next,o)&&uJ(r,o)&&uJ(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),dJ(i),dJ(i.next),i=t=o),i=i.next}while(i!==t);return i}function $q(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&oJ(a,s)){var l=cJ(a,s);return a=Zq(a,a.next),l=Zq(l,l.next),Qq(a,e,n,i,r,o),void Qq(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function tJ(t,e){return t.x-e.x}function eJ(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=c&&r!==i.x&&rJ(on.x)&&uJ(i,t)&&(n=i,d=l),i=i.next;return n}(t,e),e){var n=cJ(e,t);Zq(n,n.next)}}function nJ(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function iJ(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function oJ(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&lJ(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&uJ(t,e)&&uJ(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function aJ(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function sJ(t,e){return t.x===e.x&&t.y===e.y}function lJ(t,e,n,i){return!!(sJ(t,e)&&sJ(n,i)||sJ(t,i)&&sJ(n,e))||aJ(t,e,n)>0!=aJ(t,e,i)>0&&aJ(n,i,t)>0!=aJ(n,i,e)>0}function uJ(t,e){return aJ(t.prev,t,t.next)<0?aJ(t,e,t.next)>=0&&aJ(t,t.prev,e)>=0:aJ(t,e,t.prev)<0||aJ(t,t.next,e)<0}function cJ(t,e){var n=new pJ(t.i,t.x,t.y),i=new pJ(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function hJ(t,e,n,i){var r=new pJ(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function dJ(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function pJ(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function fJ(t,e,n,i){for(var r=0,o=e,a=n-i;ol&&s.push({pivot:Math.floor((u+l)/2),left:l,right:u});var u;l=o[a].pivot+1;(u=o[a].right)>l&&s.push({pivot:Math.floor((u+l)/2),left:l,right:u})}o=this._parts=s}else for(a=0;a=2e4},doSortTriangles:function(t,e){var n=this.indices;if(0===e){var i=this.attributes.position;t=t.array;this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new n.constructor(n.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var r,o=0,a=0;a0,n={},i=0;i65535?new Uint32Array(3*a):new Uint16Array(3*a),d.material.shader!==e&&d.material.attachShader(e,!0),NZ.setMaterialFromModel(e.__shading,d.material,t,n),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-i))},_updateRegionMesh:function(t,e,n,i){for(var r=t.getData(),o=0,a=0,s=!1,l=this._polygonMesh,u=this._linesMesh,c=n;c0;w&&(b*=e.getDevicePixelRatio(),this._updateLinesGeometry(u.geometry,t,c,y,b,t.coordinateSystem.transform)),u.invisible=!w,u.material.set({color:m})}(l=this._polygonMesh).material.transparent=s,l.material.depthMask=!s,l.geometry.updateBoundingBox(),l.frontFace=this.extrudeY?NZ.Mesh.CCW:NZ.Mesh.CW,l.material.get("normalMap")&&l.geometry.generateTangents(),l.seriesIndex=t.seriesIndex,l.on("mousemove",this._onmousemove,this),l.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var n=NZ.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=fZ(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",n),r.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,n){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(o=this._groundMaterials.lambert),NZ.setMaterialFromModel(r,o,i,n),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",NZ.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,n){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],o=t.coordinateSystem,a=e;a1?i:0,E[V][m]=M.points[U+2],l.set(r+V,E[V]),s?(N[0]=(M.points[U]*v[0]-y[0])/x,N[1]=(M.points[U+2]*v[m]-y[m])/x):(N[0]=(G?k:k+F)/x,N[1]=(E[V][g]*v[g]-y[g])/x),c.set(r+V,N)}IJ.sub(L,E[1],E[0]),IJ.sub(P,E[3],E[0]),IJ.cross(R,L,P),IJ.normalize(R,R);for(V=0;V<4;V++)u.set(r+V,R),p&&h.set(r+V,a);for(V=0;V<6;V++)f[3*o+V]=D[V]+r;r+=4,o+=2,k+=F}}return e.dirty(),{vertexOffset:r,triangleOffset:o}},_getRegionLinesInfo:function(t,e,n){var i=0,r=0;e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,o=t.interiors;i+=n.getPolylineVertexCount(e),r+=n.getPolylineTriangleCount(e);for(var a=0;athis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[2*e];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});qt(GJ.prototype,QZ),qt(GJ.prototype,qZ),qt(GJ.prototype,JZ),qt(GJ.prototype,Hq);var UJ=Math.PI,HJ=Math.sin,WJ=Math.cos,XJ=Math.tan,jJ=Math.asin,YJ=Math.atan2,ZJ=UJ/180,QJ=864e5,qJ=2440588;function JJ(t){return function(t){return t.valueOf()/QJ-.5+qJ}(t)-2451545}var KJ=23.4397*ZJ;function $J(t,e){return YJ(HJ(t)*WJ(KJ)-XJ(e)*HJ(KJ),WJ(t))}function tK(t,e,n){return YJ(HJ(t),WJ(t)*HJ(e)-XJ(n)*WJ(e))}function eK(t,e,n){return jJ(HJ(e)*HJ(n)+WJ(e)*WJ(n)*WJ(t))}function nK(t){var e,n,i=function(t){return ZJ*(357.5291+.98560028*t)}(t),r=function(t){return t+ZJ*(1.9148*HJ(t)+.02*HJ(2*t)+3e-4*HJ(3*t))+102.9372*ZJ+UJ}(i);return{dec:(e=r,n=0,jJ(HJ(n)*WJ(KJ)+WJ(n)*HJ(KJ)*HJ(e))),ra:$J(r,0)}}var iK={};iK.getPosition=function(t,e,n){var i=ZJ*-n,r=ZJ*e,o=JJ(t),a=nK(o),s=function(t,e){return ZJ*(280.16+360.9856235*t)-e}(o,i)-a.ra;return{azimuth:tK(s,r,a.dec),altitude:eK(s,r,a.dec)}};NZ.Shader.import(EZ),NZ.Shader.import("@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end");var rK=zm.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new NZ.Node,this._sphereGeometry=new NZ.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new NZ.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new NZ.PlaneGeometry,this._earthMesh=new NZ.Mesh({renderNormal:!0}),this._atmosphereMesh=new NZ.Mesh,this._atmosphereGeometry=new NZ.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new NZ.Material({shader:new NZ.Shader(NZ.Shader.source("ecgl.atmosphere.vertex"),NZ.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=NZ.Mesh.CW,this._lightRoot=new NZ.Node,this._sceneHelper=new cQ,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new nQ({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,n){var i=t.coordinateSystem,r=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var a="ecgl."+r;o.material&&o.material.shader.name===a||(o.material=NZ.createMaterial(a)),NZ.setMaterialFromModel(r,o.material,t,n),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",NZ.parseColor(t.get("baseColor")));var s=.99*i.radius;if(o.scale.set(s,s,s),t.get("atmosphere.show")){o.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),o.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else o.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),n,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var c=o.material.setTextureImage("bumpMap",t.get("heightTexture"),n,{flipY:!1,anisotropic:8});c&&c.surface&&c.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,n),this._displaceVertices(t,n),this._updateViewControl(t,n),this._updateLayers(t,n)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},_updateLayers:function(t,e){var n=t.coordinateSystem,i=t.get("layers"),r=n.radius,o=[],a=[],s=[],l=[];re(i,(function(t){var i=new zd(t),u=i.get("type"),c=NZ.loadTexture(i.get("texture"),e,{flipY:!1,anisotropic:8});if(c.surface&&c.surface.attachToMesh(this._earthMesh),"blend"===u){var h=i.get("blendTo"),d=fZ(i.get("intensity"),1);"emission"===h?(s.push(c),l.push(d)):(o.push(c),a.push(d))}else{var p=i.get("id"),f=this._layerMeshes[p];f||(f=this._layerMeshes[p]=new NZ.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===i.get("shading")?(f.material=f.__lambertMaterial||new NZ.Material({autoUpdateTextureStatus:!1,shader:NZ.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),f.__lambertMaterial=f.material):(f.material=f.__colorMaterial||new NZ.Material({autoUpdateTextureStatus:!1,shader:NZ.createShader("ecgl.color"),transparent:!0,depthMask:!1}),f.__colorMaterial=f.material),f.material.enableTexture("diffuseMap");var g=i.get("distance"),m=r+(null==g?n.radius/100:g);f.scale.set(m,m,m),r=m;var v=this._blankTexture||(this._blankTexture=NZ.createBlankTexture("rgba(255, 255, 255, 0)"));f.material.set("diffuseMap",v),NZ.loadTexture(i.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(f),f.material.set("diffuseMap",t),e.getZr().refresh()})),i.get("show")?this.groupGL.add(f):this.groupGL.remove(f)}}),this);var u=this._earthMesh.material;u.define("fragment","LAYER_DIFFUSEMAP_COUNT",o.length),u.define("fragment","LAYER_EMISSIVEMAP_COUNT",s.length),u.set("layerDiffuseMap",o),u.set("layerDiffuseIntensity",a),u.set("layerEmissiveMap",s),u.set("layerEmissionIntensity",l);var c=t.getModel("debug.wireframe");if(c.get("show")){u.define("both","WIREFRAME_TRIANGLE");var h=NZ.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)"),d=fZ(c.get("lineStyle.width"),1);u.set("wireframeLineWidth",d),u.set("wireframeLineColor",h)}else u.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var n=t.coordinateSystem,i=t.getModel("viewControl");n.viewGL.camera;var r=this;var o=this._control;o.setViewGL(n.viewGL);var a,s,l=i.get("targetCoord");null!=l&&(s=l[0]+90,a=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:a,beta:s}),o.off("update"),o.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var n=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||n!==this._displacementQuality||i!==this._showDebugWireframe){this._displacementQuality=n,this._showDebugWireframe=i;var o=this._sphereGeometry,a={low:100,medium:200,high:400,ultra:800}[n]||200,s=a/2;(o.widthSegments!==a||i)&&(o.widthSegments=a,o.heightSegments=s,o.build()),this._doDisplaceVertices(o,r),i&&o.generateBarycentric()}},_doDisplaceVertices:function(t,e){var n=t.attributes.position.value,i=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===n.length||((r=new Float32Array(n.length)).set(n),t.__originalPosition=r);for(var o=e.displacementWidth,a=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var a=[];mK.perspective(a,yK,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(a),this.viewGL.camera.decomposeProjectionMatrix();a=mK.identity([]);var s=this.dataToPoint(this.center);mK.scale(a,a,[1,-1,1]),mK.translate(a,a,[0,0,-t]),mK.rotateX(a,a,e),mK.rotateZ(a,a,-this.bearing/180*Math.PI),mK.translate(a,a,[-s[0]*this.getScale()*xK,-s[1]*this.getScale()*xK,0]),this.viewGL.camera.viewMatrix.array=a;var l=[];mK.invert(l,a),this.viewGL.camera.worldTransform.array=l,this.viewGL.camera.decomposeWorldTransform();var u,c=vK*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var h=this.altitudeExtent[1]-this.altitudeExtent[0];u=this.boxHeight/h*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else u=c/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*xK;this.viewGL.rootNode.scale.set(this.getScale()*xK,this.getScale()*xK,u)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*vK,e)},projectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1]*_K/180,o=e*(i*_K/180+_K)/(2*_K),a=e*(_K-Math.log(Math.tan(_K/4+.5*r)))/(2*_K);return(n=n||[])[0]=o,n[1]=a,n},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*vK,e)},unprojectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1],o=i/e*(2*_K)-_K,a=2*(Math.atan(Math.exp(_K-r/e*(2*_K)))-_K/4);return(n=n||[])[0]=180*o/_K,n[1]=180*a/_K,n},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,vK,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}},wK.prototype=new bK,wK.prototype.constructor=wK,wK.prototype.type="mapbox3D";var AK=SK("mapbox3D",wK,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMapboxCameraOption())}))}));Z_((function(t){t.registerComponentModel(hK),t.registerComponentView(gK),t.registerCoordinateSystem("mapbox3D",AK),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"mapbox3D",query:t},(function(e){e.setMapboxCameraOption(t)}))}))}));var TK=["zoom","center","pitch","bearing"],MK=Zp.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return TK.reduce((function(e,n){return e[n]=t.get(n),e}),{})},setMaptalksCameraOption:function(t){null!=t&&TK.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});function IK(t,e,n,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:n,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}qt(MK.prototype,qZ),qt(MK.prototype,JZ),IK.prototype.setUnpainted=function(){},IK.prototype.resize=function(){this._maptalks.checkSize()},IK.prototype.getMaptalks=function(){return this._maptalks},IK.prototype.clear=function(){},IK.prototype.refresh=function(){this._maptalks.checkSize()};var CK=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];IK.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},CK.forEach((function(e){this._handlers[e]=function(n){var i={};for(var r in n)i[r]=n[r];i.bubbles=!1;var o=new n.constructor(n.type,i);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(o):t.firstElementChild.dispatchEvent(o)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},IK.prototype.dispose=function(){CK.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()},NZ.Shader.import(fK);var DK=zm.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new NZ.Mesh({geometry:new NZ.PlaneGeometry,material:new NZ.Material({shader:new NZ.Shader({vertex:NZ.Shader.source("ecgl.displayShadow.vertex"),fragment:NZ.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var n=e.getZr();this._zrLayer=new IK("maptalks3D",n,t.get("center"),t.get("zoom")),n.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new NZ.Node,this._sceneHelper=new cQ(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach((function(t){i.on(t,r)}))},render:function(t,e,n){this._zrLayer||this._initMaptalksLayer(t,n);var i=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),o=i.getBaseLayer();r!==this._oldUrlTemplate&&(o?o.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(o=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(o))),this._oldUrlTemplate=r,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var a=t.coordinateSystem;a.viewGL.scene.add(this._lightRoot),a.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(a.viewGL.scene),this._sceneHelper.updateLight(t),a.viewGL.setPostEffect(t.getModel("postEffect"),n),a.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,n,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),n.getZr().refresh()},_dispatchInteractAction:function(t,e,n){var i;t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:(i=e.getResolution(),19-Math.log(i/EK)/Math.LN2+1),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var n=new NZ.Plane(new NZ.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new NZ.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new NZ.Vector2(1,1)),o=i.intersectPlane(n),a=r.intersectPlane(n),s=o.dist(a)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),EK=12756274*Math.PI/(256*Math.pow(2,20));function LK(){bK.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}LK.prototype=new bK,LK.prototype.constructor=LK,LK.prototype.type="maptalks3D";var PK=SK("maptalks3D",LK,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMaptalksCameraOption())}))}));Z_((function(t){t.registerComponentModel(MK),t.registerComponentView(DK),t.registerCoordinateSystem("maptalks3D",PK),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"maptalks3D",query:t},(function(e){e.setMaptalksCameraOption(t)}))}))}));var RK=rQ.vec3,NK=Vb.isDimensionStacked;function kK(t,e,n){for(var i=t.getDataExtent(e),r=t.getDataExtent(n),o=i[1]-i[0]||i[0],a=r[1]-r[0]||r[0],s=new Uint8Array(2500),l=0;l0&&n>0||e<0&&n<0)}(u),h=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),d=NK(n,h[2]),p=d?n.getCalculationInfo("stackResultDimension"):h[2];n.each(h,(function(t,r,o,a){var s=n.get(p,a),l=d?s-o:c?0:u[0],h=e.dataToPoint([t,r,l]),f=e.dataToPoint([t,r,s]),g=RK.dist(h,f),m=[0,f[1]"+r.join("
")}(r):yn(Mp(r)),a=i.getName(e),s=AJ(i,e);me(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=Rp(s=s||"transparent"),u=t.name;return"\0-"===u&&(u=""),u=u?yn(u)+(n?": ":"
"):"",n?l+u+o:u+l+(a?yn(a)+": "+o:o)}function UK(t,e,n){n=n||t.getSource();var i=e||B_(t.get("coordinateSystem"))||["x","y","z"],r=Sx(n,{dimensionsDefine:n.dimensionsDefine||t.get("dimensions"),encodeDefine:n.encodeDefine||t.get("encode"),coordDimensions:i.map((function(e){var n=t.getReferringComponents(e+"Axis3D").models[0];return{type:n&&"category"===n.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&r.forEach((function(e){if(i.indexOf(e.coordDim)>=0){var n=t.getReferringComponents(e.coordDim+"Axis3D").models[0];n&&"category"===n.get("type")&&(e.ordinalMeta=n.getOrdinalMeta())}}));var o=Vb.enableDataStack(t,r,{byIndex:!0,stackedCoordDimension:"z"}),a=new bx(r,t);return a.setCalculationInfo(o),a.initData(n),a}VK.getFormattedLabel=function(t,e,n,i,r){n=n||"normal";var o=t.getData(i).getItemModel(e),a=t.getDataParams(e,i);null!=r&&a.value instanceof Array&&(a.value=a.value[r]);var s,l=o.get("normal"===n?["label","formatter"]:["emphasis","label","formatter"]);return null==l&&(l=o.get(["label","formatter"])),"function"==typeof l?(a.status=n,s=l(a)):"string"==typeof l&&(s=Pp(l,a)),s},VK.normalizeToArray=function(t){return t instanceof Array?t:null==t?[]:[t]};var HK=Em.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return UK(this)},getFormattedLabel:function(t,e,n,i){var r=VK.getFormattedLabel(this,t,e,n,i);return null==r&&(r=this.getData().get("z",t)),r},formatTooltip:function(t){return GK(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});qt(HK.prototype,Hq);var WK,XK,jK,YK,ZK,QK,qK,JK,KK=rQ.vec3,$K=rQ.mat3,t$=Gj.extend((function(){return{attributes:{position:new Gj.Attribute("position","float",3,"POSITION"),normal:new Gj.Attribute("normal","float",3,"NORMAL"),color:new Gj.Attribute("color","float",4,"COLOR"),prevPosition:new Gj.Attribute("prevPosition","float",3),prevNormal:new Gj.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,n=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==n&&(this.attributes.position.init(n),e?this.attributes.normal.init(n):this.attributes.normal.value=null,this.attributes.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i),this._dataIndices=new Uint32Array(n))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var n=this.getBarVertexCount(),i=n*(t+1),r=n*t;r0&&this.bevelSegments>0)this._addBevelBar(t,h,g,m,this.bevelSize,this.bevelSegments,v);else{KK.copy(r,h),KK.normalize(r,r),KK.cross(o,g,r),KK.normalize(o,o),KK.cross(i,r,o),KK.normalize(o,o),KK.negate(a,i),KK.negate(s,r),KK.negate(l,o),e(u[0],t,i,m[0]/2),e(u[0],u[0],o,m[2]/2),e(u[1],t,i,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,a,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,a,m[0]/2),e(u[3],u[3],o,m[2]/2),e(n,t,r,m[1]),e(u[4],n,i,m[0]/2),e(u[4],u[4],o,m[2]/2),e(u[5],n,i,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],n,a,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],n,a,m[0]/2),e(u[7],u[7],o,m[2]/2);var x=this.attributes;if(this.enableNormal){c[0]=i,c[1]=a,c[2]=r,c[3]=s,c[4]=o,c[5]=l;for(var b=this._vertexOffset,w=0;w0&&(p++,c[3]<.99&&(f=!0))}})),a.geometry.setBarCount(p);var g=n.getLayout("orient"),m=this._barIndexOfData=new Int32Array(n.count());p=0;n.each((function(t){if(n.hasValue(t)){var e=n.getItemLayout(t),i=e[0],r=e[1],a=e[2],s=4*t;c[0]=h[s++],c[1]=h[s++],c[2]=h[s++],c[3]=h[s++],c[3]>0&&(o._barMesh.geometry.addBar(i,r,g,a,c,t),m[t]=p++)}else m[t]=-1})),a.geometry.dirty(),a.geometry.updateBoundingBox();var v=a.material;v.transparent=f,v.depthMask=!f,a.geometry.sortTriangles=f,this._initHandler(t,e)},_initHandler:function(t,e){var n=t.getData(),i=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=i.geometry.getDataIndexOfVertex(t.triangle[0]);a!==o&&(this._downplay(o),this._highlight(a),this._labelsBuilder.updateLabels([a]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",a),n.get("y",a),n.get("z",a,!0)]})),o=a,i.dataIndex=a}),this),i.on("mouseout",(function(t){this._downplay(o),this._labelsBuilder.updateLabels(),o=-1,i.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=e.getItemModel(t).getModel("emphasis.itemStyle"),r=i.get("color"),o=i.get("opacity");if(null==r)r=hr(AJ(e,t),-.4);null==o&&(o=TJ(e,t));var a=NZ.parseColor(r);a[3]*=o,this._barMesh.geometry.setColor(n,a),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=AJ(e,t),r=TJ(e,t),o=NZ.parseColor(i);o[3]*=r,this._barMesh.geometry.setColor(n,o),this._api.getZr().refresh()}}},highlight:function(t,e,n,i){this._toggleStatus("highlight",t,e,n,i)},downplay:function(t,e,n,i){this._toggleStatus("downplay",t,e,n,i)},_toggleStatus:function(t,e,n,i,r){var o=e.getData(),a=gZ(o,r),s=this;null!=a?re(VK.normalizeToArray(a),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):o.each((function(e){"highlight"===t?s._highlight(e):s._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});Z_((function(t){t.registerChartView(n$),t.registerSeriesModel(HK),FK(t),t.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))}));var i$=Em.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return UK(this)},formatTooltip:function(t){return GK(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}}),r$=rQ.vec3;NZ.Shader.import(SQ);var o$=Um.extend({type:"line3D",__ecgl__:!0,init:function(t,e){this.groupGL=new NZ.Node,this._api=e},render:function(t,e,n){var i=this._prevLine3DMesh;this._prevLine3DMesh=this._line3DMesh,this._line3DMesh=i,this._line3DMesh||(this._line3DMesh=new NZ.Mesh({geometry:new sQ({useNativeLine:!1,sortTriangles:!0}),material:new NZ.Material({shader:NZ.createShader("ecgl.meshLines3D")}),renderOrder:10}),this._line3DMesh.geometry.pick=this._pick.bind(this)),this.groupGL.remove(this._prevLine3DMesh),this.groupGL.add(this._line3DMesh);var r=t.coordinateSystem;if(r&&r.viewGL){r.viewGL.add(this.groupGL);var o=r.viewGL.isLinearSpace()?"define":"undefine";this._line3DMesh.material[o]("fragment","SRGB_DECODE")}this._doRender(t,n),this._data=t.getData(),this._camera=r.viewGL.camera,this.updateCamera(),this._updateAnimation(t)},updateCamera:function(){this._updateNDCPosition()},_doRender:function(t,e){var n=t.getData(),i=this._line3DMesh;i.geometry.resetOffset();var r=n.getLayout("points"),o=[],a=new Float32Array(r.length/3*4),s=0,l=!1;n.each((function(t){var e=AJ(n,t),i=TJ(n,t);null==i&&(i=1),NZ.parseColor(e,o),o[3]*=i,a[s++]=o[0],a[s++]=o[1],a[s++]=o[2],a[s++]=o[3],o[3]<.99&&(l=!0)})),i.geometry.setVertexCount(i.geometry.getPolylineVertexCount(r)),i.geometry.setTriangleCount(i.geometry.getPolylineTriangleCount(r)),i.geometry.addPolyline(r,a,fZ(t.get("lineStyle.width"),1)),i.geometry.dirty(),i.geometry.updateBoundingBox();var u=i.material;u.transparent=l,u.depthMask=!l;var c=t.getModel("debug.wireframe");c.get("show")?(i.geometry.createAttribute("barycentric","float",3),i.geometry.generateBarycentric(),i.material.set("both","WIREFRAME_TRIANGLE"),i.material.set("wireframeLineColor",NZ.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)")),i.material.set("wireframeLineWidth",fZ(c.get("lineStyle.width"),1))):i.material.set("both","WIREFRAME_TRIANGLE"),this._points=r,this._initHandler(t,e)},_updateAnimation:function(t){NZ.updateVertexAnimation([["prevPosition","position"],["prevPositionPrev","positionPrev"],["prevPositionNext","positionNext"]],this._prevLine3DMesh,this._line3DMesh,t)},_initHandler:function(t,e){var n=t.getData(),i=t.coordinateSystem,r=this._line3DMesh,o=-1;r.seriesIndex=t.seriesIndex,r.off("mousemove"),r.off("mouseout"),r.on("mousemove",(function(t){var a=i.pointToData(t.point.array),s=n.indicesOfNearest("x",a[0])[0];s!==o&&(e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",s),n.get("y",s),n.get("z",s)]}),r.dataIndex=s),o=s}),this),r.on("mouseout",(function(t){o=-1,r.dataIndex=-1,e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_updateNDCPosition:function(){var t=new nj,e=this._camera;nj.multiply(t,e.projectionMatrix,e.viewMatrix);var n=this._positionNDC,i=this._points,r=i.length/3;n&&n.length/2===r||(n=this._positionNDC=new Float32Array(2*r));for(var o=[],a=0;a=0){var m=3*l,v=new LX(this._points[m],this._points[m+1],this._points[m+2]);o.push({dataIndex:l,point:v,pointWorld:v.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(v)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});Z_((function(t){t.registerChartView(o$),t.registerSeriesModel(i$),t.registerLayout((function(t,e){t.eachSeriesByType("line3D",(function(t){var e=t.getData(),n=t.coordinateSystem;if(n){if("cartesian3D"!==n.type)return;var i=new Float32Array(3*e.count()),r=[],o=[],a=n.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]}));n&&e.each(a,(function(t,e,a,s){r[0]=t,r[1]=e,r[2]=a,n.dataToPoint(r,o),i[3*s]=o[0],i[3*s+1]=o[1],i[3*s+2]=o[2]})),e.setLayout("points",i)}}))}))}));var a$=Em.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return UK(this)},getFormattedLabel:function(t,e,n,i){var r=VK.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},formatTooltip:function(t){return GK(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function s$(t,e,n){(e=e||document.createElement("canvas")).width=t,e.height=t;var i=e.getContext("2d");return n&&n(i),e}var l$={getMarginByStyle:function(t){var e=t.minMargin||0,n=0;t.stroke&&"none"!==t.stroke&&(n=null==t.lineWidth?1:t.lineWidth);var i=t.shadowBlur||0,r=t.shadowOffsetX||0,o=t.shadowOffsetY||0,a={};return a.left=Math.max(n/2,-r+i,e),a.right=Math.max(n/2,r+i,e),a.top=Math.max(n/2,-o+i,e),a.bottom=Math.max(n/2,o+i,e),a},createSymbolSprite:function(t,e,n,i){var r=function(t,e,n,i){he(e)||(e=[e,e]);var r=l$.getMarginByStyle(n,i),o=e[0]+r.left+r.right,a=e[1]+r.top+r.bottom,s=ty(t,0,0,e[0],e[1]),l=Math.max(o,a);s.x=r.left,s.y=r.top,o>a?s.y+=(l-a)/2:s.x+=(l-o)/2;var u=s.getBoundingRect();return s.x-=u.x,s.y-=u.y,s.setStyle(n),s.update(),s.__size=l,s}(t,e,n),o=l$.getMarginByStyle(n);return{image:s$(r.__size,i,(function(t){My(t,r)})),margin:o}},createSDFFromCanvas:function(t,e,n,i){return s$(e,i,(function(e){var i=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,n){var i=e.width,r=e.height,o=t.canvas.width,a=t.canvas.height,s=i/o,l=r/a;function u(t){return t<128?1:-1}function c(t,o){var a=1/0;t=Math.floor(t*s);for(var c=(o=Math.floor(o*l))*i+t,h=u(e.data[4*c]),d=Math.max(o-n,0);d=2e4},doSortVertices:function(t,e){var n=this.indices,i=u$.create();if(!n){n=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var r=0;r.05);else for(r=0;r<3;r++)this._progressiveQuickSort(3*e+r);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,n=this.indices;function i(t,n){return e[n]-e[t]}t?Array.prototype.sort.call(n,i):yJ.sort(n,i,0,n.length-1)},_progressiveQuickSort:function(t){var e=this._zList,n=this.indices;this._quickSort=this._quickSort||new yJ,this._quickSort.step(n,(function(t,n){return e[n]-e[t]}),t)}},h$=rQ.vec4;NZ.Shader.import("@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end");var d$=NZ.Mesh.extend((function(){var t=new NZ.Geometry({dynamic:!0,attributes:{color:new NZ.Geometry.Attribute("color","float",4,"COLOR"),position:new NZ.Geometry.Attribute("position","float",3,"POSITION"),size:new NZ.Geometry.Attribute("size","float",1),prevPosition:new NZ.Geometry.Attribute("prevPosition","float",3),prevSize:new NZ.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,c$);var e=new NZ.Material({shader:NZ.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var n=new NZ.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",n),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:NZ.Mesh.POINTS,sizeScale:1}}),{_pick:function(t,e,n,i,r,o){var a=this._positionNDC;if(a)for(var s=n.viewport,l=2/s.width,u=2/s.height,c=this.geometry.vertexCount-1;c>=0;c--){var h,d=a[2*(h=this.geometry.indices?this.geometry.indices[c]:c)],p=a[2*h+1],f=this.geometry.attributes.size.get(h)/this.sizeScale/2;if(t>d-f*l&&tp-f*u&&e2?(f=this._updateSymbolSprite(t,d,c,h),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(r-i);var g=[];if(p){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var m=function(t){var e=t.getVisual("style");if(e)return e[t.getVisual("drawType")]}(a),v=function(t){return t.getVisual("style").opacity}(a);NZ.parseColor(m,g),g[3]*=v,s.set({color:g,u_Size:c.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(r-i),u.color.init(r-i),this._originalOpacity=new Float32Array(r-i);for(var y=a.getLayout("points"),_=u.position.value,x=0;x1?(a[0]=n.maxSize,a[1]=n.maxSize/n.aspect):(a[1]=n.maxSize,a[0]=n.maxSize*n.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===n.type&&(r=this._symbolSize,o=a,r&&o&&r[0]===o[0]&&r[1]===o[1])&&this._lineWidth===e.lineWidth||(l$.createSymbolSprite(n.type,a,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),l$.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=n.type,this._symbolSize=a,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/n.maxSize*i},_updateMaterial:function(t,e){var n="lighter"===t.get("blendMode")?NZ.additiveBlend:null,i=this._mesh.material;i.blend=n,i.set("lineWidth",e.lineWidth/20);var r=NZ.parseColor(e.stroke);i.set("strokeColor",r),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,n){var i=t.getData(),r=this._mesh.geometry,o=r.attributes.position.value,a=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(i,e,n),this._labelsBuilder.getLabelPosition=function(t,n,i){var r=3*(t-e);return[o[r],o[r+1],o[r+2]]},this._labelsBuilder.getLabelDistance=function(t,n,i){return r.attributes.size.get(t-e)/a/2+i},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){NZ.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,n){var i,r=t.getData(),o=this._mesh,a=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(i=t.coordinateSystem.model),o.seriesIndex=t.seriesIndex,o.off("mousemove"),o.off("mouseout"),o.on("mousemove",(function(e){var u=e.vertexIndex+a._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&n.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:i.componentIndex})),o.dataIndex=u,s=u}),this),o.on("mouseout",(function(t){var e=t.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,o.dataIndex=-1,l&&n.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:i.componentIndex})}),this)},updateLayout:function(t,e,n){var i=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,o=i.getLayout("points");if(this.is2D)for(var a=0;athis._endDataIndex||ethis._endDataIndex||e 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end");var k$=NZ.Mesh.extend((function(){var t=new NZ.Material({shader:new NZ.Shader(NZ.Shader.source("ecgl.trail2.vertex"),NZ.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new sQ({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,n){var i=t.hostModel,r=this.geometry,o=i.getModel("effect"),a=o.get("trailWidth")*e.getDevicePixelRatio(),s=o.get("trailLength"),l=i.get("effect.constantSpeed"),u=1e3*i.get("effect.period"),c=null!=l;c?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[c?"define":"undefine"]("vertex","CONSTANT_SPEED");var h=i.get("polyline");r.trailLength=s,this.material.set("trailLength",s),r.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){r.attributes[t].value=n.attributes[t].value}));["dist","distAll","start","offset","color"].forEach((function(t){r.attributes[t].init(r.vertexCount)})),r.indices=n.indices;var d=[],p=o.get("trailColor"),f=o.get("trailOpacity"),g=null!=p,m=null!=f;this.updateWorldTransform();var v=this.worldTransform.x.len(),y=this.worldTransform.y.len(),_=this.worldTransform.z.len(),x=0,b=0;t.each((function(e){var i=t.getItemLayout(e),o=m?f:TJ(t,e),s=AJ(t,e);null==o&&(o=1),(d=NZ.parseColor(g?p:s,d))[3]*=o;for(var l=h?n.getPolylineVertexCount(i):n.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),w=0,S=[],A=[],T=x;Tx&&(w+=N$.dist(S,A)),r.attributes.dist.set(T,w),N$.copy(A,S);b=Math.max(b,w);var M=Math.random()*(c?w:u);for(T=x;T0?1:-1)*a/2),r.attributes.color.set(T,d);x+=l})),this.material.set("spotSize",.1*b*s),this.material.set("spotIntensity",o.get("spotIntensity")),r.dirty()},setAnimationTime:function(t){this.material.set("time",t)}});NZ.Shader.import(SQ);var O$=Um.extend({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new NZ.Node,this._meshLinesMaterial=new NZ.Material({shader:NZ.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new NZ.Mesh({geometry:new sQ,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new k$},render:function(t,e,n){this.groupGL.add(this._linesMesh);var i=t.coordinateSystem,r=t.getData();if(i&&i.viewGL){i.viewGL.add(this.groupGL),this._updateLines(t,e,n);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var a=this._trailMesh;if(a.stopAnimation(),t.get("effect.show")){this.groupGL.add(a),a.updateData(r,n,this._linesMesh.geometry),a.__time=a.__time||0;var s=36e5;this._curveEffectsAnimator=a.animate("",{loop:!0}).when(s,{__time:s}).during((function(){a.setAnimationTime(a.__time)})).start()}else this.groupGL.remove(a),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?NZ.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,n){var i=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,a=t.get("polyline");o.expandLine=!0;var s=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=s/20;var l="lineStyle.width".split("."),u=n.getDevicePixelRatio();i.each((function(t){var e=i.getItemModel(t).get(l);null==e&&(e=1),i.setItemVisual(t,"lineWidth",e)})),o.useNativeLine=!1;var c=0,h=0;i.each((function(t){var e=i.getItemLayout(t);a?(c+=o.getPolylineVertexCount(e),h+=o.getPolylineTriangleCount(e)):(c+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),h+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(c),o.setTriangleCount(h),o.resetOffset();var d=[];i.each((function(t){var e=i.getItemLayout(t),n=AJ(i,t),r=TJ(i,t),s=i.getItemVisual(t,"lineWidth")*u;null==r&&(r=1),(d=NZ.parseColor(n,d))[3]*=r,a?o.addPolyline(e,d,s):o.addCubicCurve(e[0],e[1],e[2],e[3],d,s)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function B$(t,e){for(var n=[],i=0;i0;this._updateSurfaceMesh(this._surfaceMesh,t,c,p);var f=this._surfaceMesh.material;p?(f.define("WIREFRAME_QUAD"),f.set("wireframeLineWidth",d),f.set("wireframeLineColor",NZ.parseColor(h.get("lineStyle.color")))):f.undefine("WIREFRAME_QUAD"),this._initHandler(t,n),this._updateAnimation(t)},_updateAnimation:function(t){NZ.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new NZ.Mesh({geometry:new NZ.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new NZ.Material({shader:new NZ.Shader(NZ.Shader.source("ecgl.sm.depth.vertex"),NZ.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,SJ),t},_initHandler:function(t,e){var n=t.getData(),i=this._surfaceMesh,r=t.coordinateSystem;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=function(t,e){for(var n=1/0,r=-1,o=[],a=0;a=0){var s=[];i.geometry.attributes.position.get(a,s);for(var l=r.pointToData(s),u=1/0,c=-1,h=[],d=0;d65535?Uint32Array:Uint16Array)((f-1)*(g-1)*6),w=function(t,e,n){n[1]=t*g+e,n[0]=t*g+e+1,n[3]=(t+1)*g+e+1,n[2]=(t+1)*g+e},S=!1;if(l){var A=[],T=[],M=0;m?c.init(r.vertexCount):c.value=null;for(var I=[[],[],[]],C=[],D=[],E=G$.create(),L=function(t,e,n){var i=3*e;return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n},P=new Float32Array(a.length),R=new Float32Array(a.length/3*4),N=0;N0;){if(Math.floor(s/c)===s/c)return[c,s/c];c--}return[c=Math.floor(Math.sqrt(s)),c]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function H$(t,e){for(var n=[],i=0;i "+p)),c++)}var f=Sx(t,{coordDimensions:["value"]});(s=new bx(f,n)).initData(t);var g=new bx(["value"],n);return g.initData(u,l),r&&r(s,g),rD({mainData:s,struct:o,structAttr:"graph",datas:{node:s,edge:g},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}(i,n,this,!0,(function(t,n){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var i=e.getModel([]).getModel;function o(t,e){var n=i.call(this,t,e);return n.resolveParentPath=a,n}function a(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=a,t.getModel=o,t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),l=yn(l.join(" > ")),r.value&&(l+=" : "+yn(r.value)),l}return Q$.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:Object.assign({value:0},t)})),e=new bx(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(q$.dist(t,e)+q$.dist(n,e)+q$.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(J$)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(J$)},getPolylineVertexCount:function(t){var e;"number"==typeof t?e=t:e="number"!=typeof t[0]?t.length:t.length/2;return this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;"number"==typeof t?e=t:e="number"!=typeof t[0]?t.length:t.length/2;return this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=e[0],u=e[1],c=n[0],h=n[1],d=i[0],p=i[1],f=this._getCubicCurveApproxStep(t,e,n,i),g=f*f,m=g*f,v=3*f,y=3*g,_=6*g,x=6*m,b=a-2*l+c,w=s-2*u+h,S=3*(l-c)-a+d,A=3*(u-h)-s+p,T=a,M=s,I=(l-a)*v+b*y+S*m,C=(u-s)*v+w*y+A*m,D=b*_+S*x,E=w*_+A*x,L=S*x,P=A*x,R=0,N=0,k=Math.ceil(1/f),O=new Float32Array(3*(k+1)),B=(O=[],0);for(N=0;N1&&(T=I>0?Math.min(T,d):Math.max(T,d),M=C>0?Math.min(M,p):Math.max(M,p));this.addPolyline(O,r,o)},addLine:function(t,e,n,i){this.addPolyline([t,e],n,i)},addPolyline:function(){var t=q$.create(),e=q$.create(),n=q$.create(),i=q$.create(),r=[],o=[],a=[];return function(s,l,u,c,h){if(s.length){var d="number"!=typeof s[0];if(null==h&&(h=d?s.length:s.length/2),!(h<2)){null==c&&(c=0),null==u&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,f=d?"number"!=typeof l[0]:l.length/4===h,g=this.attributes.position,m=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,_=this.indices,x=this._vertexOffset,b=0;b1&&(g.copy(x,x-1),m.copy(x,x-1),x++);else{var A;if(b0){q$.sub(t,r,a),q$.sub(e,o,r),q$.normalize(t,t),q$.normalize(e,e),q$.add(i,t,e),q$.normalize(i,i);var T=u/2*Math.min(1/q$.dot(t,i),2);n[0]=-i[1],n[1]=i[0],A=T}else q$.sub(t,o,r),q$.normalize(t,t),n[0]=-t[1],n[1]=t[0],A=u/2}else q$.sub(t,r,a),q$.normalize(t,t),n[0]=-t[1],n[1]=t[0],A=u/2;y.set(x,n),y.set(x+1,n),v.set(x,A),v.set(x+1,-A),q$.copy(a,r),g.set(x,r),g.set(x+1,r),m.set(x,p),m.set(x+1,p),x+=2}if(this.useNativeLine)m.set(x,p),g.set(x,r),x++;else if(b>0){var M=3*this._faceOffset;(_=this.indices)[M]=x-4,_[M+1]=x-3,_[M+2]=x-2,_[M+3]=x-3,_[M+4]=x-1,_[M+5]=x-2,this._faceOffset+=2}}this._vertexOffset=x}}}}(),setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=t 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end");var $$={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function t1(t){var e={type:NZ.Texture.FLOAT,minFilter:NZ.Texture.NEAREST,magFilter:NZ.Texture.NEAREST};this._positionSourceTex=new NZ.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new NZ.Texture2D(e),this._positionPrevTex=new NZ.Texture2D(e),this._forceTex=new NZ.Texture2D(e),this._forcePrevTex=new NZ.Texture2D(e),this._weightedSumTex=new NZ.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new NZ.Texture2D(e),this._globalSpeedPrevTex=new NZ.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new oZ({fragment:NZ.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new oZ({fragment:NZ.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new oZ({fragment:NZ.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new oZ({fragment:NZ.Shader.source("clay.compositor.output")});var n=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new NZ.Mesh({geometry:new NZ.Geometry({attributes:{node1:new NZ.Geometry.Attribute("node1","float",2),node2:new NZ.Geometry.Attribute("node2","float",2),weight:new NZ.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new NZ.Material({transparent:!0,shader:NZ.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:n,depthMask:!1,depthText:!1}),mode:NZ.Mesh.POINTS}),this._weightedSumMesh=new NZ.Mesh({geometry:new NZ.Geometry({attributes:{node:new NZ.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new NZ.Material({transparent:!0,shader:NZ.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:n,depthMask:!1,depthText:!1}),mode:NZ.Mesh.POINTS}),this._framebuffer=new RY({depthBuffer:!1}),this._dummyCamera=new NZ.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}t1.prototype.updateOption=function(t){for(var e in $$)this[e]=$$[e];var n=this._nodes.length;if(this.jitterTolerence=n>5e4?10:n>5e3?1:.1,this.scaling=n>100?2:10,t)for(var e in $$)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,r=0;rt},t1.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t;t=this._forcePrevTex;this._forcePrevTex=this._forceTex,this._forceTex=t;t=this._globalSpeedPrevTex;this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},t1.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},t1.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(n){this[n].width=t,this[n].height=e,this[n].dirty()}),this)},t1.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};var e1=function(){var t=function(){return new Float32Array(2)},e=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},n=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},r=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a=function(t,e){return t[0]=e[0],t[1]=e[1],t},s=function(t,e,n){return t[0]=e,t[1]=n,t};function l(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var u=l.prototype;function c(){this.position=new Float32Array(2),this.force=t(),this.forcePrev=t(),this.mass=1,this.inDegree=0,this.outDegree=0}function h(t,e){this.source=t,this.target=e,this.weight=1}function d(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new l,this.rootRegion.centerOfMass=t(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}u.beforeUpdate=function(){for(var t=0;t=t&&this.bbox[1]<=e&&this.bbox[3]>=e},u.setBBox=function(t,e,n,i){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=n,this.bbox[3]=i,this.size=(n-t+i-e)/2},u._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new l,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},u._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),n=this.bbox;if(!e){var i=(n[0]+n[2])/2,r=(n[1]+n[3])/2,o=(n[2]-n[0])/2,a=(n[3]-n[1])/2,s=t.position[0]>=i?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*o+n[0],l*a+n[1],(s+1)*o+n[0],(l+1)*a+n[1])}e.addNode(t)},u._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,n=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,n+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=n/this.mass};var p=d.prototype;p.initNodes=function(t,e,n){var i=e.length;this.nodes.length=0;for(var r=void 0!==n,o=0;o0&&(this.strongGravityMode?this.applyNodeStrongGravity(c):this.applyNodeGravity(c))}for(l=0;l0&&(m=Math.min(m/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=m;for(l=0;l0&&(y=Math.min(_*y,10)/_,i(u.position,u.position,u.force,y))}},p.applyRegionToNodeRepulsion=function(){var e=t();return function(t,n){if(t.node)this.applyNodeToNodeRepulsion(t.node,n,!0);else{o(e,n.position,t.centerOfMass);var r=e[0]*e[0]+e[1]*e[1];if(r>this.barnesHutTheta*t.size*t.size){var a=this.scaling*n.mass*t.mass/r;i(n.force,n.force,e,a)}else for(var s=0;s0)s=this.scaling*t.mass*n.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*n.mass}}else s=this.scaling*t.mass*n.mass/a;i(t.force,t.force,e,s),i(n.force,n.force,e,-s)}}}}(),p.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,a=t.target;o(e,r.position,a.position);var s,l,u=n(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-a.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,i(r.force,r.force,e,l),i(a.force,a.force,e,-l))}}(),p.applyNodeGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position);var r=n(e);i(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),p.applyNodeStrongGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position),i(t.force,t.force,e,this.gravity*t.mass)}}(),p.updateBBox=function(){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,r=0;r5e4?10:o>5e3?1:.1,e.scaling=o>100?2:10,e.barnesHutOptimize=o>1e3,t)for(var n in n1)null!=t[n]&&(e[n]=t[n]);if(!e.gravityCenter){for(var a=[1/0,1/0],s=[-1/0,-1/0],l=0;lt},i1.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var n=0;n0?1.1:.9,o=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=o/this._zoom;var a=this._convertPos(n,i),s=(a.x-this._dx)*(r-1),l=(a.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=o,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}}),o1=rQ.vec2;NZ.Shader.import("@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end");var a1=1,s1=Um.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new NZ.Node,this.viewGL=new Dq("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new p$(!0,e),this._forceEdgesMesh=new NZ.Mesh({material:new NZ.Material({shader:NZ.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new NZ.Geometry({attributes:{node:new NZ.Geometry.Attribute("node","float",2),color:new NZ.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:NZ.Mesh.LINES}),this._edgesMesh=new NZ.Mesh({material:new NZ.Material({shader:NZ.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new K$({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new r1({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,n){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=n,this._initLayout(t,e,n),this._pointsBuilder.update(t,e,n),this._forceLayoutInstance instanceof t1||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,n),this._control.off("update"),this._control.on("update",(function(){n.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(fZ(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),n.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?n.getZr().on("click",this._clickHandler):"mouseover"===r&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var n=this._forceEdgesMesh.geometry,i=e.getEdgeData(),r=0,o=this._forceLayoutInstance,a=2*i.count();n.attributes.node.init(a),n.attributes.color.init(a),i.each((function(e){var a=t[e];n.attributes.node.set(r,o.getNodeUV(a.node1)),n.attributes.node.set(r+1,o.getNodeUV(a.node2));var s=AJ(i,a.dataIndex),l=NZ.parseColor(s);l[3]*=fZ(TJ(i,a.dataIndex),1),n.attributes.color.set(r,l),n.attributes.color.set(r+1,l),r+=2})),n.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,n=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var i=[],r=[],o=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(a){var s=t.graph.getEdgeByIndex(a),l=2*s.node1.dataIndex,u=2*s.node2.dataIndex;i[0]=n[l],i[1]=n[l+1],r[0]=n[u],r[1]=n[u+1];var c=AJ(t,s.dataIndex),h=NZ.parseColor(c);h[3]*=fZ(TJ(t,s.dataIndex),1);var d=t.getItemModel(s.dataIndex),p=fZ(d.get(o),1)*this._api.getDevicePixelRatio();e.addLine(i,r,h,p);for(var f=0;f<4;f++)this._originalEdgeColors[4*s.dataIndex+f]=h[f];this._edgeIndicesMap[s.dataIndex]=a}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),n=[],i=0;i=p&&(l._syncNodePosition(t),d=0),n.getZr().refresh(),yi((function(){f(e)}))}))};yi((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),f(u)})),this._layouting=!0}}},stopLayout:function(t,e,n,i){i&&null!=i.from&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,n)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,n){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,n),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData();this._downplayAll();var o=i.dataIndex,a=r.graph,s=[],l=a.getNodeByIndex(o);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,n,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),n=NZ.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=fZ(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);n[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],n)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:function(){var t=[];return function(e,n){this._getColor(e,t),t[3]*=n,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],t)}}(),_getColor:function(t,e){for(var n=0;n<4;n++)e[n]=this._originalEdgeColors[4*t+n];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var n=this.viewGL.camera,i=t.getData().getLayout("points"),r=o1.create(1/0,1/0),o=o1.create(-1/0,-1/0),a=[],s=0;sn.left&&un.top)){var c=Math.max(o[0]-r[0],10),h=c/e.getWidth()*e.getHeight();c*=1.4,h*=1.4,r[0]-=.2*c,n.left=r[0],n.top=l-h/2,n.bottom=l+h/2,n.right=c+r[0],n.near=0,n.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});function l1(t){return t instanceof Array||(t=[t,t]),t}Z_((function(t){function e(){}t.registerChartView(s1),t.registerSeriesModel(Q$),t.registerVisual((function(t){var e={};t.eachSeriesByType("graphGL",(function(t){var n=t.getCategoriesData(),i=t.getData(),r={};n.each((function(i){var o=n.getName(i);r["ec-"+o]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(o,e)),n.setItemVisual(i,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u65535?new Uint32Array(3*i):new Uint16Array(3*i))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});pX.import("@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n");var h1=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Ej({type:Tj.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};h1.prototype={constructor:h1,init:function(){var t={type:Tj.FLOAT,minFilter:Tj.NEAREST,magFilter:Tj.NEAREST,useMipmap:!1};this._spawnTexture=new Ej(t),this._particleTexture0=new Ej(t),this._particleTexture1=new Ej(t),this._frameBuffer=new RY({depthBuffer:!1}),this._particlePass=new oZ({fragment:pX.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new oZ({fragment:pX.source("clay.compositor.downsample")});var e=new Mj({renderOrder:10,material:new OW({shader:new pX(pX.source("ecgl.vfParticle.renderPoints.vertex"),pX.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:Mj.POINTS,geometry:new Gj({dynamic:!0,mainAttribute:"texcoord0"})}),n=new Mj({renderOrder:10,material:new OW({shader:new pX(pX.source("ecgl.vfParticle.renderLines.vertex"),pX.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new c1,culling:!1}),i=new Mj({material:new OW({shader:new pX(pX.source("ecgl.color.vertex"),pX.source("ecgl.color.fragment"))}),geometry:new OY});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=n,this._lastFrameFullQuadMesh=i,this._camera=new eZ,this._thisFrameTexture=new Ej,this._lastFrameTexture=new Ej},setParticleDensity:function(t,e){for(var n=new Float32Array(4*(t*e)),i=0,r=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new Ej),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");return n.fillStyle="#fff",n.arc(t/2,t/2,t/2,0,2*Math.PI),n.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var n=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,o=this._width*this._supersampling,a=this._height*this._supersampling,s=0;s=359&&(r[0]>0&&(r[0]=0),o[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=NZ.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=NZ.Mesh.LINES),n=n||0,i=i||r.count(),s.resetOffset();var c=0,h=0,d=[],p=[],f=[],g=[],m=[],v=.3,y=.7;function _(){p[0]=d[0]*y+g[0]*v-(d[1]-g[1])*o,p[1]=d[1]*y+g[1]*v-(g[0]-d[0])*o,f[0]=d[0]*v+g[0]*y-(d[1]-g[1])*o,f[1]=d[1]*v+g[1]*y-(g[0]-d[0])*o}if(a||0!==o)for(var x=n;x=s.limitScrollNum})),D=w((function(){return{width:f.value?"".concat(f.value,"px"):"auto",transform:"translate(".concat(v.value,"px,").concat(y.value,"px)"),transition:"all ".concat("string"==typeof s.ease?s.ease:"cubic-bezier("+s.ease.x1+","+s.ease.y1+","+s.ease.x2+","+s.ease.y2+")"," ").concat(s.delay,"ms"),overflow:"hidden",display:s.singleLine?"flex":"block"}})),E=w((function(){return"left"==s.direction||"right"==s.direction})),L=w((function(){return E.value?{float:"left",overflow:"hidden",display:s.singleLine?"flex":"block",flexShrink:s.singleLine?0:1}:{overflow:"hidden"}})),P=w((function(){return s.isRemUnit?parseInt(globalThis.window.getComputedStyle(globalThis.document.documentElement,null).fontSize):1})),R=w((function(){return s.singleWidth*P.value})),N=w((function(){return s.singleHeight*P.value})),k=w((function(){var t,e=s.step;return(t=E.value?R.value:N.value)>0&&t%e>0&&console.error("如果设置了单步滚动,step 需是单步大小的约数,否则无法保证单步滚动结束的位置是否准确。~~~~~"),e})),O=function(){cancelAnimationFrame(d.value),d.value=null},B=function(t,e,n){d.value=requestAnimationFrame((function(){var i=m.value/2,r=f.value/2;if("up"===t?(Math.abs(y.value)>=i&&(y.value=0,x.value+=1,o("count",x.value)),y.value-=e):"down"===t?(y.value>=0&&(y.value=-1*i,x.value+=1,o("count",x.value)),y.value+=e):"left"===t?(Math.abs(v.value)>=r&&(v.value=0,x.value+=1,o("count",x.value)),v.value-=e):"right"===t&&(v.value>=0&&(v.value=-1*r,x.value+=1,o("count",x.value)),v.value+=e),!n){var a=s.singleWaitTime;p.value&&clearTimeout(p.value),N.value?Math.abs(y.value)%N.value100&&console.warn("数据达到了".concat(t.length,"条有点多哦~,可能会造成部分老旧浏览器卡顿。")),E.value){var e=u.value.offsetWidth;e=2*e+1,f.value=e}b.value?(m.value=h.value.offsetHeight,s.modelValue&&z()):(O(),y.value=v.value=0)},V=function(){_.value=!1,z()},G=function(){_.value=!0,p.value&&clearTimeout(p.value),O()},U=w((function(){return s.hover&&s.modelValue&&b.value})),H=function(t,e,n,i){var r,o=!1,a=0;function s(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,u=new Array(l),c=0;ct?p():!0!==e&&(r=setTimeout(i?function(){r=void 0}:p,void 0===i?t-d:t)))}return"boolean"!=typeof e&&(i=n,n=e,e=void 0),l.cancel=function(){s(),o=!0},l}(30,(function(t){O();var e=N.value?N.value:15;t.deltaY<0&&B("down",e,!0),t.deltaY>0&&B("up",e,!0)})),W=function(){O(),_.value=!1,F()};n={Reset:function(){W()}},(i=C())&&Object.assign(i.proxy,n),S((function(){return s.list}),(function(){s.isWatch&&A((function(){W()}))}),{deep:!0}),S((function(){return s.modelValue}),(function(t){t?V():G()})),S((function(){return s.count}),(function(t){0!==t&&V()})),T((function(){O(),clearTimeout(p.value)})),g((function(){b.value&&F()}));var X=r.default,j=r.html,Y=new Array(s.copyNum).fill(null),Z=function(){return M(I,null,[M("div",{ref:u,style:L.value},[X&&X()]),b.value?Y.map((function(){return M("div",{style:L.value},j&&"function"==typeof j?[j()]:[X&&X()])})):null])};return function(){return M("div",{ref:l,class:a.class},[s.wheel&&s.hover?M("div",{ref:h,style:D.value,onMouseenter:function(){U.value&&G()},onMouseleave:function(){U.value&&V()},onWheel:function(t){U.value&&function(t){H(t)}(t)}},[Z()]):M("div",{ref:h,style:D.value,onMouseenter:function(){U.value&&G()},onMouseleave:function(){U.value&&V()}},[Z()])])}}}),b1={class:"boxnav"},w1=function(t){return R("data-v-f4a29e9a"),t=t(),N(),t}((function(){return x("div",{class:"listhead"},[x("span",null,"序号"),x("span",null,"医院名"),x("span",null,"床位数"),x("span",null,"就诊人数")],-1)})),S1={class:"listnav scrollDiv"},A1={class:"item"},T1=b(u({__name:"hospital",setup:function(t){var e=c(!0),n=c([{index:1,name:"湖口县中医医院",bad:854,visit:242},{index:2,name:"建民医院",bad:854,visit:242},{index:3,name:"湖口县人民医院",bad:854,visit:242},{index:4,name:"潘思宏诊所",bad:854,visit:242},{index:5,name:"湖口县中医医院新园区",bad:854,visit:242},{index:6,name:"湖口县人民医院新园区",bad:854,visit:242},{index:7,name:"潘郭华诊所",bad:854,visit:242},{index:8,name:"殷智诊所",bad:854,visit:242},{index:9,name:"庐山市人民医院",bad:854,visit:242}]);return d({hospitalList:[{index:1,name:"湖口县中医医院",bad:854,visit:242},{index:2,name:"建民医院",bad:854,visit:242},{index:3,name:"湖口县人民医院",bad:854,visit:242},{index:4,name:"潘思宏诊所",bad:854,visit:242},{index:5,name:"湖口县中医医院新园区",bad:854,visit:242},{index:6,name:"湖口县人民医院新园区",bad:854,visit:242},{index:7,name:"潘郭华诊所",bad:854,visit:242},{index:8,name:"殷智诊所",bad:854,visit:242},{index:9,name:"庐山市人民医院",bad:854,visit:242}]}),g((function(){})),function(t,i){return v(),_("div",b1,[w1,x("div",S1,[M(E(x1),{class:"scroll",modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=function(t){return e.value=t}),list:n.value,step:.3,hover:!0,"limit-scroll-num":3,wheel:!0},{default:D((function(){return[x("ul",null,[(v(!0),_(I,null,L(n.value,(function(t){return v(),_("li",A1,[x("span",null,P(t.index),1),x("span",null,P(t.name),1),x("span",null,P(t.bad),1),x("span",null,P(t.visit),1)])})),256))])]})),_:1},8,["modelValue","list"])])])}}}),[["__scopeId","data-v-f4a29e9a"]]),M1="undefined"!=typeof window;function I1(t,e){var n,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).immediate,r=void 0===i||i,o=c(!1),a=null;function s(){a&&(clearTimeout(a),a=null)}function l(){o.value=!1,s()}function u(){for(var n=arguments.length,i=new Array(n),r=0;r-1},_2.prototype.set=function(t,e){var n=this.__data__,i=v2(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var x2=c2(E1,"Map");function b2(t,e){var n=t.__data__;return function(t){var e=y(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function w2(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0&&void 0!==arguments[0]?arguments[0]:"").split(" ").filter((function(t){return!!t.trim()}))},F2=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)};function V2(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px";return t?k2(t)||z(e=t)&&!Number.isNaN(Number(e))?"".concat(t).concat(n):z(t)?t:void 0:""}var G2=function(t){var e;if(!M1)return 0;if(void 0!==B2)return B2;var n=document.createElement("div");n.className="".concat(t,"-scrollbar__wrap"),n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);var i=n.offsetWidth;n.style.overflow="scroll";var r=document.createElement("div");r.style.width="100%",n.appendChild(r);var o=r.offsetWidth;return null==(e=n.parentNode)||e.removeChild(n),B2=i-o},U2=u({name:"Check",__name:"check",setup:function(t){return function(t,e){return v(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[x("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})])}}}),H2=u({name:"CircleCheck",__name:"circle-check",setup:function(t){return function(t,e){return v(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[x("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),x("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})])}}}),W2=u({name:"CircleClose",__name:"circle-close",setup:function(t){return function(t,e){return v(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[x("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),x("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})])}}}),X2=u({name:"Close",__name:"close",setup:function(t){return function(t,e){return v(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[x("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})])}}}),j2=u({name:"WarningFilled",__name:"warning-filled",setup:function(t){return function(t,e){return v(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[x("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})])}}}),Y2="__epPropKey",Z2=function(t,e){if(!V(t)||V(n=t)&&n[Y2])return t;var n,i=t.values,r=t.required,o=t.default,a=t.type,u=t.validator,c=i||u?function(n){var r=!1,a=[];if(i&&(a=Array.from(i),G(t,"default")&&a.push(o),r||(r=a.includes(n))),u&&(r||(r=u(n))),!r&&a.length>0){var s=l(new Set(a)).map((function(t){return JSON.stringify(t)})).join(", ");U("Invalid prop: validation failed".concat(e?' for prop "'.concat(e,'"'):"",". Expected one of [").concat(s,"], got value ").concat(JSON.stringify(n),"."))}return r}:void 0,h=s({type:a,required:!!r,validator:c},Y2,!0);return G(t,"default")&&(h.default=o),h},Q2=function(t){return function(t){for(var e=-1,n=null==t?0:t.length,i={};++e0&&void 0!==arguments[0]?arguments[0]:"";return c6(n.value,t,e,"","")},e:function(e){return e?c6(n.value,t,"",e,""):""},m:function(e){return e?c6(n.value,t,"","",e):""},be:function(e,i){return e&&i?c6(n.value,t,e,i,""):""},em:function(e,i){return e&&i?c6(n.value,t,"",e,i):""},bm:function(e,i){return e&&i?c6(n.value,t,e,"",i):""},bem:function(e,i,r){return e&&i&&r?c6(n.value,t,e,i,r):""},is:function(t){return t&&(!((arguments.length<=1?0:arguments.length-1)>=1)||(arguments.length<=1?void 0:arguments[1]))?"".concat("is-").concat(t):""},cssVar:function(t){var e={};for(var i in t)t[i]&&(e["--".concat(n.value,"-").concat(i)]=t[i]);return e},cssVarName:function(t){return"--".concat(n.value,"-").concat(t)},cssVarBlock:function(e){var i={};for(var r in e)e[r]&&(i["--".concat(n.value,"-").concat(t,"-").concat(r)]=e[r]);return i},cssVarBlockName:function(e){return"--".concat(n.value,"-").concat(t,"-").concat(e)}}},f6=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Y(t)||function(t,e){throw new O2("[".concat(t,"] ").concat(e))}("[useLockscreen]","You need to pass a ref param to this function");var n=e.ns||p6("popup"),i=w((function(){return n.bm("parent","hidden")}));if(M1&&!F2(document.body,i.value)){var r=0,o=!1,a="0",s=function(){setTimeout((function(){var t,e,n;t=null==document?void 0:document.body,e=i.value,t&&e.trim()&&(n=t.classList).remove.apply(n,l(z2(e))),o&&document&&(document.body.style.width=a)}),200)};S(t,(function(t){if(t){(o=!F2(document.body,i.value))&&(a=document.body.style.width),r=G2(n.namespace.value);var e,u,c,h=document.documentElement.clientHeight0&&(h||"scroll"===d)&&o&&(document.body.style.width="calc(100% - ".concat(r,"px)")),e=document.body,u=i.value,e&&u.trim()&&(c=e.classList).add.apply(c,l(z2(u)))}else s()})),B((function(){return s()}))}},g6=function(t){if(!t)return{onClick:Z,onMousedown:Z,onMouseup:Z};var e=!1,n=!1;return{onClick:function(i){e&&n&&t(i),e=n=!1},onMousedown:function(t){e=t.target===t.currentTarget},onMouseup:function(t){n=t.target===t.currentTarget}}},m6={prefix:Math.floor(1e4*Math.random()),current:0},v6=Symbol("elIdInjection"),y6=function(t){var e=C()?j(v6,m6):m6,n=d6();return w((function(){return E(t)||"".concat(n.value,"-id-").concat(e.prefix,"-").concat(e.current++)}))},_6=[],x6=function(t){var e=t;e.key===t6&&_6.forEach((function(t){return t(e)}))},b6={current:0},w6=c(0),S6=Symbol("elZIndexContextKey"),A6=Symbol("zIndexContextKey"),T6=function(t){var e=C()?j(S6,b6):b6,n=C()?j(A6,void 0):void 0,i=w((function(){var t=E(n);return k2(t)?t:2e3})),r=w((function(){return i.value+w6.value}));return!M1&&j(S6),{initialZIndex:i,currentZIndex:r,nextZIndex:function(){return e.current++,w6.value=e.current,r.value}}},M6=Symbol(),I6=c();/*! Element Plus Icons Vue v2.3.1 */var C6=function(t,e){var n,i=t.__vccOpts||t,r=o(e);try{for(r.s();!(n=r.n()).done;){var s=a(n.value,2),l=s[0],u=s[1];i[l]=u}}catch(c){r.e(c)}finally{r.f()}return i},D6=Q2({size:{type:[Number,String]},color:{type:String}}),E6=u({name:"ElIcon",inheritAttrs:!1}),L6=u(r(r({},E6),{},{props:D6,setup:function(t){var e=t,n=p6("icon"),i=w((function(){var t,n=e.size,i=e.color;return n||i?{fontSize:(t=n,void 0===t?void 0:V2(n)),"--color":i}:{}}));return function(t,e){return v(),_("i",q({class:E(n).b(),style:E(i)},t.$attrs),[Q(t.$slots,"default")],16)}}})),P6=K2(C6(L6,[["__file","icon.vue"]])),R6="focus-trap.focus-after-trapped",N6="focus-trap.focus-after-released",k6={cancelable:!0,bubbles:!1},O6={cancelable:!0,bubbles:!1},B6="focusAfterTrapped",z6="focusAfterReleased",F6=Symbol("elFocusTrap"),V6=c(),G6=c(0),U6=c(0),H6=0,W6=function(t){for(var e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:function(t){var e="INPUT"===t.tagName&&"hidden"===t.type;return t.disabled||t.hidden||e?NodeFilter.FILTER_SKIP:t.tabIndex>=0||t===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});n.nextNode();)e.push(n.currentNode);return e},X6=function(t,e){var n,i=o(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!j6(r,e))return r}}catch(a){i.e(a)}finally{i.f()}},j6=function(t,e){if("hidden"===getComputedStyle(t).visibility)return!0;for(;t;){if(e&&t===e)return!1;if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1},Y6=function(t,e){if(t&&t.focus){var n=document.activeElement;t.focus({preventScroll:!0}),U6.value=window.performance.now(),t!==n&&function(t){return t instanceof HTMLInputElement&&"select"in t}(t)&&e&&t.select()}};function Z6(t,e){var n=l(t),i=t.indexOf(e);return-1!==i&&n.splice(i,1),n}var Q6,q6=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.activeElement,r=o(t);try{for(r.s();!(e=r.n()).done;){var a=e.value;if(Y6(a,n),document.activeElement!==i)return}}catch(s){r.e(s)}finally{r.f()}},J6=(Q6=[],{push:function(t){var e=Q6[0];e&&t!==e&&e.pause(),(Q6=Z6(Q6,t)).unshift(t)},remove:function(t){var e,n;null==(n=null==(e=(Q6=Z6(Q6,t))[0])?void 0:e.resume)||n.call(e)}}),K6=function(){V6.value="pointer",G6.value=window.performance.now()},$6=function(){V6.value="keyboard",G6.value=window.performance.now()},t3=function(){return g((function(){0===H6&&(document.addEventListener("mousedown",K6),document.addEventListener("touchstart",K6),document.addEventListener("keydown",$6)),H6++})),X((function(){--H6<=0&&(document.removeEventListener("mousedown",K6),document.removeEventListener("touchstart",K6),document.removeEventListener("keydown",$6))})),{focusReason:V6,lastUserFocusTimestamp:G6,lastAutomatedFocusTimestamp:U6}},e3=function(t){return new CustomEvent("focus-trap.focusout-prevented",r(r({},O6),{},{detail:t}))},n3=u({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[B6,z6,"focusin","focusout","focusout-prevented","release-requested"],setup:function(e,i){var o,s,l,u=i.emit,h=c(),d=t3().focusReason;l=function(t){e.trapped&&!p.paused&&u("release-requested",t)},g((function(){0===_6.length&&document.addEventListener("keydown",x6),M1&&_6.push(l)})),X((function(){0===(_6=_6.filter((function(t){return t!==l}))).length&&M1&&document.removeEventListener("keydown",x6)}));var p={paused:!1,pause:function(){this.paused=!0},resume:function(){this.paused=!1}},f=function(t){if((e.loop||e.trapped)&&!p.paused){var n=t.key,i=t.altKey,r=t.ctrlKey,o=t.metaKey,s=t.currentTarget,l=t.shiftKey,c=e.loop,h=n===$2&&!i&&!r&&!o,f=document.activeElement;if(h&&f){var g=s,m=function(t){var e=W6(t);return[X6(e,t),X6(e.reverse(),t)]}(g),v=a(m,2),y=v[0],_=v[1];if(y&&_)if(l||f!==_){if(l&&[y,g].includes(f)){var x=e3({focusReason:d.value});u("focusout-prevented",x),x.defaultPrevented||(t.preventDefault(),c&&Y6(_,!0))}}else{var b=e3({focusReason:d.value});u("focusout-prevented",b),b.defaultPrevented||(t.preventDefault(),c&&Y6(y,!0))}else if(f===g){var w=e3({focusReason:d.value});u("focusout-prevented",w),w.defaultPrevented||t.preventDefault()}}}};J(F6,{focusTrapRef:h,onKeydown:f}),S((function(){return e.focusTrapEl}),(function(t){t&&(h.value=t)}),{immediate:!0}),S([h],(function(t,e){var n=a(t,1)[0],i=a(e,1)[0];n&&(n.addEventListener("keydown",f),n.addEventListener("focusin",y),n.addEventListener("focusout",_)),i&&(i.removeEventListener("keydown",f),i.removeEventListener("focusin",y),i.removeEventListener("focusout",_))}));var m=function(t){u(B6,t)},v=function(t){return u(z6,t)},y=function(t){var n=E(h);if(n){var i=t.target,r=t.relatedTarget,a=i&&n.contains(i);if(!e.trapped)r&&n.contains(r)||(o=r);a&&u("focusin",t),p.paused||e.trapped&&(a?s=i:Y6(s,!0))}},_=function(t){var n=E(h);if(!p.paused&&n)if(e.trapped){var i=t.relatedTarget;null==i||n.contains(i)||setTimeout((function(){if(!p.paused&&e.trapped){var t=e3({focusReason:d.value});u("focusout-prevented",t),t.defaultPrevented||Y6(s,!0)}}),0)}else{var r=t.target;r&&n.contains(r)||u("focusout",t)}};function x(){return b.apply(this,arguments)}function b(){return(b=n(t().mark((function n(){var i,r,a;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A();case 2:(i=E(h))&&(J6.push(p),r=i.contains(document.activeElement)?o:document.activeElement,o=r,i.contains(r)||(a=new Event(R6,k6),i.addEventListener(R6,m),i.dispatchEvent(a),a.defaultPrevented||A((function(){var t=e.focusStartEl;z(t)||(Y6(t),document.activeElement!==t&&(t="first")),"first"===t&&q6(W6(i),!0),document.activeElement!==r&&"container"!==t||Y6(i)}))));case 4:case"end":return t.stop()}}),n)})))).apply(this,arguments)}function w(){var t=E(h);if(t){t.removeEventListener(R6,m);var e=new CustomEvent(N6,r(r({},k6),{},{detail:{focusReason:d.value}}));t.addEventListener(N6,v),t.dispatchEvent(e),e.defaultPrevented||"keyboard"!=d.value&&G6.value>U6.value&&!t.contains(document.activeElement)||Y6(null!=o?o:document.body),t.removeEventListener(N6,v),J6.remove(p)}}return g((function(){e.trapped&&x(),S((function(){return e.trapped}),(function(t){t?x():w()}))})),X((function(){e.trapped&&w(),h.value&&(h.value.removeEventListener("keydown",f),h.value.removeEventListener("focusin",y),h.value.removeEventListener("focusout",_),h.value=void 0)})),{onKeydown:f}}});var i3=C6(n3,[["render",function(t,e,n,i,r,o){return Q(t.$slots,"default",{handleKeydown:t.onKeydown})}],["__file","focus-trap.vue"]]),r3=Q2({to:{type:[String,Object],required:!0},disabled:Boolean}),o3=u({__name:"teleport",props:r3,setup:function(t){return function(t,e){return t.disabled?Q(t.$slots,"default",{key:0}):(v(),K($,{key:1,to:t.to},[Q(t.$slots,"default")],8,["to"]))}}}),a3=K2(C6(o3,[["__file","teleport.vue"]])),s3=Symbol("rowContextKey"),l3=Q2({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),u3=u({name:"ElRow"}),c3=u(r(r({},u3),{},{props:l3,setup:function(t){var e=t,n=p6("row"),i=w((function(){return e.gutter}));J(s3,{gutter:i});var r=w((function(){var t={};return e.gutter?(t.marginRight=t.marginLeft="-".concat(e.gutter/2,"px"),t):t})),o=w((function(){return[n.b(),n.is("justify-".concat(e.justify),"start"!==e.justify),n.is("align-".concat(e.align),!!e.align)]}));return function(t,e){return v(),K(nt(t.tag),{class:tt(E(o)),style:et(E(r))},{default:D((function(){return[Q(t.$slots,"default")]})),_:3},8,["class","style"])}}})),h3=K2(C6(c3,[["__file","row.vue"]])),d3=Q2({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:[Number,Object],default:function(){return{}}},sm:{type:[Number,Object],default:function(){return{}}},md:{type:[Number,Object],default:function(){return{}}},lg:{type:[Number,Object],default:function(){return{}}},xl:{type:[Number,Object],default:function(){return{}}}}),p3=u({name:"ElCol"}),f3=u(r(r({},p3),{},{props:d3,setup:function(t){var e=t,n=j(s3,{gutter:w((function(){return 0}))}).gutter,i=p6("col"),r=w((function(){var t={};return n.value&&(t.paddingLeft=t.paddingRight="".concat(n.value/2,"px")),t})),o=w((function(){var t=[];["span","offset","pull","push"].forEach((function(n){var r=e[n];k2(r)&&("span"===n?t.push(i.b("".concat(e[n]))):r>0&&t.push(i.b("".concat(n,"-").concat(e[n]))))}));return["xs","sm","md","lg","xl"].forEach((function(n){k2(e[n])?t.push(i.b("".concat(n,"-").concat(e[n]))):V(e[n])&&Object.entries(e[n]).forEach((function(e){var r=a(e,2),o=r[0],s=r[1];t.push("span"!==o?i.b("".concat(n,"-").concat(o,"-").concat(s)):i.b("".concat(n,"-").concat(s)))}))})),n.value&&t.push(i.is("guttered")),[i.b(),t]}));return function(t,e){return v(),K(nt(t.tag),{class:tt(E(o)),style:et(E(r))},{default:D((function(){return[Q(t.$slots,"default")]})),_:3},8,["class","style"])}}})),g3=K2(C6(f3,[["__file","col.vue"]])),m3=Q2({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:[String,Array,Object]},zIndex:{type:[String,Number]}}),v3=u({name:"ElOverlay",props:m3,emits:{click:function(t){return t instanceof MouseEvent}},setup:function(t,e){var n=e.slots,i=e.emit,r=p6("overlay"),o=g6(t.customMaskEvent?void 0:function(t){i("click",t)}),a=o.onClick,s=o.onMousedown,l=o.onMouseup;return function(){return t.mask?M("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:a,onMousedown:s,onMouseup:l},[Q(n,"default")],n6.STYLE|n6.CLASS|n6.PROPS,["onClick","onMouseup","onMousedown"]):it("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Q(n,"default")])}}}),y3=v3,_3=Symbol("dialogInjectionKey"),x3=Q2({center:Boolean,alignCenter:Boolean,closeIcon:{type:q2},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),b3=u({name:"ElDialogContent"}),w3=u(r(r({},b3),{},{props:x3,emits:{close:function(){return!0}},setup:function(t,e){var n=e.expose,i=t,r=l6().t,o=J2.Close,a=j(_3),l=a.dialogRef,u=a.headerRef,c=a.bodyId,h=a.ns,d=a.style,p=j(F6).focusTrapRef,f=w((function(){return[h.b(),h.is("fullscreen",i.fullscreen),h.is("draggable",i.draggable),h.is("align-center",i.alignCenter),s({},h.m("center"),i.center)]})),g=function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0,n=C()?j(M6,I6):I6;return w((function(){var i,r;return null!=(r=null==(i=n.value)?void 0:i[t])?r:e}))}("namespace",u6),v=w((function(){var e={},n="--".concat(m.value,"-dialog");return t.fullscreen||(t.top&&(e["".concat(n,"-margin-top")]=t.top),t.width&&(e["".concat(n,"-width")]=V2(t.width))),e})),y=w((function(){return t.alignCenter?{display:"flex"}:{}}));function _(){if(null==f||f(),null==p||p(),t.openDelay&&t.openDelay>0){var e=I1((function(){return T()}),t.openDelay);p=e.stop}else T()}function x(){if(null==p||p(),null==f||f(),t.closeDelay&&t.closeDelay>0){var e=I1((function(){return M()}),t.closeDelay);f=e.stop}else M()}function b(){t.beforeClose?t.beforeClose((function(t){t||(u.value=!0,l.value=!1)})):x()}function T(){M1&&(l.value=!0)}function M(){l.value=!1}return t.lockScroll&&f6(l),S((function(){return t.modelValue}),(function(n){n?(u.value=!1,_(),h.value=!0,d.value=void 0===t.zIndex?r():d.value++,A((function(){i("open"),e.value&&(e.value.scrollTop=0)}))):l.value&&x()})),S((function(){return t.fullscreen}),(function(t){e.value&&(t?(o=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=o)})),g((function(){t.modelValue&&(l.value=!0,h.value=!0,_())})),{afterEnter:function(){i("opened")},afterLeave:function(){i("closed"),i(e6,!1),t.destroyOnClose&&(h.value=!1)},beforeLeave:function(){i("close")},handleClose:b,onModalClick:function(){t.closeOnClickModal&&b()},close:x,doClose:M,onOpenAutoFocus:function(){i("openAutoFocus")},onCloseAutoFocus:function(){i("closeAutoFocus")},onCloseRequested:function(){t.closeOnPressEscape&&b()},onFocusoutPrevented:function(t){var e;"pointer"===(null==(e=t.detail)?void 0:e.focusReason)&&t.preventDefault()},titleId:a,bodyId:s,closed:u,style:v,overlayDialogStyle:y,rendered:h,visible:l,zIndex:d}},I3=u({name:"ElDialog",inheritAttrs:!1}),C3=u(r(r({},I3),{},{props:A3,emits:T3,setup:function(t,e){var n,i,r=e.expose,o=t,a=ot();n={scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},i=w((function(){return!!a.title})),n.from,n.replacement,n.scope,n.version,n.ref,n.type,S((function(){return E(i)}),(function(t){}),{immediate:!0});var s=p6("dialog"),l=c(),u=c(),h=c(),d=M3(o,l),p=d.visible,f=d.titleId,g=d.bodyId,m=d.style,y=d.overlayDialogStyle,_=d.rendered,b=d.zIndex,A=d.afterEnter,T=d.afterLeave,I=d.beforeLeave,C=d.handleClose,L=d.onModalClick,P=d.onOpenAutoFocus,R=d.onCloseAutoFocus,N=d.onCloseRequested,k=d.onFocusoutPrevented;J(_3,{dialogRef:l,headerRef:u,bodyId:g,ns:s,rendered:_,style:m});var O=g6(L),B=w((function(){return o.draggable&&!o.fullscreen}));return r({visible:p,dialogContentRef:h,resetPostion:function(){h.value.resetPostion()}}),function(t,e){return v(),K(E(a3),{to:t.appendTo,disabled:"body"===t.appendTo&&!t.appendToBody},{default:D((function(){return[M(at,{name:"dialog-fade",onAfterEnter:E(A),onAfterLeave:E(T),onBeforeLeave:E(I),persisted:""},{default:D((function(){return[st(M(E(y3),{"custom-mask-event":"",mask:t.modal,"overlay-class":t.modalClass,"z-index":E(b)},{default:D((function(){return[x("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(f),"aria-describedby":E(g),class:tt("".concat(E(s).namespace.value,"-overlay-dialog")),style:et(E(y)),onClick:E(O).onClick,onMousedown:E(O).onMousedown,onMouseup:E(O).onMouseup},[M(E(i3),{loop:"",trapped:E(p),"focus-start-el":"container",onFocusAfterTrapped:E(P),onFocusAfterReleased:E(R),onFocusoutPrevented:E(k),onReleaseRequested:E(N)},{default:D((function(){return[E(_)?(v(),K(S3,q({key:0,ref_key:"dialogContentRef",ref:h},t.$attrs,{center:t.center,"align-center":t.alignCenter,"close-icon":t.closeIcon,draggable:E(B),overflow:t.overflow,fullscreen:t.fullscreen,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:E(C)}),lt({header:D((function(){return[t.$slots.title?Q(t.$slots,"title",{key:1}):Q(t.$slots,"header",{key:0,close:E(C),titleId:E(f),titleClass:E(s).e("title")})]})),default:D((function(){return[Q(t.$slots,"default")]})),_:2},[t.$slots.footer?{name:"footer",fn:D((function(){return[Q(t.$slots,"footer")]}))}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):rt("v-if",!0)]})),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]})),_:3},8,["mask","overlay-class","z-index"]),[[ut,E(p)]])]})),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]})),_:3},8,["to","disabled"])}}})),D3=K2(C6(C3,[["__file","dialog.vue"]])),E3=Q2({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:function(t){return t>=0&&t<=100}},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:[String,Array,Function],default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Function,default:function(t){return"".concat(t,"%")}}}),L3=u({name:"ElProgress"}),P3=u(r(r({},L3),{},{props:E3,setup:function(t){var e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},i=p6("progress"),r=w((function(){var t={width:"".concat(e.percentage,"%"),animationDuration:"".concat(e.duration,"s")},n=S(e.percentage);return n.includes("gradient")?t.background=n:t.backgroundColor=n,t})),a=w((function(){return(e.strokeWidth/e.width*100).toFixed(1)})),l=w((function(){return["circle","dashboard"].includes(e.type)?Number.parseInt("".concat(50-Number.parseFloat(a.value)/2),10):0})),u=w((function(){var t=l.value,n="dashboard"===e.type;return"\n M 50 50\n m 0 ".concat(n?"":"-").concat(t,"\n a ").concat(t," ").concat(t," 0 1 1 0 ").concat(n?"-":"").concat(2*t,"\n a ").concat(t," ").concat(t," 0 1 1 0 ").concat(n?"":"-").concat(2*t,"\n ")})),c=w((function(){return 2*Math.PI*l.value})),h=w((function(){return"dashboard"===e.type?.75:1})),d=w((function(){var t=-1*c.value*(1-h.value)/2;return"".concat(t,"px")})),p=w((function(){return{strokeDasharray:"".concat(c.value*h.value,"px, ").concat(c.value,"px"),strokeDashoffset:d.value}})),f=w((function(){return{strokeDasharray:"".concat(c.value*h.value*(e.percentage/100),"px, ").concat(c.value,"px"),strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"}})),g=w((function(){return e.color?S(e.percentage):n[e.status]||n.default})),m=w((function(){return"warning"===e.status?j2:"line"===e.type?"success"===e.status?H2:W2:"success"===e.status?U2:X2})),y=w((function(){return"line"===e.type?12+.4*e.strokeWidth:.111111*e.width+2})),b=w((function(){return e.format(e.percentage)}));var S=function(t){var n,i=e.color;if(H(i))return i(t);if(z(i))return i;var r,a=function(t){var e=100/t.length;return t.map((function(t,n){return z(t)?{color:t,percentage:(n+1)*e}:t})).sort((function(t,e){return t.percentage-e.percentage}))}(i),s=o(a);try{for(s.s();!(r=s.n()).done;){var l=r.value;if(l.percentage>t)return l.color}}catch(u){s.e(u)}finally{s.f()}return null==(n=a[a.length-1])?void 0:n.color};return function(t,e){return v(),_("div",{class:tt([E(i).b(),E(i).m(t.type),E(i).is(t.status),s(s({},E(i).m("without-text"),!t.showText),E(i).m("text-inside"),t.textInside)]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},["line"===t.type?(v(),_("div",{key:0,class:tt(E(i).b("bar"))},[x("div",{class:tt(E(i).be("bar","outer")),style:et({height:"".concat(t.strokeWidth,"px")})},[x("div",{class:tt([E(i).be("bar","inner"),s({},E(i).bem("bar","inner","indeterminate"),t.indeterminate),s({},E(i).bem("bar","inner","striped"),t.striped),s({},E(i).bem("bar","inner","striped-flow"),t.stripedFlow)]),style:et(E(r))},[(t.showText||t.$slots.default)&&t.textInside?(v(),_("div",{key:0,class:tt(E(i).be("bar","innerText"))},[Q(t.$slots,"default",{percentage:t.percentage},(function(){return[x("span",null,P(E(b)),1)]}))],2)):rt("v-if",!0)],6)],6)],2)):(v(),_("div",{key:1,class:tt(E(i).b("circle")),style:et({height:"".concat(t.width,"px"),width:"".concat(t.width,"px")})},[(v(),_("svg",{viewBox:"0 0 100 100"},[x("path",{class:tt(E(i).be("circle","track")),d:E(u),stroke:"var(".concat(E(i).cssVarName("fill-color-light"),", #e5e9f2)"),"stroke-linecap":t.strokeLinecap,"stroke-width":E(a),fill:"none",style:et(E(p))},null,14,["d","stroke","stroke-linecap","stroke-width"]),x("path",{class:tt(E(i).be("circle","path")),d:E(u),stroke:E(g),fill:"none",opacity:t.percentage?1:0,"stroke-linecap":t.strokeLinecap,"stroke-width":E(a),style:et(E(f))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),!t.showText&&!t.$slots.default||t.textInside?rt("v-if",!0):(v(),_("div",{key:2,class:tt(E(i).e("text")),style:et({fontSize:"".concat(E(y),"px")})},[Q(t.$slots,"default",{percentage:t.percentage},(function(){return[t.status?(v(),K(E(P6),{key:1},{default:D((function(){return[(v(),K(nt(E(m))))]})),_:1})):(v(),_("span",{key:0},P(E(b)),1))]}))],6))],10,["aria-valuenow"])}}})),R3=K2(C6(P3,[["__file","progress.vue"]])),N3=function(t){return R("data-v-6c25d3d0"),t=t(),N(),t},k3={class:"tit"},O3=N3((function(){return x("div",{class:"boxnav people-content"},[x("div",null,[x("div",null,"18-44岁平均身高"),x("div",{class:"man-box"},[x("div",{class:"man-box-item"},[x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACUlJREFUeF7t3VFi4jgQhGF8spmcbCcnm8zJvJiFbCYBLJuSIuMvr5HbUpV+tVoGPBz8UYACNxUYaEMBCtxWACBmBwXuKAAQ04MCADEHKLBOARlknW6u2okCANmJ0Ya5TgGArNPNVTtRACA7Mdow1ykAkHW6uWonCgBkJ0Yb5joFALJON1ftRAGA7MRow1ynAEDW6eaqnSgAkI6MHsfx59SdYRjeOurWrrsCkG+0fxzHX+fb/3OjGxMor4D5PpMA8g3an8G4BcWtHk2gXID6hl7v85YAaej7SjA+9/BFRmlnGkAaaR2C49Jb2aSRbwBpIHQYDpA08OxyC4BUFvt8MvW70m1styoJC5DKwl7Cj+M4wXE6vq3wZ6tVQdSPIWWQigJXzh62WhW9k0EaiFs5e1xG8DYMw0uD4ezyFjJIJdsbZY9T74fjA5JKw9h9WMJWmgKVTq5u9VYtUslHgFQSttH2Sh1SyT81SGVhGwOiDqnkpwxSSdjxuMeqFPpaWIBUEhsglYSVQSoJ2zgsQCoJDpBKwjYOC5BKgjvFqiRs47AAqSR4Y0B8JquSjwCpJOwUtlWh7kFhPRMBUk/bCZDpG4BLvzm4tEceEi5VbEF7gCwQa03T2llE9ljjSvk1ACnXalXLyllE7bHKlfKLAFKu1eqWlSCxtVrtSPmFACnX6qGW4eci4HjIjfKLAVKu1cMtQ5kEHA87UR4AIOVaRVqevycynWyt+RouOCIulAcBSLlW0ZYLQHmdbuxH46LyFwcDSLFU9RpefpP3U1aZPqHrN3rryV4UGSBFMmm0VwUAslfnjbtIAYAUyaTRXhUASMj5cx2x5mQq1IP3MKe6Rf2SkRUgD+h4fq7xY+WR7QN3Lr7U+0WKpbreECArBAw98Ftx54cu8QxlhXwAWSDaRsH4OEIZZYHfp63qwva7bf4EcHz0TjYpnMkAKRAq/EHDgjs2aQKSApkBMiPSk8JxGTVIZvwHyB2BnmxbdWukILkzBwByQ5yWv85ekOlrN/HNxBsKA+Q2IDXfDFV7wi+NL4sApHzO7Cx7qEdsscrhmFo+eWGuFlkwHWyxPom10+xxUsFPCH0lByAA8QDRFqs8p+50e6UOUaSXQVL7lxDLevF9rWyz/tbeFuvrFqvlm6G+j4RbK6Y35v6lDEA+yLHnAv2DDB4afhADIAD5nEsAApDr+wsZ5KQLQAACkDvFD0AAAhCAlJ2PqEEeq0FOX2E9h5h+0aT226TKXD0cPvZr6e8AyyAySCyDTD8P+jJF6+y7I++fzl3x4BMgAAGILVZZMrbFenCLJYOUTbSttgIIQDwHuUMvQAACEICUJfgVDwoV6WXSbraVDCKDyCAySNkCJoOcdHLM65jXMa9j3rJF0xbLFssWyxarbLWwxbLF+jxTZBAZRAaRQWSQMgVkEBnkzkyxxQIIQAAyl0wc8zrmdczrmHdunfjv/4p0RboiXZFetlqoQdQgahA1yNxqoQZRg6hB1CBz64Qa5ItCtli2WLZYtlhzS6ctli2WLZYt1tw6YYtli3V9jsggMogMIoPIIGUKeFDoQaEHhWWsOMVyiuUUyynW3GqhBlGDqEHUIHPrhFMsp1hOsWYp8WleRboiXZE+u1CcGijSFemKdEX63GqhSFekK9IV6XPrhCJdka5In6VEka5IV6Qr0mcXCkX6/xKpQdQgahA1SNmiaYv1/FusXwtfTy2DyCC3V4/x+D7nsrXl1GoLb5haBMgwDBZNgMQAeV9tO35P+hJA3oFfsEg8dVOrxSd7F0707gGZhrcgK74eE8gElL+zAgC5MhXGcfx93D79nJklf+3VF4JVewL+NdEL+yZ7XHEFINcBmeD45w4kX1bawklYG4xL/Gv9m8Y0gX/tT+a4IQxA7kzZ84cXp4n14/hyyz9T01tbkAAgb8fwr+fuXABdC9TNCX8e0wT/9Hd3TGtv/kzXASTkZgKQYRhezjXDksJaRgh5eC0MQELiAiQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkyjuPPw+Hw+4Fwr8Mw/JquD8D2MgzD2wN9celZAYAEp8J4nNkPhHuf1AB5QMXwpQAJCpoC5JxFVsM2HFNRcFi7DkXIoP0PrPxvwzC8fOzKA7B9iRUc4u5CASRs+cqJ/aVmeKCmUX8EPQVIUMyVBfZ7cf65Kysy0s1Y4WHuJhxAKli9YPWfndALIJmNVWGoTx8SIBUtPk/uH4fDYToCvvxNx69/Lke6pbcfx/FyhPxwrNJ7anc4AKTRLJiySurZRDJWo+Fv9jYA2ax1Ot5CAYC0UNk9NqsAQDZrnY63UAAgLVR2j80qAJDNWqfjLRQASAuV3WOzCgBks9bpeAsFANJCZffYrAIA2ax1Ot5CAYC0UNk9NqsAQDZrnY63UAAgLVR2j80qAJDNWqfjLRQASAuV3WOzCvwLY3N4I396xMQAAAAASUVORK5CYII=",alt:""}),x("div",null,"169.7厘米")]),x("div",{class:"man-box-item"},[x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACxtJREFUeF7tnWGamzgQRM3JkjlZkpNlcjJ2GIMXY7DUrRIC+uXXfmvRoCo9uiUB0934hwIosKlAhzYogALbCgAIowMF3igAIAwPFAAQxgAK+BQgg/h046ggCgBIEKPppk8BAPHpxlFBFACQIEbTTZ8CAOLTjaOCKAAgQYymmz4FAMSnG0cFUQBAghhNN30KAIhPtypH9X3/cwjcdd1nlRMQ1KwAgJgl0x3Q9/3vMdqvjagDKH+ARqe5NRKAWBUTtB/B2IJi6wyfXdd9CE5PCIMCAGIQq7TpWEL9LYzzp+u6KfMUhuLwlAIAklJI9Lsza2ydHUhEvqTCAEhKIcHvosyxvBIgEXiTCgEgKYUKf68Ex3RVQFLoT+pwAEkpVPh73/fDnON7+bbGv+5rQlIjLjHvCiBuxZFQOXuQRSp6N4UGkIoi184eDxPJItVcBJBK0u6UPcgilfwjg1QWFkAqC7xTeDJIJaH3Kq8osyoZOIYFkEr6AkglYXcOCyCVBAeQSsLuHBZAKgkOIJWE3TksgFQSHEAqCbtzWACpJLj44cTUVfIofEoh5+8A4hQudRiApBQ6x+8AUtGn/ouSiuHnoT94TbeO0gBSR9fvqDtlEcqrih4CSEVxR0hqZxGyR0UPAaSiuDtkEbJHZf8ApLLAIyRV3gnhXZD65gFIfY2n+YgaEkqrHbwDkB1Enk4h2jz8/lYWq1b7GAcg++j8OEvhyhbvoO/sF4DsLPg4JxneUR8+HJf7rvrwdcVhQs4nSXf2C0B2Fnx5uvHFqgGUH7Pf/k3/zUfi2hoEIG315+wHVwBADm4Ql9dWAQBpqz9nP7gCALKTQdPf/lCejkm7Us31WABSQeNxKXeYdOeuUpVeBX9HpFTBjeMBRCRs4f6G6Cq+w7CRKFQTQArFnC3TWv8gTuGZk4fzIGNSonQDAElrtNniQFnjXS94ZqvAYwBxincSOKbe8YiK02cAcQh3MjiAxOHxdAiAGMU7KRxAYvQZQByC7fxBascVZh3CnCRLpnsjMohBrB2/UmK4KnNTVrcMkgFIplgnL62WvWTSnuk7gGQIdZHS6qmnvM+eYTwlVp5IF8seTNjzbGcOkquT6F3y3NPt1o4skpaaEiuh0RXLq1mXWdFK+A8gsQFhsg4g6TT6rsVVy6uxzyz5AkgxILW/rVt2gYVHMw95LyAl1ht9Lj7/YDUr4+YCIO8BUX8uNMOS3ZswD3kjOYC8B8RaXs0/7LbX67ZTD9znpszaHgQAsqGNo7x6THgdxxanjfkgdywskEU2HACQbUCs5VVTQMYPWv8euuPY+QcQALHdpB134cemm+NY28Wtt34Mck8Go8xaF5UMsqJL6QBr9Vj8osyyzp/YVV8ZCwCyDshQqli+UtK6vJp6Mc9i1j5QZgFIXiXjKJFal1cvexqOeQi76gCSBuSs5dXYs6dBbi31mIe8jg9KrIUmDkCOUl5992QxD6HMSt8T37YAkFdArMu7JXV/oX2rh89Xs6yAUGYtJAWQV0Dcqz+OuUtVQMY9EVN/KLOeLQGQmR4l5ZVnMNagY6XMsmZEVrNmxgDIMyDWwXSo+cesKyVlH4AAyPq927rqc7vdjrK8u+wQu+qi9EwGGYV0lFfLFSNTrS/ybytM0XLv/Lmuytd5+PAA8j8gVymvWO4VYgcgfkCOWl5Nw6NkufcpOwrH2+lCAcj98fDh5aYhg1j+nQYQ5wobDy/yZcU7Dw5Ajrp69QQ4L1FZ7nfrbckgd0Cs84+iVaJy27IjlCz3sqtOBnlkEOsK1NHLq5d5iKfMYledvw9SVF55Bl32vV/TkOXeQh3Dl1iO8uoU849pXPB0bxkhAPL1ZpFRwrOUV2vLvebVuuhlVmhAHKtXy91z6+TeyKKk+dOzVY7HaUI/mxUdEOsAP1V5RZlVfoMBkNvN8gXEeXllLlfK7XJHYFfdKV1YQDzl1YGf3k3ZX1pmhd1VjwxI0euojlo+NYir/s6uuk/eyICEmH+I5iFhd9VDAhKsvGK515c8vo8CkEzxCkuUzLNUbcauukPeqICEKq8osxxkjIdEBaRk9/xMy7vLkcFyr5GVcIB45h8XKK9e5iHD/3CsxIVb7gWQ9B2ltHZPn2HHFoUPLwLIjl41OZXjq+dn3T3f0rfkJapwz2VFzCDWDcKzPb2buvGU7KqTQVLqXuF3Q+29LK+sq19HlGvZp+wbRsRH38NlkHFymjsorlZe3Te/uu7J98wbRrjyKuxG4QhJKhssS5EzL+9uLvdm3jB41OSItUDta3ozYX+5Wzpeza19+SXx1/o33ACGv8u4fPw/ZOZ4bK6WqHyVY8e9kaH0+NzqU2YZchpJtuYTkxZjKbapx2k6WnihIecgVs08m4vWczRoH25FyqMxgGSodrHyaupx6NIpw/b7gkZuw8jtLgpI2Im3ZSwDSEKti5ZXq8u9loETpS2ABAaEP5STxhxA0oCk9kvSKh+3BfOQhDcAkgbE+u7IcXFYubKIj49YDAKQN2pdef4x6zZZ5M0YAJD3gFy5vGK5NyOVAAiA8PcIySAZt4pFkyDlFcu9TNLtcAxHRAKE5d7tMUKJtaHNRXfPt0YCE/UNZQBkG5BLL+8uu81y7/pAAJAVXYKVV6xmMUm3zUOClVcAAiBmQEKVV5M6lFmv44QSK/Dy7sptg5eoFqIAyCsguV88saWlc7RmNQtA3o/UoPOPSRReogKQJCAh5x/MQ1jmTRY5QZd3l7pQZs0UYQ4yE2MExPJnodeg+7HybakknMPjHotGwzeqrP+WMazHD+2HMiv8534eGdWjIMdsK+DNQs7PgT5dCMu0+pFJBhFrCiBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4AKlgQN/3vTHsZ9d1H/NjHDFuXdfhp1H4VHMETSnk+L3v+7+32+2n4dA1QH7fbrdfJTEMx9J0QwEAqTA0vhKIdXB/dF33ucggxTEqdC1cSACpZLkhi7xkj+mSDKBtxqjUvTBhAaSS1eNkfSiR3pVayYGdCdpLBqrUrXBhAaSy5WMW+LEAZSin/n3NqYcyKvlvI8Zw3J/cGMmT0GBVAQDZcWAMWWU517CeXhHDes7I7QEksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PanAfyPSgxQmo/tjAAAAAElFTkSuQmCC",alt:""}),x("div",null,"158.1厘米")])]),x("div",null,"与2015年相比分别增加"),x("div",null,[x("span",{class:"largText"},"1.2厘米"),ct(" 和 "),x("span",{class:"largText"},"0.8厘米")])]),x("div",null,[x("div",null,"6-17岁平均身高"),x("div",{style:{"margin-top":"15px"}},"与2015年相比分别增加"),x("div",{class:"man-box"},[x("div",{class:"man-box-item"},[x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACLZJREFUeF7t3Q12m0gQRWGxsolXlmRldlbGuB0UO4pkiaIw/fP5nDmZzKgLuMXt14AkTyc/CCBwk8CEDQII3CZAEGcHAp8QIIjTAwGCOAcQiBGQIDFuRg1CgCAHNnqe5x8Xm//vw99/Lf/+Mk3Ty4G7OfSmCfLF7V+kKCJ8W7npIsnPMoYwK8lteDlBNsB7dOg8z0WG8s/3R8fced2bLERJoukifX+Qt7awJEaWGJebIcrOrZUgOwHeWYzLvS5pcnk9s9ORjVWWIDv0+4vlOB8BSXboJUGSoR4kx/koyh2vp+RDGrocQRLbP8/zc+DuVOIevJUiSSJRgiTBPDg5XJMk9fGyDEESwFYmh2uShJ6eSxBkI8zlGUdZWtX448J9Y1cIshFgJdcdt47C9cjG/hJkA8DK08NSa0NvLbES4FWeHn+OcHp9iphwuEOWAC7Y9kbSQ4oE+ytBNoJrJT2Ww3SxHuy3BAmCm1/v7QaHHjLMMiuGnSABbo0tryyzAj22xNoArbHlFUE29FqCBOA1KohnIoFeEyQArbXrjz/LBbd7V3ebIKuRnU4ECUBrdAhBAo0jSABao0MIsrJxjd7BOh/lky96WNdwgqzj9fZqCRKA1ugQggQaR5AAtEaHECTQuEYFcZs30GuCBKB5DhKA1ugQggQaV+lHbO8diQS5R+jK/ydIAFqjgriDFeg1QQLQWryT5d28sUYTJMat3OotX/W513fuBvfq5jDLqyBRggTBNSaI5VWwzwQJgluWWS2kiPTY0GOCbIDXSIpIjw09JsgGeA2kiPTY2F+CbARY+R0t6bGxvwTZCLDiFCFHQm8JkgCxQkl8zU9SXwmSBLIiSciR2FOCJMKsQBJyJPeTIMlAD5SEHDv0kiA7QF0kOf9e9PLn3j8uyHciTJCdwJ7L7vwwUWrs3D+C7Ax4J1GI8UV9I8gXgf4gynnpVf7TmuXXz+U32L588S4PvTmCHNj+5SuEzntwTZY3GXxVz3FNIshx7G25AQIEaaBJdvE4AgQ5jr0tN0CAIA00yS4eR4Agx7G35QYIEKSBJtnF4wgQ5Dj2ttwAAYI00CS7eBwBghzH3pYbIECQBppkF48jQJDj2NtyAwQI0kCT7OJxBAhyHHtbboAAQRpokl08jgBBAuyXt6mv+SxHYCupQ7xtPoiTIA+CWz46W17dyq88uHZk5w9blU8k+uDVA70nyB1InYhxSxai3Ok/QT4BtPMXLjwwf33JS3y+/RPMBLkBp9HfZBs1yrfA3yBHkCtgBpPjDwG/x/Dfk4EgF0xGlWPBIEkuzgeCfAAyyDXHvWWYa5IPhAiywFiebTzfO3sG+f8kWRpNkHdBihwtPfzb01WCEOT9/JIeV10jSfnSvj2noVZqD35hfqtNBCHI73ODINcdcdtXghQ5ynWHi/Prjgz/e0eGX2IR5NOF8PDLLILM84/G36G756UeQfak20JtDwclyGcEJIgE+ez8kCAtzPJ77qMEkSAS5BMCBCEIQQgSDWFLrCi5XsZJEAkiQSRIdD6TIFFyvYyTIBJEgkiQ6HwmQaLkehknQSSIBJEg0flMgkTJ9TJOgkgQCSJBovOZBImS62WcBJEgEkSCROczCRIl18s4CSJBJIgEic5nEiRKrpdxEkSCSBAJEp3PJEiUXC/jJIgEkSASJDqfSZAouV7GSRAJIkEkSHQ+kyBRcr2MkyASRIJIkOh8JkGi5HoZJ0EkiASRINH5TIJEyfUyToJIEAkiQaLzmQSJkutlnASRIBJEgkTnMwkSJdfLOAkiQSSIBInOZxIkSq6XcRJEgkgQCRKdzyRIlFwv4ySIBJEgEiQ6n0mQKLlexkkQCSJBJEh0PpMgUXK9jJMgEkSCSJDofCZBouR6GSdBJIgEkSDR+UyCRMn1Mk6CSBAJIkGi85kEiZLrZZwEkSASRIJE5zMJEiXXyzgJIkEkiASJzmcSJEqul3ESRIJIEAkSnc+epml6iQ7uYdzUw0FsOYZ5nr+dTqfnLTU6HkuQjpv78KHNr+ush1880AunaRp+Ah0eQDnf53kuCVKSxM87gZdpmp5GB0KQ34L8eP3j++gnw8XxD7+8KjwIspwVlll/6SE9FhwEeRdEirw7Ij0I8u+CSoq8MZEeH04NCfIBhlu+p5M7V39PnAS5CJLBL9gtrS7OB4JcuXU1qCTkuHIuEOTGvd2BllvlrSTlTYlDv6Xk1i1+gtx5+NH5Q8Th361779kXQe4R+v0gsTxlLw8Se3naTowH+u5B4YOQzi9bRCl/PT91b0GYsnT6tRxDuYVrKbWi7xJkBaxrL635WsUt243N9VaT7QBLhVofMBJke38lyHaGBElgWGsJgiR0RoIkQKy0BEESGkOQBIiVliBIQmMIkgCx0hIESWgMQRIgVlqCIAmNIUgCxEpLECShMQRJgFhpCYIkNIYgCRArLUGQhMYQJAFipSUIktAYgiRArLQEQRIaQ5AEiJWWIEhCYwiSALHSEgRJaAxBEiBWWoIgCY0hSALESksQJKExBEmAWGkJgiQ0hiAJECstQZCExhAkAWKlJQiS0BiCJECstARBEhpDkASIlZYgSEJjCJIAsdISBEloDEESIFZagiAJjSFIAsRKSxAkoTEESYBYaQmCJDSGIAkQKy1BkITGECQBYqUlCJLQGIIkQKy0BEESGkOQBIiVliBIQmMIkgCx0hIESWgMQRIgVlqCIAmNIUgCxEpLECShMQRJgFhpCYIkNIYgCRArLUGQhMYQJAFipSUIktAYgiRArLQEQRIaQ5AEiJWWIEhCYwiSALHSEgRJaAxBEiBWWoIgCY0hSALESksQJKExBEmAWGkJgiQ0hiAJECstQZCExhAkAWKlJQiS0BiCJECstARBEhpDkASIlZYgSEJj5nl+TiiTXmKapqf0ooMVJMhgDXe46wgQZB0vrx6MAEEGa7jDXUeAIOt4efVgBAgyWMMd7joCBFnHy6sHI/A/MQ429mWzRzEAAAAASUVORK5CYII=",alt:""}),x("div",{class:"largText"},"1.6厘米")]),x("div",{class:"man-box-item"},[x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACS1JREFUeF7tnQt2m0gQRcXKkqwszsrirIwYCRysSILqfk1XUdfnzBlPBkpwHzdVfCQNF34gAIGnBAbYQAACzwkgCEcHBF4QQBAODwggCMcABMoI0EHKuLFWEgII0jHocRy/r15+/fvyx+/TL8MwXP/Nz/EEEORg5rMUP+eXfSTFsy36NcvydvAmp345BDkg/pUUFiFebdmvYRgQ5YDsEKQx5HEcpwN56RjqV0MUNdG7egjSCHBjMe63GlEa5YggDcAeLMeyB0jSIEsEEUMdx/H35XJRnWtYtw5JrMQ2lkcQIdDOcnxeGh6G4Ydwt1KXQhBR/J3Gqmdb/44kmmARRMDRmRyckwgyXUogSCVMp3IgSWWuCCICOH4YIirVpMzwcUexSeEkRYFXEbTz7sFJe0W2dBABPO/dY7WLP3jgsSxwOkgZt0uQ7kEXKcyXDlIJLlD3uO4p5yJlgdNBCrgF6x7LHjJmFWSNIAXQggrCzcOCrBGkAFq08epznuaSrzltBDEim9/8ND2QGPGHMcuYGoIYgSGIEVjwxRHEGGDQ8w9O1I05c5m3EFhwQXi/iDF3OogRGIIYgQVfHEGMASKIEVjwxRHEGGDwk3RGLGPeCGIEFlwQLvMa80YQIzAEMQILvjiCFATInfQCaEFXQZCC4Jx8eol1yzn/sBKbnoIuWCf9KkHHLAQpOHIRpABaREF4P0hB0HSQMmjTWsHGLLpHYdR0kEJwwboIghTmjCCF4AJ1EeSoyBhBKuBF6CKce1QEzDlIHby5i7T8gpzaDaR7VBKkg1QCdDxq8R50QbYIIoDoUBLkEOWKICKQzs5HeChRlCuCiEDOXWT6ZqmeH+gwfZ/6dN7B96qLckUQEch1mU5vqmKsapAlgjSA2uHqFlerGuWIII3AriSZfm31PemMVA3zm0ojSGPAjURBjANyQ5CDIC8vM1/pmk7kvxV8VfRVimtonIQflhwd5DDU/7/QfDK//h+TOMvPn/mX6xUppOgTFIL04c6rBiGAIEGCYjP7EECQPtx51SAEECRIUGxmHwII0oc7rxqEAIIECYrN7EMAQfpw51WDEECQIEGxmX0IIEgf7rxqEAIIEiQoNrMPAQTpw51XDUIAQYIExWb2IYAgfbjzqkEIIEiQoNjMPgQQRMR99V4PUcWqMtP70/nghiqEt5URRACx04c0bG05H+KwRWjH/0eQHZBeLeJUjmWT+TCHynwRpBKgc0HoIpX5IkglwABf6MmnLFZkjCAV8Jx3j2XP6CIVGSNIBbwggkwf+EDOhTkDrhDctFqA8WrZO8aswpwRpBBclO4x7x5jVmHOCFIILti33DJmFeaMIAXgnH0XyN49YMzaS2q1HIIUQAs2XnE1qyDjZRUEKYAX6OT8y95xNcseNoIYmQXtHlzNMuZMBykEFlwQrmYZc6eDGIFFHa9Wu8nJuiFzBDHACt49GLMMWTNiFcA6iSCMWYbs6SAGWCcYr+gihrynRRFkJ7CTdA/uiezMmxHLCCraoyUbu8eYtTN/OshOUCcarxizdmbOiLUT1MnGK8asnbkjyE5QJ+we1z3n0ZPtA4ARa4NR0Cd3t5O/LcFNww1SCLItyNvHmwd/7j3igi3HyTqC1B2yZx2vPi9j8n71lwcIHeQFnpOenN/vMWPWi2MAQRCEMQtBysass49XKyp0kSeHCB3kCZgk49Wy9wiCILYukkwQxiwEMQsy2tYIvzRd5EGEjFgPoCTrHgsBvioBQfb9LX+yJ3f37fTlwpiFIPuOlURXr7gnwp30fVIsSyUdr5bdp4vcHS6cg9wBSdw9riR4wvfrAYEgKx7Juwf3RDgHeT1uIciVD2PW6jChg3ztINnufTz8G4Mx6x8WBJlZ0D2+uMJNwxkHgiDIoy7CmIUgX4+L7Fev7i1hzLoRoYPcvozzzG+rtd0I+rc0YxaC3I4GBHnoEGMWgnwKwtWrx30mfRdJP2LRPV5OYOmf8EWQD0NKh/QE66Ufs1ILcvIPhVP5m3rMyi4IV6+2NUrdRbILwni1LUjqJ3zTCsLJ+Q4zuCeS90YhgpgESTtmZe4gjFcGR7I+epJSELqHwYzkYxaCFB0rKVdKOWZlFYTxqszxdPdE0gnCeFVmxrwWglThC7By0g+FUyWTbszK2EEYr+p0SdVFUgnCeFVnxrx2qi6STRC6R70jCFLP0F8FntyVZpJmzErTQRivpIKk6SKZBGG8EjqS5dGTFIIwXgnNSPboSRZBeGOU3pEU71fPIsjvjw9l/q4/RlJXTHEekkUQzj8auJzhPARBGhw4WUoiyEmS5nN32wSJIG24Hl4VQZog5xykCdYORXmCtwl0rmI1wdqhKII0gY4gTbB2KMqNQjn0FHJM1FJcxZp2lGexpJLwsKIUp5NiSCIJIk33SNVBlkMDSaokSdM5FkppRqz1YYEkZklSdY01nZSCrLrJ9HzW9M+3+c94XutyeV8dIJMY6/82mxV9hdSCqMJzeiMyxY08VYbP6iCIgDCCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBjOP4JiijLvE+DMO7umi2egiSLXH210QAQUy4WDgbAQTJljj7ayKAICZcLJyNAIJkS5z9NRFAEBMuFs5G4C+HcFj2qmcdhAAAAABJRU5ErkJggg==",alt:""}),x("div",{class:"largText"},"1厘米")])])])],-1)})),B3={class:"tit"},z3=N3((function(){return x("div",{class:"weight-text"},[x("span",null,"超重肥胖率继续上升"),x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADD5JREFUeF7tnWl64zYMhuWbTE4y9ckmOVmck2Ru4o5kO160EAS4gNTrH+3ThiKpD3gFgNRyGPhVVeDz+/zfNIHD8OdhIpf/Nwyn6Z/n4Wv81/Ht8F51sjsc/LDDc3ZxyhMYFyhuMEjndRqBARapXLZ2AGLTL/poAxjzsc7DB6BEmyDqAACJksvW+PPv+VMRMUKDno6/DsdQI/6uUwBAdLpFHXWNGiMc+X7n4Xh8O1xqFn7JFACQZFIud/T5fX5/KcDzjUjKlVxbAEku6b3DIpHjdf5EkqQWBZCkcj539vn3fM7Y/WrXx18H7JpIeIRMJORrN5kKculsKdylSgXaAUgiIR+7KVp3rM2fVCuJZQEkiYw+UquXUyGKJLAtgCQQ0V30uE2IKGK2LoCYJZxFjxybgdpZEkW0yl2PAxCjgAvFeZWVq9XTIIqYLAwgJvleokfJTUHpvAFEqtRiOwAxydcAIMNAmmWwMYAYxFtIrzzVH7fpAYjBxgBiEA9AEorntCsASWiYWreWhE6BW09CCq3/HUD02s2OBJCEYjrpCkASGqLy/VdrZ0INYrAxgBjEowZJKJ7TrgAkoWFcRhAeojJZGEBM8s32QcY3leR9tDZ2vgASq9hTewAxyecfEFawbAYGEJt+SytZnjYLKdCN9gUQo4CzQv3yQjgfaRbpldm6AGKWcN6Bl2Kd9MpuXACxazhPszxEEaJHEssCSBIZ3UURao9EdgWQREIudVPr1hNSq3RGBZB0WvpItXhAKqlFASSpnAupVsmnDKk7klsTQJJLughJ/qVfIkcWSwJIFlmXO820/EtBntGGAJJR3MXCPV3KNX5pavyADp88yGhDAMko7lbX19eT/lZ8UAcwCtoMQAqKvTbUBMv4OwwjMOPv+SOe4/85Dx/jv4gYZQ0GIGX1ZrTGFACQxgzGdMsqACBl9Wa0xhQAkMYMxnTLKgAgCfWevkl4K7LvBfdthNvfEo741NV9ufc8fF3/cqKot8kNIAb9rkCMu+Sa5VrDyIpD76tglxUzfiIFAEQk073R9cu1fxT7F5EjZW4OMCKBAUQgUzdQrJ3rBRbSsQV9AGQDEBcf4xQAnKwJUWUmJYAseFf3ESNEFLfN/ygEIA/OsnswXsEBlAFAhmEAjEBI2TEouwdkd3VGKL1a//sunzvZNSCZHmDSu2ALR+4smuwSkGtK5ePthy1AsePaZHeAkFIlI3IXD27tChDgSAbHvaPOXxaxG0CAIwMcty47hmQXgFCMZ4Sjc0i6BwQ4CsDRMSRdAwIcBeHoFJJuAaHmqABHh5B0CQhwVITjMnQ3u+7dAQIc1eG4TKCTHff+APl7PjtxEabRASRdAUJR7pDJxvdIugGE1MohHB3UI10AAhxu4Wi+HgEQ577VzfQaTbWaB4To0QxCTS79tg8Iq1bNEDI0GEWaBoTo0Q4b15k2F0XaBoTo0RwhrUWRZgExRo/pabjRu8aXOz+8Y3d8pSi/ZQVGzb4SvIe4qSjSLiDa6LGxu2uErlewZo/Wmp/pb6gWaRIQiyMffx02z5nd+GfO1/QyQtJMFNkXIIJ7gwDkAZCAXhatQhcqL+G4TUCU6ZXEKJbo5MWoqeYh0ktpi1aK9eYAUTuwIHqMjqXuP5VXOupHCMj4fjHN17OaSLPaA0R/xfo4vh2CX1f61PbvyLFTTUUEyPjZucOgewlfA8V6U4BYCkOJsacIAiA/fGXXTBjVUwGv6ac1QN6HwxC/VyE0hAVAjfjujxFe4Q3Fuvs0qy1A/p51+a7U0JZ0wb23KyZYQDdplFLMPskhrQGiepxWagQiyItPCQExpaYRYyTx+MhOmgHE4rwRgOhSuEjRm2ke4bzq2i1ijBq6tQSI1nnFeS5LvLMIIlr5u0YQXfrr/BVBAPLgEwACIK9Rqh1AtMuvwhUs41WwRvTPP2Yh7aQpcP4Tno8AII8RRLtKVsNyZcYskp4CSAJjGorAmDxatUqW4PS8dlEEEM/3ZRFBniMIgDyjCiBeL12P87Is8ca8I1YdpVoQUTlHafpjWuBwvNTbRAQpAYhpDKXztXAYgDRgJePVSVSDAMiyIwAIgEwKAEhVQEQXsRqu2kqKpd1FF3+nwhSlaliu1JjC+sCkX8R+S6nTvo0DIFclTAYubbWS4wFISbV1Y5mcV3h1Mo2hO602jgIQ/3YyOS+A2AwMIDb9ShwNICVUXhmjxAVGOEYNFahBbjUI92Et+5/QeUtcxABkRYES4hueq65ht3JjAkg5rbUjAYhWuQTHAUgCETN3UQgQblRctqPohsUSNsrsZovdU4PcaxAAAZCZAgACIKELMxEkpFDtv5cI39zqvmplAKkNQGh8AAkplPXvAJJV3gSdA0gCEQ1dSG55L2EjwymoD6UG4Vb3oPMASFCiug1Mz2oI1vFN/deVpsjoQkAsn0HgeRCrJdVFtOBmOwDZto4EkLGHnDay+o/2+CZSrKv4qldbSowLIIkA+T6rHmyT2Ejr4Nbj2gFE82kCQXo1wafp26p8S8cLovDtdKLvaRPaqJZczQBydWT5FSpCeAAJuF8MIDEXmwgbAYhQAdFyYqTwAJIOkIeIPH4JbP3jnpE2ErpH8mZNRZDHs59AGX/3T7Kd/r3C8kvyoc5XFUXQJZe+oQ4jIkguG9VSq1lAUgoGIGkjSErb1O4LQPg2etgHlREk3LH/FgACIGEvBZCwRj23IMUixVpTgAhCBAlf+4ggYY16bkEECUYQt/dK5fZLIggRJOxjjexZhE8kvgWAAEjYawAkrFHPLUixSLEo0jd8AEAABEAARJ8EkGLptevhSCIIEYQIQgTRX8uIIHrtejiS292JIESQ7Qiif+FAD1eI0DkQQUIK9f13IggRhAhCBNFf5Yggeu16OJIIEowgx+Pb4dSDrWPPgVtNroqp3+kUq3iL7bmbt0WrpZ0zgGzoCSBpna3F3gAEQJYUIMW6p1iqNze2eDGInbPnNx/GnktsewABkKDPAEhQov4bRL8ys39Jfs4QQHZk7LVT5YbFVScQfWGqVxcixbqlWMo3k/fqGA/nBSA7MHLwFNksJIKwirWBCYCsiLPj20xGRUix7ikWd/QuMQIgwexjFw2IIEQQUqwA6k5206fPOExTvX/aod5Fase3mZBivbhddUAWnLH68jOA1Ls4eRu56mbhRq5fc1573iQkgswjSLX7sbYcEUDqXUpZxXrQ3qsj1kyziCD14HQ3sldHrDivXe+ik2K9plgVbzfZTLHqzQtA3F3GK06o5l6IS0B2vklIBJlHkGq76QBS8cq4MTRFupO9EAABEJ8KAMi6XXa+SUiKteAatZZ6PUaQvS/xAgiAbEZ1AOF295mDEEHukgAIgMwBqbTn4DDF2v0eCCnWUor1fa6y1OsOEPZAJu9gmdfJXgiA+FzkBJDlQv1c2lwAUlpx2XgAAiDLnsIeCCnW2jWkxkqWtwjCCtbFO4ggTvZCAESW8pRuBSDLK1nvpV+Y4AwQlnivfgEgTpZ6XQHCEu+PVwAIgMwVABAACeWypV8B5CyC7Pajna9+QQRZIaX0SpYnQFjBujsFgADITAEAAZBQhjWUfpOIowjCCtaDdxBB1iJI4ZsW3QBCgf7kEQACIM8KAAiABPOra4OSK1mOIggrWKRYMkRKrmR5AYQC/dk3SLE2WAEQ2YWk51YAsgVIwULdSQRhBevFHwAEQO4KUKDPvAFAAvlBqULdRQQBEACJzZdL1SEeAKFAn3sHESQcQYp8dQpAYi9dZdoDSAiQQoW6A0Ao0Bd8AUAEF6ISdUh1QKg/Fj0BQGSAZE+zAERgiApNAEQgeolCvTYgFOjLjgAgEkAK1CEAIjBEhSYAIhC9xLcLqwJC/bHqBQAiAGRskjnN2lxByg4ogACIkIPVZlkBEThozpU06o917yCCCMnJeRWXOGhGQNn/2PABABECki3NEkSPaexcCwXC8SNk6qopgESYM4OTRl29M7xIImr8CKm6aQogkaZMConiEwMpUy1JahcpT3fNAURh0iRXcgUct6kmGv/j+HZ4V5z+rg4BEKW5DZHkNFzy/pNy6OkwEyQGOC1zbvFYADFaLcJRk4DxON2IsW+HJZ+DUT73hwNIIhNNzjr+DsPvYRj+u3Y7OuTXv/8+WSPG1jQfxv6z0g4wlHYGEKVwXg+bUr8LoD8pXE44veqQal7/A0k3DjKeVrGjAAAAAElFTkSuQmCC",alt:""})],-1)})),F3={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},V3={class:"tit"},G3=u({__name:"townDialog",setup:function(t,e){var n=e.expose,i=c(!1),r=c({}),o=c(),a=c(),s=function(){var t={color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#00fefb"},{offset:1,color:"#0063ce"}],global:!1},grid:{top:"30%",left:10,right:0,bottom:"30%"},xAxis:{type:"category",axisTick:!1,axisLine:{lineStyle:{color:"rgba(255, 129, 109,.1)",width:1}},axisLabel:{interval:0,color:"#08DFFE",fontSize:12},data:["成年居民","6-17岁","6岁以下"]},yAxis:{show:!1,type:"value",interval:1,axisLine:{lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:1}},axisLabel:{color:"#fff"},splitArea:{areaStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!0,lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:.5,type:"dashed"}}},series:[{data:[50,19,10.4],type:"bar",barWidth:"40%",label:{show:!0,color:"#08DFFE",fontWeight:"bolder",fontSize:12,position:"top"}}]};D_(o.value).setOption(t)},l=function(){var t=D_(a.value),e=["#0090FF","#36CE9E","#FFC005","#FF515A","#8B5CFF","#00CA69"],n={backgroundColor:"rgba(0,0,0,0.2)",color:e,legend:{right:10,left:0,top:10,textStyle:{color:"#fff"}},tooltip:{trigger:"axis",formatter:function(t){var n="";return t.forEach((function(t){n+='
\n \n ').concat(t.seriesName,".").concat(t.name,'\n ').concat(t.value,"\n ").concat(1===t.componentIndex?"岁":"%")})),n},extraCssText:"background: #fff; border-radius: 0;box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);color: #333;",axisPointer:{type:"shadow",shadowStyle:{color:"rgba(0,0,0,.2)",shadowColor:"rgba(225,225,225,1)",shadowBlur:5}}},grid:{top:"10%",bottom:0,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLabel:{formatter:"{value}年",rotate:30,textStyle:{color:"#fff"}},axisLine:{lineStyle:{color:"#fff"}},data:["2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022","2023"]}],yAxis:[{type:"value",name:"单位:万千瓦时",axisLabel:{textStyle:{color:"#fff"}},nameTextStyle:{color:"#fff",fontSize:12,lineHeight:40},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1}}],series:[{name:"疫苗接种率",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:e[0],shadowBlur:3,shadowColor:u(e[0],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new mh(0,0,0,1,[{offset:0,color:u(e[0],.3)},{offset:1,color:u(e[0],.1)}],!1),shadowColor:u(e[0],.1),shadowBlur:10}},data:[72.6,78.8,71.3,83.2,64.2,79.2,85.2,86.2,84.5,82.6,87.2,88.2,89.2,90.2]},{name:"居民人均寿命",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:e[1],shadowBlur:3,shadowColor:u(e[1],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new mh(0,0,0,1,[{offset:0,color:u(e[1],.3)},{offset:1,color:u(e[1],.1)}],!1),shadowColor:u(e[1],.1),shadowBlur:10}},data:[65.4,68.6,70.58,73.2,73.3,73.4,75.6,73.5,73.6,76.8,73.7,73.8,73.9,83.8]},{name:"重大疾病发病率",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:e[2],shadowBlur:3,shadowColor:u(e[2],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new mh(0,0,0,1,[{offset:0,color:u(e[2],.3)},{offset:1,color:u(e[2],.1)}],!1),shadowColor:u(e[2],.1),shadowBlur:10}},data:[45.4,28.6,20.58,13.2,13.3,13.4,25.6,23.5,13.6,16.8,43.7,3.8,3.9,13.8]}]};t.setOption(n)},u=function(t,e){var n="";return/^#[\da-f]{6}$/i.test(t)&&(n="rgba(".concat(parseInt("0x"+t.slice(1,3)),",").concat(parseInt("0x"+t.slice(3,5)),",").concat(parseInt("0x"+t.slice(5,7)),",").concat(e,")")),n};return n({show:function(t){i.value=!0,r.value=t,setTimeout((function(){s(),l()}),100)}}),function(t,e){var n,s=g3,l=h3,u=D3;return v(),K(u,{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=function(t){return i.value=t}),title:(null===(n=r.value)||void 0===n?void 0:n.name)+"健康大数据",class:"hukou-dialog",width:"60%"},{footer:D((function(){return[]})),default:D((function(){var t;return[x("div",null,[M(l,{gutter:20},{default:D((function(){return[M(s,{span:15,class:"box card fadeIn delay06",style:{height:"200px"}},{default:D((function(){var t;return[x("div",k3,P(null===(t=r.value)||void 0===t?void 0:t.name)+"人更高了",1),O3]})),_:1}),M(s,{span:8,class:"box card fadeIn delay06",style:{"margin-left":"20px",height:"200px",position:"relative"}},{default:D((function(){var t;return[x("div",B3,P(null===(t=r.value)||void 0===t?void 0:t.name)+"人更胖了",1),z3,x("div",{class:"user-container layout-pd",ref_key:"weightRef",ref:o,style:{height:"200px"}},null,512)]})),_:1})]})),_:1}),x("div",F3,[x("div",V3,P(null===(t=r.value)||void 0===t?void 0:t.name)+"人更健康了",1),x("div",{class:"user-container layout-pd",ref_key:"geneRef",ref:a,style:{height:"200px"}},null,512)])])]})),_:1},8,["modelValue","title"])}}}),U3=b(G3,[["__scopeId","data-v-6c25d3d0"]]),H3=u({__name:"gene",setup:function(t){var e=c();d({charts:{theme:"",bgColor:"",color:"#303133"}});return g((function(){var t;t={color:"#04CFE4",grid:{top:20,left:10,right:0,bottom:40},xAxis:{type:"category",axisTick:!1,axisLine:{lineStyle:{color:"rgba(255, 129, 109,.1)",width:1}},axisLabel:{interval:0,color:"#08DFFE",rotate:30,fontSize:12},data:["肝癌","肺癌","胃癌","结直肠癌","食管癌","胰腺癌","脑胶质瘤","肾癌","膀胱癌","前列腺癌"]},yAxis:{show:!1,type:"value",interval:1,axisLine:{lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:1}},axisLabel:{color:"#fff"},splitArea:{areaStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!0,lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:.5,type:"dashed"}}},series:[{data:[1.23,.86,2.11,1.23,.92,1.92,2.92,.32,.12,2.92],type:"pictorialBar",barCategoryGap:"0%",symbol:"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",label:{show:!0,position:"top",color:"#08DFFE",fontWeight:"bolder",fontSize:12,formatter:function(t){return t.data+"%"}},itemStyle:{normal:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#9A11FF"},{offset:1,color:"#08DFFE"}],global:!1}},emphasis:{opacity:1}}}]},D_(e.value).setOption(t)})),function(t,n){return v(),_("div",{class:"boxnav",ref_key:"geneRef",ref:e,style:{padding:"0 10px"}},null,512)}}});!function(t){var e=Em.extend(t);Em.registerClass(e)}({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(t){return{fill:t.get("color")}},visualDrawType:"fill",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,e){var n=Sx(t.data,{coordDimensions:["value"]}),i=new bx(n,this);return i.initData(t.data),i},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}}),function(t){var e=Um.extend(t);Um.registerClass(e)}({type:"wordCloud",render:function(t,e,n){var i=this.group;i.removeAll();var r=t.getData(),o=t.get("gridSize");t.layoutInstance.ondraw=function(e,n,a,s){var l=r.getItemModel(a),u=l.getModel("textStyle"),c=new Jl({style:Ub(u),scaleX:1/s.info.mu,scaleY:1/s.info.mu,x:(s.gx+s.info.gw/2)*o,y:(s.gy+s.info.gh/2)*o,rotation:s.rot});c.setStyle({x:s.info.fillTextOffsetX,y:s.info.fillTextOffsetY+.5*n,text:e,verticalAlign:"middle",fill:r.getItemVisual(a,"style").fill,fontSize:n}),i.add(c),r.setItemGraphicEl(a,c),c.ensureState("emphasis").style=Ub(l.getModel(["emphasis","textStyle"]),{state:"emphasis"}),c.ensureState("blur").style=Ub(l.getModel(["blur","textStyle"]),{state:"blur"}),nc(c,l.get(["emphasis","focus"]),l.get(["emphasis","blurScope"])),c.stateTransition={duration:t.get("animation")?t.get(["stateAnimation","duration"]):0,easing:t.get(["stateAnimation","easing"])},c.__highDownDispatcher=!0},this._model=t},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}}), /*! * wordcloud2.js * http://timdream.org/wordcloud2.js/ * * Copyright 2011 - 2019 Tim Guan-tin Chien and contributors. * Released under the MIT license */ window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";return window.addEventListener("message",(function(n){if("string"==typeof n.data&&n.data.substr(0,20)===e){n.stopImmediatePropagation();var i=parseInt(n.data.substr(20),36);t[i]&&(t[i](),t[i]=void 0)}}),!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(n){var i=t.length;return t.push(n),window.postMessage(e+i.toString(36),"*"),i}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)});var W3=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!e&&(!!e.getImageData&&(!!e.fillText&&(!!Array.prototype.some&&!!Array.prototype.push)))}(),X3=function(){if(W3){for(var t,e,n=document.createElement("canvas").getContext("2d"),i=20;i;){if(n.font=i.toString(10)+"px sans-serif",n.measureText("W").width===t&&n.measureText("m").width===e)return i+1;t=n.measureText("W").width,e=n.measureText("m").width,i--}return 0}}(),j3=function(t){for(var e,n,i=t.length;i;)e=Math.floor(Math.random()*i),n=t[--i],t[i]=t[e],t[e]=n;return t},Y3={},Z3=function(t,e){if(W3){var n=Math.floor(Math.random()*Date.now());Array.isArray(t)||(t=[t]),t.forEach((function(e,n){if("string"==typeof e){if(t[n]=document.getElementById(e),!t[n])throw new Error("The element id specified is not found.")}else if(!e.tagName&&!e.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")}));var i={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(e)for(var r in e)r in i&&(i[r]=e[r]);if("function"!=typeof i.weightFactor){var o=i.weightFactor;i.weightFactor=function(t){return t*o}}if("function"!=typeof i.shape)switch(i.shape){case"circle":default:i.shape="circle";break;case"cardioid":i.shape=function(t){return 1-Math.sin(t)};break;case"diamond":i.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"square":i.shape=function(t){return Math.min(1/Math.abs(Math.cos(t)),1/Math.abs(Math.sin(t)))};break;case"triangle-forward":i.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-upright":i.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":i.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":i.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}i.gridSize=Math.max(Math.floor(i.gridSize),4);var a,s,l,u,c,h,d,p,f=i.gridSize,g=f-i.maskGapWidth,m=Math.abs(i.maxRotation-i.minRotation),v=Math.min(i.maxRotation,i.minRotation),y=i.rotationStep;switch(i.color){case"random-dark":d=function(){return P(10,50)};break;case"random-light":d=function(){return P(50,90)};break;default:"function"==typeof i.color&&(d=i.color)}"function"==typeof i.fontWeight&&(p=i.fontWeight);var _=null;"function"==typeof i.classes&&(_=i.classes);var x,b=!1,w=[],S=function(t){var e,n,i=t.currentTarget,r=i.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY);var o=e-r.left,a=n-r.top,s=Math.floor(o*(i.width/r.width||1)/f),l=Math.floor(a*(i.height/r.height||1)/f);return w[s]?w[s][l]:null},A=function(t){var e=S(t);x!==e&&(x=e,e?i.hover(e.item,e.dimension,t):i.hover(void 0,void 0,t))},T=function(t){var e=S(t);e&&(i.click(e.item,e.dimension,t),t.preventDefault())},M=[],I=function(t){if(M[t])return M[t];var e=8*t,n=e,r=[];for(0===t&&r.push([u[0],u[1],0]);n--;){var o=1;"circle"!==i.shape&&(o=i.shape(n/e*2*Math.PI)),r.push([u[0]+t*o*Math.cos(-n/e*2*Math.PI),u[1]+t*o*Math.sin(-n/e*2*Math.PI)*i.ellipticity,n/e*2*Math.PI])}return M[t]=r,r},C=function(){return i.abortThreshold>0&&(new Date).getTime()-h>i.abortThreshold},D=function(e,n,i,r,o){if(!(e>=s||n>=l||e<0||n<0)){if(a[e][n]=!1,i)t[0].getContext("2d").fillRect(e*f,n*f,g,g);b&&(w[e][n]={item:o,dimension:r})}},E=function e(n,r){if(r>20)return null;var o,u,h;Array.isArray(n)?(o=n[0],u=n[1]):(o=n.word,u=n.weight,h=n.attributes);var g=0===i.rotateRatio||Math.random()>i.rotateRatio?0:0===m?v:v+Math.round(Math.random()*m/y)*y,x=function(t){if(Array.isArray(t)){var e=t.slice();return e.splice(0,2),e}return[]}(n),w=function(t,e,n,r){var o=i.weightFactor(e);if(o<=i.minSize)return!1;var a,s=1;oL[1]&&(L[1]=E),TL[2]&&(L[2]=T);break t}}return{mu:s,occupied:D,bounds:L,gw:b,gh:x,fillTextOffsetX:y,fillTextOffsetY:_,fillTextWidth:c,fillTextHeight:h,fontSize:o}}(o,u,g,x);if(!w)return!1;if(C())return!1;if(!i.drawOutOfBound&&!i.shrinkToFit){var S=w.bounds;if(S[1]-S[3]+1>s||S[2]-S[0]+1>l)return!1}for(var A=c+1,T=function(e){var r=Math.floor(e[0]-w.gw/2),m=Math.floor(e[1]-w.gh/2);w.gw,w.gh;return!!function(t,e,n,r,o){for(var u=o.length;u--;){var c=t+o[u][0],h=e+o[u][1];if(c>=s||h>=l||c<0||h<0){if(!i.drawOutOfBound)return!1}else if(!a[c][h])return!1}return!0}(r,m,0,0,w.occupied)&&(function(e,n,r,o,a,s,l,u,c,h){var g,m,v,y=r.fontSize;g=d?d(o,a,y,s,l,h):i.color,m=p?p(o,a,y,h):i.fontWeight,v=_?_(o,a,y,h):i.classes,t.forEach((function(t){if(t.getContext){var a=t.getContext("2d"),s=r.mu;a.save(),a.scale(1/s,1/s),a.font=m+" "+(y*s).toString(10)+"px "+i.fontFamily,a.fillStyle=g,a.translate((e+r.gw/2)*f*s,(n+r.gh/2)*f*s),0!==u&&a.rotate(-u),a.textBaseline="middle",a.fillText(o,r.fillTextOffsetX*s,(r.fillTextOffsetY+.5*y)*s),a.restore()}else{var l=document.createElement("span"),h="";h="rotate("+-u/Math.PI*180+"deg) ",1!==r.mu&&(h+="translateX(-"+r.fillTextWidth/4+"px) scale("+1/r.mu+")");var d={position:"absolute",display:"block",font:m+" "+y*r.mu+"px "+i.fontFamily,left:(e+r.gw/2)*f+r.fillTextOffsetX+"px",top:(n+r.gh/2)*f+r.fillTextOffsetY+"px",width:r.fillTextWidth+"px",height:r.fillTextHeight+"px",lineHeight:y+"px",whiteSpace:"nowrap",transform:h,webkitTransform:h,msTransform:h,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var p in g&&(d.color=g),l.textContent=o,d)l.style[p]=d[p];if(c)for(var _ in c)l.setAttribute(_,c[_]);v&&(l.className+=v),t.appendChild(l)}}))}(r,m,w,o,u,c-A,e[2],g,h,x),function(e,n,r,o,a,u){var c,h,d=a.occupied,p=i.drawMask;if(p&&((c=t[0].getContext("2d")).save(),c.fillStyle=i.maskColor),b){var g=a.bounds;h={x:(e+g[3])*f,y:(n+g[0])*f,w:(g[1]-g[3]+1)*f,h:(g[2]-g[0]+1)*f}}for(var m=d.length;m--;){var v=e+d[m][0],y=n+d[m][1];v>=s||y>=l||v<0||y<0||D(v,y,p,h,u)}p&&c.restore()}(r,m,0,0,w,n),{gx:r,gy:m,rot:g,info:w})};A--;){var M=I(c-A);i.shuffle&&(M=[].concat(M),j3(M));for(var E=0;E=i.list.length)return m(Y3[n]),L("wordcloudstop",!1),D("wordcloudstart",P),void delete Y3[n];h=(new Date).getTime();var e=E(i.list[p],0),r=!L("wordclouddrawn",!0,{item:i.list[p],drawn:e});if(C()||r)return m(Y3[n]),i.abort(),L("wordcloudabort",!1),L("wordcloudstop",!1),void D("wordcloudstart",P);p++,Y3[n]=g(t,i.wait)}}),i.wait)}}()}function P(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}};if(Z3.isSupported=W3,Z3.minFontSize=X3,!Z3.isSupported)throw new Error("Sorry your browser not support wordCloud");z_((function(t,e){t.eachSeriesByType("wordCloud",(function(n){var i=Gp(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),r=n.get("keepAspect"),o=n.get("maskImage"),a=o?o.width/o.height:1;r&&function(t,e){var n=t.width,i=t.height;n>i*e?(t.x+=(n-i*e)/2,t.width=i*e):(t.y+=(i-n/e)/2,t.height=n/e)}(i,a);var s=n.getData(),l=document.createElement("canvas");l.width=i.width,l.height=i.height;var u=l.getContext("2d");if(o)try{u.drawImage(o,0,0,l.width,l.height),function(t){for(var e=t.getContext("2d"),n=e.getImageData(0,0,t.width,t.height),i=e.createImageData(n),r=0,o=0,a=0;a128&&(r+=l=n.data[a]+n.data[a+1]+n.data[a+2],++o);var s=r/o;for(a=0;as?(i.data[a]=0,i.data[a+1]=0,i.data[a+2]=0,i.data[a+3]=0):(i.data[a]=255,i.data[a+1]=255,i.data[a+2]=255,i.data[a+3]=255)}e.putImageData(i,0,0)}(l)}catch(KJ){console.error("Invalid mask image"),console.error(KJ.toString())}var c=n.get("sizeRange"),h=n.get("rotationRange"),d=s.getDataExtent("value"),p=Math.PI/180,f=n.get("gridSize");function g(t){var e=t.detail.item;t.detail.drawn&&n.layoutInstance.ondraw&&(t.detail.drawn.gx+=i.x/f,t.detail.drawn.gy+=i.y/f,n.layoutInstance.ondraw(e[0],e[1],e[2],t.detail.drawn))}Z3(l,{list:s.mapArray("value",(function(t,e){var n=s.getItemModel(e);return[s.getName(e),n.get("textStyle.fontSize",!0)||ra(t,d,c),e]})).sort((function(t,e){return e[1]-t[1]})),fontFamily:n.get("textStyle.fontFamily")||n.get("emphasis.textStyle.fontFamily")||t.get("textStyle.fontFamily"),fontWeight:n.get("textStyle.fontWeight")||n.get("emphasis.textStyle.fontWeight")||t.get("textStyle.fontWeight"),gridSize:f,ellipticity:i.height/i.width,minRotation:h[0]*p,maxRotation:h[1]*p,clearCanvas:!o,rotateRatio:1,rotationStep:n.get("rotationStep")*p,drawOutOfBound:n.get("drawOutOfBound"),shrinkToFit:n.get("shrinkToFit"),layoutAnimation:n.get("layoutAnimation"),shuffle:!1,shape:n.get("shape")}),l.addEventListener("wordclouddrawn",g),n.layoutInstance&&n.layoutInstance.dispose(),n.layoutInstance={ondraw:null,dispose:function(){l.removeEventListener("wordclouddrawn",g),l.addEventListener("wordclouddrawn",(function(t){t.preventDefault()}))}}}))})),L_((function(t){var e=(t||{}).series;!he(e)&&(e=e?[e]:[]);var n=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function i(t){t&&re(n,(function(e){var n;t.hasOwnProperty(e)&&(t["text"+(n=e,n?n.charAt(0).toUpperCase()+n.substr(1):n)]=t[e])}))}re(e,(function(t){if(t&&"wordCloud"===t.type){var e=t.textStyle||{};i(e.normal),i(e.emphasis)}}))}));var Q3=function(t){return R("data-v-a56edc48"),t=t(),N(),t},q3={class:"boxnav"},J3=["onClick"],K3=Q3((function(){return x("div",null,"当年随访数 726,789",-1)})),$3=Q3((function(){return x("div",null,"血压控制率 86.23%",-1)})),t4={style:{color:"#aaa","font-size":"12px",margin:"20px 0 5px 0"}},e4=u({__name:"cancer",setup:function(t){c(!0);var e=c(""),n=c(!1),i=c();c();var r=c([{name:"缺血性心脏病",top:"40%",left:"50%",fontSize:"29px",color:"rgb(255, 78, 105)"},{name:"中风",top:"46%",left:"80%",fontSize:"20px",color:"rgb(255, 123, 2)"},{name:"慢性阻塞性肺病",top:"57%",left:"59%",fontSize:"20px",color:"rgb(92, 39, 254)"},{name:"下呼吸道感染",top:"23%",left:"50%",fontSize:"20px",color:"rgb(59, 196, 199)"},{name:"新生儿疾病",top:"61%",left:"23%",fontSize:"20px",color:"rgb(255, 123, 2)"},{name:"气管癌、支气管癌、肺癌",top:"74%",left:"53%",fontSize:"15px",color:"rgb(29, 229, 226)"},{name:"阿尔兹海默症",top:"86%",left:"59%",fontSize:"15px",color:"#aaa"},{name:"腹泻",top:"25%",left:"26%",fontSize:"15px",color:"rgb(8, 199, 146)"},{name:"糖尿病",top:"10%",left:"50%",fontSize:"12px",color:"rgb(92, 39, 254)"},{name:"肾病",top:"11%",left:"40%",fontSize:"12px",color:"#58D5FF"}]);d({charts:{theme:"",bgColor:"",color:"#303133"}});var o=function(){var t=D_(i.value),e={legend:{orient:"vertical",top:"center",right:"5%",textStyle:{color:"#fff",fontSize:14}},graphic:{elements:[{type:"image",z:6,style:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAeUUlEQVR4Xu1da5gcRbl+v55kQSAGrxAu3sAblwCigiLnEUVuigpCNJmeQAQJkJBMdc8u4lGY6FEkO909CQkQBQOZnkSDiooCghIfPagoIiDgUUFQuSNKDCDuZvo7T2PwWdfsVk1Pd0/PdPWf/VHf9f3qnZntqvqKoB+NgEZgQgRIY6MR0AhMjIAmiJ4dGoFJENAE0dNDI6AJoueARiAaAvobJBpuWisnCGiC5KTQOs1oCGiCRMNNa+UEAU2QnBRapxkNAU2QaLhprZwgoAmSk0LrNKMhoAkSDTetlRMENEG6WGjPu2pHYNMMbMYMo2DszMCMIODNBuG+gOi+bbYZuG/BgllPdTHE3LvWBElpCtSHr5jZgnF8waD3ICQCYwYRtpW6J3ocAd8P8H0g3EdsbHjyqd99v1qtbpbqaoGOEdAE6RjCiQ24buNQA3Q4M30I4L1jdDUK8HeY6LtTAvxwUcW8O0bb2tQYBDRBYp4O9framUErOMUADmdgr5jNT2TuVgA/pIKxulyec0dKPnPhRhMkpjLXas1XFihYSKCFDIWfTjH5HWuGgGcZvKLFxopKpfiHBFzkzqQmSIclX7Vq/fSnN42eRcQLAezUobm41B9lphXbT5t64fz5szbGZTSPdjRBOqh63W0uZPBCMF7fgZnkVAm/IdCKslVckZyT/rasCRKhvq7b2NNgupCBoyKop65CwHUB8VmWVbondec97lATpM0C1mvNI5n4EgCvalO12+L3E9Pp5Urxu90OpJf8a4K0US3P8RcA6PWfKwuFba5sI+1ci2qCKJa/7jZdZhaK4pkWIyKvbBWtTAeZkeA0QRQK4dUa3wLRsQqivSPCfLWolN7fOwF3J1JNEAnunuN7AMrdKU/iXuvCNvviWzEppDRBJkHWq/lHg3BNUuBnwi7jGFExr81ELBkMQhNkgqJ43po3IjDyscfJCPYSYu6vMzg/ux6SJshWSlCtrtpu+gu3vwmM/bteoTQCINy28W9PH1Ktzn8mDXe95EMTZCvV8hx/NYCTe6mQMcR6ubDNeTHY6SsTmiDjyukMN6qGQef1VZUVkwkCXmIPlqqK4rkQ0wQZU+Zabe0bChT8BMCOuaj++CQZT4wGmw8aGjr53lzmv5WkNUHGgFJ3/YuZcXrOJ4d+9TtmAmiCbAHDG268EwZtyDk5ANBmGMFBQpTCQ1i5fzRBnieI07wK4A/mfkaEFCFaXbaKH9VYAJogANzhNR8hw1inJ8QYBILg3WJw7o15x0QTBEDd8X/CwMF5nwxj82fgKss2j887JrknSL225kgm47q8T4St5U9BcHB5cO7NecYm9wTxnKYDsN76vVUWUFXYxSWaIDlGwHP8OwHE2bOqf9Ak3CwsM9c/PXP9DbKs1jwwIL6lf2Z0/Jm0GHtXctyYLtcE8ZzmeQDrrRWT8+oTwjbPj596vWEx1wRxHf8WAg7sjVJ1Kcqc/8zKLUE8rzEDAT3UpWnXU24HWgMzFgzNeqSngo4p2NwSpO7472Pg6phw7GszBBxbts1v93WSEySXZ4J8jIEv5LHo7eZMwGll2/xiu3r9IJ9bgnhO81MAf7ofiph8DnSusIufSd5P9jzkmSAXAXxG9kqSxYjoYmEXz8xiZEnHlGOCNK4CSO/eVZph/A1hl45TEu0zodwSRG9QVJ/JBPy0bJtvU9foH8ncEsRz/PsBvLJ/SploJn8QttlrzbpjASTPBPkHgIFYUOx/IyPCNrfp/zT/M8PcEqTu+n9mxkvyWPR2cybCE2XLfGm7ev0gn1uC6F28bU3fu4Rt7tOWRp8I55cgNf8GEA7vkzommwbje6Jihve75+7JL0Fcfw0YpdxVPErChIawzLlRVHtdJ7cEcWv+UiIM9noB04ifGcNWxRxKw1fWfOSXIG5TELObtYJkMR4msiyrGN6TkrsntwRZ5jY/EjDrVj8KU94gmr3YKn5ZQbTvRHJLEN1JsY25HPBhYrD0gzY0+kY0twQJK+g5jccAelnfVDORRPhxYZdenojpHjCaa4K4NX8lEXK5S1V1bjLjIqtihtdf5/LJN0Fc/whifDeXlVdMmglHWpZ5vaJ434nlmiDVatWYPm2PR/TPrInmNT++cdO9O1er1aDvZr5iQrkmSIiR6/hfIOBjinjlSoyBL1q2eVqukh6XrCbIcGMWGfSVPE+CCb8/Av6wNVhan2dsck+Qi85vvugfA/wrALvmeSJsJfcHtxmhfc88p/jXPOOSe4I89zOr5n+cCLntHrg1AjDjHKtifj7P5Ahz1wQBcN55K3fY8YU7/hRg3cT6OUbQXU/+7cmDlyxZ8JQmSN4R2JK/6/qnE+NiDQfAhDMsy7xEY6G/Qf5tDriOfxMBb8/zxGDgx5ZtHpJnDMbmrn9ijUHDqzVmg2htricH8xxRKelNnFsmgSbIODZ4Nf8aEI7OJUkY14qKeUwuc58gaU2Q8QRZ6h+CAl8P0Hb5mij8DFp0hBgyb8pX3pNnqwmyFXw8xw83563I2URZKGxzZc5ylqarCTIBRK7TuJRAp0gR7AMBBl9m2aVT+yCV2FPQBJkE0rrj38J9fgMVAb8o2+abY59ZfWJQE0RSSM/xWwCMPqn3+DQCYZuFPs0tlrQ0QSQw1oevmMlG4fZY0M6YEQpa+5UHT7ojY2FlKhxNEIVyDA+veXnBMH5FQF8cPWXgsVYQ7Ds4OPcxhfRzLaIJ0kb5607jUu7xf9wJfFlZ/0OuXHVNEGWo/inouo2FxHRhm2qZEGfisyyrlLfX1x1hrwkSAb7whtwAuIiA3SOop67CwJ8M4My83lTbCeCaIBHRc11/XwMkmHleRBOpqBHR6gDsWZYZHgrTT5sIaIK0Cdh4cW94zbvYMBYSkKk7/Bi4ioJghRice2OHKeZaXRMkpvK7rn8cgRaC+V0xmYxmhuhGBq+wLPOqaAa01lgENEFing/ucGMeFWg+GAfFbHpyc4SbucWrrMHS6lT99rkzTZCEClwfXnMQG4WjQHx0YmQh3AymayloXVcenHtzQqnk2qwmSArlX7as+drWSPBBMugDADo9rXcTB/zNwoDxjcWLi79LIfxcu9AESbn85523fmDatNEZRDzDYGNnUGsGgBkM2jn8uyWchwn8CICHwYWHAwoeYaaHN22a+vCSJbNGUg451+40QXJdfp28DAFNEBlCejzXCGiC5Lr8OnkZApogMoT0eK4R0ATJdfl18jIENEFkCOnxXCOgCZLr8uvkZQhogsgQ0uO5RkATJNfl18nLEOgbgqxfv77wwAMje1HA+5Bh7AVgRzDvGP5lwg4yIEB0ihDF30vlEhTwvMabQvNClG5N0I3UtOc1XwPmy2SCxAivR3gSRE+GfzkI7maD7txtt4G7Z82aFXaD6fmnpwmyatXV2z3z1MZ5IMwGYyaAaZErwnycqJS+EVk/BsW607wnNFO2i3vGYC6yCa/W+CCIOtkuvwmEO8BYt90O01fPn3/sM5GD6bJiTxJk5dL1O48URuYBdDLAr4sDQ2acZ1XMT8dhK4qNes2/mAmnh7rEuKRcMc+IYicOHbfmn0uEJXHYAui3AF8+0BpYvWBoVri/rKeeniOI5zXei4DqAOL9lCV8VVjmid2o3jLXPy5gfH2sb4Nw/OIuHXryXP9KME6IGYt7YHBZiNJ3YrabqLmeIkjdbZ7CzJcmgwj/duOm3fauVg/bnIz9rVutVldtN33aDhsBnvLvErR546anpler81P9eVKtbpgyfdoDdwEUyzfz+KyJ6NSyVZT+f5NmDSbz1TME8Wr+EAgXJAkcMd5arpg/T9LHeNue618DnuA+EsK1wkr3vo56zX8LE36WKAaMs0XFXJqoj5iM9wRBvJp/AghXxpTzhGaY6FQrxU83t7ZGEBnuZHkxB5ZVmeslnfvz9l23eQol9i09JgvGiaJifjWtvKL6yTxBli69fI+phSnPvd1J+mFguWWbi5P2E9r3vDVvRGDcreTLCPYSYu6vlWQ7FHIdfxkBizo0o6Q+2tq859DQyfcqCXdJKNMEOfHE9YW3HzRyCwj7p4EPARvKtplKV5K649/FQLheI30IuLtsm6lcUV13/BsZOEwaVBwCjNt+fPPAm6+8MrtrJpkmSN31L2b+56vPVB7GEyOtwsyzz579UJL+vFqjDqL2vqmYl4lKqZxkXBdcsG6XgULrDhBekqSfsbaJcEnZ6t4rbVmemSVI3fE/xsAXZAnEPc7ER1tW6bq47T5vz3UbRxHTtVHsZzm2KPk8r0PAaWXb/GInNpLSzTJBfsLAwUklPqHdhN+weI4fbs/YPmJeTwvblG+biWg8jTeFWwuNgJ+WbfNtEcNOVC2TBPFqzRKI1ySa+UTGmZuiUjKT8O05jasA+mBntvkbwi4l0ubUqzV8EBU7iy+iNtNcUSk2ImonppZNgrj+BjDemVjWkxkmukNYxf3i9l131s5nBJfEYZdgnF6256yKw9ZYG57bvB3M4Z629B/CD4RlpvNyoI3sMkcQz/NPQJD8msekHIn5ajLHWbe7gdYf26iLVDRA4RW2PftPUkFFgUxcNWfgRCGytTaSOYLUHf9aBo5SrGsyYkymqBSbcRl3ncatBDogLnuhHQb/0rJLz22Pj+Pxas0iiP04bEW1QcB1Zds8Oqp+EnqZIkgnb3hiBmepsM2z47BZr/nnM+Hjcdgab4MYny9XzHPisO05friNZygOW53YSPpNXbuxZYogntP8PMCxTMx2gfg3+Zj2QNVra9/BFPyoo1gkysTGoeXKnP/t1Meke8I6Nd6WPl0g7GIiHyhthbFFOGME8cMO5W+NkkjMOg8K29ytU5ue4z8B4MWd2pHo/0XYZscLe57jPwBg14RjVTH/M2Gb6V4dMUlUmSHI8pq/V4twlwqCqcgYfJgQpR9E9eU5/loAs6Pqt6m3TtjmnDZ1/iXueY13IqANUfXj1isw9l5UMdX2qcXtfJy9zBDEc/wFADJzAyuBFpft4vIo+Htes4gg5X94DTKFiPZioe40FzF4WZRcE9JZKGxzZUK22zKbHYIkc4qtLTDGCjP4MivCfeLnn9980bYD/JfIjjtQfHaEXnzOOcW/tmvCdRqXUpbuf+/i6c7x2GWCIGFHkgf/OPJompvk5JOIfibsYtu/heuOfxMDb5fbj1+CgB+XbbPtC3o8p3kzwFn43++foDCe2PUVAztloTNKJgiy5Zz5t+OfMtEtEvCsMXXgFYsWzXpc1Yrn+P8N4H9U5ROS+6Swzc+q2l6+fP3LgtGRPzKwrapOKnIGvy8L59czQZC623CZSaQCfBtOCMYJZXvO11RUPK+5PwL+pYps4jIGHSBE8TYVP3Vn7YcYQeZO9hGxV7ZKlkoOScpkgiBezf9lWoei2gGTGZ+2KuZ5KjpezX8QhF1UZBOXYTwkKqbSK1u35i8hwrmJx9SuA8ZtomLGuvug3RBC+a4TxHUbexJTRi+jVNs5u3zp5Xu0UjoWrFrkQmvznosUjrPGs8NYNar25Jj4tZZVSuW49USRZYEgC4npwvagS0eaQPeqdjn0HD9sirZTOpFJvTwqbDO8FFT6hN0cGbyHVLALAkx8lmWVuvrqv+sE8Rz/mwDe3wX8lVwyGftY1hzpAma2PonVvvlcd+3exMGdSkB0R+hbwjbDq7O79mSBIH/rqKduwtAx0XzLKkqP/tbdxiAzZaLXExEPla3SsAwa122eRsyxnyuR+W1jfJOwzRe2IR+7aFcJUqs13lMguj72rOI1uFLY5kKZSc/zD0GAjjcNyvwojRt4hxDmTTJZz/HDny/hDobMPi3mIyqV0g3dCrCrBPGchgNQ11/lScD/kbDN/5IVaNWqVVOfeWr7EZlcGuPb7fD0wPz580dlvjzH/yGAQ2Vy3R1nV9glu1sxdJkgzTsBTqXfUwcAPyls80Uq+nXH706jiTHBtdMAwXP8cFtKeIdKhh+6S9jFfboVYNcIksQx1MRAVNzZ6zlNB+AufyOSK+yi9BM3azt4J6td3MeL25knXSNIt/petQPOGNlPCNs8X6abhVVp1dV/z/HDk4ifk+WUhfFu9s3qGkE81/8aGMdnoQCyGIj5y+VKSXq2Y/lyf7fWKGJrpCCLa2vjhanYfdEiMzz8NOlTrzXWMdFHZHKZGCd8XVjmh7oRS9cI4jqNhwmktJjVDWDG+mTgbkuxN67n+PcBeFWXYr5f2OarVXy7jn8XKfYGVrGXpAyDH7Hs0owkfUxkuysEycInbbtgq561qDt+k4HIp/vajWusPAFry7YpbfzWzTMrUfNT/WaMaj9TBHFd/zgad+VY3InFbY+JP2xZpfUyu67b6NrWGdWtGa7bmEVMX5HlkqVxJhxvdeFKuq58g9Td5meZ+RNZKoAsFiI4ZcusyOSW1ZoHBsS3yOSSGDeY3ry4UvyFzHbd9WvMkL7pktlJc5yIPle2iuF5m1SfrhDEc5rXA/yeVDPt2BndIOziETIzG6obptw+7cFNaR9ACg947bdp12mHKdyx2M/4y+rT7niXCNL4K0AZX6D6DyiVd8i6jn8jpXUJzZYwGdhgKV7+k7Gdx4pzlp8UdklpwVbRoJJY6gTJ9vmPyTGbiimvX2h/5LcyZD3HD4/dpv1z4LPCNj8pi22F8+XXjWLzb2RyWRzvxvmQ1Ani1RqzQRT2jOq5hwM+yxqUn09Y5jSPCcCp3gdugN672C5eIwPVHW4sJCOb529ksYN5jqiU1knlYhRInyCZ2I4RGcHLhW3Ok2m77vpdiUeki3UyO+2MMw3sZlmzHpTpeI6/GsDJMrnnxgNO7joCI0qjOrVtNEq5KQp1gSC9sIN0QvRuFbZ5oAq2nuOHnQHfqCIbg8yvhW0qXQjqOX74lkutK3zAh4nB6N0lJ8vLc3yOkLfSzuoIdidU6QJBms8A/II4k0jR1mZhm1NV/NWd5qUMPkVFtlMZAl1WtounqtjxHD/cBj9FRTb8BskWQejvwi5upxR7TEKpEmTZ8Jp9AsP4VUyxd8WMajd1111zCrFxaRpBMgWnWtbcy2S+2u42nzmCAEYQ7Lt4cG5qx4RTJYg73JhHBn1JVsgsj6u2AvK8xpsQkHTRLpZcDT5QiNKtMlttt/jJIEE44I9ag6Xw/6hUnlQJUq/5K5lwZiqZJeWE6GphFaVNJqrV6pQdp+35GAOJvrsn4K9Pbrrn5dVqdbMsZc9tfgvMx8rknh8PAl6iKtuunGGQUr+x8XaJcVG5YqZ2TDhVgniO/zMAb2kXzIzJ/0HYptJuXddpfIdAxyQZP4OvsezSe1V8eI5/P4BXqshmWObnwjZT6yOcKkHqbjNg5lR9JlHogW0Hpi1YMCu873zSJ6VevUq9eFeuXL/DyLMjm2QxZ32ciLhsFY204kxtsrrumjcTGz9PK7Ek/RiE4xcr7Cz1av7RIEgX7zqKlXGMqJjXymwsc/3jgh7bQT1RTkzBWyxrbiobQlMjyDLXPz1gXCwrZC+MM+MSq2KeIYv1wgvX7bJ5pCVdvJPZmWx8ykBh17POmv2QzIZb8y8mwukyuV4YNwhnLLbMWO6cl+WbGkE8xw9fQ35UFlAvjLdzD0dbC3PtJ6+8cNnNe0vaT0uq8SVhmymtMUljiUfAc/w7AOwbj7WuW3lK2OY0lSjqTvNCBksbz6nYGi9DoBVlu3iWiq7n+OH/HzuoyPaAzK+Ebc5MI85UvkGWL79mm9boX55NI6HUfBi0hxDF38v8eU7zZIATem9P84RdvFwag9d8DQK+VybXS+OFqS/edtGiY/6RdMypEKReu+IdTIVE7wtPGqj//PTm08t2SdrXdrmz7oAWWtJFvCjxF1B40yJ7tvTSnrrTmM+gVH6zR8kjig5x69By5aTEW72mQhDP8csAvChAZFaH8VVRMU+UxRfev/jQn5674izWy3UIeGiX3QdeoXKPn1fzrwThBFmsPTYuhG3Wk445FYJ0s9NHYgASfiMs8w0q9l2n8VUCxdrXicFfs+yS0qT3XP//wHi9Sqy9IqPawaXTfFIhiOf44QbFrvVX7RSkifSFbSrh5ziNsw3Q5+OMIwB/3LZLF6jYjLi1XMV0N2XuFLaZ+EsfpQJ3ioLnNEcBVtti3amzFPWpUDi4XJ59s8yl6zaOIibpYp7MzthxJj7askrXyXTq9XUHcav1U5lc743TZmEXlY4edJJb4gTp5TPocmD5XGGXPiOTu+CCdbsMTGmFLUnj2iIRjGwu7H722fIFQs9pfAqgT8ti7MXxNM6oJ06QuuO/j4Gre7EAspjb7CQSvnE5RGZTcfwmYZvvUJHtRocVlbjikCHg2LJtfjsOWxPZSJwgntOsACy9DizJJBO0/Wdhmy9TsR/v1QjqZ7M9x38cwEtVYuw9GRoUdrGWZNyJE8R1GpcSKJVtAUkCNZHtjZtGX1CtzpMugro1/yQiSBf1VHJgxslWxbxCJlutrt52+rSpf5fJ9eo4gy+z7JLSUeOoOSZOEM/x4/xpETXPxPSYjPdb1hzpT0jPa+6PgKWLekqBGnSAEMXbZLKuu/ZY4uBbMrkeHlf+qRk1x+QJUvP/DMJLogbYA3oXCttcJIuzWq0a06e99rfo+E5yunfjpt+9rlqtBjKfnuMvB6C0V0tmK5PjjCdExUz052OiBFn+uS+9rLXNwGOZBDeuoJjvEJXSfirmPKfpAyy9nmByW9QUdtFU8ldr3A6iVDb1qcSThEzhHyMvX/SJj4b/ZyXyJEoQ120cSkzhTap9+7Rzws2r+UMgKC3uTQgY42xRMZXuY++XE5yTTR4m/i/LKiW2zy9RgjiO/zED+ELfsmNLYqqXTNZrzSOZWLq4NxlexHRUuVL8rgzTnrokVZbMJOMBcJptm1/swMSkqokSpEfuQe8YWw6CU61BeV8qz2vMQEC/A7B9RKdPw+DXClF6WKbvDq85hYx0+nLJYkl2PNl71JMliOt/GwyljhvJgpi49a8I21S6ENOr+TeAcHikiBjfExVT6V4Vz/G/DODDkfz0khLhO8Iy35dUyIkSpO407+GO39oklXqcdvlBYZd2U7HY2beq+qel5zQeAGhXlZh6WYZA95bt4p5J5ZAYQVatWjX1mae2H0kq8KzZVd3ZW3eacxksXeTbWn4EOqlsF9eo5N6nO3i3mvp2Ozw9MH/+/LDncOxPYgRxXX9fYoTn0HPxqN4P6C1t7o9CxAXDFh0ghuQLhN28J7EbxWbCTMsyE+n5nBhB6k7zRAZLb4XtBqBJ+GTGOVbFlJ75CBvn1d1m+MHR7vmYO8tWcWb4WlkWv1vzP06E82Vy/TJOoFllu3hlEvkkRhDPaX4K4L7cZr3VQhDdKKziu1WKVHf8BgNKi33P2yPAL9tmScW+5za/D+Z3qcj2hwydK+yi9NhBlFwTI0hfHrOdBGFmPGtVTKV7T+puY5CZlBb7/kUQ4qGyVVLaFe3W/L8TYdsoE6IXdZI8fpsYQRJumJbJOu66+8AUlSYKy13/iBZDutg3NskC4chFlnm9LPGwScSDfxqRdnqX2emxceUGeu3mlSRBngaQ6m1A7SYfu7xin9ylS1fvPLUwNfynUnWj3Z9HW6P7Dg3Ne0QWcyr9gGVBpD/+jLDNqIuvk0abCEHyss1hPLLM7FmVkqUyPzyneT3ASot+AN0g7OIRKnbdWsMlIqEi208yo63New4NnRx7c7xECOINX3E4jMIN/VQAxVyUO224Nb9GBFvFLjMcq2JWVGT7tYOMLHcmHG8pdNyX2Rk/nghB6q5/JjNWthtMP8irLhh6XrOEgJUW/WDQXCGKDRV88rRAOBaP8DYse7BUVcGoHZlECOI6/jICpIeI2gm0Z2QN3kVlM6HjNPYzQNJTgWHeAXh/2y7dLsNgy2ZI6VUIMju9OM7AVZZtHh937IkQxKv514FwZNzB9oI9Ap9UtktK3wye27gdLDnQRHyHsNQOZNWdxlwGRdrG0gvYTh4j3SsS2JOVCEHqjv97Bl7d+6C3n0E7C3qu4zdIsmDIgG8pLhBGWYBsP8Psaqj+vG0ng0QIktffwVuAf1TY5s4qRVBriaTe2sZz/PA18E4qvvtRRvXgWju5x06Q5cv9F7ZGsbGdIPpNVvWTzHX9I0iyYMiEIy2FBcIQw5x/MIHAHyjbpVi7uMROENdtvpVbwTGGYXAQBLHb7wUyFaYWvl4uz5HuZK7X1+7UGm1NetdhYWrh4nJ5zqOyvOv1tTNbo63Y/0mV+c3aeNxvsnI5gbNWVB1PdhHQBMlubXRkGUBAEyQDRdAhZBcBTZDs1kZHlgEENEEyUAQdQnYR0ATJbm10ZBlAQBMkA0XQIWQXAU2Q7NZGR5YBBDRBMlAEHUJ2EdAEyW5tdGQZQEATJANF0CFkFwFNkOzWRkeWAQT+H9OJzVCAQ9C3AAAAAElFTkSuQmCC",width:25,shadowBlur:0,shadowColor:"#000",shadowOffsetX:"1",shadowOffsetY:"1"},left:"25%",top:"40%",position:[20,100]}]},series:[{name:"title",type:"pie",radius:["35%","90%"],center:["30%","50%"],color:[new mh(.3,1,.8,.1,[{offset:0,color:"#09b094"},{offset:1,color:"#015648"}]),new mh(.1,0,.1,1,[{offset:0,color:"#f09913"},{offset:1,color:"#6b4100"}]),new mh(1,.5,0,.7,[{offset:0,color:"#c2352c"},{offset:1,color:"#6f0700"}])],label:{show:!1},labelLine:{normal:{smooth:!0,length:10,lineStyle:{width:1.5}}},itemStyle:{normal:{borderColor:"#2b2a38",borderWidth:3}},data:[{value:20,name:"一级管理"},{value:20,name:"二级管理"},{value:20,name:"三级管理"}]},{type:"pie",radius:["35%","90%"],center:["30%","50%"],z:0,data:[{hoverOffset:1,value:100,itemStyle:{color:"rgba(251, 200, 79, 1)",shadowBlur:20,shadowColor:"#241210"},label:{show:!1},labelLine:{normal:{smooth:!0,lineStyle:{width:0}}},hoverAnimation:!1}]},{type:"pie",radius:["25%","0%"],center:["30%","50%"],z:0,data:[{hoverOffset:1,value:100,itemStyle:{color:"#3d3c4a"},label:{show:!1},labelLine:{normal:{smooth:!0,lineStyle:{width:0}}},hoverAnimation:!1}]}]};t.setOption(e)};return g((function(){})),function(t,a){var s=g3,l=h3,u=R3,c=D3;return v(),_("div",q3,[(v(!0),_(I,null,L(r.value,(function(t,i){return v(),_("div",{class:"cancerNameItem",onClick:function(i){return r=t.name,e.value=r,n.value=!0,void setTimeout((function(){o()}),100);var r},key:i,style:et(t)},P(t.name),13,J3)})),128)),M(c,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=function(t){return n.value=t}),title:e.value+"健康管理","append-to-body":!0,class:"cancer-dialog",width:"500"},{default:D((function(){return[M(l,null,{default:D((function(){return[M(s,{span:14},{default:D((function(){return[x("div",{style:{height:"150px"},ref_key:"cancerRef",ref:i},null,512)]})),_:1}),M(s,{span:10,style:{color:"#fff","line-height":"2","padding-top":"34px"}},{default:D((function(){return[K3,$3]})),_:1})]})),_:1}),x("div",t4,P(e.value)+" 患者规范管理率",1),M(u,{class:"cancer-progress",percentage:83.67,"stroke-width":15,striped:""})]})),_:1},8,["modelValue","title"])])}}}),n4=b(e4,[["__scopeId","data-v-a56edc48"]]),i4={key:1,class:"count-flop-content"},r4={key:0,class:"count-flop-unit"},o4=u({__name:"countFlop",props:{val:{type:Number,default:function(){return 0}},suffix:{type:String,default:function(){return""}}},setup:function(t){var e=t,n=d({value:[0,0,0,0],numberList:[0,1,2,3,4,5,6,7,8,9],compKey:0});S((function(){return e.val}),(function(){i()})),g((function(){i()}));var i=function(){var t=e.val.toString().split("");if(t.length<4)for(var i=t.length;i<4;i++)t.unshift("0");n.value=t};return function(e,i){return v(),_("div",{class:"count-flop",key:n.compKey},[(v(!0),_(I,null,L(n.value,(function(t,e){return v(),_("div",{class:tt("."!=t?"data_cage":"count-flop-point"),key:e},["."!=t?(v(),_("div",{key:0,class:tt(["count-flop-content",["rolling_"+t]])},[(v(!0),_(I,null,L(n.numberList,(function(t,e){return v(),_("div",{key:e,class:"count-flop-num"},P(t),1)})),128))],2)):(v(),_("div",i4,"."))],2)})),128)),t.suffix?(v(),_("div",r4,P(t.suffix),1)):rt("",!0)])}}}),a4=b(o4,[["__scopeId","data-v-3ffbc59f"]]),s4=function(t){return R("data-v-76147bb7"),t=t(),N(),t},l4=s4((function(){return x("div",{class:"videobg style1"},null,-1)})),u4={class:"mainbox",style:{width:"100%",height:"100%"}},c4={class:"head fadeInDown"},h4=s4((function(){return x("h1",null,[x("span",null,"湖口县全民健康大数据平台")],-1)})),d4={class:"timebox"},p4={style:{height:"calc(100vh - 85px)",padding:"15px 15px 15px 15px"}},f4={style:{width:"27%"}},g4=ht('
湖口县概况
  • 总面积

    673平方公里

  • 户籍人口

    28.67万人

  • 常住人口

    22.06万人

  • 邮政编码

    332500

',1),m4={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},v4=s4((function(){return x("div",{class:"tit"},"居民构成",-1)})),y4={class:"boxnav"},_4={class:"box card fadeIn delay06",style:{height:"calc(34%)"}},x4=s4((function(){return x("div",{class:"tit"},"医院就诊监控",-1)})),b4={style:{width:"46%"}},w4={class:"fadeIn delay06",style:{height:"calc(100% - 10px)"}},S4=ht('
',1),A4={class:"maptabs"},T4=[s4((function(){return x("a",{href:"#"},"健康数据",-1)}))],M4=[s4((function(){return x("a",{href:"#"},"人口分布",-1)}))],I4=ht('
  • 13153

    癌症患者管理数
  • 84.8%

    癌症患者就诊率
  • 13

    服务医院(家)
  • 71.15%

    电子健康档案开发率
',2),C4={style:{width:"27%"}},D4={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},E4=s4((function(){return x("div",{class:"tit"},"出生死亡人口监控",-1)})),L4={class:"boxnav",id:"echarts2"},P4={class:"born-box"},R4=s4((function(){return x("span",{class:"p_a01"},"今日出生人口",-1)})),N4=s4((function(){return x("div",{class:"p_a01",style:{"font-size":"12px"}},[ct(" 环比 "),x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAlCAMAAACXrSJOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAArlBMVEUAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAADw1SRkAAAAOHRSTlMAAZkCU10E2OAHZ3EK5usPfIYU8fUakJoh+PsppK4x/Tm5w0NOy9UDV2IF3OIJbHdyiI+WHg7uHM8qnTsAAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAAkElEQVQoz+3PxxrCIBCF0bF3E3s3GnuNWO/7P5mEAAHWLv1392zmGyJZJpsjtzwKLhVLKFccqwKo2VRvcGt6lvmIa5nU7gjr9gzrI2mQ0nAkbTzRNoVqpmgeaMNC2jIlhAmtYLYWz28s2+647WF3IDqeHDtf6Aq3iG6MsbveD74icdnT9tR//O339nqrPvH8ApFsUEzskoNTAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA3LTE4VDAyOjQ3OjI4KzA4OjAw+5YazQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wNy0xOFQwMjo0NzoyOCswODowMIrLonEAAAAASUVORK5CYII=",height:"16",style:{"vertical-align":"sub"},alt:""}),ct(" 3% ")],-1)})),k4={class:"born-box"},O4=s4((function(){return x("span",{class:"p_a01"},"今日死亡人口",-1)})),B4=s4((function(){return x("div",{class:"p_a01",style:{"font-size":"12px"}},[ct(" 环比 "),x("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAoCAMAAAArMzGQAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAolBMVEUAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAB/GCpjAAAANHRSTlMAAhEBHg+HmaWfenljDOnbBHNcCebWA2xWB+LRZlAF3sxfStnGWkTUwFQ+z7lNOMm0R/4y+SiTagAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAACTSURBVCjP7dJHFsIgFIXhi0TR2BJ7j7132f/aRIQn4AKc+I/gG/DgHAAVy9k4bJG05f/2YysIIYpkJbWLUZZhFVRrAdUTIA2soQ5stjxqd15Tup719OT+wKEhe19v5NjYXHmSEU3pE83I5vS2ZGFoiU8rY2vH2EbTFm47bXvP+EHREX4nZefA+EVeEXa7P74MKa2eULpJ3evhxAUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDctMThUMDI6NDc6NDMrMDg6MDA//kewAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA3LTE4VDAyOjQ3OjQzKzA4OjAwTqP/DAAAAABJRU5ErkJggg==",height:"16",style:{"vertical-align":"sub"},alt:""}),ct(" 3% ")],-1)})),z4={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},F4=s4((function(){return x("div",{class:"tit"},"基因健康风险数据",-1)})),V4={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},G4=s4((function(){return x("div",{class:"tit"},"高危疾病排名TOP10",-1)})),U4=u({__name:"home",setup:function(e){var i=c(null),r=c(),o=c({"双钟镇":[116.23,29.7],"流泗镇":[116.36,29.73809724307942],"马影镇":[116.29,29.68],"武山镇":[116.34,29.55],"城山镇":[116.191,29.601],"大垅乡":[116.37,29.69],"凰村镇":[116.308,29.706],"张青乡":[116.33,29.652],"均桥镇":[116.31,29.592],"付垅乡":[116.34,29.61],"舜德乡":[116.19,29.52],"流芳乡":[116.248,29.52]}),a=d({list:[],born:16,die:28,time:"",weekday:"",mapdata1:[{name:"双钟镇",value:150},{name:"流泗镇",value:190},{name:"马影镇",value:120},{name:"武山镇",value:40},{name:"城山镇",value:110},{name:"均桥镇",value:60},{name:"凰村镇",value:70},{name:"大垅乡",value:80},{name:"张青乡",value:50},{name:"付垅乡",value:30},{name:"舜德乡",value:60},{name:"流芳乡",value:90}],mapdata2:[{name:"双钟镇",value:210},{name:"流泗镇",value:190},{name:"马影镇",value:220},{name:"武山镇",value:140},{name:"城山镇",value:110},{name:"均桥镇",value:160},{name:"凰村镇",value:70},{name:"大垅乡",value:180},{name:"张青乡",value:50},{name:"付垅乡",value:130},{name:"舜德乡",value:90},{name:"流芳乡",value:120}]}),s=c(0);function l(){clearTimeout(c);var t=new Date,e=t.getFullYear(),n=t.getMonth()+1,i=t.getDate(),r=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),u=t.getDay(),c=null;function h(t){return t<10?"0"+t:t}a.time=e+"-"+n+"-"+h(i)+" "+h(r)+":"+h(o)+":"+h(s),a.weekday=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"][u],c=setTimeout(l,1e3)}g((function(){h(),i.value=setTimeout(l,1e3),setInterval((function(){a.born++}),2e4),setInterval((function(){a.die++}),21e3)}));var u=function(t){s.value=t,f(0===t?a.mapdata1:a.mapdata2,g1)},h=function(){f(a.mapdata1,g1)},p=function(t){for(var e=[],n=0;n=20&&(a="#3c8fda"),n[s].value>=40&&(a="#397dce"),n[s].value>=60&&(a="#366ec3"),n[s].value>=80&&(a="#335eb8"),n[s].value>=100&&(a="#304ead"),n[s].value>=120&&(a="#2e40a3"),n[s].value>=140&&(a="#2b339a"),o.push({name:n[s].name,height:n[s].value/15,itemStyle:{borderWidth:0,color:a}});return H_("湖口",i),u={tooltip:{},geo3D:{type:"map3D",name:"地图",shading:"realistic",regions:o,zlevel:0,regionHeight:20,map:"湖口",label:{show:!1},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#005eda"},emphasis:{label:{show:!1},itemStyle:{color:"rgb(0, 192, 255)"}},light:{main:{color:"#00d2ff",intensity:1.1,shadow:!0,shadowQuality:"high",alpha:55,beta:30},ambient:{color:"#fff",intensity:.5}},viewControl:l={projection:"perspective",autoRotateDirection:"cw",distance:165,minDistance:40,maxDistance:200,alpha:40,beta:0,center:[-5,-5,0]}},series:[{type:"map3D",name:"模拟数据",shading:"realistic",zlevel:5,regionHeight:5,map:"湖口",label:{show:!0,formatter:function(t){return t.data.value?t.name+":"+t.data.value:t.name+":0"},distance:0,textStyle:{color:"#fff",fontFamily:"苹方",background:"rgba(0,0,0,0.4)",fontSize:14}},itemStyle:{color:"transparent"},emphasis:{label:{show:!0},itemStyle:{color:"transparent"}},viewControl:l,data:n}]},t.t0=u.series,t.next=12,y();case 12:t.t1=t.sent,u.series=t.t0.concat.call(t.t0,t.t1),r.setOption(u),window.addEventListener("resize",(function(){r.resize()}));case 16:case"end":return t.stop()}}),e)}))),m.apply(this,arguments)}var y=function(){var e=n(t().mark((function e(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],[["流泗镇",[[{name:"双钟镇",value:0}],[{name:"流泗镇",value:0}],[{name:"马影镇",value:0}],[{name:"武山镇",value:0}],[{name:"城山镇",value:0}],[{name:"大垅乡",value:0}],[{name:"凰村镇",value:0}],[{name:"张青乡",value:0}],[{name:"均桥镇",value:0}],[{name:"付垅乡",value:0}],[{name:"舜德乡",value:0}],[{name:"流芳乡",value:0}]]]].forEach((function(t,e){n.push({type:"lines3D",coordinateSystem:"geo3D",regionHeight:10,effect:{show:!0,period:2,trailLength:.15,symbol:"arrow",symbolSize:9,color:"#fcdd6e",trailOpacity:1,trailColor:"rgba(255, 255, 255, 0.5)"},lineStyle:{width:1,color:"rgba(118 , 192, 234, 1)",opacity:1,normal:{show:!0,width:1,opacity:1,curveness:.3,color:"#fcdd6e"}},blendMode:"lighter",data:p(t[1])}),n.push({type:"scatter3D",coordinateSystem:"geo3D",zlevel:1,rippleEffect:{period:4,brushType:"stroke",scale:3,color:"#fcdd6e"},label:{normal:{show:!1,position:"right",fontSize:13},emphasis:{show:!1}},showEffectOn:"render",hoverAnimation:!0,symbol:"circle",symbolSize:function(t){return 10},itemStyle:{normal:{show:!1,color:"#fce182"}},data:b(t[1])},{type:"scatter3D",coordinateSystem:"geo3D",zlevel:2,rippleEffect:{period:4,brushType:"stroke",scale:4,color:"#38ff85"},label:{normal:{show:!1,position:"right",color:"#38ff85",formatter:"{b}",textStyle:{color:"#38ff85"}},emphasis:{show:!1,color:"#38ff85"}},symbol:"circle",symbolSize:15,itemStyle:{color:"#38ff85"},data:[{name:t[0],value:[116.36,29.79].concat([10])}]})})),t.abrupt("return",n);case 5:case"end":return t.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(t){for(var e=[],n=0;n