!function(t){function e(e){for(var n,u,c=e[0],f=e[1],a=e[2],p=0,d=[];p<c.length;p++)u=c[p],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&d.push(o[u][0]),o[u]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(t[n]=f[n]);for(l&&l(e);d.length;)d.shift()();return i.push.apply(i,a||[]),r()}function r(){for(var t,e=0;e<i.length;e++){for(var r=i[e],n=!0,c=1;c<r.length;c++){var f=r[c];0!==o[f]&&(n=!1)}n&&(i.splice(e--,1),t=u(u.s=r[0]))}return t}var n={},o={4:0},i=[];function u(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.m=t,u.c=n,u.d=function(t,e,r){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)u.d(r,n,function(e){return t[e]}.bind(null,n));return r},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="/dist/";var c=window.webpackJsonp=window.webpackJsonp||[],f=c.push.bind(c);c.push=e,c=c.slice();for(var a=0;a<c.length;a++)e(c[a]);var l=f;i.push([84,0]),r()}({84:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(n=(u=c.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,i,u){try{var c=t[i](u),f=c.value}catch(t){return void r(t)}c.done?e(f):Promise.resolve(f).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function c(t){u(i,n,o,c,f,"next",t)}function f(t){u(i,n,o,c,f,"throw",t)}c(void 0)})}}var f=r(4).promisify,a=r(6),l=r(3),p=r(5),d=f(p.js),s=r(7).MAX_FILE_SIZE,y=r(10),h=y.time,v=y.timeEnd;CloudCmd.Edit=e;var b,w,m=CloudCmd.config("editor"),O=!0,g={afterShow:function(){w.moveCursorTo(0,0).focus()}};function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(r,!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},t,{},g);if(!t.afterShow)return e;!function(t,e){if("function"!=typeof e)throw Error(t+" should be a function!")}("options.afterShow",t.afterShow);var r={config:e};return e.afterShow=function(){r(),t.afterShow()},e}function S(){return w}t.exports.init=c(function*(){var t=function(){var t=l("div",{style:'width      : 100%;height     : 100%;font-family: "Droid Sans Mono";',notAppend:!0});return b=t,t}();yield CloudCmd.View(),yield P(t)}),t.exports.show=function(t){O||(CloudCmd.View.show(b,j(t)),S().setOptions({fontSize:16}))},t.exports.getEditor=S,t.exports.getElement=function(){return b},t.exports.hide=function(){CloudCmd.View.hide()};var P=function(){var t=c(function*(t){var e="".concat(CloudCmd.prefix,"/").concat(m),r=CloudCmd.prefix,o="".concat(CloudCmd.prefixSocket,"/").concat(m),i="".concat(e,"/").concat(m,".js");h("Edit load"),yield d(i);var u=f(window[m]),c=n(yield a(u,t,{maxSize:s,prefix:e,prefixSocket:o,socketPath:r}),1)[0];v("Edit load"),w=c,O=!1});return function(e){return t.apply(this,arguments)}}()}});
//# sourceMappingURL=edit.js.map