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}functionc(e){vart=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();returnfunction(){varr,n=o(e);if(t){vari=o(this).constructor;r=Reflect.construct(n,arguments,i)}elser=n.apply(this,arguments);returnl(this,r)}}functionh(e,t,r){return(h="undefined"!=typeofReflect&&Reflect.get?Reflect.get:function(e,t,r){varn=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););returne}(e,t);if(n){vari=Object.getOwnPropertyDescriptor(n,t);returni.get?i.get.call(r):i.value}})(e,t,r||e)}functiond(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){if("undefined"==typeofSymbol||!(Symbol.iteratorinObject(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)||f(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionm(e){returnfunction(e){if(Array.isArray(e))returng(e)}(e)||function(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}(e)||f(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionf(e,t){if(e){if("string"==typeofe)returng(e,t);varr=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void0}}functiong(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,n=newArray(t);r<t;r++)n[r]=e[r];returnn}functionp(e,t){varr;if("undefined"==typeofSymbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeofe.length){r&&(e=r);varn=0,i=function(){};return{s:i,n:function(){returnn>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throwe},f:i}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}vara,s=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){vare=r.next();returns=e.do
varv,x={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/"},S=function(){vare={};returnObject.entries(x).forEach((function(t){varr=d(t,2),n=r[0],i=r[1];e[i]=n.toLowerCase()})),e},_=jQuery,b=(Boolean(document.createElementNS&&document.createElementNS(x.SVG,"svg").createSVGRect),navigator.userAgent),w=document.createElementNS(x.SVG,"svg"),A=Boolean(window.opera),k=b.includes("AppleWebKit"),C=b.includes("Gecko/"),E=b.includes("MSIE"),G=b.includes("Chrome/"),I=(b.includes("Windows"),b.includes("Macintosh"),"ontouchstart"inwindow),N=Boolean(w.querySelector),P=Boolean(document.evaluate),T=function(){vare=document.createElementNS(x.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}(),L=function(){vare=document.createElementNS(x.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}(),V=function(){vare=document.createElementNS(x.SVG,"svg"),t=document.createElementNS(x.SVG,"svg");document.documentElement.append(e),t.setAttribute("x",5),e.append(t);varr=document.createElementNS(x.SVG,"text");r.textContent="a",t.append(r);try{return0===r.getStartPositionOfChar(0).x}catch(e){return!1}finally{e.remove()}}(),O=function(){vare=document.createElementNS(x.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(x.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}(),M=function(){vare=document.createElementNS(x.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(x.SVG,"path");t.setAttribute("d","M0,0 10,0");varr=document.createElementNS(x.SVG,"path");r.setAttribute("d","M5,0 15,0");varn=document.createElementNS(x.SVG,"g");n.append(t,r),e.append(n);vari=n.getBBox();returne.remove(),15===i.width}(),R=(function(){vare=document.createElementNS(x.SVG,"rect");e.setAttribute("x",.1);vart=!e.cloneNode(!1).getAttribute("x").includes(",");t||_.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.')}(),(v=document.createElementNS(x.SVG,"rect")).setAttribute("style","vector-effect:non-scaling-stroke"),"non-scaling-stroke"===v.style.vectorEffect),B=function(){vart=document.createElementNS(x.SVG,"rect").transform.baseVal,r=w.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}(),U=function(){returnk},j=function(){returnC},H=function(){returnE},F=function(){returnG},D=function(){returnR},z=document.createElementNS(x.SVG,"svg");functionq(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}varQ={},W=function(){functione(t){n(this,e),this._elem=t||null,this._xforms=[],this._update=function(){for(vare="",t=0;t<this.numberOfItems;++t){e+=q(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*\(/),r=t[0],i=t[1].match(/\s*(.*?)\s*\)/);i[1]=i[1].