functiontouchHandler(e){vart=e.changedTouches,n=t[0],a="";switch(e.type){case"touchstart":a="mousedown";break;case"touchmove":a="mousemove";break;case"touchend":a="mouseup";break;default:return}varr=n.screenX,i=n.screenY,o=n.clientX,s=n.clientY,l=newMouseEvent(a,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:r,screenY:i,clientX:o,clientY:s,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});t.length<2&&(n.target.dispatchEvent(l),e.preventDefault())}document.addEventListener("touchstart",touchHandler,!0),document.addEventListener("touchmove",touchHandler,!0),document.addEventListener("touchend",touchHandler,!0),document.addEventListener("touchcancel",touchHandler,!0);var_typeof="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},asyncToGenerator=function(e){returnfunction(){vart=e.apply(this,arguments);returnnewPromise(function(e,n){returnfunctiona(r,i){try{varo=t[r](i),s=o.value}catch(e){returnvoidn(e)}if(!o.done)returnPromise.resolve(s).then(function(e){a("next",e)},function(e){a("throw",e)});e(s)}("next")})}},classCallCheck=function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")},createClass=function(){functione(e,t){for(varn=0;n<t.length;n++){vara=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}returnfunction(t,n,a){returnn&&e(t.prototype,n),a&&e(t,a),t}}(),_extends=Object.assign||function(e){for(vart=1;t<arguments.length;t++){varn=arguments[t];for(varainn)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}returne},inherits=function(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn=function(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t},slicedToArray=function(){returnfunction(e,t){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnfunction(e,t){varn=[],a=!0,r=!1,i=void0;try{for(varo,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(r)throwi}}returnn}(e,t);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(e){if(Array.isArray(e)){for(vart=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];returnn}returnArray.from(e)},NS={HTML:"http://www.w3.org/1999/xhtml",MATH:"http://www.w3.org/1998/Math/MathML",SE:"http://svg-edit.googlecode.com",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"},getReverseNS=function(){vare={};returnObject.entries(NS).forEach(function(t){varn=slicedToArray(t,2),a=n[0],r=n[1];e[r]=a.toLowerCase()}),e};!function(){if(!("SVGPathSeg"inwindow)){vare=function(){functione(t,n,a){classCallCheck(this,e),this.pathSegType=t,this.pathSegTypeAsLetter=n,this._owningPathSegList=a}returncreateClass(e,[{key:"_segmentChanged",value:function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)}}]),e}();e.prototype.classname="SVGPathSeg",e.PATHSEG_UNKNOWN=0,e.PATHSEG_CLOSEPATH=1,e.PATHSEG_MOVETO_ABS=2,e.PATHSEG_MOVETO_REL=3,e.PATHSEG_LINETO_ABS=4,e.PATHSEG_LINETO_REL=5,e.PATHSEG_CURVETO_CUBIC_ABS=6,e.PATHSEG_CURVETO_CUBIC_REL=7,e.PATHSEG_CURVETO_QUADRATIC_ABS=8,e.PATHSEG_CURVETO_QUADRATIC_REL=9,e.PATHSEG_ARC_ABS=10,e.PATHSEG_ARC_REL=11,e.PATHSEG_LINETO_HORIZONTAL_ABS=12,e.PATHSEG_LINETO_HORIZONTAL_REL=13,e.PATHSEG_LINETO_VERTICAL_ABS=14,e.PATHSEG_LINETO_VERTICAL_REL=15,e.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,e.PATHSEG_CURVETO_CUB