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=document.createEvent("MouseEvent");r.initMouseEvent(a,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.length<2&&(n.target.dispatchEvent(r),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},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}}(),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(vars,o=e[Symbol.iterator]();!(a=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{!a&&o.return&&o.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_CUBIC_SMOOTH_REL=17,e.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,e.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19;vart=function(t){functionn(t){returnclassCallCheck(this,n),possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.PATHSEG_CLOSEPATH,"z",t))}returninherits(n,e),createClass(n,[{key:"toString",value:function(){return"[object SVGPathSegClosePath]"}},{key:"_asPathString",value:function(){returnthis.pathSegTypeAsLetter}},{key:"clone",value:function(){returnnewn(void0)}}]),n}(),n=function(t){functionn(t,a,r){classCallCheck(this,n);