13 lines
72 KiB
JavaScript
13 lines
72 KiB
JavaScript
/*!
|
||
* tui-editor
|
||
* @version 1.3.3
|
||
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
|
||
* @license MIT
|
||
*/
|
||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"),require("tui-code-snippet"),function(){try{return require("tui-editor")}catch(t){}}(),function(){try{return require("tui-editor/dist/tui-editor-Viewer")}catch(t){}}(),require("tui-chart"));else if("function"==typeof define&&define.amd)define(["jquery","tui-code-snippet","tui-editor","tui-editor/dist/tui-editor-Viewer","tui-chart"],e);else{var r="object"==typeof exports?e(require("jquery"),require("tui-code-snippet"),function(){try{return require("tui-editor")}catch(t){}}(),function(){try{return require("tui-editor/dist/tui-editor-Viewer")}catch(t){}}(),require("tui-chart")):e(t.$,t.tui&&t.tui.util,t.tui&&t.tui.Editor,t.tui&&t.tui.Editor,t.tui&&t.tui.chart);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}("undefined"!=typeof self?self:this,function(t,e,r,n,i){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=26)}([function(e,r){e.exports=t},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=void 0;try{n=r(4)}catch(t){}if(!n)try{n=r(5)}catch(t){}e.default=n},function(t,r){t.exports=e},,function(t,e){if(void 0===r){var n=new Error('Cannot find module "undefined"');throw n.code="MODULE_NOT_FOUND",n}t.exports=r},function(t,e){if(void 0===n){var r=new Error('Cannot find module "undefined"');throw r.code="MODULE_NOT_FOUND",r}t.exports=n},,,function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);f.call(this,t),l.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(t){t.end()}var a=r(13),s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=n;var u=r(11);u.inherits=r(9);var f=r(19),l=r(17);u.inherits(n,f);for(var h=s(l.prototype),c=0;c<h.length;c++){var d=h[c];n.prototype[d]||(n.prototype[d]=l.prototype[d])}Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),n.prototype._destroy=function(t,e){this.push(null),this.end(),a(e,t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===y(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function a(t){return"number"==typeof t}function s(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function f(t){return void 0===t}function l(t){return"[object RegExp]"===y(t)}function h(t){return"object"==typeof t&&null!==t}function c(t){return"[object Date]"===y(t)}function d(t){return"[object Error]"===y(t)||t instanceof Error}function p(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function y(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=a,e.isString=s,e.isSymbol=u,e.isUndefined=f,e.isRegExp=l,e.isObject=h,e.isDate=c,e.isError=d,e.isFunction=p,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(22).Buffer)},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){g&&d&&(g=!1,d.length?p=d.concat(p):y=-1,p.length&&s())}function s(){if(!g){var t=i(a);g=!0;for(var e=p.length;e;){for(d=p,p=[];++y<e;)d&&d[y].run();y=-1,e=p.length}d=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function f(){}var l,h,c=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var d,p=[],g=!1,y=-1;c.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];p.push(new u(t,e)),1!==p.length||g||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=f,c.addListener=f,c.once=f,c.off=f,c.removeListener=f,c.removeAllListeners=f,c.emit=f,c.prependListener=f,c.prependOnceListener=f,c.listeners=function(t){return[]},c.binding=function(t){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(t,e,r){"use strict";(function(e){function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick(function(){t.apply(null,o)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(e,r(12))},function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return a(t,e,r)}var o=r(22),a=o.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=o:(n(o,e),e.Buffer=i),n(a,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return a(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=a(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return a(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o.SlowBuffer(t)}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(r=this._events[t],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),f=r.slice(),i=f.length,u=0;u<i;u++)f[u].apply(this,s);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){e=t.exports=r(19),e.Stream=e,e.Readable=e,e.Writable=r(17),e.Duplex=r(8),e.Transform=r(25),e.PassThrough=r(36)},function(t,e,r){"use strict";(function(e,n,i){function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){O(e,t)}}function a(t){return U.from(t)}function s(t){return U.isBuffer(t)||t instanceof B}function u(){}function f(t,e){x=x||r(8),t=t||{},this.objectMode=!!t.objectMode,e instanceof x&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){b(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function l(t){if(x=x||r(8),!(D.call(l,this)||this instanceof x))return new l(t);this._writableState=new f(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),P.call(this)}function h(t,e){var r=new Error("write after end");t.emit("error",r),C(e,r)}function c(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),C(n,o),i=!1),i}function d(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=U.from(e,r)),e}function p(t,e,r,n,i,o){if(!r){var a=d(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else g(t,e,!1,s,n,i,o);return u}function g(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function y(t,e,r,n,i){--e.pendingcb,r?(C(i,n),C(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),T(t,e))}function v(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function b(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(v(r),e)y(t,r,n,e,i);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?L(m,t,r,o,i):m(t,r,o,i)}}function m(t,e,r,n){r||w(t,e),e.pendingcb--,n(),T(t,e)}function w(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,g(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e)}else{for(;r;){var f=r.chunk,l=r.encoding,h=r.callback;if(g(t,e,!1,e.objectMode?1:f.length,f,l,h),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function R(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function S(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,C(R,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function T(t,e){var r=E(e);return r&&(S(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}function A(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?C(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function O(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}var C=r(13);t.exports=l;var x,L=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:C;l.WritableState=f;var M=r(11);M.inherits=r(9);var k={deprecate:r(35)},P=r(21),U=r(14).Buffer,B=i.Uint8Array||function(){},N=r(23);M.inherits(l,P),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:k.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var D;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(D=Function.prototype[Symbol.hasInstance],Object.defineProperty(l,Symbol.hasInstance,{value:function(t){return!!D.call(this,t)||t&&t._writableState instanceof f}})):D=function(t){return t instanceof this},l.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},l.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=s(t)&&!n.objectMode;return o&&!U.isBuffer(t)&&(t=a(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=u),n.ended?h(this,r):(o||c(this,n,t,r))&&(n.pendingcb++,i=p(this,n,o,t,e,r)),i},l.prototype.cork=function(){this._writableState.corked++},l.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},l.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},l.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},l.prototype._writev=null,l.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||A(this,n,r)},Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),l.prototype.destroy=N.destroy,l.prototype._undestroy=N.undestroy,l.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(12),r(33).setImmediate,r(10))},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(15).EventEmitter;r(9)(n,i),n.Readable=r(16),n.Writable=r(37),n.Duplex=r(38),n.Transform=r(39),n.PassThrough=r(40),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&f.pause&&f.pause()}function n(){f.readable&&f.resume&&f.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){f.removeListener("data",r),t.removeListener("drain",n),f.removeListener("end",o),f.removeListener("close",a),f.removeListener("error",s),t.removeListener("error",s),f.removeListener("end",u),f.removeListener("close",u),t.removeListener("close",u)}var f=this;f.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(f.on("end",o),f.on("close",a));var l=!1;return f.on("error",s),t.on("error",s),f.on("end",u),f.on("close",u),t.on("close",u),t.emit("pipe",f),t}},function(t,e,r){"use strict";(function(e,n){function i(t){return D.from(t)}function o(t){return D.isBuffer(t)||t instanceof j}function a(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?U(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}function s(t,e){P=P||r(8),t=t||{},this.objectMode=!!t.objectMode,e instanceof P&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new W,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(F||(F=r(24).StringDecoder),this.decoder=new F(t.encoding),this.encoding=t.encoding)}function u(t){if(P=P||r(8),!(this instanceof u))return new u(t);this._readableState=new s(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),N.call(this)}function f(t,e,r,n,o){var a=t._readableState;if(null===e)a.reading=!1,g(t,a);else{var s;o||(s=h(a,e)),s?t.emit("error",s):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===D.prototype||(e=i(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):l(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?l(t,a,e,!1):b(t,a)):l(t,a,e,!1))):n||(a.reading=!1)}return c(a)}function l(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&y(t)),b(t,e)}function h(t,e){var r;return o(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function c(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function d(t){return t>=X?t=X:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function p(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=d(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function g(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,y(t)}}function y(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(q("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?k(v,t):v(t))}function v(t){q("emit readable"),t.emit("readable"),S(t)}function b(t,e){e.readingMore||(e.readingMore=!0,k(m,t,e))}function m(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(q("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function w(t){return function(){var e=t._readableState;q("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&B(t,"data")&&(e.flowing=!0,S(t))}}function _(t){q("readable nexttick read 0"),t.read(0)}function E(t,e){e.resumeScheduled||(e.resumeScheduled=!0,k(R,t,e))}function R(t,e){e.reading||(q("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),S(t),e.flowing&&!e.reading&&t.read(0)}function S(t){var e=t._readableState;for(q("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=A(t,e.buffer,e.decoder),r}function A(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?O(t,e):C(t,e),n}function O(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}function C(t,e){var r=D.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}function x(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,k(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function M(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}var k=r(13);t.exports=u;var P,U=r(20);u.ReadableState=s;var B=(r(15).EventEmitter,function(t,e){return t.listeners(e).length}),N=r(21),D=r(14).Buffer,j=e.Uint8Array||function(){},I=r(11);I.inherits=r(9);var Y=r(31),q=void 0;q=Y&&Y.debuglog?Y.debuglog("stream"):function(){};var F,W=r(32),H=r(23);I.inherits(u,N);var G=["error","close","destroy","pause","resume"];Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),u.prototype.destroy=H.destroy,u.prototype._undestroy=H.undestroy,u.prototype._destroy=function(t,e){this.push(null),e(t)},u.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=D.from(t,e),e=""),r=!0),f(this,t,e,!1,r)},u.prototype.unshift=function(t){return f(this,t,null,!0,!1)},u.prototype.isPaused=function(){return!1===this._readableState.flowing},u.prototype.setEncoding=function(t){return F||(F=r(24).StringDecoder),this._readableState.decoder=new F(t),this._readableState.encoding=t,this};var X=8388608;u.prototype.read=function(t){q("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return q("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?x(this):y(this),null;if(0===(t=p(t,e))&&e.ended)return 0===e.length&&x(this),null;var n=e.needReadable;q("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,q("length less than watermark",n)),e.ended||e.reading?(n=!1,q("reading or ended",n)):n&&(q("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=p(r,e)));var i;return i=t>0?T(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&x(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(t,e){function r(t,e){q("onunpipe"),t===c&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,o())}function i(){q("onend"),t.end()}function o(){q("cleanup"),t.removeListener("close",f),t.removeListener("finish",l),t.removeListener("drain",y),t.removeListener("error",u),t.removeListener("unpipe",r),c.removeListener("end",i),c.removeListener("end",h),c.removeListener("data",s),v=!0,!d.awaitDrain||t._writableState&&!t._writableState.needDrain||y()}function s(e){q("ondata"),b=!1,!1!==t.write(e)||b||((1===d.pipesCount&&d.pipes===t||d.pipesCount>1&&-1!==M(d.pipes,t))&&!v&&(q("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,b=!0),c.pause())}function u(e){q("onerror",e),h(),t.removeListener("error",u),0===B(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",l),h()}function l(){q("onfinish"),t.removeListener("close",f),h()}function h(){q("unpipe"),c.unpipe(t)}var c=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=t;break;case 1:d.pipes=[d.pipes,t];break;default:d.pipes.push(t)}d.pipesCount+=1,q("pipe count=%d opts=%j",d.pipesCount,e);var p=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr,g=p?i:h;d.endEmitted?k(g):c.once("end",g),t.on("unpipe",r);var y=w(c);t.on("drain",y);var v=!1,b=!1;return c.on("data",s),a(t,"error",u),t.once("close",f),t.once("finish",l),t.emit("pipe",c),d.flowing||(q("pipe resume"),c.resume()),t},u.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=M(e.pipes,t);return-1===a?this:(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},u.prototype.on=function(t,e){var r=N.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&y(this):k(_,this))}return r},u.prototype.addListener=u.prototype.on,u.prototype.resume=function(){var t=this._readableState;return t.flowing||(q("resume"),t.flowing=!0,E(this,t)),this},u.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this},u.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(q("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(q("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)){n.push(i)||(r=!0,t.pause())}});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<G.length;o++)t.on(G[o],n.emit.bind(n,G[o]));return n._read=function(e){q("wrapped _read",e),r&&(r=!1,t.resume())},n},u._fromList=T}).call(e,r(10),r(12))},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){t.exports=r(15).EventEmitter},function(t,e,r){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(n()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,r){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return a(this,t,e,r)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?c(t,e,r,n):"string"==typeof e?l(t,e,r):d(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,r,n){return s(e),e<=0?i(t,e):void 0!==r?"string"==typeof n?i(t,e).fill(r,n):i(t,e).fill(r):i(t,e)}function f(t,e){if(s(e),t=i(t,e<0?0:0|p(e)),!o.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!o.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,r);t=i(t,n);var a=t.write(e,r);return a!==n&&(t=t.slice(0,a)),t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=i(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function c(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),o.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=o.prototype):t=h(t,e),t}function d(t,e){if(o.isBuffer(e)){var r=0|p(e.length);return t=i(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||Q(e.length)?i(t,0):h(t,e);if("Buffer"===e.type&&J(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var f;if(i){var l=-1;for(f=r;f<s;f++)if(o(t,f)===o(e,-1===l?0:f-l)){if(-1===l&&(l=f),f-l+1===u)return l*a}else-1!==l&&(f-=f-l),l=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){for(var h=!0,c=0;c<u;c++)if(o(t,f+c)!==o(e,c)){h=!1;break}if(h)return f}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function E(t,e,r,n){return z(H(e,t.length-r),t,r,n)}function R(t,e,r,n){return z(G(e),t,r,n)}function S(t,e,r,n){return R(t,e,r,n)}function T(t,e,r,n){return z(V(e),t,r,n)}function A(t,e,r,n){return z(X(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?$.fromByteArray(t):$.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,f,l,h;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128==(192&u)&&(h=(31&o)<<6|63&u)>127&&(a=h);break;case 3:u=t[i+1],f=t[i+2],128==(192&u)&&128==(192&f)&&(h=(15&o)<<12|(63&u)<<6|63&f)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:u=t[i+1],f=t[i+2],l=t[i+3],128==(192&u)&&128==(192&f)&&128==(192&l)&&(h=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&l)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return x(n)}function x(t){var e=t.length;if(e<=Z)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=W(t[o]);return i}function P(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function U(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return i||j(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function Y(t,e,r,n,i){return i||j(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function q(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function W(t){return t<16?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function V(t){return $.toByteArray(q(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Q(t){return t!==t}/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var $=r(29),K=r(30),J=r(20);e.Buffer=o,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return u(null,t,e,r)},o.allocUnsafe=function(t){return f(null,t)},o.allocUnsafeSlow=function(t){return f(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!J(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=o.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):v.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,s=r-e,u=Math.min(a,s),f=this.slice(n,i),l=t.slice(e,r),h=0;h<u;++h)if(f[h]!==l[h]){a=f[h],s=l[h];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},o.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},o.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},o.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return R(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=o.prototype;else{var i=e-t;n=new o(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},o.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},o.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),K.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),K.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),K.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),K.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){B(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){B(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return Y(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return Y(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},o.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var s=o.isBuffer(t)?t:H(new o(t,n).toString()),u=s.length;for(a=0;a<r-e;++a)this[a+e]=s[a%u]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(10))},function(t,e,r){"use strict";function n(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(n||i)return void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||a(o,this,t));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(a(o,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(t,e){t.emit("error",e)}var a=r(13);t.exports={destroy:n,undestroy:i}},function(t,e,r){"use strict";function n(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function i(t){var e=n(t);if("string"!=typeof e&&(b.isEncoding===m||!m(t)))throw new Error("Unknown encoding: "+t);return e||t}function o(t){this.encoding=i(t);var e;switch(this.encoding){case"utf16le":this.text=c,this.end=d,e=4;break;case"utf8":this.fillLast=f,e=4;break;case"base64":this.text=p,this.end=g,e=3;break;default:return this.write=y,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function s(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r?0:(i=a(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r?0:(i=a(e[n]),i>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0)}function u(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"<22>".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>".repeat(r+2)}}function f(t){var e=this.lastTotal-this.lastNeed,r=u(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){var r=s(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>".repeat(this.lastTotal-this.lastNeed):e}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function d(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function p(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function g(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function y(t){return t.toString(this.encoding)}function v(t){return t&&t.length?this.write(t):""}var b=r(14).Buffer,m=b.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=h,o.prototype.text=l,o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";function n(t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&t.push(r),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);s.call(this,t),this._transformState=new n(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){a(e,t,r)}):a(e)})}function a(t,e,r){if(e)return t.emit("error",e);null!==r&&void 0!==r&&t.push(r);var n=t._writableState,i=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}t.exports=o;var s=r(8),u=r(11);u.inherits=r(9),u.inherits(o,s),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;s.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){t=p(t);var r=t.split(/\n{2,}/),n=r[0],i=r[1],o=d(n),a=o&&o.editorChart&&o.editorChart.url,s=void 0;if(C.default.isString(a)){var f=function(t){s=u(t,n),e(s)},l=function(){return e(null)};A.default.get(a).done(f).fail(l)}else s=u(n,i),e(s)}function u(t,e){return{data:h(t),options:d(e)}}function f(t){t=p(t);var e=t.split(j).slice(0,10).join("\n");return I.map(function(t){return{delimiter:t,delta:l(e,t)}}).sort(function(t,e){return t.delta-e.delta})[0].delimiter}function l(t,e){var r=void 0,n=void 0;try{if(U.default.COLUMN_SEPARATOR=e,r=U.default.parse(t),r[0].length<2)throw new Error("parser fail");n=r.map(function(t){return t.length}).reduce(function(t,e){return{deltaSum:t.deltaSum+Math.abs(t.length-e),length:e}},{deltaSum:0,length:r[0].length}).deltaSum}catch(t){n=1/0}return n}function h(t,e){t=p(t),U.default.COLUMN_SEPARATOR=e||f(t);var r=U.default.parse(t);r=r.map(function(t){return t.map(function(t){return t.trim()})});var n=r[0].filter(function(t,e){return e>0}).reduce(function(t,e){return t||!g(e)},!1),i=n?r.shift():[],o=r.slice(1).reduce(function(t,e){return t||!g(e[0])},!1),a=o?r.map(function(t){return t.shift()}):[];return o&&i.shift(),r=r[0].map(function(t,e){return r.map(function(t){return parseFloat(t[e])})}),{categories:a,series:r.map(function(t,e){return n?{name:i[e],data:t}:{data:t}})}}function c(t,e){var r=function(t){var r=h(t);e(r)},n=function(){return e(null)};A.default.get(t).done(r).fail(n)}function d(t){var e=["type","url"],r={};return C.default.isUndefined(t)?r:(t.split(j).forEach(function(t){var n=t.split(Y),i=n[0],o=n.slice(1),a=o.join(Y);if(i=i.trim(),0!==a.length){try{a=JSON.parse(a.trim())}catch(t){a=a.trim()}var s=i.split("."),u=s.slice(0),f=u[0];C.default.inArray(f,e)>=0?u.unshift("editorChart"):1===u.length?u.unshift("chart"):"x"!==f&&"y"!==f||(u[0]=f+"Axis");for(var l=r,h=0;h<u.length;h+=1){var c=u[h];l[c]=l[c]||(u.length-1===h?a:{}),l=l[c]}}}),r)}function p(t){return t.replace(/(^(\s*[\n\r])+)|([\n\r]+\s*$)/g,"")}function g(t){return!isNaN(t)&&isFinite(t)}function y(t,e,r){t=C.default.extend({editorChart:{},chart:{},chartExportMenu:{},usageStatistics:e.usageStatistics},t),e=C.default.extend(W,e);var n=t.chart,i=n.width,o=n.height,a=C.default.isUndefined(i),s=C.default.isUndefined(o);if(a||s){var u=r.getBoundingClientRect(),f=u.width;i=a?e.width:i,o=s?e.height:o,i="auto"===i?f:i,o="auto"===o?f:o}return i=Math.min(e.maxWidth,i),o=Math.min(e.maxHeight,o),t.chart.width=Math.max(e.minWidth,i),t.chart.height=Math.max(e.minHeight,o),t.editorChart.type=t.editorChart.type?t.editorChart.type+"Chart":"columnChart",t.chartExportMenu.visible=t.chartExportMenu.visible||!1,t}function v(t,e){var r="chart-"+Math.random().toString(36).substr(2,10),n='<div id="'+r+'" class="chart" />';return setTimeout(function(){var n=document.querySelector("#"+r);try{s(t,function(t){var r=t.data,i=t.options;i=y(i,e,n);var o=i.editorChart.type;q.indexOf(o)<0?n.innerHTML="invalid chart type. type: bar, column, line, area, pie":F.indexOf(o)>-1&&r.categories.length!==r.series[0].data.length?n.innerHTML="invalid chart data":L.default[o](n,r,i)})}catch(t){n.innerHTML="invalid chart data"}},0),n}function b(t){return t.reduce(function(t,e){var r=e.map(function(t){return!g(t)&&t.indexOf(" ")>=0&&(t='"'+t+'"'),t});return t.push(r.join("\t")),t},[])}function m(t){var e=t.wwEditor.componentManager;e.removeManager("codeblock"),e.addManager(function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),R(e,[{key:"convertNodesToText",value:function(t){if(1!==t.length||"TABLE"!==t[0].tagName)return S(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"convertNodesToText",this).call(this,t);var r=t.shift(),n="";return n+=b([].slice.call(r.rows).map(function(t){return[].slice.call(t.cells).map(function(t){return t.innerText.trim()})})).reduce(function(t,e){return t+(e+"\n")},[])}}]),e}(B))}function w(t,e,r){var n="markdown"===e&&t.getTokenAt(r.from).state.overlay.codeBlock;return n=n||"codeblock"===e,n=n&&"wysiwyg"!==e}function _(t,e){var r=e.source,n=e.data;if(w(t,r,n)){var i=n.text.join("\n");if(0===l(i,"\t")){U.default.COLUMN_SEPARATOR="\t";var o=b(U.default.parse(i));n.update(n.from,n.to,o)}}}function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.options.codeBlockLanguages;r&&r.indexOf(D)<0&&r.push(D),e=C.default.extend({usageStatistics:t.options.usageStatistics},e),N.setReplacer(D,function(t){return v(t,e)}),t.isViewer()||(m(t),t.eventManager.listen("pasteBefore",function(e){return _(t.mdEditor.cm,e)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.setDefaultOptions=e.detectDelimiter=e.parseDSV2ChartData=e.parseCode2ChartOption=e.parseURL2ChartData=e.parseCode2DataAndOptions=void 0;var R=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),S=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},T=r(0),A=n(T),O=r(2),C=n(O),x=r(27),L=n(x),M=r(1),k=n(M),P=r(28),U=n(P),B=k.default.WwCodeBlockManager,N=k.default.codeBlockManager,D="chart";U.default.IGNORE_QUOTE_WHITESPACE=!1,U.default.IGNORE_RECORD_LENGTH=!0,U.default.DETECT_TYPES=!1;var j=/[\n\r]/,I=[",","\t",/\s+/],Y=":",q=["barChart","columnChart","lineChart","areaChart","pieChart"],F=["lineChart","areaChart"],W={minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,height:"auto",width:"auto"};k.default.defineExtension("chart",E),e.parseCode2DataAndOptions=s,e.parseURL2ChartData=c,e.parseCode2ChartOption=d,e.parseDSV2ChartData=h,e.detectDelimiter=f,e.setDefaultOptions=y},function(t,e){t.exports=i},function(t,e,r){"use strict";"function"==typeof Symbol&&Symbol.iterator;!function(n){var i={};i.RELAXED=!1,i.IGNORE_RECORD_LENGTH=!1,i.IGNORE_QUOTES=!1,i.LINE_FEED_OK=!0,i.CARRIAGE_RETURN_OK=!0,i.DETECT_TYPES=!0,i.IGNORE_QUOTE_WHITESPACE=!0,i.DEBUG=!1,i.COLUMN_SEPARATOR=",",i.ERROR_EOF="UNEXPECTED_END_OF_FILE",i.ERROR_CHAR="UNEXPECTED_CHARACTER",i.ERROR_EOL="UNEXPECTED_END_OF_RECORD",i.WARN_SPACE="UNEXPECTED_WHITESPACE";i.parse=function(t){var e=i.result=[];i.COLUMN_SEPARATOR=i.COLUMN_SEPARATOR instanceof RegExp?new RegExp("^"+i.COLUMN_SEPARATOR.source):i.COLUMN_SEPARATOR,i.offset=0,i.str=t,i.record_begin(),i.debug("parse()",t);for(var r;;){if(r=t[i.offset++],i.debug("c",r),null==r){i.escaped&&i.error(i.ERROR_EOF),i.record&&(i.token_end(),i.record_end()),i.debug("...bail",r,i.state,i.record),i.reset();break}if(null==i.record){if(i.RELAXED&&("\n"==r||"\r"==r&&"\n"==t[i.offset+1]))continue;i.record_begin()}if(0==i.state){if((" "===r||"\t"===r)&&'"'==i.next_nonspace()){if(i.RELAXED||i.IGNORE_QUOTE_WHITESPACE)continue;i.warn(i.WARN_SPACE)}if('"'==r&&!i.IGNORE_QUOTES){i.debug("...escaped start",r),i.escaped=!0,i.state=1;continue}i.state=1}1==i.state&&i.escaped?'"'==r?'"'==t[i.offset]?(i.debug("...escaped quote",r),i.token+='"',i.offset++):(i.debug("...escaped end",r),i.escaped=!1,i.state=2):(i.token+=r,i.debug("...escaped add",r,i.token)):"\r"==r?("\n"==t[i.offset]?i.offset++:i.CARRIAGE_RETURN_OK||i.error(i.ERROR_CHAR),i.token_end(),i.record_end()):"\n"==r?(i.LINE_FEED_OK||i.RELAXED||i.error(i.ERROR_CHAR),i.token_end(),i.record_end()):i.test_regex_separator(t)||i.COLUMN_SEPARATOR==r?i.token_end():1==i.state?(i.token+=r,i.debug("...add",r,i.token)):" "===r||"\t"===r?i.IGNORE_QUOTE_WHITESPACE||i.error(i.WARN_SPACE):i.RELAXED||i.error(i.ERROR_CHAR)}return e},i.stream=function(){var t=r(18),e=new t.Transform({objectMode:!0});return e.EOL="\n",e.prior="",e.emitter=function(t){return function(e){t.push(i.parse(e+t.EOL))}}(e),e._transform=function(t,e,r){var n=""==this.prior?t.toString().split(this.EOL):(this.prior+t.toString()).split(this.EOL);this.prior=n.pop(),n.forEach(this.emitter),r()},e._flush=function(t){""!=this.prior&&(this.emitter(this.prior),this.prior=""),t()},e},i.test_regex_separator=function(t){if(!(i.COLUMN_SEPARATOR instanceof RegExp))return!1;var e;return t=t.slice(i.offset-1),e=i.COLUMN_SEPARATOR.exec(t),e&&(i.offset+=e[0].length-1),null!==e},i.stream.json=function(){var t=r(41),e=(r(18),new streamTransform({objectMode:!0}));return e._transform=function(r,n,i){e.push(JSON.stringify(r.toString())+t.EOL),i()},e},i.reset=function(){i.state=null,i.token=null,i.escaped=null,i.record=null,i.offset=null,i.result=null,i.str=null},i.next_nonspace=function(){for(var t,e=i.offset;e<i.str.length;)if(" "!=(t=i.str[e++])&&"\t"!==t)return t;return null},i.record_begin=function(){i.escaped=!1,i.record=[],i.token_begin(),i.debug("record_begin")},i.record_end=function(){i.state=4,!i.IGNORE_RECORD_LENGTH&&!i.RELAXED&&i.result.length>0&&i.record.length!=i.result[0].length&&i.error(i.ERROR_EOL),i.result.push(i.record),i.debug("record end",i.record),i.record=null},i.resolve_type=function(t){return t.match(/^[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?$/)?t=parseFloat(t):t.match(/^(true|false)$/i)?t=Boolean(t.match(/true/i)):"undefined"===t?t=void 0:"null"===t&&(t=null),t},i.token_begin=function(){i.state=0,i.token=""},i.token_end=function(){i.DETECT_TYPES&&(i.token=i.resolve_type(i.token)),i.record.push(i.token),i.debug("token end",i.token),i.token_begin()},i.debug=function(){i.DEBUG&&console.log(arguments)},i.dump=function(t){return[t,"at char",i.offset,":",i.str.substr(i.offset-50,50).replace(/\r/gm,"\\r").replace(/\n/gm,"\\n").replace(/\t/gm,"\\t")].join(" ")},i.error=function(t){var e=i.dump(t);throw i.reset(),e},i.warn=function(t){if(i.DEBUG){var e=i.dump(t);try{return void console.warn(e)}catch(t){}try{console.log(e)}catch(t){}}},void 0!==t&&t.exports?t.exports=i:e.CSV=i}()},function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var e,r,i,o,a,s=t.length;o=n(t),a=new h(3*s/4-o),r=o>0?s-4:s;var u=0;for(e=0;e<r;e+=4)i=l[t.charCodeAt(e)]<<18|l[t.charCodeAt(e+1)]<<12|l[t.charCodeAt(e+2)]<<6|l[t.charCodeAt(e+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===o&&(i=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function a(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function s(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(a(n));return i.join("")}function u(t){for(var e,r=t.length,n=r%3,i="",o=[],a=0,u=r-n;a<u;a+=16383)o.push(s(t,a,a+16383>u?u:a+16383));return 1===n?(e=t[r-1],i+=f[e>>2],i+=f[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=f[e>>10],i+=f[e>>4&63],i+=f[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=i,e.toByteArray=o,e.fromByteArray=u;for(var f=[],l=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=c.length;d<p;++d)f[d]=c[d],l[c.charCodeAt(d)]=d;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,l=-7,h=r?i-1:0,c=r?-1:1,d=t[e+h];for(h+=c,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=c,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+h],h+=c,l-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,l=(1<<f)-1,h=l>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+h>=1?c/u:c*Math.pow(2,1-h),e*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+d]=255&a,d+=p,a/=256,f-=8);t[r+d-p]|=128*g}},function(t,e){},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,r){t.copy(e,r)}var o=r(14).Buffer;t.exports=function(){function t(){n(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var e=o.allocUnsafe(t>>>0),r=this.head,n=0;r;)i(r.data,e,n),n+=r.data.length,r=r.next;return e},t}()},function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(34),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function n(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return f[u]=n,s(u),u++}function i(t){delete f[t]}function o(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}function a(t){if(l)setTimeout(a,0,t);else{var e=f[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var s,u=1,f={},l=!1,h=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&a(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),s=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var t=h.documentElement;s=function(e){var r=h.createElement("script");r.onreadystatechange=function(){a(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():function(){s=function(t){setTimeout(a,0,t)}}(),c.setImmediate=n,c.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,r(10),r(12))},function(t,e,r){(function(e){function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(e,r(10))},function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}t.exports=n;var i=r(25),o=r(11);o.inherits=r(9),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(17)},function(t,e,r){t.exports=r(8)},function(t,e,r){t.exports=r(16).Transform},function(t,e,r){t.exports=r(16).PassThrough},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}}])}); |