From b70c4217da284f0cc0c80b8de8305be024215fe4 Mon Sep 17 00:00:00 2001 From: zh99998 Date: Fri, 4 Nov 2016 21:32:26 +0800 Subject: [PATCH] try fix #31 --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5b5f7f6..936873b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("bluebird"),require("fs"),require("child_process"),require("crypto"),require("os"),require("path"),require("regenerator-runtime")):"function"==typeof define&&define.amd?define(["bluebird","fs","child_process","crypto","os","path","regenerator-runtime"],e):"object"==typeof exports?exports["electron-sudo"]=e(require("bluebird"),require("fs"),require("child_process"),require("crypto"),require("os"),require("path"),require("regenerator-runtime")):t["electron-sudo"]=e(t.bluebird,t.fs,t.child_process,t.crypto,t.os,t.path,t["regenerator-runtime"])}(this,function(t,e,n,r,u,o,i){return function(t){function e(r){if(n[r])return n[r].exports;var u=n[r]={exports:{},id:r,loaded:!1};return t[r].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var n={};return e.m=t,e.c=n,e.p="./dist",e(0)}([function(t,e,n){t.exports=n(61)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(31)("wks"),u=n(22),o=n(3).Symbol,i="function"==typeof o,a=t.exports=function(t){return r[t]||(r[t]=i&&o[t]||(i?o:u)("Symbol."+t))};a.store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(3),u=n(1),o=n(11),i=n(9),a="prototype",c=function(t,e,n){var s,f,p,l=t&c.F,d=t&c.G,v=t&c.S,h=t&c.P,y=t&c.B,b=t&c.W,x=d?u:u[e]||(u[e]={}),w=x[a],m=d?r:v?r[e]:(r[e]||{})[a];d&&(n=e);for(s in n)f=!l&&m&&void 0!==m[s],f&&s in x||(p=f?m[s]:n[s],x[s]=d&&"function"!=typeof m[s]?n[s]:y&&f?o(p,r):b&&m[s]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(p):h&&"function"==typeof p?o(Function.call,p):p,h&&((x.virtual||(x.virtual={}))[s]=p,t&c.R&&w&&!w[s]&&i(w,s,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(6),u=n(44),o=n(34),i=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),u)try{return i(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(5),u=n(17);t.exports=n(7)?function(t,e,n){return r.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(45),u=n(25);t.exports=function(t){return r(u(t))}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,u){return t.call(e,n,r,u)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r=n(53),u=n(27);t.exports=Object.keys||function(t){return r(t,u)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(5).f,u=n(8),o=n(2)("toStringTag");t.exports=function(t,e,n){t&&!u(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(25);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=n(70),o=r(u),i=n(69),a=r(i),c="function"==typeof a["default"]&&"symbol"==typeof o["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":typeof t};e["default"]="function"==typeof a["default"]&&"symbol"===c(o["default"])?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":"undefined"==typeof t?"undefined":c(t)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(13),u=n(3).document,o=r(u)&&r(u.createElement);t.exports=function(t){return o?u.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(6),u=n(99),o=n(27),i=n(30)("IE_PROTO"),a=function(){},c="prototype",s=function(){var t,e=n(26)("iframe"),r=o.length,u="<",i=">";for(e.style.display="none",n(43).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(u+"script"+i+"document.F=Object"+u+"/script"+i),t.close(),s=t.F;r--;)delete s[c][o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[c]=r(t),n=new a,a[c]=null,n[i]=t):n=s(),void 0===e?n:u(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(31)("keys"),u=n(22);t.exports=function(t){return r[t]||(r[t]=u(t))}},function(t,e,n){var r=n(3),u="__core-js_shared__",o=r[u]||(r[u]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(32),u=Math.min;t.exports=function(t){return t>0?u(r(t),9007199254740991):0}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,u;if(e&&"function"==typeof(n=t.toString)&&!r(u=n.call(t)))return u;if("function"==typeof(n=t.valueOf)&&!r(u=n.call(t)))return u;if(!e&&"function"==typeof(n=t.toString)&&!r(u=n.call(t)))return u;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),u=n(1),o=n(18),i=n(36),a=n(5).f;t.exports=function(t){var e=u.Symbol||(u.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:i.f(t)})}},function(t,e,n){e.f=n(2)},function(t,e,n){"use strict";var r=n(106)(!0);n(48)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){t.exports={"default":n(77),__esModule:!0}},function(t,e,n){t.exports={"default":n(82),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=n(64),o=r(u);e["default"]=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ec;)r(a,n=e[c++])&&(~o(s,n)||s.push(n));return s}},function(t,e,n){t.exports=n(9)},function(t,e,n){var r,u,o,i=n(11),a=n(91),c=n(43),s=n(26),f=n(3),p=f.process,l=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=0,y={},b="onreadystatechange",x=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},w=function(t){x.call(t.data)};l&&d||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++h]=function(){a("function"==typeof t?t:Function(t),e)},r(h),h},d=function(t){delete y[t]},"process"==n(14)(p)?r=function(t){p.nextTick(i(x,t,1))}:v?(u=new v,o=u.port2,u.port1.onmessage=w,r=i(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r=b in s("script")?function(t){c.appendChild(s("script"))[b]=function(){c.removeChild(this),x.call(t)}}:function(t){setTimeout(i(x,t,1),0)}),t.exports={set:l,clear:d}},function(t,e,n){var r=n(42),u=n(2)("iterator"),o=n(15);t.exports=n(1).getIteratorMethod=function(t){if(void 0!=t)return t[u]||t["@@iterator"]||o[r(t)]}},function(t,e){},function(t,e,n){n(109);for(var r=n(3),u=n(9),o=n(15),i=n(2)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var s=a[c],f=r[s],p=f&&f.prototype;p&&!p[i]&&u(p,i,s),o[s]=o.Array}},function(t,e){t.exports=require("bluebird")},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62);e["default"]=function(){var t=process,e=t.platform;switch(e){case"darwin":return r.SudoerDarwin;case"win32":return r.SudoerWin32;case"linux":return r.SudoerLinux;default:throw new Error("Unsupported platform: "+e)}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SudoerWin32=e.SudoerLinux=e.SudoerDarwin=void 0;var u=n(38),o=r(u),i=n(40),a=r(i),c=n(41),s=r(c),f=n(39),p=r(f),l=n(59),d=n(67),v=r(d),h=n(75),y=r(h),b=n(74),x=r(b),w=n(23),m=r(w),_=n(71),g=r(_),k=n(72),j=r(k),O=n(121),S=n(60),E=n(122),P=n(120),M=n(63),F=process,A=F.platform,T=F.env,q=function(){function t(e){(0,g["default"])(this,t),this.platform=A,this.options=e,this.cp=null,this.tmpdir=(0,O.tmpdir)()}return(0,j["default"])(t,[{key:"hash",value:function e(t){var e=(0,P.createHash)("sha256");return e.update("electron-sudo"),e.update(this.options.name||""),e.update(t||new Buffer(0)),e.digest("hex").slice(-32)}},{key:"joinEnv",value:function(t){var e=t.env,n=[];if(e&&"object"==("undefined"==typeof e?"undefined":(0,m["default"])(e)))for(var r in e)n.push(r.concat("=",e[r]));return n}},{key:"escapeDoubleQuotes",value:function(t){return t.replace(/"/g,'\\"')}},{key:"encloseDoubleQuotes",value:function(t){return t.replace(/(.+)/g,'"$1"')}},{key:"kill",value:function(t){}}]),t}(),D=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g["default"])(this,e);var n=(0,y["default"])(this,(e.__proto__||(0,v["default"])(e)).call(this,t));return n.options.name||(n.options.name="Electron"),n}return(0,x["default"])(e,t),(0,j["default"])(e,[{key:"copy",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t,e){var r=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return t=r.escapeDoubleQuotes((0,E.normalize)(t)),e=r.escapeDoubleQuotes((0,E.normalize)(e)),u.prev=2,u.next=5,(0,M.exec)('/bin/cp -R -p "'+t+'" "'+e+'"');case 5:i=u.sent,n(i),u.next=12;break;case 9:u.prev=9,u.t0=u["catch"](2),o(u.t0);case 12:case"end":return u.stop()}},u,r,[[2,9]])}));return function(t,e){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}},n,this)}));return t}()},{key:"remove",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(t.startsWith(e.tmpdir)){u.next=2;break}throw new Error("Try to remove suspicious target: "+t+".");case 2:return t=r.escapeDoubleQuotes((0,E.normalize)(t)),u.prev=3,u.next=6,(0,M.exec)('rm -rf "'+t+'"');case 6:i=u.sent,n(i),u.next=13;break;case 10:u.prev=10,u.t0=u["catch"](3),o(u.t0);case 13:case"end":return u.stop()}},u,r,[[3,10]])}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"reset",value:function(){function t(){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(){return s["default"].wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,M.exec)("/usr/bin/sudo -k");case 2:case"end":return t.stop()}},n,this)}));return t}()}]),e}(q),I=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g["default"])(this,e);var n=(0,y["default"])(this,(e.__proto__||(0,v["default"])(e)).call(this,t));if(t.icns&&"string"!=typeof t.icns)throw new Error("options.icns must be a string if provided.");if(t.icns&&0===t.icns.trim().length)throw new Error("options.icns must be a non-empty string if provided.");return n.up=!1,n}return(0,x["default"])(e,t),(0,j["default"])(e,[{key:"isValidName",value:function(t){return/^[a-z0-9 ]+$/i.test(t)&&t.trim().length>0&&t.length<70}},{key:"joinEnv",value:function(t){var e=t.env,n=[];if(e&&"object"==("undefined"==typeof e?"undefined":(0,m["default"])(e)))for(var r in e)n.push(r.concat("=",e[r]));return n}},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i,a,c,f;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=e,a=i.joinEnv(r),c=["/usr/bin/sudo -n",a.join(" "),"-s",t].join(" "),f=void 0,u.next=3,i.reset();case 3:return u.prev=3,u.next=6,(0,M.exec)(c,r);case 6:f=u.sent,n(f),u.next=24;break;case 10:return u.prev=10,u.t0=u["catch"](3),u.prev=12,u.next=15,i.prompt();case 15:return u.next=17,(0,M.exec)(c,r);case 17:f=u.sent,n(f),u.next=24;break;case 21:u.prev=21,u.t1=u["catch"](12),o(u.t1);case 24:case"end":return u.stop()}},u,e,[[3,10],[12,21]])}));return function(t,e){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}},n,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t,e){var r=this,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function o(n,i){var c,f,p;return s["default"].wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return c=r,f="/usr/bin/sudo",p=void 0,o.next=3,c.reset();case 3:return o.next=5,c.prompt();case 5:p=(0,M.spawn)(f,["-n","-s","-E",[t].concat((0,a["default"])(e)).join(" ")],u),p.on("error",function(){var t=(0,l.coroutine)(s["default"].mark(function e(t){return s["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i(t);case 1:case"end":return e.stop()}},e,r)}));return function(e){return t.apply(this,arguments)}}()),c.cp=p,n(p);case 9:case"end":return o.stop()}},o,r)}));return function(t,e){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}},n,this)}));return t}()},{key:"prompt",value:function(){function t(){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(){var t,e=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function r(n,u){var o,i,a,c;return s["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.tmpdir){e.next=2;break}return e.abrupt("return",u(new Error("Requires os.tmpdir() to be defined.")));case 2:if(T.USER){e.next=4;break}return e.abrupt("return",u(new Error("Requires env['USER'] to be defined.")));case 4:return t.up=!0,e.next=7,t.readIcns();case 7:return o=e.sent,i=t.hash(o),a=(0,E.join)((0,E.dirname)(__filename)+"/bin","applet.app"),c=(0,E.join)(t.tmpdir,i,t.options.name+".app"),e.prev=10,e.next=13,(0,M.mkdir)((0,E.dirname)(c));case 13:e.next=19;break;case 15:if(e.prev=15,e.t0=e["catch"](10),"EEXIST"===e.t0.code){e.next=19;break}return e.abrupt("return",u(e.t0));case 19:return e.prev=19,e.next=22,t.copy(a,c);case 22:return e.next=24,t.icon(c);case 24:return e.next=26,t.propertyList(c);case 26:return e.next=28,t.open(c);case 28:return e.next=30,t.remove(c);case 30:e.next=35;break;case 32:return e.prev=32,e.t1=e["catch"](19),e.abrupt("return",u(e.t1));case 35:return e.abrupt("return",n(i));case 36:case"end":return e.stop()}},r,e,[[10,15],[19,32]])}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"icon",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(r.options.icns){u.next=2;break}return u.abrupt("return",n());case 2:return u.next=4,e.copy(r.options.icns,(0,E.join)(t,"Contents","Resources","applet.icns"));case 4:return i=u.sent,u.abrupt("return",n(i));case 6:case"end":return u.stop()}},u,r)}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"open",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i;return s["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.escapeDoubleQuotes((0,E.normalize)(t)),r.prev=1,r.next=4,(0,M.exec)('open -n -W "'+t+'"');case 4:return i=r.sent,r.abrupt("return",n(i));case 8:return r.prev=8,r.t0=r["catch"](1),r.abrupt("return",o(r.t0));case 11:case"end":return r.stop()}},u,r,[[1,8]])}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"readIcns",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function r(n,u){var o;return s["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"darwin"===A){e.next=2;break}return e.abrupt("return",n(new Buffer(0)));case 2:return e.prev=2,e.next=5,(0,M.readFile)(t);case 5:return o=e.sent,e.abrupt("return",n(o));case 9:return e.prev=9,e.t0=e["catch"](2),e.abrupt("return",u(e.t0));case 12:case"end":return e.stop()}},r,e,[[2,9]])}));return function(t,e){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}},n,this)}));return t}()},{key:"propertyList",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,o){var i,a,c,f;return s["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=e.escapeDoubleQuotes((0,E.join)(t,"Contents","Info.plist")),a=e.escapeDoubleQuotes("CFBundleName"),c=e.options.name+" Password Prompt",!/'/.test(c)){r.next=3;break}return r.abrupt("return",o(new Error("Value should not contain single quotes.")));case 3:return r.next=5,(0,M.exec)('defaults write "'+i+'" "'+a+"\" '"+c+"'");case 5:return f=r.sent,r.abrupt("return",n(f));case 7:case"end":return r.stop()}},u,r)}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()}]),e}(D),B=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g["default"])(this,e);var n=(0,y["default"])(this,(e.__proto__||(0,v["default"])(e)).call(this,t));return n.binary=null,n.paths=["/usr/bin/gksudo","/usr/bin/pkexec","./bin/gksudo"],n}return(0,x["default"])(e,t),(0,j["default"])(e,[{key:"getBinary",value:function(){function t(){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(){var t=this;return s["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p["default"].all(this.paths.map(function(){var e=(0,l.coroutine)(s["default"].mark(function n(e){return s["default"].wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,M.stat)(e);case 3:return e=t.sent,t.abrupt("return",e);case 7:return t.prev=7,t.t0=t["catch"](0),t.abrupt("return",null);case 10:case"end":return t.stop()}},n,t,[[0,7]])}));return function(t){return e.apply(this,arguments)}}()));case 2:return e.t0=function(t){return t},e.abrupt("return",e.sent.filter(e.t0)[0]);case 4:case"end":return e.stop()}},n,this)}));return t}()},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function u(n,i){var a,c,f;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(a=e,c=void 0,a.binary){u.next=5;break}return u.next=4,a.getBinary();case 4:a.binary=u.sent;case 5:return r.env instanceof Object&&!r.env.DISPLAY&&(r.env=(0,o["default"])(r.env,{DISPLAY:":0"})),f=void 0,/gksudo/i.test(a.binary)?f="--preserve-env --sudo-mode "+('--description="'+a.escapeDoubleQuotes(a.options.name)+'"'):/pkexec/i.test(a.binary)&&(f="--disable-internal-agent"),t=e.binary+" "+f+" "+t,u.prev=9,u.next=12,(0,M.exec)(t,r);case 12:return c=u.sent,u.abrupt("return",n(c));case 16:return u.prev=16,u.t0=u["catch"](9),u.abrupt("return",i(u.t0));case 19:case"end":return u.stop()}},u,e,[[9,16]])}));return function(t,e){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}},n,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t,e){var r,u=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function a(n,c){var f,p;return s["default"].wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(r.binary){u.next=5;break}return u.next=3,r.getBinary();case 3:u.t0=function(t){return t},r.binary=u.sent.filter(u.t0)[0];case 5:return i.env instanceof Object&&!i.env.DISPLAY&&(i.env=(0,o["default"])(i.env,{DISPLAY:":0"})),f=[],/gksudo/i.test(r.binary)?(f.push("--preserve-env"),f.push("--sudo-mode"),f.push('--description="'+r.escapeDoubleQuotes(r.options.name)+'"'),f.push("--sudo-mode")):/pkexec/i.test(r.binary)&&f.push("--disable-internal-agent"),f.push(t),f.push(e),u.prev=10,p=(0,M.spawn)(r.binary,f,i),u.abrupt("return",n(p));case 15:return u.prev=15,u.t1=u["catch"](10),u.abrupt("return",c(u.t1));case 18:case"end":return u.stop()}},a,u,[[10,15]])}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()}]),e}(D),R=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g["default"])(this,e);var n=(0,y["default"])(this,(e.__proto__||(0,v["default"])(e)).call(this,t));return n.bundled="src\\bin\\elevate.exe",n.binary=null,n}return(0,x["default"])(e,t),(0,j["default"])(e,[{key:"writeBatch",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t,e,r){var u,o,i,a,c;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.exec)("echo %temp%");case 2:return u=n.sent.stdout.toString().replace(/\r\n$/,""),o=u+"\\batch-"+Math.random()+".bat",i=u+"\\output-"+Math.random(),a=this.joinEnv(r),c="setlocal enabledelayedexpansion\r\n",a.length&&(c+="set "+a.join("\r\nset ")+"\r\n"),c+=e&&e.length?t+" "+e.join(" "):t,n.next=11,(0,M.writeFile)(o,c+" > "+i+" 2>&1");case 11:return n.next=13,(0,M.writeFile)(i,"");case 13:return n.abrupt("return",{batch:o,output:i});case 14:case"end":return n.stop()}},n,this)}));return t}()},{key:"watchOutput",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r,u;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,n.next=3,(0,M.readFile)(t.files.output);case 3:return r=n.sent,t.stdout.emit("data",r),u=(0,S.watchFile)(t.files.output,{persistent:!0,interval:1},function(){var e=(0,S.createReadStream)(t.files.output,{start:u.last}),n=0;e.on("data",function(e){n+=e.length,t&&t.stdout.emit("data",e)}),e.on("close",function(){t.last+=n})}),t.last=r.length,t.on("exit",function(){e.clean(t)}),n.abrupt("return",t);case 9:case"end":return n.stop()}},n,this)}));return t}()},{key:"prepare",value:function(){function t(){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(){var t,e=this;return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=this,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function r(n,u){var o,i;return s["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.binary){r.next=2;break}return r.abrupt("return",n(t.binary));case 2:return o=(0,E.join)(e.tmpdir,"elevate.exe"),r.next=5,(0,M.stat)(o);case 5:if(r.sent){r.next=12;break}i=(0,S.createWriteStream)(o),(0,S.createReadStream)(t.bundled).pipe(i),i.on("close",function(){return t.binary=o,n(t.binary)}),i.on("error",function(t){return u(t)}),r.next=14;break;case 12:t.binary=o,n(t.binary);case 14:case"end":return r.stop()}},r,e)}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t){var e,r,u,o=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=this,r=void 0,u=void 0,n.abrupt("return",new p["default"](function(){var n=(0,l.coroutine)(s["default"].mark(function a(n,c){return s["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,o.prepare();case 3:return a.next=5,e.writeBatch(t,[],i);case 5:return r=a.sent,t=e.encloseDoubleQuotes(e.binary)+" -wait "+r.batch,a.next=9,(0,M.exec)(t,i);case 9:return a.next=11,(0,M.readFile)(r.output);case 11:return u=a.sent,a.abrupt("return",n(u));case 15:return a.prev=15,a.t0=a["catch"](0),a.abrupt("return",c(a.t0));case 18:case"end":return a.stop()}},a,o,[[0,15]])}));return function(t,e){return n.apply(this,arguments)}}()));case 2:case"end":return n.stop()}},n,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,l.coroutine)(s["default"].mark(function n(t,e){var r,u,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s["default"].wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.writeBatch(t,e,i);case 2:return r=n.sent,u=[],o=void 0,u.push("-wait"),u.push(r.batch),n.next=9,this.prepare();case 9:return o=(0,M.spawn)(this.binary,u,i,{wait:!1}),o.files=r,n.next=13,this.watchOutput(o);case 13:return n.abrupt("return",o);case 14:case"end":return n.stop()}},n,this)}));return t}()},{key:"clean",value:function(t){(0,S.unwatchFile)(t.files.output),(0,S.unlink)(t.files.batch),(0,S.unlink)(t.files.output)}}]),e}(q);e.SudoerDarwin=I,e.SudoerLinux=B,e.SudoerWin32=R},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function u(t){return function(){var e=arguments;return new h["default"](function(n,r){t.apply(void 0,Array.prototype.slice.call(e).concat([function(){arguments[0]instanceof Error?r(arguments[0]):n.apply(void 0,(0,d["default"])(Array.prototype.slice.call(arguments,1)))}]))})}}function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_["default"].spawn(t,e,(0,c["default"])({},n,{shell:!0}));return r.output={stdout:new Buffer(0),stderr:new Buffer(0)},r.stdout.on("data",function(t){r.output.stdout=i(t,r.output.stdout)}),r.stderr.on("data",function(t){r.output.stderr=i(t,r.output.stderr)}),r}function i(t,e){return t instanceof Buffer||(t=new Buffer(t,"utf8")),!e instanceof Buffer&&(e=new Buffer(0)),Buffer.concat([e,t])}Object.defineProperty(e,"__esModule",{value:!0}),e.open=e.stat=e.mkdir=e.exec=e.spawn=e.writeFile=e.readFile=void 0; -var a=n(73),c=r(a),s=n(41),f=r(s),p=n(59),l=n(40),d=r(l),v=n(39),h=r(v),y=function(){var t=(0,p.coroutine)(f["default"].mark(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new h["default"](function(e,r){_["default"].exec(t,n,function(t,n,u){return t?r(t):e({stdout:n,stderr:u})})}));case 1:case"end":return e.stop()}},e,this)}));return function(e,n){return t.apply(this,arguments)}}(),b=function(){var t=(0,p.coroutine)(f["default"].mark(function e(t){var n,r;return f["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=u(w["default"].stat),e.prev=1,e.next=4,n(t);case 4:return r=e.sent,e.abrupt("return",r);case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",null);case 11:case"end":return e.stop()}},e,this,[[1,8]])}));return function(e){return t.apply(this,arguments)}}(),x=n(60),w=r(x),m=n(119),_=r(m),g=u(w["default"].open),k=u(w["default"].mkdir),j=u(w["default"].readFile),O=u(w["default"].writeFile);e.readFile=j,e.writeFile=O,e.spawn=o,e.exec=y,e.mkdir=k,e.stat=b,e.open=g},function(t,e,n){t.exports={"default":n(76),__esModule:!0}},function(t,e,n){t.exports={"default":n(78),__esModule:!0}},function(t,e,n){t.exports={"default":n(79),__esModule:!0}},function(t,e,n){t.exports={"default":n(80),__esModule:!0}},function(t,e,n){t.exports={"default":n(81),__esModule:!0}},function(t,e,n){t.exports={"default":n(83),__esModule:!0}},function(t,e,n){t.exports={"default":n(84),__esModule:!0}},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=n(66),o=r(u);e["default"]=function(){function t(t,e){for(var n=0;nf;)if(a=c[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(5),u=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,u(0,n)):t[e]=n}},function(t,e,n){var r=n(16),u=n(29),o=n(19);t.exports=function(t){var e=r(t),n=u.f;if(n)for(var i,a=n(t),c=o.f,s=0;a.length>s;)c.call(t,i=a[s++])&&e.push(i);return e}},function(t,e,n){var r=n(11),u=n(47),o=n(46),i=n(6),a=n(33),c=n(56),s={},f={},e=t.exports=function(t,e,n,p,l){var d,v,h,y,b=l?function(){return t}:c(t),x=r(n,p,e?2:1),w=0;if("function"!=typeof b)throw TypeError(t+" is not iterable!");if(o(b)){for(d=a(t.length);d>w;w++)if(y=e?x(i(v=t[w])[0],v[1]):x(t[w]),y===s||y===f)return y}else for(h=b.call(t);!(v=h.next()).done;)if(y=u(h,x,v.value,e),y===s||y===f)return y};e.BREAK=s,e.RETURN=f},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(14);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(28),u=n(17),o=n(20),i={};n(9)(i,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(i,{next:u(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(16),u=n(10);t.exports=function(t,e){for(var n,o=u(t),i=r(o),a=i.length,c=0;a>c;)if(o[n=i[c++]]===e)return n}},function(t,e,n){var r=n(22)("meta"),u=n(13),o=n(8),i=n(5).f,a=0,c=Object.isExtensible||function(){return!0},s=!n(12)(function(){return c(Object.preventExtensions({}))}),f=function(t){i(t,r,{value:{i:"O"+ ++a,w:{}}})},p=function(t,e){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},l=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return s&&v.NEED&&c(t)&&!o(t,r)&&f(t),t},v=t.exports={KEY:r,NEED:!1,fastKey:p,getWeak:l,onFreeze:d}},function(t,e,n){var r=n(3),u=n(55).set,o=r.MutationObserver||r.WebKitMutationObserver,i=r.process,a=r.Promise,c="process"==n(14)(i);t.exports=function(){var t,e,n,s=function(){var r,u;for(c&&(r=i.domain)&&r.exit();t;){u=t.fn,t=t.next;try{u()}catch(o){throw t?n():e=void 0,o}}e=void 0,r&&r.enter()};if(c)n=function(){i.nextTick(s)};else if(o){var f=!0,p=document.createTextNode("");new o(s).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}else if(a&&a.resolve){var l=a.resolve();n=function(){l.then(s)}}else n=function(){u.call(r,s)};return function(r){var u={fn:r,next:void 0};e&&(e.next=u),t||(t=u,n()),e=u}}},function(t,e,n){"use strict";var r=n(16),u=n(29),o=n(19),i=n(21),a=n(45),c=Object.assign;t.exports=!c||n(12)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=i(t),c=arguments.length,s=1,f=u.f,p=o.f;c>s;)for(var l,d=a(arguments[s++]),v=f?r(d).concat(f(d)):r(d),h=v.length,y=0;h>y;)p.call(d,l=v[y++])&&(n[l]=d[l]);return n}:c},function(t,e,n){var r=n(5),u=n(6),o=n(16);t.exports=n(7)?Object.defineProperties:function(t,e){u(t);for(var n,i=o(e),a=i.length,c=0;a>c;)r.f(t,n=i[c++],e[n]);return t}},function(t,e,n){var r=n(10),u=n(51).f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return u(t)}catch(e){return i.slice()}};t.exports.f=function(t){return i&&"[object Window]"==o.call(t)?a(t):u(r(t))}},function(t,e,n){var r=n(4),u=n(1),o=n(12);t.exports=function(t,e){var n=(u.Object||{})[t]||Object[t],i={};i[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",i)}},function(t,e,n){var r=n(9);t.exports=function(t,e,n){for(var u in e)n&&t[u]?t[u]=e[u]:r(t,u,e[u]);return t}},function(t,e,n){var r=n(13),u=n(6),o=function(t,e){if(u(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(11)(Function.call,n(50).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(u){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){"use strict";var r=n(3),u=n(1),o=n(5),i=n(7),a=n(2)("species");t.exports=function(t){var e="function"==typeof u[t]?u[t]:r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(6),u=n(24),o=n(2)("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[o])?e:u(n)}},function(t,e,n){var r=n(32),u=n(25);t.exports=function(t){return function(e,n){var o,i,a=String(u(e)),c=r(n),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c),o<55296||o>56319||c+1===s||(i=a.charCodeAt(c+1))<56320||i>57343?t?a.charAt(c):o:t?a.slice(c,c+2):(o-55296<<10)+(i-56320)+65536)}}},function(t,e,n){var r=n(32),u=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?u(t+e,0):o(t,e)}},function(t,e,n){"use strict";var r=n(11),u=n(4),o=n(21),i=n(47),a=n(46),c=n(33),s=n(88),f=n(56);u(u.S+u.F*!n(49)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,u,p,l=o(t),d="function"==typeof this?this:Array,v=arguments.length,h=v>1?arguments[1]:void 0,y=void 0!==h,b=0,x=f(l);if(y&&(h=r(h,v>2?arguments[2]:void 0,2)),void 0==x||d==Array&&a(x))for(e=c(l.length),n=new d(e);e>b;b++)s(n,b,y?h(l[b],b):l[b]);else for(p=x.call(l),n=new d;!(u=p.next()).done;b++)s(n,b,y?i(p,h,[u.value,b],!0):u.value);return n.length=b,n}})},function(t,e,n){"use strict";var r=n(85),u=n(94),o=n(15),i=n(10);t.exports=n(48)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,u(1)):"keys"==e?u(0,n):"values"==e?u(0,t[n]):u(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(98)})},function(t,e,n){var r=n(4);r(r.S,"Object",{create:n(28)})},function(t,e,n){var r=n(4);r(r.S+r.F*!n(7),"Object",{defineProperty:n(5).f})},function(t,e,n){var r=n(21),u=n(52);n(101)("getPrototypeOf",function(){return function(t){return u(r(t))}})},function(t,e,n){var r=n(4);r(r.S,"Object",{setPrototypeOf:n(103).set})},function(t,e,n){"use strict";var r,u,o,i=n(18),a=n(3),c=n(11),s=n(42),f=n(4),p=n(13),l=n(24),d=n(86),v=n(90),h=n(105),y=n(55).set,b=n(97)(),x="Promise",w=a.TypeError,m=a.process,_=a[x],m=a.process,g="process"==s(m),k=function(){},j=!!function(){try{var t=_.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(k,k)};return(g||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e}catch(r){}}(),O=function(t,e){return t===e||t===_&&e===o},S=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},E=function(t){return O(_,t)?new P(t):new u(t)},P=u=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw w("Bad Promise constructor");e=t,n=r}),this.resolve=l(e),this.reject=l(n)},M=function(t){try{t()}catch(e){return{error:e}}},F=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){for(var r=t._v,u=1==t._s,o=0,i=function(e){var n,o,i=u?e.ok:e.fail,a=e.resolve,c=e.reject,s=e.domain;try{i?(u||(2==t._h&&q(t),t._h=1),i===!0?n=r:(s&&s.enter(),n=i(r),s&&s.exit()),n===e.promise?c(w("Promise-chain cycle")):(o=S(n))?o.call(n,a,c):a(n)):c(r)}catch(f){c(f)}};n.length>o;)i(n[o++]);t._c=[],t._n=!1,e&&!t._h&&A(t)})}},A=function(t){y.call(a,function(){var e,n,r,u=t._v;if(T(t)&&(e=M(function(){g?m.emit("unhandledRejection",u,t):(n=a.onunhandledrejection)?n({promise:t,reason:u}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",u)}),t._h=g||T(t)?2:1),t._a=void 0,e)throw e.error})},T=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!T(e.promise))return!1;return!0},q=function(t){y.call(a,function(){var e;g?m.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),F(e,!0))},I=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=S(t))?b(function(){var r={_w:n,_d:!1};try{e.call(t,c(I,r,1),c(D,r,1))}catch(u){D.call(r,u)}}):(n._v=t,n._s=1,F(n,!1))}catch(r){D.call({_w:n,_d:!1},r)}}};j||(_=function(t){d(this,_,x,"_h"),l(t),r.call(this);try{t(c(I,this,1),c(D,this,1))}catch(e){D.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(102)(_.prototype,{then:function(t,e){var n=E(h(this,_));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=g?m.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&F(this,!1),n.promise},"catch":function(t){return this.then(void 0,t)}}),P=function(){var t=new r;this.promise=t,this.resolve=c(I,t,1),this.reject=c(D,t,1)}),f(f.G+f.W+f.F*!j,{Promise:_}),n(20)(_,x),n(104)(x),o=n(1)[x],f(f.S+f.F*!j,x,{reject:function(t){var e=E(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(i||!j),x,{resolve:function(t){if(t instanceof _&&O(t.constructor,this))return t;var e=E(this),n=e.resolve;return n(t),e.promise}}),f(f.S+f.F*!(j&&n(49)(function(t){_.all(t)["catch"](k)})),x,{all:function(t){var e=this,n=E(e),r=n.resolve,u=n.reject,o=M(function(){var n=[],o=0,i=1;v(t,!1,function(t){var a=o++,c=!1;n.push(void 0),i++,e.resolve(t).then(function(t){c||(c=!0,n[a]=t,--i||r(n))},u)}),--i||r(n)});return o&&u(o.error),n.promise},race:function(t){var e=this,n=E(e),r=n.reject,u=M(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return u&&r(u.error),n.promise}})},function(t,e,n){"use strict";var r=n(3),u=n(8),o=n(7),i=n(4),a=n(54),c=n(96).KEY,s=n(12),f=n(31),p=n(20),l=n(22),d=n(2),v=n(36),h=n(35),y=n(95),b=n(89),x=n(92),w=n(6),m=n(10),_=n(34),g=n(17),k=n(28),j=n(100),O=n(50),S=n(5),E=n(16),P=O.f,M=S.f,F=j.f,A=r.Symbol,T=r.JSON,q=T&&T.stringify,D="prototype",I=d("_hidden"),B=d("toPrimitive"),R={}.propertyIsEnumerable,N=f("symbol-registry"),L=f("symbols"),C=f("op-symbols"),W=Object[D],Q="function"==typeof A,z=r.QObject,U=!z||!z[D]||!z[D].findChild,Y=o&&s(function(){return 7!=k(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(W,e);r&&delete W[e],M(t,e,n),r&&t!==W&&M(W,e,r)}:M,K=function(t){var e=L[t]=k(A[D]);return e._k=t,e},G=Q&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},J=function(t,e,n){return t===W&&J(C,e,n),w(t),e=_(e,!0),w(n),u(L,e)?(n.enumerable?(u(t,I)&&t[I][e]&&(t[I][e]=!1),n=k(n,{enumerable:g(0,!1)})):(u(t,I)||M(t,I,g(1,{})),t[I][e]=!0),Y(t,e,n)):M(t,e,n)},$=function(t,e){w(t);for(var n,r=b(e=m(e)),u=0,o=r.length;o>u;)J(t,n=r[u++],e[n]);return t},H=function(t,e){return void 0===e?k(t):$(k(t),e)},V=function(t){var e=R.call(this,t=_(t,!0));return!(this===W&&u(L,t)&&!u(C,t))&&(!(e||!u(this,t)||!u(L,t)||u(this,I)&&this[I][t])||e)},X=function(t,e){if(t=m(t),e=_(e,!0),t!==W||!u(L,e)||u(C,e)){var n=P(t,e);return!n||!u(L,e)||u(t,I)&&t[I][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=F(m(t)),r=[],o=0;n.length>o;)u(L,e=n[o++])||e==I||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===W,r=F(n?C:m(t)),o=[],i=0;r.length>i;)!u(L,e=r[i++])||n&&!u(W,e)||o.push(L[e]);return o};Q||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(C,n),u(this,I)&&u(this[I],t)&&(this[I][t]=!1),Y(this,t,g(1,n))};return o&&U&&Y(W,t,{configurable:!0,set:e}),K(t)},a(A[D],"toString",function(){return this._k}),O.f=X,S.f=J,n(51).f=j.f=Z,n(19).f=V,n(29).f=tt,o&&!n(18)&&a(W,"propertyIsEnumerable",V,!0),v.f=function(t){return K(d(t))}),i(i.G+i.W+i.F*!Q,{Symbol:A});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=E(d.store),nt=0;et.length>nt;)h(et[nt++]);i(i.S+i.F*!Q,"Symbol",{"for":function(t){return u(N,t+="")?N[t]:N[t]=A(t)},keyFor:function(t){if(G(t))return y(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){U=!0},useSimple:function(){U=!1}}),i(i.S+i.F*!Q,"Object",{create:H,defineProperty:J,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),T&&i(i.S+i.F*(!Q||s(function(){var t=A();return"[null]"!=q([t])||"{}"!=q({a:t})||"{}"!=q(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!G(t)){for(var e,n,r=[t],u=1;arguments.length>u;)r.push(arguments[u++]);return e=r[1],"function"==typeof e&&(n=e),!n&&x(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,q.apply(T,r)}}}),A[D][B]||n(9)(A[D],B,A[D].valueOf),p(A,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(t,e,n){n(35)("asyncIterator")},function(t,e,n){n(35)("observable")},function(t,e){t.exports=require("child_process")},function(t,e){t.exports=require("crypto")},function(t,e){t.exports=require("os")},function(t,e){t.exports=require("path")},function(t,e){t.exports=require("regenerator-runtime")}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("bluebird"),require("fs"),require("child_process"),require("crypto"),require("fs-extra"),require("os"),require("path"),require("regenerator-runtime")):"function"==typeof define&&define.amd?define(["bluebird","fs","child_process","crypto","fs-extra","os","path","regenerator-runtime"],e):"object"==typeof exports?exports["electron-sudo"]=e(require("bluebird"),require("fs"),require("child_process"),require("crypto"),require("fs-extra"),require("os"),require("path"),require("regenerator-runtime")):t["electron-sudo"]=e(t.bluebird,t.fs,t.child_process,t.crypto,t["fs-extra"],t.os,t.path,t["regenerator-runtime"])}(this,function(t,e,n,r,u,o,i,a){return function(t){function e(r){if(n[r])return n[r].exports;var u=n[r]={exports:{},id:r,loaded:!1};return t[r].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var n={};return e.m=t,e.c=n,e.p="./dist",e(0)}([function(t,e,n){t.exports=n(61)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(31)("wks"),u=n(22),o=n(3).Symbol,i="function"==typeof o,a=t.exports=function(t){return r[t]||(r[t]=i&&o[t]||(i?o:u)("Symbol."+t))};a.store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(3),u=n(1),o=n(11),i=n(9),a="prototype",c=function(t,e,n){var s,f,p,l=t&c.F,d=t&c.G,v=t&c.S,h=t&c.P,y=t&c.B,b=t&c.W,x=d?u:u[e]||(u[e]={}),w=x[a],m=d?r:v?r[e]:(r[e]||{})[a];d&&(n=e);for(s in n)f=!l&&m&&void 0!==m[s],f&&s in x||(p=f?m[s]:n[s],x[s]=d&&"function"!=typeof m[s]?n[s]:y&&f?o(p,r):b&&m[s]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(p):h&&"function"==typeof p?o(Function.call,p):p,h&&((x.virtual||(x.virtual={}))[s]=p,t&c.R&&w&&!w[s]&&i(w,s,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(6),u=n(44),o=n(34),i=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),u)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(5),u=n(17);t.exports=n(7)?function(t,e,n){return r.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(45),u=n(25);t.exports=function(t){return r(u(t))}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,u){return t.call(e,n,r,u)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r=n(53),u=n(27);t.exports=Object.keys||function(t){return r(t,u)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(5).f,u=n(8),o=n(2)("toStringTag");t.exports=function(t,e,n){t&&!u(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(25);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var u=n(70),o=r(u),i=n(69),a=r(i),c="function"==typeof a.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===c(o.default)?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":"undefined"==typeof t?"undefined":c(t)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(13),u=n(3).document,o=r(u)&&r(u.createElement);t.exports=function(t){return o?u.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(6),u=n(99),o=n(27),i=n(30)("IE_PROTO"),a=function(){},c="prototype",s=function(){var t,e=n(26)("iframe"),r=o.length,u="<",i=">";for(e.style.display="none",n(43).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(u+"script"+i+"document.F=Object"+u+"/script"+i),t.close(),s=t.F;r--;)delete s[c][o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[c]=r(t),n=new a,a[c]=null,n[i]=t):n=s(),void 0===e?n:u(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(31)("keys"),u=n(22);t.exports=function(t){return r[t]||(r[t]=u(t))}},function(t,e,n){var r=n(3),u="__core-js_shared__",o=r[u]||(r[u]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(32),u=Math.min;t.exports=function(t){return t>0?u(r(t),9007199254740991):0}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,u;if(e&&"function"==typeof(n=t.toString)&&!r(u=n.call(t)))return u;if("function"==typeof(n=t.valueOf)&&!r(u=n.call(t)))return u;if(!e&&"function"==typeof(n=t.toString)&&!r(u=n.call(t)))return u;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),u=n(1),o=n(18),i=n(36),a=n(5).f;t.exports=function(t){var e=u.Symbol||(u.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:i.f(t)})}},function(t,e,n){e.f=n(2)},function(t,e,n){"use strict";var r=n(106)(!0);n(48)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){t.exports={default:n(77),__esModule:!0}},function(t,e,n){t.exports={default:n(82),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var u=n(64),o=r(u);e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ec;)r(a,n=e[c++])&&(~o(s,n)||s.push(n));return s}},function(t,e,n){t.exports=n(9)},function(t,e,n){var r,u,o,i=n(11),a=n(91),c=n(43),s=n(26),f=n(3),p=f.process,l=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=0,y={},b="onreadystatechange",x=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},w=function(t){x.call(t.data)};l&&d||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++h]=function(){a("function"==typeof t?t:Function(t),e)},r(h),h},d=function(t){delete y[t]},"process"==n(14)(p)?r=function(t){p.nextTick(i(x,t,1))}:v?(u=new v,o=u.port2,u.port1.onmessage=w,r=i(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r=b in s("script")?function(t){c.appendChild(s("script"))[b]=function(){c.removeChild(this),x.call(t)}}:function(t){setTimeout(i(x,t,1),0)}),t.exports={set:l,clear:d}},function(t,e,n){var r=n(42),u=n(2)("iterator"),o=n(15);t.exports=n(1).getIteratorMethod=function(t){if(void 0!=t)return t[u]||t["@@iterator"]||o[r(t)]}},function(t,e){},function(t,e,n){n(109);for(var r=n(3),u=n(9),o=n(15),i=n(2)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var s=a[c],f=r[s],p=f&&f.prototype;p&&!p[i]&&u(p,i,s),o[s]=o.Array}},function(t,e){t.exports=require("bluebird")},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62);e.default=function(){var t=process,e=t.platform;switch(e){case"darwin":return r.SudoerDarwin;case"win32":return r.SudoerWin32;case"linux":return r.SudoerLinux;default:throw new Error("Unsupported platform: "+e)}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SudoerWin32=e.SudoerLinux=e.SudoerDarwin=void 0;var u=n(38),o=r(u),i=n(40),a=r(i),c=n(41),s=r(c),f=n(59),p=n(39),l=r(p),d=n(67),v=r(d),h=n(75),y=r(h),b=n(74),x=r(b),w=n(23),m=r(w),_=n(71),g=r(_),k=n(72),j=r(k),O=n(122),S=n(60),E=n(123),P=n(120),M=n(121),F=n(63),A=process,q=A.platform,T=A.env,I=function(){function t(e){(0,g.default)(this,t),this.platform=q,this.options=e,this.cp=null,this.tmpdir=(0,O.tmpdir)()}return(0,j.default)(t,[{key:"hash",value:function t(e){var t=(0,P.createHash)("sha256");return t.update("electron-sudo"),t.update(this.options.name||""),t.update(e||new Buffer(0)),t.digest("hex").slice(-32)}},{key:"joinEnv",value:function(t){var e=t.env,n=[];if(e&&"object"==("undefined"==typeof e?"undefined":(0,m.default)(e)))for(var r in e)n.push(r.concat("=",e[r]));return n}},{key:"escapeDoubleQuotes",value:function(t){return t.replace(/"/g,'\\"')}},{key:"encloseDoubleQuotes",value:function(t){return t.replace(/(.+)/g,'"$1"')}},{key:"kill",value:function(t){}}]),t}(),D=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g.default)(this,e);var n=(0,y.default)(this,(e.__proto__||(0,v.default)(e)).call(this,t));return n.options.name||(n.options.name="Electron"),n}return(0,x.default)(e,t),(0,j.default)(e,[{key:"copy",value:function(t,e){return new l.default(function(n,r){(0,M.copy)(t,e,function(t){t?r(t):n()})})}},{key:"remove",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,o){var i;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.startsWith(n.tmpdir)){t.next=2;break}throw new Error("Try to remove suspicious target: "+e+".");case 2:return e=r.escapeDoubleQuotes((0,E.normalize)(e)),t.prev=3,t.next=6,(0,F.exec)('rm -rf "'+e+'"');case 6:i=t.sent,u(i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),o(t.t0);case 13:case"end":return t.stop()}},t,r,[[3,10]])}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"reset",value:function(){function t(){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,F.exec)("/usr/bin/sudo -k");case 2:case"end":return t.stop()}},t,this)}));return t}()}]),e}(I),B=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g.default)(this,e);var n=(0,y.default)(this,(e.__proto__||(0,v.default)(e)).call(this,t));if(t.icns&&"string"!=typeof t.icns)throw new Error("options.icns must be a string if provided.");if(t.icns&&0===t.icns.trim().length)throw new Error("options.icns must be a non-empty string if provided.");return n.up=!1,n}return(0,x.default)(e,t),(0,j.default)(e,[{key:"isValidName",value:function(t){return/^[a-z0-9 ]+$/i.test(t)&&t.trim().length>0&&t.length<70}},{key:"joinEnv",value:function(t){var e=t.env,n=[];if(e&&"object"==("undefined"==typeof e?"undefined":(0,m.default)(e)))for(var r in e)n.push(r.concat("=",e[r]));return n}},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,o){var i,a,c,f;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=n,a=i.joinEnv(r),c=["/usr/bin/sudo -n",a.join(" "),"-s",e].join(" "),f=void 0,t.next=3,i.reset();case 3:return t.prev=3,t.next=6,(0,F.exec)(c,r);case 6:f=t.sent,u(f),t.next=24;break;case 10:return t.prev=10,t.t0=t.catch(3),t.prev=12,t.next=15,i.prompt();case 15:return t.next=17,(0,F.exec)(c,r);case 17:f=t.sent,u(f),t.next=24;break;case 21:t.prev=21,t.t1=t.catch(12),o(t.t1);case 24:case"end":return t.stop()}},t,n,[[3,10],[12,21]])}));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e,n){var r=this,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(o,i){var c,p,l;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r,p="/usr/bin/sudo",l=void 0,t.next=3,c.reset();case 3:return t.next=5,c.prompt();case 5:l=(0,F.spawn)(p,["-n","-s","-E",[e].concat((0,a.default)(n)).join(" ")],u),l.on("error",function(){var t=(0,f.coroutine)(s.default.mark(function t(e){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i(e);case 1:case"end":return t.stop()}},t,r)}));return function(e){return t.apply(this,arguments)}}()),c.cp=l,o(l);case 9:case"end":return t.stop()}},t,r)}));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return t}()},{key:"prompt",value:function(){function t(){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(){var e,n=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(r,u){var o,i,a,c;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.tmpdir){t.next=2;break}return t.abrupt("return",u(new Error("Requires os.tmpdir() to be defined.")));case 2:if(T.USER){t.next=4;break}return t.abrupt("return",u(new Error("Requires env['USER'] to be defined.")));case 4:return e.up=!0,t.next=7,e.readIcns();case 7:return o=t.sent,i=e.hash(o),a=(0,E.join)((0,E.dirname)(__filename)+"/bin","applet.app"),c=(0,E.join)(e.tmpdir,i,e.options.name+".app"),t.prev=10,t.next=13,(0,F.mkdir)((0,E.dirname)(c));case 13:t.next=19;break;case 15:if(t.prev=15,t.t0=t.catch(10),"EEXIST"===t.t0.code){t.next=19;break}return t.abrupt("return",u(t.t0));case 19:return t.prev=19,t.next=22,e.copy(a,c);case 22:return t.next=24,e.icon(c);case 24:return t.next=26,e.propertyList(c);case 26:return t.next=28,e.open(c);case 28:return t.next=30,e.remove(c);case 30:t.next=35;break;case 32:return t.prev=32,t.t1=t.catch(19),t.abrupt("return",u(t.t1));case 35:return t.abrupt("return",r(i));case 36:case"end":return t.stop()}},t,n,[[10,15],[19,32]])}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"icon",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,o){var i;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.options.icns){t.next=2;break}return t.abrupt("return",u());case 2:return t.next=4,n.copy(r.options.icns,(0,E.join)(e,"Contents","Resources","applet.icns"));case 4:return i=t.sent,t.abrupt("return",u(i));case 6:case"end":return t.stop()}},t,r)}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"open",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,o){var i;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.escapeDoubleQuotes((0,E.normalize)(e)),t.prev=1,t.next=4,(0,F.exec)('open -n -W "'+e+'"');case 4:return i=t.sent,t.abrupt("return",u(i));case 8:return t.prev=8,t.t0=t.catch(1),t.abrupt("return",o(t.t0));case 11:case"end":return t.stop()}},t,r,[[1,8]])}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"readIcns",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(r,u){var o;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"darwin"===q){t.next=2;break}return t.abrupt("return",r(new Buffer(0)));case 2:return t.prev=2,t.next=5,(0,F.readFile)(e);case 5:return o=t.sent,t.abrupt("return",r(o));case 9:return t.prev=9,t.t0=t.catch(2),t.abrupt("return",u(t.t0));case 12:case"end":return t.stop()}},t,n,[[2,9]])}));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return t}()},{key:"propertyList",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,o){var i,a,c,f;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.escapeDoubleQuotes((0,E.join)(e,"Contents","Info.plist")),a=n.escapeDoubleQuotes("CFBundleName"),c=n.options.name+" Password Prompt",!/'/.test(c)){t.next=3;break}return t.abrupt("return",o(new Error("Value should not contain single quotes.")));case 3:return t.next=5,(0,F.exec)('defaults write "'+i+'" "'+a+"\" '"+c+"'");case 5:return f=t.sent,t.abrupt("return",u(f));case 7:case"end":return t.stop()}},t,r)}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()}]),e}(D),R=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g.default)(this,e);var n=(0,y.default)(this,(e.__proto__||(0,v.default)(e)).call(this,t));return n.binary=null,n.paths=["/usr/bin/gksudo","/usr/bin/pkexec","./bin/gksudo"],n}return(0,x.default)(e,t),(0,j.default)(e,[{key:"getBinary",value:function(){function t(){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(){var e=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.default.all(this.paths.map(function(){var t=(0,f.coroutine)(s.default.mark(function t(n){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,F.stat)(n);case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:case"end":return t.stop()}},t,e,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()));case 2:return t.t0=function(t){return t},t.abrupt("return",t.sent.filter(t.t0)[0]);case 4:case"end":return t.stop()}},t,this)}));return t}()},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(u,i){var a,c,f;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,c=void 0,a.binary){t.next=5;break}return t.next=4,a.getBinary();case 4:a.binary=t.sent;case 5:return r.env instanceof Object&&!r.env.DISPLAY&&(r.env=(0,o.default)(r.env,{DISPLAY:":0"})),f=void 0,/gksudo/i.test(a.binary)?f="--preserve-env --sudo-mode "+('--description="'+a.escapeDoubleQuotes(a.options.name)+'"'):/pkexec/i.test(a.binary)&&(f="--disable-internal-agent"),e=n.binary+" "+f+" "+e,t.prev=9,t.next=12,(0,F.exec)(e,r);case 12:return c=t.sent,t.abrupt("return",u(c));case 16:return t.prev=16,t.t0=t.catch(9),t.abrupt("return",i(t.t0));case 19:case"end":return t.stop()}},t,n,[[9,16]])}));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e,n){var r,u=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(a,c){var f,p;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.binary){t.next=5;break}return t.next=3,r.getBinary();case 3:t.t0=function(t){return t},r.binary=t.sent.filter(t.t0)[0];case 5:return i.env instanceof Object&&!i.env.DISPLAY&&(i.env=(0,o.default)(i.env,{DISPLAY:":0"})),f=[],/gksudo/i.test(r.binary)?(f.push("--preserve-env"),f.push("--sudo-mode"),f.push('--description="'+r.escapeDoubleQuotes(r.options.name)+'"'),f.push("--sudo-mode")):/pkexec/i.test(r.binary)&&f.push("--disable-internal-agent"),f.push(e),f.push(n),t.prev=10,p=(0,F.spawn)(r.binary,f,i),t.abrupt("return",a(p));case 15:return t.prev=15,t.t1=t.catch(10),t.abrupt("return",c(t.t1));case 18:case"end":return t.stop()}},t,u,[[10,15]])}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()}]),e}(D),N=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g.default)(this,e);var n=(0,y.default)(this,(e.__proto__||(0,v.default)(e)).call(this,t));return n.bundled="src\\bin\\elevate.exe",n.binary=null,n}return(0,x.default)(e,t),(0,j.default)(e,[{key:"writeBatch",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e,n,r){var u,o,i,a,c;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,F.exec)("echo %temp%");case 2:return u=t.sent.stdout.toString().replace(/\r\n$/,""),o=u+"\\batch-"+Math.random()+".bat",i=u+"\\output-"+Math.random(),a=this.joinEnv(r),c="setlocal enabledelayedexpansion\r\n",a.length&&(c+="set "+a.join("\r\nset ")+"\r\n"),c+=n&&n.length?e+" "+n.join(" "):e,t.next=11,(0,F.writeFile)(o,c+" > "+i+" 2>&1");case 11:return t.next=13,(0,F.writeFile)(i,"");case 13:return t.abrupt("return",{batch:o,output:i});case 14:case"end":return t.stop()}},t,this)}));return t}()},{key:"watchOutput",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r,u;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.next=3,(0,F.readFile)(e.files.output);case 3:return r=t.sent,e.stdout.emit("data",r),u=(0,S.watchFile)(e.files.output,{persistent:!0,interval:1},function(){var t=(0,S.createReadStream)(e.files.output,{start:u.last}),n=0;t.on("data",function(t){n+=t.length,e&&e.stdout.emit("data",t)}),t.on("close",function(){e.last+=n})}),e.last=r.length,e.on("exit",function(){n.clean(e)}),t.abrupt("return",e);case 9:case"end":return t.stop()}},t,this)}));return t}()},{key:"prepare",value:function(){function t(){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(){var e,n=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(r,u){var o,i;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.binary){t.next=2;break}return t.abrupt("return",r(e.binary));case 2:return o=(0,E.join)(n.tmpdir,"elevate.exe"),t.next=5,(0,F.stat)(o);case 5:if(t.sent){t.next=12;break}i=(0,S.createWriteStream)(o),(0,S.createReadStream)(e.bundled).pipe(i),i.on("close",function(){return e.binary=o,r(e.binary)}),i.on("error",function(t){return u(t)}),t.next=14;break;case 12:e.binary=o,r(e.binary);case 14:case"end":return t.stop()}},t,n)}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"exec",value:function(){function t(t,n){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e){var n,r,u,o=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,r=void 0,u=void 0,t.abrupt("return",new l.default(function(){var t=(0,f.coroutine)(s.default.mark(function t(a,c){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.prepare();case 3:return t.next=5,n.writeBatch(e,[],i);case 5:return r=t.sent,e=n.encloseDoubleQuotes(n.binary)+" -wait "+r.batch,t.next=9,(0,F.exec)(e,i);case 9:return t.next=11,(0,F.readFile)(r.output);case 11:return u=t.sent,t.abrupt("return",a(u));case 15:return t.prev=15,t.t0=t.catch(0),t.abrupt("return",c(t.t0));case 18:case"end":return t.stop()}},t,o,[[0,15]])}));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}},t,this)}));return t}()},{key:"spawn",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=(0,f.coroutine)(s.default.mark(function t(e,n){var r,u,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.writeBatch(e,n,i);case 2:return r=t.sent,u=[],o=void 0,u.push("-wait"),u.push(r.batch),t.next=9,this.prepare();case 9:return o=(0,F.spawn)(this.binary,u,i,{wait:!1}),o.files=r,t.next=13,this.watchOutput(o);case 13:return t.abrupt("return",o);case 14:case"end":return t.stop()}},t,this)}));return t}()},{key:"clean",value:function(t){(0,S.unwatchFile)(t.files.output),(0,S.unlink)(t.files.batch),(0,S.unlink)(t.files.output)}}]),e}(I);e.SudoerDarwin=B,e.SudoerLinux=R,e.SudoerWin32=N},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t){return function(){var e=arguments;return new h.default(function(n,r){t.apply(void 0,Array.prototype.slice.call(e).concat([function(){arguments[0]instanceof Error?r(arguments[0]):n.apply(void 0,(0,d.default)(Array.prototype.slice.call(arguments,1)))}]))})}}function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_.default.spawn(t,e,(0,c.default)({},n,{shell:!0}));return r.output={stdout:new Buffer(0),stderr:new Buffer(0)},r.stdout.on("data",function(t){r.output.stdout=i(t,r.output.stdout)}),r.stderr.on("data",function(t){r.output.stderr=i(t,r.output.stderr)}),r}function i(t,e){return t instanceof Buffer||(t=new Buffer(t,"utf8")),!e instanceof Buffer&&(e=new Buffer(0)),Buffer.concat([e,t])}Object.defineProperty(e,"__esModule",{value:!0}),e.open=e.stat=e.mkdir=e.exec=e.spawn=e.writeFile=e.readFile=void 0;var a=n(73),c=r(a),s=n(41),f=r(s),p=n(59),l=n(40),d=r(l),v=n(39),h=r(v),y=function(){var t=(0,p.coroutine)(f.default.mark(function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new h.default(function(t,r){_.default.exec(e,n,function(e,n,u){return e?r(e):t({stdout:n,stderr:u})})}));case 1:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),b=function(){var t=(0,p.coroutine)(f.default.mark(function t(e){var n,r;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=u(w.default.stat),t.prev=1,t.next=4,n(e);case 4:return r=t.sent,t.abrupt("return",r);case 8:return t.prev=8,t.t0=t.catch(1),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[1,8]])}));return function(e){return t.apply(this,arguments)}}(),x=n(60),w=r(x),m=n(119),_=r(m),g=u(w.default.open),k=u(w.default.mkdir),j=u(w.default.readFile),O=u(w.default.writeFile); +e.readFile=j,e.writeFile=O,e.spawn=o,e.exec=y,e.mkdir=k,e.stat=b,e.open=g},function(t,e,n){t.exports={default:n(76),__esModule:!0}},function(t,e,n){t.exports={default:n(78),__esModule:!0}},function(t,e,n){t.exports={default:n(79),__esModule:!0}},function(t,e,n){t.exports={default:n(80),__esModule:!0}},function(t,e,n){t.exports={default:n(81),__esModule:!0}},function(t,e,n){t.exports={default:n(83),__esModule:!0}},function(t,e,n){t.exports={default:n(84),__esModule:!0}},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var u=n(66),o=r(u);e.default=function(){function t(t,e){for(var n=0;nf;)if(a=c[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(5),u=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,u(0,n)):t[e]=n}},function(t,e,n){var r=n(16),u=n(29),o=n(19);t.exports=function(t){var e=r(t),n=u.f;if(n)for(var i,a=n(t),c=o.f,s=0;a.length>s;)c.call(t,i=a[s++])&&e.push(i);return e}},function(t,e,n){var r=n(11),u=n(47),o=n(46),i=n(6),a=n(33),c=n(56),s={},f={},e=t.exports=function(t,e,n,p,l){var d,v,h,y,b=l?function(){return t}:c(t),x=r(n,p,e?2:1),w=0;if("function"!=typeof b)throw TypeError(t+" is not iterable!");if(o(b)){for(d=a(t.length);d>w;w++)if(y=e?x(i(v=t[w])[0],v[1]):x(t[w]),y===s||y===f)return y}else for(h=b.call(t);!(v=h.next()).done;)if(y=u(h,x,v.value,e),y===s||y===f)return y};e.BREAK=s,e.RETURN=f},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(14);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(28),u=n(17),o=n(20),i={};n(9)(i,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(i,{next:u(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(16),u=n(10);t.exports=function(t,e){for(var n,o=u(t),i=r(o),a=i.length,c=0;a>c;)if(o[n=i[c++]]===e)return n}},function(t,e,n){var r=n(22)("meta"),u=n(13),o=n(8),i=n(5).f,a=0,c=Object.isExtensible||function(){return!0},s=!n(12)(function(){return c(Object.preventExtensions({}))}),f=function(t){i(t,r,{value:{i:"O"+ ++a,w:{}}})},p=function(t,e){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},l=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return s&&v.NEED&&c(t)&&!o(t,r)&&f(t),t},v=t.exports={KEY:r,NEED:!1,fastKey:p,getWeak:l,onFreeze:d}},function(t,e,n){var r=n(3),u=n(55).set,o=r.MutationObserver||r.WebKitMutationObserver,i=r.process,a=r.Promise,c="process"==n(14)(i);t.exports=function(){var t,e,n,s=function(){var r,u;for(c&&(r=i.domain)&&r.exit();t;){u=t.fn,t=t.next;try{u()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){i.nextTick(s)};else if(o){var f=!0,p=document.createTextNode("");new o(s).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}else if(a&&a.resolve){var l=a.resolve();n=function(){l.then(s)}}else n=function(){u.call(r,s)};return function(r){var u={fn:r,next:void 0};e&&(e.next=u),t||(t=u,n()),e=u}}},function(t,e,n){"use strict";var r=n(16),u=n(29),o=n(19),i=n(21),a=n(45),c=Object.assign;t.exports=!c||n(12)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=i(t),c=arguments.length,s=1,f=u.f,p=o.f;c>s;)for(var l,d=a(arguments[s++]),v=f?r(d).concat(f(d)):r(d),h=v.length,y=0;h>y;)p.call(d,l=v[y++])&&(n[l]=d[l]);return n}:c},function(t,e,n){var r=n(5),u=n(6),o=n(16);t.exports=n(7)?Object.defineProperties:function(t,e){u(t);for(var n,i=o(e),a=i.length,c=0;a>c;)r.f(t,n=i[c++],e[n]);return t}},function(t,e,n){var r=n(10),u=n(51).f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return u(t)}catch(t){return i.slice()}};t.exports.f=function(t){return i&&"[object Window]"==o.call(t)?a(t):u(r(t))}},function(t,e,n){var r=n(4),u=n(1),o=n(12);t.exports=function(t,e){var n=(u.Object||{})[t]||Object[t],i={};i[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",i)}},function(t,e,n){var r=n(9);t.exports=function(t,e,n){for(var u in e)n&&t[u]?t[u]=e[u]:r(t,u,e[u]);return t}},function(t,e,n){var r=n(13),u=n(6),o=function(t,e){if(u(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(11)(Function.call,n(50).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){"use strict";var r=n(3),u=n(1),o=n(5),i=n(7),a=n(2)("species");t.exports=function(t){var e="function"==typeof u[t]?u[t]:r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(6),u=n(24),o=n(2)("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[o])?e:u(n)}},function(t,e,n){var r=n(32),u=n(25);t.exports=function(t){return function(e,n){var o,i,a=String(u(e)),c=r(n),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c),o<55296||o>56319||c+1===s||(i=a.charCodeAt(c+1))<56320||i>57343?t?a.charAt(c):o:t?a.slice(c,c+2):(o-55296<<10)+(i-56320)+65536)}}},function(t,e,n){var r=n(32),u=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?u(t+e,0):o(t,e)}},function(t,e,n){"use strict";var r=n(11),u=n(4),o=n(21),i=n(47),a=n(46),c=n(33),s=n(88),f=n(56);u(u.S+u.F*!n(49)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,u,p,l=o(t),d="function"==typeof this?this:Array,v=arguments.length,h=v>1?arguments[1]:void 0,y=void 0!==h,b=0,x=f(l);if(y&&(h=r(h,v>2?arguments[2]:void 0,2)),void 0==x||d==Array&&a(x))for(e=c(l.length),n=new d(e);e>b;b++)s(n,b,y?h(l[b],b):l[b]);else for(p=x.call(l),n=new d;!(u=p.next()).done;b++)s(n,b,y?i(p,h,[u.value,b],!0):u.value);return n.length=b,n}})},function(t,e,n){"use strict";var r=n(85),u=n(94),o=n(15),i=n(10);t.exports=n(48)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,u(1)):"keys"==e?u(0,n):"values"==e?u(0,t[n]):u(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(98)})},function(t,e,n){var r=n(4);r(r.S,"Object",{create:n(28)})},function(t,e,n){var r=n(4);r(r.S+r.F*!n(7),"Object",{defineProperty:n(5).f})},function(t,e,n){var r=n(21),u=n(52);n(101)("getPrototypeOf",function(){return function(t){return u(r(t))}})},function(t,e,n){var r=n(4);r(r.S,"Object",{setPrototypeOf:n(103).set})},function(t,e,n){"use strict";var r,u,o,i=n(18),a=n(3),c=n(11),s=n(42),f=n(4),p=n(13),l=n(24),d=n(86),v=n(90),h=n(105),y=n(55).set,b=n(97)(),x="Promise",w=a.TypeError,m=a.process,_=a[x],m=a.process,g="process"==s(m),k=function(){},j=!!function(){try{var t=_.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(k,k)};return(g||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e}catch(t){}}(),O=function(t,e){return t===e||t===_&&e===o},S=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},E=function(t){return O(_,t)?new P(t):new u(t)},P=u=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw w("Bad Promise constructor");e=t,n=r}),this.resolve=l(e),this.reject=l(n)},M=function(t){try{t()}catch(t){return{error:t}}},F=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){for(var r=t._v,u=1==t._s,o=0,i=function(e){var n,o,i=u?e.ok:e.fail,a=e.resolve,c=e.reject,s=e.domain;try{i?(u||(2==t._h&&T(t),t._h=1),i===!0?n=r:(s&&s.enter(),n=i(r),s&&s.exit()),n===e.promise?c(w("Promise-chain cycle")):(o=S(n))?o.call(n,a,c):a(n)):c(r)}catch(t){c(t)}};n.length>o;)i(n[o++]);t._c=[],t._n=!1,e&&!t._h&&A(t)})}},A=function(t){y.call(a,function(){var e,n,r,u=t._v;if(q(t)&&(e=M(function(){g?m.emit("unhandledRejection",u,t):(n=a.onunhandledrejection)?n({promise:t,reason:u}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",u)}),t._h=g||q(t)?2:1),t._a=void 0,e)throw e.error})},q=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!q(e.promise))return!1;return!0},T=function(t){y.call(a,function(){var e;g?m.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},I=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),F(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=S(t))?b(function(){var r={_w:n,_d:!1};try{e.call(t,c(D,r,1),c(I,r,1))}catch(t){I.call(r,t)}}):(n._v=t,n._s=1,F(n,!1))}catch(t){I.call({_w:n,_d:!1},t)}}};j||(_=function(t){d(this,_,x,"_h"),l(t),r.call(this);try{t(c(D,this,1),c(I,this,1))}catch(t){I.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(102)(_.prototype,{then:function(t,e){var n=E(h(this,_));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=g?m.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&F(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),P=function(){var t=new r;this.promise=t,this.resolve=c(D,t,1),this.reject=c(I,t,1)}),f(f.G+f.W+f.F*!j,{Promise:_}),n(20)(_,x),n(104)(x),o=n(1)[x],f(f.S+f.F*!j,x,{reject:function(t){var e=E(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(i||!j),x,{resolve:function(t){if(t instanceof _&&O(t.constructor,this))return t;var e=E(this),n=e.resolve;return n(t),e.promise}}),f(f.S+f.F*!(j&&n(49)(function(t){_.all(t).catch(k)})),x,{all:function(t){var e=this,n=E(e),r=n.resolve,u=n.reject,o=M(function(){var n=[],o=0,i=1;v(t,!1,function(t){var a=o++,c=!1;n.push(void 0),i++,e.resolve(t).then(function(t){c||(c=!0,n[a]=t,--i||r(n))},u)}),--i||r(n)});return o&&u(o.error),n.promise},race:function(t){var e=this,n=E(e),r=n.reject,u=M(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return u&&r(u.error),n.promise}})},function(t,e,n){"use strict";var r=n(3),u=n(8),o=n(7),i=n(4),a=n(54),c=n(96).KEY,s=n(12),f=n(31),p=n(20),l=n(22),d=n(2),v=n(36),h=n(35),y=n(95),b=n(89),x=n(92),w=n(6),m=n(10),_=n(34),g=n(17),k=n(28),j=n(100),O=n(50),S=n(5),E=n(16),P=O.f,M=S.f,F=j.f,A=r.Symbol,q=r.JSON,T=q&&q.stringify,I="prototype",D=d("_hidden"),B=d("toPrimitive"),R={}.propertyIsEnumerable,N=f("symbol-registry"),L=f("symbols"),C=f("op-symbols"),W=Object[I],Q="function"==typeof A,U=r.QObject,Y=!U||!U[I]||!U[I].findChild,z=o&&s(function(){return 7!=k(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(W,e);r&&delete W[e],M(t,e,n),r&&t!==W&&M(W,e,r)}:M,K=function(t){var e=L[t]=k(A[I]);return e._k=t,e},G=Q&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},J=function(t,e,n){return t===W&&J(C,e,n),w(t),e=_(e,!0),w(n),u(L,e)?(n.enumerable?(u(t,D)&&t[D][e]&&(t[D][e]=!1),n=k(n,{enumerable:g(0,!1)})):(u(t,D)||M(t,D,g(1,{})),t[D][e]=!0),z(t,e,n)):M(t,e,n)},$=function(t,e){w(t);for(var n,r=b(e=m(e)),u=0,o=r.length;o>u;)J(t,n=r[u++],e[n]);return t},H=function(t,e){return void 0===e?k(t):$(k(t),e)},V=function(t){var e=R.call(this,t=_(t,!0));return!(this===W&&u(L,t)&&!u(C,t))&&(!(e||!u(this,t)||!u(L,t)||u(this,D)&&this[D][t])||e)},X=function(t,e){if(t=m(t),e=_(e,!0),t!==W||!u(L,e)||u(C,e)){var n=P(t,e);return!n||!u(L,e)||u(t,D)&&t[D][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=F(m(t)),r=[],o=0;n.length>o;)u(L,e=n[o++])||e==D||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===W,r=F(n?C:m(t)),o=[],i=0;r.length>i;)!u(L,e=r[i++])||n&&!u(W,e)||o.push(L[e]);return o};Q||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(C,n),u(this,D)&&u(this[D],t)&&(this[D][t]=!1),z(this,t,g(1,n))};return o&&Y&&z(W,t,{configurable:!0,set:e}),K(t)},a(A[I],"toString",function(){return this._k}),O.f=X,S.f=J,n(51).f=j.f=Z,n(19).f=V,n(29).f=tt,o&&!n(18)&&a(W,"propertyIsEnumerable",V,!0),v.f=function(t){return K(d(t))}),i(i.G+i.W+i.F*!Q,{Symbol:A});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=E(d.store),nt=0;et.length>nt;)h(et[nt++]);i(i.S+i.F*!Q,"Symbol",{for:function(t){return u(N,t+="")?N[t]:N[t]=A(t)},keyFor:function(t){if(G(t))return y(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),i(i.S+i.F*!Q,"Object",{create:H,defineProperty:J,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),q&&i(i.S+i.F*(!Q||s(function(){var t=A();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!G(t)){for(var e,n,r=[t],u=1;arguments.length>u;)r.push(arguments[u++]);return e=r[1],"function"==typeof e&&(n=e),!n&&x(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,T.apply(q,r)}}}),A[I][B]||n(9)(A[I],B,A[I].valueOf),p(A,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(t,e,n){n(35)("asyncIterator")},function(t,e,n){n(35)("observable")},function(t,e){t.exports=require("child_process")},function(t,e){t.exports=require("crypto")},function(t,e){t.exports=require("fs-extra")},function(t,e){t.exports=require("os")},function(t,e){t.exports=require("path")},function(t,e){t.exports=require("regenerator-runtime")}])}); \ No newline at end of file