jQuery;varii=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:"eyedropper",init:functioninit(t){vare=this;return_asyncToGenerator(regeneratorRuntime.mark((function_callee(){varr,n,o,i,a,c,u,s,f;returnregeneratorRuntime.wrap((function_callee$(l){for(;;)switch(l.prev=l.next){case0:returns=function_getStyle(t){if("eyedropper"!==a.getMode()){vare=o("#tool_eyedropper"),r=null;t.multiselected||!t.elems[0]||["svg","g","use"].includes(t.elems[0].nodeName)?e.addClass("disabled"):(r=t.elems[0],e.removeClass("disabled"),u.fillPaint=r.getAttribute("fill")||"black",u.fillOpacity=r.getAttribute("fill-opacity")||1,u.strokePaint=r.getAttribute("stroke"),u.strokeOpacity=r.getAttribute("stroke-opacity")||1,u.strokeWidth=r.getAttribute("stroke-width"),u.strokeDashArray=r.getAttribute("stroke-dasharray"),u.strokeLinecap=r.getAttribute("stroke-linecap"),u.strokeLinejoin=r.getAttribute("stroke-linejoin"),u.opacity=r.getAttribute("opacity")||1)}},r=e,l.next=4,ii("eyedropper",r.curPrefs.lang);case4:returnn=l.sent,o=t.$,i=t.ChangeElementCommand,a=r.canvas,c=functionaddToHistory(t){a.undoMgr.addCommandToHistory(t)},u={fillPaint:"red",fillOpacity:1,strokePaint:"black",strokeOpacity:1,strokeWidth:5,strokeDashArray:null,opacity:1,strokeLinecap:"butt",strokeLinejoin:"miter"},f=[{id:"tool_eyedropper",icon:"eyedropper.png",type:"mode",events:{click:functionclick(){a.setMode("eyedropper")}}}],l.abrupt("return",{name:n.name,svgicons:"eyedropper-icon.xml",buttons:n.buttons.map((function(t,e){returnObject.assign(f[e],t)})),selectedChanged:s,elementChanged:s,mouseDown:functionmouseDown(t){if("eyedropper"===a.getMode()){vare=t.event.target;if(!["svg","g","use"].includes(e.nodeName)){varr={},n=functionchange(t,e,n){r[e]=t.getAttribute(e),t.setAttribute(e,n)};u.fillPaint&&n(e,"fill",u.fillPaint),u.fillOpacity&&n(e,"fill-opacity",u.fillOpacity),u.strokePaint&&n(e,"stroke",u.strokePaint),u.strokeOpacity&&n(e,"stroke-opacity",u.strokeOpacity),u.strokeWidth&&n(e,"stroke-width",u.strokeWidth),u.strokeDashArray&&n(e,"stroke-dasharray",u.strokeDashArray),u.opacity&&n(e,"opacity",u.opacity),u.strokeLinecap&&n(e,"stroke-linecap",u.strokeLinecap),u.strokeLinejoin&&n(e,"stroke-linejoin",u.strokeLinejoin),c(newi(e,r))}}}});case8:case"end":returnl.stop()}}),_callee)})))()}})}}}));