@antv/f6-ui
Version:
UI system for @antv/f6
16 lines (14 loc) • 126 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6ui=e():t.f6ui=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";n.d(e,"g",(function(){return b})),n.d(e,"j",(function(){return p})),n.d(e,"k",(function(){return g})),n.d(e,"m",(function(){return w})),n.d(e,"o",(function(){return M})),n.d(e,"q",(function(){return k})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return m})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return v})),n.d(e,"a",(function(){return h})),n.d(e,"c",(function(){return C})),n.d(e,"l",(function(){return O})),n.d(e,"p",(function(){return _})),n.d(e,"n",(function(){return E}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i={}.toString,o=function(t,e){return i.call(t)==="[object "+e+"]"},a=function(t){return o(t,"Function")},u=function(t){return null==t},s=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")};function l(t){return(l="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)}var c=function(t){var e=l(t);return null!==t&&"object"===e||"function"===e};var h=function(t,e){if(t)if(s(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(c(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;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)}var d=function(t){return"object"===f(t)&&null!==t};var p=function(t){if(s(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},g=function(t){if(s(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},y=Array.prototype,v=(y.splice,y.indexOf,Array.prototype.splice,function(t){return o(t,"String")});Object.prototype.hasOwnProperty;var m=function(t){return o(t,"Number")};Number.isInteger&&Number.isInteger;function b(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}var w=function(t,e){return(t%e+e)%e},x=(Math.PI,parseInt,Math.PI/180),M=function(t){return x*t},N=(Object.values,function(t){return u(t)?"":t.toString()});var k=function(t){var e=N(t);return e.charAt(0).toUpperCase()+e.substring(1)};Object.prototype;function S(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function O(t,e,n,r){return e&&S(t,e),n&&S(t,n),r&&S(t,r),t}Object.prototype.hasOwnProperty;var C=function t(e,n){if(e===n)return!0;if(!e||!n)return!1;if(v(e)||v(n))return!1;if(r(e)||r(n)){if(e.length!==n.length)return!1;for(var i=!0,o=0;o<e.length&&(i=t(e[o],n[o]));o++);return i}if(d(e)||d(n)){var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(i=!0,o=0;o<a.length&&(i=t(e[a[o]],n[a[o]]));o++);return i}return!1},j=(Object.prototype.hasOwnProperty,{}),_=function(t){return j[t=t||"g"]?j[t]+=1:j[t]=1,t+j[t]},E=function(){};!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},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}}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.create;function a(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r}Object.create},function(t,e,n){"use strict";n.d(e,"j",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"b",(function(){return u}));var r=n(0);function i(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}n.d(e,"e",(function(){return r.e})),n.d(e,"d",(function(){return r.d})),n.d(e,"h",(function(){return r.i})),n.d(e,"f",(function(){return r.h})),n.d(e,"i",(function(){return r.l})),n.d(e,"a",(function(){return r.a})),n.d(e,"k",(function(){return r.q}));var o="undefined"!=typeof window&&void 0!==window.document;function a(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),r=!1;n;){if(n===t){r=!0;break}n=n.getParent()}return r}function u(t){return t.cfg.visible&&t.cfg.capture}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return o}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,n){"use strict";function r(t,e){var n=[],r=t[0],i=t[1],o=t[2],a=t[3],u=t[4],s=t[5],l=t[6],c=t[7],h=t[8],f=e[0],d=e[1],p=e[2],g=e[3],y=e[4],v=e[5],m=e[6],b=e[7],w=e[8];return n[0]=f*r+d*a+p*l,n[1]=f*i+d*u+p*c,n[2]=f*o+d*s+p*h,n[3]=g*r+y*a+v*l,n[4]=g*i+y*u+v*c,n[5]=g*o+y*s+v*h,n[6]=m*r+b*a+w*l,n[7]=m*i+b*u+w*c,n[8]=m*o+b*s+w*h,n}function i(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function o(t){var e=[],n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],l=t[7],c=t[8],h=c*a-u*l,f=-c*o+u*s,d=l*o-a*s,p=n*h+r*f+i*d;return p?(p=1/p,e[0]=h*p,e[1]=(-c*r+i*l)*p,e[2]=(u*r-i*a)*p,e[3]=f*p,e[4]=(c*n-i*s)*p,e[5]=(-u*n+i*o)*p,e[6]=d*p,e[7]=(-l*n+r*s)*p,e[8]=(a*n-r*o)*p,e):null}n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return u}));var r=n(0),i="\t\n\v\f\r \u2028\u2029",o=new RegExp("([a-z])["+i+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+i+"]*,?["+i+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+i+"]*,?["+i+"]*","ig"),u=function(t){if(!t)return null;if(Object(r.b)(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(o,(function(r,i,o){var u=[],s=i.toLowerCase();if(o.replace(a,(function(t,e){e&&u.push(+e)})),"m"===s&&u.length>2&&(n.push([i].concat(u.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===u.length&&n.push([i,u[0]]),"r"===s)n.push([i].concat(u));else for(;u.length>=e[s]&&(n.push([i].concat(u.splice(0,e[s]))),e[s]););return t})),n};var s=function(t,e){if(t.length!==e.length)return!1;var n=!0;return Object(r.a)(t,(function(t,r){if(t!==e[r])return n=!1,!1})),n};function l(t,e,n){var r=null,i=n;return e<i&&(i=e,r="add"),t<i&&(i=t,r="del"),{type:r,min:i}}var c=function(t,e){var n=function(t,e){var n,r,i=t.length,o=e.length,a=0;if(0===i||0===o)return null;for(var u=[],c=0;c<=i;c++)u[c]=[],u[c][0]={min:c};for(var h=0;h<=o;h++)u[0][h]={min:h};for(c=1;c<=i;c++){n=t[c-1];for(h=1;h<=o;h++){r=e[h-1],a=s(n,r)?0:1;var f=u[c-1][h].min+1,d=u[c][h-1].min+1,p=u[c-1][h-1].min+a;u[c][h]=l(f,d,p)}}return u}(t,e),r=t.length,i=e.length,o=[],a=1,u=1;if(n[r][i].min!==r){for(var c=1;c<=r;c++){var h=n[c][c].min;u=c;for(var f=a;f<=i;f++)n[c][f].min<h&&(h=n[c][f].min,u=f);a=u,n[c][a].type&&o.push({index:c-1,type:n[c][a].type})}for(c=o.length-1;c>=0;c--)a=o[c].index,"add"===o[c].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var d=i-(r=t.length);if(r<i)for(c=0;c<d;c++)"z"===t[r-1][0]||"Z"===t[r-1][0]?t.splice(r-2,0,t[r-2]):t.push(t[r-1]),r+=1;return t};function h(t,e,n){for(var r,i=[].concat(t),o=1/(n+1),a=f(e)[0],u=1;u<=n;u++)o*=u,0===(r=Math.floor(t.length*o))?i.unshift([a[0]*o+t[r][0]*(1-o),a[1]*o+t[r][1]*(1-o)]):i.splice(r,0,[a[0]*o+t[r][0]*(1-o),a[1]*o+t[r][1]*(1-o)]);return i}function f(t){var e=[];switch(t[0]){case"M":case"L":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"T":e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}var d=function(t,e){if(t.length<=1)return t;for(var n,r=0;r<e.length;r++)if(t[r][0]!==e[r][0])switch(n=f(t[r]),e[r][0]){case"M":t[r]=["M"].concat(n[0]);break;case"L":t[r]=["L"].concat(n[0]);break;case"A":t[r]=[].concat(e[r]),t[r][6]=n[0][0],t[r][7]=n[0][1];break;case"Q":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=h(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=h(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=h(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return u}));var r=n(2),i=n(9);function o(t,e,n){var i=1;return Object(r.h)(t)&&(i=t.split("\n").length),i>1?e*i+function(t,e){return e?e-t:.14*t}(e,n)*(i-1):e}function a(t,e){var n=Object(i.a)(),o=0;if(Object(r.e)(t)||""===t)return o;if(n.save(),n.font=e,Object(r.h)(t)&&t.includes("\n")){var a=t.split("\n");Object(r.a)(a,(function(t){var e=n.measureText(t).width;o<e&&(o=e)}))}else o=n.measureText(t).width;return n.restore(),o}function u(t){var e=t.fontSize,n=t.fontFamily,r=t.fontWeight;return[t.fontStyle,t.fontVariant,r,e+"px",n].join(" ").trim()}},function(t,e,n){"use strict";n.r(e),n.d(e,"create",(function(){return i})),n.d(e,"clone",(function(){return o})),n.d(e,"fromValues",(function(){return a})),n.d(e,"copy",(function(){return u})),n.d(e,"set",(function(){return s})),n.d(e,"add",(function(){return l})),n.d(e,"subtract",(function(){return c})),n.d(e,"multiply",(function(){return h})),n.d(e,"divide",(function(){return f})),n.d(e,"ceil",(function(){return d})),n.d(e,"floor",(function(){return p})),n.d(e,"min",(function(){return g})),n.d(e,"max",(function(){return y})),n.d(e,"round",(function(){return v})),n.d(e,"scale",(function(){return m})),n.d(e,"scaleAndAdd",(function(){return b})),n.d(e,"distance",(function(){return w})),n.d(e,"squaredDistance",(function(){return x})),n.d(e,"length",(function(){return M})),n.d(e,"squaredLength",(function(){return N})),n.d(e,"negate",(function(){return k})),n.d(e,"inverse",(function(){return S})),n.d(e,"normalize",(function(){return O})),n.d(e,"dot",(function(){return C})),n.d(e,"cross",(function(){return j})),n.d(e,"lerp",(function(){return _})),n.d(e,"random",(function(){return E})),n.d(e,"transformMat2",(function(){return A})),n.d(e,"transformMat2d",(function(){return T})),n.d(e,"transformMat3",(function(){return B})),n.d(e,"transformMat4",(function(){return P})),n.d(e,"rotate",(function(){return W})),n.d(e,"angle",(function(){return I})),n.d(e,"zero",(function(){return L})),n.d(e,"str",(function(){return R})),n.d(e,"exactEquals",(function(){return D})),n.d(e,"equals",(function(){return q})),n.d(e,"len",(function(){return Y})),n.d(e,"sub",(function(){return F})),n.d(e,"mul",(function(){return z})),n.d(e,"div",(function(){return H})),n.d(e,"dist",(function(){return G})),n.d(e,"sqrDist",(function(){return $})),n.d(e,"sqrLen",(function(){return Q})),n.d(e,"forEach",(function(){return U}));var r=n(3);function i(){var t=new r.a(2);return r.a!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t){var e=new r.a(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var n=new r.a(2);return n[0]=t,n[1]=e,n}function u(t,e){return t[0]=e[0],t[1]=e[1],t}function s(t,e,n){return t[0]=e,t[1]=n,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function d(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function p(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function g(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function y(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function v(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function m(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function b(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function w(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function x(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function M(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function N(t){var e=t[0],n=t[1];return e*e+n*n}function k(t,e){return t[0]=-e[0],t[1]=-e[1],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function O(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function C(t,e){return t[0]*e[0]+t[1]*e[1]}function j(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function _(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function E(t,e){e=e||1;var n=2*r.c()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function A(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function T(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function B(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function P(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function W(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),u=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function L(t){return t[0]=0,t[1]=0,t}function R(t){return"vec2("+t[0]+", "+t[1]+")"}function D(t,e){return t[0]===e[0]&&t[1]===e[1]}function q(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.b*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.b*Math.max(1,Math.abs(i),Math.abs(a))}var X,Y=M,F=c,z=h,H=f,G=w,$=x,Q=N,U=(X=i(),function(t,e,n,r,i,o){var a,u;for(e||(e=2),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)X[0]=t[a],X[1]=t[a+1],i(X,X,o),t[a]=X[0],t[a+1]=X[1];return t})},function(t,e,n){"use strict";var r=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.a=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=null;function i(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r}},function(t,e,n){"use strict";var r=n(1),i=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++)if(r[o]){var a=r[o],u=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),u.apply(e,n)}};a(i),a(o)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),o=n(2),a=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=Object(o.i)(r,e),n}return Object(r.b)(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(i);e.a=a},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(12),a=n(2),u={};var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.b)(e,t),e.prototype.isCanvas=function(){return!1},e.prototype.getBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,o=[],u=[],s=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return s.length>0?(Object(a.a)(s,(function(t){var e=t.getBBox();o.push(e.minX,e.maxX),u.push(e.minY,e.maxY)})),t=Object(i.k)(o),e=Object(i.j)(o),n=Object(i.k)(u),r=Object(i.j)(u)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,o=[],u=[],s=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return s.length>0?(Object(a.a)(s,(function(t){var e=t.getCanvasBBox();o.push(e.minX,e.maxX),u.push(e.minY,e.maxY)})),t=Object(i.k)(o),e=Object(i.j)(o),n=Object(i.k)(u),r=Object(i.j)(u)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();Object(a.a)(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1];Object(a.f)(n)?r=n:r.type=n;var i=u[r.type];i||(i=Object(a.k)(r.type),u[r.type]=i);var o=this.getShapeBase(),s=new o[i](r);return this.add(s),s},e.prototype.addGroup=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=t[0],i=t[1];if(Object(a.d)(r))n=new r(i||{parent:this});else{var o=r||{},u=this.getGroupBase();n=new u(o)}return this.add(n),n},e.prototype.getCanvas=function(){return this.isCanvas()?this:this.get("canvas")},e.prototype.getShape=function(t,e,n){if(!Object(a.b)(this))return null;var r,i=this.getChildren();if(this.isCanvas())r=this._findShape(i,t,e,n);else{var o=[t,e,1];o=this.invertFromMatrix(o),this.isClipped(o[0],o[1])||(r=this._findShape(i,o[0],o[1],n))}return r},e.prototype._findShape=function(t,e,n,r){for(var i=null,o=t.length-1;o>=0;o--){var u=t[o];if(Object(a.b)(u)&&(u.isGroup()?i=u.getShape(e,n,r):u.isHit(e,n)&&(i=u)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),Object(a.j)(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,e),r&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,r),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();Object(a.a)(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e._INDEX-n._INDEX:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return Object(a.a)(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return Object(a.a)(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(o.a);e.a=s},function(t,e,n){"use strict";var r={};n.r(r),n.d(r,"create",(function(){return s})),n.d(r,"fromMat4",(function(){return l})),n.d(r,"clone",(function(){return c})),n.d(r,"copy",(function(){return h})),n.d(r,"fromValues",(function(){return f})),n.d(r,"set",(function(){return d})),n.d(r,"identity",(function(){return p})),n.d(r,"transpose",(function(){return g})),n.d(r,"invert",(function(){return y})),n.d(r,"adjoint",(function(){return v})),n.d(r,"determinant",(function(){return m})),n.d(r,"multiply",(function(){return b})),n.d(r,"translate",(function(){return w})),n.d(r,"rotate",(function(){return x})),n.d(r,"scale",(function(){return M})),n.d(r,"fromTranslation",(function(){return N})),n.d(r,"fromRotation",(function(){return k})),n.d(r,"fromScaling",(function(){return S})),n.d(r,"fromMat2d",(function(){return O})),n.d(r,"fromQuat",(function(){return C})),n.d(r,"normalFromMat4",(function(){return j})),n.d(r,"projection",(function(){return _})),n.d(r,"str",(function(){return E})),n.d(r,"frob",(function(){return A})),n.d(r,"add",(function(){return T})),n.d(r,"subtract",(function(){return B})),n.d(r,"multiplyScalar",(function(){return P})),n.d(r,"multiplyScalarAndAdd",(function(){return W})),n.d(r,"exactEquals",(function(){return I})),n.d(r,"equals",(function(){return L})),n.d(r,"mul",(function(){return R})),n.d(r,"sub",(function(){return D}));var i={};n.r(i),n.d(i,"leftTranslate",(function(){return X})),n.d(i,"leftRotate",(function(){return Y})),n.d(i,"leftScale",(function(){return F})),n.d(i,"transform",(function(){return z})),n.d(i,"direction",(function(){return H})),n.d(i,"angleTo",(function(){return G})),n.d(i,"vertical",(function(){return $}));var o=n(1),a=n(0),u=n(3);function s(){var t=new u.a(9);return u.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function l(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function c(t){var e=new u.a(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function f(t,e,n,r,i,o,a,s,l){var c=new u.a(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c[8]=l,c}function d(t,e,n,r,i,o,a,u,s,l){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=s,t[8]=l,t}function p(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function g(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function y(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],l=e[7],c=e[8],h=c*a-u*l,f=-c*o+u*s,d=l*o-a*s,p=n*h+r*f+i*d;return p?(p=1/p,t[0]=h*p,t[1]=(-c*r+i*l)*p,t[2]=(u*r-i*a)*p,t[3]=f*p,t[4]=(c*n-i*s)*p,t[5]=(-u*n+i*o)*p,t[6]=d*p,t[7]=(-l*n+r*s)*p,t[8]=(a*n-r*o)*p,t):null}function v(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],l=e[7],c=e[8];return t[0]=a*c-u*l,t[1]=i*l-r*c,t[2]=r*u-i*a,t[3]=u*s-o*c,t[4]=n*c-i*s,t[5]=i*o-n*u,t[6]=o*l-a*s,t[7]=r*s-n*l,t[8]=n*a-r*o,t}function m(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],s=t[7],l=t[8];return e*(l*o-a*s)+n*(-l*i+a*u)+r*(s*i-o*u)}function b(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1],p=n[2],g=n[3],y=n[4],v=n[5],m=n[6],b=n[7],w=n[8];return t[0]=f*r+d*a+p*l,t[1]=f*i+d*u+p*c,t[2]=f*o+d*s+p*h,t[3]=g*r+y*a+v*l,t[4]=g*i+y*u+v*c,t[5]=g*o+y*s+v*h,t[6]=m*r+b*a+w*l,t[7]=m*i+b*u+w*c,t[8]=m*o+b*s+w*h,t}function w(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],l=e[6],c=e[7],h=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=s,t[6]=f*r+d*a+l,t[7]=f*i+d*u+c,t[8]=f*o+d*s+h,t}function x(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],u=e[4],s=e[5],l=e[6],c=e[7],h=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*u,t[2]=d*o+f*s,t[3]=d*a-f*r,t[4]=d*u-f*i,t[5]=d*s-f*o,t[6]=l,t[7]=c,t[8]=h,t}function M(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function N(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function k(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function S(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function O(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function C(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,u=r+r,s=i+i,l=n*a,c=r*a,h=r*u,f=i*a,d=i*u,p=i*s,g=o*a,y=o*u,v=o*s;return t[0]=1-h-p,t[3]=c-v,t[6]=f+y,t[1]=c+v,t[4]=1-l-p,t[7]=d-g,t[2]=f-y,t[5]=d+g,t[8]=1-l-h,t}function j(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=e[5],s=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],v=e[15],m=n*u-r*a,b=n*s-i*a,w=n*l-o*a,x=r*s-i*u,M=r*l-o*u,N=i*l-o*s,k=c*g-h*p,S=c*y-f*p,O=c*v-d*p,C=h*y-f*g,j=h*v-d*g,_=f*v-d*y,E=m*_-b*j+w*C+x*O-M*S+N*k;return E?(E=1/E,t[0]=(u*_-s*j+l*C)*E,t[1]=(s*O-a*_-l*S)*E,t[2]=(a*j-u*O+l*k)*E,t[3]=(i*j-r*_-o*C)*E,t[4]=(n*_-i*O+o*S)*E,t[5]=(r*O-n*j-o*k)*E,t[6]=(g*N-y*M+v*x)*E,t[7]=(y*w-p*N-v*b)*E,t[8]=(p*M-g*w+v*m)*E,t):null}function _(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function E(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function A(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function T(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function B(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function P(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function W(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function L(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],h=t[8],f=e[0],d=e[1],p=e[2],g=e[3],y=e[4],v=e[5],m=e[6],b=e[7],w=e[8];return Math.abs(n-f)<=u.b*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-d)<=u.b*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(i-p)<=u.b*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-g)<=u.b*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(a-y)<=u.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-v)<=u.b*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(l-m)<=u.b*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(c-b)<=u.b*Math.max(1,Math.abs(c),Math.abs(b))&&Math.abs(h-w)<=u.b*Math.max(1,Math.abs(h),Math.abs(w))}var R=b,D=B,q=n(7);function X(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromTranslation(i,n),r.multiply(t,i,e)}function Y(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromRotation(i,n),r.multiply(t,i,e)}function F(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromScaling(i,n),r.multiply(t,i,e)}function z(t,e){for(var n,i,o,a=t?[].concat(t):[1,0,0,0,1,0,0,0,1],u=0,s=e.length;u<s;u++){var l=e[u];switch(l[0]){case"t":X(a,a,[l[1],l[2]]);break;case"s":F(a,a,[l[1],l[2]]);break;case"r":Y(a,a,l[1]);break;case"m":n=a,i=a,o=l[1],r.multiply(n,o,i)}}return a}function H(t,e){return t[0]*e[1]-e[0]*t[1]}function G(t,e,n){var r=q.angle(t,e),i=H(t,e)>=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r}function $(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}var Q=n(2),U=n(4),V=n(10),Z=i.transform,K=["zIndex","capture","visible","type"],J=["repeat"];function tt(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function et(t,e){var n={},r=e.attr();return Object(a.a)(t,(function(t,e){-1!==J.indexOf(e)||Object(a.c)(r[e],t)||(n[e]=t)})),n}function nt(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,o=Object.prototype.hasOwnProperty;return Object(a.a)(t,(function(t){n+r<t.startTime+t.delay+t.duration&&i>t.delay&&Object(a.a)(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var rt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return Object(a.l)(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return Object(o.b)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0],i=e[1];if(!r)return this.attrs;if(Object(a.h)(r)){for(var o in r)this.setAttr(o,r[o]);return this.afterAttrsChange(r),this}return 2===e.length?(this.setAttr(r,i),this.afterAttrsChange(((t={})[r]=i,t)),this):this.attrs[r]},e.prototype.isClipped=function(t,e){var n=this.getClip();return n&&!n.isHit(t,e)},e.prototype.setAttr=function(t,e){var n=this.attrs[t];n!==e&&(this.attrs[t]=e,this.onAttrChange(t,e,n))},e.prototype.onAttrChange=function(t,e,n){"matrix"===t&&this.set("totalMatrix",null)},e.prototype.afterAttrsChange=function(t){if(this.cfg.isClipShape){var e=this.cfg.applyTo;e&&e.onCanvasChange("clip")}else this.onCanvasChange("attr")},e.prototype.show=function(){return this.set("visible",!0),this.onCanvasChange("show"),this},e.prototype.hide=function(){return this.set("visible",!1),this.onCanvasChange("hide"),this},e.prototype.setZIndex=function(t){this.set("zIndex",t);var e=this.getParent();return e&&e.sort(),this},e.prototype.toFront=function(){var t=this.getParent();if(t){var e=t.getChildren(),n=(this.get("el"),e.indexOf(this));e.splice(n,1),e.push(this),this.onCanvasChange("zIndex")}},e.prototype.toBack=function(){var t=this.getParent();if(t){var e=t.getChildren(),n=(this.get("el"),e.indexOf(this));e.splice(n,1),e.unshift(this),this.onCanvasChange("zIndex")}},e.prototype.remove=function(t){void 0===t&&(t=!0);var e=this.getParent();e?(Object(Q.j)(e.getChildren(),this),e.get("clearing")||this.onCanvasChange("remove")):this.onCanvasChange("remove"),t&&this.destroy()},e.prototype.resetMatrix=function(){this.attr("matrix",this.getDefaultMatrix()),this.onCanvasChange("matrix")},e.prototype.getMatrix=function(){return this.attr("matrix")},e.prototype.setMatrix=function(t){this.attr("matrix",t),this.onCanvasChange("matrix")},e.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){var e=this.attr("matrix"),n=this.cfg.parentMatrix;t=n&&e?Object(U.b)(n,e):e||n,this.set("totalMatrix",t)}return t},e.prototype.applyMatrix=function(t){var e=this.attr("matrix"),n=null;n=t&&e?Object(U.b)(t,e):e||t,this.set("totalMatrix",n),this.set("parentMatrix",t)},e.prototype.getDefaultMatrix=function(){return null},e.prototype.applyToMatrix=function(t){var e=this.attr("matrix");return e?Object(U.c)(e,t):t},e.prototype.invertFromMatrix=function(t){var e=this.attr("matrix");if(e){var n=Object(U.a)(e);if(n)return Object(U.c)(n,t)}return t},e.prototype.setClip=function(t){var e=this.getCanvas(),n=null;if(t){var r=this.getShapeBase()[Object(a.q)(t.type)];r&&(n=new r({type:t.type,isClipShape:!0,applyTo:this,attrs:t.attrs,canvas:e}))}return this.set("clipShape",n),this.onCanvasChange("clip"),n},e.prototype.getClip=function(){var t=this.cfg.clipShape;return t||null},e.prototype.clone=function(){var t=this,e=this.attrs,n={};Object(a.a)(e,(function(t,r){Object(a.b)(e[r])?n[r]=function(t){for(var e=[],n=0;n<t.length;n++)Object(a.b)(t[n])?e.push([].concat(t[n])):e.push(t[n]);return e}(e[r]):n[r]=e[r]}));var r=new(0,this.constructor)({attrs:n});return Object(a.a)(K,(function(e){r.set(e,t.get(e))})),r},e.prototype.destroy=function(){this.destroyed||(this.attrs={},t.prototype.destroy.call(this))},e.prototype.isAnimatePaused=function(){return this.get("_pause").isPaused},e.prototype.animate=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.get("timeline")||this.get("canvas")){this.set("animating",!0);var n=this.get("timeline");n||(n=this.get("canvas").get("timeline"),this.set("timeline",n));var r=this.get("animations")||[];n.timer||n.initTimer();var i,o,u,s,l,c=t[0],h=t[1],f=t[2],d=void 0===f?"easeLinear":f,p=t[3],g=void 0===p?a.n:p,y=t[4],v=void 0===y?0:y;Object(a.d)(c)?(i=c,c={}):Object(a.h)(c)&&c.onFrame&&(i=c.onFrame,o=c.repeat),Object(a.h)(h)?(h=(l=h).duration,d=l.easing||"easeLinear",v=l.delay||0,o=l.repeat||o||!1,g=l.callback||a.n,u=l.pauseCallback||a.n,s=l.resumeCallback||a.n):(Object(a.f)(g)&&(v=g,g=null),Object(a.d)(d)?(g=d,d="easeLinear"):d=d||"easeLinear");var m=et(c,this),b={fromAttrs:tt(m,this),toAttrs:m,duration:h,easing:d,repeat:o,callback:g,pauseCallback:u,resumeCallback:s,delay:v,startTime:n.getTime(),id:Object(a.p)(),onFrame:i,pathFormatted:!1};r.length>0?r=nt(r,b):n.addAnimator(this),r.push(b),this.set("animations",r),this.set("_pause",{isPaused:!1})}},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(a.a)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return Object(a.a)(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Object(a.a)(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){var n,r=this,i=e.propagationPath;this.getEvents();"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var o=function(t){var o=i[t],s=o.get("name");if(s){if((o.isGroup()||o.isCanvas&&o.isCanvas())&&n&&Object(Q.g)(o,n))return"break";Object(a.b)(s)?Object(a.a)(s,(function(t){r.emitDelegateEvent(o,t,e)})):u.emitDelegateEvent(o,s,e)}},u=this,s=0;s<i.length;s++){if("break"===o(s))break}},e.prototype.emitDelegateEvent=function(t,e,n){var r=this.getEvents(),i=e+":"+n.type;(r[i]||r["*"])&&(n.name=i,n.currentTarget=t,n.delegateTarget=this,n.delegateObject=t.get("delegateObject"),this.emit(i,n))},e.prototype.translate=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var n=this.getMatrix(),r=Z(n,[["t",t,e]]);return this.setMatrix(r),this},e.prototype.move=function(t,e){var n=this.attr("x")||0,r=this.attr("y")||0;return this.translate(t-n,e-r),this},e.prototype.moveTo=function(t,e){return this.move(t,e)},e.prototype.scale=function(t,e){var n=this.getMatrix(),r=Z(n,[["s",t,e||t]]);return this.setMatrix(r),this},e.prototype.rotate=function(t){var e=this.getMatrix(),n=Z(e,[["r",t]]);return this.setMatrix(n),this},e.prototype.rotateAtStart=function(t){var e=this.attr(),n=e.x,r=e.y,i=this.getMatrix(),o=Z(i,[["t",-n,-r],["r",t],["t",n,r]]);return this.setMatrix(o),this},e.prototype.rotateAtPoint=function(t,e,n){var r=this.getMatrix(),i=Z(r,[["t",-t,-e],["r",n],["t",t,e]]);return this.setMatrix(i),this},e}(V.a);e.a=rt},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(1);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(r.b)(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r<n.length;r++){var i=n[r];e.add(i.clone())}return e}}(n(11).a)},function(t,e,n){"use strict";var r=n(1),i=n(12),o=n(4);!function(t){function e(e){return t.call(this,e)||this}Object(r.b)(e,t),e.prototype._isInBBox=function(t,e){var n=this.getBBox();return n.minX<=t&&n.maxX>=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(e){var u=Object(o.c)(e,[t.minX,t.minY]),s=Object(o.c)(e,[t.maxX,t.minY]),l=Object(o.c)(e,[t.minX,t.maxY]),c=Object(o.c)(e,[t.maxX,t.maxY]);n=Math.min(u[0],s[0],l[0],c[0]),i=Math.max(u[0],s[0],l[0],c[0]),r=Math.min(u[1],s[1],l[1],c[1]),a=Math.max(u[1],s[1],l[1],c[1])}var h=this.attrs;if(h.shadowColor){var f=h.shadowBlur,d=void 0===f?0:f,p=h.shadowOffsetX,g=void 0===p?0:p,y=h.shadowOffsetY,v=void 0===y?0:y,m=n-d+g,b=i+d+g,w=r-d+v,x=a+d+v;n=Math.min(n,m),i=Math.max(i,b),r=Math.min(r,w),a=Math.max(a,x)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:a,width:i-n,height:a-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,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(n&&n.isHit(o,a))return!0;if(r&&r.isHit(o,a))return!0}return!1}}(i.a)},function(t,e,n){"use strict";var r={};n.r(r),n.d(r,"distance",(function(){return c})),n.d(r,"isNumberEqual",(function(){return h})),n.d(r,"getBBoxByArray",(function(){return f})),n.d(r,"getBBoxRange",(function(){return d})),n.d(r,"piMod",(function(){return p}));var i=new Map;function o(t,e){i.set(t,e)}var a=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}},u=function(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}};function s(t){return Math.min.apply(null,t)}function l(t){return Math.max.apply(null,t)}function c(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function h(t,e){return Math.abs(t-e)<.001}function f(t,e){var n=s(t),r=s(e);return{x:n,y:r,width:l(t)-n,height:l(e)-r}}function d(t,e,n,r){return{minX:s([t,n]),maxX:l([t,n]),minY:s([e,r]),maxY:l([e,r])}}function p(t){return(t+2*Math.PI)%(2*Math.PI)}n(7);function g(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function y(t,e,n){var r=t+n-2*e;if(h(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var v=function(t,e,n,r,i,o){var a=y(t,n,i)[0],u=y(e,r,o)[0],s=[t,i],l=[e,o];return void 0!==a&&s.push(g(t,n,i,a)),void 0!==u&&l.push(g(e,r,o,u)),f(s,l)};function m(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function b(t,e,n,r){var i,o,a,u=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,l=3*e-3*t,c=[];if(h(u,0))h(s,0)||(i=-l/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*u*l;h(f,0)?c.push(-s/(2*u)):f>0&&(o=(-s-(a=Math.sqrt(f)))/(2*u),(i=(-s+a)/(2*u))>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}var w=function(t,e,n,r,i,o,a,u){for(var s=[t,a],l=[e,u],c=b(t,n,i,a),h=b(e,r,o,u),d=0;d<c.length;d++)s.push(m(t,n,i,a,c[d]));for(d=0;d<h.length;d++)l.push(m(e,r,o,u,h[d]));return f(s,l)};function x(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function M(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}var N=function(t,e,n,r,i,o,a){for(var u=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),s=1/0,l=-1/0,c=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=u+h;o<a?o<f&&f<a&&c.push(f):a<f&&f<o&&c.push(f)}for(h=0;h<c.length;h++){var d=x(t,0,n,r,i,c[h]);d<s&&(s=d),d>l&&(l=d)}var p=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),g=1/0,y=-1/0,v=[o,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=p+h;o<a?o<m&&m<a&&v.push(m):a<m&&m<o&&v.push(m)}for(h=0;h<v.length;h++){var b=M(0,e,n,r,i,v[h]);b<g&&(g=b),b>y&&(y=b)}return{x:s,y:g,width:l-s,height:y-g}};function k(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}function S(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=k(e,n.getCanvasBBox())),r&&(e=k(e,r.getCanvasBBox())),e}var O=n(6),C=n(0),j=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,_=/[^\s\,]+/gi;var E=function(t){var e=t||[];return Object(C.b)(e)?e:Object(C.i)(e)?(e=e.match(j),Object(C.a)(e,(function(t,n){if((t=t.match(_))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}Object(C.a)(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};var A="\t\n\v\f\r \u2028\u2029";new RegExp("([a-z])["+A+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+A+"]*,?["+A+"]*)+)","ig"),new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+A+"]*,?["+A+"]*","ig");function T(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function B(t,e){return T(t)*T(e)?(t[0]*e[0]+t[1]*e[1])/(T(t)*T(e)):1}function P(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(B(t,e))}function W(t,e){return t[0]===e[0]&&t[1]===e[1]}function I(t,e){var n=e[1],r=e[2],i=Object(C.m)(Object(C.o)(e[3]),2*Math.PI),o=e[4],a=e[5],u=t[0],s=t[1],l=e[6],c=e[7],h=Math.cos(i)*(u-l)/2+Math.sin(i)*(s-c)/2,f=-1*Math.sin(i)*(u-l)/2+Math.cos(i)*(s-c)/2,d=h*h/(n*n)+f*f/(r*r);d>1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var p=n*n*(f*f)+r*r*(h*h),g=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var y=r?g*n*f/r:0,v=n?g*-r*h/n:0,m=(u+l)/2+Math.cos(i)*y-Math.sin(i)*v,b=(s+c)/2+Math.sin(i)*y+Math.cos(i)*v,w=[(h-y)/n,(f-v)/r],x=[(-1*h-y)/n,(-1*f-v)/r],M=P([1,0],w),N=P(w,x);return B(w,x)<=-1&&(N=Math.PI),B(w,x)>=1&&(N=0),0===a&&N>0&&(N-=2*Math.PI),1===a&&N<0&&(N+=2*Math.PI),{cx:m,cy:b,rx:W(t,[l,c])?0:n,ry:W(t,[l,c])?0:r,startAngle:M,endAngle:M+N,xRotation:i,arcFlag:o,sweepFlag:a}}function L(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function R(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,o=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),u=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),s=Math.acos((o+a-u)/(2*Math.sqrt(o)*Math.sqrt(a)));if(!s||0===Math.sin(s)||Object(C.g)(s,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),c=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));return l=l>Math.PI/2?Math.PI-l:l,c=c>Math.PI/2?Math.PI-c:c,{xExtra:Math.cos(s/2-l)*(e/2*(1/Math.sin(s/2)))-e/2||0,yExtra:Math.cos(c-s/2)*(e/2*(1/Math.sin(s/2)))-e/2||0}}o("rect",a),o("image",a),o("circle",u),o("marker",u),o("polyline",(function(t){for(var e=t.attr().points,n=[],i=[],o=0;o<e.length;o++){var a=e[o];n.push(a[0]),i.push(a[1])}var u=r.getBBoxByArray(n,i),s=u.x,l=u.y,c={minX:s,minY:l,maxX:s+u.width,maxY:l+u.height};return{x:(c=S(t,c)).minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}})),o("polygon",(function(t){for(var e=t.attr().points,n=[],i=[],o=0;o<e.length;o++){var a=e[o];n.push(a[0]),i.push(a[1])}return r.getBBoxByArray(n,i)})),o("text",(function(t){var e=t.attr(),n=e.x,r=e.y,i=e.text,o=e.fontSize,a=e.lineHeight,u=e.font;u||(u=Object(O.a)(e));var s,l=Object(O.c)(i,u);if(l){var c=e.textAlign,h=e.textBaseline,f=Object(O.b)(i,o,a),d={x:n,y:r-f};c&&("end"===c||"right"===c?d.x-=l:"center"===c&&(d.x-=l/2)),h&&("top"===h?d.y+=f:"middle"===h&&(d.y+=f/2)),s={x:d.x,y:d.y,width:l,height:f}}else s={x:n,y:r,width:0,height:0};return s})),o("path",(function(t){var e=t.attr(),n=e.path,r=e.stroke?e.lineWidth:0,i=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=(g=t[o]).currentPoint,u=g.params,s=g.prePoint,l=void 0;switch(g.command){case"Q":l=v(s[0],s[1],u[1],u[2],u[3],u[4]);break;case"C":l=w(s[0],s[1],u[1],u[2],u[3],u[4],u[5],u[6]);break;case"A":var c=g.arcParams;l=N(c.cx,c.cy,c.rx,c.ry,c.xRotation,c.startAngle,c.endAngle);break;default:n.push(a[0]),r.push(a[1])}l&&(g.box=l,n.push(l.x,l.x+l.width),r.push(l.y,l.y+l.height)),e&&("L"===g.command||"M"===g.command)&&g.prePoint&&g.nextPoint&&i.push(g)}n=n.filter((function(t){return!Number.isNaN(t)})),r=r.filter((function(t){return!Number.isNaN(t)}));var h=Object(C.k)(n),f=Object(C.k)(r),d=Object(C.j)(n),p=Object(C.j)(r);if(0===i.length)return{x:h,y:f,width:d-h,height:p-f};for(o=0;o<i.length;o++){var g;(a=(g=i[o]).currentPoint)[0]===h?h-=R(g,e).xExtra:a[0]===d&&(d+=R(g,e).xExtra),a[1]===f?f-=R(g,e).yExtra:a[1]===p&&(p+=R(g,e).yExtra)}return{x:h,y:f,width:d-h,height:p-f}}(t.get("segments")||function(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=E(t)).length,u=0;u<a;u++){var s=t[u];r=t[u+1];var l=s[0],c={command:l,prePoint:n,params:s,startTangent:null,endTangent:null};switch(l){case"M":i=[s[1],s[2]],o=u;break;case"A":var h=I(n,s);c.arcParams=h}if("Z"===l)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&W(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint);var d=r?[r[r.length-2],r[r.length-1]]:null;c.nextPoint=d;var p=c.prePoint;if(["L","H","V"].includes(l))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===l){var g=[s[1],s[2]];c.startTangent=[p[0]-g[0],p[1]-g[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("T"===l){g=L((m=e[u-1]).currentPoint,p);"Q"===m.command?(c.command="Q",c.startTangent=[p[0]-g[0],p[1]-g[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===l){var y=[s[1],s[2]],v=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangen