jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
14 lines (12 loc) • 395 kB
JavaScript
/*! *****************************************************************************
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 zs=function(e,t){return zs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},zs(e,t)};function V(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zs(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var og=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),sg=function(){function e(){this.browser=new og,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),Dr=new sg;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Dr.wxa=!0,Dr.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Dr.worker=!0:typeof navigator>"u"?(Dr.node=!0,Dr.svgSupported=!0):ug(navigator.userAgent,Dr);function ug(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const ot=Dr;var ku=12,lg="sans-serif",Gr=ku+"px "+lg,fg=20,hg=100,vg="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function cg(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-fg)/hg;t[n]=i}return t}var dg=cg(vg),Fe={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var i=Fe.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||Gr),e.measureText(r);r=r||"",n=n||Gr;var a=/^([0-9]*?)px$/.exec(n),o=+(a&&a[1])||ku,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=dg[r[u]];s+=l==null?o:l*o}return{width:s}}}(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}};function pg(e){for(var t in Fe)e[t]&&(Fe[t]=e[t])}var pv=Be(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),gv=Be(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Tn=Object.prototype.toString,no=Array.prototype,gg=no.forEach,yg=no.filter,Fu=no.slice,_g=no.map,El=(function(){}).constructor,Ri=El?El.prototype:null,Bu="__proto__",mg=2311;function Nu(){return mg++}function io(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Q(e){if(e==null||typeof e!="object")return e;var t=e,r=Tn.call(e);if(r==="[object Array]"){if(!cn(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=Q(e[n])}}else if(gv[r]){if(!cn(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!pv[r]&&!cn(e)&&!Ra(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==Bu&&(t[o]=Q(e[o]))}return t}function nt(e,t,r){if(!F(t)||!F(e))return r?Q(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==Bu){var i=e[n],a=t[n];F(a)&&F(i)&&!k(a)&&!k(i)&&!Ra(a)&&!Ra(i)&&!Hs(a)&&!Hs(i)&&!cn(a)&&!cn(i)?nt(i,a,r):(r||!(n in e))&&(e[n]=Q(t[n]))}return e}function Sg(e,t){for(var r=e[0],n=1,i=e.length;n<i;n++)r=nt(r,e[n],t);return r}function O(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==Bu&&(e[r]=t[r]);return e}function ht(e,t,r){for(var n=it(t),i=0;i<n.length;i++){var a=n[i];(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}return e}var wg=Fe.createCanvas;function rt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function yv(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(e.prototype[i]=r[i]);e.prototype.constructor=e,e.superClass=t}function de(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else ht(e,t,r)}function Rt(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function C(e,t,r){if(e&&t)if(e.forEach&&e.forEach===gg)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function Y(e,t,r){if(!e)return[];if(!t)return ao(e);if(e.map&&e.map===_g)return e.map(t,r);for(var n=[],i=0,a=e.length;i<a;i++)n.push(t.call(r,e[i],i,e));return n}function Be(e,t,r,n){if(e&&t){for(var i=0,a=e.length;i<a;i++)r=t.call(n,r,e[i],i,e);return r}}function gt(e,t,r){if(!e)return[];if(!t)return ao(e);if(e.filter&&e.filter===yg)return e.filter(t,r);for(var n=[],i=0,a=e.length;i<a;i++)t.call(r,e[i],i,e)&&n.push(e[i]);return n}function Tg(e,t,r){if(e&&t){for(var n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return e[n]}}function it(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function bg(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(Fu.call(arguments)))}}var Pt=Ri&&Z(Ri.bind)?Ri.call.bind(Ri.bind):bg;function bi(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(Fu.call(arguments)))}}function k(e){return Array.isArray?Array.isArray(e):Tn.call(e)==="[object Array]"}function Z(e){return typeof e=="function"}function G(e){return typeof e=="string"}function Pa(e){return Tn.call(e)==="[object String]"}function st(e){return typeof e=="number"}function F(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function Hs(e){return!!pv[Tn.call(e)]}function Nt(e){return!!gv[Tn.call(e)]}function Ra(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function Mi(e){return e.colorStops!=null}function _v(e){return e.image!=null}function Mg(e){return Tn.call(e)==="[object RegExp]"}function li(e){return e!==e}function Cg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e.length;r<n;r++)if(e[r]!=null)return e[r]}function X(e,t){return e??t}function Jn(e,t,r){return e??t??r}function ao(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Fu.apply(e,t)}function zu(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function ce(e,t){if(!e)throw new Error(t)}function be(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var mv="__ec_primitive__";function fi(e){e[mv]=!0}function cn(e){return e[mv]}var Sv=function(){function e(t){this.data={};var r=k(t);this.data={};var n=this;t instanceof e?t.each(i):t&&C(t,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return e.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},e.prototype.set=function(t,r){return this.data[t]=r},e.prototype.each=function(t,r){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(r,this.data[n],n)},e.prototype.keys=function(){return it(this.data)},e.prototype.removeKey=function(t){delete this.data[t]},e}();function W(e){return new Sv(e)}function wv(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];for(var i=e.length,n=0;n<t.length;n++)r[n+i]=t[n];return r}function Ci(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&O(r,t),r}function Hu(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Je(e,t){return e.hasOwnProperty(t)}function Ut(){}var jn=180/Math.PI;const vM=Object.freeze(Object.defineProperty({__proto__:null,HashMap:Sv,RADIAN_TO_DEGREE:jn,assert:ce,bind:Pt,clone:Q,concatArray:wv,createCanvas:wg,createHashMap:W,createObject:Ci,curry:bi,defaults:ht,disableUserSelect:Hu,each:C,eqNaN:li,extend:O,filter:gt,find:Tg,guid:Nu,hasOwn:Je,indexOf:rt,inherits:yv,isArray:k,isArrayLike:Rt,isBuiltInObject:Hs,isDom:Ra,isFunction:Z,isGradientObject:Mi,isImagePatternObject:_v,isNumber:st,isObject:F,isPrimitive:cn,isRegExp:Mg,isString:G,isStringSafe:Pa,isTypedArray:Nt,keys:it,logError:io,map:Y,merge:nt,mergeAll:Sg,mixin:de,noop:Ut,normalizeCssArray:zu,reduce:Be,retrieve:Cg,retrieve2:X,retrieve3:Jn,setAsPrimitive:fi,slice:ao,trim:be},Symbol.toStringTag,{value:"Module"}));function Ur(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function Dg(e,t){return e[0]=t[0],e[1]=t[1],e}function Tv(e){return[e[0],e[1]]}function xg(e,t,r){return e[0]=t,e[1]=r,e}function Gs(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Lg(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function bv(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Gu(e){return Math.sqrt(Vu(e))}var Pg=Gu;function Vu(e){return e[0]*e[0]+e[1]*e[1]}var Rg=Vu;function Ig(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function Ag(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function Eg(e,t){return e[0]*t[0]+e[1]*t[1]}function da(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function Mv(e,t){var r=Gu(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function Ia(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Aa=Ia;function Cv(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var kr=Cv;function Og(e,t){return e[0]=-t[0],e[1]=-t[1],e}function pa(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e}function Fr(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function xr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function Lr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}const cM=Object.freeze(Object.defineProperty({__proto__:null,add:Gs,applyTransform:Fr,clone:Tv,copy:Dg,create:Ur,dist:Aa,distSquare:kr,distance:Ia,distanceSquare:Cv,div:Ag,dot:Eg,len:Gu,lenSquare:Vu,length:Pg,lengthSquare:Rg,lerp:pa,max:Lr,min:xr,mul:Ig,negate:Og,normalize:Mv,scale:da,scaleAndAdd:Lg,set:xg,sub:bv},Symbol.toStringTag,{value:"Module"}));var Zr=function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e}(),kg=function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var r=t.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Zr(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,t),this.handler.dispatchToElement(new Zr(r,t),"drag",t.event);var s=this.handler.findHover(n,i,r).target,u=this._dropTarget;this._dropTarget=s,r!==s&&(u&&s!==u&&this.handler.dispatchToElement(new Zr(u,t),"dragleave",t.event),s&&s!==u&&this.handler.dispatchToElement(new Zr(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Zr(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Zr(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e}();const Fg=kg;var Bg=function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var u={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=a[t].length-1,f=a[t][l];return f&&f.callAtLast?a[t].splice(l,0,u):a[t].push(u),this},e.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length},e.prototype.off=function(t,r){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(r){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==r&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},e.prototype.trigger=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,u=0;u<s;u++){var l=i[u];if(!(a&&a.filter&&l.query!=null&&!a.filter(t,l.query)))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,r[0]);break;case 2:l.h.call(l.ctx,r[0],r[1]);break;default:l.h.apply(l.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],u=i.length,l=0;l<u;l++){var f=i[l];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,r[0]);break;case 2:f.h.call(s,r[0],r[1]);break;default:f.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e}();const Pe=Bg;var Ng=Math.log(2);function Vs(e,t,r,n,i,a){var o=n+"-"+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var u=Math.round(Math.log((1<<s)-1&~i)/Ng);return e[r][u]}for(var l=n|1<<r,f=r+1;n&1<<f;)f++;for(var h=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(h+=(v%2?-1:1)*e[r][c]*Vs(e,t-1,f,l,i|d,a),v++)}return a[o]=h,h}function Ol(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},i=Vs(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Vs(r,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(u,l,f){var h=l*a[6]+f*a[7]+1;u[0]=(l*a[0]+f*a[1]+a[2])/h,u[1]=(l*a[3]+f*a[4]+a[5])/h}}}var kl="___zrEVENTSAVED",Eo=[];function dM(e,t,r,n,i){return Ws(Eo,t,n,i,!0)&&Ws(e,r,Eo[0],Eo[1])}function Ws(e,t,r,n,i){if(t.getBoundingClientRect&&ot.domSupported&&!Dv(t)){var a=t[kl]||(t[kl]={}),o=zg(t,a),s=Hg(o,a,i);if(s)return s(e,r,n),!0}return!1}function zg(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,u=a%2,l=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[u]+":0",i[l]+":0",n[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function Hg(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],u=!0,l=0;l<4;l++){var f=e[l].getBoundingClientRect(),h=2*l,c=f.left,v=f.top;o.push(c,v),u=u&&a&&c===a[h]&&v===a[h+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return u&&i?i:(t.srcCoords=o,t[n]=r?Ol(s,o):Ol(o,s))}function Dv(e){return e.nodeName.toUpperCase()==="CANVAS"}var Gg=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oo=[],Vg=ot.browser.firefox&&+ot.browser.version.split(".")[0]<39;function Us(e,t,r,n){return r=r||{},n?Fl(e,t,r):Vg&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):Fl(e,t,r),r}function Fl(e,t,r){if(ot.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(Dv(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Ws(Oo,e,n,i)){r.zrX=Oo[0],r.zrY=Oo[1];return}}r.zrX=r.zrY=0}function Wu(e){return e||window.event}function ie(e,t,r){if(t=Wu(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Us(e,o,t,r)}else{Us(e,t,t,r);var a=Wg(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Gg.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Wg(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Ug(e,t,r,n){e.addEventListener(t,r,n)}function Yg(e,t,r,n){e.removeEventListener(t,r,n)}var $g=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function pM(e){return e.which===2||e.which===3}var Xg=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o<s;o++){var u=i[o],l=Us(n,u,{});a.points.push([l.zrX,l.zrY]),a.touches.push(u)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in ko)if(ko.hasOwnProperty(r)){var n=ko[r](this._track,t);if(n)return n}},e}();function Bl(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function qg(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ko={pinch:function(e,t){var r=e.length;if(r){var n=(e[r-1]||{}).points,i=(e[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Bl(n)/Bl(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=qg(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}},xv="silent";function Zg(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Kg}}function Kg(){$g(this.event)}var Qg=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Pe),xn=function(){function e(t,r){this.x=t,this.y=r}return e}(),Jg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Lv=function(e){V(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o._hovered=new xn(0,0),o.storage=r,o.painter=n,o.painterRoot=a,i=i||new Qg,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Fg(o),o}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(C(Jg,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Pv(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var u=this._hovered=a?new xn(n,i):this.findHover(n,i),l=u.target,f=this.proxy;f.setCursor&&f.setCursor(l?l.cursor:"default"),s&&l!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(u,"mousemove",r),l&&l!==s&&this.dispatchToElement(u,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new xn(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=Zg(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(u){typeof u[o]=="function"&&u[o].call(u,s),u.trigger&&u.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){for(var a=this.storage.getDisplayList(),o=new xn(r,n),s=a.length-1;s>=0;s--){var u=void 0;if(a[s]!==i&&!a[s].ignore&&(u=jg(a[s],r,n))&&(!o.topTarget&&(o.topTarget=a[s]),u!==xv)){o.target=a[s];break}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new Xg);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new xn;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(Pe);C(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Lv.prototype[e]=function(t){var r=t.zrX,n=t.zrY,i=Pv(this,r,n),a,o;if((e!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||Aa(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function jg(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?xv:!0}return!1}function Pv(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}const ty=Lv;var Rv=32,Ln=7;function ey(e){for(var t=0;e>=Rv;)t|=e&1,e>>=1;return e+t}function Nl(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i<r&&n(e[i],e[i-1])<0;)i++;ry(e,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function ry(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function zl(e,t,r,n,i){for(n===t&&n++;n<r;n++){for(var a=e[n],o=t,s=n,u;o<s;)u=o+s>>>1,i(a,e[u])<0?s=u:o=u+1;var l=n-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Fo(e,t,r,n,i,a){var o=0,s=0,u=1;if(a(e,t[r+i])>0){for(s=n-i;u<s&&a(e,t[r+i+u])>0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}else{for(s=i+1;u<s&&a(e,t[r+i-u])<=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var l=o;o=i-u,u=i-l}for(o++;o<u;){var f=o+(u-o>>>1);a(e,t[r+f])>0?o=f+1:u=f}return u}function Bo(e,t,r,n,i,a){var o=0,s=0,u=1;if(a(e,t[r+i])<0){for(s=i+1;u<s&&a(e,t[r+i-u])<0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var l=o;o=i-u,u=i-l}else{for(s=n-i;u<s&&a(e,t[r+i+u])>=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}for(o++;o<u;){var f=o+(u-o>>>1);a(e,t[r+f])<0?u=f:o=f+1}return u}function ny(e,t){var r=Ln,n,i,a=0;e.length;var o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function u(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;f(v)}}function l(){for(;a>1;){var v=a-2;v>0&&i[v-1]<i[v+1]&&v--,f(v)}}function f(v){var d=n[v],y=i[v],p=n[v+1],g=i[v+1];i[v]=y+g,v===a-3&&(n[v+1]=n[v+2],i[v+1]=i[v+2]),a--;var _=Bo(e[p],e,d,y,0,t);d+=_,y-=_,y!==0&&(g=Fo(e[d+y-1],e,p,g,g-1,t),g!==0&&(y<=g?h(d,y,p,g):c(d,y,p,g)))}function h(v,d,y,p){var g=0;for(g=0;g<d;g++)o[g]=e[v+g];var _=0,m=y,S=v;if(e[S++]=e[m++],--p===0){for(g=0;g<d;g++)e[S+g]=o[_+g];return}if(d===1){for(g=0;g<p;g++)e[S+g]=e[m+g];e[S+p]=o[_];return}for(var T=r,w,x,b;;){w=0,x=0,b=!1;do if(t(e[m],o[_])<0){if(e[S++]=e[m++],x++,w=0,--p===0){b=!0;break}}else if(e[S++]=o[_++],w++,x=0,--d===1){b=!0;break}while((w|x)<T);if(b)break;do{if(w=Bo(e[m],o,_,d,0,t),w!==0){for(g=0;g<w;g++)e[S+g]=o[_+g];if(S+=w,_+=w,d-=w,d<=1){b=!0;break}}if(e[S++]=e[m++],--p===0){b=!0;break}if(x=Fo(o[_],e,m,p,0,t),x!==0){for(g=0;g<x;g++)e[S+g]=e[m+g];if(S+=x,m+=x,p-=x,p===0){b=!0;break}}if(e[S++]=o[_++],--d===1){b=!0;break}T--}while(w>=Ln||x>=Ln);if(b)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),d===1){for(g=0;g<p;g++)e[S+g]=e[m+g];e[S+p]=o[_]}else{if(d===0)throw new Error;for(g=0;g<d;g++)e[S+g]=o[_+g]}}function c(v,d,y,p){var g=0;for(g=0;g<p;g++)o[g]=e[y+g];var _=v+d-1,m=p-1,S=y+p-1,T=0,w=0;if(e[S--]=e[_--],--d===0){for(T=S-(p-1),g=0;g<p;g++)e[T+g]=o[g];return}if(p===1){for(S-=d,_-=d,w=S+1,T=_+1,g=d-1;g>=0;g--)e[w+g]=e[T+g];e[S]=o[m];return}for(var x=r;;){var b=0,M=0,L=!1;do if(t(o[m],e[_])<0){if(e[S--]=e[_--],b++,M=0,--d===0){L=!0;break}}else if(e[S--]=o[m--],M++,b=0,--p===1){L=!0;break}while((b|M)<x);if(L)break;do{if(b=d-Bo(o[m],e,v,d,d-1,t),b!==0){for(S-=b,_-=b,d-=b,w=S+1,T=_+1,g=b-1;g>=0;g--)e[w+g]=e[T+g];if(d===0){L=!0;break}}if(e[S--]=o[m--],--p===1){L=!0;break}if(M=p-Fo(e[_],o,0,p,p-1,t),M!==0){for(S-=M,m-=M,p-=M,w=S+1,T=m+1,g=0;g<M;g++)e[w+g]=o[T+g];if(p<=1){L=!0;break}}if(e[S--]=e[_--],--d===0){L=!0;break}x--}while(b>=Ln||M>=Ln);if(L)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),p===1){for(S-=d,_-=d,w=S+1,T=_+1,g=d-1;g>=0;g--)e[w+g]=e[T+g];e[S]=o[m]}else{if(p===0)throw new Error;for(T=S-(p-1),g=0;g<p;g++)e[T+g]=o[g]}}return{mergeRuns:u,forceMergeRuns:l,pushRun:s}}function ga(e,t,r,n){r||(r=0),n||(n=e.length);var i=n-r;if(!(i<2)){var a=0;if(i<Rv){a=Nl(e,r,n,t),zl(e,r,n,r+a,t);return}var o=ny(e,t),s=ey(i);do{if(a=Nl(e,r,n,t),a<s){var u=i;u>s&&(u=s),zl(e,r,r+u,r+a,t),a=u}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Wt=1,$n=2,ln=4,Hl=!1;function No(){Hl||(Hl=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Gl(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var iy=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Gl}return e.prototype.traverse=function(t,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,r)},e.prototype.getDisplayList=function(t,r){r=r||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(r),n},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,t);n.length=this._displayListLen,ga(n,Gl)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)r=null;else if(i){r?r=r.slice():r=[];for(var a=i,o=t;a;)a.parent=o,a.updateTransform(),r.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),u=0;u<s.length;u++){var l=s[u];t.__dirty&&(l.__dirty|=Wt),this._updateAndAddDisplayable(l,r,n)}t.__dirty=0}else{var f=t;r&&r.length?f.__clipPaths=r:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(No(),f.z=0),isNaN(f.z2)&&(No(),f.z2=0),isNaN(f.zlevel)&&(No(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,r,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,r,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r<n;r++)this.delRoot(t[r]);return}var i=rt(this._roots,t);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const ay=iy;var Iv;Iv=ot.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};const Ys=Iv;var ya={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ya.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ya.bounceIn(e*2)*.5:ya.bounceOut(e*2-1)*.5+.5}};const Av=ya;var Ii=Math.pow,Ke=Math.sqrt,Ea=1e-8,Ev=1e-4,Vl=Ke(3),Ai=1/3,we=Ur(),jt=Ur(),dn=Ur();function Xe(e){return e>-Ea&&e<Ea}function Ov(e){return e>Ea||e<-Ea}function pt(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function Wl(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function kv(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),u=3*(t-e),l=e-i,f=s*s-3*o*u,h=s*u-9*o*l,c=u*u-3*s*l,v=0;if(Xe(f)&&Xe(h))if(Xe(s))a[0]=0;else{var d=-u/s;d>=0&&d<=1&&(a[v++]=d)}else{var y=h*h-4*f*c;if(Xe(y)){var p=h/f,d=-s/o+p,g=-p/2;d>=0&&d<=1&&(a[v++]=d),g>=0&&g<=1&&(a[v++]=g)}else if(y>0){var _=Ke(y),m=f*s+1.5*o*(-h+_),S=f*s+1.5*o*(-h-_);m<0?m=-Ii(-m,Ai):m=Ii(m,Ai),S<0?S=-Ii(-S,Ai):S=Ii(S,Ai);var d=(-s-(m+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var T=(2*f*s-3*o*h)/(2*Ke(f*f*f)),w=Math.acos(T)/3,x=Ke(f),b=Math.cos(w),d=(-s-2*x*b)/(3*o),g=(-s+x*(b+Vl*Math.sin(w)))/(3*o),M=(-s+x*(b-Vl*Math.sin(w)))/(3*o);d>=0&&d<=1&&(a[v++]=d),g>=0&&g<=1&&(a[v++]=g),M>=0&&M<=1&&(a[v++]=M)}}return v}function Fv(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,u=0;if(Xe(o)){if(Ov(a)){var l=-s/a;l>=0&&l<=1&&(i[u++]=l)}}else{var f=a*a-4*o*s;if(Xe(f))i[0]=-a/(2*o);else if(f>0){var h=Ke(f),l=(-a+h)/(2*o),c=(-a-h)/(2*o);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function Oa(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,u=(n-r)*i+r,l=(s-o)*i+o,f=(u-s)*i+s,h=(f-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=h,a[4]=h,a[5]=f,a[6]=u,a[7]=n}function Bv(e,t,r,n,i,a,o,s,u,l,f){var h,c=.005,v=1/0,d,y,p,g;we[0]=u,we[1]=l;for(var _=0;_<1;_+=.05)jt[0]=pt(e,r,i,o,_),jt[1]=pt(t,n,a,s,_),p=kr(we,jt),p<v&&(h=_,v=p);v=1/0;for(var m=0;m<32&&!(c<Ev);m++)d=h-c,y=h+c,jt[0]=pt(e,r,i,o,d),jt[1]=pt(t,n,a,s,d),p=kr(jt,we),d>=0&&p<v?(h=d,v=p):(dn[0]=pt(e,r,i,o,y),dn[1]=pt(t,n,a,s,y),g=kr(dn,we),y<=1&&g<v?(h=y,v=g):c*=.5);return f&&(f[0]=pt(e,r,i,o,h),f[1]=pt(t,n,a,s,h)),Ke(v)}function oy(e,t,r,n,i,a,o,s,u){for(var l=e,f=t,h=0,c=1/u,v=1;v<=u;v++){var d=v*c,y=pt(e,r,i,o,d),p=pt(t,n,a,s,d),g=y-l,_=p-f;h+=Math.sqrt(g*g+_*_),l=y,f=p}return h}function bt(e,t,r,n){var i=1-n;return i*(i*e+2*n*t)+n*n*r}function Ul(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function sy(e,t,r,n,i){var a=e-2*t+r,o=2*(t-e),s=e-n,u=0;if(Xe(a)){if(Ov(o)){var l=-s/o;l>=0&&l<=1&&(i[u++]=l)}}else{var f=o*o-4*a*s;if(Xe(f)){var l=-o/(2*a);l>=0&&l<=1&&(i[u++]=l)}else if(f>0){var h=Ke(f),l=(-o+h)/(2*a),c=(-o-h)/(2*a);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function Nv(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function ka(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function zv(e,t,r,n,i,a,o,s,u){var l,f=.005,h=1/0;we[0]=o,we[1]=s;for(var c=0;c<1;c+=.05){jt[0]=bt(e,r,i,c),jt[1]=bt(t,n,a,c);var v=kr(we,jt);v<h&&(l=c,h=v)}h=1/0;for(var d=0;d<32&&!(f<Ev);d++){var y=l-f,p=l+f;jt[0]=bt(e,r,i,y),jt[1]=bt(t,n,a,y);var v=kr(jt,we);if(y>=0&&v<h)l=y,h=v;else{dn[0]=bt(e,r,i,p),dn[1]=bt(t,n,a,p);var g=kr(dn,we);p<=1&&g<h?(l=p,h=g):f*=.5}}return u&&(u[0]=bt(e,r,i,l),u[1]=bt(t,n,a,l)),Ke(h)}function uy(e,t,r,n,i,a,o){for(var s=e,u=t,l=0,f=1/o,h=1;h<=o;h++){var c=h*f,v=bt(e,r,i,c),d=bt(t,n,a,c),y=v-s,p=d-u;l+=Math.sqrt(y*y+p*p),s=v,u=d}return l}var ly=/cubic-bezier\(([0-9,\.e ]+)\)/;function Hv(e){var t=e&&ly.exec(e);if(t){var r=t[1].split(","),n=+be(r[0]),i=+be(r[1]),a=+be(r[2]),o=+be(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(u){return u<=0?0:u>=1?1:kv(0,n,a,1,u,s)&&pt(0,i,o,1,s[0])}}}var fy=function(){function e(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||Ut,this.ondestroy=t.ondestroy||Ut,this.onrestart=t.onrestart||Ut,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var u=i%n;this._startTime=t-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Z(t)?t:Av[t]||Hv(t)},e}();const hy=fy;var Gv=function(){function e(t){this.value=t}return e}(),vy=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new Gv(t);return this.insertEntry(r),r},e.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++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),cy=function(){function e(t){this._list=new vy,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new Gv(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();const Di=cy;var Yl={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 le(e){return e=Math.round(e),e<0?0:e>255?255:e}function dy(e){return e=Math.round(e),e<0?0:e>360?360:e}function hi(e){return e<0?0:e>1?1:e}function zo(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?le(parseFloat(t)/100*255):le(parseInt(t,10))}function _n(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?hi(parseFloat(t)/100):hi(parseFloat(t))}function Ho(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function qe(e,t,r){return e+(t-e)*r}function Kt(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function $s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Vv=new Di(20),Ei=null;function Kr(e,t){Ei&&$s(Ei,t),Ei=Vv.put(e,Ei||t.slice())}function Yt(e,t){if(e){t=t||[];var r=Vv.get(e);if(r)return $s(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in Yl)return $s(t,Yl[n]),Kr(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Kt(t,0,0,0,1);return}return Kt(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Kr(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Kt(t,0,0,0,1);return}return Kt(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Kr(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var u=n.substr(0,o),l=n.substr(o+1,s-(o+1)).split(","),f=1;switch(u){case"rgba":if(l.length!==4)return l.length===3?Kt(t,+l[0],+l[1],+l[2],1):Kt(t,0,0,0,1);f=_n(l.pop());case"rgb":if(l.length!==3){Kt(t,0,0,0,1);return}return Kt(t,zo(l[0]),zo(l[1]),zo(l[2]),f),Kr(e,t),t;case"hsla":if(l.length!==4){Kt(t,0,0,0,1);return}return l[3]=_n(l[3]),Xs(l,t),Kr(e,t),t;case"hsl":if(l.length!==3){Kt(t,0,0,0,1);return}return Xs(l,t),Kr(e,t),t;default:return}}Kt(t,0,0,0,1)}}function Xs(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=_n(e[1]),i=_n(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Kt(t,le(Ho(o,a,r+1/3)*255),le(Ho(o,a,r)*255),le(Ho(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function py(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,u,l;if(o===0)u=0,l=0;else{s<.5?l=o/(a+i):l=o/(2-a-i);var f=((a-t)/6+o/2)/o,h=((a-r)/6+o/2)/o,c=((a-n)/6+o/2)/o;t===a?u=c-h:r===a?u=1/3+f-c:n===a&&(u=2/3+h-f),u<0&&(u+=1),u>1&&(u-=1)}var v=[u*360,l,s];return e[3]!=null&&v.push(e[3]),v}}function qs(e,t){var r=Yt(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Yr(r,r.length===4?"rgba":"rgb")}}function gy(e){var t=Yt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Wv(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],u=n-i;return r[0]=le(qe(o[0],s[0],u)),r[1]=le(qe(o[1],s[1],u)),r[2]=le(qe(o[2],s[2],u)),r[3]=hi(qe(o[3],s[3],u)),r}}var yy=Wv;function Uv(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Yt(t[i]),s=Yt(t[a]),u=n-i,l=Yr([le(qe(o[0],s[0],u)),le(qe(o[1],s[1],u)),le(qe(o[2],s[2],u)),hi(qe(o[3],s[3],u))],"rgba");return r?{color:l,leftIndex:i,rightIndex:a,value:n}:l}}var _y=Uv;function my(e,t,r,n){var i=Yt(e);if(e)return i=py(i),t!=null&&(i[0]=dy(t)),r!=null&&(i[1]=_n(r)),n!=null&&(i[2]=_n(n)),Yr(Xs(i),"rgba")}function Sy(e,t){var r=Yt(e);if(r&&t!=null)return r[3]=hi(t),Yr(r,"rgba")}function Yr(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function vi(e,t){var r=Yt(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function wy(){return Yr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}const gM=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Wv,fastMapToColor:yy,lerp:Uv,lift:qs,lum:vi,mapToColor:_y,modifyAlpha:Sy,modifyHSL:my,parse:Yt,random:wy,stringify:Yr,toHex:gy},Symbol.toStringTag,{value:"Module"}));var Fa=Math.round;function yM(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=Yt(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var $l=1e-4;function _M(e){return e<$l&&e>-$l}function Oi(e){return Fa(e*1e3)/1e3}function Xl(e){return Fa(e*1e4)/1e4}function mM(e){return"matrix("+Oi(e[0])+","+Oi(e[1])+","+Oi(e[2])+","+Oi(e[3])+","+Xl(e[4])+","+Xl(e[5])+")"}var SM={left:"start",right:"end",center:"middle",middle:"middle"};function wM(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function TM(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function bM(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function Ty(e){return e&&!!e.image}function by(e){return e&&!!e.svgElement}function MM(e){return Ty(e)||by(e)}function My(e){return e.type==="linear"}function Cy(e){return e.type==="radial"}function CM(e){return e&&(e.type==="linear"||e.type==="radial")}function DM(e){return"url(#"+e+")"}function xM(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function LM(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*jn,i=X(e.scaleX,1),a=X(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,u=[];return(t||r)&&u.push("translate("+t+"px,"+r+"px)"),n&&u.push("rotate("+n+")"),(i!==1||a!==1)&&u.push("scale("+i+","+a+")"),(o||s)&&u.push("skew("+Fa(o*jn)+"deg, "+Fa(s*jn)+"deg)"),u.join(" ")}var PM=function(){return ot.hasGlobalWindow&&Z(window.btoa)?function(e){return window.btoa(unescape(e))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),Zs=Array.prototype.slice;function Ee(e,t,r){return(t-e)*r+e}function Go(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=Ee(t[a],r[a],n);return e}function Dy(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Ee(t[o][s],r[o][s],n)}return e}function ki(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+r[a]*n;return e}function ql(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+r[o][s]*n}return e}function xy(e,t){for(var r=e.length,n=t.length,i=r>n?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function Ly(e,t,r){var n=e,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var u=a;u<o;u++)n.push(r===1?i[u]:Zs.call(i[u]))}for(var l=n[0]&&n[0].length,u=0;u<n.length;u++)if(r===1)isNaN(n[u])&&(n[u]=i[u]);else for(var f=0;f<l;f++)isNaN(n[u][f])&&(n[u][f]=i[u][f])}}function _a(e){if(Rt(e)){var t=e.length;if(Rt(e[0])){for(var r=[],n=0;n<t;n++)r.push(Zs.call(e[n]));return r}return Zs.call(e)}return e}function ma(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function Py(e){return Rt(e&&e[0])?2:1}var Fi=0,Sa=1,Yv=2,Xn=3,Ks=4,Qs=5,Zl=6;function Kl(e){return e===Ks||e===Qs}function Bi(e){return e===Sa||e===Yv}var Pn=[0,0,0,0],Ry=function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Zl,u=r;if(Rt(r)){var l=Py(r);s=l,(l===1&&!st(r[0])||l===2&&!st(r[0][0]))&&(o=!0)}else if(st(r)&&!li(r))s=Fi;else if(G(r))if(!isNaN(+r))s=Fi;else{var f=Yt(r);f&&(u=f,s=Xn)}else if(Mi(r)){var h=O({},u);h.colorStops=Y(r.colorStops,function(v){return{offset:v.offset,color:Yt(v.color)}}),My(r)?s=Ks:Cy(r)&&(s=Qs),u=h}a===0?this.valType=s:(s!==this.valType||s===Zl)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:u,rawValue:r,percent:0};return n&&(c.easing=n,c.easingFunc=Z(n)?n:Av[n]||Hv(n)),i.push(c),c},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(y,p){return y.time-p.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,u=Bi(i),l=Kl(i),f=0;f<a;f++){var h=n[f],c=h.value,v=o.value;h.percent=h.time/t,s||(u&&f!==a-1?Ly(c,v,i):l&&xy(c.colorStops,v.colorStops))}if(!s&&i!==Qs&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var d=n[0].value,f=0;f<a;f++)i===Fi?n[f].additiveValue=n[f].value-d:i===Xn?n[f].additiveValue=ki([],n[f].value,d,-1):Bi(i)&&(n[f].additiveValue=i===Sa?ki([],n[f].value,d,-1):ql([],n[f].value,d,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,u=this.propName,l=a===Xn,f,h=this._lastFr,c=Math.min,v,d;if(s===1)