varSvgCanvas=function(){"use strict";functione(t){return(e="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(t)}functiont(e,t,r,n,i,a,s){try{varo=e[a](s),u=o.value}catch(e){returnvoidr(e)}o.done?t(u):Promise.resolve(u).then(n,i)}functionr(e){returnfunction(){varr=this,n=arguments;returnnewPromise((function(i,a){vars=e.apply(r,n);functiono(e){t(s,i,a,o,u,"next",e)}functionu(e){t(s,i,a,o,u,"throw",e)}o(void0)}))}}functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functioni(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}functiona(e,t,r){returnt&&i(e.prototype,t),r&&i(e,r),e}functions(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}functiono(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}functionu(e,t){return(u=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionl(e,t){return!t||"object"!=typeoft&&"function"!=typeoft?function(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}(e):t}functionh(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){if(!(Symbol.iteratorinObject(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;varr=[],n=!0,i=!1,a=void0;try{for(vars,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(i)throwa}}returnr}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance")}()}functionc(e){returnfunction(e){if(Array.isArray(e)){for(vart=0,r=newArray(e.length);t<e.length;t++)r[t]=e[t];returnr}}(e)||function(e){if(Symbol.iteratorinObject(e)||"[object Arguments]"===Object.prototype.toString.call(e))returnArray.from(e)}(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance")}()}
varm,f={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/"},g=function(){vare={};returnObject.entries(f).forEach((function(t){varr=h(t,2),n=r[0],i=r[1];e[i]=n.toLowerCase()})),e},p=jQuery,y=(Boolean(document.createElementNS&&document.createElementNS(f.SVG,"svg").createSVGRect),navigator.userAgent),v=document.createElementNS(f.SVG,"svg"),x=Boolean(window.opera),_=y.includes("AppleWebKit"),S=y.includes("Gecko/"),b=y.includes("MSIE"),w=y.includes("Chrome/"),A=(y.includes("Windows"),y.includes("Macintosh"),"ontouchstart"inwindow),k=Boolean(v.querySelector),C=Boolean(document.evaluate),E=function(){vare=document.createElementNS(f.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.replaceItem(r,1),!0}catch(e){}return!1}(),P=function(){vare=document.createElementNS(f.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.insertItemBefore(r,1),!0}catch(e){}return!1}(),G=function(){vare=document.createElementNS(f.SVG,"svg"),t=document.createElementNS(f.SVG,"svg");document.documentElement.append(e),t.setAttribute("x",5),e.append(t);varr=document.createElementNS(f.SVG,"text");r.textContent="a",t.append(r);try{return0===r.getStartPositionOfChar(0).x}catch(e){return!1}finally{e.remove()}}(),N=function(){vare=document.createElementNS(f.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(f.SVG,"path");t.setAttribute("d","M0,0 C0,0 10,10 10,0"),e.append(t);varr=t.getBBox();returne.remove(),r.height>4&&r.height<5}(),I=function(){vare=document.createElementNS(f.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(f.SVG,"path");t.setAttribute("d","M0,0 10,0");varr=document.createElementNS(f.SVG,"path");r.setAttribute("d","M5,0 15,0");varn=document.createElementNS(f.SVG,"g");n.append(t,r),e.append(n);vari=n.getBBox();returne.remove(),15===i.width}(),T=(function(){vare=document.createElementNS(f.SVG,"rect");e.setAttribute("x",.1);vart=!e.cloneNode(!1).getAttribute("x").includes(",");t||p.alert('NOTE: This version of Opera is known to contain bugs in SVG-edit.\nPlease upgrade to the <a href="http://opera.com">latest version</a> in which the problems have been fixed.')}(),(m=document.createElementNS(f.SVG,"rect")).setAttribute("style","vector-effect:non-scaling-stroke"),"non-scaling-stroke"===m.style.vectorEffect),L=function(){vart=document.createElementNS(f.SVG,"rect").transform.baseVal,r=v.createSVGTransform();t.appendItem(r);varn=t.getItem(0),i=function(t){returnt&&"object"===e(t)&&"function"==typeoft.setMatrix&&"angle"int};returni(n)&&i(r)&&n.type===r.type&&n.angle===r.angle&&n.matrix.a===r.matrix.a&&n.matrix.b===r.matrix.b&&n.matrix.c===r.matrix.c&&n.matrix.d===r.matrix.d&&n.matrix.e===r.matrix.e&&n.matrix.f===r.matrix.f}(),V=function(){returnx},O=function(){return_},M=function(){returnS},R=function(){returnb},B=function(){returnw},U=function(){returnI},H=function(){returnT},j=document.createElementNS(f.SVG,"svg");functionF(e){vart=e.matrix,r="";switch(e.type){case1:r="matrix("+[t.a,t.b,t.c,t.d,t.e,t.f].join(",")+")";break;case2:r="translate("+t.e+","+t.f+")";break;case3:r=t.a===t.d?"scale("+t.a+")":"scale("+t.a+","+t.d+")";break;case4:varn=0,i=0;if(0!==e.angle){vara=1-t.a;i=(a*t.f+t.b*t.e)/(a*a+t.b*t.b),n=(t.e-t.b*i)/a}r="rotate("+e.angle+" "+n+","+i+")"}returnr}varD,z={},q=function(){functione(t){n(this,e),this._elem=t||null,this._xforms=[],this._update=function(){for(vare="",t=0;t<this.numberOfItems;++t){e+=F(this._list.getItem(t))+" "}this._elem.setAttribute("transform",e)},this._list=this,this._init=function(){vare=this,t=this._elem.getAttribute("transform");if(t)for(varr=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,n=!0;n;)n=t.match(r),t=t.replace(r,""),n&&n[1]&&function(){vart=n[1].split(/\s*\(/)