jmgraph 3.1.79 → 3.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(r){var t;t=function(t,e,n){var i=function o(s,a,u){function c(e,t){if(!a[e]){if(!s[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(f)return f(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[e]={exports:{}};s[e][0].call(r.exports,function(t){return c(s[e][1][t]||t)},r,r.exports,o,s,a,u)}return a[e].exports}for(var f="function"==typeof require&&require,t=0;t<u.length;t++)c(u[t]);return c}({1:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArraw",{enumerable:!0,get:function(){return r.jmArraw}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return o.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return s.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return a.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return u.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return c.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return f.jmRect}}),Object.defineProperty(n,"jmArrawLine",{enumerable:!0,get:function(){return h.jmArrawLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return l.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return p.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return y.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return d.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return d.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return d.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return d.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return d.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return d.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),r=t("./src/shapes/jmArraw.js"),o=t("./src/shapes/jmBezier.js"),s=t("./src/shapes/jmCircle.js"),a=t("./src/shapes/jmHArc.js"),u=t("./src/shapes/jmLine.js"),c=t("./src/shapes/jmPrismatic.js"),f=t("./src/shapes/jmRect.js"),h=t("./src/shapes/jmArrawLine.js"),l=t("./src/shapes/jmImage.js"),p=t("./src/shapes/jmLabel.js"),y=t("./src/shapes/jmResize.js"),d=t("./src/core/jmGraph.js");function m(t,e,n){return(m=j()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&b(r,n.prototype),r}).apply(null,arguments)}function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){return!e||"object"!==v(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w={arc:i.jmArc,arraw:r.jmArraw,bezier:o.jmBezier,circle:s.jmCircle,harc:a.jmHArc,line:u.jmLine,prismatic:c.jmPrismatic,rect:f.jmRect,arrawline:h.jmArrawLine,image:l.jmImage,img:l.jmImage,label:p.jmLabel,resize:y.jmResize},x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(s,d.jmGraph);var i,r,e=(i=s,r=j(),function(){var t,e=_(i);if(r){var n=_(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return g(this,t)});function s(i,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var t=this instanceof s?this.constructor:void 0;return t&&t.prototype instanceof d.jmGraph?("function"==typeof r&&(o=r,r={}),(r=Object.assign({},r)).shapes=Object.assign(w,r.shapes||{}),e.call(this,i,r,o)):g(void 0,new Promise(function(t,e){var n=new s(i,r,o);t&&t(n)}))}return s}();n.jmGraph=n.default=x;n.create=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return m(x,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArraw.js":13,"./src/shapes/jmArrawLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var y=t("./jmUtils.js"),s=t("./jmList.js"),d=t("./jmGradient.js"),m=t("./jmShadow.js"),a=t("./jmProperty.js");function u(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=p(o);if(s){var r=p(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==v(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(o,a.jmProperty);var e,n,i,r=l(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t=t||{},(n=r.call(this)).__pro("type",e||(this instanceof o?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0===t.interactive||t.interactive,n.jmStyleMap={fill:"fillStyle",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},n.initializing(),n.on=n.bind,n.options=t,n}return e=o,(n=[{key:"initializing",value:function(){var e=this;this.children=this.children||new s.jmList;var n=this.children.add;this.children.add=function(t){if("object"===v(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===v(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var i={};for(var t in this.each(function(t,e){if(e){var n=e.zIndex;!n&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(i[n]||(i[n]=[])).push(e)}}),this.splice(0,this.length),i)n.call(this,i[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var l=this;if(t=t||y.jmUtils.clone(this.style,!0)){var p=this.graph.devicePixelRatio,e=function t(e,n,i){if(e){if("function"==typeof e)try{e=e.call(l)}catch(t){return void console.warn(t)}var r=v(e),o=l.jmStyleMap[i||n];if(e instanceof d.jmGradient||"string"==r&&-1<e.indexOf("-gradient"))"string"==r&&-1<e.indexOf("-gradient")&&(e=new d.jmGradient(e)),t(e.toGradient(l),o||n);else if("function"==r)o&&(e=e.call(l,o))&&t(e,o);else if(o){if("string"==r&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(o)&&(e=y.jmUtils.toColor(e)),p&&e)switch(o){case"lineWidth":e*=p;break;case"fontSize":case"font":var s=e.toString().match(/[\d\.]+/);if(s&&s.length){var a=Number(s[0])*p;e=e.toString().replace(s[0],a)}}l.context[o]=e}else switch(n){case"shadow":if("string"==r){t(new m.jmShadow(e),n);break}for(var u in e)t(e[u],u,n+"."+u);break;case"translate":l.context.translate(e.x,e.y);break;case"rotation":if(!e.angle)break;var c=0,f=0;if(e.point){var h=l.absoluteBounds?l.absoluteBounds:l.getAbsoluteBounds();c=(e=l.getRotation(e)).rotateX+h.left,f=e.rotateY+h.top}0==c&&0==f||l.context.translate(c,f),l.context.rotate(e.angle),0==c&&0==f||l.context.translate(-c,-f);break;case"transform":Array.isArray(e)?l.context.transform.apply(l.context,e):"object"==v(e)&&l.context.transform(e.scaleX,e.skewX,e.skewY,e.scaleY,e.offsetX,e.offsetY);break;case"cursor":l.cursor=e}}};for(var n in this.translate&&e(this.translate,"translate"),this.transform&&e(this.transform,"transform"),t)if("constructor"!==n){var i=v(t[n]);"string"==i&&-1<t[n].indexOf("-gradient")?t[n]=new d.jmGradient(t[n]):"string"==i&&"shadow"==n&&(t[n]=new m.jmShadow(t[n])),e(t[n],n)}}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.canvas.width?e.right=this.canvas.width:this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.canvas.height?e.bottom=this.canvas.height:this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length)for(var n in this.points){var i=this.points[n];(void 0===e.left||e.left>i.x)&&(e.left=i.x),(void 0===e.top||e.top>i.y)&&(e.top=i.y),(void 0===e.right||e.right<i.x)&&(e.right=i.x),(void 0===e.bottom||e.bottom<i.y)&&(e.bottom=i.y)}else if(this.getLocation){var r=this.getLocation();r&&(e.left=r.left,e.top=r.top,e.right=r.left+r.width,e.bottom=r.top+r.height)}return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getLocation",value:function(){!(0<arguments.length&&void 0!==arguments[0])||arguments[0];var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():y.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():y.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():y.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():y.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=y.jmUtils.clone(this.style.margin,{});if(e.left=(e.left||0)*this.graph.devicePixelRatio,e.top=(e.top||0)*this.graph.devicePixelRatio,e.right=(e.right||0)*this.graph.devicePixelRatio,e.bottom=(e.bottom||0)*this.graph.devicePixelRatio,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),!this.parent)return t;var n=this.parent.getBounds();return y.jmUtils.checkPercent(t.left)&&(t.left=y.jmUtils.percentToNumber(t.left)*n.width),y.jmUtils.checkPercent(t.top)&&(t.top=y.jmUtils.percentToNumber(t.top)*n.height),y.jmUtils.checkPercent(t.width)&&(t.width=y.jmUtils.percentToNumber(t.width)*n.width),y.jmUtils.checkPercent(t.height)&&(t.height=y.jmUtils.percentToNumber(t.height)*n.height),t.center&&(y.jmUtils.checkPercent(t.center.x)&&(t.center.x=y.jmUtils.percentToNumber(t.center.x)*n.width),y.jmUtils.checkPercent(t.center.y)&&(t.center.y=y.jmUtils.percentToNumber(t.center.y)*n.height)),t.radius&&y.jmUtils.checkPercent(t.radius)&&(t.radius=y.jmUtils.percentToNumber(t.radius)*Math.min(n.width,n.height)),t}},{key:"getRotation",value:function(t){if(t=t||this.style.rotation){var e=this.getBounds();t.rotateX=t.point.x,y.jmUtils.checkPercent(t.rotateX)&&(t.rotateX=y.jmUtils.percentToNumber(t.rotateX)*e.width),t.rotateY=t.point.y,y.jmUtils.checkPercent(t.rotateY)&&(t.rotateY=y.jmUtils.percentToNumber(t.rotateY)*e.height)}else if(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null){var n=this.getBounds();t.rotateX-=n.left,t.rotateY-=n.top}return t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,i){n=!1!==n;var r=this.getLocation(!0),o=!1;if(r.position&&(r.left+=t,r.top+=e,this.position.x=r.left,this.position.y=r.top,o=!0),r.center&&(this.center.x=r.center.x+t,this.center.y=r.center.y+e,o=!0),r.start&&"object"==v(r.start)&&(this.start.x=r.start.x+t,this.start.y=r.start.y+e,o=!0),r.end&&"object"==v(r.end)&&(this.end.x=r.end.x+t,this.end.y=r.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var a=s.length,u=0;u<a;u++)s[u].x+=t,s[u].y+=e;o=!0}}if(0==o&&this.points){for(var c=this.points.length,f=0;f<c;f++)this.points[f].x+=t,this.points[f].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:i}),this.needUpdate=!0}},{key:"rotate",value:function(t,e){this.style.rotation={angle:t,point:e},this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath()}},{key:"endDraw",value:function(){this.style.close&&this.context.closePath(),this.style.fill&&this.context.fill(),!this.style.stroke&&this.style.fill||this.context.stroke(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=this.parent&&this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var i=this.points[n];i.m?this.context.moveTo(i.x+t.left,i.y+t.top):this.context.lineTo(i.x+t.left,i.y+t.top)}}}},{key:"paint",value:function(t){if(!1!==t&&!1!==this.visible){this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds();var e=!0;!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width?e=!1:this.absoluteBounds.top>=this.graph.height?e=!1:this.absoluteBounds.right<=0?e=!1:this.absoluteBounds.bottom<=0&&(e=!1)),this.context.save(),this.emit("beginDraw",this),this.setStyle(),e&&this.beginDraw&&this.beginDraw(),e&&this.draw&&this.draw(),e&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore(),this.is("jmGraph")&&this.context.draw&&this.context.draw(),this.needUpdate=!1}}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,i=u(t=t.split(" "));try{for(i.s();!(n=i.n()).done;){var r=n.value;r&&this.bind(r,e)}}catch(t){i.e(t)}finally{i.f()}}else{var o=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new s.jmList);o.contain(e)||o.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,i=u(t=t.split(" "));try{for(i.s();!(n=i.n()).done;){var r=n.value;r&&this.unbind(r,e)}}catch(t){i.e(t)}finally{i.f()}}else{var o=this.getEvent(t);o&&(e?o.remove(e):o.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var e=this.getEvent(t);if(e){var i=this;Array.isArray(n)||(n=[n]),e.each(function(t,e){!1===e.apply(i,n)&&(n.cancel=!0)})}return n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),i=n.left+(this.canvas.clientWidth||this.canvas.offsetWidth||this.canvas.width),r=n.top+(this.canvas.clientHeight||this.canvas.offsetHeight||this.canvas.height);return!(t.pageX>i||t.pageX<n.left)&&!(t.pageY>r||t.pageY<n.top)}var o=this.getBounds(),s=this.getRotation(),a=this.points;if(a&&a.length||((a=[]).push({x:o.left,y:o.top}),a.push({x:o.right,y:o.top}),a.push({x:o.right,y:o.bottom}),a.push({x:o.left,y:o.bottom}),a.push({x:o.left,y:o.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),a&&a.length){if(s&&0!=s.angle&&(a=y.jmUtils.clone(a,!0),a=y.jmUtils.rotatePoints(a,{x:s.rotateX+o.left,y:s.rotateY+o.top},s.angle)),2<a.length&&(!this.style.fill||this.style.stroke)){for(var u=0,c=a.length,f=u+1;f<=c;f=++u+1){if(f==c){if(this.style.close)if(y.jmUtils.pointInPolygon(t,[a[u],a[0]],e))return!0}else if(y.jmUtils.pointInPolygon(t,[a[u],a[f]],e))return!0}if(!this.style.fill)return!1}return y.jmUtils.pointInPolygon(t,a,e)}return!(t.x>o.right||t.x<o.left)&&!(t.y>o.bottom||t.y<o.top)}},{key:"raiseEvent",value:function(n,i){if(!1!==this.visible){if(!i.position){var t=this.graph,e=i.srcElement||i.target,r=y.jmUtils.getEventPosition(i,t.scaleSize);0<t.devicePixelRatio&&(r.x=r.offsetX=r.x*devicePixelRatio,r.y=r.offsetY=r.y*devicePixelRatio),i={position:r,button:0==i.button||r.isTouch?1:i.button,keyCode:i.keyCode||i.charCode||i.which,ctrlKey:i.ctrlKey,cancel:!1,event:i,srcElement:e}}i.path=i.path||[];var o=!1;if(this.children&&this.children.each(function(t,e){if(!0!==i.cancel&&(o=!1===e.raiseEvent(n,i)||o))return!1},!0),o)return!1;var s=this.parent&&this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;if(!s)return!1;i.position.x=i.position.offsetX-s.left,i.position.y=i.position.offsetY-s.top;var a=!1!==this.interactive&&this.checkPoint(i.position);return a?(i.target||(i.target=this),this.runEventAndPopEvent(n,i),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",i))):!1===this.interactive||a||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",i)),!1===i.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){var e=this.getEvent(t);e&&e.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){if(!this.__mvMonitor){this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0};var a=this;this.__mvMonitor.mv=function(t){var e=a;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n=e.parent.getAbsoluteBounds(),i=t.position.offsetX-e.__mvMonitor.curposition.x,r=t.position.offsetY-e.__mvMonitor.curposition.y;if(e.lockSide){var o=e.bounds||e.getAbsoluteBounds(),s=y.jmUtils.checkOutSide(n,o,{x:i,y:r});s.left<0?e.lockSide.left&&(i-=s.left):0<s.right&&e.lockSide.right&&(i-=s.right),s.top<0?e.lockSide.top&&(r-=s.top):0<s.bottom&&e.lockSide.bottom&&(r-=s.bottom)}return(i||r)&&(e.offset(i,r,!0,t),e.__mvMonitor.curposition.x=t.position.offsetX,e.__mvMonitor.curposition.y=t.position.offsetY),!1}},this.__mvMonitor.mu=function(t){var e=a;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=a;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}}return e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this}},{key:"type",get:function(){return this.__pro("type")}},{key:"context",get:function(){var t=this.__pro("context");if(t)return t;if(this.is("jmGraph")&&this.canvas)return this.context=this.canvas.getContext("2d");var e=this.graph;return e?e.context:e.canvas.getContext("2d")},set:function(t){return this.__pro("context",t)}},{key:"style",get:function(){var t=this.__pro("style");return t||(t=this.__pro("style",{})),t},set:function(t){return this.needUpdate=!0,this.__pro("style",t)}},{key:"visible",get:function(){var t=this.__pro("visible");return void 0===t&&(t=this.__pro("visible",!0)),t},set:function(t){return this.needUpdate=!0,this.__pro("visible",t)}},{key:"interactive",get:function(){return this.__pro("interactive")},set:function(t){return this.__pro("interactive",t)}},{key:"children",get:function(){var t=this.__pro("children");return t||(t=this.__pro("children",new s.jmList)),t},set:function(t){return this.needUpdate=!0,this.__pro("children",t)}},{key:"width",get:function(){var t=this.__pro("width");return void 0===t&&(t=this.__pro("width",0)),t},set:function(t){return this.needUpdate=!0,this.__pro("width",t)}},{key:"height",get:function(){var t=this.__pro("height");return void 0===t&&(t=this.__pro("height",0)),t},set:function(t){return this.needUpdate=!0,this.__pro("height",t)}},{key:"zIndex",get:function(){var t=this.__pro("zIndex");return t||(t=this.__pro("zIndex",0)),t},set:function(t){return this.needUpdate=!0,this.__pro("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",set:function(t){var e=this.graph;e&&e.css("cursor",t)},get:function(){var t=this.graph;if(t)return t.css("cursor")}}])&&f(e.prototype,n),i&&f(e,i),o}();n.jmControl=n.default=i},{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}var u=function(){function n(t,e){r(this,n),this.container=t,this.target=e||t,this.mouseHandler=new c(this,t,e),this.keyHandler=new f(this,t,e)}return a(n,[{key:"touchStart",value:function(t){if(t=t||window.event,this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if(t=t||window.event,this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if(t=t||window.event,this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if(t=t||window.event,this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destory",value:function(){this.mouseHandler.destory(),this.keyHandler.destory()}}]),n}();n.jmEvents=n.default=u;var c=function(){function i(t,e,n){r(this,i),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return a(i,[{key:"init",value:function(e,n,t){var i=this.target,r=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){t=t||window.event;n.raiseEvent("mousedown",t)}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if(((t=t||window.event).target||t.srcElement)==i){n.raiseEvent("mousemove",t);return t.preventDefault&&t.preventDefault(),!1}}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mouseover",function(t){t=t||window.event,n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){t=t||window.event,n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){t=t||window.event,n.raiseEvent("mouseout",t)}),r&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(r,"mouseup",function(t){if(t=t||window.event,!1===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){t=t||window.event,n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){t=t||window.event,n.raiseEvent("click",t)}),r&&(this.eventEvents.resize=o.jmUtils.bindEvent(r,"resize",function(t){return t=t||window.event,n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return e.touchMove(t)},{passive:!1}),r&&(this.eventEvents.touchend=o.jmUtils.bindEvent(r,"touchend",function(t){return e.touchEnd(t)},{passive:!1})),r&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(r,"touchcancel",function(t){return e.touchCancel(t)},{passive:!1}))}},{key:"destory",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),i}(),f=function(){function i(t,e,n){r(this,i),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return a(i,[{key:"init",value:function(n,t){var e=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null,i=function(t){var e=t.srcElement||t.target;return!e||"INPUT"!=e.tagName&&"TEXTAREA"!=e.tagName&&"ANCHOR"!=e.tagName&&"FORM"!=e.tagName&&"FILE"!=e.tagName&&"IMG"!=e.tagName&&"HIDDEN"!=e.tagName&&"RADIO"!=e.tagName&&"TEXT"!=e.tagName};e&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,i(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,i(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,i(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destory",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),i}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var m=t("./jmUtils.js"),r=t("./jmList.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var i=function(){function n(t){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.stops=new r.jmList,t&&"object"==o(t))for(var e in t)this[e]=t[e];else"string"==typeof t&&this.fromString(t)}var t,e,i;return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var i,e=t.context||t,n=t.absoluteBounds?t.absoluteBounds:t.getAbsoluteBounds(),r=this.x1||0,o=this.y1||0,s=this.x2,a=this.y2,u=t.getLocation(),c=0;u.radius&&(c=2*u.radius),c||(c=Math.min(u.width,u.height)),m.jmUtils.checkPercent(r)&&(r=m.jmUtils.percentToNumber(r)*(n.width||c)),m.jmUtils.checkPercent(s)&&(s=m.jmUtils.percentToNumber(s)*(n.width||c)),m.jmUtils.checkPercent(o)&&(o=m.jmUtils.percentToNumber(o)*(n.height||c)),m.jmUtils.checkPercent(a)&&(a=m.jmUtils.percentToNumber(a)*(n.height||c));var f=Number(r)+n.left,h=Number(o)+n.top,l=Number(s)+n.left,p=Number(a)+n.top;if("linear"===this.type)i=e.createLinearGradient(f,h,l,p);else if("radial"===this.type){var y=this.r1||0,d=this.r2;m.jmUtils.checkPercent(y)&&(y=m.jmUtils.percentToNumber(y),y*=c),m.jmUtils.checkPercent(d)&&(d=m.jmUtils.percentToNumber(d),d*=c),i=e.createCircularGradient?e.createCircularGradient(f,h,d):e.createRadialGradient(f,h,y,l,p,d)}return this.stops.each(function(t,e){var n=m.jmUtils.toColor(e.color);i.addColorStop(e.offset,n)}),i}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();var n=m.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?n.length<=2?(this.x2=n[0],this.y2=n[1]||0):(this.x1=n[0],this.y1=n[1],this.x2=n[2],this.y2=n[3]):n.length<=3?(this.x2=n[0],this.y2=n[1]||0,this.r2=n[2]||0):(this.x1=n[0],this.y1=n[1],this.r1=n[2],this.x2=n[3],this.y2=n[3],this.r2=n[3]);var i=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(i&&i.length)for(var r=0;r<i.length;r++){var o=m.jmUtils.trim(i[r]),s=o.lastIndexOf(" ");if(-1<s){var a=Number(o.substr(s+1)),u=m.jmUtils.trim(o.substr(0,s));!isNaN(a)&&u&&this.addStop(a,u)}}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&s(t.prototype,e),i&&s(t,i),n}();n.jmGradient=n.default=i},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return a.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return i.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return r.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return f.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return h.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return l.jmPath}}),n.jmGraph=n.default=void 0;var a=t("./jmUtils.js"),i=t("./jmList.js"),r=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),f=t("./jmEvents.js"),h=t("./jmControl.js"),l=t("./jmPath.js");function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e,n){return(y=b()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&m(r,n.prototype),r}).apply(null,arguments)}function d(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(o){var s=b();return function(){var t,e,n,i=g(o);if(s){var r=g(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==p(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(s,h.jmControl);var e,n,i,o=v(s);function s(t,e,n){var i;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),"function"==typeof e&&(n=e,e={}),(e=e||{}).interactive=!0,(i=o.call(this,e,"jmGraph")).option=e||{},i.devicePixelRatio=1,i.util=i.utils=a.jmUtils,"undefined"!=typeof wx&&wx.createCanvasContext)i.context=wx.createCanvasContext(t),t=wx.createSelectorQuery().select("#"+t);else{if("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),"CANVAS"!=t.tagName){i.container=t;var r=document.createElement("canvas");t.appendChild(r),r.width=t.offsetWidth||t.clientWidth,r.height=t.offsetHeight||t.clientHeight,t=r}else i.container=t.parentElement;i.context=t.getContext("2d")}return i.canvas=t,i.__init(n),i}return e=s,i=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return y(s,e)}}],(n=[{key:"__init",value:function(t){this.shapes=Object.assign({path:l.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate(-.5,-.5)}),0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new f.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){var n="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;1<n&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this.canvas.height=e*n,this.canvas.width=t*n,this.context.scale(n,n),this.devicePixelRatio=n)}},{key:"pointToPixes",value:function(t){return this.devicePixelRatio&&1!==this.devicePixelRatio&&(t=Object.assign({},t,{x:t.x/this.devicePixelRatio,y:t.y/this.devicePixelRatio})),t}},{key:"getPosition",value:function(){var t=a.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.canvas.width,t.height=this.canvas.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if("string"==typeof t&&(t=this.shapes[t]),t)return e||(e={}),e.graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,i){return new u.jmShadow(t,e,n,i)}},{key:"createLinearGradient",value:function(t,e,n,i){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:i})}},{key:"createRadialGradient",value:function(t,e,n,i,r,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:i,y2:r,r2:o})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e?(this.canvas.width=t,this.canvas.height=e,this.scaleSize&&this.context.scale&&this.context.scale(this.scaleSize.x,this.scaleSize.y)):(t=this.canvas.width,e=this.canvas.height,this.scaleSize&&(t/=this.scaleSize.x,e/=this.scaleSize.y)),this.style&&this.style.fill?this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}]:this.context.clearRect&&this.context.clearRect(0,0,t,e)}},{key:"css",value:function(t,e){if(this.canvas)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",{points:t,style:e})}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.context.scale(t,e),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:t,y:e},this.refresh()}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(e){if(!this.___isAutoRefreshing){var n=this;return this.___isAutoRefreshing=!0,requestAnimationFrame(function t(){n.destoryed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),requestAnimationFrame(t),e&&e())}),this}}},{key:"destory",value:function(){this.eventHandler.destory(),this.destoryed=!0}},{key:"width",get:function(){return this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&(this.canvas.width=t,this.resize(t)),t}},{key:"height",get:function(){return this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&(this.canvas.height=t,this.resize(0,t)),t}}])&&d(e.prototype,n),i&&d(e,i),s}();n.jmGraph=n.default=o},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function h(t){var i="function"==typeof Map?new Map:void 0;return(h=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,n)}function n(){return r(t,arguments,y(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,t)})(t)}function r(t,e,n){return(r=l()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&p(r,n.prototype),r}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(a,h(Array));var i,r,e,n,o,s=(i=a,r=l(),function(){var t,e=y(i);if(r){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return f(this,t)});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=[],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];if(i&&i.length&&Array.isArray(i[0])){for(var o=0;o<i[0].length;o++)e.push(i[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",f(t)}return e=a,(n=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==u(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){if(this.length>t){var e=this[t];this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t)}}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e)for(var n=this.length-1;0<=n;n--){if(!1===t.call(this,n,this[n]))break}else for(var i=this.length,r=0;r<i;r++){if(!1===t.call(this,r,this[r]))break}}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,i=0;i<n;i++)t(this[i])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&c(e.prototype,n),o&&c(e,o),a}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var r=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}Symbol("jmchart#animate#counter");var i=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t)}var t,n,i;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new r.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}if(this.animateHandles&&0<this.animateHandles.count()){var o=this;this.dispatcher=setTimeout(function(n){n=n||o;var i=[],r=(new Date).getTime();for(var t in n.animateHandles.each(function(t,e){try{if(e&&e.handle&&(!e.times||r-e.times>=e.millisec))!1===e.handle.apply(n,e.params)&&i.push(e),e.times=r}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&i.push(e)}}),i)n.animateHandles.remove(i[t]);n.animate()},10,this)}}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),i&&o(t,i),e}();n.jmObject=n.default=i},{"./jmList.js":6}],8:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var s=t("./jmControl.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmControl);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t,n)).points=t&&t.points?t.points:[],e}return e=o,(n=[{key:"points",get:function(){return this.__pro("points")},set:function(t){return this.needUpdate=!0,this.__pro("points",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmPath=n.default=i},{"./jmControl.js":2}],9:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var s=t("./jmObject.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=Symbol("properties"),i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmObject);var e,n,i,r=f(o);function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this))[l]={},t}return e=o,(n=[{key:"__pro",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var i=this[l],r=e[0];if(1<e.length){var o=e[1],s={oldValue:i[r],newValue:o};return i[r]=e[1],this.emit&&this.emit("propertyChange",r,s),e[1]}if(1==e.length)return i[r]}}},{key:"needUpdate",get:function(){return this.__pro("needUpdate")},set:function(t){this.__pro("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){var t=this.__pro("graph");return t=t||this.__pro("graph",this.findParent("jmGraph"))},set:function(t){return this.__pro("graph",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmProperty=n.default=i},{"./jmObject.js":7}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var i=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var r=function(){function r(t,e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),"string"!=typeof t||e||n||i?(this.x=t,this.y=e,this.blur=n,this.color=i):this.fromString(t)}var t,e,n;return t=r,(e=[{key:"fromString",value:function(t){if(t){var e=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return e&&(this.x=e[1]||0,this.y=e[2]||0,e[3]&&(e[3]=i.jmUtils.trim(e[3],", "),0===e[3].indexOf("#")||/^rgb/i.test(e[3])?this.color=e[3]:this.blur=i.jmUtils.trim(e[3],", ")),e[4]&&(this.color=i.jmUtils.trim(e[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),r}();n.jmShadow=n.default=r},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var c=t("./jmList.js");function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,i=[{key:"clone",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof i){var o=i(t,n,r);if(o)return o}if("boolean"==typeof e&&(n=e,e=void 0),100<++r)return e;if(t&&"object"===f(t)){if(e=e||{},this.isType(t,c.jmList))return new c.jmList(t);if(Array.isArray(t)){if(n){for(var s=[],a=0;a<t.length;a++)s.push(this.clone(t[a],e[a],n,i,r));return s}return t.slice(0)}for(var u in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==u&&("object"!==f(e[u])&&void 0!==e[u]||(e[u]=this.clone(t[u],e[u],n,i,r)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,i){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var r=e.split(" "),o=0;o<r.length;o++)this.bindEvent(t,r[o],n,i);return t.attachEvent?t.attachEvent("on"+e,n,i):t.addEventListener&&t.addEventListener(e,n,i),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=!1,i=(t=t||event).changedTouches||t.targetTouches||t.touches,r=t.target||t.srcElement;i&&((t=i[0]).target||(t.target=r),n=!0);var o=t.pageX||t.x;void 0===o&&(o=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var s=t.pageY||t.y;void 0===s&&(s=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var a=t.offsetX,u=t.offsetY;if(void 0===a&&void 0===u){var c=this.getElementPosition(r);a=o-c.left,u=s-c.top}return e&&(e.x&&(a/=e.x),e.y&&(u/=e.y)),{pageX:o,pageY:s,clientX:t.clientX,clientY:t.clientY,offsetX:a,offsetY:u,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:a,y:u,isTouch:n,touches:i}}},{key:"isType",value:function(t,e){return!(!t||"object"!==f(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var i,r,o=e.length,s=!1,a=!0;if(!e||0==o)return 0;if(1==o)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n;if(2==o){if(Math.min(e[0].x,e[1].x)-t.x>n||t.x-Math.max(e[0].x,e[1].x)>n)return 0;if(Math.min(e[0].y,e[1].y)-t.y>n||t.y-Math.max(e[0].y,e[1].y)>n)return 0;if(e[0].x==e[1].x)return Math.abs(e[0].x-t.x)<=n&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0;if(e[0].y==e[1].y)return Math.abs(e[0].y-t.y)<=n&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0;if(Math.abs(e[0].x-t.x)<n&&Math.abs(e[0].y-t.y)<n)return 1;if(Math.abs(e[1].x-t.x)<n&&Math.abs(e[1].y-t.y)<n)return 1;if(t.y==e[0].y||t.y==e[1].y)return 0;var u=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),c=(t.y-e[0].y)/Math.sqrt(u*u+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-u);return Math.abs(c)<=n?1:0}for(i=0;i<o;++i)if(e[i].x==t.x&&e[i].y==t.y)return 1;for(;a;)for(s=a=!1,i=0,r=o-1;i<o;r=i++)if(e[i].y<t.y&&t.y<e[r].y||e[r].y<t.y&&t.y<e[i].y){if(t.x<=e[i].x||t.x<=e[r].x){var f=(t.y-e[i].y)*(e[r].x-e[i].x)/(e[r].y-e[i].y)+e[i].x;if(t.x<f)s=!s;else if(t.x==f)return 1}}else if(t.y==e[i].y){if(t.x<e[i].x){e[i].y>e[r].y?--t.y:++t.y,a=!0;break}}else if(e[i].y==e[r].y&&t.y==e[i].y&&(e[i].x<t.x&&t.x<e[r].x||e[r].x<t.x&&t.x<e[i].x)){s=!0;break}return s?2:0}},{key:"checkOutSide",value:function(t,e,n){var i={left:0,right:0,top:0,bottom:0};return n.x<0?i.left=e.left+n.x-t.left:0<n.x&&(i.right=e.right+n.x-t.right),n.y<0?i.top=e.top+n.y-t.top:0<n.y&&(i.bottom=e.bottom+n.y-t.bottom),i}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var i=Math.cos(n),r=Math.sin(n);if(t.length){for(var o=0;o<t.length;o++)if(t[o]){var s=t[o].x-e.x,a=t[o].y-e.y;t[o].x=s*i-a*r+e.x,t[o].y=s*r+a*i+e.y}}else{var u=t.x-e.x,c=t.y-e.y;t.x=u*i-c*r+e.x,t.y=u*r+c*i+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){if("string"==typeof t){var e=this.checkPercent(t);e&&(t=this.trim(e,"% "),t/=100)}return t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,i=0;i<n;i++){var r="0123456789abcdef".indexOf(t[i]);if(0!=r){for(var o=1;o<n-i;o++)r*=16;e+=r}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e,t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("#"==(t=this.trim(t))[0]){var e={a:1};if(8<=t.length)return e.a=t.substr(1,2),e.g=t.substr(5,2),e.b=t.substr(7,2),e.r=t.substr(3,2),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(7===t.length||4===t.length)return 4===t.length?(e.g=t.substr(2,1),e.g=e.g+e.g,e.b=t.substr(3,1),e.b=e.b+e.b,e.r=t.substr(1,1),e.r=e.r+e.r):(e.g=t.substr(3,2),e.b=t.substr(5,2),e.r=t.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(5===t.length)return e.a=t.substr(1,1),e.g=t.substr(3,1),e.b=t.substr(4,1),e.r=t.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e}return t}},{key:"toColor",value:function(t,e,n,i){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var r=this.hexToRGBA(t);if("string"==typeof r)return r;t=r.r||t,e=r.g||e,n=r.b||n,i=r.a||i}return void 0!==t&&void 0!==e&&void 0!==n?void 0!==i?"rgba("+t+","+e+","+n+","+i+")":"rgb("+t+","+e+","+n+")":t}}],(n=null)&&r(e.prototype,n),i&&r(e,i),t}();n.jmUtils=n.default=i},{"./jmList.js":6}],12:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var s=t("../core/jmPath.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t||(t={}),(e=r.call(this,t,n)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return e=o,(n=[{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,i=t.center.x,r=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var a=this.anticlockwise;this.points=[];var u=1/Math.max(e,n);if(a){var c=2*Math.PI;o=c-o,s=c-s}s<o&&(u=-u),this.isFan&&this.points.push(t.center);for(var f=o;;f+=u){0<u&&s<f?f=s:u<0&&f<s&&(f=s);var h={x:Math.cos(f)*e+i,y:Math.sin(f)*n+r};if(this.points.push(h),f==s)break}return this.points}}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"startAngle",get:function(){return this.__pro("startAngle")},set:function(t){return this.needUpdate=!0,this.__pro("startAngle",t)}},{key:"endAngle",get:function(){return this.__pro("endAngle")},set:function(t){return this.needUpdate=!0,this.__pro("endAngle",t)}},{key:"anticlockwise",get:function(){return this.__pro("anticlockwise")},set:function(t){return this.needUpdate=!0,this.__pro("anticlockwise",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmArc=n.default=i},{"../core/jmPath.js":8}],13:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmArraw=n.default=void 0;var s=t("../core/jmPath.js"),v=t("../core/jmUtils.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArraw";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t,n)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return e=o,(n=[{key:"initPoints",value:function(t){var e=this.angle,n=this.start,i=this.end;if(i){e||(e=Math.atan2(i.y-n.y,i.x-n.x)),this.points=[];var r=this.offsetX,o=this.offsetY,s=Math.atan2(r,o),a=e+s,u=Math.sin(a),c=Math.cos(a),f=Math.sqrt(r*r+o*o),h=u*f,l=c*f,p={x:i.x-l,y:i.y-h},y=e-s;h=(u=Math.sin(y))*f,l=(c=Math.cos(y))*f;var d={x:i.x-l,y:i.y-h},m=v.jmUtils.clone(i);return m.m=!0,this.points.push(m),this.points.push(p),t||this.style.fill?(this.points.push(d),this.points.push(i)):(this.points.push(m),this.points.push(d)),this.points}}},{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"angle",get:function(){return this.__pro("angle")},set:function(t){return this.needUpdate=!0,this.__pro("angle",t)}},{key:"offsetX",get:function(){return this.__pro("offsetX")},set:function(t){return this.needUpdate=!0,this.__pro("offsetX",t)}},{key:"offsetY",get:function(){return this.__pro("offsetY")},set:function(t){return this.needUpdate=!0,this.__pro("offsetY",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmArraw=n.default=i},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrawLine=n.default=void 0;var s=t("./jmLine.js"),a=t("./jmArraw.js");function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=p(o);if(s){var r=p(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==u(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(o,s.jmLine);var e,n,i,r=l(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(n=r.call(this,t,e||"jmArrawLine")).style.lineJoin=n.style.lineJoin||"miter",n.arraw=new a.jmArraw(t),n}return e=o,(n=[{key:"initPoints",value:function(){return this.points=f(p(o.prototype),"initPoints",this).call(this),!1!==this.arrawVisible&&(this.points=this.points.concat(this.arraw.initPoints())),this.points}}])&&c(e.prototype,n),i&&c(e,i),o}();n.jmArrawLine=n.default=i},{"./jmArraw.js":13,"./jmLine.js":20}],15:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var s=t("../core/jmPath.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,n)).cpoints=t.points||[],e}return e=o,(n=[{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var i=[],r=0;r<t.length-1;r++){var o=this.getPoint([t[r],t[r+1]],e);o&&i.push(o)}return this.getPoint(i,e)}}},{key:"offset",value:function(t,e,n){var i=this.cpoints;if(i){for(var r=i.length,o=0;o<r;o++)i[o].x+=t,i[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}},{key:"cpoints",get:function(){return this.__pro("cpoints")},set:function(t){return this.needUpdate=!0,this.__pro("cpoints",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmBezier=n.default=i},{"../core/jmPath.js":8}],16:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var s=t("./jmArc.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmArc);var e,n,i,r=f(o);function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,t,e)}return e=o,(n=[{key:"initPoints",value:function(){var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){var t=this.parent&&this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,i=this.endAngle,r=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,i,r)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmCircle=n.default=i},{"./jmArc.js":12}],17:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var s=t("./jmArc.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmArc);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t,n)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return e=o,(n=[{key:"initPoints",value:function(){var t=this.getLocation(),e=this.minRadius,n=this.maxRadius,i=this.startAngle,r=this.endAngle;if(this.anticlockwise){var o=2*Math.PI;i=o-i,r=o-r}var s=.1;r<i&&(s=-s);for(var a=[],u=[],c=i;;c+=s){0<s&&r<c?c=r:s<0&&c<r&&(c=r);var f=Math.cos(c),h=Math.sin(c),l={x:f*e+t.center.x,y:h*e+t.center.y},p={x:f*n+t.center.x,y:h*n+t.center.y};if(a.push(l),u.push(p),c===r)break}u.reverse(),this.style&&this.style.close||(u[0].m=!0),this.points=a.concat(u)}},{key:"minRadius",get:function(){return this.__pro("minRadius")},set:function(t){return this.needUpdate=!0,this.__pro("minRadius",t)}},{key:"maxRadius",get:function(){return this.__pro("maxRadius")},set:function(t){return this.needUpdate=!0,this.__pro("maxRadius",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmHArc=n.default=i},{"./jmArc.js":12}],18:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var s=t("../core/jmControl.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmControl);var e,n,i,r=f(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t=t||{},(n=r.call(this,t,e||"jmImage")).style.fill=n.fill||"transparent",n.sourceWidth=t.sourceWidth,n.sourceHeight=t.sourceHeight,n.sourcePosition=t.sourcePosition,n.image=t.image||n.style.image,n}return e=o,(n=[{key:"draw",value:function(){try{var t=this.parent&&this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;t||(t=this.parent&&this.parent.getAbsoluteBounds?this.parent.getAbsoluteBounds():this.getAbsoluteBounds());var e=this.getLocation();e.left+=t.left,e.top+=t.top;var n=this.sourcePosition,i=this.sourceWidth,r=this.sourceHeight,o=this.getImage();n||void 0!==i||void 0!==r?(void 0===i&&(i=e.width||o.width||0),void 0===r&&(r=e.height||o.height||0),n=n||{x:0,y:0},e.width&&e.height?this.context.drawImage(o,n.x,n.y,i,r,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(o,n.x,n.y,i,r,e.left,e.top,e.width,r):e.height?this.context.drawImage(o,n.x,n.y,i,r,e.left,e.top,i,e.height):this.context.drawImage(o,n.x,n.y,i,r,e.left,e.top,i,r)):e?e.width&&e.height?this.context.drawImage(o,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(o,e.left,e.top,e.width,o.height):e.height?this.context.drawImage(o,e.left,e.top,o.width,e.height):this.context.drawImage(o,e.left,e.top):this.context.drawImage(o)}catch(t){console.error&&console.error(t)}}},{key:"getBounds",value:function(){var t={},e=this.getImage(),n=this.getLocation(),i=n.width||e.width,r=n.height||e.height;return t.left=n.left,t.top=n.top,t.right=n.left+i,t.bottom=n.top+r,t.width=i,t.height=r,t}},{key:"getImage",value:function(){var t=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(t)||(t&&t.src?this.__img=t:document&&document.createElement?(this.__img=document.createElement("img"),t&&"string"==typeof t&&(this.__img.src=t)):this.__img=t),this.__img}},{key:"sourcePosition",get:function(){return this.__pro("sourcePosition")},set:function(t){return this.__pro("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.__pro("sourceWidth")},set:function(t){return this.needUpdate=!0,this.__pro("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.__pro("sourceHeight")},set:function(t){return this.needUpdate=!0,this.__pro("sourceHeight",t)}},{key:"image",get:function(){return this.__pro("image")},set:function(t){return this.needUpdate=!0,this.__pro("image",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmImage=n.default=i},{"../core/jmControl.js":2}],19:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var s=t("../core/jmControl.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=l(o);if(s){var r=l(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(o,s.jmControl);var e,n,i,r=h(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t=t||{},(n=r.call(this,t,e||"jmLabel")).style.font=n.style.font||"15px Arial",n.style.fontFamily=n.style.fontFamily||"Arial",n.style.fontSize=n.style.fontSize||15,n.style.textAlign=n.style.textAlign||"left",n.style.textBaseline=n.style.textBaseline||"middle",n.text=t.text||"",n.center=t.center||null,n}return e=o,(n=[{key:"getLocation",value:function(){var t=c(l(o.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore(),this.__size.height=this.style.fontSize?this.style.fontSize:15,this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height)),this.__size}},{key:"draw",value:function(){var t=this.parent&&this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,i=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":i+=e.height;break;case"hanging":case"alphabetic":case"middle":i+=e.height/2}var r=this.text;void 0!==r&&(this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(r,n,i,this.style.maxWidth):this.context.fillText(r,n,i):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(r,n,i,this.style.maxWidth):this.context.strokeText(r,n,i))),this.style.border&&(this.style.border.style&&(this.context.save(),this.setStyle(this.style.border.style)),this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top)),this.style.border.style&&this.context.restore())}},{key:"text",get:function(){return this.__pro("text")},set:function(t){return this.needUpdate=!0,this.__pro("text",t)}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmLabel=n.default=i},{"../core/jmControl.js":2}],20:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var s=t("../core/jmPath.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t,n)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e}return e=o,(n=[{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);n/=r,i/=r;for(var o=!1,s=this.style.dashLength||5,a=s/2,u=s;u<=r;)0==o?(this.points.push({x:t.x+n*u,y:t.y+i*u}),u+=a):(this.points.push({x:t.x+n*u,y:t.y+i*u,m:!0}),u+=s),o=!o}return this.points.push(e),this.points}},{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmLine=n.default=i},{"../core/jmPath.js":8}],21:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var s=t("../core/jmPath.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t,n)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return e=o,(n=[{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmPrismatic=n.default=i},{"../core/jmPath.js":8}],22:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var s=t("../core/jmPath.js"),h=t("./jmArc.js"),l=t("./jmLine.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=p(o);if(s){var r=p(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmPath);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t=t||{},(e=r.call(this,t,n)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return e=o,(n=[{key:"getBounds",value:function(){var t={};this.initPoints();var e=this.getLocation();return t.left=e.left,t.top=e.top,t.right=e.left+e.width,t.bottom=e.top+e.height,t.width=t.right-t.left,t.height=t.bottom-t.top,t}},{key:"initPoints",value:function(){var t=this.getLocation(),e={x:t.left,y:t.top},n={x:t.left+t.width,y:t.top},i={x:t.left+t.width,y:t.top+t.height},r={x:t.left,y:t.top+t.height};if("dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(l.jmLine,{style:this.style})),t.radius&&t.radius<t.width/2&&t.radius<t.height/2){var o=Math.PI/2,s=this.graph.createShape(h.jmArc,{radius:t.radius,anticlockwise:!1});s.center={x:t.left+t.radius,y:t.top+t.radius},s.startAngle=Math.PI,s.endAngle=Math.PI+o;var a=s.initPoints();(s=this.graph.createShape(h.jmArc,{radius:t.radius,anticlockwise:!1})).center={x:n.x-t.radius,y:n.y+t.radius},s.startAngle=Math.PI+o,s.endAngle=2*Math.PI;var u=s.initPoints();(s=this.graph.createShape(h.jmArc,{radius:t.radius,anticlockwise:!1})).center={x:i.x-t.radius,y:i.y-t.radius},s.startAngle=0,s.endAngle=o;var c=s.initPoints();(s=this.graph.createShape(h.jmArc,{radius:t.radius,anticlockwise:!1})).center={x:r.x+t.radius,y:r.y-t.radius},s.startAngle=o,s.endAngle=Math.PI;var f=s.initPoints();this.points=a.concat(u,c,f)}else this.points=[],this.points.push(e),this.dottedLine&&(this.dottedLine.start=e,this.dottedLine.end=n,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(n),this.dottedLine&&(this.dottedLine.start=n,this.dottedLine.end=i,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(i),this.dottedLine&&(this.dottedLine.start=i,this.dottedLine.end=r,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(r),this.dottedLine&&(this.dottedLine.start=r,this.dottedLine.end=e,this.points=this.points.concat(this.dottedLine.initPoints()));return this.points}},{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmRect=n.default=i},{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var s=t("./jmRect.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(o){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n,i=h(o);if(s){var r=h(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return e=this,!(n=t)||"object"!==a(n)&&"function"!=typeof n?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):n}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmRect);var e,n,i,r=f(o);function o(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t=t||{},(e=r.call(this,t,n)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.init(t),e}return e=o,(n=[{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var i=0;i<8;i++){var r=(this.graph||t.graph).createShape(s.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});r.index=i,r.visible=!0,this.resizeRects.push(r),this.children.add(r),r.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){var e=0,n=0,i=0,r=0;0==this.index?(i=-t.offsetX,e=t.offsetX):1==this.index?(i=-t.offsetX,e=t.offsetX,r=-t.offsetY,n=t.offsetY):2==this.index?(r=-t.offsetY,n=t.offsetY):3==this.index?(i=t.offsetX,r=-t.offsetY,n=t.offsetY):4==this.index?i=t.offsetX:5==this.index?(i=t.offsetX,r=t.offsetY):6==this.index?r=t.offsetY:7==this.index&&(i=-t.offsetX,i=-t.offsetX,e=t.offsetX,r=t.offsetY),this.parent.reset(e,n,i,r),this.needUpdate=!0}),e.bind("mousemove",function(){this.cursor=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"][this.index]}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,i){var r=void 0===this.style.minWidth?5:this.style.minWidth,o=void 0===this.style.minHeight?5:this.style.minHeight,s=this.getLocation();if(0!=n||0!=i){var a=s.width+n,u=s.height+i;if(r<=a||o<=u){if(r<=a?this.width=a:n=t=0,o<=u?this.height=u:i=e=0,!1!==this.movable&&(t||e)){var c=this.position;c.x=s.left+t,c.y=s.top+e,this.position=c}this.emit("resize",t,e,n,i)}}for(var f in this.resizeRects){var h=this.resizeRects[f];switch(h.index){case 0:h.position.x=-h.width/2,h.position.y=(s.height-h.height)/2;break;case 1:h.position.x=-h.width/2,h.position.y=-h.height/2;break;case 2:h.position.x=(s.width-h.width)/2,h.position.y=-h.height/2;break;case 3:h.position.x=s.width-h.width/2,h.position.y=-h.height/2;break;case 4:h.position.x=s.width-h.width/2,h.position.y=(s.height-h.height)/2;break;case 5:h.position.x=s.width-h.width/2,h.position.y=s.height-h.height/2;break;case 6:h.position.x=(s.width-h.height)/2,h.position.y=s.height-h.height/2;break;case 7:h.position.x=-h.width/2,h.position.y=s.height-h.height/2}}}},{key:"rectSize",get:function(){return this.__pro("rectSize")},set:function(t){return this.__pro("rectSize",t)}},{key:"resizable",get:function(){return this.__pro("resizable")},set:function(t){return this.__pro("resizable",t)}}])&&u(e.prototype,n),i&&u(e,i),o}();n.jmResize=n.default=i},{"./jmRect.js":22}]},{},[1])(1);return r.jmGraph=i},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(r)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
1
+ !function(i){var t;t=function(t,e,n){var r=function r(i,o,s){function u(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return u(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var c="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return u.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return c.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return a.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return f.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(n,"jmArrowLine",{enumerable:!0,get:function(){return l.jmArrowLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),u=t("./src/shapes/jmCircle.js"),c=t("./src/shapes/jmHArc.js"),a=t("./src/shapes/jmLine.js"),f=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),l=t("./src/shapes/jmArrowLine.js"),p=t("./src/shapes/jmImage.js"),y=t("./src/shapes/jmLabel.js"),d=t("./src/shapes/jmResize.js"),m=t("./src/core/jmGraph.js");function v(t,e,n){return(v=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&b(r,n.prototype),r}).apply(null,arguments)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _={arc:i.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:u.jmCircle,harc:c.jmHArc,line:a.jmLine,prismatic:f.jmPrismatic,rect:h.jmRect,arrowline:l.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},x=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(s,m.jmGraph);var n,r,e=(n=s,r=j(),function(){var t,e=w(n);return g(this,r?(t=w(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function s(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var t=this instanceof s?this.constructor:void 0;return(i=Object.assign({},i)).shapes=Object.assign(_,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),e.call(this,r,i,o)):g(void 0,new Promise(function(t,e){var n=new s(r,i,o);t&&t(n)}))}return s}();n.jmGraph=n.default=x;n.create=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v(x,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArrow.js":13,"./src/shapes/jmArrowLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var p=t("./jmUtils.js"),o=t("./jmList.js"),y=t("./jmGradient.js"),d=t("./jmShadow.js"),s=t("./jmProperty.js");function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=i(n);return function(t,e){{if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(i,s.jmProperty);var t,e,n,r=h(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=t||{},(n=r.call(this)).__pro("type",e||(this instanceof i?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0===t.interactive||t.interactive,n.jmStyleMap={fill:"fillStyle",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},n.initializing(),n.on=n.bind,n.option=t,n}return t=i,(e=[{key:"type",get:function(){return this.__pro("type")}},{key:"context",get:function(){var t=this.__pro("context");if(t)return t;if(this.is("jmGraph")&&this.canvas)return this.context=this.canvas.getContext("2d");t=this.graph;return t?t.context:t.canvas.getContext("2d")},set:function(t){return this.__pro("context",t)}},{key:"style",get:function(){return this.__pro("style")||this.__pro("style",{})},set:function(t){return this.needUpdate=!0,this.__pro("style",t)}},{key:"visible",get:function(){var t=this.__pro("visible");return t=void 0===t?this.__pro("visible",!0):t},set:function(t){return this.needUpdate=!0,this.__pro("visible",t)}},{key:"interactive",get:function(){return this.__pro("interactive")},set:function(t){return this.__pro("interactive",t)}},{key:"children",get:function(){return this.__pro("children")||this.__pro("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.__pro("children",t)}},{key:"width",get:function(){var t=this.__pro("width");return t=void 0===t?this.__pro("width",0):t},set:function(t){return this.needUpdate=!0,this.__pro("width",t)}},{key:"height",get:function(){var t=this.__pro("height");return t=void 0===t?this.__pro("height",0):t},set:function(t){return this.needUpdate=!0,this.__pro("height",t)}},{key:"zIndex",get:function(){return this.__pro("zIndex")||this.__pro("zIndex",0)},set:function(t){return this.needUpdate=!0,this.__pro("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",get:function(){var t=this.graph;if(t)return t.css("cursor")},set:function(t){var e=this.graph;e&&e.css("cursor",t)}},{key:"initializing",value:function(){var e=this;this.children=this.children||new o.jmList;var n=this.children.add;this.children.add=function(t){if("object"===m(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===m(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,r={};for(t in this.each(function(t,e){var n;e&&(!(n=e.zIndex)&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(r[n]||(r[n]=[])).push(e))}),this.splice(0,this.length),r)n.call(this,r[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var h=this;if(t=t||p.jmUtils.clone(this.style,!0)){var e,n,l=this.graph.devicePixelRatio,r=function t(e,n,r){if(e){if("function"==typeof e)try{e=e.call(h)}catch(t){return void console.warn(t)}var i=m(e),r=h.jmStyleMap[r||n];if(e instanceof y.jmGradient||"string"==i&&-1<e.indexOf("-gradient"))t((e="string"==i&&-1<e.indexOf("-gradient")?new y.jmGradient(e):e).toGradient(h),r||n);else if("function"==i)r&&(e=e.call(h,r))&&t(e,r);else if(r){if("string"==i&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(r)&&(e=p.jmUtils.toColor(e)),l&&e)switch(r){case"lineWidth":e*=l;break;case"fontSize":case"font":var o,s=e.toString().match(/[\d\.]+/);s&&s.length&&(o=Number(s[0])*l,e=e.toString().replace(s[0],o))}h.context[r]=e}else switch(n){case"shadow":if("string"==i){t(new d.jmShadow(e),n);break}for(var u in e)t(e[u],u,n+"."+u);break;case"translate":h.context.translate(e.x,e.y);break;case"rotation":if(!e.angle)break;var c,a=0,f=0;e.point&&(c=h.absoluteBounds||h.getAbsoluteBounds(),a=(e=h.getRotation(e)).rotateX+c.left,f=e.rotateY+c.top),0==a&&0==f||h.context.translate(a,f),h.context.rotate(e.angle),0==a&&0==f||h.context.translate(-a,-f);break;case"transform":Array.isArray(e)?h.context.transform.apply(h.context,e):"object"==m(e)&&h.context.transform(e.scaleX,e.skewX,e.skewY,e.scaleY,e.offsetX,e.offsetY);break;case"cursor":h.cursor=e}}};for(e in this.translate&&r(this.translate,"translate"),this.transform&&r(this.transform,"transform"),t)"constructor"!==e&&("string"==(n=m(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new y.jmGradient(t[e]):"string"==n&&"shadow"==e&&(t[e]=new d.jmShadow(t[e])),r(t[e],e))}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.canvas.width?e.right=this.canvas.width:this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.canvas.height?e.bottom=this.canvas.height:this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length)for(var n in this.points){n=this.points[n];(void 0===e.left||e.left>n.x)&&(e.left=n.x),(void 0===e.top||e.top>n.y)&&(e.top=n.y),(void 0===e.right||e.right<n.x)&&(e.right=n.x),(void 0===e.bottom||e.bottom<n.y)&&(e.bottom=n.y)}else!this.getLocation||(t=this.getLocation())&&(e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height);return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():p.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():p.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():p.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():p.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=p.jmUtils.clone(this.style.margin,{});if(e.left=(e.left||0)*this.graph.devicePixelRatio,e.top=(e.top||0)*this.graph.devicePixelRatio,e.right=(e.right||0)*this.graph.devicePixelRatio,e.bottom=(e.bottom||0)*this.graph.devicePixelRatio,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),!this.parent)return t;e=this.parent.getBounds();return p.jmUtils.checkPercent(t.left)&&(t.left=p.jmUtils.percentToNumber(t.left)*e.width),p.jmUtils.checkPercent(t.top)&&(t.top=p.jmUtils.percentToNumber(t.top)*e.height),p.jmUtils.checkPercent(t.width)&&(t.width=p.jmUtils.percentToNumber(t.width)*e.width),p.jmUtils.checkPercent(t.height)&&(t.height=p.jmUtils.percentToNumber(t.height)*e.height),t.center&&(p.jmUtils.checkPercent(t.center.x)&&(t.center.x=p.jmUtils.percentToNumber(t.center.x)*e.width),p.jmUtils.checkPercent(t.center.y)&&(t.center.y=p.jmUtils.percentToNumber(t.center.y)*e.height)),t.radius&&p.jmUtils.checkPercent(t.radius)&&(t.radius=p.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height)),t}},{key:"getRotation",value:function(t){var e;return(t=t||this.style.rotation)?(e=this.getBounds(),t.rotateX=t.point.x,p.jmUtils.checkPercent(t.rotateX)&&(t.rotateX=p.jmUtils.percentToNumber(t.rotateX)*e.width),t.rotateY=t.point.y,p.jmUtils.checkPercent(t.rotateY)&&(t.rotateY=p.jmUtils.percentToNumber(t.rotateY)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=this.getBounds(),t.rotateX-=e.left,t.rotateY-=e.top),t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,r){n=!1!==n;var i=this.getLocation(!0),o=!1;if(i.position&&(i.left+=t,i.top+=e,this.position.x=i.left,this.position.y=i.top,o=!0),i.center&&(this.center.x=i.center.x+t,this.center.y=i.center.y+e,o=!0),i.start&&"object"==m(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==m(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var u=s.length,c=0;c<u;c++)s[c].x+=t,s[c].y+=e;o=!0}}if(0==o&&this.points){for(var a=this.points.length,f=0;f<a;f++)this.points[f].x+=t,this.points[f].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:r}),this.needUpdate=!0}},{key:"rotate",value:function(t,e){this.style.rotation={angle:t,point:e},this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath()}},{key:"endDraw",value:function(){this.style.close&&this.context.closePath(),this.style.fill&&this.context.fill(),!this.style.stroke&&this.style.fill||this.context.stroke(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var r=this.points[n];r.m?this.context.moveTo(r.x+t.left,r.y+t.top):this.context.lineTo(r.x+t.left,r.y+t.top)}}}},{key:"paint",value:function(t){!1!==t&&!1!==this.visible&&(this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds(),t=!0,!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width||this.absoluteBounds.top>=this.graph.height||this.absoluteBounds.right<=0||this.absoluteBounds.bottom<=0)&&(t=!1),this.context.save(),this.emit("beginDraw",this),this.setStyle(),t&&this.beginDraw&&this.beginDraw(),t&&this.draw&&this.draw(),t&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore(),this.is("jmGraph")&&this.context.draw&&this.context.draw(),this.needUpdate=!1)}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.bind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new o.jmList);t.contain(e)||t.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.unbind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t);t&&(e?t.remove(e):t.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var r,t=this.getEvent(t);return t&&(r=this,Array.isArray(n)||(n=[n]),t.each(function(t,e){!1===e.apply(r,n)&&(n.cancel=!0)})),n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),r=n.left+(this.canvas.clientWidth||this.canvas.offsetWidth||this.canvas.width),i=n.top+(this.canvas.clientHeight||this.canvas.offsetHeight||this.canvas.height);return t.pageX>r||t.pageX<n.left?!1:!(t.pageY>i||t.pageY<n.top)}var i=this.getBounds(),n=this.getRotation(),o=this.points;if(o&&o.length||((o=[]).push({x:i.left,y:i.top}),o.push({x:i.right,y:i.top}),o.push({x:i.right,y:i.bottom}),o.push({x:i.left,y:i.bottom}),o.push({x:i.left,y:i.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),o&&o.length){if(n&&0!=n.angle&&(o=p.jmUtils.clone(o,!0),o=p.jmUtils.rotatePoints(o,{x:n.rotateX+i.left,y:n.rotateY+i.top},n.angle)),2<o.length&&(!this.style.fill||this.style.stroke)){for(var s=0,u=o.length,c=s+1;c<=u;c=++s+1)if(c==u){if(this.style.close)if(p.jmUtils.pointInPolygon(t,[o[s],o[0]],e))return!0}else if(p.jmUtils.pointInPolygon(t,[o[s],o[c]],e))return!0;if(!this.style.fill)return!1}return p.jmUtils.pointInPolygon(t,o,e)}return!(t.x>i.right||t.x<i.left)&&!(t.y>i.bottom||t.y<i.top)}},{key:"raiseEvent",value:function(n,r){if(!1!==this.visible){var t,e;r.position||(t=this.graph,o=r.srcElement||r.target,e=p.jmUtils.getEventPosition(r,t.scaleSize),0<t.devicePixelRatio&&(e.x=e.offsetX=e.x*t.devicePixelRatio,e.y=e.offsetY=e.y*t.devicePixelRatio),r={position:e,button:0==r.button||e.isTouch?1:r.button,keyCode:r.keyCode||r.charCode||r.which,ctrlKey:r.ctrlKey,cancel:!1,event:r,srcElement:o}),r.path=r.path||[];var i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==r.cancel&&(i=!1===e.raiseEvent(n,r)||i))return!1},!0),i)return!1;var o=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!o)return!1;r.position.x=r.position.offsetX-o.left,r.position.y=r.position.offsetY-o.top;o=!1!==this.interactive&&this.checkPoint(r.position);return o?(r.target||(r.target=this),this.runEventAndPopEvent(n,r),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",r))):!1===this.interactive||o||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",r)),!1===r.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){t=this.getEvent(t);t&&t.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){var s;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(s=this).__mvMonitor.mv=function(t){var e=s;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n,r=e.parent.getAbsoluteBounds(),i=t.position.offsetX-e.__mvMonitor.curposition.x,o=t.position.offsetY-e.__mvMonitor.curposition.y;return e.lockSide&&(n=e.bounds||e.getAbsoluteBounds(),(n=p.jmUtils.checkOutSide(r,n,{x:i,y:o})).left<0?e.lockSide.left&&(i-=n.left):0<n.right&&e.lockSide.right&&(i-=n.right),n.top<0?e.lockSide.top&&(o-=n.top):0<n.bottom&&e.lockSide.bottom&&(o-=n.bottom)),(i||o)&&(e.offset(i,o,!0,t),e.__mvMonitor.curposition.x=t.position.offsetX,e.__mvMonitor.curposition.y=t.position.offsetY),!1}},this.__mvMonitor.mu=function(t){var e=s;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=s;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}),e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmControl=n.default=t},{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}t=function(){function n(t,e){i(this,n),this.container=t,this.target=e||t,this.mouseHandler=new c(this,t,e),this.keyHandler=new a(this,t,e)}return u(n,[{key:"touchStart",value:function(t){if((t=t||window.event).eventName="touchstart",this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if((t=t||window.event).eventName="touchmove",this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if((t=t||window.event).eventName="touchend",this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if((t=t||window.event).eventName="touchcancel",this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destory",value:function(){this.mouseHandler.destory(),this.keyHandler.destory()}}]),n}();n.jmEvents=n.default=t;var c=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return u(r,[{key:"init",value:function(e,n,t){var r=this.target,i=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown";n.raiseEvent("mousedown",t)}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==r){n.raiseEvent("mousemove",t);return t.preventDefault&&t.preventDefault(),!1}}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",n.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){(t=t||window.event).eventName="dblclick",n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",n.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return t.eventName="touchstart",e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return t.eventName="touchmove",e.touchMove(t)},{passive:!1}),i&&(this.eventEvents.touchend=o.jmUtils.bindEvent(i,"touchend",function(t){return t.eventName="touchend",e.touchEnd(t)},{passive:!1})),i&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(i,"touchcancel",function(t){return t.eventName="touchcancel",e.touchCancel(t)},{passive:!1}))}},{key:"destory",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}(),a=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return u(r,[{key:"init",value:function(n,t){function r(t){return!(t=t.srcElement||t.target)||"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName&&"ANCHOR"!=t.tagName&&"FORM"!=t.tagName&&"FILE"!=t.tagName&&"IMG"!=t.tagName&&"HIDDEN"!=t.tagName&&"RADIO"!=t.tagName&&"TEXT"!=t.tagName}var e=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destory",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var a=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function n(t){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.stops=new i.jmList,t&&"object"==o(t))for(var e in t)this[e]=t[e];else"string"==typeof t&&this.fromString(t)}var t,e,r;return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var r,e=t.context||t,n=t.absoluteBounds||t.getAbsoluteBounds(),i=this.x1||0,o=this.y1||0,s=this.x2,u=this.y2,c=t.getLocation(),t=0,t=(t=c.radius?2*c.radius:t)||Math.min(c.width,c.height);a.jmUtils.checkPercent(i)&&(i=a.jmUtils.percentToNumber(i)*(n.width||t)),a.jmUtils.checkPercent(s)&&(s=a.jmUtils.percentToNumber(s)*(n.width||t)),a.jmUtils.checkPercent(o)&&(o=a.jmUtils.percentToNumber(o)*(n.height||t)),a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u)*(n.height||t));c=Number(i)+n.left,i=Number(o)+n.top,o=Number(s)+n.left,s=Number(u)+n.top;return"linear"===this.type?r=e.createLinearGradient(c,i,o,s):"radial"===this.type&&(u=this.r1||0,n=this.r2,a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u),u*=t),a.jmUtils.checkPercent(n)&&(n=a.jmUtils.percentToNumber(n),n*=t),r=e.createCircularGradient?e.createCircularGradient(c,i,n):e.createRadialGradient(c,i,u,o,s,n)),this.stops.each(function(t,e){var n=a.jmUtils.toColor(e.color);r.addColorStop(e.offset,n)}),r}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();t=a.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?t.length<=2?(this.x2=t[0],this.y2=t[1]||0):(this.x1=t[0],this.y1=t[1],this.x2=t[2],this.y2=t[3]):t.length<=3?(this.x2=t[0],this.y2=t[1]||0,this.r2=t[2]||0):(this.x1=t[0],this.y1=t[1],this.r1=t[2],this.x2=t[3],this.y2=t[3],this.r2=t[3]);var n=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(n&&n.length)for(var r=0;r<n.length;r++){var i,o=a.jmUtils.trim(n[r]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),s=a.jmUtils.trim(o.substr(0,s)),!isNaN(i)&&s&&this.addStop(i,s))}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&s(t.prototype,e),r&&s(t,r),n}();n.jmGradient=n.default=t},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return s.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return r.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return a.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return f.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return h.jmPath}}),n.jmGraph=n.default=void 0;var s=t("./jmUtils.js"),r=t("./jmList.js"),o=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),a=t("./jmEvents.js"),f=t("./jmControl.js"),h=t("./jmPath.js");function l(t,e,n){return(l=m()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&y(r,n.prototype),r}).apply(null,arguments)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=m();return function(){var t,e=v(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(o,f.jmControl);var t,e,n,i=d(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),"function"==typeof e&&(n=e,e={}),(e=e||{}).mode=e.mode||"2d",e.interactive=!0,(r=i.call(this,e,"jmGraph")).option=e||{},r.devicePixelRatio=1,r.util=r.utils=s.jmUtils,"undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?(t=wx.createSelectorQuery().select("#"+t),r.isWXMiniApp=!0):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),"CANVAS"!=t.tagName?(r.container=t,e=document.createElement("canvas"),t.appendChild(e),e.width=t.offsetWidth||t.clientWidth,e.height=t.offsetHeight||t.clientHeight,t=e):r.container=t.parentElement),r.context||(r.context=t.getContext("2d")),r.canvas=t,r.__init(n),r}return t=o,n=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(o,e)}}],(e=[{key:"__init",value:function(t){this.shapes=Object.assign({path:h.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate(-.5,-.5)}),0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new a.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){var n="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;1<n&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this.canvas.height=e*n,this.canvas.width=t*n,this.context.scale(n,n),this.devicePixelRatio=n)}},{key:"pointToPixes",value:function(t){return t=this.devicePixelRatio&&1!==this.devicePixelRatio?Object.assign({},t,{x:t.x/this.devicePixelRatio,y:t.y/this.devicePixelRatio}):t}},{key:"width",get:function(){return this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&(this.canvas.width=t,this.resize(t)),t}},{key:"height",get:function(){return this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&(this.canvas.height=t,this.resize(0,t)),t}},{key:"getPosition",value:function(){var t=s.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.canvas.width,t.height=this.canvas.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if(t="string"==typeof t?this.shapes[t]:t)return(e=e||{}).graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,r){return new u.jmShadow(t,e,n,r)}},{key:"createLinearGradient",value:function(t,e,n,r){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:r})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:r,y2:i,r2:o})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e?(this.canvas.width=t,this.canvas.height=e,this.scaleSize&&this.context.scale&&this.context.scale(this.scaleSize.x,this.scaleSize.y)):(t=this.canvas.width,e=this.canvas.height,this.scaleSize&&(t/=this.scaleSize.x,e/=this.scaleSize.y)),this.style&&this.style.fill?this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}]:this.context.clearRect&&this.context.clearRect(0,0,t,e)}},{key:"css",value:function(t,e){if(this.canvas&&this.canvas.style)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",{points:t,style:e})}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.context.scale(t,e),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:t,y:e},this.refresh()}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(e){if(!this.___isAutoRefreshing){var n=this;return this.___isAutoRefreshing=!0,n.__requestAnimationFrameFunHandler&&s.jmUtils.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=s.jmUtils.requestAnimationFrame(function t(){n.destoryed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),n.__requestAnimationFrameFunHandler&&s.jmUtils.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=s.jmUtils.requestAnimationFrame(t),e&&e())}),this}}},{key:"destory",value:function(){this.eventHandler.destory(),this.destoryed=!0}}])&&p(t.prototype,e),n&&p(t,n),o}();n.jmGraph=n.default=t},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function f(t){var n="function"==typeof Map?new Map:void 0;return function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return r(t,arguments,p(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),l(e,t)}(t)}function r(t,e,n){return(r=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&l(r,n.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(u,f(Array));var n,r,t,e,i,s=(n=u,r=h(),function(){var t,e=p(n);return a(this,r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(r&&r.length&&Array.isArray(r[0])){for(var o=0;o<r[0].length;o++)e.push(r[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",a(t)}return t=u,(e=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==o(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){var e;this.length>t&&(e=this[t],this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t))}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e){for(var n=this.length-1;0<=n;n--)if(!1===t.call(this,n,this[n]))break}else for(var r=this.length,i=0;i<r;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,r=0;r<n;r++)t(this[r])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&c(t.prototype,e),i&&c(t,i),u}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var i=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Symbol("jmchart#animate#counter");t=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t)}var t,n,r;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new i.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}var o;this.animateHandles&&0<this.animateHandles.count()&&((o=this).dispatcher=setTimeout(function(n){n=n||o;var t,r=[],i=(new Date).getTime();for(t in n.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(n,e.params)&&r.push(e),e.times=i)}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&r.push(e)}}),r)n.animateHandles.remove(r[t]);n.animate()},10,this))}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),r&&o(t,r),e}();n.jmObject=n.default=t},{"./jmList.js":6}],8:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var o=t("./jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).points=t&&t.points?t.points:[],e}return t=i,(e=[{key:"points",get:function(){return this.__pro("points")},set:function(t){return this.needUpdate=!0,this.__pro("points",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPath=n.default=t},{"./jmControl.js":2}],9:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var o=t("./jmObject.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=Symbol("properties"),t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmObject);var t,e,n,r=c(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this))[f]={},t}return t=i,(e=[{key:"__pro",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var r=this[f],i=e[0];if(1<e.length){var o=e[1],o={oldValue:r[i],newValue:o};return r[i]=e[1],this.emit&&this.emit("propertyChange",i,o),e[1]}if(1==e.length)return r[i]}}},{key:"needUpdate",get:function(){return this.__pro("needUpdate")},set:function(t){this.__pro("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.__pro("graph")||this.__pro("graph",this.findParent("jmGraph"))},set:function(t){return this.__pro("graph",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmProperty=n.default=t},{"./jmObject.js":7}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var r=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.jmShadow=n.default=function(){function i(t,e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"string"!=typeof t||e||n||r?(this.x=t,this.y=e,this.blur=n,this.color=r):this.fromString(t)}var t,e,n;return t=i,(e=[{key:"fromString",value:function(t){if(t){t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return t&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=r.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=r.jmUtils.trim(t[3],", ")),t[4]&&(this.color=r.jmUtils.trim(t[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),i}()},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var a=t("./jmList.js");function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r,i,o;function s(t){return i.apply(this,arguments)}function u(t){return o.apply(this,arguments)}return e=t,n=null,r=[{key:"clone",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof r){var o=r(t,n,i);if(o)return o}if("boolean"==typeof e&&(n=e,e=void 0),100<++i)return e;if(t&&"object"===f(t)){if(e=e||{},this.isType(t,a.jmList))return new a.jmList(t);if(Array.isArray(t)){if(n){for(var s=[],u=0;u<t.length;u++)s.push(this.clone(t[u],e[u],n,r,i));return s}return t.slice(0)}for(var c in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==c&&("object"!==f(e[c])&&void 0!==e[c]||(e[c]=this.clone(t[c],e[c],n,r,i)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,r){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],n,r);return t.attachEvent?t.attachEvent("on"+e,n,r):t.addEventListener&&t.addEventListener(e,n,r),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=!1,r=(t=t||event).changedTouches||t.targetTouches||t.touches,i=t.target||t.srcElement;r&&r.length&&((t=r[0]).target||(t.target=i),n=!0);var o=t.pageX||t.x;void 0===o&&(o=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var s=t.pageY||t.y;void 0===s&&(s=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var u=t.offsetX,c=t.offsetY;return void 0===u&&void 0===c&&(u=o-(i=this.getElementPosition(i)).left,c=s-i.top),e&&(e.x&&(u/=e.x),e.y&&(c/=e.y)),{pageX:o,pageY:s,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:c,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:c,isTouch:n,touches:r}}},{key:"isType",value:function(t,e){return!(!t||"object"!==f(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var r,i,o=e.length,s=!1,u=!0;if(!e||0==o)return 0;if(1==o)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n;if(2==o){if(Math.min(e[0].x,e[1].x)-t.x>n||t.x-Math.max(e[0].x,e[1].x)>n)return 0;if(Math.min(e[0].y,e[1].y)-t.y>n||t.y-Math.max(e[0].y,e[1].y)>n)return 0;if(e[0].x==e[1].x)return Math.abs(e[0].x-t.x)<=n&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0;if(e[0].y==e[1].y)return Math.abs(e[0].y-t.y)<=n&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0;if(Math.abs(e[0].x-t.x)<n&&Math.abs(e[0].y-t.y)<n)return 1;if(Math.abs(e[1].x-t.x)<n&&Math.abs(e[1].y-t.y)<n)return 1;if(t.y==e[0].y||t.y==e[1].y)return 0;var c=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),c=(t.y-e[0].y)/Math.sqrt(c*c+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-c);return Math.abs(c)<=n?1:0}for(r=0;r<o;++r)if(e[r].x==t.x&&e[r].y==t.y)return 1;for(;u;)for(s=u=!1,r=0,i=o-1;r<o;i=r++)if(e[r].y<t.y&&t.y<e[i].y||e[i].y<t.y&&t.y<e[r].y){if(t.x<=e[r].x||t.x<=e[i].x){var a=(t.y-e[r].y)*(e[i].x-e[r].x)/(e[i].y-e[r].y)+e[r].x;if(t.x<a)s=!s;else if(t.x==a)return 1}}else if(t.y==e[r].y){if(t.x<e[r].x){e[r].y>e[i].y?--t.y:++t.y,u=!0;break}}else if(e[r].y==e[i].y&&t.y==e[r].y&&(e[r].x<t.x&&t.x<e[i].x||e[i].x<t.x&&t.x<e[r].x)){s=!0;break}return s?2:0}},{key:"checkOutSide",value:function(t,e,n){var r={left:0,right:0,top:0,bottom:0};return n.x<0?r.left=e.left+n.x-t.left:0<n.x&&(r.right=e.right+n.x-t.right),n.y<0?r.top=e.top+n.y-t.top:0<n.y&&(r.bottom=e.bottom+n.y-t.bottom),r}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var r=Math.cos(n),i=Math.sin(n);if(t.length)for(var o,s,u=0;u<t.length;u++)t[u]&&(o=t[u].x-e.x,s=t[u].y-e.y,t[u].x=o*r-s*i+e.x,t[u].y=o*i+s*r+e.y);else{var c=t.x-e.x,n=t.y-e.y;t.x=c*r-n*i+e.x,t.y=c*i+n*r+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){var e;return"string"!=typeof t||(e=this.checkPercent(t))&&(t=this.trim(e,"% "),t/=100),t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,r=0;r<n;r++){var i="0123456789abcdef".indexOf(t[r]);if(0!=i){for(var o=1;o<n-r;o++)i*=16;e+=i}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e;t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("#"==(t=this.trim(t))[0]){var e={a:1};if(8<=t.length)return e.a=t.substr(1,2),e.g=t.substr(5,2),e.b=t.substr(7,2),e.r=t.substr(3,2),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(7===t.length||4===t.length)return 4===t.length?(e.g=t.substr(2,1),e.g=e.g+e.g,e.b=t.substr(3,1),e.b=e.b+e.b,e.r=t.substr(1,1),e.r=e.r+e.r):(e.g=t.substr(3,2),e.b=t.substr(5,2),e.r=t.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(5===t.length)return e.a=t.substr(1,1),e.g=t.substr(3,1),e.b=t.substr(4,1),e.r=t.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e}return t}},{key:"toColor",value:function(t,e,n,r){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var i=this.hexToRGBA(t);if("string"==typeof i)return i;t=i.r||t,e=i.g||e,n=i.b||n,r=i.a||r}return void 0!==t&&void 0!==e&&void 0!==n?void 0!==r?"rgba("+t+","+e+","+n+","+r+")":"rgb("+t+","+e+","+n+")":t}},{key:"requestAnimationFrame",value:(o=function(t){return"undefined"==typeof requestAnimationFrame?setTimeout(t,20):requestAnimationFrame(t)},u.toString=function(){return o.toString()},u)},{key:"cancelAnimationFrame",value:(i=function(t){return("undefined"==typeof requestAnimationFrame?clearTimeout:cancelAnimationFrame)(t)},s.toString=function(){return i.toString()},s)}],n&&c(e.prototype,n),r&&c(e,r),t}();n.jmUtils=n.default=t},{"./jmList.js":6}],12:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"startAngle",get:function(){return this.__pro("startAngle")},set:function(t){return this.needUpdate=!0,this.__pro("startAngle",t)}},{key:"endAngle",get:function(){return this.__pro("endAngle")},set:function(t){return this.needUpdate=!0,this.__pro("endAngle",t)}},{key:"anticlockwise",get:function(){return this.__pro("anticlockwise")},set:function(t){return this.needUpdate=!0,this.__pro("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,r=t.center.x,i=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var u=this.anticlockwise;this.points=[];var c=1/Math.max(e,n);u&&(o=(u=2*Math.PI)-o,s=u-s),s<o&&(c=-c),this.isFan&&this.points.push(t.center);for(var a=o;;a+=c){(0<c&&s<a||c<0&&a<s)&&(a=s);var f={x:Math.cos(a)*e+r,y:Math.sin(a)*n+i};if(this.points.push(f),a==s)break}return this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArc=n.default=t},{"../core/jmPath.js":8}],13:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrow=n.default=void 0;var o=t("../core/jmPath.js"),c=t("../core/jmUtils.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=a(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"angle",get:function(){return this.__pro("angle")},set:function(t){return this.needUpdate=!0,this.__pro("angle",t)}},{key:"offsetX",get:function(){return this.__pro("offsetX")},set:function(t){return this.needUpdate=!0,this.__pro("offsetX",t)}},{key:"offsetY",get:function(){return this.__pro("offsetY")},set:function(t){return this.needUpdate=!0,this.__pro("offsetY",t)}},{key:"initPoints",value:function(t){var e=this.angle,n=this.start,r=this.end;if(r){e=e||Math.atan2(r.y-n.y,r.x-n.x),this.points=[];var i=this.offsetX,o=this.offsetY,s=Math.atan2(i,o),u=e+s,n=Math.sin(u),u=Math.cos(u),i=Math.sqrt(i*i+o*o),o={x:r.x-u*i,y:r.y-n*i},s=e-s,n=Math.sin(s),u=Math.cos(s),n={x:r.x-u*i,y:r.y-n*i},i=c.jmUtils.clone(r);return i.m=!0,this.points.push(i),this.points.push(o),t||this.style.fill?(this.points.push(n),this.points.push(r)):(this.points.push(i),this.points.push(n)),this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArrow=n.default=t},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrowLine=n.default=void 0;var o=t("./jmLine.js"),s=t("./jmArrow.js");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmLine);var t,e,n,r=f(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=r.call(this,t,e||"jmArrowLine")).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e}return t=i,(e=[{key:"initPoints",value:function(){return this.points=c(h(i.prototype),"initPoints",this).call(this),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmArrowLine=n.default=t},{"./jmArrow.js":13,"./jmLine.js":20}],15:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,e)).cpoints=t.points||[],e}return t=i,(e=[{key:"cpoints",get:function(){return this.__pro("cpoints")},set:function(t){return this.needUpdate=!0,this.__pro("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var r=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&r.push(o)}return this.getPoint(r,e)}}},{key:"offset",value:function(t,e,n){var r=this.cpoints;if(r){for(var i=r.length,o=0;o<i;o++)r[o].x+=t,r[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmBezier=n.default=t},{"../core/jmPath.js":8}],16:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,t,e)}return t=i,(e=[{key:"initPoints",value:function(){var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,r=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,r,i)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmCircle=n.default=t},{"./jmArc.js":12}],17:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return t=i,(e=[{key:"minRadius",get:function(){return this.__pro("minRadius")},set:function(t){return this.needUpdate=!0,this.__pro("minRadius",t)}},{key:"maxRadius",get:function(){return this.__pro("maxRadius")},set:function(t){return this.needUpdate=!0,this.__pro("maxRadius",t)}},{key:"initPoints",value:function(){var t,e=this.getLocation(),n=this.minRadius,r=this.maxRadius,i=this.startAngle,o=this.endAngle;this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o);var s=.1;o<i&&(s=-s);for(var u=[],c=[],a=i;;a+=s){(0<s&&o<a||s<0&&a<o)&&(a=o);var f=Math.cos(a),h=Math.sin(a),l={x:f*n+e.center.x,y:h*n+e.center.y},h={x:f*r+e.center.x,y:h*r+e.center.y};if(u.push(l),c.push(h),a===o)break}c.reverse(),this.style&&this.style.close||(c[0].m=!0),this.points=u.concat(c)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmHArc=n.default=t},{"./jmArc.js":12}],18:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmImage")).style.fill=e.fill||"transparent",e.sourceWidth=t.sourceWidth,e.sourceHeight=t.sourceHeight,e.sourcePosition=t.sourcePosition,e.image=t.image||e.style.image,e}return t=i,(e=[{key:"sourcePosition",get:function(){return this.__pro("sourcePosition")},set:function(t){return this.__pro("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.__pro("sourceWidth")},set:function(t){return this.needUpdate=!0,this.__pro("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.__pro("sourceHeight")},set:function(t){return this.needUpdate=!0,this.__pro("sourceHeight",t)}},{key:"image",get:function(){return this.__pro("image")},set:function(t){return this.needUpdate=!0,this.__pro("image",t)}},{key:"draw",value:function(){try{var t=(t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),e=this.getLocation();e.left+=t.left,e.top+=t.top;var n=this.sourcePosition,r=this.sourceWidth,i=this.sourceHeight,o=this.getImage();n||void 0!==r||void 0!==i?(void 0===r&&(r=e.width||o.width||0),void 0===i&&(i=e.height||o.height||0),n=n||{x:0,y:0},e.width&&e.height?this.context.drawImage(o,n.x,n.y,r,i,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(o,n.x,n.y,r,i,e.left,e.top,e.width,i):e.height?this.context.drawImage(o,n.x,n.y,r,i,e.left,e.top,r,e.height):this.context.drawImage(o,n.x,n.y,r,i,e.left,e.top,r,i)):e?e.width&&e.height?this.context.drawImage(o,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(o,e.left,e.top,e.width,o.height):e.height?this.context.drawImage(o,e.left,e.top,o.width,e.height):this.context.drawImage(o,e.left,e.top):this.context.drawImage(o)}catch(t){console.error&&console.error(t)}}},{key:"getBounds",value:function(){var t={},e=this.getImage(),n=this.getLocation(),r=n.width||e.width,e=n.height||e.height;return t.left=n.left,t.top=n.top,t.right=n.left+r,t.bottom=n.top+e,t.width=r,t.height=e,t}},{key:"getImage",value:function(){var t=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(t)||((!t||!t.src)&&document&&document.createElement?(this.__img=document.createElement("img"),t&&"string"==typeof t&&(this.__img.src=t)):this.__img=t),this.__img}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmImage=n.default=t},{"../core/jmControl.js":2}],19:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,o.jmControl);var t,e,n,r=a(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmLabel")).style.font=e.style.font||"15px Arial",e.style.fontFamily=e.style.fontFamily||"Arial",e.style.fontSize=e.style.fontSize||15,e.style.textAlign=e.style.textAlign||"left",e.style.textBaseline=e.style.textBaseline||"middle",e.text=t.text||"",e.center=t.center||null,e}return t=i,(e=[{key:"text",get:function(){return this.__pro("text")},set:function(t){return this.needUpdate=!0,this.__pro("text",t)}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getLocation",value:function(){var t=u(f(i.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore(),this.__size.height=this.style.fontSize||15,this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height),this.__size)}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,r=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":r+=e.height;break;case"hanging":case"alphabetic":case"middle":r+=e.height/2}var i=this.text;void 0!==i&&(this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,n,r,this.style.maxWidth):this.context.fillText(i,n,r):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,n,r,this.style.maxWidth):this.context.strokeText(i,n,r))),this.style.border&&(this.style.border.style&&(this.context.save(),this.setStyle(this.style.border.style)),this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top)),this.style.border.style&&this.context.restore())}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLabel=n.default=t},{"../core/jmControl.js":2}],20:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var o=!1,s=this.style.dashLength||5,u=s/2,c=s;c<=i;)0==o?(this.points.push({x:t.x+n*c,y:t.y+r*c}),c+=u):(this.points.push({x:t.x+n*c,y:t.y+r*c,m:!0}),c+=s),o=!o}return this.points.push(e),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLine=n.default=t},{"../core/jmPath.js":8}],21:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPrismatic=n.default=t},{"../core/jmPath.js":8}],22:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var o=t("../core/jmPath.js"),f=t("./jmArc.js"),h=t("./jmLine.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return t=i,(e=[{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getBounds",value:function(){var t={};this.initPoints();var e=this.getLocation();return t.left=e.left,t.top=e.top,t.right=e.left+e.width,t.bottom=e.top+e.height,t.width=t.right-t.left,t.height=t.bottom-t.top,t}},{key:"initPoints",value:function(){var t,e,n,r,i,o=this.getLocation(),s={x:o.left,y:o.top},u={x:o.left+o.width,y:o.top},c={x:o.left+o.width,y:o.top+o.height},a={x:o.left,y:o.top+o.height};return"dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(h.jmLine,{style:this.style})),o.radius&&o.radius<o.width/2&&o.radius<o.height/2?(t=Math.PI/2,(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},i.startAngle=Math.PI,i.endAngle=Math.PI+t,e=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y+o.radius},i.startAngle=Math.PI+t,i.endAngle=2*Math.PI,n=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:c.x-o.radius,y:c.y-o.radius},i.startAngle=0,i.endAngle=t,r=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x+o.radius,y:a.y-o.radius},i.startAngle=t,i.endAngle=Math.PI,i=i.initPoints(),this.points=e.concat(n,r,i)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,this.dottedLine.end=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=c,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(c),this.dottedLine&&(this.dottedLine.start=c,this.dottedLine.end=a,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(a),this.dottedLine&&(this.dottedLine.start=a,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmRect=n.default=t},{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var o=t("./jmRect.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmRect);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.init(t),e}return t=i,(e=[{key:"rectSize",get:function(){return this.__pro("rectSize")},set:function(t){return this.__pro("rectSize",t)}},{key:"resizable",get:function(){return this.__pro("resizable")},set:function(t){return this.__pro("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var r=0;r<8;r++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});i.index=r,i.visible=!0,this.resizeRects.push(i),this.children.add(i),i.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){var e=0,n=0,r=0,i=0;0==this.index?(r=-t.offsetX,e=t.offsetX):1==this.index?(r=-t.offsetX,e=t.offsetX,i=-t.offsetY,n=t.offsetY):2==this.index?(i=-t.offsetY,n=t.offsetY):3==this.index?(r=t.offsetX,i=-t.offsetY,n=t.offsetY):4==this.index?r=t.offsetX:5==this.index?(r=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(r=-t.offsetX,r=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,n,r,i),this.needUpdate=!0}),e.bind("mousemove",function(){this.cursor=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"][this.index]}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,r){var i,o,s,u=void 0===this.style.minWidth?5:this.style.minWidth,c=void 0===this.style.minHeight?5:this.style.minHeight,a=this.getLocation();for(s in 0==n&&0==r||(i=a.width+n,o=a.height+r,(u<=i||c<=o)&&(u<=i?this.width=i:n=t=0,c<=o?this.height=o:r=e=0,!1!==this.movable&&(t||e)&&((o=this.position).x=a.left+t,o.y=a.top+e,this.position=o),this.emit("resize",t,e,n,r))),this.resizeRects){var f=this.resizeRects[s];switch(f.index){case 0:f.position.x=-f.width/2,f.position.y=(a.height-f.height)/2;break;case 1:f.position.x=-f.width/2,f.position.y=-f.height/2;break;case 2:f.position.x=(a.width-f.width)/2,f.position.y=-f.height/2;break;case 3:f.position.x=a.width-f.width/2,f.position.y=-f.height/2;break;case 4:f.position.x=a.width-f.width/2,f.position.y=(a.height-f.height)/2;break;case 5:f.position.x=a.width-f.width/2,f.position.y=a.height-f.height/2;break;case 6:f.position.x=(a.width-f.height)/2,f.position.y=a.height-f.height/2;break;case 7:f.position.x=-f.width/2,f.position.y=a.height-f.height/2}}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmResize=n.default=t},{"./jmRect.js":22}]},{},[1])(1);return i.jmGraph=r},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(i)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);