/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};function i(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new n,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:!r.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(r.node=!0,r.svgSupported=!0):function(t,i){var n=i.browser,r=t.match(/Firefox\/([\d.]+)/),s=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),e=t.match(/Edge?\/([\d.]+)/),u=/micromessenger/i.test(t);if(r&&(n.firefox=!0,n.version=r[1]),s&&(n.ie=!0,n.version=s[1]),e&&(n.edge=!0,n.version=e[1],n.newEdge=+e[1].split(".")[0]>18),u&&(n.weChat=!0),i.svgSupported="undefined"!=typeof SVGRect,i.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,i.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),i.domSupported="undefined"!=typeof document){var a=document.documentElement.style;i.transform3dSupported=(n.ie&&"transition"in a||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in a)&&!("OTransition"in a),i.transformSupported=i.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,r);var s,e,u=12,a="12px sans-serif",h=function(t){var i={};if("undefined"==typeof JSON)return i;for(var n=0;n<95;n++){var r=String.fromCharCode(n+32),s=(t.charCodeAt(n)-20)/100;i[r]=s}return i}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),f={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,i){if(!s){var n=f.createCanvas();s=n&&n.getContext("2d")}if(s)return e!==i&&(e=s.font=i||a),s.measureText(t);t=t||"";var r=/((?:\d+)?\.?\d*)px/.exec(i=i||a),u=r&&+r[1]||12,o=0;if(i.indexOf("mono")>=0)o=u*t.length;else for(var c=0;c<t.length;c++){var v=h[t[c]];o+=null==v?u:v*u}return{width:o}},loadImage:function(t,i,n){var r=new Image;return r.onload=i,r.onerror=n,r.src=t,r},getTime:function(){return Date.now?Date.now():+new Date}},o=S(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,i){return t["[object "+i+"]"]=!0,t}),{}),c=S(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,i){return t["[object "+i+"Array]"]=!0,t}),{}),v=Object.prototype.toString,l=Array.prototype,d=l.forEach,b=l.filter,M=l.slice,g=l.map,w=function(){}.constructor,p=w?w.prototype:null,y="__proto__",k=2311,m=Math.pow(2,53)-1;function O(){return k>=m&&(k=0),k++}function F(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];"undefined"!=typeof console&&console.error.apply(console,t)}function x(t){if(null==t||"object"!=typeof t)return t;var i=t,n=v.call(t);if("[object Array]"===n){if(!ht(t)){i=[];for(var r=0,s=t.length;r<s;r++)i[r]=x(t[r])}}else if(c[n]){if(!ht(t)){var e=t.constructor;if(e.from)i=e.from(t);else for(i=new e(t.length),r=0,s=t.length;r<s;r++)i[r]=t[r]}}else if(!o[n]&&!ht(t)&&!G(t))for(var u in i={},t)t.hasOwnProperty(u)&&u!==y&&(i[u]=x(t[u]));return i}function I(t,i,n){if(!Q(i)||!Q(t))return n?x(i):t;for(var r in i)if(i.hasOwnProperty(r)&&r!==y){var s=t[r],e=i[r];!Q(e)||!Q(s)||X(e)||X(s)||G(e)||G(s)||U(e)||U(s)||ht(e)||ht(s)?!n&&r in t||(t[r]=x(i[r])):I(s,e,n)}return t}function L(t,i){if(Object.assign)Object.assign(t,i);else for(var n in i)i.hasOwnProperty(n)&&n!==y&&(t[n]=i[n]);return t}function A(t,i){for(var n=D(i),r=0,s=n.length;r<s;r++){var e=n[r];null==t[e]&&(t[e]=i[e])}return t}function j(t,i){if(t){if(t.indexOf)return t.indexOf(i);for(var n=0,r=t.length;n<r;n++)if(t[n]===i)return n}return-1}function W(t,i){var n=t.prototype;function r(){}for(var s in r.prototype=i.prototype,t.prototype=new r,n)n.hasOwnProperty(s)&&(t.prototype[s]=n[s]);t.prototype.constructor=t,t.superClass=i}function _(t,i){if(t="prototype"in t?t.prototype:t,i="prototype"in i?i.prototype:i,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(i),r=0;r<n.length;r++){var s=n[r];"constructor"!==s&&null==t[s]&&(t[s]=i[s])}else A(t,i)}function C(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function N(t,i,n){if(t&&i)if(t.forEach&&t.forEach===d)t.forEach(i,n);else if(t.length===+t.length)for(var r=0,s=t.length;r<s;r++)i.call(n,t[r],r,t);else for(var e in t)t.hasOwnProperty(e)&&i.call(n,t[e],e,t)}function q(t,i,n){if(!t)return[];if(!i)return nt(t);if(t.map&&t.map===g)return t.map(i,n);for(var r=[],s=0,e=t.length;s<e;s++)r.push(i.call(n,t[s],s,t));return r}function S(t,i,n,r){if(t&&i){for(var s=0,e=t.length;s<e;s++)n=i.call(r,n,t[s],s,t);return n}}function T(t,i,n){if(!t)return[];if(!i)return nt(t);if(t.filter&&t.filter===b)return t.filter(i,n);for(var r=[],s=0,e=t.length;s<e;s++)i.call(n,t[s],s,t)&&r.push(t[s]);return r}function z(t,i,n){if(t&&i)for(var r=0,s=t.length;r<s;r++)if(i.call(n,t[r],r,t))return t[r]}function D(t){if(!t)return[];if(Object.keys)return Object.keys(t);var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push(n);return i}var E=p&&Y(p.bind)?p.call.bind(p.bind):function(t,i){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return t.apply(i,n.concat(M.call(arguments)))}};function B(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(){return t.apply(this,i.concat(M.call(arguments)))}}function X(t){return Array.isArray?Array.isArray(t):"[object Array]"===v.call(t)}function Y(t){return"function"==typeof t}function P(t){return"string"==typeof t}function R(t){return"[object String]"===v.call(t)}function H(t){return"number"==typeof t}function Q(t){var i=typeof t;return"function"===i||!!t&&"object"===i}function U(t){return!!o[v.call(t)]}function V(t){return!!c[v.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function K(t){return null!=t.colorStops}function Z(t){return null!=t.image}function J(t){return t!=t}function $(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var n=0,r=t.length;n<r;n++)if(null!=t[n])return t[n]}function tt(t,i){return null!=t?t:i}function it(t,i,n){return null!=t?t:null!=i?i:n}function nt(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return M.apply(t,i)}function rt(t){if("number"==typeof t)return[t,t,t,t];var i=t.length;return 2===i?[t[0],t[1],t[0],t[1]]:3===i?[t[0],t[1],t[2],t[1]]:t}function st(t,i){if(!t)throw new Error(i)}function et(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ut="__ec_primitive__";function at(t){t[ut]=!0}function ht(t){return t[ut]}var ft=function(){function t(){this.data={}}return t.prototype.delete=function(t){var i=this.has(t);return i&&delete this.data[t],i},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,i){return this.data[t]=i,this},t.prototype.keys=function(){return D(this.data)},t.prototype.forEach=function(t){var i=this.data;for(var n in i)i.hasOwnProperty(n)&&t(i[n],n)},t}(),ot="function"==typeof Map,ct=function(){function t(i){var n=X(i);this.data=ot?new Map:new ft;var r=this;function s(t,i){n?r.set(t,i):r.set(i,t)}i instanceof t?i.each(s):i&&N(i,s)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,i){return this.data.set(t,i),i},t.prototype.each=function(t,i){this.data.forEach((function(n,r){t.call(i,n,r)}))},t.prototype.keys=function(){var t=this.data.keys();return ot?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function vt(t){return new ct(t)}function lt(t,i){for(var n=new t.constructor(t.length+i.length),r=0;r<t.length;r++)n[r]=t[r];var s=t.length;for(r=0;r<i.length;r++)n[r+s]=i[r];return n}function dt(t,i){var n;if(Object.create)n=Object.create(t);else{var r=function(){};r.prototype=t,n=new r}return i&&L(n,i),n}function bt(t){var i=t.style;i.webkitUserSelect="none",i.userSelect="none",i.webkitTapHighlightColor="rgba(0,0,0,0)",i["-webkit-touch-callout"]="none"}function Mt(t,i){return t.hasOwnProperty(i)}function gt(){}var wt=180/Math.PI;function pt(t,i){return null==t&&(t=0),null==i&&(i=0),[t,i]}function yt(t){return[t[0],t[1]]}function kt(t,i,n){return t[0]=i,t[1]=n,t}function mt(t,i,n){return t[0]=i[0]+n[0],t[1]=i[1]+n[1],t}function Ot(t,i,n){return t[0]=i[0]-n[0],t[1]=i[1]-n[1],t}function Ft(t,i,n){return t[0]=i[0]*n,t[1]=i[1]*n,t}function xt(t,i){var n=function(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}(i);return 0===n?(t[0]=0,t[1]=0):(t[0]=i[0]/n,t[1]=i[1]/n),t}function It(t,i){return Math.sqrt((t[0]-i[0])*(t[0]-i[0])+(t[1]-i[1])*(t[1]-i[1]))}var Lt=It,At=function(t,i){return(t[0]-i[0])*(t[0]-i[0])+(t[1]-i[1])*(t[1]-i[1])};function jt(t,i,n,r){return t[0]=i[0]+r*(n[0]-i[0]),t[1]=i[1]+r*(n[1]-i[1]),t}function Wt(t,i,n){var r=i[0],s=i[1];return t[0]=n[0]*r+n[2]*s+n[4],t[1]=n[1]*r+n[3]*s+n[5],t}function _t(t,i,n){return t[0]=Math.min(i[0],n[0]),t[1]=Math.min(i[1],n[1]),t}function Ct(t,i,n){return t[0]=Math.max(i[0],n[0]),t[1]=Math.max(i[1],n[1]),t}var Nt=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,i,n,r){this._$handlers||(this._$handlers={});var s=this._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!t)return this;var e=this._$eventProcessor;null!=i&&e&&e.normalizeQuery&&(i=e.normalizeQuery(i)),s[t]||(s[t]=[]);for(var u=0;u<s[t].length;u++)if(s[t][u].h===n)return this;var a={h:n,query:i,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},h=s[t].length-1,f=s[t][h];return f&&f.callAtLast?s[t].splice(h,0,a):s[t].push(a),this},t.prototype.isSilent=function(t){var i=this._$handlers;return!i||!i[t]||!i[t].length},t.prototype.off=function(t,i){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(i){if(n[t]){for(var r=[],s=0,e=n[t].length;s<e;s++)n[t][s].h!==i&&r.push(n[t][s]);n[t]=r}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],s=this._$eventProcessor;if(r)for(var e=i.length,u=r.length,a=0;a<u;a++){var h=r[a];if(!s||!s.filter||null==h.query||s.filter(t,h.query))switch(e){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,i[0]);break;case 2:h.h.call(h.ctx,i[0],i[1]);break;default:h.h.apply(h.ctx,i)}}return s&&s.afterTrigger&&s.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],s=this._$eventProcessor;if(r)for(var e=i.length,u=i[e-1],a=r.length,h=0;h<a;h++){var f=r[h];if(!s||!s.filter||null==f.query||s.filter(t,f.query))switch(e){case 0:f.h.call(u);break;case 1:f.h.call(u,i[0]);break;case 2:f.h.call(u,i[0],i[1]);break;default:f.h.apply(u,i.slice(1,e-1))}}return s&&s.afterTrigger&&s.afterTrigger(t),this},t}();function qt(){return[1,0,0,1,0,0]}function St(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Tt(t,i){return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t}function zt(t,i,n){var r=i[1]*n[0]+i[3]*n[1],s=i[0]*n[2]+i[2]*n[3],e=i[1]*n[2]+i[3]*n[3],u=i[0]*n[4]+i[2]*n[5]+i[4],a=i[1]*n[4]+i[3]*n[5]+i[5];return t[0]=i[0]*n[0]+i[2]*n[1],t[1]=r,t[2]=s,t[3]=e,t[4]=u,t[5]=a,t}function Dt(t,i,n){return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4]+n[0],t[5]=i[5]+n[1],t}function Et(t,i,n,r){void 0===r&&(r=[0,0]);var s=i[0],e=i[2],u=i[4],a=i[1],h=i[3],f=i[5],o=Math.sin(n),c=Math.cos(n);return t[0]=s*c+a*o,t[1]=-s*o+a*c,t[2]=e*c+h*o,t[3]=-e*o+c*h,t[4]=c*(u-r[0])+o*(f-r[1])+r[0],t[5]=c*(f-r[1])-o*(u-r[0])+r[1],t}function Bt(t,i){var n=i[0],r=i[2],s=i[4],e=i[1],u=i[3],a=i[5],h=n*u-e*r;return h?(t[0]=u*(h=1/h),t[1]=-e*h,t[2]=-r*h,t[3]=n*h,t[4]=(r*a-u*s)*h,t[5]=(e*s-n*a)*h,t):null}var Xt=function(){function t(t,i){this.x=t||0,this.y=i||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,i){return this.x=t,this.y=i,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,i){this.x+=t.x*i,this.y+=t.y*i},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 i=this.x-t.x,n=this.y-t.y;return Math.sqrt(i*i+n*n)},t.prototype.distanceSquare=function(t){var i=this.x-t.x,n=this.y-t.y;return i*i+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var i=this.x,n=this.y;return this.x=t[0]*i+t[2]*n+t[4],this.y=t[1]*i+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,i,n){t.x=i,t.y=n},t.copy=function(t,i){t.x=i.x,t.y=i.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,i){return t.x*i.x+t.y*i.y},t.add=function(t,i,n){t.x=i.x+n.x,t.y=i.y+n.y},t.sub=function(t,i,n){t.x=i.x-n.x,t.y=i.y-n.y},t.scale=function(t,i,n){t.x=i.x*n,t.y=i.y*n},t.scaleAndAdd=function(t,i,n,r){t.x=i.x+n.x*r,t.y=i.y+n.y*r},t.lerp=function(t,i,n,r){var s=1-r;t.x=s*i.x+r*n.x,t.y=s*i.y+r*n.y},t}(),Yt=Math.min,Pt=Math.max,Rt=Math.abs,Ht=["x","y"],Qt=["width","height"],Ut=new Xt,Vt=new Xt,Gt=new Xt,Kt=new Xt,Zt=fi(),Jt=Zt.minTv,$t=Zt.maxTv,ti=[0,0],ii=function(){function t(t,i,n,r){ni(this,t,i,n,r)}return t.set=function(t,i,n,r,s){return r<0&&(i+=r,r=-r),s<0&&(n+=s,s=-s),t.x=i,t.y=n,t.width=r,t.height=s,t},t.prototype.union=function(t){var i=Yt(t.x,this.x),n=Yt(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Pt(t.x+t.width,this.x+this.width)-i:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?Pt(t.y+t.height,this.y+this.height)-n:t.height,this.x=i,this.y=n},t.prototype.applyTransform=function(i){t.applyTransform(this,this,i)},t.prototype.calculateTransform=function(t){return si([1,0,0,1,0,0],this,t)},t.prototype.intersect=function(i,n,r){return t.intersect(this,i,n,r)},t.intersect=function(i,n,r,s){r&&Xt.set(r,0,0);var e=s&&s.outIntersectRect||null,u=s&&s.clamp;if(e&&(e.x=e.y=e.width=e.height=NaN),!i||!n)return!1;i instanceof t||(i=ni(ei,i.x,i.y,i.width,i.height)),n instanceof t||(n=ni(ui,n.x,n.y,n.width,n.height));var a=!!r;Zt.reset(s,a);var h=Zt.touchThreshold,f=i.x+h,o=i.x+i.width-h,c=i.y+h,v=i.y+i.height-h,l=n.x+h,d=n.x+n.width-h,b=n.y+h,M=n.y+n.height-h;if(f>o||c>v||l>d||b>M)return!1;var g=!(o<l||d<f||v<b||M<c);return(a||e)&&(ti[0]=1/0,ti[1]=0,hi(f,o,l,d,0,a,e,u),hi(c,v,b,M,1,a,e,u),a&&Xt.copy(r,g?Zt.useDir?Zt.dirMinTv:Jt:$t)),g},t.contain=function(t,i,n){return i>=t.x&&i<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},t.prototype.contain=function(i,n){return t.contain(this,i,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){ri(this,t)},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(i){return new t(i?i.x:0,i?i.y:0,i?i.width:0,i?i.height:0)},t.copy=function(t,i){return t.x=i.x,t.y=i.y,t.width=i.width,t.height=i.height,t},t.applyTransform=function(t,i,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],s=n[3],e=n[5];return t.x=i.x*r+n[4],t.y=i.y*s+e,t.width=i.width*r,t.height=i.height*s,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Ut.x=Gt.x=i.x,Ut.y=Kt.y=i.y,Vt.x=Kt.x=i.x+i.width,Vt.y=Gt.y=i.y+i.height,Ut.transform(n),Kt.transform(n),Vt.transform(n),Gt.transform(n),t.x=Yt(Ut.x,Vt.x,Gt.x,Kt.x),t.y=Yt(Ut.y,Vt.y,Gt.y,Kt.y);var u=Pt(Ut.x,Vt.x,Gt.x,Kt.x),a=Pt(Ut.y,Vt.y,Gt.y,Kt.y);t.width=u-t.x,t.height=a-t.y}else t!==i&&ri(t,i)},t.calculateTransform=function(t,i,n){var r=n.width/i.width,s=n.height/i.height;return Dt(t=St(t||[]),t,kt(ai,-i.x,-i.y)),function(t,i,n){var r=n[0],s=n[1];t[0]=i[0]*r,t[1]=i[1]*s,t[2]=i[2]*r,t[3]=i[3]*s,t[4]=i[4]*r,t[5]=i[5]*s}(t,t,kt(ai,r,s)),Dt(t,t,kt(ai,n.x,n.y)),t},t}(),ni=ii.set,ri=ii.copy,si=ii.calculateTransform,ei=new ii(0,0,0,0),ui=new ii(0,0,0,0),ai=[];function hi(t,i,n,r,s,e,u,a){var h=Rt(i-n),f=Rt(r-t),o=Yt(h,f),c=Ht[s],v=Ht[1-s],l=Qt[s];i<n||r<t?h<f?(e&&($t[c]=-h),a&&(u[c]=i,u[l]=0)):(e&&($t[c]=f),a&&(u[c]=t,u[l]=0)):(u&&(u[c]=Pt(t,n),u[l]=Yt(i,r)-u[c]),e&&(o<ti[0]||Zt.useDir)&&(ti[0]=Yt(o,ti[0]),(h<f||!Zt.bidirectional)&&(Jt[c]=h,Jt[v]=0,Zt.useDir&&Zt.calcDirMTV()),(h>=f||!Zt.bidirectional)&&(Jt[c]=-f,Jt[v]=0,Zt.useDir&&Zt.calcDirMTV())))}function fi(){var t=0,i=new Xt,n=new Xt,r={minTv:new Xt,maxTv:new Xt,useDir:!1,dirMinTv:new Xt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(s,e){r.touchThreshold=0,s&&null!=s.touchThreshold&&(r.touchThreshold=Pt(0,s.touchThreshold)),r.negativeSize=!1,e&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,s&&null!=s.direction&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),t=s.direction,r.bidirectional=null==s.bidirectional||!!s.bidirectional,r.bidirectional||i.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var e=r.minTv,u=r.dirMinTv,a=e.y*e.y+e.x*e.x,h=Math.sin(t),f=Math.cos(t),o=h*e.y+f*e.x;s(o)?s(e.x)&&s(e.y)&&u.set(0,0):(n.x=a*f/o,n.y=a*h/o,s(n.x)&&s(n.y)?u.set(0,0):(r.bidirectional||i.dot(n)>0)&&n.len()<u.len()&&u.copy(n))}};function s(t){return Rt(t)<1e-10}return r}var oi=1,ci=4,vi={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 i,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,i=.1):i=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/.4))},elasticOut:function(t){var i,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,i=.1):i=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var i,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,i=.1):i=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var i=1.70158;return t*t*((i+1)*t-i)},backOut:function(t){var i=1.70158;return--t*t*((i+1)*t+i)+1},backInOut:function(t){var i=2.5949095;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)},bounceIn:function(t){return 1-vi.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*vi.bounceIn(2*t):.5*vi.bounceOut(2*t-1)+.5}},li=Math.pow,di=Math.sqrt,bi=1e-4,Mi=di(3),gi=1/3,wi=pt(),pi=pt(),yi=pt();function ki(t){return t>-1e-8&&t<1e-8}function mi(t){return t>1e-8||t<-1e-8}function Oi(t,i,n,r,s){var e=1-s;return e*e*(e*t+3*s*i)+s*s*(s*r+3*e*n)}function Fi(t,i,n,r,s){var e=1-s;return 3*(((i-t)*e+2*(n-i)*s)*e+(r-n)*s*s)}function xi(t,i,n,r,s,e){var u=r+3*(i-n)-t,a=3*(n-2*i+t),h=3*(i-t),f=t-s,o=a*a-3*u*h,c=a*h-9*u*f,v=h*h-3*a*f,l=0;if(ki(o)&&ki(c))ki(a)?e[0]=0:(F=-h/a)>=0&&F<=1&&(e[l++]=F);else{var d=c*c-4*o*v;if(ki(d)){var b=c/o,M=-b/2;(F=-a/u+b)>=0&&F<=1&&(e[l++]=F),M>=0&&M<=1&&(e[l++]=M)}else if(d>0){var g=di(d),w=o*a+1.5*u*(-c+g),p=o*a+1.5*u*(-c-g);(F=(-a-((w=w<0?-li(-w,gi):li(w,gi))+(p=p<0?-li(-p,gi):li(p,gi))))/(3*u))>=0&&F<=1&&(e[l++]=F)}else{var y=(2*o*a-3*u*c)/(2*di(o*o*o)),k=Math.acos(y)/3,m=di(o),O=Math.cos(k),F=(-a-2*m*O)/(3*u),x=(M=(-a+m*(O+Mi*Math.sin(k)))/(3*u),(-a+m*(O-Mi*Math.sin(k)))/(3*u));F>=0&&F<=1&&(e[l++]=F),M>=0&&M<=1&&(e[l++]=M),x>=0&&x<=1&&(e[l++]=x)}}return l}function Ii(t,i,n,r,s){var e=6*n-12*i+6*t,u=9*i+3*r-3*t-9*n,a=3*i-3*t,h=0;if(ki(u))mi(e)&&(o=-a/e)>=0&&o<=1&&(s[h++]=o);else{var f=e*e-4*u*a;if(ki(f))s[0]=-e/(2*u);else if(f>0){var o,c=di(f),v=(-e-c)/(2*u);(o=(-e+c)/(2*u))>=0&&o<=1&&(s[h++]=o),v>=0&&v<=1&&(s[h++]=v)}}return h}function Li(t,i,n,r,s,e){var u=(i-t)*s+t,a=(n-i)*s+i,h=(r-n)*s+n,f=(a-u)*s+u,o=(h-a)*s+a,c=(o-f)*s+f;e[0]=t,e[1]=u,e[2]=f,e[3]=c,e[4]=c,e[5]=o,e[6]=h,e[7]=r}function Ai(t,i,n,r,s,e,u,a,h){for(var f=t,o=i,c=0,v=1/h,l=1;l<=h;l++){var d=l*v,b=Oi(t,n,s,u,d),M=Oi(i,r,e,a,d),g=b-f,w=M-o;c+=Math.sqrt(g*g+w*w),f=b,o=M}return c}function ji(t,i,n,r){var s=1-r;return s*(s*t+2*r*i)+r*r*n}function Wi(t,i,n,r){return 2*((1-r)*(i-t)+r*(n-i))}function _i(t,i,n){var r=t+n-2*i;return 0===r?.5:(t-i)/r}function Ci(t,i,n,r,s){var e=(i-t)*r+t,u=(n-i)*r+i,a=(u-e)*r+e;s[0]=t,s[1]=e,s[2]=a,s[3]=a,s[4]=u,s[5]=n}function Ni(t,i,n,r,s,e,u){for(var a=t,h=i,f=0,o=1/u,c=1;c<=u;c++){var v=c*o,l=ji(t,n,s,v),d=ji(i,r,e,v),b=l-a,M=d-h;f+=Math.sqrt(b*b+M*M),a=l,h=d}return f}var qi=/cubic-bezier\(([0-9,\.e ]+)\)/;function Si(t){var i=t&&qi.exec(t);if(i){var n=i[1].split(","),r=+et(n[0]),s=+et(n[1]),e=+et(n[2]),u=+et(n[3]);if(isNaN(r+s+e+u))return;var a=[];return function(t){return t<=0?0:t>=1?1:xi(0,r,e,1,t,a)&&Oi(0,s,u,1,a[0])}}}var Ti=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||gt,this.ondestroy=t.ondestroy||gt,this.onrestart=t.onrestart||gt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,i){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,s=r/n;s<0&&(s=0),s=Math.min(s,1);var e=this.easingFunc,u=e?e(s):s;if(this.onframe(u),1===s){if(!this.loop)return!0;this._startTime=t-r%n,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=i},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Y(t)?t:vi[t]||Si(t)},t}(),zi=function(t){this.value=t},Di=function(){function t(){this._len=0}return t.prototype.insert=function(t){var i=new zi(t);return this.insertEntry(i),i},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 i=t.prev,n=t.next;i?i.next=n:this.head=n,n?n.prev=i:this.tail=i,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}(),Ei=function(){function t(t){this._list=new Di,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,i){var n=this._list,r=this._map,s=null;if(null==r[t]){var e=n.len(),u=this._lastRemovedEntry;if(e>=this._maxSize&&e>0){var a=n.head;n.remove(a),delete r[a.key],s=a.value,this._lastRemovedEntry=a}u?u.value=i:u=new zi(i),u.key=t,n.insertEntry(u),r[t]=u}return s},t.prototype.get=function(t){var i=this._map[t],n=this._list;if(null!=i)return i!==n.tail&&(n.remove(i),n.insertEntry(i)),i.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Bi={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 Xi(t){return(t=Math.round(t))<0?0:t>255?255:t}function Yi(t){return t<0?0:t>1?1:t}function Pi(t){var i=t;return i.length&&"%"===i.charAt(i.length-1)?Xi(parseFloat(i)/100*255):Xi(parseInt(i,10))}function Ri(t){var i=t;return i.length&&"%"===i.charAt(i.length-1)?Yi(parseFloat(i)/100):Yi(parseFloat(i))}function Hi(t,i,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(i-t)*n*6:2*n<1?i:3*n<2?t+(i-t)*(2/3-n)*6:t}function Qi(t,i,n){return t+(i-t)*n}function Ui(t,i,n,r,s){return t[0]=i,t[1]=n,t[2]=r,t[3]=s,t}function Vi(t,i){return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t}var Gi=new Ei(20),Ki=null;function Zi(t,i){Ki&&Vi(Ki,i),Ki=Gi.put(t,Ki||i.slice())}function Ji(t,i){if(t){i=i||[];var n=Gi.get(t);if(n)return Vi(i,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Bi)return Vi(i,Bi[r]),Zi(t,i),i;var s,e=r.length;if("#"===r.charAt(0))return 4===e||5===e?(s=parseInt(r.slice(1,4),16))>=0&&s<=4095?(Ui(i,(3840&s)>>4|(3840&s)>>8,240&s|(240&s)>>4,15&s|(15&s)<<4,5===e?parseInt(r.slice(4),16)/15:1),Zi(t,i),i):void Ui(i,0,0,0,1):7===e||9===e?(s=parseInt(r.slice(1,7),16))>=0&&s<=16777215?(Ui(i,(16711680&s)>>16,(65280&s)>>8,255&s,9===e?parseInt(r.slice(7),16)/255:1),Zi(t,i),i):void Ui(i,0,0,0,1):void 0;var u=r.indexOf("("),a=r.indexOf(")");if(-1!==u&&a+1===e){var h=r.substr(0,u),f=r.substr(u+1,a-(u+1)).split(","),o=1;switch(h){case"rgba":if(4!==f.length)return 3===f.length?Ui(i,+f[0],+f[1],+f[2],1):Ui(i,0,0,0,1);o=Ri(f.pop());case"rgb":return f.length>=3?(Ui(i,Pi(f[0]),Pi(f[1]),Pi(f[2]),3===f.length?o:Ri(f[3])),Zi(t,i),i):void Ui(i,0,0,0,1);case"hsla":return 4!==f.length?void Ui(i,0,0,0,1):(f[3]=Ri(f[3]),$i(f,i),Zi(t,i),i);case"hsl":return 3!==f.length?void Ui(i,0,0,0,1):($i(f,i),Zi(t,i),i);default:return}}Ui(i,0,0,0,1)}}function $i(t,i){var n=(parseFloat(t[0])%360+360)%360/360,r=Ri(t[1]),s=Ri(t[2]),e=s<=.5?s*(r+1):s+r-s*r,u=2*s-e;return Ui(i=i||[],Xi(255*Hi(u,e,n+1/3)),Xi(255*Hi(u,e,n)),Xi(255*Hi(u,e,n-1/3)),1),4===t.length&&(i[3]=t[3]),i}function tn(t,i){var n=Ji(t);if(n){for(var r=0;r<3;r++)n[r]=n[r]*(1-i)|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return sn(n,4===n.length?"rgba":"rgb")}}function nn(t,i,n){if(i&&i.length&&t>=0&&t<=1){var r=t*(i.length-1),s=Math.floor(r),e=Math.ceil(r),u=Ji(i[s]),a=Ji(i[e]),h=r-s,f=sn([Xi(Qi(u[0],a[0],h)),Xi(Qi(u[1],a[1],h)),Xi(Qi(u[2],a[2],h)),Yi(Qi(u[3],a[3],h))],"rgba");return n?{color:f,leftIndex:s,rightIndex:e,value:r}:f}}function rn(t,i,n,r){var s=Ji(t);if(t)return s=function(t){if(t){var i,n,r=t[0]/255,s=t[1]/255,e=t[2]/255,u=Math.min(r,s,e),a=Math.max(r,s,e),h=a-u,f=(a+u)/2;if(0===h)i=0,n=0;else{n=f<.5?h/(a+u):h/(2-a-u);var o=((a-r)/6+h/2)/h,c=((a-s)/6+h/2)/h,v=((a-e)/6+h/2)/h;r===a?i=v-c:s===a?i=1/3+o-v:e===a&&(i=2/3+c-o),i<0&&(i+=1),i>1&&(i-=1)}var l=[360*i,n,f];return null!=t[3]&&l.push(t[3]),l}}(s),null!=n&&(s[1]=Ri(Y(n)?n(s[1]):n)),null!=r&&(s[2]=Ri(Y(r)?r(s[2]):r)),sn($i(s),"rgba")}function sn(t,i){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==i&&"hsva"!==i&&"hsla"!==i||(n+=","+t[3]),i+"("+n+")"}}function en(t,i){var n=Ji(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*i:0}var un=new Ei(100);function an(t){if(P(t)){var i=un.get(t);return i||(i=tn(t,-.1),un.put(t,i)),i}if(K(t)){var n=L({},t);return n.colorStops=q(t.colorStops,(function(t){return{offset:t.offset,color:tn(t.color,-.1)}})),n}return t}"undefined"!=typeof Buffer&&Buffer;var hn=Array.prototype.slice;function fn(t,i,n){return(i-t)*n+t}function on(t,i,n,r){for(var s=i.length,e=0;e<s;e++)t[e]=fn(i[e],n[e],r);return t}function cn(t,i,n,r){for(var s=i.length,e=0;e<s;e++)t[e]=i[e]+n[e]*r;return t}function vn(t,i,n,r){for(var s=i.length,e=s&&i[0].length,u=0;u<s;u++){t[u]||(t[u]=[]);for(var a=0;a<e;a++)t[u][a]=i[u][a]+n[u][a]*r}return t}function ln(t,i){for(var n=t.length,r=i.length,s=n>r?i:t,e=Math.min(n,r),u=s[e-1]||{color:[0,0,0,0],offset:0},a=e;a<Math.max(n,r);a++)s.push({offset:u.offset,color:u.color.slice()})}function dn(t,i,n){var r=t,s=i;if(r.push&&s.push){var e=r.length,u=s.length;if(e!==u)if(e>u)r.length=u;else for(var a=e;a<u;a++)r.push(1===n?s[a]:hn.call(s[a]));var h=r[0]&&r[0].length;for(a=0;a<r.length;a++)if(1===n)isNaN(r[a])&&(r[a]=s[a]);else for(var f=0;f<h;f++)isNaN(r[a][f])&&(r[a][f]=s[a][f])}}function bn(t){if(C(t)){var i=t.length;if(C(t[0])){for(var n=[],r=0;r<i;r++)n.push(hn.call(t[r]));return n}return hn.call(t)}return t}function Mn(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function gn(t){return 4===t||5===t}function wn(t){return 1===t||2===t}var pn=[0,0,0,0],yn=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,i,n){this._needsSort=!0;var r=this.keyframes,s=r.length,e=!1,u=6,a=i;if(C(i)){var h=function(t){return C(t&&t[0])?2:1}(i);u=h,(1===h&&!H(i[0])||2===h&&!H(i[0][0]))&&(e=!0)}else if(H(i)&&!J(i))u=0;else if(P(i))if(isNaN(+i)){var f=Ji(i);f&&(a=f,u=3)}else u=0;else if(K(i)){var o=L({},a);o.colorStops=q(i.colorStops,(function(t){return{offset:t.offset,color:Ji(t.color)}})),"linear"===i.type?u=4:"radial"===i.type&&(u=5),a=o}0===s?this.valType=u:u===this.valType&&6!==u||(e=!0),this.discrete=this.discrete||e;var c={time:t,value:a,rawValue:i,percent:0};return n&&(c.easing=n,c.easingFunc=Y(n)?n:vi[n]||Si(n)),r.push(c),c},t.prototype.prepare=function(t,i){var n=this.keyframes;this._needsSort&&n.sort((function(t,i){return t.time-i.time}));for(var r=this.valType,s=n.length,e=n[s-1],u=this.discrete,a=wn(r),h=gn(r),f=0;f<s;f++){var o=n[f],c=o.value,v=e.value;o.percent=o.time/t,u||(a&&f!==s-1?dn(c,v,r):h&&ln(c.colorStops,v.colorStops))}if(!u&&5!==r&&i&&this.needsAnimate()&&i.needsAnimate()&&r===i.valType&&!i._finished){this._additiveTrack=i;var l=n[0].value;for(f=0;f<s;f++)0===r?n[f].additiveValue=n[f].value-l:3===r?n[f].additiveValue=cn([],n[f].value,l,-1):wn(r)&&(n[f].additiveValue=1===r?cn([],n[f].value,l,-1):vn([],n[f].value,l,-1))}},t.prototype.step=function(t,i){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,s,e=null!=this._additiveTrack,u=e?"additiveValue":"value",a=this.valType,h=this.keyframes,f=h.length,o=this.propName,c=3===a,v=this._lastFr,l=Math.min;if(1===f)r=s=h[0];else{if(i<0)n=0;else if(i<this._lastFrP){for(n=l(v+1,f-1);n>=0&&!(h[n].percent<=i);n--);n=l(n,f-2)}else{for(n=v;n<f&&!(h[n].percent>i);n++);n=l(n-1,f-2)}s=h[n+1],r=h[n]}if(r&&s){this._lastFr=n,this._lastFrP=i;var d=s.percent-r.percent,b=0===d?1:l((i-r.percent)/d,1);s.easingFunc&&(b=s.easingFunc(b));var M=e?this._additiveValue:c?pn:t[o];if(!wn(a)&&!c||M||(M=this._additiveValue=[]),this.discrete)t[o]=b<1?r.rawValue:s.rawValue;else if(wn(a))1===a?on(M,r[u],s[u],b):function(t,i,n,r){for(var s=i.length,e=s&&i[0].length,u=0;u<s;u++){t[u]||(t[u]=[]);for(var a=0;a<e;a++)t[u][a]=fn(i[u][a],n[u][a],r)}}(M,r[u],s[u],b);else if(gn(a)){var g=r[u],w=s[u],p=4===a;t[o]={type:p?"linear":"radial",x:fn(g.x,w.x,b),y:fn(g.y,w.y,b),colorStops:q(g.colorStops,(function(t,i){var n=w.colorStops[i];return{offset:fn(t.offset,n.offset,b),color:Mn(on([],t.color,n.color,b))}})),global:w.global},p?(t[o].x2=fn(g.x2,w.x2,b),t[o].y2=fn(g.y2,w.y2,b)):t[o].r=fn(g.r,w.r,b)}else if(c)on(M,r[u],s[u],b),e||(t[o]=Mn(M));else{var y=fn(r[u],s[u],b);e?this._additiveValue=y:t[o]=y}e&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var i=this.valType,n=this.propName,r=this._additiveValue;0===i?t[n]=t[n]+r:3===i?(Ji(t[n],pn),cn(pn,pn,r,1),t[n]=Mn(pn)):1===i?cn(t[n],t[n],r,1):2===i&&vn(t[n],t[n],r,1)},t}(),kn=function(){function t(t,i,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=i,i&&r?F("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,i,n){return this.whenWithKeys(t,i,D(i),n)},t.prototype.whenWithKeys=function(t,i,n,r){for(var s=this._tracks,e=0;e<n.length;e++){var u=n[e],a=s[u];if(!a){a=s[u]=new yn(u);var h=void 0,f=this._getAdditiveTrack(u);if(f){var o=f.keyframes,c=o[o.length-1];h=c&&c.value,3===f.valType&&h&&(h=Mn(h))}else h=this._target[u];if(null==h)continue;t>0&&a.addKeyframe(0,bn(h),r),this._trackKeys.push(u)}a.addKeyframe(t,bn(i[u]),r)}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 i=t.length,n=0;n<i;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,i=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,i)for(var n=0;n<i.length;n++)i[n].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,i=this._trackKeys,n=0;n<i.length;n++)t[i[n]].setFinished()},t.prototype._getAdditiveTrack=function(t){var i,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var s=n[r].getTrack(t);s&&(i=s)}return i},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var i=this,n=[],r=this._maxTime||0,s=0;s<this._trackKeys.length;s++){var e=this._trackKeys[s],u=this._tracks[e],a=this._getAdditiveTrack(e),h=u.keyframes,f=h.length;if(u.prepare(r,a),u.needsAnimate())if(!this._allowDiscrete&&u.discrete){var o=h[f-1];o&&(i._target[u.propName]=o.rawValue),u.setFinished()}else n.push(u)}if(n.length||this._force){var c=new Ti({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){i._started=2;var r=i._additiveAnimators;if(r){for(var s=!1,e=0;e<r.length;e++)if(r[e]._clip){s=!0;break}s||(i._additiveAnimators=null)}for(e=0;e<n.length;e++)n[e].step(i._target,t);var u=i._onframeCbs;if(u)for(e=0;e<u.length;e++)u[e](i._target,t)},ondestroy:function(){i._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){this._clip&&(t&&this._clip.onframe(1),this._abortedCallback())},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return q(this._trackKeys,(function(i){return t._tracks[i]}))},t.prototype.stopTracks=function(t,i){if(!t.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,s=0;s<t.length;s++){var e=n[t[s]];e&&!e.isFinished()&&(i?e.step(this._target,1):1===this._started&&e.step(this._target,0),e.setFinished())}var u=!0;for(s=0;s<r.length;s++)if(!n[r[s]].isFinished()){u=!1;break}return u&&this._abortedCallback(),u},t.prototype.saveTo=function(t,i,n){if(t){i=i||this._trackKeys;for(var r=0;r<i.length;r++){var s=i[r],e=this._tracks[s];if(e&&!e.isFinished()){var u=e.keyframes,a=u[n?0:u.length-1];a&&(t[s]=bn(a.rawValue))}}}},t.prototype.__changeFinalValue=function(t,i){i=i||D(t);for(var n=0;n<i.length;n++){var r=i[n],s=this._tracks[r];if(s){var e=s.keyframes;if(e.length>1){var u=e.pop();s.addKeyframe(u.time,t[r]),s.prepare(this._maxTime,s.getAdditiveTrack())}}}},t}(),mn=1;r.hasGlobalWindow&&(mn=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var On=mn,Fn=.4,xn="#333",In="#ccc",Ln=St;function An(t){return t>5e-5||t<-5e-5}var jn,Wn=[],_n=[],Cn=[1,0,0,1,0,0],Nn=Math.abs,qn=function(){function t(){}var i;return t.prototype.getLocalTransform=function(t){return Sn(this,t)},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 An(this.rotation)||An(this.x)||An(this.y)||An(this.scaleX-1)||An(this.scaleY-1)||An(this.skewX)||An(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,i=this.needLocalTransform(),n=this.transform;i||t?(n=n||[1,0,0,1,0,0],i?this.getLocalTransform(n):Ln(n),t&&(i?zt(n,t,n):Tt(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||[1,0,0,1,0,0],Bt(this.invTransform,n)):n&&(Ln(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var i=this.globalScaleRatio;if(null!=i&&1!==i){this.getGlobalScale(Wn);var n=Wn[0]<0?-1:1,r=Wn[1]<0?-1:1,s=((Wn[0]-n)*i+n)/Wn[0]||0,e=((Wn[1]-r)*i+r)/Wn[1]||0;t[0]*=s,t[1]*=s,t[2]*=e,t[3]*=e}},t.prototype.getComputedTransform=function(){for(var t=this,i=[];t;)i.push(t),t=t.parent;for(;t=i.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var i=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),s=Math.PI/2+r-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(s),i=Math.sqrt(i),this.skewX=s,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=i,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,i=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],zt(_n,t.invTransform,i),i=_n);var n=this.originX,r=this.originY;(n||r)&&(Cn[4]=n,Cn[5]=r,zt(_n,i,Cn),_n[4]-=n,_n[5]-=r,i=_n),this.setLocalTransform(i)}},t.prototype.getGlobalScale=function(t){var i=this.transform;return t=t||[],i?(t[0]=Math.sqrt(i[0]*i[0]+i[1]*i[1]),t[1]=Math.sqrt(i[2]*i[2]+i[3]*i[3]),i[0]<0&&(t[0]=-t[0]),i[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,i){var n=[t,i],r=this.invTransform;return r&&Wt(n,n,r),n},t.prototype.transformCoordToGlobal=function(t,i){var n=[t,i],r=this.transform;return r&&Wt(n,n,r),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Nn(t[0]-1)>1e-10&&Nn(t[3]-1)>1e-10?Math.sqrt(Nn(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){zn(this,t)},t.getLocalTransform=function(t,i){i=i||[];var n=t.originX||0,r=t.originY||0,s=t.scaleX,e=t.scaleY,u=t.anchorX,a=t.anchorY,h=t.rotation||0,f=t.x,o=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||r||u||a){var l=n+u,d=r+a;i[4]=-l*s-c*d*e,i[5]=-d*e-v*l*s}else i[4]=i[5]=0;return i[0]=s,i[3]=e,i[1]=v*s,i[2]=c*e,h&&Et(i,i,h),i[4]+=n+f,i[5]+=r+o,i},t.initDefaultProps=((i=t.prototype).scaleX=i.scaleY=i.globalScaleRatio=1,void(i.x=i.y=i.originX=i.originY=i.skewX=i.skewY=i.rotation=i.anchorX=i.anchorY=0)),t}(),Sn=qn.getLocalTransform,Tn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function zn(t,i){return function(t,i,n){t=t||{};for(var r=0;r<n.length;r++){var s=n[r];t[s]=i[s]}return t}(t,i,Tn)}function Dn(t){jn||(jn=new Ei(100));var i=jn.get(t=t||a);return i||(i={font:t,strWidthCache:new Ei(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:f.measureText("国",t).width,asciiCharWidth:f.measureText("a",t).width},jn.put(t,i)),i}var En=0;function Bn(t,i){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(En>=5)){t=t||a;for(var i=[],n=+new Date,r=0;r<=127;r++)i[r]=f.measureText(String.fromCharCode(r),t).width;var s=+new Date-n;return s>16?En=5:s>2&&En++,i}}(t.font),t.asciiWidthMapTried=!0),0<=i&&i<=127?null!=t.asciiWidthMap?t.asciiWidthMap[i]:t.asciiCharWidth:t.stWideCharWidth}function Xn(t,i){var n=t.strWidthCache,r=n.get(i);return null==r&&(r=f.measureText(i,t.font).width,n.put(i,r)),r}function Yn(t,i,n,r){var s=Xn(Dn(i),t),e=Qn(i),u=Rn(0,s,n),a=Hn(0,e,r);return new ii(u,a,s,e)}function Pn(t,i,n,r){var s=((t||"")+"").split("\n");if(1===s.length)return Yn(s[0],i,n,r);for(var e=new ii(0,0,0,0),u=0;u<s.length;u++){var a=Yn(s[u],i,n,r);0===u?e.copy(a):e.union(a)}return e}function Rn(t,i,n,r){return"right"===n?r?t+=i:t-=i:"center"===n&&(r?t+=i/2:t-=i/2),t}function Hn(t,i,n,r){return"middle"===n?r?t+=i/2:t-=i/2:"bottom"===n&&(r?t+=i:t-=i),t}function Qn(t){return Dn(t).stWideCharWidth}function Un(t,i){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*i:parseFloat(t):t}function Vn(t,i,n){var r=i.position||"inside",s=null!=i.distance?i.distance:5,e=n.height,u=n.width,a=e/2,h=n.x,f=n.y,o="left",c="top";if(r instanceof Array)h+=Un(r[0],n.width),f+=Un(r[1],n.height),o=null,c=null;else switch(r){case"left":h-=s,f+=a,o="right",c="middle";break;case"right":h+=s+u,f+=a,c="middle";break;case"top":h+=u/2,f-=s,o="center",c="bottom";break;case"bottom":h+=u/2,f+=e+s,o="center";break;case"inside":h+=u/2,f+=a,o="center",c="middle";break;case"insideLeft":h+=s,f+=a,c="middle";break;case"insideRight":h+=u-s,f+=a,o="right",c="middle";break;case"insideTop":h+=u/2,f+=s,o="center";break;case"insideBottom":h+=u/2,f+=e-s,o="center",c="bottom";break;case"insideTopLeft":h+=s,f+=s;break;case"insideTopRight":h+=u-s,f+=s,o="right";break;case"insideBottomLeft":h+=s,f+=e-s,c="bottom";break;case"insideBottomRight":h+=u-s,f+=e-s,o="right",c="bottom"}return(t=t||{}).x=h,t.y=f,t.align=o,t.verticalAlign=c,t}var Gn="__zr_normal__",Kn=Tn.concat(["ignore"]),Zn=S(Tn,(function(t,i){return t[i]=!0,t}),{ignore:!1}),Jn={},$n=new ii(0,0,0,0),tr=[],ir=function(){function t(t){this.id=O(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,i){switch(this.draggable){case"horizontal":i=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=i,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 i=this._textContent;if(i&&(!i.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,s=i.innerTransformable,e=void 0,u=void 0,a=!1;s.parent=r?this:null;var h=!1;s.copyTransform(i);var f=null!=n.position,o=n.autoOverflowArea,c=void 0;if((o||f)&&((c=$n).copy(n.layoutRect?n.layoutRect:this.getBoundingRect()),r||c.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Jn,n,c):Vn(Jn,n,c),s.x=Jn.x,s.y=Jn.y,e=Jn.align,u=Jn.verticalAlign;var v=n.origin;if(v&&null!=n.rotation){var l=void 0,d=void 0;"center"===v?(l=.5*c.width,d=.5*c.height):(l=Un(v[0],c.width),d=Un(v[1],c.height)),h=!0,s.originX=-s.x+l+(r?0:c.x),s.originY=-s.y+d+(r?0:c.y)}}null!=n.rotation&&(s.rotation=n.rotation);var b=n.offset;b&&(s.x+=b[0],s.y+=b[1],h||(s.originX=-b[0],s.originY=-b[1]));var M=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(o){var g=M.overflowRect=M.overflowRect||new ii(0,0,0,0);s.getLocalTransform(tr),Bt(tr,tr),ii.copy(g,c),g.applyTransform(tr)}else M.overflowRect=null;var w=void 0,p=void 0,y=void 0;(null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside)&&this.canBeInsideText()?(p=n.insideStroke,null!=(w=n.insideFill)&&"auto"!==w||(w=this.getInsideTextFill()),null!=p&&"auto"!==p||(p=this.getInsideTextStroke(w),y=!0)):(p=n.outsideStroke,null!=(w=n.outsideFill)&&"auto"!==w||(w=this.getOutsideFill()),null!=p&&"auto"!==p||(p=this.getOutsideStroke(w),y=!0)),(w=w||"#000")===M.fill&&p===M.stroke&&y===M.autoStroke&&e===M.align&&u===M.verticalAlign||(a=!0,M.fill=w,M.stroke=p,M.autoStroke=y,M.align=e,M.verticalAlign=u,i.setDefaultTextStyle(M)),i.__dirty|=1,a&&i.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?In:xn},t.prototype.getOutsideStroke=function(){var t=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof t&&Ji(t);i||(i=[255,255,255,1]);for(var n=i[3],r=this.__zr.isDarkMode(),s=0;s<3;s++)i[s]=i[s]*n+(r?0:255)*(1-n);return i[3]=1,sn(i,"rgba")},t.prototype.traverse=function(){},t.prototype.attrKV=function(t,i){"textConfig"===t?this.setTextConfig(i):"textContent"===t?this.setTextContent(i):"clipPath"===t?this.setClipPath(i):"extra"===t?(this.extra=this.extra||{},L(this.extra,i)):this[t]=i},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,i){if("string"==typeof t)this.attrKV(t,i);else if(Q(t))for(var n=D(t),r=0;r<n.length;r++){var s=n[r];this.attrKV(s,t[s])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var i=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],s=r.__fromStateTransition;if(!(r.getLoop()||s&&s!==Gn)){var e=r.targetName;r.saveTo(e?i[e]:i)}}},t.prototype._innerSaveToNormal=function(t){var i=this._normalState;i||(i=this._normalState={}),t.textConfig&&!i.textConfig&&(i.textConfig=this.textConfig),this._savePrimaryToNormal(t,i,Kn)},t.prototype._savePrimaryToNormal=function(t,i,n){for(var r=0;r<n.length;r++){var s=n[r];null==t[s]||s in i||(i[s]=this[s])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var i=this.states;return i[t]||(i[t]={}),i[t]},t.prototype.clearStates=function(t){this.useState(Gn,!1,t)},t.prototype.useState=function(t,i,n,r){var s=t===Gn;if(this.hasState()||!s){var e=this.currentStates,u=this.stateTransition;if(!(j(e,t)>=0)||!i&&1!==e.length){var a;if(this.stateProxy&&!s&&(a=this.stateProxy(t)),a||(a=this.states&&this.states[t]),a||s){s||this.saveCurrentToNormalState(a);var h=this._textContent,f=ur(this,h,a,r);f&&!this.__inHover&&(this.__inHover=f),this._applyStateObj(t,a,this._normalState,i,hr(this,n,u),u);var o=this._textGuide;return h&&h.useState(t,i,n,!!f),o&&o.useState(t,i,n,!!f),s?(this.currentStates=[],this._normalState={}):i?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),a}F("State "+t+" not exists.")}}},t.prototype.useStates=function(t,i,n){if(t.length){var r=[],s=this.currentStates,e=t.length,u=e===s.length;if(u)for(var a=0;a<e;a++)if(t[a]!==s[a]){u=!1;break}if(u)return;for(a=0;a<e;a++){var h=t[a],f=void 0;this.stateProxy&&(f=this.stateProxy(h,t)),f||(f=this.states[h]),f&&r.push(f)}var o=this._textContent,c=ur(this,o,r[e-1],n);c&&!this.__inHover&&(this.__inHover=c);var v=this._mergeStates(r),l=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(t.join(","),v,this._normalState,!1,hr(this,i,l),l);var d=this._textGuide;o&&o.useStates(t,i,!!c),d&&d.useStates(t,i,!!c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var i=t.__hostTarget;t=i?t.ignoreHostSilent?null:i:t.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var i=this.animators[t];i.targetName&&i.changeTarget(this[i.targetName])}},t.prototype.removeState=function(t){var i=j(this.currentStates,t);if(i>=0){var n=this.currentStates.slice();n.splice(i,1),this.useStates(n)}},t.prototype.replaceState=function(t,i,n){var r=this.currentStates.slice(),s=j(r,t),e=j(r,i)>=0;s>=0?e?r.splice(s,1):r[s]=i:n&&!e&&r.push(i),this.useStates(r)},t.prototype.toggleState=function(t,i){i?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var i,n={},r=0;r<t.length;r++){var s=t[r];L(n,s),s.textConfig&&L(i=i||{},s.textConfig)}return i&&(n.textConfig=i),n},t.prototype._applyStateObj=function(t,i,n,r,s,e){if(1!==this.__inHover){var u=!(i&&r);i&&i.textConfig?(this.textConfig=L({},r?this.textConfig:n.textConfig),L(this.textConfig,i.textConfig)):u&&n.textConfig&&(this.textConfig=n.textConfig);for(var a={},h=!1,f=0;f<Kn.length;f++){var o=Kn[f],c=s&&Zn[o];i&&null!=i[o]?c?(h=!0,a[o]=i[o]):this[o]=i[o]:u&&null!=n[o]&&(c?(h=!0,a[o]=n[o]):this[o]=n[o])}if(!s)for(f=0;f<this.animators.length;f++){var v=this.animators[f],l=v.targetName;v.getLoop()||v.__changeFinalValue(l?(i||n)[l]:i||n)}h&&this._transitionState(t,a,e)}},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var i=this.__zr;i&&t.addSelfToZr(i),t.__zr=i,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var i=this._textContent;i!==t&&(i&&i!==t&&this.removeTextContent(),t.innerTransformable=new qn,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),L(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var i=this.animators;if(i)for(var n=0;n<i.length;n++)t.animation.addAnimator(i[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var i=this.animators;if(i)for(var n=0;n<i.length;n++)t.animation.removeAnimator(i[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,i,n){var r=new kn(t?this[t]:this,i,n);return t&&(r.targetName=t),this.addAnimator(r,t),r},t.prototype.addAnimator=function(t,i){var n=this.__zr,r=this;t.during((function(){r.updateDuringAnimation(i)})).done((function(){var i=r.animators,n=j(i,t);n>=0&&i.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(){this.markRedraw()},t.prototype.stopAnimation=function(t,i){for(var n=this.animators,r=n.length,s=[],e=0;e<r;e++){var u=n[e];t&&t!==u.scope?s.push(u):u.stop(i)}return this.animators=s,this},t.prototype.animateTo=function(t,i,n){nr(this,t,i,n)},t.prototype.animateFrom=function(t,i,n){nr(this,t,i,n,!0)},t.prototype._transitionState=function(t,i,n,r){for(var s=nr(this,i,n,r),e=0;e<s.length;e++)s[e].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var i=t.prototype;function n(t,n,r,s){function e(t,i){Object.defineProperty(i,0,{get:function(){return t[r]},set:function(i){t[r]=i}}),Object.defineProperty(i,1,{get:function(){return t[s]},set:function(i){t[s]=i}})}Object.defineProperty(i,t,{get:function(){return this[n]||e(this,this[n]=[]),this[n]},set:function(t){this[r]=t[0],this[s]=t[1],this[n]=t,e(this,t)}})}i.type="element",i.name="",i.ignore=i.silent=i.ignoreHostSilent=i.isGroup=i.draggable=i.dragging=i.ignoreClip=!1,i.__inHover=0,i.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),t}();function nr(t,i,n,r,s){var e=[];er(t,"",t,i,n=n||{},r,e,s);var u=e.length,a=!1,h=n.done,f=n.aborted,o=function(){a=!0,--u<=0&&(a?h&&h():f&&f())},c=function(){--u<=0&&(a?h&&h():f&&f())};u||h&&h(),e.length>0&&n.during&&e[0].during((function(t,i){n.during(i)}));for(var v=0;v<e.length;v++){var l=e[v];o&&l.done(o),c&&l.aborted(c),n.force&&l.duration(n.duration),l.start(n.easing)}return e}function rr(t,i,n){for(var r=0;r<n;r++)t[r]=i[r]}function sr(t,i,n){if(C(i[n]))if(C(t[n])||(t[n]=[]),V(i[n])){var r=i[n].length;t[n].length!==r&&(t[n]=new i[n].constructor(r),rr(t[n],i[n],r))}else{var s=i[n],e=t[n],u=s.length;if(C(s[0]))for(var a=s[0].length,h=0;h<u;h++)e[h]?rr(e[h],s[h],a):e[h]=Array.prototype.slice.call(s[h]);else rr(e,s,u);e.length=s.length}else t[n]=i[n]}function er(t,i,n,r,s,e,u,a){for(var h=D(r),f=s.duration,o=s.delay,c=s.additive,v=s.setToFinal,l=!Q(e),d=t.animators,b=[],M=0;M<h.length;M++){var g=r[x=h[M]];if(null!=g&&null!=n[x]&&(l||e[x]))if(!Q(g)||C(g)||K(g))b.push(x);else{if(i){a||(n[x]=g,t.updateDuringAnimation(i));continue}er(t,x,n[x],g,s,e&&e[x],u,a)}else a||(n[x]=g,t.updateDuringAnimation(i),b.push(x))}var w=b.length;if(!c&&w)for(var p=0;p<d.length;p++)if((k=d[p]).targetName===i&&k.stopTracks(b)){var y=j(d,k);d.splice(y,1)}if(s.force||(b=T(b,(function(t){return!((i=r[t])===(s=n[t])||C(i)&&C(s)&&function(t,i){var n=t.length;if(n!==i.length)return!1;for(var r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0}(i,s));var i,s})),w=b.length),w>0||s.force&&!u.length){var k,m=void 0,O=void 0,F=void 0;if(a)for(O={},v&&(m={}),p=0;p<w;p++)O[x=b[p]]=n[x],v?m[x]=r[x]:n[x]=r[x];else if(v)for(F={},p=0;p<w;p++){var x;F[x=b[p]]=bn(n[x]),sr(n,r,x)}(k=new kn(n,!1,!1,c?T(d,(function(t){return t.targetName===i})):null)).targetName=i,s.scope&&(k.scope=s.scope),v&&m&&k.whenWithKeys(0,m,b),F&&k.whenWithKeys(0,F,b),k.whenWithKeys(null==f?500:f,a?O:r,b).delay(o||0),t.addAnimator(k,i),u.push(k)}}function ur(t,i,n,r){return!(n&&n.hoverLayer||r)||ar(t)||i&&ar(i)?0:1}function ar(t){return"text"===t.type||"tspan"===t.type}function hr(t,i,n){return!i&&!t.__inHover&&n&&n.duration>0}_(ir,Nt),_(ir,qn);var fr=new Ei(50);function or(t){if("string"==typeof t){var i=fr.get(t);return i&&i.image}return t}function cr(t,i,n,r,s){if(t){if("string"==typeof t){if(i&&i.__zrImageSrc===t||!n)return i;var e=fr.get(t),u={hostEl:n,cb:r,cbPayload:s};return e?!lr(i=e.image)&&e.pending.push(u):((i=f.loadImage(t,vr,vr)).__zrImageSrc=t,fr.put(t,i.__cachedImgObj={image:i,pending:[u]})),i}return t}return i}function vr(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var i=0;i<t.pending.length;i++){var n=t.pending[i],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function lr(t){return t&&t.width&&t.height}var dr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function br(t,i,n,r,s,e){if(!n)return t.text="",void(t.isTruncated=!1);var u=(i+"").split("\n");e=Mr(n,r,s,e);for(var a=!1,h={},f=0,o=u.length;f<o;f++)gr(h,u[f],e),u[f]=h.textLine,a=a||h.isTruncated;t.text=u.join("\n"),t.isTruncated=a}function Mr(t,i,n,r){var s=L({},r=r||{});n=tt(n,"..."),s.maxIterations=tt(r.maxIterations,2);var e=s.minChar=tt(r.minChar,0),u=s.fontMeasureInfo=Dn(i),a=u.asciiCharWidth;s.placeholder=tt(r.placeholder,"");for(var h=t=Math.max(0,t-1),f=0;f<e&&h>=a;f++)h-=a;var o=Xn(u,n);return o>h&&(n="",o=0),h=t-o,s.ellipsis=n,s.ellipsisWidth=o,s.contentWidth=h,s.containerWidth=t,s}function gr(t,i,n){var r=n.containerWidth,s=n.contentWidth,e=n.fontMeasureInfo;if(!r)return t.textLine="",void(t.isTruncated=!1);var u=Xn(e,i);if(u<=r)return t.textLine=i,void(t.isTruncated=!1);for(var a=0;;a++){if(u<=s||a>=n.maxIterations){i+=n.ellipsis;break}var h=0===a?wr(i,s,e):u>0?Math.floor(i.length*s/u):0;u=Xn(e,i=i.substr(0,h))}""===i&&(i=n.placeholder),t.textLine=i,t.isTruncated=!0}function wr(t,i,n){for(var r=0,s=0,e=t.length;s<e&&r<i;s++)r+=Bn(n,t.charCodeAt(s));return s}function pr(t,i,n,r){var s=_r(t),e=i.overflow,u=i.padding,a=u?u[1]+u[3]:0,h=u?u[0]+u[2]:0,f=i.font,o="truncate"===e,c=Qn(f),v=tt(i.lineHeight,c),l="truncate"===i.lineOverflow,d=!1,b=i.width;null==b&&null!=n&&(b=n-a);var M,g=i.height;null==g&&null!=r&&(g=r-h);var w=(M=null==b||"break"!==e&&"breakAll"!==e?s?s.split("\n"):[]:s?Lr(s,i.font,b,"breakAll"===e,0).lines:[]).length*v;if(null==g&&(g=w),w>g&&l){var p=Math.floor(g/v);d=d||M.length>p,w=(M=M.slice(0,p)).length*v}if(s&&o&&null!=b)for(var y=Mr(b,f,i.ellipsis,{minChar:i.truncateMinChar,placeholder:i.placeholder}),k={},m=0;m<M.length;m++)gr(k,M[m],y),M[m]=k.textLine,d=d||k.isTruncated;var O=g,F=0,x=Dn(f);for(m=0;m<M.length;m++)F=Math.max(Xn(x,M[m]),F);null==b&&(b=F);var I=b;return{lines:M,height:g,outerWidth:I+=a,outerHeight:O+=h,lineHeight:v,calculatedLineHeight:c,contentWidth:F,contentHeight:w,width:b,isTruncated:d}}var yr=function(){},kr=function(t){this.tokens=[],t&&(this.tokens=t)},mr=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function Or(t,i,n,r,s){var e=new mr,u=_r(t);if(!u)return e;var a=i.padding,h=a?a[1]+a[3]:0,f=a?a[0]+a[2]:0,o=i.width;null==o&&null!=n&&(o=n-h);var c=i.height;null==c&&null!=r&&(c=r-f);for(var v,l=i.overflow,d="break"!==l&&"breakAll"!==l||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===l},b=dr.lastIndex=0;null!=(v=dr.exec(u));){var M=v.index;M>b&&Fr(e,u.substring(b,M),i,d),Fr(e,v[2],i,d,v[1]),b=dr.lastIndex}b<u.length&&Fr(e,u.substring(b,u.length),i,d);var g=[],w=0,p=0,y="truncate"===l,k="truncate"===i.lineOverflow,m={};function O(t,i,n){t.width=i,t.lineHeight=n,w+=n,p=Math.max(p,i)}t:for(var F=0;F<e.lines.length;F++){for(var x=e.lines[F],I=0,L=0,A=0;A<x.tokens.length;A++){var j=(B=x.tokens[A]).styleName&&i.rich[B.styleName]||{},W=B.textPadding=j.padding,_=W?W[1]+W[3]:0,C=B.font=j.font||i.font;B.contentHeight=Qn(C);var N=tt(j.height,B.contentHeight);if(B.innerHeight=N,W&&(N+=W[0]+W[2]),B.height=N,B.lineHeight=it(j.lineHeight,i.lineHeight,N),B.align=j&&j.align||s,B.verticalAlign=j&&j.verticalAlign||"middle",k&&null!=c&&w+B.lineHeight>c){var q=e.lines.length;A>0?(x.tokens=x.tokens.slice(0,A),O(x,L,I),e.lines=e.lines.slice(0,F+1)):e.lines=e.lines.slice(0,F),e.isTruncated=e.isTruncated||e.lines.length<q;break t}var S=j.width,T=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))B.percentWidth=S,g.push(B),B.contentWidth=Xn(Dn(C),B.text);else{if(T){var z=j.backgroundColor,D=z&&z.image;D&&lr(D=or(D))&&(B.width=Math.max(B.width,D.width*N/D.height))}var E=y&&null!=o?o-L:null;null!=E&&E<B.width?!T||E<_?(B.text="",B.width=B.contentWidth=0):(br(m,B.text,E-_,C,i.ellipsis,{minChar:i.truncateMinChar}),B.text=m.text,e.isTruncated=e.isTruncated||m.isTruncated,B.width=B.contentWidth=Xn(Dn(C),B.text)):B.contentWidth=Xn(Dn(C),B.text)}B.width+=_,L+=B.width,j&&(I=Math.max(I,B.lineHeight))}O(x,L,I)}for(e.outerWidth=e.width=tt(o,p),e.outerHeight=e.height=tt(c,w),e.contentHeight=w,e.contentWidth=p,e.outerWidth+=h,e.outerHeight+=f,F=0;F<g.length;F++){var B;(B=g[F]).width=parseInt(B.percentWidth,10)/100*e.width}return e}function Fr(t,i,n,r,s){var e,u,a=""===i,h=s&&n.rich[s]||{},f=t.lines,o=h.font||n.font,c=!1;if(r){var v=h.padding,l=v?v[1]+v[3]:0;if(null!=h.width&&"auto"!==h.width){var d=Un(h.width,r.width)+l;f.length>0&&d+r.accumWidth>r.width&&(e=i.split("\n"),c=!0),r.accumWidth=d}else{var b=Lr(i,o,r.width,r.breakAll,r.accumWidth);r.accumWidth=b.accumWidth+l,u=b.linesWidths,e=b.lines}}e||(e=i.split("\n"));for(var M=Dn(o),g=0;g<e.length;g++){var w=e[g],p=new yr;if(p.styleName=s,p.text=w,p.isLineHolder=!w&&!a,p.width="number"==typeof h.width?h.width:u?u[g]:Xn(M,w),g||c)f.push(new kr([p]));else{var y=(f[f.length-1]||(f[0]=new kr)).tokens,k=y.length;1===k&&y[0].isLineHolder?y[0]=p:(w||!k||a)&&y.push(p)}}}var xr=S(",&?/;] ".split(""),(function(t,i){return t[i]=!0,t}),{});function Ir(t){return!function(t){var i=t.charCodeAt(0);return i>=32&&i<=591||i>=880&&i<=4351||i>=4608&&i<=5119||i>=7680&&i<=8303}(t)||!!xr[t]}function Lr(t,i,n,r,s){for(var e=[],u=[],a="",h="",f=0,o=0,c=Dn(i),v=0;v<t.length;v++){var l=t.charAt(v);if("\n"!==l){var d=Bn(c,l.charCodeAt(0)),b=!r&&!Ir(l);(e.length?o+d>n:s+o+d>n)?o?(a||h)&&(b?(a||(a=h,h="",o=f=0),e.push(a),u.push(o-f),h+=l,a="",o=f+=d):(h&&(a+=h,h="",f=0),e.push(a),u.push(o),a=l,o=d)):b?(e.push(h),u.push(f),h=l,f=d):(e.push(l),u.push(d)):(o+=d,b?(h+=l,f+=d):(h&&(a+=h,h="",f=0),a+=l))}else h&&(a+=h,o+=f),e.push(a),u.push(o),a="",h="",f=0,o=0}return h&&(a+=h),a&&(e.push(a),u.push(o)),1===e.length&&(o+=s),{accumWidth:o,lines:e,linesWidths:u}}function Ar(t,i,n,r,s,e){if(t.baseX=n,t.baseY=r,t.outerWidth=t.outerHeight=null,i){var u=2*i.width,a=2*i.height;ii.set(jr,Rn(n,u,s),Hn(r,a,e),u,a),ii.intersect(i,jr,null,Wr);var h=Wr.outIntersectRect;t.outerWidth=h.width,t.outerHeight=h.height,t.baseX=Rn(h.x,h.width,s,!0),t.baseY=Hn(h.y,h.height,e,!0)}}var jr=new ii(0,0,0,0),Wr={outIntersectRect:{},clamp:!0};function _r(t){return null!=t?t+="":t=""}function Cr(t,i,n,r){var s=new ii(Rn(t.x||0,i,t.textAlign),Hn(t.y||0,n,t.textBaseline),i,n),e=null!=r?r:Nr(t)?t.lineWidth:0;return e>0&&(s.x-=e/2,s.y-=e/2,s.width+=e,s.height+=e),s}function Nr(t){var i=t.stroke;return null!=i&&"none"!==i&&t.lineWidth>0}var qr="__zr_style_"+Math.round(10*Math.random()),Sr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Tr={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Sr[qr]=!0;var zr=["z","z2","invisible"],Dr=["invisible"],Er=function(t){function n(i){return t.call(this,i)||this}var r;return i(n,t),n.prototype._init=function(i){for(var n=D(i),r=0;r<n.length;r++){var s=n[r];"style"===s?this.useStyle(i[s]):t.prototype.attrKV.call(this,s,i[s])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,i,n,r){var s,e,u,a=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(e=t,u=i,Br.copy((s=this).getBoundingRect()),s.transform&&Br.applyTransform(s.transform),Xr.width=e,Xr.height=u,!Br.intersect(Xr))||a&&!a[0]&&!a[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length)for(var h=0;h<this.__clipPaths.length;++h)if(this.__clipPaths[h].isZeroArea())return!1;if(r&&this.parent)for(var f=this.parent;f;){if(f.ignore)return!1;f=f.parent}return!0},n.prototype.contain=function(t,i){return this.rectContain(t,i)},n.prototype.traverse=function(t,i){t.call(i,this)},n.prototype.rectContain=function(t,i){var n=this.transformCoordToLocal(t,i);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),r=this.style,s=r.shadowBlur||0,e=r.shadowOffsetX||0,u=r.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ii(0,0,0,0)),i?ii.applyTransform(t,n,i):t.copy(n),(s||e||u)&&(t.width+=2*s+Math.abs(e),t.height+=2*s+Math.abs(u),t.x=Math.min(t.x,t.x+e-s),t.y=Math.min(t.y,t.y+u-s));var a=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-a),t.y=Math.floor(t.y-a),t.width=Math.ceil(t.width+1+2*a),t.height=Math.ceil(t.height+1+2*a))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ii(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(i,n){"style"!==i?t.prototype.attrKV.call(this,i,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(t,i){return"string"==typeof t?this.style[t]=i:L(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return dt(Sr,t)},n.prototype.useStyle=function(t){t[qr]||(t=this.createStyle(t)),this.style=t,this.dirtyStyle()},n.prototype._useHoverStyle=function(t){this.__hoverStyle=t},n.prototype.isStyleObject=function(t){return t[qr]},n.prototype._innerSaveToNormal=function(i){t.prototype._innerSaveToNormal.call(this,i);var n=this._normalState;i.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(i,n,zr)},n.prototype._applyStateObj=function(i,n,r,s,e,u){t.prototype._applyStateObj.call(this,i,n,r,s,e,u);var a,h=!(n&&s),f=1===this.__inHover;if(n&&n.style?e?s?a=n.style:(a=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(a,n.style)):(a=this._mergeStyle(this.createStyle(),s?this.style:r.style),this._mergeStyle(a,n.style)):h&&(a=r.style),a)if(e){var o=this.style;if(this.style=this.createStyle(h?{}:o),h)for(var c=D(o),v=0;v<c.length;v++)(b=c[v])in a&&(a[b]=a[b],this.style[b]=o[b]);var l=D(a);for(v=0;v<l.length;v++)this.style[b=l[v]]=this.style[b];this._transitionState(i,{style:a},u,this.getAnimationStyleProps())}else f?this._useHoverStyle(a):this.useStyle(a);if(!f){var d=this.__inHover?Dr:zr;for(v=0;v<d.length;v++){var b=d[v];n&&null!=n[b]?this[b]=n[b]:h&&null!=r[b]&&(this[b]=r[b])}}},n.prototype._mergeStates=function(i){for(var n,r=t.prototype._mergeStates.call(this,i),s=0;s<i.length;s++){var e=i[s];e.style&&this._mergeStyle(n=n||{},e.style)}return n&&(r.style=n),r},n.prototype._mergeStyle=function(t,i){return L(t,i),t},n.prototype.getAnimationStyleProps=function(){return Tr},n.initDefaultProps=((r=n.prototype).type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=0,r._rect=null,r.dirtyRectTolerance=0,void(r.__dirty=3)),n}(ir),Br=new ii(0,0,0,0),Xr=new ii(0,0,0,0),Yr=Math.min,Pr=Math.max,Rr=Math.sin,Hr=Math.cos,Qr=2*Math.PI,Ur=pt(),Vr=pt(),Gr=pt();function Kr(t,i,n,r,s,e){s[0]=Yr(t,n),s[1]=Yr(i,r),e[0]=Pr(t,n),e[1]=Pr(i,r)}var Zr=[],Jr=[];function $r(t,i,n,r,s,e,u,a,h,f){var o=Ii,c=Oi,v=o(t,n,s,u,Zr);h[0]=1/0,h[1]=1/0,f[0]=-1/0,f[1]=-1/0;for(var l=0;l<v;l++){var d=c(t,n,s,u,Zr[l]);h[0]=Yr(d,h[0]),f[0]=Pr(d,f[0])}for(v=o(i,r,e,a,Jr),l=0;l<v;l++){var b=c(i,r,e,a,Jr[l]);h[1]=Yr(b,h[1]),f[1]=Pr(b,f[1])}h[0]=Yr(t,h[0]),f[0]=Pr(t,f[0]),h[0]=Yr(u,h[0]),f[0]=Pr(u,f[0]),h[1]=Yr(i,h[1]),f[1]=Pr(i,f[1]),h[1]=Yr(a,h[1]),f[1]=Pr(a,f[1])}function ts(t,i,n,r,s,e,u,a){var h=_i,f=ji,o=Pr(Yr(h(t,n,s),1),0),c=Pr(Yr(h(i,r,e),1),0),v=f(t,n,s,o),l=f(i,r,e,c);u[0]=Yr(t,s,v),u[1]=Yr(i,e,l),a[0]=Pr(t,s,v),a[1]=Pr(i,e,l)}function is(t,i,n,r,s,e,u,a,h){var f=_t,o=Ct,c=Math.abs(s-e);if(c%Qr<1e-4&&c>1e-4)return a[0]=t-n,a[1]=i-r,h[0]=t+n,void(h[1]=i+r);if(Ur[0]=Hr(s)*n+t,Ur[1]=Rr(s)*r+i,Vr[0]=Hr(e)*n+t,Vr[1]=Rr(e)*r+i,f(a,Ur,Vr),o(h,Ur,Vr),(s%=Qr)<0&&(s+=Qr),(e%=Qr)<0&&(e+=Qr),s>e&&!u?e+=Qr:s<e&&u&&(s+=Qr),u){var v=e;e=s,s=v}for(var l=0;l<e;l+=Math.PI/2)l>s&&(Gr[0]=Hr(l)*n+t,Gr[1]=Rr(l)*r+i,f(a,Gr,a),o(h,Gr,h))}var ns={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},rs=[],ss=[],es=[],us=[],as=[],hs=[],fs=Math.min,os=Math.max,cs=Math.cos,vs=Math.sin,ls=Math.abs,ds=Math.PI,bs=2*ds,Ms="undefined"!=typeof Float32Array,gs=[];function ws(t){return Math.round(t/ds*1e8)/1e8%2*ds}function ps(t,i){var n=ws(t[0]);n<0&&(n+=bs);var r=t[1];r+=n-t[0],!i&&r-n>=bs?r=n+bs:i&&n-r>=bs?r=n-bs:!i&&n>r?r=n+(bs-ws(n-r)):i&&n<r&&(r=n-(bs-ws(r-n))),t[0]=n,t[1]=r}var ys=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var i;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,i,n){(n=n||0)>0&&(this._ux=ls(n/On/t)||0,this._uy=ls(n/On/i)||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,i){return this._drawPendingPt(),this.addData(ns.M,t,i),this._ctx&&this._ctx.moveTo(t,i),this._x0=t,this._y0=i,this._xi=t,this._yi=i,this},t.prototype.lineTo=function(t,i){var n=ls(t-this._xi),r=ls(i-this._yi),s=n>this._ux||r>this._uy;if(this.addData(ns.L,t,i),this._ctx&&s&&this._ctx.lineTo(t,i),s)this._xi=t,this._yi=i,this._pendingPtDist=0;else{var e=n*n+r*r;e>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=i,this._pendingPtDist=e)}return this},t.prototype.bezierCurveTo=function(t,i,n,r,s,e){return this._drawPendingPt(),this.addData(ns.C,t,i,n,r,s,e),this._ctx&&this._ctx.bezierCurveTo(t,i,n,r,s,e),this._xi=s,this._yi=e,this},t.prototype.quadraticCurveTo=function(t,i,n,r){return this._drawPendingPt(),this.addData(ns.Q,t,i,n,r),this._ctx&&this._ctx.quadraticCurveTo(t,i,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(t,i,n,r,s,e){return this._drawPendingPt(),gs[0]=r,gs[1]=s,ps(gs,e),this.addData(ns.A,t,i,n,n,r=gs[0],(s=gs[1])-r,0,e?0:1),this._ctx&&this._ctx.arc(t,i,n,r,s,e),this._xi=cs(s)*n+t,this._yi=vs(s)*n+i,this},t.prototype.arcTo=function(t,i,n,r,s){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,i,n,r,s),this},t.prototype.rect=function(t,i,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,i,n,r),this.addData(ns.R,t,i,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(ns.Z);var t=this._ctx,i=this._x0,n=this._y0;return t&&t.closePath(),this._xi=i,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){if(this._saveData){var i=t.length;this.data&&this.data.length===i||!Ms||(this.data=new Float32Array(i));for(var n=0;n<i;n++)this.data[n]=t[n];this._len=i}},t.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var i=t.length,n=0,r=this._len,s=0;s<i;s++)n+=t[s].len();var e=this.data;if(Ms&&(e instanceof Float32Array||!e)&&(this.data=new Float32Array(r+n),r>0&&e))for(var u=0;u<r;u++)this.data[u]=e[u];for(s=0;s<i;s++){var a=t[s].data;for(u=0;u<a.length;u++)this.data[r++]=a[u]}this._len=r}},t.prototype.addData=function(t,i,n,r,s,e,u,a,h){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var o=0;o<arguments.length;o++)f[this._len++]=arguments[o]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],i=0;i<this._len;i++)t[i]=this.data[i];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ms&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){es[0]=es[1]=as[0]=as[1]=Number.MAX_VALUE,us[0]=us[1]=hs[0]=hs[1]=-Number.MAX_VALUE;var t,i=this.data,n=0,r=0,s=0,e=0;for(t=0;t<this._len;){var u=i[t++],a=1===t;switch(a&&(s=n=i[t],e=r=i[t+1]),u){case ns.M:n=s=i[t++],r=e=i[t++],as[0]=s,as[1]=e,hs[0]=s,hs[1]=e;break;case ns.L:Kr(n,r,i[t],i[t+1],as,hs),n=i[t++],r=i[t++];break;case ns.C:$r(n,r,i[t++],i[t++],i[t++],i[t++],i[t],i[t+1],as,hs),n=i[t++],r=i[t++];break;case ns.Q:ts(n,r,i[t++],i[t++],i[t],i[t+1],as,hs),n=i[t++],r=i[t++];break;case ns.A:var h=i[t++],f=i[t++],o=i[t++],c=i[t++],v=i[t++],l=i[t++]+v;t+=1;var d=!i[t++];a&&(s=cs(v)*o+h,e=vs(v)*c+f),is(h,f,o,c,v,l,d,as,hs),n=cs(l)*o+h,r=vs(l)*c+f;break;case ns.R:Kr(s=n=i[t++],e=r=i[t++],s+i[t++],e+i[t++],as,hs);break;case ns.Z:n=s,r=e}_t(es,es,as),Ct(us,us,hs)}return 0===t&&(es[0]=es[1]=us[0]=us[1]=0),new ii(es[0],es[1],us[0]-es[0],us[1]-es[1])},t.prototype._calculateLength=function(){var t=this.data,i=this._len,n=this._ux,r=this._uy,s=0,e=0,u=0,a=0;this._pathSegLen||(this._pathSegLen=[]);for(var h=this._pathSegLen,f=0,o=0,c=0;c<i;){var v=t[c++],l=1===c;l&&(u=s=t[c],a=e=t[c+1]);var d=-1;switch(v){case ns.M:s=u=t[c++],e=a=t[c++];break;case ns.L:var b=t[c++],M=(p=t[c++])-e;(ls(j=b-s)>n||ls(M)>r||c===i-1)&&(d=Math.sqrt(j*j+M*M),s=b,e=p);break;case ns.C:var g=t[c++],w=t[c++],p=(b=t[c++],t[c++]),y=t[c++],k=t[c++];d=Ai(s,e,g,w,b,p,y,k,10),s=y,e=k;break;case ns.Q:d=Ni(s,e,g=t[c++],w=t[c++],b=t[c++],p=t[c++],10),s=b,e=p;break;case ns.A:var m=t[c++],O=t[c++],F=t[c++],x=t[c++],I=t[c++],L=t[c++],A=L+I;c+=1,l&&(u=cs(I)*F+m,a=vs(I)*x+O),d=os(F,x)*fs(bs,Math.abs(L)),s=cs(A)*F+m,e=vs(A)*x+O;break;case ns.R:u=s=t[c++],a=e=t[c++],d=2*t[c++]+2*t[c++];break;case ns.Z:var j=u-s;M=a-e,d=Math.sqrt(j*j+M*M),s=u,e=a}d>=0&&(h[o++]=d,f+=d)}return this._pathLen=f,f},t.prototype.rebuildPath=function(t,i){var n,r,s,e,u,a,h,f,o,c,v=this.data,l=this._ux,d=this._uy,b=this._len,M=i<1,g=0,w=0,p=0;if(!M||(this._pathSegLen||this._calculateLength(),h=this._pathSegLen,f=i*this._pathLen))t:for(var y=0;y<b;){var k=v[y++],m=1===y;switch(m&&(n=s=v[y],r=e=v[y+1]),k!==ns.L&&p>0&&(t.lineTo(o,c),p=0),k){case ns.M:n=s=v[y++],r=e=v[y++],t.moveTo(s,e);break;case ns.L:u=v[y++],a=v[y++];var O=ls(u-s),F=ls(a-e);if(O>l||F>d){if(M){if(g+(U=h[w++])>f){t.lineTo(s*(1-(V=(f-g)/U))+u*V,e*(1-V)+a*V);break t}g+=U}t.lineTo(u,a),s=u,e=a,p=0}else{var x=O*O+F*F;x>p&&(o=u,c=a,p=x)}break;case ns.C:var I=v[y++],L=v[y++],A=v[y++],j=v[y++],W=v[y++],_=v[y++];if(M){if(g+(U=h[w++])>f){Li(s,I,A,W,V=(f-g)/U,rs),Li(e,L,j,_,V,ss),t.bezierCurveTo(rs[1],ss[1],rs[2],ss[2],rs[3],ss[3]);break t}g+=U}t.bezierCurveTo(I,L,A,j,W,_),s=W,e=_;break;case ns.Q:if(I=v[y++],L=v[y++],A=v[y++],j=v[y++],M){if(g+(U=h[w++])>f){Ci(s,I,A,V=(f-g)/U,rs),Ci(e,L,j,V,ss),t.quadraticCurveTo(rs[1],ss[1],rs[2],ss[2]);break t}g+=U}t.quadraticCurveTo(I,L,A,j),s=A,e=j;break;case ns.A:var C=v[y++],N=v[y++],q=v[y++],S=v[y++],T=v[y++],z=v[y++],D=v[y++],E=!v[y++],B=q>S?q:S,X=ls(q-S)>.001,Y=T+z,P=!1;if(M&&(g+(U=h[w++])>f&&(Y=T+z*(f-g)/U,P=!0),g+=U),X&&t.ellipse?t.ellipse(C,N,q,S,D,T,Y,E):t.arc(C,N,B,T,Y,E),P)break t;m&&(n=cs(T)*q+C,r=vs(T)*S+N),s=cs(Y)*q+C,e=vs(Y)*S+N;break;case ns.R:n=s=v[y],r=e=v[y+1],u=v[y++],a=v[y++];var R=v[y++],H=v[y++];if(M){if(g+(U=h[w++])>f){var Q=f-g;t.moveTo(u,a),t.lineTo(u+fs(Q,R),a),(Q-=R)>0&&t.lineTo(u+R,a+fs(Q,H)),(Q-=H)>0&&t.lineTo(u+os(R-Q,0),a+H),(Q-=R)>0&&t.lineTo(u,a+os(H-Q,0));break t}g+=U}t.rect(u,a,R,H);break;case ns.Z:if(M){var U;if(g+(U=h[w++])>f){var V;t.lineTo(s*(1-(V=(f-g)/U))+n*V,e*(1-V)+r*V);break t}g+=U}t.closePath(),s=n,e=r}}},t.prototype.clone=function(){var i=new t,n=this.data;return i.data=n.slice?n.slice():Array.prototype.slice.call(n),i._len=this._len,i},t.prototype.canSave=function(){return!!this._saveData},t.CMD=ns,t.initDefaultProps=((i=t.prototype)._saveData=!0,i._ux=0,i._uy=0,i._pendingPtDist=0,void(i._version=0)),t}();function ks(t,i,n,r,s,e,u){if(0===s)return!1;var a,h=s;if(u>i+h&&u>r+h||u<i-h&&u<r-h||e>t+h&&e>n+h||e<t-h&&e<n-h)return!1;if(t===n)return Math.abs(e-t)<=h/2;var f=(a=(i-r)/(t-n))*e-u+(t*r-n*i)/(t-n);return f*f/(a*a+1)<=h/2*h/2}function ms(t,i,n,r,s,e,u,a,h,f,o){if(0===h)return!1;var c=h;if(o>i+c&&o>r+c&&o>e+c&&o>a+c||o<i-c&&o<r-c&&o<e-c&&o<a-c||f>t+c&&f>n+c&&f>s+c&&f>u+c||f<t-c&&f<n-c&&f<s-c&&f<u-c)return!1;var v=function(t,i,n,r,s,e,u,a,h,f){var o,c,v,l,d,b=.005,M=1/0;wi[0]=h,wi[1]=f;for(var g=0;g<1;g+=.05)pi[0]=Oi(t,n,s,u,g),pi[1]=Oi(i,r,e,a,g),(l=At(wi,pi))<M&&(o=g,M=l);M=1/0;for(var w=0;w<32&&!(b<bi);w++)v=o+b,pi[0]=Oi(t,n,s,u,c=o-b),pi[1]=Oi(i,r,e,a,c),l=At(pi,wi),c>=0&&l<M?(o=c,M=l):(yi[0]=Oi(t,n,s,u,v),yi[1]=Oi(i,r,e,a,v),d=At(yi,wi),v<=1&&d<M?(o=v,M=d):b*=.5);return di(M)}(t,i,n,r,s,e,u,a,f,o);return v<=c/2}function Os(t,i,n,r,s,e,u,a,h){if(0===u)return!1;var f=u;if(h>i+f&&h>r+f&&h>e+f||h<i-f&&h<r-f&&h<e-f||a>t+f&&a>n+f&&a>s+f||a<t-f&&a<n-f&&a<s-f)return!1;var o=function(t,i,n,r,s,e,u,a){var h,f=.005,o=1/0;wi[0]=u,wi[1]=a;for(var c=0;c<1;c+=.05)pi[0]=ji(t,n,s,c),pi[1]=ji(i,r,e,c),(b=At(wi,pi))<o&&(h=c,o=b);o=1/0;for(var v=0;v<32&&!(f<bi);v++){var l=h-f,d=h+f;pi[0]=ji(t,n,s,l),pi[1]=ji(i,r,e,l);var b=At(pi,wi);if(l>=0&&b<o)h=l,o=b;else{yi[0]=ji(t,n,s,d),yi[1]=ji(i,r,e,d);var M=At(yi,wi);d<=1&&M<o?(h=d,o=M):f*=.5}}return di(o)}(t,i,n,r,s,e,a,h);return o<=f/2}var Fs=2*Math.PI;function xs(t){return(t%=Fs)<0&&(t+=Fs),t}var Is=2*Math.PI;function Ls(t,i,n,r,s,e,u,a,h){if(0===u)return!1;var f=u;a-=t,h-=i;var o=Math.sqrt(a*a+h*h);if(o-f>n||o+f<n)return!1;if(Math.abs(r-s)%Is<1e-4)return!0;if(e){var c=r;r=xs(s),s=xs(c)}else r=xs(r),s=xs(s);r>s&&(s+=Is);var v=Math.atan2(h,a);return v<0&&(v+=Is),v>=r&&v<=s||v+Is>=r&&v+Is<=s}function As(t,i,n,r,s,e){if(e>i&&e>r||e<i&&e<r)return 0;if(r===i)return 0;var u=(e-i)/(r-i),a=r<i?1:-1;1!==u&&0!==u||(a=r<i?.5:-.5);var h=u*(n-t)+t;return h===s?1/0:h>s?a:0}var js=ys.CMD,Ws=2*Math.PI,_s=[-1,-1,-1],Cs=[-1,-1];function Ns(t,i,n,r,s,e,u,a,h,f){if(f>i&&f>r&&f>e&&f>a||f<i&&f<r&&f<e&&f<a)return 0;var o,c=xi(i,r,e,a,f,_s);if(0===c)return 0;for(var v=0,l=-1,d=void 0,b=void 0,M=0;M<c;M++){var g=_s[M],w=0===g||1===g?.5:1;Oi(t,n,s,u,g)<h||(l<0&&(l=Ii(i,r,e,a,Cs),Cs[1]<Cs[0]&&l>1&&(void 0,o=Cs[0],Cs[0]=Cs[1],Cs[1]=o),d=Oi(i,r,e,a,Cs[0]),l>1&&(b=Oi(i,r,e,a,Cs[1]))),v+=2===l?g<Cs[0]?d<i?w:-w:g<Cs[1]?b<d?w:-w:a<b?w:-w:g<Cs[0]?d<i?w:-w:a<d?w:-w)}return v}function qs(t,i,n,r,s,e,u,a){if(a>i&&a>r&&a>e||a<i&&a<r&&a<e)return 0;var h=function(t,i,n,r,s){var e=t-2*i+n,u=2*(i-t),a=t-r,h=0;if(ki(e))mi(u)&&(o=-a/u)>=0&&o<=1&&(s[h++]=o);else{var f=u*u-4*e*a;if(ki(f))(o=-u/(2*e))>=0&&o<=1&&(s[h++]=o);else if(f>0){var o,c=di(f),v=(-u-c)/(2*e);(o=(-u+c)/(2*e))>=0&&o<=1&&(s[h++]=o),v>=0&&v<=1&&(s[h++]=v)}}return h}(i,r,e,a,_s);if(0===h)return 0;var f=_i(i,r,e);if(f>=0&&f<=1){for(var o=0,c=ji(i,r,e,f),v=0;v<h;v++){var l=0===_s[v]||1===_s[v]?.5:1;ji(t,n,s,_s[v])<u||(o+=_s[v]<f?c<i?l:-l:e<c?l:-l)}return o}return l=0===_s[0]||1===_s[0]?.5:1,ji(t,n,s,_s[0])<u?0:e<i?l:-l}function Ss(t,i,n,r,s,e,u,a){if((a-=i)>n||a<-n)return 0;var h=Math.sqrt(n*n-a*a);_s[0]=-h,_s[1]=h;var f=Math.abs(r-s);if(f<1e-4)return 0;if(f>=Ws-1e-4){r=0,s=Ws;var o=e?1:-1;return u>=_s[0]+t&&u<=_s[1]+t?o:0}if(r>s){var c=r;r=s,s=c}r<0&&(r+=Ws,s+=Ws);for(var v=0,l=0;l<2;l++){var d=_s[l];if(d+t>u){var b=Math.atan2(a,d);o=e?1:-1,b<0&&(b=Ws+b),(b>=r&&b<=s||b+Ws>=r&&b+Ws<=s)&&(b>Math.PI/2&&b<1.5*Math.PI&&(o=-o),v+=o)}}return v}function Ts(t,i,n,r,s){for(var e,u,a=t.data,h=t.len(),f=0,o=0,c=0,v=0,l=0,d=0;d<h;){var b=a[d++],M=1===d;switch(b===js.M&&d>1&&(n||(f+=As(o,c,v,l,r,s))),M&&(v=o=a[d],l=c=a[d+1]),b){case js.M:o=v=a[d++],c=l=a[d++];break;case js.L:if(n){if(ks(o,c,a[d],a[d+1],i,r,s))return!0}else f+=As(o,c,a[d],a[d+1],r,s)||0;o=a[d++],c=a[d++];break;case js.C:if(n){if(ms(o,c,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,r,s))return!0}else f+=Ns(o,c,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],r,s)||0;o=a[d++],c=a[d++];break;case js.Q:if(n){if(Os(o,c,a[d++],a[d++],a[d],a[d+1],i,r,s))return!0}else f+=qs(o,c,a[d++],a[d++],a[d],a[d+1],r,s)||0;o=a[d++],c=a[d++];break;case js.A:var g=a[d++],w=a[d++],p=a[d++],y=a[d++],k=a[d++],m=a[d++];d+=1;var O=!!(1-a[d++]);e=Math.cos(k)*p+g,u=Math.sin(k)*y+w,M?(v=e,l=u):f+=As(o,c,e,u,r,s);var F=(r-g)*y/p+g;if(n){if(Ls(g,w,y,k,k+m,O,i,F,s))return!0}else f+=Ss(g,w,y,k,k+m,O,F,s);o=Math.cos(k+m)*p+g,c=Math.sin(k+m)*y+w;break;case js.R:if(v=o=a[d++],l=c=a[d++],e=v+a[d++],u=l+a[d++],n){if(ks(v,l,e,l,i,r,s)||ks(e,l,e,u,i,r,s)||ks(e,u,v,u,i,r,s)||ks(v,u,v,l,i,r,s))return!0}else f+=As(e,l,e,u,r,s),f+=As(v,u,v,l,r,s);break;case js.Z:if(n){if(ks(o,c,v,l,i,r,s))return!0}else f+=As(o,c,v,l,r,s);o=v,c=l}}return n||Math.abs(c-l)<1e-4||(f+=As(o,c,v,l,r,s)||0),0!==f}var zs=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Sr),Ds={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Tr.style)},Es=Tn.concat(["invisible","culling","z","z2","zlevel","parent"]),Bs=function(t){function n(i){return t.call(this,i)||this}var r;return i(n,t),n.prototype.update=function(){var i=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var s=this._decalEl=this._decalEl||new n;s.buildPath===n.prototype.buildPath&&(s.buildPath=function(t){i.buildPath(t,i.shape)}),s.silent=!0;var e=s.style;for(var u in r)e[u]!==r[u]&&(e[u]=r[u]);e.fill=r.fill?r.decal:null,e.decal=null,e.shadowColor=null,r.strokeFirst&&(e.stroke=null);for(var a=0;a<Es.length;++a)s[Es[a]]=this[Es[a]];s.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(i){var n=D(i);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var s=0;s<n.length;s++){var e=n[s],u=i[e];"style"===e?this.style?L(this.style,u):this.useStyle(u):"shape"===e?L(this.shape,u):t.prototype.attrKV.call(this,e,u)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(P(t)){var i=en(t,0);return i>.5?xn:i>.2?"#eee":In}if(t)return In}return xn},n.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(P(i)){var n=this.__zr;if(!(!n||!n.isDarkMode())==en(t,0)<.4)return i}},n.prototype.buildPath=function(){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new ys(!1)},n.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return!(null==i||"none"===i||!(t.lineWidth>0))},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var s=this.path;(r||4&this.__dirty)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),t=s.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var e=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){e.copy(t);var u=i.strokeNoScale?this.getLineScale():1,a=i.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;a=Math.max(a,null==h?4:h)}u>1e-10&&(e.width+=a/u,e.height+=a/u,e.x-=a/u/2,e.y-=a/u/2)}return e}return t},n.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),r=this.getBoundingRect(),s=this.style;if(r.contain(t=n[0],i=n[1])){var e=this.path;if(this.hasStroke()){var u=s.lineWidth,a=s.strokeNoScale?this.getLineScale():1;if(a>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),function(t,i,n,r){return Ts(t,i,!0,n,r)}(e,u/a,t,i)))return!0}if(this.hasFill())return function(t,i,n){return Ts(t,0,!1,i,n)}(e,t,i)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(i,n){"shape"===i?this.setShape(n):t.prototype.attrKV.call(this,i,n)},n.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=i:L(n,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return dt(zs,t)},n.prototype._innerSaveToNormal=function(i){t.prototype._innerSaveToNormal.call(this,i);var n=this._normalState;i.shape&&!n.shape&&(n.shape=L({},this.shape))},n.prototype._applyStateObj=function(i,n,r,s,e,u){if(t.prototype._applyStateObj.call(this,i,n,r,s,e,u),1!==this.__inHover){var a,h=!(n&&s);if(n&&n.shape?e?s?a=n.shape:(a=L({},r.shape),L(a,n.shape)):(a=L({},s?this.shape:r.shape),L(a,n.shape)):h&&(a=r.shape),a)if(e){this.shape=L({},this.shape);for(var f={},o=D(a),c=0;c<o.length;c++){var v=o[c];"object"==typeof a[v]?this.shape[v]=a[v]:f[v]=a[v]}this._transitionState(i,{shape:f},u)}else this.shape=a,this.dirtyShape()}},n.prototype._mergeStates=function(i){for(var n,r=t.prototype._mergeStates.call(this,i),s=0;s<i.length;s++){var e=i[s];e.shape&&this._mergeStyle(n=n||{},e.shape)}return n&&(r.shape=n),r},n.prototype.getAnimationStyleProps=function(){return Ds},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var r=function(n){function r(i){var r=n.call(this,i)||this;return t.init&&t.init.call(r,i),r}return i(r,n),r.prototype.getDefaultStyle=function(){return x(t.style)},r.prototype.getDefaultShape=function(){return x(t.shape)},r}(n);for(var s in t)"function"==typeof t[s]&&(r.prototype[s]=t[s]);return r},n.initDefaultProps=((r=n.prototype).type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,void(r.__dirty=7)),n}(Er),Xs=A({strokeFirst:!0,font:a,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},zs),Ys=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.hasStroke=function(){return Nr(this.style)},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.createStyle=function(t){return dt(Xs,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t,i,n;return this._rect||(this._rect=(i=_r((t=this.style).text),Cr(t,Xn(Dn(n=t.font),i),Qn(n),null))),this._rect},n.initDefaultProps=void(n.prototype.dirtyRectTolerance=10),n}(Er);Ys.prototype.type="tspan";var Ps=A({x:0,y:0},Sr),Rs={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Tr.style)},Hs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.createStyle=function(t){return dt(Ps,t)},n.prototype._getSize=function(t){var i=this.style,n=i[t];if(null!=n)return n;var r,s=(r=i.image)&&"string"!=typeof r&&r.width&&r.height?i.image:this.__image;if(!s)return 0;var e="width"===t?"height":"width",u=i[e];return null==u?s[t]:s[t]/s[e]*u},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return Rs},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ii(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(Er);Hs.prototype.type="image";var Qs=0,Us=1,Vs=2,Gs=1,Ks=0;export{St as $,E as A,ii as B,D as C,a as D,Nt as E,Y as F,nt as G,x as H,Qs as I,J,Un as K,it as L,Xt as M,Et as N,qt as O,Bs as P,$ as Q,oi as R,ci as S,Ys as T,Wt as U,T as V,A as W,zn as X,Bt as Y,Ks as Z,i as _,On as a,zt as a0,Lt as a1,j as a2,kn as a3,gt as a4,O as a5,en as a6,Fn as a7,rn as a8,_ as a9,Hn as aA,Cr as aB,Or as aC,Er as aD,Tr as aE,u as aF,rt as aG,an as aH,_t as aI,Ct as aJ,Ot as aK,Ft as aL,mt as aM,yt as aN,It as aO,Ci as aP,Li as aQ,xt as aR,Fi as aS,Wi as aT,ji as aU,fi as aV,Us as aW,Tt as aX,qn as aY,lt as aZ,V as aa,at as ab,st as ac,Ei as ad,B as ae,jt as af,xi as ag,Oi as ah,nn as ai,Mt as aj,Vn as ak,ps as al,z as am,Dt as an,Pn as ao,G as ap,et as aq,Ji as ar,sn as as,ir as at,S as au,R as av,W as aw,Ar as ax,pr as ay,Rn as az,N as b,K as c,bt as d,r as e,Z as f,L as g,vt as h,Q as i,Gs as j,Vs as k,F as l,I as m,q as n,H as o,f as p,X as q,tt as r,Hs as s,ys as t,cr as u,lr as v,Sr as w,wt as x,P as y,C as z}