]> source.dussan.org Git - svg.js.git/commitdiff
forgot about memory tests
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Sun, 4 Nov 2018 21:04:54 +0000 (22:04 +0100)
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Sun, 4 Nov 2018 21:04:54 +0000 (22:04 +0100)
dist/svg.js
dist/svg.min.js
spec/SpecRunner.html
src/PathArray.js
src/PointArray.js
src/SVGArray.js
src/memory.js
src/svg.js
src/tools.js

index fe8c3299aa9f4f5469c0ba9cae8e7a1be0d7f806..ba5a1d84306c138107e8e973b0457410670c8635 100644 (file)
@@ -484,16 +484,6 @@ var SVG = (function () {
     var key, i;
     modules = Array.isArray(modules) ? modules : [modules];
 
-    for (i = modules.length - 1; i >= 0; i--) {
-      for (key in methods) {
-        modules[i].prototype[key] = methods[key];
-      }
-    }
-  }
-  function extend2(modules, methods) {
-    var key, i;
-    modules = Array.isArray(modules) ? modules : [modules];
-
     for (i = modules.length - 1; i >= 0; i--) {
       for (key in methods) {
         modules[i].prototype[key] = methods[key];
@@ -533,7 +523,6 @@ var SVG = (function () {
     nodeOrNew: nodeOrNew,
     makeNode: makeNode,
     extend: extend,
-    extend2: extend2,
     addFactory: addFactory,
     invent: invent
   });
@@ -629,7 +618,6 @@ var SVG = (function () {
   });
 
   var methods = {};
-  var constructors = {};
   function registerMethods(name, m) {
     if (Array.isArray(name)) {
       var _iteratorNormalCompletion = true;
@@ -678,15 +666,6 @@ var SVG = (function () {
   function getMethodsFor(name) {
     return methods[name] || {};
   } // FIXME: save memory?
-  function registerConstructor(name, setup) {
-    constructors[name] = setup;
-  }
-  function getConstructor(name) {
-    return constructors[name] ? {
-      setup: constructors[name],
-      name: name
-    } : {};
-  }
 
   var listenerId = 0;
 
@@ -2695,7 +2674,7 @@ var SVG = (function () {
   var SVGArray = subClassArray('SVGArray', Array, function () {
     this.init.apply(this, arguments);
   });
-  extend2(SVGArray, {
+  extend(SVGArray, {
     init: function init() {
       //this.splice(0, this.length)
       this.length = 0;
@@ -2774,7 +2753,7 @@ var SVG = (function () {
   // }
 
   var PointArray = subClassArray('PointArray', SVGArray);
-  extend2(PointArray, {
+  extend(PointArray, {
     // Convert array to string
     toString: function toString() {
       // convert to a poly point string
@@ -3307,7 +3286,7 @@ var SVG = (function () {
     }(mlhvqtcsaz[i].toUpperCase());
   }
 
-  extend2(PathArray, {
+  extend(PathArray, {
     // Convert array to string
     toString: function toString() {
       return arrayToString(this);
@@ -7130,9 +7109,11 @@ var SVG = (function () {
     transform: transform
   });
 
-  function setup(node) {
-    this._memory = {};
-  } // Remember arbitrary data
+  //
+  // export function setup (node) {
+  //   this._memory = {}
+  // }
+  // Remember arbitrary data
 
   function remember(k, v) {
     // remember every item in an object individually
@@ -7164,14 +7145,13 @@ var SVG = (function () {
   } // return local memory object
 
   function memory() {
-    return this._memory;
+    return this._memory = this._memory || {};
   }
   registerMethods('Element', {
     remember: remember,
     forget: forget,
     memory: memory
-  });
-  registerConstructor('Memory', setup);
+  }); //registerConstructor('Memory', setup)
 
   var sugar = {
     stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],
@@ -7335,8 +7315,8 @@ var SVG = (function () {
   extend$1([Rect, Ellipse, Circle, Gradient], getMethodsFor('radius'));
   extend$1(EventTarget, getMethodsFor('EventTarget'));
   extend$1(Element, getMethodsFor('Element'));
-  extend$1(Element, getMethodsFor('Parent'));
-  extend$1(Element, getConstructor('Memory'));
+  extend$1(Element, getMethodsFor('Parent')); //extend(Classes.Element, getConstructor('Memory'))
+
   extend$1(Container$1, getMethodsFor('Container'));
   registerMorphableType([SVGNumber, Color, Box$1, Matrix, SVGArray, PointArray, PathArray]);
   makeMorphable(); // The main wrapping element
index 386a99aaf4684be63d2960ac287640831223a366..27a2e20329a1368217414a84097fcc633c504f4f 100644 (file)
@@ -1 +1 @@
-var SVG=function(){"use strict";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)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function _(r){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=s[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?s(t):e}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,s=void 0;try{for(var u,o=t[Symbol.iterator]();!(i=(u=o.next()).done)&&(n.push(u.value),!e||n.length!==e);i=!0);}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var d=function(){function e(t){o(this,e)}return a(e,[{key:"is",value:function(t){return this.tags.includes(t)}}]),e}(),y=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,v=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,p=/rgb\((\d+),(\d+),(\d+)\)/,m=/(#[a-z0-9\-_]+)/i,t=/\)\s*,?\s*/,g=/\s/g,w=/^#[a-f0-9]{3,6}$/i,k=/^rgb\(/,b=/^(\s+)?$/,x=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,A=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,j=/[\s,]+/,C=/([^e])-/gi,M=/[MLHVCSQTAZ]/gi,S=/[MLHVCSQTAZ]/i,T=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,E=/\./g,e=Object.freeze({numberAndUnit:y,hex:v,rgb:p,reference:m,transforms:t,whitespace:g,isHex:w,isRgb:k,isCss:/[^:]+:[^;]+;?/,isBlank:b,isNumber:x,isPercent:/^-?[\d.]+%$/,isImage:A,delimiter:j,hyphen:C,pathLetters:M,isPathLetter:S,numbersWithDots:T,dots:E});function N(t,e,n,i){return n+i.replace(E," .")}function P(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function D(t){return t.charAt(0).toUpperCase()+t.slice(1)}function z(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function R(t,e,n){if(null==e||null==n){var i=t.bbox();null==e?e=i.width/i.height*n:null==n&&(n=i.height/i.width*e)}return{width:e,height:n}}function q(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}var L="abcdef".split("");function F(t,e,n){return Math.abs(e-t)<(n||1e-6)}function I(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}function X(t,e){var n,i,r=t.origin;if("string"==typeof r||null==r){var s=(r||"center").toLowerCase().trim(),u=e.bbox(),o=u.height,a=u.width,h=u.x,l=u.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+o:l+o/2;n=null!=t.ox?t.ox:c,i=null!=t.oy?t.oy:f}else n=r[0],i=r[1];return[n,i]}var Y="http://www.w3.org/2000/svg",H="http://www.w3.org/2000/xmlns/",B="http://www.w3.org/1999/xlink",G="http://svgjs.com/svgjs",V=Object.freeze({ns:Y,xmlns:H,xlink:B,svgjs:G});function Q(t,e){return e||U(t)}function U(t){return document.createElementNS(Y,t)}function $(t,e){var n,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(n in e)t[i].prototype[n]=e[n]}function J(t,e){var n,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(n in e)t[i].prototype[n]=e[n]}var W=Object.freeze({nodeOrNew:Q,makeNode:U,extend:$,extend2:J,addFactory:function(t,e){$(t,e)},invent:function(e){var t="function"==typeof e.create?e.create:function(t){e.inherit.call(this,t||U(e.create))};return e.inherit&&(t.prototype=new e.inherit,t.prototype.constructor=t),e.extend&&$(t,e.extend),e.construct&&$(e.parent||Container,e.construct),t}}),Z={},K=Symbol("root");function tt(t){if(t instanceof d)return t;if("object"===l(t))return et(t);if(null==t)return new Z[K];if("string"==typeof t&&"<"!==t.charAt(0))return et(document.querySelector(t));var e=U("svg");return e.innerHTML=t,t=et(e.firstChild)}function et(t){return t?t.instance instanceof d?t.instance:t instanceof window.SVGElement?"svg"===t.nodeName?new Z[K](t):"linearGradient"===t.nodeName||"radialGradient"===t.nodeName?new Z.Gradient(t):Z[D(t.nodeName)]?new(Z[D(t.nodeName)])(t):new Z.Bare(t):new Z.HtmlNode(t):null}function nt(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Z[e]=t,n&&(Z[K]=t),t}function it(t){return Z[t]}var rt=1e3;function st(t){return"Svgjs"+D(t)+rt++}function ut(t){for(var e=t.children.length-1;0<=e;e--)ut(t.children[e]);return t.id?et(t).id(st(t.nodeName)):et(t)}var ot=Object.freeze({root:K,makeInstance:tt,adopt:et,register:nt,getClass:it,eid:st,assignNewId:ut}),at={},ht={};function lt(t,e){if(Array.isArray(t)){var n=!0,i=!1,r=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){lt(s.value,e)}}catch(t){i=!0,r=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw r}}}else if("object"!=l(t))at[t]=Object.assign(at[t]||{},e);else for(var o=Object.entries(t),a=0;a<o.length;a++){var h=f(o[a],2);lt(h[0],h[1])}}function ct(t){return at[t]||{}}var ft=0;function dt(t){return"function"==typeof t.getEventTarget?t.getEventTarget():t}function yt(t,e,i,n,r){var s=i.bind(n||t),u=dt(t);e=Array.isArray(e)?e:e.split(j),u.instance=u.instance||{events:{}};var o=u.instance.events;i._svgjsListenerId||(i._svgjsListenerId=++ft),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][i._svgjsListenerId]=s,u.addEventListener(e,s,r||!1)})}function vt(t,e,s,u){var o=dt(t);if(o.instance&&("function"!=typeof s||(s=s._svgjsListenerId))){var a=o.instance.events;(e=Array.isArray(e)?e:(e||"").split(j)).forEach(function(t){var e,n,i=t&&t.split(".")[0],r=t&&t.split(".")[1];if(s)a[i]&&a[i][r||"*"]&&(o.removeEventListener(i,a[i][r||"*"][s],u||!1),delete a[i][r||"*"][s]);else if(i&&r){if(a[i]&&a[i][r]){for(n in a[i][r])vt(o,[i,r].join("."),n);delete a[i][r]}}else if(r)for(t in a)for(e in a[t])r===e&&vt(o,[t,r].join("."));else if(i){if(a[i]){for(e in a[i])vt(o,[i,e].join("."));delete a[i]}}else{for(t in a)vt(o,t);o.instance.events={}}})}}function pt(t,e,n){var i=dt(t);return e instanceof window.Event||(e=new window.CustomEvent(e,{detail:n,cancelable:!0})),i.dispatchEvent(e),e}var mt=Object.freeze({on:yt,off:vt,dispatch:pt}),gt=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=h(this,u(n).call(this))).events=e.events||{},t}return r(n,d),a(n,[{key:"on",value:function(t,e,n,i){return yt(this,t,e,n,i),this}},{key:"off",value:function(t,e){return vt(this,t,e),this}},{key:"dispatch",value:function(t,e){return pt(this,t,e)}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}}]),n}();$(gt,["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?vt(this,e):yt(this,e,t),this},t},{}));var wt=function(){function n(){o(this,n),this.init.apply(this,arguments)}return a(n,[{key:"init",value:function(t,e){e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(y))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit)}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}}]),n}(),kt=it(K),bt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).dom={},e.node=t,e.type=t.nodeName,e.node.instance=s(s(e)),t.hasAttribute("svgjs:data")&&e.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),e}return r(n,gt),a(n,[{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.width(new wt(n.width)).height(new wt(n.height))}},{key:"clone",value:function(t){this.writeDataToDom();var e=ut(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"replace",value:function(t){return this.after(t).remove(),t}},{key:"addTo",value:function(t){return tt(t).put(this)}},{key:"putIn",value:function(t){return tt(t).add(this)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=st(this.type)),this.attr("id",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"toString",value:function(){return this.id()}},{key:"classes",value:function(){var t=this.attr("class");return null==t?[]:t.trim().split(j)}},{key:"hasClass",value:function(t){return-1!==this.classes().indexOf(t)}},{key:"addClass",value:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this}},{key:"removeClass",value:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this}},{key:"toggleClass",value:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}},{key:"reference",value:function(t){var e=function(t){var e=(t||"").toString().match(m);if(e)return e[1]}(this.attr(t));return e?tt(e):null}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=et(e.node.parentNode),!t)return e;for(;e&&e.node instanceof window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=et(e.node.parentNode)}}},{key:"doc",value:function(){var t=this.parent(kt);return t&&t.doc()}},{key:"defs",value:function(){return this.doc().defs()}},{key:"parents",value:function(t){var e=[],n=this;do{if(!(n=n.parent(t))||n instanceof it("HtmlNode"))break;e.push(n)}while(n.parent);return e}},{key:"matches",value:function(t){return e=this.node,n=t,(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,n);var e,n}},{key:"native",value:function(){return this.node}},{key:"svg",value:function(){return this.writeDataToDom(),this.node.outerHTML}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"getEventTarget",value:function(){return this.node}}]),n}();function xt(t,e){var n,i=t.length,r=[];for(n=0;n<i;n++)r.push(e(t[n]));return r}function _t(t){return t%360*Math.PI/180}var Ot=Object.freeze({map:xt,filter:function(t,e){var n,i=t.length,r=[];for(n=0;n<i;n++)e(t[n])&&r.push(t[n]);return r},radians:_t,degrees:function(t){return 180*t/Math.PI%360},filterSVGElements:function(t){return this.filter(t,function(t){return t instanceof window.SVGElement})}}),At=function(t){function s(){return o(this,s),h(this,u(s).apply(this,arguments))}return r(s,bt),a(s,[{key:"children",value:function(){return xt(this.node.children,function(t){return et(t)})}},{key:"add",value:function(t,e){return t=tt(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"put",value:function(t,e){return this.add(t,e),t.instance||t}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"get",value:function(t){return et(this.node.childNodes[t])}},{key:"first",value:function(){return et(this.node.firstChild)}},{key:"last",value:function(){return et(this.node.lastChild)}},{key:"each",value:function(t,e){var n,i,r=this.children();for(n=0,i=r.length;n<i;n++)r[n]instanceof bt&&t.apply(r[n],[n,r]),e&&r[n]instanceof s&&r[n].each(t,e);return this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}},{key:"svg",value:function(t){var e,n;if(!t)return this.writeDataToDom(),this.node.outerHTML;for((e=document.createElementNS(Y,"svg")).innerHTML=t,n=e.children.length;n--;)this.node.appendChild(e.firstElementChild);return this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this}},{key:"flatten",value:function(t){return this.each(function(){return this instanceof s?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),s}(),jt=function(t){function e(){return o(this,e),h(this,u(e).apply(this,arguments))}return r(e,At),e}(),Ct=function(t){function e(){return o(this,e),h(this,u(e).apply(this,arguments))}return r(e,At),e}(),Mt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,t,n))).node=t,e}return r(n,At),a(n,[{key:"add",value:function(t,e){return(t=tt(t)).node!==this.node.children[e]&&this.node.insertBefore(t.node,this.node.children[e]||null),this}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"getEventTarget",value:function(){return this.node}}]),n}();nt(Mt);var St=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("defs",t),e))}return r(e,Ct),a(e,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),e}();nt(St);var Tt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,Q("svg",t),n))).namespace(),e}return r(n,Ct),a(n,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"doc",value:function(){return this.isRoot()?this:c(u(n.prototype),"doc",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",B,H).attr("xmlns:svgjs",G,H):this.doc().namespace()}},{key:"defs",value:function(){return this.isRoot()?et(this.node.getElementsByTagName("defs")[0])||this.put(new St):this.doc().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:et(this.node.parentNode):c(u(n.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),n}();lt({Container:{nested:function(){return this.put(new Tt)}}}),nt(Tt,"Doc",!0);var Et=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("g",t),e))}return r(e,Ct),e}();lt({Element:{group:function(){return this.put(new Et)}}}),nt(Et);var Nt=function(){function t(){o(this,t),this._first=null,this._last=null}return a(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),Pt={nextDraw:null,frames:new Nt,timeouts:new Nt,timer:window.performance||window.Date,transforms:[],frame:function(t){var e=Pt.frames.push({run:t});return null===Pt.nextDraw&&(Pt.nextDraw=window.requestAnimationFrame(Pt._draw)),e},transform_frame:function(t,e){Pt.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Pt.timer.now()+e,i=Pt.timeouts.push({run:t,time:n});return null===Pt.nextDraw&&(Pt.nextDraw=window.requestAnimationFrame(Pt._draw)),i},cancelFrame:function(t){Pt.frames.remove(t)},clearTimeout:function(t){Pt.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Pt.timeouts.last();(e=Pt.timeouts.shift())&&(t>=e.time?e.run():Pt.timeouts.push(e),e!==n););for(var i=null,r=Pt.frames.last();i!==r&&(i=Pt.frames.shift());)i.run();Pt.transforms.forEach(function(t){t()}),Pt.nextDraw=Pt.timeouts.first()||Pt.frames.first()?window.requestAnimationFrame(Pt._draw):null}},Dt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q(t,"string"==typeof t?null:t),e))}return r(e,At),a(e,[{key:"words",value:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(document.createTextNode(t)),this}}]),e}();function zt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Rt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function qt(t){return null==t?this.attr("cx"):this.attr("cx",t)}function Lt(t){return null==t?this.attr("cy"):this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new wt(t).divide(2))}function It(t){return null==t?2*this.ry():this.ry(new wt(t).divide(2))}function Xt(t,e){var n=R(this,t,e);return this.rx(new wt(n.width).divide(2)).ry(new wt(n.height).divide(2))}nt(Dt),lt("Container",{element:function(t,e){return this.put(new Dt(t,e))}});var Yt=Object.freeze({rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)},x:zt,y:Rt,cx:qt,cy:Lt,width:Ft,height:It,size:Xt}),Ht=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("circle",t),e))}return r(e,jt),a(e,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}}]),e}();function Bt(t,e){return xt((e||document).querySelectorAll(t),function(t){return et(t)})}$(Ht,{x:zt,y:Rt,cx:qt,cy:Lt,width:Ft,height:It,size:Xt}),lt({Element:{circle:function(t){return this.put(new Ht).radius(new wt(t).divide(2)).move(0,0)}}}),nt(Ht),lt("Element",{find:function(t){return Bt(t,this.node)}});var Gt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("clipPath",t),e))}return r(e,Ct),a(e,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),c(u(e.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Bt('svg [clip-path*="'+this.id()+'"]')}}]),e}();lt({Container:{clip:function(){return this.defs().put(new Gt)}},Element:{clipWith:function(t){var e=t instanceof Gt?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),nt(Gt);var Vt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("a",t),e))}return r(e,Ct),a(e,[{key:"to",value:function(t){return this.attr("href",t,B)}},{key:"target",value:function(t){return this.attr("target",t)}}]),e}();lt({Container:{link:function(t){return this.put(new Vt).to(t)}},Element:{linkTo:function(t){var e=new Vt;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),nt(Vt);var Qt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("ellipse",t),e))}return r(e,jt),e}();$(Qt,Yt),lt("Container",{ellipse:function(t,e){return this.put(new Qt).size(t,e).move(0,0)}}),nt(Qt);var Ut=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("stop",t),e))}return r(e,bt),a(e,[{key:"update",value:function(t){return("number"==typeof t||t instanceof wt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new wt(t.offset)),this}}]),e}();nt(Ut);var $t=Object.freeze({from:function(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new wt(t),fy:new wt(e)}):this.attr({x1:new wt(t),y1:new wt(e)})},to:function(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new wt(t),cy:new wt(e)}):this.attr({x2:new wt(t),y2:new wt(e)})}});function Jt(){if(!Jt.nodes){var t=(new Tt).size(2,0).css({opacity:0,position:"absolute",left:"-100%",top:"-100%",overflow:"hidden"}),e=t.path().node;Jt.nodes={svg:t,path:e}}if(!Jt.nodes.svg.node.parentNode){var n=document.body||document.documentElement;Jt.nodes.svg.addTo(n)}return Jt.nodes}var Wt=function(){function r(t,e,n){var i;o(this,r),n=n||{x:0,y:0},i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===l(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==i.x?n.x:i.x,this.y=null==i.y?n.y:i.y}return a(r,[{key:"clone",value:function(){return new r(this)}},{key:"native",value:function(){var t=Jt().svg.node.createSVGPoint();return t.x=this.x,t.y=this.y,t}},{key:"transform",value:function(t){return new r(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}}]),r}();lt({Element:{point:function(t,e){return new Wt(t,e).transform(this.screenCTM().inverse())}}});var Zt=function(){function u(){o(this,u),this.init.apply(this,arguments)}return a(u,[{key:"init",value:function(t){var e;t="string"==typeof t?t.split(j).map(parseFloat):Array.isArray(t)?t:"object"===l(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3],null==(e=this).x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new u(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){var n=1/0,i=-1/0,r=1/0,s=-1/0;return[new Wt(this.x,this.y),new Wt(this.x2,this.y),new Wt(this.x,this.y2),new Wt(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),i=Math.max(i,t.x),r=Math.min(r,t.y),s=Math.max(s,t.y)}),new u(n,r,i-n,s-r)}},{key:"addOffset",value:function(){return this.x+=window.pageXOffset,this.y+=window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}}]),u}();function Kt(e){var n,t,i;try{if(n=e(this.node),!((i=n).w||i.h||i.x||i.y||(t=this.node,(document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(document.documentElement,t))))throw new Error("Element not in the dom")}catch(t){try{var r=this.clone(Jt().svg).show();n=e(r.node),r.remove()}catch(t){console.warn("Getting a bounding box of this element is not possible")}}return n}lt({Element:{bbox:function(){return new Zt(Kt.call(this,function(t){return t.getBBox()}))},rbox:function(t){var e=new Zt(Kt.call(this,function(t){return t.getBoundingClientRect()}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()}},viewbox:{viewbox:function(t,e,n,i){return null==t?new Zt(this.attr("viewBox")):this.attr("viewBox",new Zt(t,e,n,i))}}});var te=function(t){function i(t){return o(this,i),h(this,u(i).call(this,Q(t+"Gradient","string"==typeof t?null:t),i))}return r(i,Ct),a(i,[{key:"stop",value:function(t,e,n){return this.put(new Ut).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),c(u(i.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return find('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Zt}}]),i}();$(te,$t),lt({Container:{gradient:function(t,e){return this.defs().gradient(t,e)}},Defs:{gradient:function(t,e){return this.put(new te(t)).update(e)}}}),nt(te);var ee=function(t){function i(t){return o(this,i),h(this,u(i).call(this,Q("pattern",t),i))}return r(i,Ct),a(i,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),c(u(i.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return find('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Zt}}]),i}();lt({Container:{pattern:function(t,e,n){return this.defs().pattern(t,e,n)}},Defs:{pattern:function(t,e,n){return this.put(new ee).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}}),nt(ee);var ne=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("image",t),e))}return r(e,jt),a(e,[{key:"load",value:function(n,i){if(!n)return this;var r=new window.Image;return yt(r,"load",function(t){var e=this.parent(ee);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof ee&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof i&&i.call(this,{width:r.width,height:r.height,ratio:r.width/r.height,url:n})},this),yt(r,"load error",function(){vt(r)}),this.attr("href",r.src=n,B)}},{key:"attrHook",value:function(t){var e=this;return t.doc().defs().pattern(0,0,function(t){t.add(e)})}}]),e}();lt({Container:{image:function(t,e){return this.put(new ne).size(0,0).load(t,e)}}}),nt(ne);var ie=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {","[name]: class extends baseClass {","constructor (...args) {","super(...args)","_constructor && _constructor.apply(this, args)","}","}","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,i=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return(i.prototype=Object.create(e.prototype)).constructor=i}}}(),re=ie("SVGArray",Array,function(){this.init.apply(this,arguments)});J(re,{init:function(){this.length=0,this.push.apply(this,O(this.parse.apply(this,arguments)))},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,O(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(j).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var se=ie("PointArray",re);J(se,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,i=[];e<n;e++)i.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new se(i)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(j).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,i=t.length;n<i;n+=2)e.push([t[n],t[n+1]]);return e},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var i=this.length-1;0<=i;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this},size:function(t,e){var n,i=this.bbox();for(n=this.length-1;0<=n;n--)i.width&&(this[n][0]=(this[n][0]-i.x)*t/i.width+i.x),i.height&&(this[n][1]=(this[n][1]-i.y)*e/i.height+i.y);return this},bbox:function(){var e=-1/0,n=-1/0,i=1/0,r=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),i=Math.min(t[0],i),r=Math.min(t[1],r)}),{x:i,y:r,width:e-i,height:n-r}}});var ue=se;var oe=Object.freeze({MorphArray:ue,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),ae=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("line",t),e))}return r(e,jt),a(e,[{key:"array",value:function(){return new se([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:i}:new se(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),e}();$(ae,oe),lt({Container:{line:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return ae.prototype.plot.apply(this.put(new ae),null!=e[0]?e:[0,0,0,0])}}}),nt(ae);var he=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("marker",t),e))}return r(e,Ct),a(e,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),e}();lt({Container:{marker:function(t,e,n){return this.defs().marker(t,e,n)}},Defs:{marker:function(t,e,n){return this.put(new he).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}},marker:{marker:function(t,e,n,i){var r=["marker"];return"all"!==t&&r.push(t),r=r.join("-"),t=e instanceof he?e:this.defs().marker(e,n,i),this.attr(r,t)}}}),nt(he);var le=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("mask",t),e))}return r(e,Ct),a(e,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),c(u(e.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Bt('svg [mask*="'+this.id()+'"]')}}]),e}();lt({Container:{mask:function(){return this.defs().put(new le)}},Element:{maskWith:function(t){var e=t instanceof le?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),nt(le);for(var ce=ie("PathArray",re),fe={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},de="mlhvqtcsaz".split(""),ye=0,ve=de.length;ye<ve;++ye)fe[de[ye]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var i=0,r=t.length;i<r;++i)t[i]=t[i]+(i%2?e.y:e.x);return fe[s](t,e,n)}}(de[ye].toUpperCase());J(ce,{toString:function(){return function(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e][0],null!=t[e][1]&&(i+=t[e][1],null!=t[e][2]&&(i+=" ",i+=t[e][2],null!=t[e][3]&&(i+=" ",i+=t[e][3],i+=" ",i+=t[e][4],null!=t[e][5]&&(i+=" ",i+=t[e][5],i+=" ",i+=t[e][6],null!=t[e][7]&&(i+=" ",i+=t[e][7])))));return i+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var i,r=this.length-1;0<=r;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]+=t,this[r][2]+=e):"H"===i?this[r][1]+=t:"V"===i?this[r][1]+=e:"C"===i||"S"===i||"Q"===i?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===i&&(this[r][5]+=t,this[r][6]+=e)):"A"===i&&(this[r][6]+=t,this[r][7]+=e);return this},size:function(t,e){var n,i,r=this.bbox();for(n=this.length-1;0<=n;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]=(this[n][1]-r.x)*t/r.width+r.x,this[n][2]=(this[n][2]-r.y)*e/r.height+r.y):"H"===i?this[n][1]=(this[n][1]-r.x)*t/r.width+r.x:"V"===i?this[n][1]=(this[n][1]-r.y)*e/r.height+r.y:"C"===i||"S"===i||"Q"===i?(this[n][1]=(this[n][1]-r.x)*t/r.width+r.x,this[n][2]=(this[n][2]-r.y)*e/r.height+r.y,this[n][3]=(this[n][3]-r.x)*t/r.width+r.x,this[n][4]=(this[n][4]-r.y)*e/r.height+r.y,"C"===i&&(this[n][5]=(this[n][5]-r.x)*t/r.width+r.x,this[n][6]=(this[n][6]-r.y)*e/r.height+r.y)):"A"===i&&(this[n][1]=this[n][1]*t/r.width,this[n][2]=this[n][2]*e/r.height,this[n][6]=(this[n][6]-r.x)*t/r.width+r.x,this[n][7]=(this[n][7]-r.y)*e/r.height+r.y);return this},equalCommands:function(t){var e,n,i;for(t=new ce(t),i=this.length===t.length,e=0,n=this.length;i&&e<n;e++)i=this[e][0]===t[e][0];return i},morph:function(t){return t=new ce(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,i,r,s=this,u=this.destination.value,o=[],a=new ce;for(e=0,n=s.length;e<n;e++){for(o[e]=[s[e][0]],i=1,r=s[e].length;i<r;i++)o[e][i]=s[e][i]+(u[e][i]-s[e][i])*t;"A"===o[e][0]&&(o[e][4]=+(0!==o[e][4]),o[e][5]=+(0!==o[e][5]))}return a.value=o,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof ce)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(T,N).replace(M," $& ").replace(C,"$1 -").trim().split(j):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var i=[],r=new Wt,s=new Wt,u=0,o=e.length;S.test(e[u])?(t=e[u],++u):"M"===t?t="L":"m"===t&&(t="l"),i.push(fe[t].call(null,e.slice(u,u+=n[t.toUpperCase()]).map(parseFloat),r,s)),u<o;);return i},bbox:function(){return Jt().path.setAttribute("d",this.toString()),Jt.nodes.path.getBBox()}});var pe=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("path",t),e))}return r(e,jt),a(e,[{key:"array",value:function(){return this._array||(this._array=new ce(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ce(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return Bt('svg textpath [href*="'+this.id()+'"]')}}]),e}();pe.prototype.MorphArray=ce,lt({Container:{path:function(t){return this.put(new pe).plot(t||new ce)}}}),nt(pe);var me=Object.freeze({array:function(){return this._array||(this._array=new se(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new se(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=R(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),ge=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("polygon",t),e))}return r(e,jt),e}();lt({Container:{polygon:function(t){return this.put(new ge).plot(t||new se)}}}),$(ge,oe),$(ge,me),nt(ge);var we=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("polyline",t),e))}return r(e,jt),e}();lt({Container:{polyline:function(t){return this.put(new we).plot(t||new se)}}}),$(we,oe),$(we,me),nt(we);var ke=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("rect",t),e))}return r(e,jt),a(e,[{key:"rx",value:function(t){return this.attr("rx",t)}},{key:"ry",value:function(t){return this.attr("ry",t)}}]),e}();lt({Container:{rect:function(t,e){return this.put(new ke).size(t,e)}}}),nt(ke);var be=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("symbol",t),e))}return r(e,Ct),e}();function xe(){}lt({Container:{symbol:function(){return this.put(new be)}}}),nt(be);var _e={duration:400,ease:">",delay:0},Oe={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},Ae=Object.freeze({noop:xe,timeline:_e,attrs:Oe});var je=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Ce=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,Q("text",t),n))).dom.leading=new wt(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",Oe["font-family"]),e}return r(n,At),a(n,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var i=0,r=e.length;i<r;++i)"textPath"!==e[i].nodeName?(i!==n&&3!==e[i].nodeType&&!0===et(e[i]).dom.newLined&&(t+="\n"),t+=e[i].textContent):0===i&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,u=(t=t.split("\n")).length;s<u;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new wt(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,n=0,i=this.dom.leading*new wt(this.attr("font-size"));this.each(function(){this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?n+=i:(this.attr("dy",i+n),n=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new wt(t.leading||1.3),this}}]),n}();$(Ce,je),lt({Container:{text:function(t){return this.put(new Ce).text(t)},plain:function(t){return this.put(new Ce).plain(t)}}}),nt(Ce);var Me=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("textPath",t),e))}return r(e,Ce),a(e,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),e}();lt({Container:{textPath:function(t,e){return this.defs().path(e).text(t).addTo(this)}},Text:{path:function(t){var e=new Me;return t instanceof pe||(t=this.doc().defs().path(t)),e.attr("href","#"+t,B),this.put(e)},textPath:function(){return this.find("textPath")}},Path:{text:function(t){if(t instanceof Ce){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Ce).path(this).text(t)}}}),Me.prototype.MorphArray=ce,nt(Me);var Se=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("tspan",t),e))}return r(e,At),a(e,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){var t=this.parent(Ce);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),e}();$(Se,je),lt({Tspan:{tspan:function(t){var e=new Se;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)}}}),nt(Se);var Te=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("use",t),e))}return r(e,jt),a(e,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,B)}}]),e}();lt({Container:{use:function(t,e){return this.put(new Te).element(t,e)}}}),nt(Te);var Ee=function(){function h(){o(this,h),this.init.apply(this,arguments)}return a(h,[{key:"init",value:function(t){var e=q([1,0,0,1,0,0]);t=t instanceof bt?t.matrixify():"string"==typeof t?q(t.split(j).map(parseFloat)):Array.isArray(t)?q(t):"object"===l(t)&&I(t)?t:"object"===l(t)?(new h).transform(t):6===arguments.length?q([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(I(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new Wt(e.ox,e.oy).transform(this),i=n.x,r=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,r);if(isFinite(e.px)||isFinite(e.py)){var u=new Wt(i,r).transform(s),o=e.px?e.px-u.x:0,a=e.py?e.py-u.y:0;s.translateO(o,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,i=t.scaleX||1,r=t.scaleY||1,s=t.shear||0,u=t.rotate||0,o=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(i,r).shearO(s).rotateO(u).translateO(o,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,i=this.b,r=this.c,s=this.d,u=this.e,o=this.f,a=n*s-i*r,h=0<a?1:-1,l=h*Math.sqrt(n*n+i*i),c=Math.atan2(h*i,h*n),f=180/Math.PI*c,d=Math.cos(c),y=Math.sin(c),v=(n*r+i*s)/a,p=r*l/(v*n-i)||s*l/(v*i+n);return{scaleX:l,scaleY:p,shear:v,rotate:f,translateX:u-t+t*d*l+e*(v*d*l-y*p),translateY:o-e+t*y*l+e*(v*y*l+d*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,i=this.d,r=this.e,s=this.f,u=t*i-e*n;if(!u)throw new Error("Cannot invert "+this);var o=i/u,a=-e/u,h=-n/u,l=t/u,c=-(o*r+h*s),f=-(a*r+l*s);return this.a=o,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,i){var r;return(r=this.clone()).scaleO.apply(r,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=n,n=e,e=t);var r=this.a,s=this.b,u=this.c,o=this.d,a=this.e,h=this.f;return this.a=r*t,this.b=s*e,this.c=u*t,this.d=o*e,this.e=a*t-n*t+n,this.f=h*e-i*e+i,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=_t(t);var i=Math.cos(t),r=Math.sin(t),s=this.a,u=this.b,o=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*i-u*r,this.b=u*i+s*r,this.c=o*i-a*r,this.d=a*i+o*r,this.e=h*i-l*r+n*r-e*i+e,this.f=l*i+h*r-e*r-n*i+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,i=this.b,r=this.c,s=this.d,u=this.e,o=this.f;return this.a=n+i*t,this.c=r+s*t,this.e=u+o*t-e*t,this}},{key:"skew",value:function(t,e,n,i){var r;return(r=this.clone()).skewO.apply(r,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=n,n=e,e=t),t=_t(t),e=_t(e);var r=Math.tan(t),s=Math.tan(e),u=this.a,o=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=u+o*r,this.b=o+u*s,this.c=a+h*r,this.d=h+a*s,this.e=l+c*r-i*r,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var i=t||0,r=e||0;return this.translateO(-i,-r).lmultiplyO(n).translateO(i,r)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"native",value:function(){for(var t=Jt().svg.node.createSVGMatrix(),e=L.length-1;0<=e;e--)t[L[e]]=this[L[e]];return t}},{key:"equals",value:function(t){var e=new h(t);return F(this.a,e.a)&&F(this.b,e.b)&&F(this.c,e.c)&&F(this.d,e.d)&&F(this.e,e.e)&&F(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,r=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,u=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,o=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,a=t.shear||0,h=t.rotate||t.theta||0,l=new Wt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new Wt(t.position||t.px||t.positionX,t.py||t.positionY),y=d.x,v=d.y,p=new Wt(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new Wt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:u,scaleY:o,skewX:r,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:y,py:v}}},{key:"matrixMultiply",value:function(t,e,n){var i=t.a*e.a+t.c*e.b,r=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,u=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=i,n.b=r,n.c=s,n.d=u,n.e=o,n.f=a,n}}]),h}();lt({Element:{ctm:function(){return new Ee(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new Ee(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Ee(e)}}});var Ne=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t,e,n){var i,r;(this.r=0,this.g=0,this.b=0,t)&&("string"==typeof t?k.test(t)?(i=p.exec(t.replace(g,"")),this.r=parseInt(i[1]),this.g=parseInt(i[2]),this.b=parseInt(i[3])):w.test(t)&&(i=v.exec(4===(r=t).length?["#",r.substring(1,2),r.substring(1,2),r.substring(2,3),r.substring(2,3),r.substring(3,4),r.substring(3,4)].join(""):r),this.r=parseInt(i[1],16),this.g=parseInt(i[2],16),this.b=parseInt(i[3],16)):Array.isArray(t)?(this.r=t[0],this.g=t[1],this.b=t[2]):"object"===l(t)?(this.r=t.r,this.g=t.g,this.b=t.b):3===arguments.length&&(this.r=t,this.g=e,this.b=n))}},{key:"toString",value:function(){return this.toHex()}},{key:"toArray",value:function(){return[this.r,this.g,this.b]}},{key:"toHex",value:function(){return"#"+z(Math.round(this.r))+z(Math.round(this.g))+z(Math.round(this.b))}},{key:"toRgb",value:function(){return"rgb("+[this.r,this.g,this.b].join()+")"}},{key:"brightness",value:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11}}],[{key:"test",value:function(t){return t+="",w.test(t)||k.test(t)}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return this.isRgb(t)||this.test(t)}}]),t}();function Pe(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}var De={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,i){return function(t){}}},ze=function(){function t(){o(this,t)}return a(t,[{key:"done",value:function(){return!1}}]),t}(),Re=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).ease=De[t||_e.ease]||t,e}return r(n,ze),a(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),qe=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).stepper=t,e}return r(n,ze),a(n,[{key:"step",value:function(t,e,n,i){return this.stepper(t,e,n,i)}},{key:"done",value:function(t){return t.done}}]),n}();function Le(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,i=Math.log(e/100+1e-10),r=-i/Math.sqrt(n*n+i*i),s=3.9/(r*t);this.d=2*r*s,this.k=s*s}var Fe=function(t){function i(t,e){var n;return o(this,i),(n=h(this,u(i).call(this))).duration(t||500).overshoot(e||0),n}return r(i,qe),a(i,[{key:"step",value:function(t,e,n,i){if("string"==typeof t)return t;if(i.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var r=i.velocity||0,s=-this.d*r-this.k*(t-e),u=t+r*n+s*n*n/2;return i.velocity=r+s*n,i.done=Math.abs(e-u)+Math.abs(r)<.002,i.done?e:u}}]),i}();$(Fe,{duration:Pe("_duration",Le),overshoot:Pe("_overshoot",Le)});var Ie=function(t){function s(t,e,n,i){var r;return o(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,i=null==i?1e3:i,(r=h(this,u(s).call(this))).p(t).i(e).d(n).windup(i),r}return r(s,qe),a(s,[{key:"step",value:function(t,e,n,i){if("string"==typeof t)return t;if(i.done=n===1/0,n===1/0)return e;if(0===n)return t;var r=e-t,s=(i.integral||0)+r*n,u=(r-(i.error||0))/n,o=this.windup;return!1!==o&&(s=Math.max(-o,Math.min(s,o))),i.error=r,i.integral=s,i.done=Math.abs(r)<.001,i.done?e:t+(this.P*r+this.I*s+this.D*u)}}]),s}();$(Ie,{windup:Pe("windup"),p:Pe("P"),i:Pe("I"),d:Pe("D")});var Xe=function(){function e(t){o(this,e),this._stepper=t||new Re("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return a(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=l(t);"number"===e?this.type(wt):"string"===e?Ne.isColor(t)?this.type(Ne):j.test(t)?this.type(M.test(t)?ce:re):y.test(t)?this.type(wt):this.type(Ye):-1<Ge.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(re):"object"===e?this.type(Be):this.type(Ye)}var n=new this._type(t).toArray();return this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var i=this;return this._morphObj.fromArray(this._from.map(function(t,e){return i._stepper.step(t,i._to[e],n,i._context[e],i._context)}))}}]),e}(),Ye=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t){t=Array.isArray(t)?t[0]:t,this.value=t}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),He=function(){function e(){o(this,e),this.init.apply(this,arguments)}return a(e,[{key:"init",value:function(t){Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t)}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();He.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Be=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t){if(this.values=[],Array.isArray(t))this.values=t;else{var e=Object.entries(t||{}).sort(function(t,e){return t[0]-e[0]});this.values=e.reduce(function(t,e){return t.concat(e)},[])}}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,i=e.length;n<i;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),Ge=[Ye,He,Be];var Ve=window.performance||Date,Qe=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ue=function(){function t(){o(this,t),this._timeSource=function(){return Ve.now()},this._dispatcher=document.createElement("div"),this._startTime=0,this._speed=1,this._reverse=!1,this._persist=0,this._nextFrame=null,this._paused=!1,this._runners=[],this._order=[],this._time=0,this._lastSourceTime=0,this._lastStepTime=0}return a(t,[{key:"getEventTarget",value:function(){return this._dispatcher}},{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Qe).sort(function(t,e){return t.start-e.start||t.duration-e.duration});this.active()||(this._step(),null==n&&(n="now"));var i=0;if(e=e||0,null==n||"last"===n||"after"===n)i=this._startTime;else if("absolute"===n||"start"===n)i=e,e=0;else if("now"===n)i=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var r=this._runners[t.id];r&&(i=r.start+e,e=0)}return t.unschedule(),t.timeline(this),t.time(-e),this._startTime=i+t.duration()+e,this._runners[t.id]={persist:this.persist(),runner:t,start:i},this._order.push(t.id),this._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"play",value:function(){return this._paused=!1,this._continue()}},{key:"pause",value:function(){return this._nextFrame=null,this._paused=!0,this}},{key:"stop",value:function(){return this.seek(-this._time),this.pause()}},{key:"finish",value:function(){return this.seek(1/0),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this._time+=t,this._continue()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this)}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_step",value:function(){if(!this._paused){var t=this._timeSource(),e=t-this._lastSourceTime,n=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=t,this._time+=n,this._lastStepTime=this._time;for(var i=!1,r=0,s=this._order.length;r<s;r++){var u=this._runners[this._order[r]],o=u.runner,a=n,h=this._time-u.start;if(h<0)i=!0;else if(h<a&&(a=h),o.active())if(o.step(a).done){if(!0!==u.persist){o.duration()-o.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[r]],this._order.splice(r--,1)&&--s,o.timeline(null))}}else i=!0}return this._nextFrame=i?Pt.frame(this._step.bind(this)):null,this}}},{key:"_continue",value:function(){return this._paused||this._nextFrame||(this._nextFrame=Pt.frame(this._step.bind(this))),this}},{key:"active",value:function(){return!!this._nextFrame}}]),t}();lt({Element:{timeline:function(){return this._timeline=this._timeline||new Ue,this._timeline}}});var $e=function(){function s(t){o(this,s),this.id=s.id++,t="function"==typeof(t=null==t?_e.duration:t)?new qe(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof qe,this._stepper=this._isDeclarative?t:new Re,this._history={},this.enabled=!0,this._time=0,this._last=0,this.transforms=new Ee,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1}return a(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var i=s.sanitise(t,e,n),r=new s(i.duration);return this._timeline&&r.timeline(this._timeline),this._element&&r.element(this._element),r.loop(i).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof Ue||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===l(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n){return this._queue.push({initialiser:t||xe,runner:e||xe,isTransform:n,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finish",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),i=(this._time-n*e)/this._duration;return Math.min(n+i,this._times)}var r=t%1,s=e*Math.floor(t)+this._duration*r;return this.time(s)}},{key:"position",value:function(t){var e,n=this._time,r=this._duration,s=this._wait,i=this._times,u=this._swing,o=this._reverse;if(null==t){var a=function(t){var e=u*Math.floor(t%(2*(s+r))/(s+r)),n=e&&!o||!e&&o,i=Math.pow(-1,n)*(t%(s+r))/r+n;return Math.max(Math.min(i,1),0)},h=i*(s+r)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=u&&l%2==0;return e=l+(c&&!o||o&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var i=this.duration(),r=(this._lastTime<0&&this._time,this._lastTime<this._time&&this.time>i);this._lastTime=this._time;var s=this._isDeclarative;if(this.done=!s&&!r&&this._time>=i,n||s){this._initialise(n),this.transforms=new Ee;var u=this._run(s?t:e)}return this.done=this.done||u&&s,this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new Re(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.isTransform?this._history[t].caller.isTransform(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var i=this.timeline();return i&&i._continue(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var i=this._queue[e],r=this._isDeclarative||!i.initialised&&t;t=!i.finished,r&&t&&(i.initialiser.call(this),i.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,i=this._queue.length;n<i;++n){var r=this._queue[n],s=r.runner.call(this,t);r.finished=r.finished||!0===s,e=e&&r.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new Ee,this}}],[{key:"sanitise",value:function(t,e,n){var i=1,r=!1,s=0;return e=e||_e.delay,n=n||"last","object"!==l(t=t||_e.duration)||t instanceof ze||(e=t.delay||e,n=t.when||n,r=t.swing||r,i=t.times||i,s=t.wait||s,t=t.duration||_e.duration),{duration:t,delay:e,swing:r,times:i,wait:s,when:n}}}]),s}();$e.id=0;var Je=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Ee,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];o(this,t),this.transforms=e,this.id=n,this.done=i};$([$e,Je],{mergeWith:function(t){return new Je(t.transforms.lmultiply(this.transforms),t.id)}});var We=function(t,e){return t.lmultiplyO(e)},Ze=function(t){return t.transforms};var Ke=function(){function t(){o(this,t),this.runners=[],this.ids=[]}return a(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),i=this.ids.indexOf(e)+1;return this.ids.splice(i,0,n),this.runners.splice(i,0,t),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,i=null;return this.runners.forEach(function(t,e){i&&t.done&&i.done&&(n.remove(t.id),n.edit(i.id,t.mergeWith(i))),i=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Je),this}}]),t}(),tn=0;lt({Element:{animate:function(t,e,n){var i=$e.sanitise(t,e,n),r=this.timeline();return new $e(i.duration).loop(i).element(this).timeline(r).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(Ze).reduce(We,new Ee)},addRunner:function(t){this._transformationRunners.add(t),Pt.transform_frame(function(){var t=this._transformationRunners.runners.map(Ze).reduce(We,new Ee);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new Ke).add(new Je(new Ee(this))),this._frameId=tn++)}}}),$($e,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===l(n))for(var i in t)this.styleAttr(e,i,t[i]);var r=new Xe(this._stepper).to(t);return this.queue(function(){r=r.from(this.element()[e](n))},function(t){return this.element()[e](n,r.at(t)),r.done()}),this},zoom:function(t,e){var n=new Xe(this._stepper).to(new wt(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(d,y,v){if(y=d.relative||y,this._isDeclarative&&!y&&this._tryRetarget("transform",d))return this;var p=I(d);v=null!=d.affine?d.affine:null!=v?v:!p;var m,g,w,k,b,x=(new Xe).type(v?He:Ee).stepper(this._stepper);return this.queue(function(){g=g||this.element(),m=m||X(d,g),b=new Ee(y?void 0:g),g.addRunner(this),y||g._clearTransformRunnersBefore(this)},function(t){y||this.clearTransform();var e=new Wt(m).transform(g._currentTransform(this)),n=e.x,i=e.y,r=new Ee(_({},d,{origin:[n,i]})),s=this._isDeclarative&&w?w:b;if(v){r=r.decompose(n,i),s=s.decompose(n,i);var u=r.rotate,o=s.rotate,a=[u-360,u,u+360],h=a.map(function(t){return Math.abs(t-o)}),l=Math.min.apply(Math,O(h)),c=h.indexOf(l);r.rotate=a[c]}y&&(p||(r.rotate=d.rotate||0),this._isDeclarative&&k&&(s.rotate=k)),x.from(s),x.to(r);var f=x.at(t);return k=f.rotate,w=new Ee(f),this.addTransform(w),x.done()},function(t){(t.origin||"center").toString()!==(d.origin||"center").toString()&&(m=X(d,g)),d=_({},t,{origin:m})}),this._isDeclarative&&this._rememberMorpher("transform",x),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("dx",t)},dy:function(t){return this._queueNumberDelta("dy",t)},_queueNumberDelta:function(e,n){if(n=new wt(n),this._tryRetargetDelta(e,n))return this;var i=new Xe(this._stepper).to(n);return this.queue(function(){var t=this.element()[e]();i.from(t),i.to(t+n)},function(t){return this.element()[e](i.at(t)),i.done()}),this._rememberMorpher(e,i),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Xe(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new wt(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,i){return 4===arguments.length?this.plot([t,e,n,i]):this._queueObject("plot",new this._element.MorphArray(t))},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,i){return this._queueObject("viewbox",new Box(t,e,n,i))},update:function(t){return"object"!==l(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}});var en,nn=Object.freeze({EventTarget:gt,Element:bt,Shape:jt,Parent:At,Container:Ct,HtmlNode:Mt,Doc:Tt,Defs:St,G:Et,Animator:Pt,Bare:Dt,Circle:Ht,ClipPath:Gt,A:Vt,Ellipse:Qt,Stop:Ut,Gradient:te,Image:ne,Line:ae,Marker:he,Mask:le,Path:pe,Pattern:ee,Polygon:ge,Polyline:we,Rect:ke,Symbol:be,Text:Ce,TextPath:Me,Tspan:Se,Use:Te,SVGNumber:wt,SVGArray:re,PathArray:ce,PointArray:se,Matrix:Ee,Point:Wt,Box:Zt,Color:Ne,Morphable:Xe,Queue:Nt,Runner:$e,Timeline:Ue,Controller:qe,Ease:Re,PID:Ie,Spring:Fe});lt("Element",{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;var i=!0,r=!1,s=void 0;try{for(var u,o=e[Symbol.iterator]();!(i=(u=o.next()).done);i=!0){var a=u.value;t[a.nodeName]=x.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return t}if(Array.isArray(t));else if("object"===l(t))for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Oe[t]:x.test(e)?parseFloat(e):e;for("fill"!==t&&"stroke"!==t||A.test(e)&&(e=this.doc().defs().image(e));"function"==typeof e.attrHook;)e=e.attrHook(this,t);"number"==typeof e?e=new wt(e):Ne.isColor(e)?e=new Ne(e):e.constructor===Array&&(e=new re(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this}}),lt("Element",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),lt("Element",{data:function(e,t,n){if("object"===l(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),lt("Element",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var i=!0,r=!1,s=void 0;try{for(var u,o=t[Symbol.iterator]();!(i=(u=o.next()).done);i=!0){var a=P(u.value);n[a]=this.node.style[a]}}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return n}if("string"==typeof t)return this.node.style[P(t)];if("object"===l(t))for(name in t)this.node.style[P(name)]=null==t[name]||b.test(t[name])?"":t[name]}return 2===arguments.length&&(this.node.style[P(t)]=null==e||b.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),lt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(j).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(q(e[1])):t[e[0]].apply(t,e[1])},new Ee)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new Ee(this).decompose();return n[t]||n}I(t)||(t=_({},t,{origin:X(t,this)}));var i=new Ee(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}}),lt("Element",{remember:function(t,e){if("object"===l(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory}}),en=function(t){this._memory={}},ht["Memory"]=en;var rn={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||Ne.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(n=rn[e].length-1;0<=n;n--)null!=t[rn[e][n]]&&this.attr(rn.prefix(e,rn[e][n]),t[rn[e][n]]);return this},lt(["Element","Runner"],t)}),lt(["Element","Runner"],{matrix:function(t,e,n,i,r,s){return null==t?new Ee(this):this.attr("transform",new Ee(t,e,n,i,r,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:i},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),i="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];this.transform({flip:n,origin:i},!0)},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new wt(t).plus(this instanceof $e?0:this.x()),!0)},dy:function(t){return this.y(new wt(t).plus(this instanceof $e?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),lt("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new wt(t)):this.rx(t).ry(null==e?t:e)}}),lt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Wt(this.node.getPointAtLength(t))}}),lt(["Parent","Runner"],{font:function(t,e){if("object"===l(t))for(e in t)this.font(e,t[e]);return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});var sn,un=$;function on(t){return tt(t)}return un([Tt,be,ne,ee,he],ct("viewbox")),un([ae,we,ge,pe],ct("marker")),un(Ce,ct("Text")),un(pe,ct("Path")),un(St,ct("Defs")),un([Ce,Se],ct("Tspan")),un([ke,Qt,Ht,te],ct("radius")),un(gt,ct("EventTarget")),un(bt,ct("Element")),un(bt,ct("Parent")),un(bt,ht[sn="Memory"]?{setup:ht[sn],name:sn}:{}),un(Ct,ct("Container")),function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];Ge.push.apply(Ge,O([].concat(t)))}([wt,Ne,Zt,Ee,re,se,ce]),$(Ge,{to:function(t,e){return(new Xe).type(this.constructor).from(this.valueOf()).to(t,e)},fromArray:function(t){return this.init(t),this}}),Object.assign(on,nn),Object.assign(on,W),Object.assign(on,ot),on.utils=Ot,on.regex=e,(on.get=on).find=Bt,Object.assign(on,V),on.easing=De,Object.assign(on,mt),on.TransformBag=He,on.ObjectBag=Be,on.NonMorphable=Ye,on.parser=Jt,on.defaults=Ae,on}();
+var SVG=function(){"use strict";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)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function _(r){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=s[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?s(t):e}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,s=void 0;try{for(var u,o=t[Symbol.iterator]();!(i=(u=o.next()).done)&&(n.push(u.value),!e||n.length!==e);i=!0);}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var d=function(){function e(t){o(this,e)}return a(e,[{key:"is",value:function(t){return this.tags.includes(t)}}]),e}(),y=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,v=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,p=/rgb\((\d+),(\d+),(\d+)\)/,m=/(#[a-z0-9\-_]+)/i,t=/\)\s*,?\s*/,g=/\s/g,w=/^#[a-f0-9]{3,6}$/i,k=/^rgb\(/,b=/^(\s+)?$/,x=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,A=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,j=/[\s,]+/,C=/([^e])-/gi,M=/[MLHVCSQTAZ]/gi,S=/[MLHVCSQTAZ]/i,T=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,E=/\./g,e=Object.freeze({numberAndUnit:y,hex:v,rgb:p,reference:m,transforms:t,whitespace:g,isHex:w,isRgb:k,isCss:/[^:]+:[^;]+;?/,isBlank:b,isNumber:x,isPercent:/^-?[\d.]+%$/,isImage:A,delimiter:j,hyphen:C,pathLetters:M,isPathLetter:S,numbersWithDots:T,dots:E});function N(t,e,n,i){return n+i.replace(E," .")}function P(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function D(t){return t.charAt(0).toUpperCase()+t.slice(1)}function z(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function R(t,e,n){if(null==e||null==n){var i=t.bbox();null==e?e=i.width/i.height*n:null==n&&(n=i.height/i.width*e)}return{width:e,height:n}}function q(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}var L="abcdef".split("");function F(t,e,n){return Math.abs(e-t)<(n||1e-6)}function I(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}function X(t,e){var n,i,r=t.origin;if("string"==typeof r||null==r){var s=(r||"center").toLowerCase().trim(),u=e.bbox(),o=u.height,a=u.width,h=u.x,l=u.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+o:l+o/2;n=null!=t.ox?t.ox:c,i=null!=t.oy?t.oy:f}else n=r[0],i=r[1];return[n,i]}var Y="http://www.w3.org/2000/svg",H="http://www.w3.org/2000/xmlns/",B="http://www.w3.org/1999/xlink",G="http://svgjs.com/svgjs",V=Object.freeze({ns:Y,xmlns:H,xlink:B,svgjs:G});function Q(t,e){return e||U(t)}function U(t){return document.createElementNS(Y,t)}function $(t,e){var n,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(n in e)t[i].prototype[n]=e[n]}var J=Object.freeze({nodeOrNew:Q,makeNode:U,extend:$,addFactory:function(t,e){$(t,e)},invent:function(e){var t="function"==typeof e.create?e.create:function(t){e.inherit.call(this,t||U(e.create))};return e.inherit&&(t.prototype=new e.inherit,t.prototype.constructor=t),e.extend&&$(t,e.extend),e.construct&&$(e.parent||Container,e.construct),t}}),W={},Z=Symbol("root");function K(t){if(t instanceof d)return t;if("object"===l(t))return tt(t);if(null==t)return new W[Z];if("string"==typeof t&&"<"!==t.charAt(0))return tt(document.querySelector(t));var e=U("svg");return e.innerHTML=t,t=tt(e.firstChild)}function tt(t){return t?t.instance instanceof d?t.instance:t instanceof window.SVGElement?"svg"===t.nodeName?new W[Z](t):"linearGradient"===t.nodeName||"radialGradient"===t.nodeName?new W.Gradient(t):W[D(t.nodeName)]?new(W[D(t.nodeName)])(t):new W.Bare(t):new W.HtmlNode(t):null}function et(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return W[e]=t,n&&(W[Z]=t),t}function nt(t){return W[t]}var it=1e3;function rt(t){return"Svgjs"+D(t)+it++}function st(t){for(var e=t.children.length-1;0<=e;e--)st(t.children[e]);return t.id?tt(t).id(rt(t.nodeName)):tt(t)}var ut=Object.freeze({root:Z,makeInstance:K,adopt:tt,register:et,getClass:nt,eid:rt,assignNewId:st}),ot={};function at(t,e){if(Array.isArray(t)){var n=!0,i=!1,r=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){at(s.value,e)}}catch(t){i=!0,r=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw r}}}else if("object"!=l(t))ot[t]=Object.assign(ot[t]||{},e);else for(var o=Object.entries(t),a=0;a<o.length;a++){var h=f(o[a],2);at(h[0],h[1])}}function ht(t){return ot[t]||{}}var lt=0;function ct(t){return"function"==typeof t.getEventTarget?t.getEventTarget():t}function ft(t,e,i,n,r){var s=i.bind(n||t),u=ct(t);e=Array.isArray(e)?e:e.split(j),u.instance=u.instance||{events:{}};var o=u.instance.events;i._svgjsListenerId||(i._svgjsListenerId=++lt),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][i._svgjsListenerId]=s,u.addEventListener(e,s,r||!1)})}function dt(t,e,s,u){var o=ct(t);if(o.instance&&("function"!=typeof s||(s=s._svgjsListenerId))){var a=o.instance.events;(e=Array.isArray(e)?e:(e||"").split(j)).forEach(function(t){var e,n,i=t&&t.split(".")[0],r=t&&t.split(".")[1];if(s)a[i]&&a[i][r||"*"]&&(o.removeEventListener(i,a[i][r||"*"][s],u||!1),delete a[i][r||"*"][s]);else if(i&&r){if(a[i]&&a[i][r]){for(n in a[i][r])dt(o,[i,r].join("."),n);delete a[i][r]}}else if(r)for(t in a)for(e in a[t])r===e&&dt(o,[t,r].join("."));else if(i){if(a[i]){for(e in a[i])dt(o,[i,e].join("."));delete a[i]}}else{for(t in a)dt(o,t);o.instance.events={}}})}}function yt(t,e,n){var i=ct(t);return e instanceof window.Event||(e=new window.CustomEvent(e,{detail:n,cancelable:!0})),i.dispatchEvent(e),e}var vt=Object.freeze({on:ft,off:dt,dispatch:yt}),pt=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=h(this,u(n).call(this))).events=e.events||{},t}return r(n,d),a(n,[{key:"on",value:function(t,e,n,i){return ft(this,t,e,n,i),this}},{key:"off",value:function(t,e){return dt(this,t,e),this}},{key:"dispatch",value:function(t,e){return yt(this,t,e)}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}}]),n}();$(pt,["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?dt(this,e):ft(this,e,t),this},t},{}));var mt=function(){function n(){o(this,n),this.init.apply(this,arguments)}return a(n,[{key:"init",value:function(t,e){e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(y))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit)}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}}]),n}(),gt=nt(Z),wt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).dom={},e.node=t,e.type=t.nodeName,e.node.instance=s(s(e)),t.hasAttribute("svgjs:data")&&e.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),e}return r(n,pt),a(n,[{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.width(new mt(n.width)).height(new mt(n.height))}},{key:"clone",value:function(t){this.writeDataToDom();var e=st(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"replace",value:function(t){return this.after(t).remove(),t}},{key:"addTo",value:function(t){return K(t).put(this)}},{key:"putIn",value:function(t){return K(t).add(this)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=rt(this.type)),this.attr("id",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"toString",value:function(){return this.id()}},{key:"classes",value:function(){var t=this.attr("class");return null==t?[]:t.trim().split(j)}},{key:"hasClass",value:function(t){return-1!==this.classes().indexOf(t)}},{key:"addClass",value:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this}},{key:"removeClass",value:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this}},{key:"toggleClass",value:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}},{key:"reference",value:function(t){var e=function(t){var e=(t||"").toString().match(m);if(e)return e[1]}(this.attr(t));return e?K(e):null}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=tt(e.node.parentNode),!t)return e;for(;e&&e.node instanceof window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=tt(e.node.parentNode)}}},{key:"doc",value:function(){var t=this.parent(gt);return t&&t.doc()}},{key:"defs",value:function(){return this.doc().defs()}},{key:"parents",value:function(t){var e=[],n=this;do{if(!(n=n.parent(t))||n instanceof nt("HtmlNode"))break;e.push(n)}while(n.parent);return e}},{key:"matches",value:function(t){return e=this.node,n=t,(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,n);var e,n}},{key:"native",value:function(){return this.node}},{key:"svg",value:function(){return this.writeDataToDom(),this.node.outerHTML}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"getEventTarget",value:function(){return this.node}}]),n}();function kt(t,e){var n,i=t.length,r=[];for(n=0;n<i;n++)r.push(e(t[n]));return r}function bt(t){return t%360*Math.PI/180}var xt=Object.freeze({map:kt,filter:function(t,e){var n,i=t.length,r=[];for(n=0;n<i;n++)e(t[n])&&r.push(t[n]);return r},radians:bt,degrees:function(t){return 180*t/Math.PI%360},filterSVGElements:function(t){return this.filter(t,function(t){return t instanceof window.SVGElement})}}),_t=function(t){function s(){return o(this,s),h(this,u(s).apply(this,arguments))}return r(s,wt),a(s,[{key:"children",value:function(){return kt(this.node.children,function(t){return tt(t)})}},{key:"add",value:function(t,e){return t=K(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"put",value:function(t,e){return this.add(t,e),t.instance||t}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"get",value:function(t){return tt(this.node.childNodes[t])}},{key:"first",value:function(){return tt(this.node.firstChild)}},{key:"last",value:function(){return tt(this.node.lastChild)}},{key:"each",value:function(t,e){var n,i,r=this.children();for(n=0,i=r.length;n<i;n++)r[n]instanceof wt&&t.apply(r[n],[n,r]),e&&r[n]instanceof s&&r[n].each(t,e);return this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}},{key:"svg",value:function(t){var e,n;if(!t)return this.writeDataToDom(),this.node.outerHTML;for((e=document.createElementNS(Y,"svg")).innerHTML=t,n=e.children.length;n--;)this.node.appendChild(e.firstElementChild);return this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this}},{key:"flatten",value:function(t){return this.each(function(){return this instanceof s?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),s}(),Ot=function(t){function e(){return o(this,e),h(this,u(e).apply(this,arguments))}return r(e,_t),e}(),At=function(t){function e(){return o(this,e),h(this,u(e).apply(this,arguments))}return r(e,_t),e}(),jt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,t,n))).node=t,e}return r(n,_t),a(n,[{key:"add",value:function(t,e){return(t=K(t)).node!==this.node.children[e]&&this.node.insertBefore(t.node,this.node.children[e]||null),this}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"getEventTarget",value:function(){return this.node}}]),n}();et(jt);var Ct=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("defs",t),e))}return r(e,At),a(e,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),e}();et(Ct);var Mt=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,Q("svg",t),n))).namespace(),e}return r(n,At),a(n,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"doc",value:function(){return this.isRoot()?this:c(u(n.prototype),"doc",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",B,H).attr("xmlns:svgjs",G,H):this.doc().namespace()}},{key:"defs",value:function(){return this.isRoot()?tt(this.node.getElementsByTagName("defs")[0])||this.put(new Ct):this.doc().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:tt(this.node.parentNode):c(u(n.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),n}();at({Container:{nested:function(){return this.put(new Mt)}}}),et(Mt,"Doc",!0);var St=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("g",t),e))}return r(e,At),e}();at({Element:{group:function(){return this.put(new St)}}}),et(St);var Tt=function(){function t(){o(this,t),this._first=null,this._last=null}return a(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),Et={nextDraw:null,frames:new Tt,timeouts:new Tt,timer:window.performance||window.Date,transforms:[],frame:function(t){var e=Et.frames.push({run:t});return null===Et.nextDraw&&(Et.nextDraw=window.requestAnimationFrame(Et._draw)),e},transform_frame:function(t,e){Et.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Et.timer.now()+e,i=Et.timeouts.push({run:t,time:n});return null===Et.nextDraw&&(Et.nextDraw=window.requestAnimationFrame(Et._draw)),i},cancelFrame:function(t){Et.frames.remove(t)},clearTimeout:function(t){Et.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Et.timeouts.last();(e=Et.timeouts.shift())&&(t>=e.time?e.run():Et.timeouts.push(e),e!==n););for(var i=null,r=Et.frames.last();i!==r&&(i=Et.frames.shift());)i.run();Et.transforms.forEach(function(t){t()}),Et.nextDraw=Et.timeouts.first()||Et.frames.first()?window.requestAnimationFrame(Et._draw):null}},Nt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q(t,"string"==typeof t?null:t),e))}return r(e,_t),a(e,[{key:"words",value:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(document.createTextNode(t)),this}}]),e}();function Pt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function zt(t){return null==t?this.attr("cx"):this.attr("cx",t)}function Rt(t){return null==t?this.attr("cy"):this.attr("cy",t)}function qt(t){return null==t?2*this.rx():this.rx(new mt(t).divide(2))}function Lt(t){return null==t?2*this.ry():this.ry(new mt(t).divide(2))}function Ft(t,e){var n=R(this,t,e);return this.rx(new mt(n.width).divide(2)).ry(new mt(n.height).divide(2))}et(Nt),at("Container",{element:function(t,e){return this.put(new Nt(t,e))}});var It=Object.freeze({rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)},x:Pt,y:Dt,cx:zt,cy:Rt,width:qt,height:Lt,size:Ft}),Xt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("circle",t),e))}return r(e,Ot),a(e,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}}]),e}();function Yt(t,e){return kt((e||document).querySelectorAll(t),function(t){return tt(t)})}$(Xt,{x:Pt,y:Dt,cx:zt,cy:Rt,width:qt,height:Lt,size:Ft}),at({Element:{circle:function(t){return this.put(new Xt).radius(new mt(t).divide(2)).move(0,0)}}}),et(Xt),at("Element",{find:function(t){return Yt(t,this.node)}});var Ht=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("clipPath",t),e))}return r(e,At),a(e,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),c(u(e.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Yt('svg [clip-path*="'+this.id()+'"]')}}]),e}();at({Container:{clip:function(){return this.defs().put(new Ht)}},Element:{clipWith:function(t){var e=t instanceof Ht?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),et(Ht);var Bt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("a",t),e))}return r(e,At),a(e,[{key:"to",value:function(t){return this.attr("href",t,B)}},{key:"target",value:function(t){return this.attr("target",t)}}]),e}();at({Container:{link:function(t){return this.put(new Bt).to(t)}},Element:{linkTo:function(t){var e=new Bt;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),et(Bt);var Gt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("ellipse",t),e))}return r(e,Ot),e}();$(Gt,It),at("Container",{ellipse:function(t,e){return this.put(new Gt).size(t,e).move(0,0)}}),et(Gt);var Vt=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("stop",t),e))}return r(e,wt),a(e,[{key:"update",value:function(t){return("number"==typeof t||t instanceof mt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new mt(t.offset)),this}}]),e}();et(Vt);var Qt=Object.freeze({from:function(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new mt(t),fy:new mt(e)}):this.attr({x1:new mt(t),y1:new mt(e)})},to:function(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new mt(t),cy:new mt(e)}):this.attr({x2:new mt(t),y2:new mt(e)})}});function Ut(){if(!Ut.nodes){var t=(new Mt).size(2,0).css({opacity:0,position:"absolute",left:"-100%",top:"-100%",overflow:"hidden"}),e=t.path().node;Ut.nodes={svg:t,path:e}}if(!Ut.nodes.svg.node.parentNode){var n=document.body||document.documentElement;Ut.nodes.svg.addTo(n)}return Ut.nodes}var $t=function(){function r(t,e,n){var i;o(this,r),n=n||{x:0,y:0},i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===l(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==i.x?n.x:i.x,this.y=null==i.y?n.y:i.y}return a(r,[{key:"clone",value:function(){return new r(this)}},{key:"native",value:function(){var t=Ut().svg.node.createSVGPoint();return t.x=this.x,t.y=this.y,t}},{key:"transform",value:function(t){return new r(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}}]),r}();at({Element:{point:function(t,e){return new $t(t,e).transform(this.screenCTM().inverse())}}});var Jt=function(){function u(){o(this,u),this.init.apply(this,arguments)}return a(u,[{key:"init",value:function(t){var e;t="string"==typeof t?t.split(j).map(parseFloat):Array.isArray(t)?t:"object"===l(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3],null==(e=this).x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new u(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){var n=1/0,i=-1/0,r=1/0,s=-1/0;return[new $t(this.x,this.y),new $t(this.x2,this.y),new $t(this.x,this.y2),new $t(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),i=Math.max(i,t.x),r=Math.min(r,t.y),s=Math.max(s,t.y)}),new u(n,r,i-n,s-r)}},{key:"addOffset",value:function(){return this.x+=window.pageXOffset,this.y+=window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}}]),u}();function Wt(e){var n,t,i;try{if(n=e(this.node),!((i=n).w||i.h||i.x||i.y||(t=this.node,(document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(document.documentElement,t))))throw new Error("Element not in the dom")}catch(t){try{var r=this.clone(Ut().svg).show();n=e(r.node),r.remove()}catch(t){console.warn("Getting a bounding box of this element is not possible")}}return n}at({Element:{bbox:function(){return new Jt(Wt.call(this,function(t){return t.getBBox()}))},rbox:function(t){var e=new Jt(Wt.call(this,function(t){return t.getBoundingClientRect()}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()}},viewbox:{viewbox:function(t,e,n,i){return null==t?new Jt(this.attr("viewBox")):this.attr("viewBox",new Jt(t,e,n,i))}}});var Zt=function(t){function i(t){return o(this,i),h(this,u(i).call(this,Q(t+"Gradient","string"==typeof t?null:t),i))}return r(i,At),a(i,[{key:"stop",value:function(t,e,n){return this.put(new Vt).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),c(u(i.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return find('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Jt}}]),i}();$(Zt,Qt),at({Container:{gradient:function(t,e){return this.defs().gradient(t,e)}},Defs:{gradient:function(t,e){return this.put(new Zt(t)).update(e)}}}),et(Zt);var Kt=function(t){function i(t){return o(this,i),h(this,u(i).call(this,Q("pattern",t),i))}return r(i,At),a(i,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),c(u(i.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return find('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Jt}}]),i}();at({Container:{pattern:function(t,e,n){return this.defs().pattern(t,e,n)}},Defs:{pattern:function(t,e,n){return this.put(new Kt).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}}),et(Kt);var te=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("image",t),e))}return r(e,Ot),a(e,[{key:"load",value:function(n,i){if(!n)return this;var r=new window.Image;return ft(r,"load",function(t){var e=this.parent(Kt);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof Kt&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof i&&i.call(this,{width:r.width,height:r.height,ratio:r.width/r.height,url:n})},this),ft(r,"load error",function(){dt(r)}),this.attr("href",r.src=n,B)}},{key:"attrHook",value:function(t){var e=this;return t.doc().defs().pattern(0,0,function(t){t.add(e)})}}]),e}();at({Container:{image:function(t,e){return this.put(new te).size(0,0).load(t,e)}}}),et(te);var ee=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {","[name]: class extends baseClass {","constructor (...args) {","super(...args)","_constructor && _constructor.apply(this, args)","}","}","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,i=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return(i.prototype=Object.create(e.prototype)).constructor=i}}}(),ne=ee("SVGArray",Array,function(){this.init.apply(this,arguments)});$(ne,{init:function(){this.length=0,this.push.apply(this,O(this.parse.apply(this,arguments)))},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,O(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(j).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var ie=ee("PointArray",ne);$(ie,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,i=[];e<n;e++)i.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new ie(i)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(j).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,i=t.length;n<i;n+=2)e.push([t[n],t[n+1]]);return e},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var i=this.length-1;0<=i;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this},size:function(t,e){var n,i=this.bbox();for(n=this.length-1;0<=n;n--)i.width&&(this[n][0]=(this[n][0]-i.x)*t/i.width+i.x),i.height&&(this[n][1]=(this[n][1]-i.y)*e/i.height+i.y);return this},bbox:function(){var e=-1/0,n=-1/0,i=1/0,r=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),i=Math.min(t[0],i),r=Math.min(t[1],r)}),{x:i,y:r,width:e-i,height:n-r}}});var re=ie;var se=Object.freeze({MorphArray:re,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),ue=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("line",t),e))}return r(e,Ot),a(e,[{key:"array",value:function(){return new ie([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:i}:new ie(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),e}();$(ue,se),at({Container:{line:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return ue.prototype.plot.apply(this.put(new ue),null!=e[0]?e:[0,0,0,0])}}}),et(ue);var oe=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("marker",t),e))}return r(e,At),a(e,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),e}();at({Container:{marker:function(t,e,n){return this.defs().marker(t,e,n)}},Defs:{marker:function(t,e,n){return this.put(new oe).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}},marker:{marker:function(t,e,n,i){var r=["marker"];return"all"!==t&&r.push(t),r=r.join("-"),t=e instanceof oe?e:this.defs().marker(e,n,i),this.attr(r,t)}}}),et(oe);var ae=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("mask",t),e))}return r(e,At),a(e,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),c(u(e.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Yt('svg [mask*="'+this.id()+'"]')}}]),e}();at({Container:{mask:function(){return this.defs().put(new ae)}},Element:{maskWith:function(t){var e=t instanceof ae?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),et(ae);for(var he=ee("PathArray",ne),le={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ce="mlhvqtcsaz".split(""),fe=0,de=ce.length;fe<de;++fe)le[ce[fe]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var i=0,r=t.length;i<r;++i)t[i]=t[i]+(i%2?e.y:e.x);return le[s](t,e,n)}}(ce[fe].toUpperCase());$(he,{toString:function(){return function(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e][0],null!=t[e][1]&&(i+=t[e][1],null!=t[e][2]&&(i+=" ",i+=t[e][2],null!=t[e][3]&&(i+=" ",i+=t[e][3],i+=" ",i+=t[e][4],null!=t[e][5]&&(i+=" ",i+=t[e][5],i+=" ",i+=t[e][6],null!=t[e][7]&&(i+=" ",i+=t[e][7])))));return i+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var i,r=this.length-1;0<=r;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]+=t,this[r][2]+=e):"H"===i?this[r][1]+=t:"V"===i?this[r][1]+=e:"C"===i||"S"===i||"Q"===i?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===i&&(this[r][5]+=t,this[r][6]+=e)):"A"===i&&(this[r][6]+=t,this[r][7]+=e);return this},size:function(t,e){var n,i,r=this.bbox();for(n=this.length-1;0<=n;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]=(this[n][1]-r.x)*t/r.width+r.x,this[n][2]=(this[n][2]-r.y)*e/r.height+r.y):"H"===i?this[n][1]=(this[n][1]-r.x)*t/r.width+r.x:"V"===i?this[n][1]=(this[n][1]-r.y)*e/r.height+r.y:"C"===i||"S"===i||"Q"===i?(this[n][1]=(this[n][1]-r.x)*t/r.width+r.x,this[n][2]=(this[n][2]-r.y)*e/r.height+r.y,this[n][3]=(this[n][3]-r.x)*t/r.width+r.x,this[n][4]=(this[n][4]-r.y)*e/r.height+r.y,"C"===i&&(this[n][5]=(this[n][5]-r.x)*t/r.width+r.x,this[n][6]=(this[n][6]-r.y)*e/r.height+r.y)):"A"===i&&(this[n][1]=this[n][1]*t/r.width,this[n][2]=this[n][2]*e/r.height,this[n][6]=(this[n][6]-r.x)*t/r.width+r.x,this[n][7]=(this[n][7]-r.y)*e/r.height+r.y);return this},equalCommands:function(t){var e,n,i;for(t=new he(t),i=this.length===t.length,e=0,n=this.length;i&&e<n;e++)i=this[e][0]===t[e][0];return i},morph:function(t){return t=new he(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,i,r,s=this,u=this.destination.value,o=[],a=new he;for(e=0,n=s.length;e<n;e++){for(o[e]=[s[e][0]],i=1,r=s[e].length;i<r;i++)o[e][i]=s[e][i]+(u[e][i]-s[e][i])*t;"A"===o[e][0]&&(o[e][4]=+(0!==o[e][4]),o[e][5]=+(0!==o[e][5]))}return a.value=o,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof he)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(T,N).replace(M," $& ").replace(C,"$1 -").trim().split(j):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var i=[],r=new $t,s=new $t,u=0,o=e.length;S.test(e[u])?(t=e[u],++u):"M"===t?t="L":"m"===t&&(t="l"),i.push(le[t].call(null,e.slice(u,u+=n[t.toUpperCase()]).map(parseFloat),r,s)),u<o;);return i},bbox:function(){return Ut().path.setAttribute("d",this.toString()),Ut.nodes.path.getBBox()}});var ye=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("path",t),e))}return r(e,Ot),a(e,[{key:"array",value:function(){return this._array||(this._array=new he(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new he(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=R(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return Yt('svg textpath [href*="'+this.id()+'"]')}}]),e}();ye.prototype.MorphArray=he,at({Container:{path:function(t){return this.put(new ye).plot(t||new he)}}}),et(ye);var ve=Object.freeze({array:function(){return this._array||(this._array=new ie(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ie(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=R(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),pe=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("polygon",t),e))}return r(e,Ot),e}();at({Container:{polygon:function(t){return this.put(new pe).plot(t||new ie)}}}),$(pe,se),$(pe,ve),et(pe);var me=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("polyline",t),e))}return r(e,Ot),e}();at({Container:{polyline:function(t){return this.put(new me).plot(t||new ie)}}}),$(me,se),$(me,ve),et(me);var ge=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("rect",t),e))}return r(e,Ot),a(e,[{key:"rx",value:function(t){return this.attr("rx",t)}},{key:"ry",value:function(t){return this.attr("ry",t)}}]),e}();at({Container:{rect:function(t,e){return this.put(new ge).size(t,e)}}}),et(ge);var we=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("symbol",t),e))}return r(e,At),e}();function ke(){}at({Container:{symbol:function(){return this.put(new we)}}}),et(we);var be={duration:400,ease:">",delay:0},xe={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},_e=Object.freeze({noop:ke,timeline:be,attrs:xe});var Oe=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Ae=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this,Q("text",t),n))).dom.leading=new mt(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",xe["font-family"]),e}return r(n,_t),a(n,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var i=0,r=e.length;i<r;++i)"textPath"!==e[i].nodeName?(i!==n&&3!==e[i].nodeType&&!0===tt(e[i]).dom.newLined&&(t+="\n"),t+=e[i].textContent):0===i&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,u=(t=t.split("\n")).length;s<u;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new mt(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,n=0,i=this.dom.leading*new mt(this.attr("font-size"));this.each(function(){this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?n+=i:(this.attr("dy",i+n),n=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new mt(t.leading||1.3),this}}]),n}();$(Ae,Oe),at({Container:{text:function(t){return this.put(new Ae).text(t)},plain:function(t){return this.put(new Ae).plain(t)}}}),et(Ae);var je=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("textPath",t),e))}return r(e,Ae),a(e,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),e}();at({Container:{textPath:function(t,e){return this.defs().path(e).text(t).addTo(this)}},Text:{path:function(t){var e=new je;return t instanceof ye||(t=this.doc().defs().path(t)),e.attr("href","#"+t,B),this.put(e)},textPath:function(){return this.find("textPath")}},Path:{text:function(t){if(t instanceof Ae){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Ae).path(this).text(t)}}}),je.prototype.MorphArray=he,et(je);var Ce=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("tspan",t),e))}return r(e,_t),a(e,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){var t=this.parent(Ae);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),e}();$(Ce,Oe),at({Tspan:{tspan:function(t){var e=new Ce;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)}}}),et(Ce);var Me=function(t){function e(t){return o(this,e),h(this,u(e).call(this,Q("use",t),e))}return r(e,Ot),a(e,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,B)}}]),e}();at({Container:{use:function(t,e){return this.put(new Me).element(t,e)}}}),et(Me);var Se=function(){function h(){o(this,h),this.init.apply(this,arguments)}return a(h,[{key:"init",value:function(t){var e=q([1,0,0,1,0,0]);t=t instanceof wt?t.matrixify():"string"==typeof t?q(t.split(j).map(parseFloat)):Array.isArray(t)?q(t):"object"===l(t)&&I(t)?t:"object"===l(t)?(new h).transform(t):6===arguments.length?q([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(I(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new $t(e.ox,e.oy).transform(this),i=n.x,r=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,r);if(isFinite(e.px)||isFinite(e.py)){var u=new $t(i,r).transform(s),o=e.px?e.px-u.x:0,a=e.py?e.py-u.y:0;s.translateO(o,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,i=t.scaleX||1,r=t.scaleY||1,s=t.shear||0,u=t.rotate||0,o=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(i,r).shearO(s).rotateO(u).translateO(o,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,i=this.b,r=this.c,s=this.d,u=this.e,o=this.f,a=n*s-i*r,h=0<a?1:-1,l=h*Math.sqrt(n*n+i*i),c=Math.atan2(h*i,h*n),f=180/Math.PI*c,d=Math.cos(c),y=Math.sin(c),v=(n*r+i*s)/a,p=r*l/(v*n-i)||s*l/(v*i+n);return{scaleX:l,scaleY:p,shear:v,rotate:f,translateX:u-t+t*d*l+e*(v*d*l-y*p),translateY:o-e+t*y*l+e*(v*y*l+d*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,i=this.d,r=this.e,s=this.f,u=t*i-e*n;if(!u)throw new Error("Cannot invert "+this);var o=i/u,a=-e/u,h=-n/u,l=t/u,c=-(o*r+h*s),f=-(a*r+l*s);return this.a=o,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,i){var r;return(r=this.clone()).scaleO.apply(r,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=n,n=e,e=t);var r=this.a,s=this.b,u=this.c,o=this.d,a=this.e,h=this.f;return this.a=r*t,this.b=s*e,this.c=u*t,this.d=o*e,this.e=a*t-n*t+n,this.f=h*e-i*e+i,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=bt(t);var i=Math.cos(t),r=Math.sin(t),s=this.a,u=this.b,o=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*i-u*r,this.b=u*i+s*r,this.c=o*i-a*r,this.d=a*i+o*r,this.e=h*i-l*r+n*r-e*i+e,this.f=l*i+h*r-e*r-n*i+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,i=this.b,r=this.c,s=this.d,u=this.e,o=this.f;return this.a=n+i*t,this.c=r+s*t,this.e=u+o*t-e*t,this}},{key:"skew",value:function(t,e,n,i){var r;return(r=this.clone()).skewO.apply(r,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=n,n=e,e=t),t=bt(t),e=bt(e);var r=Math.tan(t),s=Math.tan(e),u=this.a,o=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=u+o*r,this.b=o+u*s,this.c=a+h*r,this.d=h+a*s,this.e=l+c*r-i*r,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var i=t||0,r=e||0;return this.translateO(-i,-r).lmultiplyO(n).translateO(i,r)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"native",value:function(){for(var t=Ut().svg.node.createSVGMatrix(),e=L.length-1;0<=e;e--)t[L[e]]=this[L[e]];return t}},{key:"equals",value:function(t){var e=new h(t);return F(this.a,e.a)&&F(this.b,e.b)&&F(this.c,e.c)&&F(this.d,e.d)&&F(this.e,e.e)&&F(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,r=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,u=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,o=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,a=t.shear||0,h=t.rotate||t.theta||0,l=new $t(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,d=new $t(t.position||t.px||t.positionX,t.py||t.positionY),y=d.x,v=d.y,p=new $t(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new $t(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:u,scaleY:o,skewX:r,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:y,py:v}}},{key:"matrixMultiply",value:function(t,e,n){var i=t.a*e.a+t.c*e.b,r=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,u=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=i,n.b=r,n.c=s,n.d=u,n.e=o,n.f=a,n}}]),h}();at({Element:{ctm:function(){return new Se(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new Se(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Se(e)}}});var Te=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t,e,n){var i,r;(this.r=0,this.g=0,this.b=0,t)&&("string"==typeof t?k.test(t)?(i=p.exec(t.replace(g,"")),this.r=parseInt(i[1]),this.g=parseInt(i[2]),this.b=parseInt(i[3])):w.test(t)&&(i=v.exec(4===(r=t).length?["#",r.substring(1,2),r.substring(1,2),r.substring(2,3),r.substring(2,3),r.substring(3,4),r.substring(3,4)].join(""):r),this.r=parseInt(i[1],16),this.g=parseInt(i[2],16),this.b=parseInt(i[3],16)):Array.isArray(t)?(this.r=t[0],this.g=t[1],this.b=t[2]):"object"===l(t)?(this.r=t.r,this.g=t.g,this.b=t.b):3===arguments.length&&(this.r=t,this.g=e,this.b=n))}},{key:"toString",value:function(){return this.toHex()}},{key:"toArray",value:function(){return[this.r,this.g,this.b]}},{key:"toHex",value:function(){return"#"+z(Math.round(this.r))+z(Math.round(this.g))+z(Math.round(this.b))}},{key:"toRgb",value:function(){return"rgb("+[this.r,this.g,this.b].join()+")"}},{key:"brightness",value:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11}}],[{key:"test",value:function(t){return t+="",w.test(t)||k.test(t)}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return this.isRgb(t)||this.test(t)}}]),t}();function Ee(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}var Ne={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,i){return function(t){}}},Pe=function(){function t(){o(this,t)}return a(t,[{key:"done",value:function(){return!1}}]),t}(),De=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).ease=Ne[t||be.ease]||t,e}return r(n,Pe),a(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),ze=function(t){function n(t){var e;return o(this,n),(e=h(this,u(n).call(this))).stepper=t,e}return r(n,Pe),a(n,[{key:"step",value:function(t,e,n,i){return this.stepper(t,e,n,i)}},{key:"done",value:function(t){return t.done}}]),n}();function Re(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,i=Math.log(e/100+1e-10),r=-i/Math.sqrt(n*n+i*i),s=3.9/(r*t);this.d=2*r*s,this.k=s*s}var qe=function(t){function i(t,e){var n;return o(this,i),(n=h(this,u(i).call(this))).duration(t||500).overshoot(e||0),n}return r(i,ze),a(i,[{key:"step",value:function(t,e,n,i){if("string"==typeof t)return t;if(i.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var r=i.velocity||0,s=-this.d*r-this.k*(t-e),u=t+r*n+s*n*n/2;return i.velocity=r+s*n,i.done=Math.abs(e-u)+Math.abs(r)<.002,i.done?e:u}}]),i}();$(qe,{duration:Ee("_duration",Re),overshoot:Ee("_overshoot",Re)});var Le=function(t){function s(t,e,n,i){var r;return o(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,i=null==i?1e3:i,(r=h(this,u(s).call(this))).p(t).i(e).d(n).windup(i),r}return r(s,ze),a(s,[{key:"step",value:function(t,e,n,i){if("string"==typeof t)return t;if(i.done=n===1/0,n===1/0)return e;if(0===n)return t;var r=e-t,s=(i.integral||0)+r*n,u=(r-(i.error||0))/n,o=this.windup;return!1!==o&&(s=Math.max(-o,Math.min(s,o))),i.error=r,i.integral=s,i.done=Math.abs(r)<.001,i.done?e:t+(this.P*r+this.I*s+this.D*u)}}]),s}();$(Le,{windup:Ee("windup"),p:Ee("P"),i:Ee("I"),d:Ee("D")});var Fe=function(){function e(t){o(this,e),this._stepper=t||new De("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return a(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=l(t);"number"===e?this.type(mt):"string"===e?Te.isColor(t)?this.type(Te):j.test(t)?this.type(M.test(t)?he:ne):y.test(t)?this.type(mt):this.type(Ie):-1<He.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(ne):"object"===e?this.type(Ye):this.type(Ie)}var n=new this._type(t).toArray();return this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var i=this;return this._morphObj.fromArray(this._from.map(function(t,e){return i._stepper.step(t,i._to[e],n,i._context[e],i._context)}))}}]),e}(),Ie=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t){t=Array.isArray(t)?t[0]:t,this.value=t}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),Xe=function(){function e(){o(this,e),this.init.apply(this,arguments)}return a(e,[{key:"init",value:function(t){Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t)}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();Xe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Ye=function(){function t(){o(this,t),this.init.apply(this,arguments)}return a(t,[{key:"init",value:function(t){if(this.values=[],Array.isArray(t))this.values=t;else{var e=Object.entries(t||{}).sort(function(t,e){return t[0]-e[0]});this.values=e.reduce(function(t,e){return t.concat(e)},[])}}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,i=e.length;n<i;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),He=[Ie,Xe,Ye];var Be=window.performance||Date,Ge=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){function t(){o(this,t),this._timeSource=function(){return Be.now()},this._dispatcher=document.createElement("div"),this._startTime=0,this._speed=1,this._reverse=!1,this._persist=0,this._nextFrame=null,this._paused=!1,this._runners=[],this._order=[],this._time=0,this._lastSourceTime=0,this._lastStepTime=0}return a(t,[{key:"getEventTarget",value:function(){return this._dispatcher}},{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Ge).sort(function(t,e){return t.start-e.start||t.duration-e.duration});this.active()||(this._step(),null==n&&(n="now"));var i=0;if(e=e||0,null==n||"last"===n||"after"===n)i=this._startTime;else if("absolute"===n||"start"===n)i=e,e=0;else if("now"===n)i=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var r=this._runners[t.id];r&&(i=r.start+e,e=0)}return t.unschedule(),t.timeline(this),t.time(-e),this._startTime=i+t.duration()+e,this._runners[t.id]={persist:this.persist(),runner:t,start:i},this._order.push(t.id),this._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"play",value:function(){return this._paused=!1,this._continue()}},{key:"pause",value:function(){return this._nextFrame=null,this._paused=!0,this}},{key:"stop",value:function(){return this.seek(-this._time),this.pause()}},{key:"finish",value:function(){return this.seek(1/0),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this._time+=t,this._continue()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this)}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_step",value:function(){if(!this._paused){var t=this._timeSource(),e=t-this._lastSourceTime,n=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=t,this._time+=n,this._lastStepTime=this._time;for(var i=!1,r=0,s=this._order.length;r<s;r++){var u=this._runners[this._order[r]],o=u.runner,a=n,h=this._time-u.start;if(h<0)i=!0;else if(h<a&&(a=h),o.active())if(o.step(a).done){if(!0!==u.persist){o.duration()-o.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[r]],this._order.splice(r--,1)&&--s,o.timeline(null))}}else i=!0}return this._nextFrame=i?Et.frame(this._step.bind(this)):null,this}}},{key:"_continue",value:function(){return this._paused||this._nextFrame||(this._nextFrame=Et.frame(this._step.bind(this))),this}},{key:"active",value:function(){return!!this._nextFrame}}]),t}();at({Element:{timeline:function(){return this._timeline=this._timeline||new Ve,this._timeline}}});var Qe=function(){function s(t){o(this,s),this.id=s.id++,t="function"==typeof(t=null==t?be.duration:t)?new ze(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ze,this._stepper=this._isDeclarative?t:new De,this._history={},this.enabled=!0,this._time=0,this._last=0,this.transforms=new Se,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1}return a(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var i=s.sanitise(t,e,n),r=new s(i.duration);return this._timeline&&r.timeline(this._timeline),this._element&&r.element(this._element),r.loop(i).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof Ve||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===l(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n){return this._queue.push({initialiser:t||ke,runner:e||ke,isTransform:n,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finish",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),i=(this._time-n*e)/this._duration;return Math.min(n+i,this._times)}var r=t%1,s=e*Math.floor(t)+this._duration*r;return this.time(s)}},{key:"position",value:function(t){var e,n=this._time,r=this._duration,s=this._wait,i=this._times,u=this._swing,o=this._reverse;if(null==t){var a=function(t){var e=u*Math.floor(t%(2*(s+r))/(s+r)),n=e&&!o||!e&&o,i=Math.pow(-1,n)*(t%(s+r))/r+n;return Math.max(Math.min(i,1),0)},h=i*(s+r)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=u&&l%2==0;return e=l+(c&&!o||o&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var i=this.duration(),r=(this._lastTime<0&&this._time,this._lastTime<this._time&&this.time>i);this._lastTime=this._time;var s=this._isDeclarative;if(this.done=!s&&!r&&this._time>=i,n||s){this._initialise(n),this.transforms=new Se;var u=this._run(s?t:e)}return this.done=this.done||u&&s,this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new De(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.isTransform?this._history[t].caller.isTransform(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var i=this.timeline();return i&&i._continue(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var i=this._queue[e],r=this._isDeclarative||!i.initialised&&t;t=!i.finished,r&&t&&(i.initialiser.call(this),i.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,i=this._queue.length;n<i;++n){var r=this._queue[n],s=r.runner.call(this,t);r.finished=r.finished||!0===s,e=e&&r.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new Se,this}}],[{key:"sanitise",value:function(t,e,n){var i=1,r=!1,s=0;return e=e||be.delay,n=n||"last","object"!==l(t=t||be.duration)||t instanceof Pe||(e=t.delay||e,n=t.when||n,r=t.swing||r,i=t.times||i,s=t.wait||s,t=t.duration||be.duration),{duration:t,delay:e,swing:r,times:i,wait:s,when:n}}}]),s}();Qe.id=0;var Ue=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Se,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];o(this,t),this.transforms=e,this.id=n,this.done=i};$([Qe,Ue],{mergeWith:function(t){return new Ue(t.transforms.lmultiply(this.transforms),t.id)}});var $e=function(t,e){return t.lmultiplyO(e)},Je=function(t){return t.transforms};var We=function(){function t(){o(this,t),this.runners=[],this.ids=[]}return a(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),i=this.ids.indexOf(e)+1;return this.ids.splice(i,0,n),this.runners.splice(i,0,t),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,i=null;return this.runners.forEach(function(t,e){i&&t.done&&i.done&&(n.remove(t.id),n.edit(i.id,t.mergeWith(i))),i=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ue),this}}]),t}(),Ze=0;at({Element:{animate:function(t,e,n){var i=Qe.sanitise(t,e,n),r=this.timeline();return new Qe(i.duration).loop(i).element(this).timeline(r).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(Je).reduce($e,new Se)},addRunner:function(t){this._transformationRunners.add(t),Et.transform_frame(function(){var t=this._transformationRunners.runners.map(Je).reduce($e,new Se);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new We).add(new Ue(new Se(this))),this._frameId=Ze++)}}}),$(Qe,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===l(n))for(var i in t)this.styleAttr(e,i,t[i]);var r=new Fe(this._stepper).to(t);return this.queue(function(){r=r.from(this.element()[e](n))},function(t){return this.element()[e](n,r.at(t)),r.done()}),this},zoom:function(t,e){var n=new Fe(this._stepper).to(new mt(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(d,y,v){if(y=d.relative||y,this._isDeclarative&&!y&&this._tryRetarget("transform",d))return this;var p=I(d);v=null!=d.affine?d.affine:null!=v?v:!p;var m,g,w,k,b,x=(new Fe).type(v?Xe:Se).stepper(this._stepper);return this.queue(function(){g=g||this.element(),m=m||X(d,g),b=new Se(y?void 0:g),g.addRunner(this),y||g._clearTransformRunnersBefore(this)},function(t){y||this.clearTransform();var e=new $t(m).transform(g._currentTransform(this)),n=e.x,i=e.y,r=new Se(_({},d,{origin:[n,i]})),s=this._isDeclarative&&w?w:b;if(v){r=r.decompose(n,i),s=s.decompose(n,i);var u=r.rotate,o=s.rotate,a=[u-360,u,u+360],h=a.map(function(t){return Math.abs(t-o)}),l=Math.min.apply(Math,O(h)),c=h.indexOf(l);r.rotate=a[c]}y&&(p||(r.rotate=d.rotate||0),this._isDeclarative&&k&&(s.rotate=k)),x.from(s),x.to(r);var f=x.at(t);return k=f.rotate,w=new Se(f),this.addTransform(w),x.done()},function(t){(t.origin||"center").toString()!==(d.origin||"center").toString()&&(m=X(d,g)),d=_({},t,{origin:m})}),this._isDeclarative&&this._rememberMorpher("transform",x),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("dx",t)},dy:function(t){return this._queueNumberDelta("dy",t)},_queueNumberDelta:function(e,n){if(n=new mt(n),this._tryRetargetDelta(e,n))return this;var i=new Fe(this._stepper).to(n);return this.queue(function(){var t=this.element()[e]();i.from(t),i.to(t+n)},function(t){return this.element()[e](i.at(t)),i.done()}),this._rememberMorpher(e,i),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Fe(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new mt(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,i){return 4===arguments.length?this.plot([t,e,n,i]):this._queueObject("plot",new this._element.MorphArray(t))},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,i){return this._queueObject("viewbox",new Box(t,e,n,i))},update:function(t){return"object"!==l(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}});var Ke=Object.freeze({EventTarget:pt,Element:wt,Shape:Ot,Parent:_t,Container:At,HtmlNode:jt,Doc:Mt,Defs:Ct,G:St,Animator:Et,Bare:Nt,Circle:Xt,ClipPath:Ht,A:Bt,Ellipse:Gt,Stop:Vt,Gradient:Zt,Image:te,Line:ue,Marker:oe,Mask:ae,Path:ye,Pattern:Kt,Polygon:pe,Polyline:me,Rect:ge,Symbol:we,Text:Ae,TextPath:je,Tspan:Ce,Use:Me,SVGNumber:mt,SVGArray:ne,PathArray:he,PointArray:ie,Matrix:Se,Point:$t,Box:Jt,Color:Te,Morphable:Fe,Queue:Tt,Runner:Qe,Timeline:Ve,Controller:ze,Ease:De,PID:Le,Spring:qe});at("Element",{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;var i=!0,r=!1,s=void 0;try{for(var u,o=e[Symbol.iterator]();!(i=(u=o.next()).done);i=!0){var a=u.value;t[a.nodeName]=x.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return t}if(Array.isArray(t));else if("object"===l(t))for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xe[t]:x.test(e)?parseFloat(e):e;for("fill"!==t&&"stroke"!==t||A.test(e)&&(e=this.doc().defs().image(e));"function"==typeof e.attrHook;)e=e.attrHook(this,t);"number"==typeof e?e=new mt(e):Te.isColor(e)?e=new Te(e):e.constructor===Array&&(e=new ne(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this}}),at("Element",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),at("Element",{data:function(e,t,n){if("object"===l(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),at("Element",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var i=!0,r=!1,s=void 0;try{for(var u,o=t[Symbol.iterator]();!(i=(u=o.next()).done);i=!0){var a=P(u.value);n[a]=this.node.style[a]}}catch(t){r=!0,s=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw s}}return n}if("string"==typeof t)return this.node.style[P(t)];if("object"===l(t))for(name in t)this.node.style[P(name)]=null==t[name]||b.test(t[name])?"":t[name]}return 2===arguments.length&&(this.node.style[P(t)]=null==e||b.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),at("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(j).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(q(e[1])):t[e[0]].apply(t,e[1])},new Se)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new Se(this).decompose();return n[t]||n}I(t)||(t=_({},t,{origin:X(t,this)}));var i=new Se(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}}),at("Element",{remember:function(t,e){if("object"===l(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var tn={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||Te.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(n=tn[e].length-1;0<=n;n--)null!=t[tn[e][n]]&&this.attr(tn.prefix(e,tn[e][n]),t[tn[e][n]]);return this},at(["Element","Runner"],t)}),at(["Element","Runner"],{matrix:function(t,e,n,i,r,s){return null==t?new Se(this):this.attr("transform",new Se(t,e,n,i,r,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:i},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),i="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];this.transform({flip:n,origin:i},!0)},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new mt(t).plus(this instanceof Qe?0:this.x()),!0)},dy:function(t){return this.y(new mt(t).plus(this instanceof Qe?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),at("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new mt(t)):this.rx(t).ry(null==e?t:e)}}),at("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new $t(this.node.getPointAtLength(t))}}),at(["Parent","Runner"],{font:function(t,e){if("object"===l(t))for(e in t)this.font(e,t[e]);return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});var en=$;function nn(t){return K(t)}return en([Mt,we,te,Kt,oe],ht("viewbox")),en([ue,me,pe,ye],ht("marker")),en(Ae,ht("Text")),en(ye,ht("Path")),en(Ct,ht("Defs")),en([Ae,Ce],ht("Tspan")),en([ge,Gt,Xt,Zt],ht("radius")),en(pt,ht("EventTarget")),en(wt,ht("Element")),en(wt,ht("Parent")),en(At,ht("Container")),function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];He.push.apply(He,O([].concat(t)))}([mt,Te,Jt,Se,ne,ie,he]),$(He,{to:function(t,e){return(new Fe).type(this.constructor).from(this.valueOf()).to(t,e)},fromArray:function(t){return this.init(t),this}}),Object.assign(nn,Ke),Object.assign(nn,J),Object.assign(nn,ut),nn.utils=xt,nn.regex=e,(nn.get=nn).find=Yt,Object.assign(nn,V),nn.easing=Ne,Object.assign(nn,vt),nn.TransformBag=Xe,nn.ObjectBag=Ye,nn.NonMorphable=Ie,nn.parser=Ut,nn.defaults=_e,nn}();
index 2aa6d075c1e90d8573e7a328d4cffbae6855fefd..8701a8ade440ffe1d87960e97efe28f2dca68c10 100644 (file)
@@ -78,6 +78,7 @@
   <script src="spec/marker.js"></script>
   <script src="spec/mask.js"></script>
   <script src="spec/matrix.js"></script>
+  <script src="spec/memory.js"></script>
   <script src="spec/number.js"></script>
   <script src="spec/path.js"></script>
   <script src="spec/pattern.js"></script>
index b05bd92e5cf3081eb98d68baecb3fe154b731a9c..8529bf9c7fe103265de6ed9fe3258237240b5c43 100644 (file)
@@ -4,7 +4,7 @@ import {numbersWithDots, pathLetters, hyphen, delimiter, isPathLetter} from './r
 import Point from './Point.js'
 import SVGArray from './SVGArray.js'
 import {subClassArray} from './ArrayPolyfill.js'
-import {extend2} from './tools.js'
+import {extend} from './tools.js'
 
 const PathArray = subClassArray('PathArray', SVGArray)
 
@@ -84,7 +84,7 @@ for (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {
 }
 
 
-extend2(PathArray, {
+extend(PathArray, {
   // Convert array to string
   toString () {
     return arrayToString(this)
index a291054e18e30d5968281719589448f6fea6561f..1bf54609334b9223be7142ef4c5f3ba84ed556d5 100644 (file)
@@ -1,13 +1,13 @@
 import SVGArray from './SVGArray.js'
 import {delimiter} from './regex.js'
 import {subClassArray} from './ArrayPolyfill.js'
-import {extend2} from './tools.js'
+import {extend} from './tools.js'
 
 const PointArray = subClassArray('PointArray', SVGArray)
 
 export default PointArray
 
-extend2(PointArray, {
+extend(PointArray, {
   // Convert array to string
   toString () {
     // convert to a poly point string
index 592794547c28de16f81852c5081b9e85194e2afa..a442aada992792dc5d9afc68bfe7adf63a8b53f6 100644 (file)
@@ -1,7 +1,7 @@
 /* global arrayClone */
 import {delimiter} from './regex.js'
 import {subClassArray} from './ArrayPolyfill.js'
-import {extend2} from './tools.js'
+import {extend} from './tools.js'
 
 const SVGArray = subClassArray('SVGArray', Array, function (...args) {
   this.init(...args)
@@ -9,7 +9,7 @@ const SVGArray = subClassArray('SVGArray', Array, function (...args) {
 
 export default SVGArray
 
-extend2(SVGArray, {
+extend(SVGArray, {
   init (...args) {
     //this.splice(0, this.length)
     this.length = 0
index 98508818817939a872dae058231f5732d68aecd4..77d3518a99ad31fe684fad24576c147dfd19c11e 100644 (file)
@@ -1,11 +1,11 @@
 import {registerMethods} from './methods.js'
 import {registerConstructor} from './methods.js'
 
-export const name = 'Memory'
-
-export function setup (node) {
-  this._memory = {}
-}
+// export const name = 'Memory'
+//
+// export function setup (node) {
+//   this._memory = {}
+// }
 
 // Remember arbitrary data
 export function remember (k, v) {
@@ -39,8 +39,8 @@ export function forget () {
 
   // return local memory object
 export function memory () {
-  return this._memory
+  return (this._memory = this._memory || {})
 }
 
 registerMethods('Element', {remember, forget, memory})
-registerConstructor('Memory', setup)
+//registerConstructor('Memory', setup)
index 1d72d64660ae4d3ba929ab86aeccb9e63ddc992a..4206060a799fd55ad177091ffa244ce569e22d6c 100644 (file)
@@ -61,7 +61,7 @@ extend([
 extend(Classes.EventTarget, getMethodsFor('EventTarget'))
 extend(Classes.Element, getMethodsFor('Element'))
 extend(Classes.Element, getMethodsFor('Parent'))
-extend(Classes.Element, getConstructor('Memory'))
+//extend(Classes.Element, getConstructor('Memory'))
 extend(Classes.Container, getMethodsFor('Container'))
 
 registerMorphableType([
index d33566abf45cf5f9276551b6ed2e04bcedf83047..898f01625a799d92f1f710247c1c3c36a9d9c96b 100644 (file)
@@ -24,18 +24,6 @@ export function extend (modules, methods) {
   }
 }
 
-export function extend2 (modules, methods) {
-  var key, i
-
-  modules = Array.isArray(modules) ? modules : [modules]
-
-  for (i = modules.length - 1; i >= 0; i--) {
-    for (key in methods) {
-      modules[i].prototype[key] = methods[key]
-    }
-  }
-}
-
 // FIXME: enhanced constructors here
 export function addFactory (modules, methods) {
   extend(modules, methods)