!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.G=n():t.G=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=40)}([function(t,n,e){"use strict";e.d(n,"g",(function(){return y})),e.d(n,"j",(function(){return h})),e.d(n,"k",(function(){return p})),e.d(n,"m",(function(){return m})),e.d(n,"o",(function(){return x})),e.d(n,"q",(function(){return _})),e.d(n,"b",(function(){return c})),e.d(n,"d",(function(){return a})),e.d(n,"e",(function(){return u})),e.d(n,"f",(function(){return g})),e.d(n,"h",(function(){return s})),e.d(n,"i",(function(){return v})),e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return P})),e.d(n,"l",(function(){return O})),e.d(n,"p",(function(){return j})),e.d(n,"n",(function(){return T}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i={}.toString,o=function(t,n){return i.call(t)==="[object "+n+"]"},a=function(t){return o(t,"Function")},u=function(t){return null==t},c=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},s=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var f=function(t,n){if(t)if(c(t))for(var e=0,r=t.length;e0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function ct(t,n){return t[0]*n[0]+t[1]*n[1]}function st(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function ft(t,n,e,r){var i=n[0],o=n[1];return t[0]=i+r*(e[0]-i),t[1]=o+r*(e[1]-o),t}function lt(t,n){n=n||1;var e=2*a()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function ht(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i,t[1]=e[1]*r+e[3]*i,t}function pt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i+e[4],t[1]=e[1]*r+e[3]*i+e[5],t}function dt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[3]*i+e[6],t[1]=e[1]*r+e[4]*i+e[7],t}function vt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[4]*i+e[12],t[1]=e[1]*r+e[5]*i+e[13],t}function gt(t,n,e,r){var i=n[0]-e[0],o=n[1]-e[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+e[0],t[1]=i*a+o*u+e[1],t}function yt(t,n){var e=t[0],r=t[1],i=n[0],o=n[1],a=Math.sqrt(e*e+r*r)*Math.sqrt(i*i+o*o),u=a&&(e*i+r*o)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function mt(t){return t[0]=0,t[1]=0,t}function bt(t){return"vec2("+t[0]+", "+t[1]+")"}function xt(t,n){return t[0]===n[0]&&t[1]===n[1]}function Mt(t,n){var e=t[0],r=t[1],i=n[0],o=n[1];return Math.abs(e-i)<=1e-6*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=1e-6*Math.max(1,Math.abs(r),Math.abs(o))}var wt,_t=rt,At=$,Ot=Y,St=z,Pt=nt,Ct=et,jt=it,Tt=(wt=R(),function(t,n,e,r,i,o){var a,u;for(n||(n=2),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,a=e;a-1},o=function(t,n){if(!r(t))return t;for(var e=[],i=0;i-1;)C.call(t,o,1);return t},k=Array.prototype.splice,E=function(t,n){if(!r(t))return[];for(var e=t?n.length:0,i=e-1;e--;){var o=void 0,a=n[e];e!==i&&a===o||(o=a,k.call(t,a,1))}return t},B=function(t,n,e){if(!l(t)&&!y(t))return t;var r=e;return p(t,(function(t,e){r=n(r,t,e)})),r},I=function(t,n){var e=[];if(!r(t))return e;for(var i=-1,o=[],a=t.length;++in[i])return 1;if(t[i]e?e:t},et=function(t,n){var e=n.toString(),r=e.indexOf(".");if(-1===r)return Math.round(t);var i=e.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},rt=function(t){return c(t,"Number")},it=function(t){return rt(t)&&t%1!=0},ot=function(t){return rt(t)&&t%2==0},at=Number.isInteger?Number.isInteger:function(t){return rt(t)&&t%1==0},ut=function(t){return rt(t)&&t<0};function ct(t,n,e){return void 0===e&&(e=1e-5),Math.abs(t-n)0},lt=function(t,n){if(l(t)){for(var e,r=-1/0,i=0;ir&&(e=o,r=a)}return e}},ht=function(t,n){if(l(t)){for(var e,r=1/0,i=0;in?(r&&(clearTimeout(r),r=null),u=s,a=t.apply(i,o),r||(i=o=null)):r||!1===e.trailing||(r=setTimeout(c,f)),a};return s.cancel=function(){clearTimeout(r),u=0,r=i=o=null},s},yn=function(t){return r(t)?Array.prototype.slice.call(t):[]},mn={},bn=function(t){return mn[t=t||"g"]?mn[t]+=1:mn[t]=1,t+mn[t]},xn=function(){},Mn=function(t){return t};function wn(t){return f(t)?0:r(t)?t.length:Object.keys(t).length}var _n,An=e(4),On=Zt((function(t,n){void 0===n&&(n={});var e=n.fontSize,r=n.fontFamily,i=n.fontWeight,o=n.fontStyle,a=n.fontVariant;return _n||(_n=document.createElement("canvas").getContext("2d")),_n.font=[o,a,i,e+"px",r].join(" "),_n.measureText(D(t)?t:"").width}),(function(t,n){return void 0===n&&(n={}),Object(An.__spreadArrays)([t],wt(n)).join("")})),Sn=function(t,n,e,r){void 0===r&&(r="...");var i,o,a=On(r,e),u=D(t)?t:At(t),c=n,s=[];if(On(t,e)<=n)return t;for(;i=u.substr(0,16),!((o=On(i,e))+a>c&&o>c);)if(s.push(i),c-=o,!(u=u.substr(16)))return s.join("");for(;i=u.substr(0,1),!((o=On(i,e))+a>c);)if(s.push(i),c-=o,!(u=u.substr(1)))return s.join("");return""+s.join("")+r},Pn=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var e=this.map[t];return void 0===e?n:e},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,n,e){"use strict";e.r(n),e.d(n,"__extends",(function(){return i})),e.d(n,"__assign",(function(){return o})),e.d(n,"__rest",(function(){return a})),e.d(n,"__decorate",(function(){return u})),e.d(n,"__param",(function(){return c})),e.d(n,"__metadata",(function(){return s})),e.d(n,"__awaiter",(function(){return f})),e.d(n,"__generator",(function(){return l})),e.d(n,"__createBinding",(function(){return h})),e.d(n,"__exportStar",(function(){return p})),e.d(n,"__values",(function(){return d})),e.d(n,"__read",(function(){return v})),e.d(n,"__spread",(function(){return g})),e.d(n,"__spreadArrays",(function(){return y})),e.d(n,"__spreadArray",(function(){return m})),e.d(n,"__await",(function(){return b})),e.d(n,"__asyncGenerator",(function(){return x})),e.d(n,"__asyncDelegator",(function(){return M})),e.d(n,"__asyncValues",(function(){return w})),e.d(n,"__makeTemplateObject",(function(){return _})),e.d(n,"__importStar",(function(){return O})),e.d(n,"__importDefault",(function(){return S})),e.d(n,"__classPrivateFieldGet",(function(){return P})),e.d(n,"__classPrivateFieldSet",(function(){return C})),e.d(n,"__classPrivateFieldIn",(function(){return j}));var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var o=function(){return(o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(n,e,a):i(n,e))||a);return o>3&&a&&Object.defineProperty(n,e,a),a}function c(t,n){return function(e,r){n(e,r,t)}}function s(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function f(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}c((r=r.apply(t,n||[])).next())}))}function l(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(e=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var t=[],n=0;n1||u(t,n)}))})}function u(t,n){try{(e=i[t](n)).value instanceof b?Promise.resolve(e.value.v).then(c,s):f(o[0][2],e)}catch(t){f(o[0][3],t)}var e}function c(t){u("next",t)}function s(t){u("throw",t)}function f(t,n){t(n),o.shift(),o.length&&u(o[0][0],o[0][1])}}function M(t){var n,e;return n={},r("next"),r("throw",(function(t){throw t})),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,i){n[r]=t[r]?function(n){return(e=!e)?{value:b(t[r](n)),done:"return"===r}:i?i(n):n}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=d(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,i){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,i,(n=t[e](n)).done,n.value)}))}}}function _(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var A=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n};function O(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&h(n,t,e);return A(n,t),n}function S(t){return t&&t.__esModule?t:{default:t}}function P(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)}function C(t,n,e,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,e):i?i.value=e:n.set(t,e),e}function j(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.EVENTS=n.SVG_ATTR_MAP=n.SHAPE_TO_TAGS=void 0,n.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},n.SVG_ATTR_MAP={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},n.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"]},function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"b",(function(){return o}));var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}Object.create;function o(){for(var t=0,n=0,e=arguments.length;n0&&(n?"stroke"in e?this._setColor(t,"stroke",o):"strokeStyle"in e&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),s&&l.setAttribute(c.SVG_ATTR_MAP.strokeOpacity,s),f&&l.setAttribute(c.SVG_ATTR_MAP.lineWidth,f))},n.prototype._setColor=function(t,n,e){var r=this.get("el");if(e)if(e=e.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(e))(i=t.find("gradient",e))||(i=t.addGradient(e)),r.setAttribute(c.SVG_ATTR_MAP[n],"url(#".concat(i,")"));else if(/^[p,P]{1}[\s]*\(/.test(e)){var i;(i=t.find("pattern",e))||(i=t.addPattern(e)),r.setAttribute(c.SVG_ATTR_MAP[n],"url(#".concat(i,")"))}else r.setAttribute(c.SVG_ATTR_MAP[n],e);else r.setAttribute(c.SVG_ATTR_MAP[n],"none")},n.prototype.shadow=function(t,n){var e=this.attr(),r=n||e,i=r.shadowOffsetX,a=r.shadowOffsetY,u=r.shadowBlur,c=r.shadowColor;(i||a||u||c)&&(0,o.setShadow)(this,t)},n.prototype.transform=function(t){var n=this.attr();(t||n).matrix&&(0,o.setTransform)(this)},n.prototype.isInShape=function(t,n){return this.isPointInPath(t,n)},n.prototype.isPointInPath=function(t,n){var e=this.get("el"),r=this.get("canvas").get("el").getBoundingClientRect(),i=t+r.left,o=n+r.top,a=document.elementFromPoint(i,o);return!(!a||!a.isEqualNode(e))},n.prototype.getHitLineWidth=function(){var t=this.attrs,n=t.lineWidth,e=t.lineAppendWidth;return this.isStroke()?n+e:0},n}(i.AbstractShape);n.default=h},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.moveTo=n.sortDom=n.createDom=n.createSVGElement=void 0;var r=e(3),i=e(5);function o(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}n.createSVGElement=o,n.createDom=function(t){var n=i.SHAPE_TO_TAGS[t.type],e=t.getParent();if(!n)throw new Error("the type ".concat(t.type," is not supported by svg"));var r=o(n);if(t.get("id")&&(r.id=t.get("id")),t.set("el",r),t.set("attrs",{}),e){var a=e.get("el");a||(a=e.createDom(),e.set("el",a)),a.appendChild(r)}return r},n.sortDom=function(t,n){var e=t.get("el"),i=(0,r.toArray)(e.children).sort(n),o=document.createDocumentFragment();i.forEach((function(t){o.appendChild(t)})),e.appendChild(o)},n.moveTo=function(t,n){var e=t.parentNode,r=Array.from(e.childNodes).filter((function(t){return 1===t.nodeType&&"defs"!==t.nodeName.toLowerCase()})),i=r[n],o=r.indexOf(t);if(i){if(o>n)e.insertBefore(t,i);else if(o(e-t)*(e-t)+(r-n)*(r-n)?y(e,r,i,o):this.pointToLine(t,n,e,r,i,o)},pointToLine:function(t,n,e,r,i,o){var a=[e-t,r-n];if(function(t,n){return t[0]===n[0]&&t[1]===n[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-n)*(o-n));var u=[-a[1],a[0]];!function(t,n){var e=n[0],r=n[1],i=e*e+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i}(u,u);var c=[i-t,o-n];return Math.abs(function(t,n){return t[0]*n[0]+t[1]*n[1]}(c,u))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}};function S(t,n,e,r,i,o){var a,u=1/0,c=[e,r],s=20;o&&o>200&&(s=o/10);for(var f=1/s,l=f/10,h=0;h<=s;h++){var p=h*f,d=[i.apply(null,t.concat([p])),i.apply(null,n.concat([p]))];(b=y(c[0],c[1],d[0],d[1]))=0&&b=0?[i]:[]}function j(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function T(t,n,e,r,i,o,a){var u=P(t,e,i,a),c=P(n,r,o,a),s=O.pointAt(t,n,e,r,a),f=O.pointAt(e,r,i,o,a);return[[t,n,s.x,s.y,u,c],[u,c,f.x,f.y,i,o]]}var k={box:function(t,n,e,r,i,o){var a=C(t,e,i)[0],u=C(n,r,o)[0],c=[t,i],s=[n,o];return void 0!==a&&c.push(P(t,e,i,a)),void 0!==u&&s.push(P(n,r,o,u)),b(c,s)},length:function(t,n,e,r,i,o){return function t(n,e,r,i,o,a,u){if(0===u)return(y(n,e,r,i)+y(r,i,o,a)+y(n,e,o,a))/2;var c=T(n,e,r,i,o,a,.5),s=c[0],f=c[1];return s.push(u-1),f.push(u-1),t.apply(null,s)+t.apply(null,f)}(t,n,e,r,i,o,3)},nearestPoint:function(t,n,e,r,i,o,a,u){return S([t,e,i],[n,r,o],a,u,P)},pointDistance:function(t,n,e,r,i,o,a,u){var c=this.nearestPoint(t,n,e,r,i,o,a,u);return y(c.x,c.y,a,u)},interpolationAt:P,pointAt:function(t,n,e,r,i,o,a){return{x:P(t,e,i,a),y:P(n,r,o,a)}},divide:function(t,n,e,r,i,o,a){return T(t,n,e,r,i,o,a)},tangentAngle:function(t,n,e,r,i,o,a){var u=j(t,e,i,a),c=j(n,r,o,a);return M(Math.atan2(c,u))}};function E(t,n,e,r,i){var o=1-i;return o*o*o*t+3*n*i*o*o+3*e*i*i*o+r*i*i*i}function B(t,n,e,r,i){var o=1-i;return 3*(o*o*(n-t)+2*o*i*(e-n)+i*i*(r-e))}function I(t,n,e,r){var i,o,a,u=-3*t+9*n-9*e+3*r,c=6*t-12*n+6*e,s=3*n-3*t,f=[];if(m(u,0))m(c,0)||(i=-s/c)>=0&&i<=1&&f.push(i);else{var l=c*c-4*u*s;m(l,0)?f.push(-c/(2*u)):l>0&&(o=(-c-(a=Math.sqrt(l)))/(2*u),(i=(-c+a)/(2*u))>=0&&i<=1&&f.push(i),o>=0&&o<=1&&f.push(o))}return f}function D(t,n,e,r,i,o,a,u,c){var s=E(t,e,i,a,c),f=E(n,r,o,u,c),l=O.pointAt(t,n,e,r,c),h=O.pointAt(e,r,i,o,c),p=O.pointAt(i,o,a,u,c),d=O.pointAt(l.x,l.y,h.x,h.y,c),v=O.pointAt(h.x,h.y,p.x,p.y,c);return[[t,n,l.x,l.y,d.x,d.y,s,f],[s,f,v.x,v.y,p.x,p.y,a,u]]}function N(t,n,e,r,i,o,a,u,c){if(0===c)return function(t,n){for(var e=0,r=t.length,i=0;i0?e:-1*e}var R=function(t,n,e,r,i,o){var a=e,u=r;if(0===a||0===u)return{x:t,y:n};for(var c,s,f=i-t,l=o-n,h=Math.abs(f),p=Math.abs(l),d=a*a,v=u*u,g=Math.PI/4,y=0;y<4;y++){c=a*Math.cos(g),s=u*Math.sin(g);var m=(d-v)*Math.pow(Math.cos(g),3)/a,b=(v-d)*Math.pow(Math.sin(g),3)/u,x=c-m,M=s-b,w=h-m,_=p-b,A=Math.hypot(M,x),O=Math.hypot(_,w);g+=A*Math.asin((x*_-M*w)/(A*O))/Math.sqrt(d+v-c*c-s*s),g=Math.min(Math.PI/2,Math.max(0,g))}return{x:t+L(c,f),y:n+L(s,l)}};function G(t,n,e,r,i,o){return e*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function V(t,n,e,r,i,o){return e*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+n}function W(t,n,e){return{x:t*Math.cos(e),y:n*Math.sin(e)}}function q(t,n,e){var r=Math.cos(e),i=Math.sin(e);return[t*r-n*i,t*i+n*r]}var X={box:function(t,n,e,r,i,o,a){for(var u=function(t,n,e){return Math.atan(-n/t*Math.tan(e))}(e,r,i),c=1/0,s=-1/0,f=[o,a],l=2*-Math.PI;l<=2*Math.PI;l+=Math.PI){var h=u+l;os&&(s=p)}var d=function(t,n,e){return Math.atan(n/(t*Math.tan(e)))}(e,r,i),v=1/0,g=-1/0,y=[o,a];for(l=2*-Math.PI;l<=2*Math.PI;l+=Math.PI){var m=d+l;og&&(g=b)}return{x:c,y:v,width:s-c,height:g-v}},length:function(t,n,e,r,i,o,a){},nearestPoint:function(t,n,e,r,i,o,a,u,c){var s=q(u-t,c-n,-i),f=s[0],l=s[1],h=R(0,0,e,r,f,l),p=function(t,n,e,r){return(Math.atan2(r*t,e*n)+2*Math.PI)%(2*Math.PI)}(e,r,h.x,h.y);pa&&(h=W(e,r,a));var d=q(h.x,h.y,i);return{x:d[0]+t,y:d[1]+n}},pointDistance:function(t,n,e,r,i,o,a,u,c){var s=this.nearestPoint(t,n,e,r,u,c);return y(s.x,s.y,u,c)},pointAt:function(t,n,e,r,i,o,a,u){var c=(a-o)*u+o;return{x:G(t,0,e,r,i,c),y:V(0,n,e,r,i,c)}},tangentAngle:function(t,n,e,r,i,o,a,u){var c=(a-o)*u+o,s=function(t,n,e,r,i,o,a,u){return-1*e*Math.cos(i)*Math.sin(u)-r*Math.sin(i)*Math.cos(u)}(0,0,e,r,i,0,0,c),f=function(t,n,e,r,i,o,a,u){return-1*e*Math.sin(i)*Math.sin(u)+r*Math.cos(i)*Math.cos(u)}(0,0,e,r,i,0,0,c);return M(Math.atan2(f,s))}};function $(t){for(var n=0,e=[],r=0;r1||n<0||t.length<2)return null;var e=$(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,u=0;u=o&&n<=o+l){var h=(n-o)/l;a=O.pointAt(s[0],s[1],f[0],f[1],h);break}o+=l}return a}function H(t,n){if(n>1||n<0||t.length<2)return 0;for(var e=$(t),r=e.segments,i=e.totalLength,o=0,a=0,u=0;u=o&&n<=o+l){a=Math.atan2(f[1]-s[1],f[0]-s[0]);break}o+=l}return a}function Q(t,n,e){for(var r=1/0,i=0;i2&&(e.push([i].concat(u.splice(0,2))),c="l",i="m"===i?"l":"L"),"o"===c&&1===u.length&&e.push([i,u[0]]),"r"===c)e.push([i].concat(u));else for(;u.length>=n[c]&&(e.push([i].concat(u.splice(0,n[c]))),n[c]););return t})),e},c=function(t,n){for(var e=[],r=0,i=t.length;i-2*!n>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];n?r?i-4===r?o[3]={x:+t[0],y:+t[1]}:i-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),e.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return e},s=function(t,n,e,r,i){var o=[];if(null===i&&null===r&&(r=e),t=+t,n=+n,e=+e,r=+r,null!==i){var a=Math.PI/180,u=t+e*Math.cos(-r*a),c=t+e*Math.cos(-i*a);o=[["M",u,n+e*Math.sin(-r*a)],["A",e,e,0,+(i-r>180),0,c,n+e*Math.sin(-i*a)]]}else o=[["M",t,n],["m",0,-r],["a",e,r,0,1,1,0,2*r],["a",e,r,0,1,1,0,-2*r],["z"]];return o},f=function(t){if(!(t=u(t))||!t.length)return[["M",0,0]];var n,e,r=[],i=0,o=0,a=0,f=0,l=0;"M"===t[0][0]&&(a=i=+t[0][1],f=o=+t[0][2],l++,r[0]=["M",i,o]);for(var h=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),p=void 0,d=void 0,v=l,g=t.length;v1&&(e*=w=Math.sqrt(w),r*=w);var _=e*e,A=r*r,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*A-_*M*M-A*x*x)/(_*M*M+A*x*x)));d=O*e*M/r+(t+u)/2,v=O*-r*x/e+(n+c)/2,l=Math.asin(((n-v)/r).toFixed(9)),h=Math.asin(((c-v)/r).toFixed(9)),l=th&&(l-=2*Math.PI),!a&&h>l&&(h-=2*Math.PI)}var S=h-l;if(Math.abs(S)>g){var P=h,C=u,j=c;h=l+g*(a&&h>l?1:-1),u=d+e*Math.cos(h),c=v+r*Math.sin(h),m=p(u,c,e,r,i,0,a,C,j,[h,P,d,v])}S=h-l;var T=Math.cos(l),k=Math.sin(l),E=Math.cos(h),B=Math.sin(h),I=Math.tan(S/4),D=4/3*e*I,N=4/3*r*I,F=[t,n],L=[t+D*k,n-N*T],R=[u+D*B,c-N*E],G=[u,c];if(L[0]=2*F[0]-L[0],L[1]=2*F[1]-L[1],s)return[L,R,G].concat(m);for(var V=[],W=0,q=(m=[L,R,G].concat(m).join().split(",")).length;W7){t[n].shift();for(var o=t[n];o.length;)u[n]="A",i&&(c[n]="A"),t.splice(n++,0,["C"].concat(o.splice(0,6)));t.splice(n,1),e=Math.max(r.length,i&&i.length||0)}},y=function(t,n,o,a,u){t&&n&&"M"===t[u][0]&&"M"!==n[u][0]&&(n.splice(u,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[u][1],o.y=t[u][2],e=Math.max(r.length,i&&i.length||0))};e=Math.max(r.length,i&&i.length||0);for(var m=0;m1?1:c<0?0:c)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],l=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;p<12;p++){var d=s*f[p]+s,v=y(d,t,e,i,a),g=y(d,n,r,o,u),m=v*v+g*g;h+=l[p]*Math.sqrt(m)}return s*h},b=function(t,n,e,r,i,o,a,u){for(var c,s,f,l,h=[],p=[[],[]],d=0;d<2;++d)if(0===d?(s=6*t-12*e+6*i,c=-3*t+9*e-9*i+3*a,f=3*e-3*t):(s=6*n-12*r+6*o,c=-3*n+9*r-9*o+3*u,f=3*r-3*n),Math.abs(c)<1e-12){if(Math.abs(s)<1e-12)continue;(l=-f/s)>0&&l<1&&h.push(l)}else{var v=s*s-4*f*c,g=Math.sqrt(v);if(!(v<0)){var y=(-s+g)/(2*c);y>0&&y<1&&h.push(y);var m=(-s-g)/(2*c);m>0&&m<1&&h.push(m)}}for(var b,x=h.length,M=x;x--;)b=1-(l=h[x]),p[0][x]=b*b*b*t+3*b*b*l*e+3*b*l*l*i+l*l*l*a,p[1][x]=b*b*b*n+3*b*b*l*r+3*b*l*l*o+l*l*l*u;return p[0][M]=t,p[1][M]=n,p[0][M+1]=a,p[1][M+1]=u,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},x=function(t,n,e,r,i,o,a,u){if(!(Math.max(t,e)Math.max(i,a)||Math.max(n,r)Math.max(o,u))){var c=(t-e)*(o-u)-(n-r)*(i-a);if(c){var s=((t*r-n*e)*(i-a)-(t-e)*(i*u-o*a))/c,f=((t*r-n*e)*(o-u)-(n-r)*(i*u-o*a))/c,l=+s.toFixed(2),h=+f.toFixed(2);if(!(l<+Math.min(t,e).toFixed(2)||l>+Math.max(t,e).toFixed(2)||l<+Math.min(i,a).toFixed(2)||l>+Math.max(i,a).toFixed(2)||h<+Math.min(n,r).toFixed(2)||h>+Math.max(n,r).toFixed(2)||h<+Math.min(o,u).toFixed(2)||h>+Math.max(o,u).toFixed(2)))return{x:s,y:f}}}},M=function(t,n,e){return n>=t.x&&n<=t.x+t.width&&e>=t.y&&e<=t.y+t.height},w=function(t,n,e,r,i){if(i)return[["M",+t+ +i,n],["l",e-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-e,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var o=[["M",t,n],["l",e,0],["l",0,r],["l",-e,0],["z"]];return o.parsePathArray=g,o},_=function(t,n,e,r){return null===t&&(t=n=e=r=0),null===n&&(n=t.y,e=t.width,r=t.height,t=t.x),{x:t,y:n,width:e,w:e,height:r,h:r,x2:t+e,y2:n+r,cx:t+e/2,cy:n+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:w(t,n,e,r),vb:[t,n,e,r].join(" ")}},A=function(t,n,e,i,o,a,u,c){Object(r.b)(t)||(t=[t,n,e,i,o,a,u,c]);var s=b.apply(null,t);return _(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},O=function(t,n,e,r,i,o,a,u,c){var s=1-c,f=Math.pow(s,3),l=Math.pow(s,2),h=c*c,p=h*c,d=t+2*c*(e-t)+h*(i-2*e+t),v=n+2*c*(r-n)+h*(o-2*r+n),g=e+2*c*(i-e)+h*(a-2*i+e),y=r+2*c*(o-r)+h*(u-2*o+r);return{x:f*t+3*l*c*e+3*s*c*c*i+p*a,y:f*n+3*l*c*r+3*s*c*c*o+p*u,m:{x:d,y:v},n:{x:g,y:y},start:{x:s*t+c*e,y:s*n+c*r},end:{x:s*i+c*a,y:s*o+c*u},alpha:90-180*Math.atan2(d-g,v-y)/Math.PI}},S=function(t,n,e){if(!function(t,n){return t=_(t),n=_(n),M(n,t.x,t.y)||M(n,t.x2,t.y)||M(n,t.x,t.y2)||M(n,t.x2,t.y2)||M(t,n.x,n.y)||M(t,n.x2,n.y)||M(t,n.x,n.y2)||M(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)}(A(t),A(n)))return e?0:[];for(var r=~~(m.apply(0,t)/8),i=~~(m.apply(0,n)/8),o=[],a=[],u={},c=e?0:[],s=0;s=0&&w<=1&&S>=0&&S<=1&&(e?c+=1:c.push({x:b.x,y:b.y,t1:w,t2:S}))}}return c},P=function(t,n){return function(t,n,e){var r,i,o,a,u,c,s,f,l,h;t=d(t),n=d(n);for(var p=e?0:[],v=0,g=t.length;v=3&&(3===t.length&&n.push("Q"),n=n.concat(t[1])),2===t.length&&n.push("L"),n=n.concat(t[t.length-1])}))}(t,n,e));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var o=0;o<=e-1;o++)r.push(i)}return r},T=function(t,n){if(1===t.length)return t;var e=t.length-1,r=n.length-1,i=e/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;c--)a=o[c].index,"add"===o[c].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var l=i-(r=t.length);if(r0)){t[r]=n[r];break}e=I(e,t[r-1],1)}t[r]=["Q"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"T":t[r]=["T"].concat(e[0]);break;case"C":if(e.length<3){if(!(r>0)){t[r]=n[r];break}e=I(e,t[r-1],2)}t[r]=["C"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"S":if(e.length<2){if(!(r>0)){t[r]=n[r];break}e=I(e,t[r-1],1)}t[r]=["S"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;default:t[r]=n[r]}return t}},function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return u}));var r=e(1),i=e(17);function o(t,n,e){var i=1;return Object(r.h)(t)&&(i=t.split("\n").length),i>1?n*i+function(t,n){return n?n-t:.14*t}(n,e)*(i-1):n}function a(t,n){var e=Object(i.a)(),o=0;if(Object(r.e)(t)||""===t)return o;if(e.save(),e.font=n,Object(r.h)(t)&&t.includes("\n")){var a=t.split("\n");Object(r.a)(a,(function(t){var n=e.measureText(t).width;o0)}));return c.length>0?(Object(a.a)(c,(function(t){var n=t.getBBox();o.push(n.minX,n.maxX),u.push(n.minY,n.maxY)})),t=Object(i.k)(o),n=Object(i.j)(o),e=Object(i.k)(u),r=Object(i.j)(u)):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,e=1/0,r=-1/0,o=[],u=[],c=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return c.length>0?(Object(a.a)(c,(function(t){var n=t.getCanvasBBox();o.push(n.minX,n.maxX),u.push(n.minY,n.maxY)})),t=Object(i.k)(o),n=Object(i.j)(o),e=Object(i.k)(u),r=Object(i.j)(u)):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.children=[],n},n.prototype.onAttrChange=function(n,e,r){if(t.prototype.onAttrChange.call(this,n,e,r),"matrix"===n){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},n.prototype.applyMatrix=function(n){var e=this.getTotalMatrix();t.prototype.applyMatrix.call(this,n);var r=this.getTotalMatrix();r!==e&&this._applyChildrenMarix(r)},n.prototype._applyChildrenMarix=function(t){var n=this.getChildren();Object(a.a)(n,(function(n){n.applyMatrix(t)}))},n.prototype.addShape=function(){for(var t=[],n=0;n=0;o--){var u=t[o];if(Object(a.b)(u)&&(u.isGroup()?i=u.getShape(n,e,r):u.isHit(n,e)&&(i=u)),i)break}return i},n.prototype.add=function(t){var n=this.getCanvas(),e=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,n,e){void 0===e&&(e=!0),e?n.destroy():(n.set("parent",null),n.set("canvas",null)),Object(a.j)(t.getChildren(),n)}(i,t,!1),t.set("parent",this),n&&function t(n,e){if(n.set("canvas",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,n),r&&function t(n,e){if(n.set("timeline",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,r),e.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},n.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},n.prototype.getChildren=function(){return this.get("children")},n.prototype.sort=function(){var t,n=this.getChildren();Object(a.a)(n,(function(t,n){return t._INDEX=n,t})),n.sort((t=function(t,n){return t.get("zIndex")-n.get("zIndex")},function(n,e){var r=t(n,e);return 0===r?n._INDEX-e._INDEX:r})),this.onCanvasChange("sort")},n.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},n.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},n.prototype.getFirst=function(){return this.getChildByIndex(0)},n.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},n.prototype.getChildByIndex=function(t){return this.getChildren()[t]},n.prototype.getCount=function(){return this.getChildren().length},n.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},n.prototype.removeChild=function(t,n){void 0===n&&(n=!0),this.contain(t)&&t.remove(n)},n.prototype.findAll=function(t){var n=[],e=this.getChildren();return Object(a.a)(e,(function(e){t(e)&&n.push(e),e.isGroup()&&(n=n.concat(e.findAll(t)))})),n},n.prototype.find=function(t){var n=null,e=this.getChildren();return Object(a.a)(e,(function(e){if(t(e)?n=e:e.isGroup()&&(n=e.find(t)),n)return!1})),n},n.prototype.findById=function(t){return this.find((function(n){return n.get("id")===t}))},n.prototype.findByClassName=function(t){return this.find((function(n){return n.get("className")===t}))},n.prototype.findAllByName=function(t){return this.findAll((function(n){return n.get("name")===t}))},n}(o.a);n.a=c},function(t,n,e){"use strict";var r={};e.r(r),e.d(r,"leftTranslate",(function(){return u})),e.d(r,"leftRotate",(function(){return c})),e.d(r,"leftScale",(function(){return s})),e.d(r,"transform",(function(){return f})),e.d(r,"direction",(function(){return l})),e.d(r,"angleTo",(function(){return h})),e.d(r,"vertical",(function(){return p}));var i=e(6),o=e(0),a=e(2);function u(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return a.a.fromTranslation(r,e),a.a.multiply(t,r,n)}function c(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return a.a.fromRotation(r,e),a.a.multiply(t,r,n)}function s(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return a.a.fromScaling(r,e),a.a.multiply(t,r,n)}function f(t,n){for(var e,r,i,o=t?[].concat(t):[1,0,0,0,1,0,0,0,1],f=0,l=n.length;f=0;return e?i?2*Math.PI-r:r:i?r:2*Math.PI-r}function p(t,n,e){return e?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t}var d=e(1),v=e(7),g=e(19),y=r.transform,m=["zIndex","capture","visible","type"],b=["repeat"];function x(t,n){var e={},r=n.attrs;for(var i in t)e[i]=r[i];return e}function M(t,n){var e={},r=n.attr();return Object(o.a)(t,(function(t,n){-1!==b.indexOf(n)||Object(o.c)(r[n],t)||(e[n]=t)})),e}function w(t,n){if(n.onFrame)return t;var e=n.startTime,r=n.delay,i=n.duration,a=Object.prototype.hasOwnProperty;return Object(o.a)(t,(function(t){e+rt.delay&&Object(o.a)(n.toAttrs,(function(n,e){a.call(t.toAttrs,e)&&(delete t.toAttrs[e],delete t.fromAttrs[e])}))})),t}var _=function(t){function n(n){var e=t.call(this,n)||this;e.attrs={};var r=e.getDefaultAttrs();return Object(o.l)(r,n.attrs),e.attrs=r,e.initAttrs(r),e.initAnimate(),e}return Object(i.a)(n,t),n.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},n.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},n.prototype.onCanvasChange=function(t){},n.prototype.initAttrs=function(t){},n.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},n.prototype.isGroup=function(){return!1},n.prototype.getParent=function(){return this.get("parent")},n.prototype.getCanvas=function(){return this.get("canvas")},n.prototype.attr=function(){for(var t,n=[],e=0;e0?r=w(r,b):e.addAnimator(this),r.push(b),this.set("animations",r),this.set("_pause",{isPaused:!1})}},n.prototype.stopAnimate=function(t){var n=this;void 0===t&&(t=!0);var e=this.get("animations");Object(o.a)(e,(function(e){t&&(e.onFrame?n.attr(e.onFrame(1)):n.attr(e.toAttrs)),e.callback&&e.callback()})),this.set("animating",!1),this.set("animations",[])},n.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations"),e=t.getTime();return Object(o.a)(n,(function(t){t._paused=!0,t._pauseTime=e,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:e}),this},n.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),n=this.get("animations"),e=this.get("_pause").pauseTime;return Object(o.a)(n,(function(n){n.startTime=n.startTime+(t-e),n._paused=!1,n._pauseTime=null,n.resumeCallback&&n.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},n.prototype.emitDelegation=function(t,n){var e,r=this,i=n.propagationPath;this.getEvents();"mouseenter"===t?e=n.fromShape:"mouseleave"===t&&(e=n.toShape);for(var a=function(t){var a=i[t],c=a.get("name");if(c){if((a.isGroup()||a.isCanvas&&a.isCanvas())&&e&&Object(d.g)(a,e))return"break";Object(o.b)(c)?Object(o.a)(c,(function(t){r.emitDelegateEvent(a,t,n)})):u.emitDelegateEvent(a,c,n)}},u=this,c=0;c1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}Object(h.a)(t,(function(n,e){isNaN(n)||(t[e]=+n)})),n[e]=t})),n):void 0};e(2);var g="\t\n\v\f\r   ᠎              \u2028\u2029";new RegExp("([a-z])["+g+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+g+"]*,?["+g+"]*)+)","ig"),new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+g+"]*,?["+g+"]*","ig");Math.PI;function y(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function m(t,n){return y(t)*y(n)?(t[0]*n[0]+t[1]*n[1])/(y(t)*y(n)):1}function b(t,n){return(t[0]*n[1]1&&(e*=Math.sqrt(d),r*=Math.sqrt(d));var v=e*e*(p*p)+r*r*(l*l),g=v?Math.sqrt((e*e*(r*r)-v)/v):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var y=r?g*e*p/r:0,M=e?g*-r*l/e:0,w=(u+s)/2+Math.cos(i)*y-Math.sin(i)*M,_=(c+f)/2+Math.sin(i)*y+Math.cos(i)*M,A=[(l-y)/e,(p-M)/r],O=[(-1*l-y)/e,(-1*p-M)/r],S=b([1,0],A),P=b(A,O);return m(A,O)<=-1&&(P=Math.PI),m(A,O)>=1&&(P=0),0===a&&P>0&&(P-=2*Math.PI),1===a&&P<0&&(P+=2*Math.PI),{cx:w,cy:_,rx:x(t,[s,f])?0:e,ry:x(t,[s,f])?0:r,startAngle:S,endAngle:S+P,xRotation:i,arcFlag:o,sweepFlag:a}}function w(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}function _(t,n){var e=t.prePoint,r=t.currentPoint,i=t.nextPoint,o=Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2),a=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),u=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),c=Math.acos((o+a-u)/(2*Math.sqrt(o)*Math.sqrt(a)));if(!c||0===Math.sin(c)||Object(h.g)(c,0))return{xExtra:0,yExtra:0};var s=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),f=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));return s=s>Math.PI/2?Math.PI-s:s,f=f>Math.PI/2?Math.PI-f:f,{xExtra:Math.cos(c/2-s)*(n/2*(1/Math.sin(c/2)))-n/2||0,yExtra:Math.cos(f-c/2)*(n/2*(1/Math.sin(c/2)))-n/2||0}}i("rect",a),i("image",a),i("circle",u),i("marker",u),i("polyline",(function(t){for(var n=t.attr().points,e=[],r=[],i=0;i1)for(var e=1;e=t&&e.minY<=n&&e.maxY>=n},n.prototype.afterAttrsChange=function(n){t.prototype.afterAttrsChange.call(this,n),this.clearCacheBBox()},n.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},n.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},n.prototype.applyMatrix=function(n){t.prototype.applyMatrix.call(this,n),this.set("canvasBBox",null)},n.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),e=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(n){var u=Object(o.c)(n,[t.minX,t.minY]),c=Object(o.c)(n,[t.maxX,t.minY]),s=Object(o.c)(n,[t.minX,t.maxY]),f=Object(o.c)(n,[t.maxX,t.maxY]);e=Math.min(u[0],c[0],s[0],f[0]),i=Math.max(u[0],c[0],s[0],f[0]),r=Math.min(u[1],c[1],s[1],f[1]),a=Math.max(u[1],c[1],s[1],f[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,d=l.shadowOffsetX,v=void 0===d?0:d,g=l.shadowOffsetY,y=void 0===g?0:g,m=e-p+v,b=i+p+v,x=r-p+y,M=a+p+y;e=Math.min(e,m),i=Math.max(i,b),r=Math.min(r,x),a=Math.max(a,M)}return{x:e,y:r,minX:e,minY:r,maxX:i,maxY:a,width:i-e,height:a-r}},n.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},n.prototype.isClipShape=function(){return this.get("isClipShape")},n.prototype.isInShape=function(t,n){return!1},n.prototype.isOnlyHitBox=function(){return!1},n.prototype.isHit=function(t,n){var e=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,n,1],o=(i=this.invertFromMatrix(i))[0],a=i[1],u=this._isInBBox(o,a);if(this.isOnlyHitBox())return u;if(u&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(e&&e.isHit(o,a))return!0;if(r&&r.isHit(o,a))return!0}return!1},n}(i.a);n.a=a},function(t,n,e){"use strict";var r,i,o=e(6),a=e(31),u=e(20),c=e(1),s=e(0),f=0,l=0,h=0,p=0,d=0,v=0,g="object"==typeof performance&&performance.now?performance:Date,y="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function m(){return d||(y(b),d=g.now()+v)}function b(){d=0}function x(){this._call=this._time=this._next=null}function M(t,n,e){var r=new x;return r.restart(t,n,e),r}function w(){d=(p=g.now())+v,f=l=0;try{!function(){m(),++f;for(var t,n=r;n;)(t=d-n._time)>=0&&n._call.call(null,t),n=n._next;--f}()}finally{f=0,function(){var t,n,e=r,o=1/0;for(;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,A(o)}(),d=0}}function _(){var t=g.now(),n=t-p;n>1e3&&(v-=n,p=t)}function A(t){f||(l&&(l=clearTimeout(l)),t-d>24?(t<1/0&&(l=setTimeout(w,t-g.now()-v)),h&&(h=clearInterval(h))):(h||(p=g.now(),h=setInterval(_,1e3)),f=1,y(w)))}x.prototype=M.prototype={constructor:x,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?m():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};var O=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function S(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function P(){}var C="\\s*([+-]?\\d+)\\s*",j="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",T="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k=/^#([0-9a-f]{3,8})$/,E=new RegExp(`^rgb\\(${C},${C},${C}\\)$`),B=new RegExp(`^rgb\\(${T},${T},${T}\\)$`),I=new RegExp(`^rgba\\(${C},${C},${C},${j}\\)$`),D=new RegExp(`^rgba\\(${T},${T},${T},${j}\\)$`),N=new RegExp(`^hsl\\(${j},${T},${T}\\)$`),F=new RegExp(`^hsla\\(${j},${T},${T},${j}\\)$`),L={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function R(){return this.rgb().formatHex()}function G(){return this.rgb().formatRgb()}function V(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=k.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?W(n):3===e?new Y(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?q(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?q(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=E.exec(t))?new Y(n[1],n[2],n[3],1):(n=B.exec(t))?new Y(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=I.exec(t))?q(n[1],n[2],n[3],n[4]):(n=D.exec(t))?q(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=N.exec(t))?K(n[1],n[2]/100,n[3]/100,1):(n=F.exec(t))?K(n[1],n[2]/100,n[3]/100,n[4]):L.hasOwnProperty(t)?W(L[t]):"transparent"===t?new Y(NaN,NaN,NaN,0):null}function W(t){return new Y(t>>16&255,t>>8&255,255&t,1)}function q(t,n,e,r){return r<=0&&(t=n=e=NaN),new Y(t,n,e,r)}function X(t){return t instanceof P||(t=V(t)),t?new Y((t=t.rgb()).r,t.g,t.b,t.opacity):new Y}function $(t,n,e,r){return 1===arguments.length?X(t):new Y(t,n,e,null==r?1:r)}function Y(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function z(){return`#${Z(this.r)}${Z(this.g)}${Z(this.b)}`}function H(){const t=Q(this.opacity);return`${1===t?"rgb(":"rgba("}${U(this.r)}, ${U(this.g)}, ${U(this.b)}${1===t?")":`, ${t})`}`}function Q(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function U(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Z(t){return((t=U(t))<16?"0":"")+t.toString(16)}function K(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new tt(t,n,e,r)}function J(t){if(t instanceof tt)return new tt(t.h,t.s,t.l,t.opacity);if(t instanceof P||(t=V(t)),!t)return new tt;if(t instanceof tt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new tt(a,u,c,t.opacity)}function tt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function nt(t){return(t=(t||0)%360)<0?t+360:t}function et(t){return Math.max(0,Math.min(1,t||0))}function rt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function it(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}O(P,V,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:R,formatHex:R,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return J(this).formatHsl()},formatRgb:G,toString:G}),O(Y,$,S(P,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Y(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Y(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Y(U(this.r),U(this.g),U(this.b),Q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z,formatHex:z,formatHex8:function(){return`#${Z(this.r)}${Z(this.g)}${Z(this.b)}${Z(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:H,toString:H})),O(tt,(function(t,n,e,r){return 1===arguments.length?J(t):new tt(t,n,e,null==r?1:r)}),S(P,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new tt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new tt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Y(rt(t>=240?t-240:t+120,i,r),rt(t,i,r),rt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new tt(nt(this.h),et(this.s),et(this.l),Q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Q(this.opacity);return`${1===t?"hsl(":"hsla("}${nt(this.h)}, ${100*et(this.s)}%, ${100*et(this.l)}%${1===t?")":`, ${t})`}`}}));var ot=t=>()=>t;function at(t,n){return function(e){return t+e*n}}function ut(t){return 1==(t=+t)?ct:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ot(isNaN(n)?e:n)}}function ct(t,n){var e=n-t;return e?at(t,e):ot(isNaN(t)?n:t)}var st=function t(n){var e=ut(n);function r(t,n){var r=e((t=$(t)).r,(n=$(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=ct(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function ft(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=ro&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:vt(e,r)})),o=mt.lastIndex;return op.length?(h=wt.parsePathString(o[l]),p=wt.parsePathString(i[l]),p=wt.fillPathByDiff(p,h),p=wt.formatPath(p,h),n.fromAttrs.path=p,n.toAttrs.path=h):n.pathFormatted||(h=wt.parsePathString(o[l]),p=wt.parsePathString(i[l]),p=wt.formatPath(p,h),n.fromAttrs.path=p,n.toAttrs.path=h,n.pathFormatted=!0),r[l]=[];for(var d=0;d0){for(var o=r.animators.length-1;o>=0;o--)if((t=r.animators[o]).destroyed)r.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(n=t.get("animations")).length-1;a>=0;a--)e=n[a],At(t,e,i)&&(n.splice(a,1),!1,e.callback&&e.callback());0===n.length&&r.removeAnimator(o)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(n){n.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),St=e(16),Pt=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Ct(t,n,e){e.name=n,e.target=t,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}function jt(t,n,e){if(e.bubbles){var r=void 0,i=!1;if("mouseenter"===n?(r=e.fromShape,i=!0):"mouseleave"===n&&(i=!0,r=e.toShape),t.isCanvas()&&i)return;if(r&&Object(c.g)(t,r))return void(e.bubbles=!1);e.name=n,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}}var Tt=function(){function t(t){var n=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var e=t.type;n._triggerEvent(e,t)},this._onDocumentMove=function(t){if(n.canvas.get("el")!==t.target&&(n.dragging||n.currentShape)){var e=n._getPointInfo(t);n.dragging&&n._emitEvent("drag",t,e,n.draggingShape)}},this._onDocumentMouseUp=function(t){if(n.canvas.get("el")!==t.target&&n.dragging){var e=n._getPointInfo(t);n.draggingShape&&n._emitEvent("drop",t,e,null),n._emitEvent("dragend",t,e,n.draggingShape),n._afterDrag(n.draggingShape,e,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,n=this.canvas.get("el");Object(c.a)(Pt,(function(e){n.addEventListener(e,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,n=this.canvas.get("el");Object(c.a)(Pt,(function(e){n.removeEventListener(e,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,n,e,r,i,o){var a=new St.a(t,n);return a.fromShape=i,a.toShape=o,a.x=e.x,a.y=e.y,a.clientX=e.clientX,a.clientY=e.clientY,a.propagationPath.push(r),a},t.prototype._getShape=function(t,n){return this.canvas.getShape(t.x,t.y,n)},t.prototype._getPointInfo=function(t){var n=this.canvas,e=n.getClientByEvent(t),r=n.getPointByEvent(t);return{x:r.x,y:r.y,clientX:e.x,clientY:e.y}},t.prototype._triggerEvent=function(t,n){var e=this._getPointInfo(n),r=this._getShape(e,n),i=this["_on"+t],o=!1;if(i)i.call(this,e,r,n);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,n,e,null,null,r),r&&this._emitEvent(t,n,e,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",n,e,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,n,e,a,a,null),this._emitEvent(t,n,e,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",n,e,null)):this._emitEvent(t,n,e,r,null,null)}if(o||(this.currentShape=r),r&&!r.get("destroyed")){var u=this.canvas;u.get("el").style.cursor=r.attr("cursor")||u.get("cursor")}},t.prototype._onmousedown=function(t,n,e){0===e.button&&(this.mousedownShape=n,this.mousedownPoint=t,this.mousedownTimeStamp=e.timeStamp),this._emitEvent("mousedown",e,t,n,null,null)},t.prototype._emitMouseoverEvents=function(t,n,e,r){var i=this.canvas.get("el");e!==r&&(e&&(this._emitEvent("mouseout",t,n,e,e,r),this._emitEvent("mouseleave",t,n,e,e,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,n,r,e,r),this._emitEvent("mouseenter",t,n,r,e,r)))},t.prototype._emitDragoverEvents=function(t,n,e,r,i){r?(r!==e&&(e&&this._emitEvent("dragleave",t,n,e,e,r),this._emitEvent("dragenter",t,n,r,e,r)),i||this._emitEvent("dragover",t,n,r)):e&&this._emitEvent("dragleave",t,n,e,e,r),i&&this._emitEvent("dragover",t,n,r)},t.prototype._afterDrag=function(t,n,e){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(n,e);r!==t&&this._emitMouseoverEvents(e,n,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,n,e){if(0===e.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",e,t,n),this._emitEvent("dragend",e,t,r),this._afterDrag(r,t,e)):(this._emitEvent("mouseup",e,t,n),n===this.mousedownShape&&this._emitEvent("click",e,t,n),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,n,e){e.preventDefault();var r=this.currentShape;this._emitDragoverEvents(e,t,r,n,!0)},t.prototype._onmousemove=function(t,n,e){var r=this.canvas,i=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(e,t,i,n,!1),this._emitEvent("drag",e,t,o);else{var a=this.mousedownPoint;if(a){var u=this.mousedownShape,c=e.timeStamp-this.mousedownTimeStamp,s=a.clientX-t.clientX,f=a.clientY-t.clientY;c>120||s*s+f*f>40?u&&u.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",e,t,o),this.mousedownShape=null,this.mousedownPoint=null):!u&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",e,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n)):(this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n))}else this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n)}},t.prototype._emitEvent=function(t,n,e,r,i,o){var a=this._getEventObj(t,n,e,r,i,o);if(r){a.shape=r,Ct(r,t,a);for(var u=r.getParent();u;)u.emitDelegation(t,a),a.propagationStopped||jt(u,t,a),a.propagationPath.push(u),u=u.getParent()}else{Ct(this.canvas,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),kt=Object(a.a)(),Et=kt&&"firefox"===kt.name,Bt=function(t){function n(n){var e=t.call(this,n)||this;return e.initContainer(),e.initDom(),e.initEvents(),e.initTimeline(),e}return Object(o.a)(n,t),n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.cursor="default",n.supportCSSTransform=!1,n},n.prototype.initContainer=function(){var t=this.get("container");Object(c.h)(t)&&(t=document.getElementById(t),this.set("container",t))},n.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},n.prototype.initEvents=function(){var t=new Tt({canvas:this});t.init(),this.set("eventController",t)},n.prototype.initTimeline=function(){var t=new Ot(this);this.set("timeline",t)},n.prototype.setDOMSize=function(t,n){var e=this.get("el");c.c&&(e.style.width=t+"px",e.style.height=n+"px")},n.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},n.prototype.getRenderer=function(){return this.get("renderer")},n.prototype.getCursor=function(){return this.get("cursor")},n.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");c.c&&n&&(n.style.cursor=t)},n.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(Et&&!Object(c.e)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Object(c.e)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),e=n.x,r=n.y;return this.getPointByClient(e,r)},n.prototype.getClientByEvent=function(t){var n=t;return t.touches&&(n="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:n.clientX,y:n.clientY}},n.prototype.getPointByClient=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t-e.left,y:n-e.top}},n.prototype.getClientByPoint=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t+e.left,y:n+e.top}},n.prototype.draw=function(){},n.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},n.prototype.clearEvents=function(){this.get("eventController").destroy()},n.prototype.isCanvas=function(){return!0},n.prototype.getParent=function(){return null},n.prototype.destroy=function(){var n=this.get("timeline");this.get("destroyed")||(this.clear(),n&&n.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},n}(u.a);n.a=Bt},function(t,n,e){"use strict";(function(t){e.d(n,"a",(function(){return h}));var r=function(t,n,e){if(e||2===arguments.length)for(var r,i=0,o=n.length;i=0;c--)r.removeChild(u[c]);r.appendChild(a)}else r.innerHTML=a}else r.innerHTML=e.html},n}(e(8).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(5),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="ellipse",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,rx:0,ry:0})},n.prototype.createPath=function(t,n){var e=this.attr(),r=this.get("el");(0,i.each)(n||e,(function(t,n){"x"===n||"y"===n?r.setAttribute("c".concat(n),t):o.SVG_ATTR_MAP[n]&&r.setAttribute(o.SVG_ATTR_MAP[n],t)}))},n}(e(8).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(5),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="image",n.canFill=!1,n.canStroke=!1,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,width:0,height:0})},n.prototype.createPath=function(t,n){var e=this,r=this.attr(),a=this.get("el");(0,i.each)(n||r,(function(t,n){"img"===n?e._setImage(r.img):o.SVG_ATTR_MAP[n]&&a.setAttribute(o.SVG_ATTR_MAP[n],t)}))},n.prototype.setAttr=function(t,n){this.attrs[t]=n,"img"===t&&this._setImage(n)},n.prototype._setImage=function(t){var n=this.attr(),e=this.get("el");if((0,i.isString)(t))e.setAttribute("href",t);else if(t instanceof window.Image)n.width||(e.setAttribute("width",t.width),this.attr("width",t.width)),n.height||(e.setAttribute("height",t.height),this.attr("height",t.height)),e.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,i.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())e.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var r=document.createElement("canvas");r.setAttribute("width","".concat(t.width)),r.setAttribute("height","".concat(t.height)),r.getContext("2d").putImageData(t,0,0),n.width||(e.setAttribute("width","".concat(t.width)),this.attr("width",t.width)),n.height||(e.setAttribute("height","".concat(t.height)),this.attr("height",t.height)),e.setAttribute("href",r.toDataURL())}},n}(e(8).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(10),o=e(3),a=e(5),u=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="line",n.canFill=!1,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},n.prototype.createPath=function(t,n){var e=this.attr(),r=this.get("el");(0,o.each)(n||e,(function(n,i){if("startArrow"===i||"endArrow"===i)if(n){var u=(0,o.isObject)(n)?t.addArrow(e,a.SVG_ATTR_MAP[i]):t.getDefaultArrow(e,a.SVG_ATTR_MAP[i]);r.setAttribute(a.SVG_ATTR_MAP[i],"url(#".concat(u,")"))}else r.removeAttribute(a.SVG_ATTR_MAP[i]);else a.SVG_ATTR_MAP[i]&&r.setAttribute(a.SVG_ATTR_MAP[i],n)}))},n.prototype.getTotalLength=function(){var t=this.attr(),n=t.x1,e=t.y1,r=t.x2,o=t.y2;return i.Line.length(n,e,r,o)},n.prototype.getPoint=function(t){var n=this.attr(),e=n.x1,r=n.y1,o=n.x2,a=n.y2;return i.Line.pointAt(e,r,o,a,t)},n}(e(8).default);n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(8),a=e(47),u=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="marker",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},n.prototype._assembleMarker=function(){var t=this._getPath();return(0,i.isArray)(t)?t.map((function(t){return t.join(" ")})).join(""):t},n.prototype._getPath=function(){var t,n=this.attr(),e=n.x,r=n.y,o=n.r||n.radius,u=n.symbol||"circle";return(t=(0,i.isFunction)(u)?u:a.default.get(u))?t(e,r,o):(console.warn("".concat(t," symbol is not exist.")),null)},n.symbolsFactory=a.default,n}(o.default);n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={circle:function(t,n,e){return[["M",t,n],["m",-e,0],["a",e,e,0,1,0,2*e,0],["a",e,e,0,1,0,2*-e,0]]},square:function(t,n,e){return[["M",t-e,n-e],["L",t+e,n-e],["L",t+e,n+e],["L",t-e,n+e],["Z"]]},diamond:function(t,n,e){return[["M",t-e,n],["L",t,n-e],["L",t+e,n],["L",t,n+e],["Z"]]},triangle:function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n+r],["L",t,n-r],["L",t+e,n+r],["z"]]},triangleDown:function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n-r],["L",t+e,n-r],["L",t,n+r],["Z"]]}};n.default={get:function(t){return r[t]},register:function(t,n){r[t]=n},remove:function(t){delete r[t]},getAll:function(){return r}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(5),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="path",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{startArrow:!1,endArrow:!1})},n.prototype.createPath=function(t,n){var e=this,r=this.attr(),a=this.get("el");(0,i.each)(n||r,(function(n,u){if("path"===u&&(0,i.isArray)(n))a.setAttribute("d",e._formatPath(n));else if("startArrow"===u||"endArrow"===u)if(n){var c=(0,i.isObject)(n)?t.addArrow(r,o.SVG_ATTR_MAP[u]):t.getDefaultArrow(r,o.SVG_ATTR_MAP[u]);a.setAttribute(o.SVG_ATTR_MAP[u],"url(#".concat(c,")"))}else a.removeAttribute(o.SVG_ATTR_MAP[u]);else o.SVG_ATTR_MAP[u]&&a.setAttribute(o.SVG_ATTR_MAP[u],n)}))},n.prototype._formatPath=function(t){var n=t.map((function(t){return t.join(" ")})).join("");return~n.indexOf("NaN")?"":n},n.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},n.prototype.getPoint=function(t){var n=this.get("el"),e=this.getTotalLength();if(0===e)return null;var r=n?n.getPointAtLength(t*e):null;return r?{x:r.x,y:r.y}:null},n}(e(8).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(5),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="polygon",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.createPath=function(t,n){var e=this.attr(),r=this.get("el");(0,i.each)(n||e,(function(t,n){"points"===n&&(0,i.isArray)(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return"".concat(t[0],",").concat(t[1])})).join(" ")):o.SVG_ATTR_MAP[n]&&r.setAttribute(o.SVG_ATTR_MAP[n],t)}))},n}(e(8).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(10),o=e(10),a=e(3),u=e(5),c=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="polyline",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{startArrow:!1,endArrow:!1})},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),-1!==["points"].indexOf(n)&&this._resetCache()},n.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},n.prototype.createPath=function(t,n){var e=this.attr(),r=this.get("el");(0,a.each)(n||e,(function(t,n){"points"===n&&(0,a.isArray)(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return"".concat(t[0],",").concat(t[1])})).join(" ")):u.SVG_ATTR_MAP[n]&&r.setAttribute(u.SVG_ATTR_MAP[n],t)}))},n.prototype.getTotalLength=function(){var t=this.attr().points,n=this.get("totalLength");return(0,a.isNil)(n)?(this.set("totalLength",i.Polyline.length(t)),this.get("totalLength")):n},n.prototype.getPoint=function(t){var n,e,r=this.attr().points,i=this.get("tCache");return i||(this._setTcache(),i=this.get("tCache")),(0,a.each)(i,(function(r,i){t>=r[0]&&t<=r[1]&&(n=(t-r[0])/(r[1]-r[0]),e=i)})),o.Line.pointAt(r[e][0],r[e][1],r[e+1][0],r[e+1][1],n)},n.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var n=this.getTotalLength();if(!(n<=0)){var e,r,i=0,u=[];(0,a.each)(t,(function(a,c){t[c+1]&&((e=[])[0]=i/n,r=o.Line.length(a[0],a[1],t[c+1][0],t[c+1][1]),i+=r,e[1]=i/n,u.push(e))})),this.set("tCache",u)}}},n.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},n.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,e=[];return e.push([t[n-1][0],t[n-1][1]]),e.push([t[n][0],t[n][1]]),e},n}(e(8).default);n.default=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(8),a=e(5),u=e(52),c=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="rect",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,width:0,height:0,radius:0})},n.prototype.createPath=function(t,n){var e=this,r=this.attr(),o=this.get("el"),u=!1,c=["x","y","width","height","radius"];(0,i.each)(n||r,(function(t,n){-1===c.indexOf(n)||u?-1===c.indexOf(n)&&a.SVG_ATTR_MAP[n]&&o.setAttribute(a.SVG_ATTR_MAP[n],t):(o.setAttribute("d",e._assembleRect(r)),u=!0)}))},n.prototype._assembleRect=function(t){var n=t.x,e=t.y,r=t.width,o=t.height,a=t.radius;if(!a)return"M ".concat(n,",").concat(e," l ").concat(r,",0 l 0,").concat(o," l").concat(-r," 0 z");var c=(0,u.parseRadius)(a);return(0,i.isArray)(a)?1===a.length?c.r1=c.r2=c.r3=c.r4=a[0]:2===a.length?(c.r1=c.r3=a[0],c.r2=c.r4=a[1]):3===a.length?(c.r1=a[0],c.r2=c.r4=a[1],c.r3=a[2]):(c.r1=a[0],c.r2=a[1],c.r3=a[2],c.r4=a[3]):c.r1=c.r2=c.r3=c.r4=a,[["M ".concat(n+c.r1,",").concat(e)],["l ".concat(r-c.r1-c.r2,",0")],["a ".concat(c.r2,",").concat(c.r2,",0,0,1,").concat(c.r2,",").concat(c.r2)],["l 0,".concat(o-c.r2-c.r3)],["a ".concat(c.r3,",").concat(c.r3,",0,0,1,").concat(-c.r3,",").concat(c.r3)],["l ".concat(c.r3+c.r4-r,",0")],["a ".concat(c.r4,",").concat(c.r4,",0,0,1,").concat(-c.r4,",").concat(-c.r4)],["l 0,".concat(c.r4+c.r1-o)],["a ".concat(c.r1,",").concat(c.r1,",0,0,1,").concat(c.r1,",").concat(-c.r1)],["z"]].join(" ")},n}(o.default);n.default=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parsePath=n.parseRadius=void 0;var r=e(3),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s,]+/gi;n.parseRadius=function(t){var n=0,e=0,i=0,o=0;return(0,r.isArray)(t)?1===t.length?n=e=i=o=t[0]:2===t.length?(n=i=t[0],e=o=t[1]):3===t.length?(n=t[0],e=o=t[1],i=t[2]):(n=t[0],e=t[1],i=t[2],o=t[3]):n=e=i=o=t,{r1:n,r2:e,r3:i,r4:o}},n.parsePath=function(t){return t=t||[],(0,r.isArray)(t)?t:(0,r.isString)(t)?(t=t.match(i),(0,r.each)(t,(function(n,e){if((n=n.match(o))[0].length>1){var i=n[0].charAt(0);n.splice(1,0,n[0].substr(1)),n[0]=i}(0,r.each)(n,(function(t,e){isNaN(t)||(n[e]=+t)})),t[e]=n})),t):void 0}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(4),i=e(3),o=e(54),a=e(14),u=e(5),c=e(8),s={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},f={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},l={left:"left",start:"left",center:"middle",right:"end",end:"end"},h=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="text",n.canFill=!0,n.canStroke=!0,n}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},n.prototype.createPath=function(t,n){var e=this,r=this.attr(),o=this.get("el");this._setFont(),(0,i.each)(n||r,(function(t,n){"text"===n?e._setText("".concat(t)):"matrix"===n&&t?(0,a.setTransform)(e):u.SVG_ATTR_MAP[n]&&o.setAttribute(u.SVG_ATTR_MAP[n],t)})),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},n.prototype._setFont=function(){var t=this.get("el"),n=this.attr(),e=n.textBaseline,r=n.textAlign,i=(0,o.detect)();i&&"firefox"===i.name?t.setAttribute("dominant-baseline",f[e]||"alphabetic"):t.setAttribute("alignment-baseline",s[e]||"baseline"),t.setAttribute("text-anchor",l[r]||"left")},n.prototype._setText=function(t){var n=this.get("el"),e=this.attr(),r=e.x,o=e.textBaseline,a=void 0===o?"bottom":o;if(t)if(~t.indexOf("\n")){var u=t.split("\n"),c=u.length-1,s="";(0,i.each)(u,(function(t,n){0===n?"alphabetic"===a?s+='').concat(t,""):"top"===a?s+='').concat(t,""):"middle"===a?s+='').concat(t,""):"bottom"===a?s+='').concat(t,""):"hanging"===a&&(s+='').concat(t,"")):s+='').concat(t,"")})),n.innerHTML=s}else n.innerHTML=t;else n.innerHTML=""},n}(c.default);n.default=h},function(t,n,e){"use strict";e.r(n),function(t){e.d(n,"BrowserInfo",(function(){return i})),e.d(n,"NodeInfo",(function(){return o})),e.d(n,"SearchBotDeviceInfo",(function(){return a})),e.d(n,"BotInfo",(function(){return u})),e.d(n,"ReactNativeInfo",(function(){return c})),e.d(n,"detect",(function(){return h})),e.d(n,"browserName",(function(){return d})),e.d(n,"parseUserAgent",(function(){return v})),e.d(n,"detectOS",(function(){return g})),e.d(n,"getNodeVersion",(function(){return y}));var r=function(t,n,e){if(e||2===arguments.length)for(var r,i=0,o=n.length;i')})),e}var s=function(){function t(t){this.cfg={};var n,e,u,s,f,l,h,p=null,d=(0,r.uniqueId)("gradient_");return"l"===t.toLowerCase()[0]?function(t,n){var e,i,a=o.exec(t),u=(0,r.mod)((0,r.toRadian)(parseFloat(a[1])),2*Math.PI),s=a[2];u>=0&&u<.5*Math.PI?(e={x:0,y:0},i={x:1,y:1}):.5*Math.PI<=u&&u');n.innerHTML=e},t}();n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(3),i=e(9),o=function(){function t(t,n){this.cfg={};var e=(0,i.createSVGElement)("marker"),o=(0,r.uniqueId)("marker_");e.setAttribute("id",o);var a=(0,i.createSVGElement)("path");a.setAttribute("stroke",t.stroke||"none"),a.setAttribute("fill",t.fill||"none"),e.appendChild(a),e.setAttribute("overflow","visible"),e.setAttribute("orient","auto-start-reverse"),this.el=e,this.child=a,this.id=o;var u=t["marker-start"===n?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===u?this._setDefaultPath(n,a):(this.cfg=u,this._setMarker(t.lineWidth,a)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,n){var e=this.el;n.setAttribute("d","M0,0 L".concat(10*Math.cos(Math.PI/6),",5 L0,10")),e.setAttribute("refX","".concat(10*Math.cos(Math.PI/6))),e.setAttribute("refY","".concat(5))},t.prototype._setMarker=function(t,n){var e=this.el,i=this.cfg.path,o=this.cfg.d;(0,r.isArray)(i)&&(i=i.map((function(t){return t.join(" ")})).join("")),n.setAttribute("d",i),e.appendChild(n),o&&e.setAttribute("refX","".concat(o/t))},t.prototype.update=function(t){var n=this.child;n.attr?n.attr("fill",t):n.setAttribute("fill",t)},t}();n.default=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(3),i=e(9),o=function(){function t(t){this.type="clip",this.cfg={};var n=(0,i.createSVGElement)("clipPath");this.el=n,this.id=(0,r.uniqueId)("clip_"),n.id=this.id;var e=t.cfg.el;return n.appendChild(e),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();n.default=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(3),i=e(9),o=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){this.cfg={};var n=(0,i.createSVGElement)("pattern");n.setAttribute("patternUnits","userSpaceOnUse");var e=(0,i.createSVGElement)("image");n.appendChild(e);var a=(0,r.uniqueId)("pattern_");n.id=a,this.el=n,this.id=a,this.cfg=t;var u=o.exec(t)[2];e.setAttribute("href",u);var c=new Image;function s(){n.setAttribute("width","".concat(c.width)),n.setAttribute("height","".concat(c.height))}return u.match(/^data:/i)||(c.crossOrigin="Anonymous"),c.src=u,c.complete?s():(c.onload=s,c.src=c.src),this}return t.prototype.match=function(t,n){return this.cfg===n},t}();n.default=a}])})); //# sourceMappingURL=g.min.js.map