jQuery;varmi=function(){vart=_asyncToGenerator(regeneratorRuntime.mark((function_callee2(t,r){varn;returnregeneratorRuntime.wrap((function_callee2$(o){for(;;)switch(o.prev=o.next){case0:returno.prev=0,o.next=3,e.import("./extensions/ext-".concat(t,"/locale/").concat(r,".js"));case3:n=o.sent,o.next=12;break;case6:returno.prev=6,o.t0=o.catch(0),console.error("Missing translation (".concat(r,") for extension ").concat(t," - using 'en'")),o.next=11,e.import("./extensions/ext-".concat(t,"/locale/en.js"));case11:n=o.sent;case12:returno.abrupt("return",n.default);case13:case"end":returno.stop()}}),_callee2,null,[[0,6]])})));returnfunctionloadExtensionTranslation(e,r){returnt.apply(this,arguments)}}();t("default",{name:"markers",init:functioninit(t){vare=this;return_asyncToGenerator(regeneratorRuntime.mark((function_callee3(){varr,n,o,i,a,c,u,s,l,f,p,h,d,v,y,g,m,b,x,w,S,E,_,k,O,A;returnregeneratorRuntime.wrap((function_callee3$(j){for(;;)switch(j.prev=j.next){case0:returnO=function_buildButtonList(){vart=[];returno.each(c,(function(e,r){varn=r+"_marker_list",o=!0;Object.keys(l).forEach((function(e){vari=k(String(e));t.push({id:s+r+"_"+e,svgicon:e,icon:"markers-"+e+".png",title:i,type:"context",events:{click:E},panel:"marker_panel",list:n,isDefault:o}),o=!1}))})),t},k=function_getTitle(t){vare=n.langList.find((function(e){returne.id===t}));returne?e.title:t},_=function_setArrowFromButton3(){return(_=_asyncToGenerator(regeneratorRuntime.mark((function_callee2(t){vare,r,n;returnregeneratorRuntime.wrap((function_callee2$(t){for(;;)switch(t.prev=t.next){case0:if(e=this.id.split("_"),r=e[1],n=e[2],e[3]&&(n+="_"+e[3]),"textmarker"===n){t.next=8;break}x(r,"\\"+n),t.next=10;break;case8:returnt.next=10,w(r);case10:case"end":returnt.stop()}}),_callee2,this)})))).apply(this,arguments)},E=function_setArrowFromButton2(t){return_.apply(this,arguments)},S=function_showTextPrompt3(){return(S=_asyncToGenerator(regeneratorRuntime.mark((function_callee(t){vare,r;returnregeneratorRuntime.wrap((function_callee$(n){for(;;)switch(n.prev=n.next){case0:return"\\"===(e=o("#"+t+"_marker").val()).substr(0,1)&&(e=""),n.next=4,o.prompt("Enter text for "+t+" marker",e);case4:(r=n.sent)&&x(t,r);case6:case"end":returnn.stop()}}),_callee)})))).apply(this,arguments)},w=function_showTextPrompt2(t){returnS.apply(this,arguments)},x=function_triggerTextEntry(t,e){o("#"+t+"_marker").val(e),o("#"+t+"_marker").change()},b=function_updateReferences(t){o.each(c,(function(e,r){varn=u+r+"_"+t.id,a="marker-"+r,c=f(t,a);if(c&&c.attributes.se_type){vars=t.getAttribute(a);if(s){varl=t.id.length,p=s.substr(-l-1,l);if(t.id!==p){vard=o("#"+r+"_marker").attr("value");v(n,d),i.changeSelectedAttribute(a,"url(#"+n+")"),"line"===t.tagName&&"mid"===r&&(t=y(t)),i.call("changed",h)}}}}))},m=function_colorChanged(t){vare=t.getAttribute("stroke");o.each(c,(function(r,n){varo=f(t,"marker-"+n);if(o&&o.attributes.se_type){vari=o.lastElementChild;if(i){vara=i.getAttribute("fill"),c=i.getAttribute("stroke");a&&"none"!==a&&i.setAttribute("fill",e),c&&"none"!==c&&i.setAttribute("stroke",e)}}}))},g=function_setMarker(){vart={start_marker:"start",mid_marker:"mid",end_marker:"end"}[this.id],e="marker-"+t,r=h[0],n=f(r,e);n&&o(n).remove(),r.removeAttribute(e);vara=this.value;if(""===a&&(a="\\nomarker"),"\\nomarker"===a)returnp(t,a),voidi.call("changed",h);varc=u+t+"_"+r.id;v(c,a),i.changeSelectedAttribute(e,"url(#"+c+")"),"line"===r.tagName&&"mid"===t&&y(r),i.call("changed",h),p(t,a)},y=function_convertline(e){if("line"!==e.tagName)returne;varr=Number(e.getAttribute("x1")),n=Number(e.getAttribute("x2")),u=Number(e.getAttribute("y1")),s=Number(e.getAttribute("y2")),l=e.id,f=a({element:"polyline",attr:{points:r+","+u+(" "+(r+n)/2+","+(u+s)/2+" ")+n+","+s,stroke:e.getAttribute("stroke"),"stroke-width":e.getAttribute("stroke-width"),fill:"none",opacity:e.getAttribute("opacity")||1}});o.each(c,(function(t,r){varn="marker-"+r;e.getAttribute(n)&&f.setAttribute(n,e.getAttribute(n))}));varp=newt.BatchCommand;returnp.addSubComman