(()=>{"use strict";({136:function(){var e=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))((function(c,o){function r(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var n;e.done?c(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,a)}u((i=i.apply(e,n||[])).next())}))};chrome.runtime.onInstalled.addListener((function(){chrome.contextMenus.create({title:"Magic copy",id:"copy",contexts:["image"]})})),chrome.contextMenus.onClicked.addListener((function(n,t){return e(this,void 0,void 0,(function*(){if(!(null==t?void 0:t.id)||!n.srcUrl||"copy"!==n.menuItemId)return;const e=yield fetch(n.srcUrl),i=yield e.blob();chrome.tabs.sendMessage(t.id,{action:"open",image:{data:Array.from(new Uint8Array(yield i.arrayBuffer())),type:i.type}})}))}))}})[136]()})();