made with requirebin
Last active
August 29, 2015 13:59
-
-
Save soldair/10482808 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pinoccio = require('pinoccio'); | |
var util = require('util'); | |
var style = require('style-dom'); | |
var term = require('hypernal')(); | |
var url = require('url'); | |
var colors = require('colors'); | |
var parsed = url.parse(window.location.href,true); | |
var token = (parsed.query||{}).token||"e113fa4270ae050a0c706d29eca5ad25"; | |
var api = pinoccio(); | |
api.token = token; | |
// make a new sync stream. | |
// this api call is /v1/sync but for convenience i return the stream immediately | |
var s = api.sync({stale:1}); | |
s.on('data',function(data){ | |
term.write(log(data)+"\n"); | |
}).on('error',function(error){ | |
term.write((error.message||error).red); | |
}) | |
//---- rendering ---- | |
// title | |
var title = document.createElement('h3'); | |
title.textContent = 'GET /v1/sync example'; | |
document.body.appendChild(title); | |
var description = document.createElement('div'); | |
description.textContent = "a real time stream of troop changes and events" | |
document.body.appendChild(description); | |
// insert terminal | |
var el = document.createElement('div'); | |
el.id = "terminal"; | |
document.body.appendChild(el); | |
term.appendTo(el); | |
// make it fancy | |
style(el,{ | |
"color" : "white", | |
"background" : "black", | |
"padding" : "15px 20px 15px 20px", | |
"border-radius" : "15px", | |
"border" : "2px solid #CEE1F0", | |
"font-family" : "Monaco", | |
"font-size" : "16px" | |
}); | |
function log(data){ | |
return util.inspect(data,{colors:true}).replace(/\n/g,''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(e){return util.inspect(e,{colors:!0}).replace(/\n/g,"")}require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({1:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,a,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');if(r=this._events[e],s(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:for(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];r.apply(this,a)}else if(o(r)){for(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];for(c=r.slice(),i=c.length,u=0;i>u;u++)c[u].apply(this,a)}return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){i=a;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],3:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],4:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i=typeof e;if("base64"===t&&"string"===i)for(e=A(e);0!==e.length%4;)e+="=";var o;if("number"===i)o=L(e);else if("string"===i)o=n.byteLength(e,t);else{if("object"!==i)throw Error("First argument needs to be a number, array or string.");o=L(e.length)}var s;n._useTypedArrays?s=C(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(n._useTypedArrays&&"function"==typeof Uint8Array&&e instanceof Uint8Array)s._set(e);else if(I(e))for(a=0;o>a;a++)s[a]=n.isBuffer(e)?e.readUInt8(a):e[a];else if("string"===i)s.write(e,0,t);else if("number"===i&&!n._useTypedArrays&&!r)for(a=0;o>a;a++)s[a]=0;return s}function i(e,t,r,i){r=Number(r)||0;var o=e.length-r;i?(i=Number(i),i>o&&(i=o)):i=o;var s=t.length;F(0===s%2,"Invalid hex string"),i>s/2&&(i=s/2);for(var a=0;i>a;a++){var u=parseInt(t.substr(2*a,2),16);F(!isNaN(u),"Invalid hex string"),e[r+a]=u}return n._charsWritten=2*a,a}function o(e,t,r,i){var o=n._charsWritten=D(M(t),e,r,i);return o}function s(e,t,r,i){var o=n._charsWritten=D(R(t),e,r,i);return o}function a(e,t,r,n){return s(e,t,r,n)}function u(e,t,r,i){var o=n._charsWritten=D(T(t),e,r,i);return o}function c(e,t,r){return 0===t&&r===e.length?z.fromByteArray(e):z.fromByteArray(e.slice(t,r))}function f(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;r>o;o++)127>=e[o]?(n+=N(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+N(i)}function l(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function h(e,t,r){return l(e,t,r)}function d(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=B(e[o]);return i}function p(e,t,r,n){n||(F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return r?(o=e[t],i>t+1&&(o|=e[t+1]<<8)):(o=e[t]<<8,i>t+1&&(o|=e[t+1])),o}}function g(e,t,r,n){n||(F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return r?(i>t+2&&(o=e[t+2]<<16),i>t+1&&(o|=e[t+1]<<8),o|=e[t],i>t+3&&(o+=e[t+3]<<24>>>0)):(i>t+1&&(o=e[t+1]<<16),i>t+2&&(o|=e[t+2]<<8),i>t+3&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}}function m(e,t,r,n){n||(F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=p(e,t,r,!0),s=32768&o;return s?-1*(65535-o+1):o}}function v(e,t,r,n){n||(F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=g(e,t,r,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function b(e,t,r,n){return n||(F("boolean"==typeof r,"missing or invalid endian"),F(e.length>t+3,"Trying to read beyond buffer length")),W.read(e,t,r,23,4)}function y(e,t,r,n){return n||(F("boolean"==typeof r,"missing or invalid endian"),F(e.length>t+7,"Trying to read beyond buffer length")),W.read(e,t,r,52,8)}function w(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+1,"trying to write beyond buffer length"),U(t,65535));var o=e.length;if(!(r>=o))for(var s=0,a=Math.min(o-r,2);a>s;s++)e[r+s]=(t&255<<8*(n?s:1-s))>>>8*(n?s:1-s)}function _(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+3,"trying to write beyond buffer length"),U(t,4294967295));var o=e.length;if(!(r>=o))for(var s=0,a=Math.min(o-r,4);a>s;s++)e[r+s]=255&t>>>8*(n?s:3-s)}function x(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+1,"Trying to write beyond buffer length"),P(t,32767,-32768));var o=e.length;r>=o||(t>=0?w(e,t,r,n,i):w(e,65535+t+1,r,n,i))}function k(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+3,"Trying to write beyond buffer length"),P(t,2147483647,-2147483648));var o=e.length;r>=o||(t>=0?_(e,t,r,n,i):_(e,4294967295+t+1,r,n,i))}function E(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+3,"Trying to write beyond buffer length"),q(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;r>=o||W.write(e,t,r,n,23,4)}function S(e,t,r,n,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==r&&null!==r,"missing offset"),F(e.length>r+7,"Trying to write beyond buffer length"),q(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;r>=o||W.write(e,t,r,n,52,8)}function A(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function C(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=J.get,e.set=J.set,e.write=J.write,e.toString=J.toString,e.toLocaleString=J.toString,e.toJSON=J.toJSON,e.copy=J.copy,e.slice=J.slice,e.readUInt8=J.readUInt8,e.readUInt16LE=J.readUInt16LE,e.readUInt16BE=J.readUInt16BE,e.readUInt32LE=J.readUInt32LE,e.readUInt32BE=J.readUInt32BE,e.readInt8=J.readInt8,e.readInt16LE=J.readInt16LE,e.readInt16BE=J.readInt16BE,e.readInt32LE=J.readInt32LE,e.readInt32BE=J.readInt32BE,e.readFloatLE=J.readFloatLE,e.readFloatBE=J.readFloatBE,e.readDoubleLE=J.readDoubleLE,e.readDoubleBE=J.readDoubleBE,e.writeUInt8=J.writeUInt8,e.writeUInt16LE=J.writeUInt16LE,e.writeUInt16BE=J.writeUInt16BE,e.writeUInt32LE=J.writeUInt32LE,e.writeUInt32BE=J.writeUInt32BE,e.writeInt8=J.writeInt8,e.writeInt16LE=J.writeInt16LE,e.writeInt16BE=J.writeInt16BE,e.writeInt32LE=J.writeInt32LE,e.writeInt32BE=J.writeInt32BE,e.writeFloatLE=J.writeFloatLE,e.writeFloatBE=J.writeFloatBE,e.writeDoubleLE=J.writeDoubleLE,e.writeDoubleBE=J.writeDoubleBE,e.fill=J.fill,e.inspect=J.inspect,e.toArrayBuffer=J.toArrayBuffer,e}function j(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function L(e){return e=~~Math.ceil(+e),0>e?0:e}function O(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function I(e){return O(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function M(e){for(var t=[],r=0;e.length>r;r++){var n=e.charCodeAt(r);if(127>=n)t.push(e.charCodeAt(r));else{var i=r;n>=55296&&57343>=n&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),s=0;o.length>s;s++)t.push(parseInt(o[s],16))}}return t}function R(e){for(var t=[],r=0;e.length>r;r++)t.push(255&e.charCodeAt(r));return t}function T(e){return z.toByteArray(e)}function D(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}function N(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function U(e,t){F("number"==typeof e,"cannot write a non-number as a number"),F(e>=0,"specified a negative value for writing an unsigned value"),F(t>=e,"value is larger than maximum value for type"),F(Math.floor(e)===e,"value has a fractional component")}function P(e,t,r){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=r,"value smaller than minimum allowed value"),F(Math.floor(e)===e,"value has a fractional component")}function q(e,t,r){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=r,"value smaller than minimum allowed value")}function F(e,t){if(!e)throw Error(t||"Failed assertion")}var z=e("base64-js"),W=e("ieee754");r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192,n._useTypedArrays=function(){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer)return!1;try{var e=new Uint8Array(0);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),n.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},n.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=M(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=T(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw Error("Unknown encoding")}return r},n.concat=function(e,t){if(F(O(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new n(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;e.length>r;r++)t+=e[r].length;var i=new n(t),o=0;for(r=0;e.length>r;r++){var s=e[r];s.copy(i,o),o+=s.length}return i},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var c=n;n=t,t=r,r=c}t=Number(t)||0;var f=this.length-t;switch(r?(r=Number(r),r>f&&(r=f)):r=f,n=((n||"utf8")+"").toLowerCase()){case"hex":return i(this,e,t,r);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,e,t,r);case"ascii":return s(this,e,t,r);case"binary":return a(this,e,t,r);case"base64":return u(this,e,t,r);default:throw Error("Unknown encoding")}},n.prototype.toString=function(e,t,r){var n=this;if(e=((e||"utf8")+"").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";switch(e){case"hex":return d(n,t,r);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(n,t,r);case"ascii":return l(n,t,r);case"binary":return h(n,t,r);case"base64":return c(n,t,r);default:throw Error("Unknown encoding")}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.copy=function(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){F(n>=r,"sourceEnd < sourceStart"),F(t>=0&&e.length>t,"targetStart out of bounds"),F(r>=0&&i.length>r,"sourceStart out of bounds"),F(n>=0&&i.length>=n,"sourceEnd out of bounds"),n>this.length&&(n=this.length),n-r>e.length-t&&(n=e.length-t+r);for(var o=0;n-r>o;o++)e[o+t]=this[o+r]}},n.prototype.slice=function(e,t){var r=this.length;if(e=j(e,r,0),t=j(t,r,r),n._useTypedArrays)return C(this.subarray(e,t));for(var i=t-e,o=new n(i,void 0,!0),s=0;i>s;s++)o[s]=this[s+e];return o},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.readUInt8=function(e,t){return t||(F(void 0!==e&&null!==e,"missing offset"),F(this.length>e,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},n.prototype.readUInt16LE=function(e,t){return p(this,e,!0,t)},n.prototype.readUInt16BE=function(e,t){return p(this,e,!1,t)},n.prototype.readUInt32LE=function(e,t){return g(this,e,!0,t)},n.prototype.readUInt32BE=function(e,t){return g(this,e,!1,t)},n.prototype.readInt8=function(e,t){if(t||(F(void 0!==e&&null!==e,"missing offset"),F(this.length>e,"Trying to read beyond buffer length")),!(e>=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},n.prototype.readInt16LE=function(e,t){return m(this,e,!0,t)},n.prototype.readInt16BE=function(e,t){return m(this,e,!1,t)},n.prototype.readInt32LE=function(e,t){return v(this,e,!0,t)},n.prototype.readInt32BE=function(e,t){return v(this,e,!1,t)},n.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},n.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},n.prototype.readDoubleLE=function(e,t){return y(this,e,!0,t)},n.prototype.readDoubleBE=function(e,t){return y(this,e,!1,t)},n.prototype.writeUInt8=function(e,t,r){r||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(this.length>t,"trying to write beyond buffer length"),U(e,255)),t>=this.length||(this[t]=e)},n.prototype.writeUInt16LE=function(e,t,r){w(this,e,t,!0,r)},n.prototype.writeUInt16BE=function(e,t,r){w(this,e,t,!1,r)},n.prototype.writeUInt32LE=function(e,t,r){_(this,e,t,!0,r)},n.prototype.writeUInt32BE=function(e,t,r){_(this,e,t,!1,r)},n.prototype.writeInt8=function(e,t,r){r||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(this.length>t,"Trying to write beyond buffer length"),P(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},n.prototype.writeInt16LE=function(e,t,r){x(this,e,t,!0,r)},n.prototype.writeInt16BE=function(e,t,r){x(this,e,t,!1,r)},n.prototype.writeInt32LE=function(e,t,r){k(this,e,t,!0,r)},n.prototype.writeInt32BE=function(e,t,r){k(this,e,t,!1,r)},n.prototype.writeFloatLE=function(e,t,r){E(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){E(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){S(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){S(this,e,t,!1,r)},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),F("number"==typeof e&&!isNaN(e),"value is not a number"),F(r>=t,"end < start"),r!==t&&0!==this.length){F(t>=0&&this.length>t,"start out of bounds"),F(r>=0&&this.length>=r,"end out of bounds");for(var n=t;r>n;n++)this[n]=e}},n.prototype.inspect=function(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=B(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},n.prototype.toArrayBuffer=function(){if("function"==typeof Uint8Array){if(n._useTypedArrays)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw Error("Buffer.toArrayBuffer not supported in this browser")};var J=n.prototype},{"base64-js":5,ieee754:6}],5:[function(e,t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(){"use strict";function e(e){var t=e.charCodeAt(0);return t===s?62:t===a?63:u>t?-1:u+10>t?t-u+26+26:f+26>t?t-f:c+26>t?t-c+26:void 0}function n(t){function r(e){c[l++]=e}var n,i,s,a,u,c;if(t.length%4>0)throw Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===u?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===u&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(255&a>>8),r(255&a)),c}function i(e){function t(e){return r.charAt(e)}function n(e){return t(63&e>>18)+t(63&e>>12)+t(63&e>>6)+t(63&e)}var i,o,s,a=e.length%3,u="";for(i=0,s=e.length-a;s>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=n(o);switch(a){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(63&o<<4),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(63&o>>4),u+=t(63&o<<2),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array;"0".charCodeAt(0);var s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0);t.exports.toByteArray=n,t.exports.fromByteArray=i})()},{}],6:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),1>t*(u=Math.pow(2,-s))&&(s--,u*=2),t+=s+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*g}},{}],7:[function(e,t,r){(function(e){(function(n){function i(e){throw RangeError(M[e])}function o(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function s(e,t){return o(e.split(B),t).join(".")}function a(e){for(var t,r,n=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function u(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=D(55296|1023&e>>>10),e=56320|1023&e),t+=D(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?T(e/A):e>>1,e+=T(e/t);e>R*E>>1;n+=x)e=T(e/R);return T(n+(R+1)*e/(e+S))}function h(e){var t,r,n,o,s,a,f,h,d,p,g=[],m=e.length,v=0,b=j,y=C;for(r=e.lastIndexOf(L),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&i("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;m>o;){for(s=v,a=1,f=x;o>=m&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=x||h>T((_-v)/a))&&i("overflow"),v+=h*a,d=y>=f?k:f>=y+E?E:f-y,!(d>h);f+=x)p=x-d,a>T(_/p)&&i("overflow"),a*=p;t=g.length+1,y=l(v-s,t,0==s),T(v/t)>_-b&&i("overflow"),b+=T(v/t),v%=t,g.splice(v++,0,b)}return u(g)}function d(e){var t,r,n,o,s,u,c,h,d,p,g,m,v,b,y,w=[];for(e=a(e),m=e.length,t=j,r=0,s=C,u=0;m>u;++u)g=e[u],128>g&&w.push(D(g));for(n=o=w.length,o&&w.push(L);m>n;){for(c=_,u=0;m>u;++u)g=e[u],g>=t&&c>g&&(c=g);for(v=n+1,c-t>T((_-r)/v)&&i("overflow"),r+=(c-t)*v,t=c,u=0;m>u;++u)if(g=e[u],t>g&&++r>_&&i("overflow"),g==t){for(h=r,d=x;p=s>=d?k:d>=s+E?E:d-s,!(p>h);d+=x)y=h-p,b=x-p,w.push(D(f(p+y%b,0))),h=T(y/b);w.push(D(f(h,0))),s=l(r,v,n==o),r=0,++n}++r,++t}return w.join("")}function p(e){return s(e,function(e){return O.test(e)?h(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return I.test(e)?"xn--"+d(e):e})}var m="object"==typeof r&&r,v="object"==typeof t&&t&&t.exports==m&&t,b="object"==typeof e&&e;(b.global===b||b.window===b)&&(n=b);var y,w,_=2147483647,x=36,k=1,E=26,S=38,A=700,C=72,j=128,L="-",O=/^xn--/,I=/[^ -~]/,B=/\x2E|\u3002|\uFF0E|\uFF61/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-k,T=Math.floor,D=String.fromCharCode;if(y={version:"1.2.4",ucs2:{decode:a,encode:u},decode:h,encode:d,toASCII:g,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return y});else if(m&&!m.nodeType)if(v)v.exports=y;else for(w in y)y.hasOwnProperty(w)&&(m[w]=y[w]);else n.punycode=y})(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,i,o){t=t||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;c>f;++f){var l,h,d,p,g=e[f].replace(a,"%20"),m=g.indexOf(i);m>=0?(l=g.substr(0,m),h=g.substr(m+1)):(l=g,h=""),d=decodeURIComponent(l),p=decodeURIComponent(h),r(s,d)?n(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],9:[function(e,t){"use strict";function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;e.length>n;n++)r.push(t(e[n],n));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,s,a){return t=t||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),function(r){var o=encodeURIComponent(n(r))+s;return i(e[r])?e[r].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[r]))}).join(t):a?encodeURIComponent(n(a))+s+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],10:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":8,"./encode":9}],11:[function(e,t){function r(e){return this instanceof r?(s.call(this,e),a.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",n),void 0):new r(e)}function n(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;o(function(){e.end()})}}t.exports=r;var i=e("inherits"),o=e("process/browser.js").nextTick,s=e("./readable.js"),a=e("./writable.js");i(r,s),r.prototype.write=a.prototype.write,r.prototype.end=a.prototype.end,r.prototype._write=a.prototype._write},{"./readable.js":15,"./writable.js":17,inherits:2,"process/browser.js":13}],12:[function(e,t){function r(){n.call(this)}t.exports=r;var n=e("events").EventEmitter,i=e("inherits");i(r,n),r.Readable=e("./readable.js"),r.Writable=e("./writable.js"),r.Duplex=e("./duplex.js"),r.Transform=e("./transform.js"),r.PassThrough=e("./passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function i(){c.readable&&c.resume&&c.resume()}function o(){f||(f=!0,e.end())}function s(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",r),e.removeListener("drain",i),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),e.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",r),e.on("drain",i),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",s));var f=!1;return c.on("error",a),e.on("error",a),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},{"./duplex.js":11,"./passthrough.js":14,"./readable.js":15,"./transform.js":16,"./writable.js":17,events:1,inherits:2}],13:[function(e,t){t.exports=e(3)},{}],14:[function(e,t){function r(e){return this instanceof r?(n.call(this,e),void 0):new r(e)}t.exports=r;var n=e("./transform.js"),i=e("inherits");i(r,n),r.prototype._transform=function(e,t,r){r(null,e)}},{"./transform.js":16,inherits:2}],15:[function(e,t){(function(r){function n(t){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(k||(k=e("string_decoder").StringDecoder),this.decoder=new k(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,S.call(this),void 0):new i(e)}function o(e,t,r,n,i){var o=c(t,r);if(o)e.emit("error",o);else if(null===r||void 0===r)t.reading=!1,t.ended||f(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var a=Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||n||(r=t.decoder.write(r)),t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):(t.reading=!1,t.buffer.push(r)),t.needReadable&&l(e),d(e,t);else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function a(e){if(e>=L)e=L;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=a(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var r=null;return A.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||r||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.length>0?l(e):w(e)}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?C(function(){h(e)}):h(e))}function h(e){e.emit("readable")}function d(e,t){t.readingMore||(t.readingMore=!0,C(function(){p(e,t)}))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&m(e)}}function m(e){function t(e){var t=e.write(r);!1===t&&n.awaitDrain++}var r,n=e._readableState;for(n.awaitDrain=0;n.pipesCount&&null!==(r=e.read());)if(1===n.pipesCount?t(n.pipes,0,null):_(n.pipes,t),e.emit("data",r),n.awaitDrain>0)return;return 0===n.pipesCount?(n.flowing=!1,E.listenerCount(e,"data")>0&&b(e),void 0):(n.ranOut=!0,void 0)}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function b(e,t){var r=e._readableState;if(r.flowing)throw Error("Cannot switch to old mode now.");var n=t||!1,i=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){i=!0;for(var t;!n&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){n=!0,this.emit("pause")},e.resume=function(){n=!1,i?C(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function y(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!e||e>=i)r=o?n.join(""):A.concat(n,i),n.length=0;else if(n[0].length>e){var a=n[0];r=a.slice(0,e),n[0]=a.slice(e)}else if(e===n[0].length)r=n.shift();else{r=o?"":new A(e);for(var u=0,c=0,f=n.length;f>c&&e>u;c++){var a=n[0],l=Math.min(e-u,a.length);o?r+=a.slice(0,l):a.copy(r,u,0,l),a.length>l?n[0]=a.slice(l):n.shift(),u+=l}}return r}function w(e){var t=e._readableState;if(t.length>0)throw Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,C(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end")) | |
}))}function _(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function x(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}t.exports=i,i.ReadableState=n;var k,E=e("events").EventEmitter,S=e("./index.js"),A=e("buffer").Buffer,C=e("process/browser.js").nextTick,j=e("inherits");j(i,S),i.prototype.push=function(e,t){var r=this._readableState;return"string"!=typeof e||r.objectMode||(t=t||r.defaultEncoding,t!==r.encoding&&(e=new A(e,t),t="")),o(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){k||(k=e("string_decoder").StringDecoder),this._readableState.decoder=new k(t),this._readableState.encoding=t};var L=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&w(this),null;var n=t.needReadable;t.length-e<=t.highWaterMark&&(n=!0),(t.ended||t.reading)&&(n=!1),n&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=u(r,t));var i;return i=e>0?y(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&w(this),i},i.prototype._read=function(){this.emit("error",Error("not implemented"))},i.prototype.pipe=function(e,t){function n(e){e===f&&o()}function i(){e.end()}function o(){e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){c(),0===b&&0===E.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),c()}function u(){e.removeListener("close",a),c()}function c(){f.unpipe(e)}var f=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,d=h?i:o;l.endEmitted?C(d):f.once("end",d),e.on("unpipe",n);var p=g(f);e.on("drain",p);var b=E.listenerCount(e,"error");return e.once("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",f),l.flowing||(this.on("readable",v),l.flowing=!0,C(function(){m(f)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||b(this),"readable"===e&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&l(this,n):this.read(0))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){b(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){b(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&this[i]===void 0&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(t){e.on(t,function(e){return n.emit.apply(n,t,e)})}),n._read=function(){r&&(r=!1,e.resume())},n},i._fromList=y}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./index.js":12,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,buffer:4,events:1,inherits:2,"process/browser.js":13,string_decoder:18}],16:[function(e,t){function r(e,t){this.afterTransform=function(e,r){return n(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState=new r(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var r=e._writableState;e._readableState;var n=e._transformState;if(r.length)throw Error("calling transform done when ws.length != 0");if(n.transforming)throw Error("calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./duplex.js"),a=e("inherits");a(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(){throw Error("not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(){var e=this._transformState;e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./duplex.js":11,inherits:2}],17:[function(e,t){function r(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function n(e,t){e=e||{};var r=e.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.buffer=[]}function i(e){return this instanceof i||this instanceof x.Duplex?(this._writableState=new n(e,this),this.writable=!0,x.call(this),void 0):new i(e)}function o(e,t,r){var n=Error("write after end");e.emit("error",n),k(function(){r(n)})}function s(e,t,r,n){var i=!0;if(!E.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),k(function(){n(o)}),i=!1}return i}function a(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new E(t,r)),t}function u(e,t,n,i,o){n=a(t,n,i);var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;return t.needDrain=!u,t.writing?t.buffer.push(new r(n,i,o)):c(e,t,s,n,i,o),u}function c(e,t,r,n,i,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,e._write(n,i,t.onwrite),t.sync=!1}function f(e,t,r,n,i){r?k(function(){i(n)}):i(n),e.emit("error",n)}function l(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(l(r),t)f(e,r,n,t,i);else{var o=m(e,r);o||r.bufferProcessing||!r.buffer.length||g(e,r),n?k(function(){d(e,r,o,i)}):d(e,r,o,i)}}function d(e,t,r,n){r||p(e,t),n(),r&&v(e,t)}function p(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){t.bufferProcessing=!0;for(var r=0;t.buffer.length>r;r++){var n=t.buffer[r],i=n.chunk,o=n.encoding,s=n.callback,a=t.objectMode?1:i.length;if(c(e,t,a,i,o,s),t.writing){r++;break}}t.bufferProcessing=!1,t.buffer.length>r?t.buffer=t.buffer.slice(r):t.buffer.length=0}function m(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function v(e,t){var r=m(e,t);return r&&(t.finished=!0,e.emit("finish")),r}function b(e,t,r){t.ending=!0,v(e,t),r&&(t.finished?k(r):e.once("finish",r)),t.ended=!0}t.exports=i,i.WritableState=n;var y="undefined"!=typeof Uint8Array?function(e){return e instanceof Uint8Array}:function(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name},w="undefined"!=typeof ArrayBuffer?function(e){return e instanceof ArrayBuffer}:function(e){return e&&e.constructor&&"ArrayBuffer"===e.constructor.name},_=e("inherits"),x=e("./index.js"),k=e("process/browser.js").nextTick,E=e("buffer").Buffer;_(i,x),i.prototype.pipe=function(){this.emit("error",Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),!E.isBuffer(e)&&y(e)&&(e=new E(e)),w(e)&&"undefined"!=typeof Uint8Array&&(e=new E(new Uint8Array(e))),E.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=function(){}),n.ended?o(this,n,r):s(this,n,e,r)&&(i=u(this,n,e,t,r)),i},i.prototype._write=function(e,t,r){r(Error("not implemented"))},i.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),e!==void 0&&null!==e&&this.write(e,t),n.ending||n.finished||b(this,n,r)}},{"./index.js":12,buffer:4,inherits:2,"process/browser.js":13}],18:[function(e,t,r){function n(e){if(e&&!a.isEncoding(e))throw Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){var t=this.charReceived=e.length%2;return this.charLength=t?2:0,t}function s(e){var t=this.charReceived=e.length%3;return this.charLength=t?3:0,t}var a=e("buffer").Buffer,u=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return this.write=i,void 0}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="",r=0;this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,r,n),this.charReceived+=n-r,r=n,this.charReceived<this.charLength)return"";t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&56319>=i)){if(this.charReceived=this.charLength=0,n==e.length)return t;e=e.slice(n,e.length);break}this.charLength+=this.surrogateSize,t=""}var o=this.detectIncompleteChar(e),s=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-o,s),this.charReceived=o,s-=o),t+=e.toString(this.encoding,0,s);var s=t.length-1,i=t.charCodeAt(s);if(i>=55296&&56319>=i){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),this.charBuffer.write(t.charAt(t.length-1),this.encoding),t.substring(0,s)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&6==r>>5){this.charLength=2;break}if(2>=t&&14==r>>4){this.charLength=3;break}if(3>=t&&30==r>>3){this.charLength=4;break}}return t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:4}],19:[function(e,t,r){(function(){"use strict";function t(e,t,r){if(e&&"object"==typeof e&&e.href)return e;if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i={},o=e;o=o.trim();var c=u.exec(o);if(c){c=c[0];var f=c.toLowerCase();i.protocol=f,o=o.substr(c.length)}if(r||c||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===o.substr(0,2);!l||c&&y[c]||(o=o.substr(2),i.slashes=!0)}if(!y[c]&&(l||c&&!w[c])){var x=o.indexOf("@");if(-1!==x){for(var k=o.slice(0,x),E=!0,S=0,A=p.length;A>S;S++)if(-1!==k.indexOf(p[S])){E=!1;break}E&&(i.auth=decodeURIComponent(k),o=o.substr(x+1))}for(var C=-1,S=0,A=d.length;A>S;S++){var j=o.indexOf(d[S]);-1!==j&&(0>C||C>j)&&(C=j)}-1!==C?(i.host=o.substr(0,C),o=o.substr(C)):(i.host=o,o="");for(var L=s(i.host),O=Object.keys(L),S=0,A=O.length;A>S;S++){var I=O[S];i[I]=L[I]}i.hostname=i.hostname||"";var B="["===i.hostname[0]&&"]"===i.hostname[i.hostname.length-1];if(i.hostname.length>g)i.hostname="";else if(!B)for(var M=i.hostname.split(/\./),S=0,A=M.length;A>S;S++){var R=M[S];if(R&&!R.match(m)){for(var T="",D=0,N=R.length;N>D;D++)T+=R.charCodeAt(D)>127?"x":R[D];if(!T.match(m)){var U=M.slice(0,S),P=M.slice(S+1),q=R.match(v);q&&(U.push(q[1]),P.unshift(q[2])),P.length&&(o="/"+P.join(".")+o),i.hostname=U.join(".");break}}}if(i.hostname=i.hostname.toLowerCase(),!B){for(var F=i.hostname.split("."),z=[],S=0;F.length>S;++S){var W=F[S];z.push(W.match(/[^A-Za-z0-9_-]/)?"xn--"+a.encode(W):W)}i.hostname=z.join(".")}i.host=(i.hostname||"")+(i.port?":"+i.port:""),i.href+=i.host,B&&(i.hostname=i.hostname.substr(1,i.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!b[f])for(var S=0,A=h.length;A>S;S++){var J=h[S],G=encodeURIComponent(J);G===J&&(G=escape(J)),o=o.split(J).join(G)}var H=o.indexOf("#");-1!==H&&(i.hash=o.substr(H),o=o.slice(0,H));var X=o.indexOf("?");return-1!==X?(i.search=o.substr(X),i.query=o.substr(X+1),t&&(i.query=_.parse(i.query)),o=o.slice(0,X)):t&&(i.search="",i.query={}),o&&(i.pathname=o),w[c]&&i.hostname&&!i.pathname&&(i.pathname="/"),(i.pathname||i.search)&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=n(i),i}function n(e){"string"==typeof e&&(e=t(e));var r=e.auth||"";r&&(r=encodeURIComponent(r),r=r.replace(/%3A/i,":"),r+="@");var n=e.protocol||"",i=e.pathname||"",o=e.hash||"",s=!1,a="";void 0!==e.host?s=r+e.host:void 0!==e.hostname&&(s=r+(-1===e.hostname.indexOf(":")?e.hostname:"["+e.hostname+"]"),e.port&&(s+=":"+e.port)),e.query&&"object"==typeof e.query&&Object.keys(e.query).length&&(a=_.stringify(e.query));var u=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||w[n])&&s!==!1?(s="//"+(s||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):s||(s=""),o&&"#"!==o.charAt(0)&&(o="#"+o),u&&"?"!==u.charAt(0)&&(u="?"+u),n+s+i+u+o}function i(e,t){return n(o(e,t))}function o(e,r){if(!e)return r;if(e=t(n(e),!1,!0),r=t(n(r),!1,!0),e.hash=r.hash,""===r.href)return e.href=n(e),e;if(r.slashes&&!r.protocol)return r.protocol=e.protocol,w[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=n(r),r;if(r.protocol&&r.protocol!==e.protocol){if(!w[r.protocol])return r.href=n(r),r;if(e.protocol=r.protocol,!r.host&&!y[r.protocol]){for(var i=(r.pathname||"").split("/");i.length&&!(r.host=i.shift()););r.host||(r.host=""),r.hostname||(r.hostname=""),""!==i[0]&&i.unshift(""),2>i.length&&i.unshift(""),r.pathname=i.join("/")}return e.pathname=r.pathname,e.search=r.search,e.query=r.query,e.host=r.host||"",e.auth=r.auth,e.hostname=r.hostname||r.host,e.port=r.port,(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.slashes=e.slashes||r.slashes,e.href=n(e),e}var o=e.pathname&&"/"===e.pathname.charAt(0),s=void 0!==r.host||r.pathname&&"/"===r.pathname.charAt(0),a=s||o||e.host&&r.pathname,u=a,c=e.pathname&&e.pathname.split("/")||[],i=r.pathname&&r.pathname.split("/")||[],f=e.protocol&&!w[e.protocol];if(f&&(delete e.hostname,delete e.port,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),delete e.host,r.protocol&&(delete r.hostname,delete r.port,r.host&&(""===i[0]?i[0]=r.host:i.unshift(r.host)),delete r.host),a=a&&(""===i[0]||""===c[0])),s)e.host=r.host||""===r.host?r.host:e.host,e.hostname=r.hostname||""===r.hostname?r.hostname:e.hostname,e.search=r.search,e.query=r.query,c=i;else if(i.length)c||(c=[]),c.pop(),c=c.concat(i),e.search=r.search,e.query=r.query;else if("search"in r){if(f){e.hostname=e.host=c.shift();var l=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;l&&(e.auth=l.shift(),e.host=e.hostname=l.shift())}return e.search=r.search,e.query=r.query,(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=n(e),e}if(!c.length)return delete e.pathname,e.search?delete e.path:e.path="/"+e.search,e.href=n(e),e;for(var h=c.slice(-1)[0],d=(e.host||r.host)&&("."===h||".."===h)||""===h,p=0,g=c.length;g>=0;g--)h=c[g],"."==h?c.splice(g,1):".."===h?(c.splice(g,1),p++):p&&(c.splice(g,1),p--);if(!a&&!u)for(;p--;p)c.unshift("..");!a||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),d&&"/"!==c.join("/").substr(-1)&&c.push("");var m=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(f){e.hostname=e.host=m?"":c.length?c.shift():"";var l=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;l&&(e.auth=l.shift(),e.host=e.hostname=l.shift())}return a=a||e.host&&c.length,a&&!m&&c.unshift(""),e.pathname=c.join("/"),(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=r.auth||e.auth,e.slashes=e.slashes||r.slashes,e.href=n(e),e}function s(e){var t={},r=c.exec(e);return r&&(r=r[0],":"!==r&&(t.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(t.hostname=e),t}var a=e("punycode");r.parse=t,r.resolve=i,r.resolveObject=o,r.format=n;var u=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","~","`"].concat(f),h=["'"].concat(f),d=["%","/","?",";","#"].concat(l).concat(h),p=["/","@","?","#"].concat(f),g=255,m=/^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/,v=/^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/,b={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=e("querystring")})()},{punycode:7,querystring:10}],20:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],21:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(t);if(0===s.length){if(A(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(E(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return f(t)}var v="",b=!1,w=["{","}"];if(p(t)&&(b=!0,w=["[","]"]),A(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(x(t)&&(v=" "+RegExp.prototype.toString.call(t)),E(t)&&(v=" "+Date.prototype.toUTCString.call(t)),S(t)&&(v=" "+f(t)),0===s.length&&(!b||0==t.length))return w[0]+v+w[1];if(0>n)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=b?l(e,t,n,g,s):s.map(function(r){return h(e,t,n,g,r,b)}),e.seen.pop(),d(k,v,w)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i){for(var o=[],s=0,a=t.length;a>s;++s)I(t,s+"")?o.push(h(e,t,r,n,s+"",!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}function h(e,t,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),I(n,i)||(s="["+i+"]"),a||(0>e.seen.indexOf(c.value)?(a=m(r)?u(e,c.value,null):u(e,c.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function _(e){return void 0===e}function x(e){return k(e)&&"[object RegExp]"===j(e)}function k(e){return"object"==typeof e&&null!==e}function E(e){return k(e)&&"[object Date]"===j(e)}function S(e){return k(e)&&("[object Error]"===j(e)||e instanceof Error)}function A(e){return"function"==typeof e}function C(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||e===void 0}function j(e){return Object.prototype.toString.call(e)}function L(e){return 10>e?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[L(e.getHours()),L(e.getMinutes()),L(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var B=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;arguments.length>r;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,s=(e+"").replace(B,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return n[r++]+"";case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),a=n[r];o>r;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},r.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var M,R={};r.debuglog=function(e){if(_(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!R[e])if(RegExp("\\b"+e+"\\b","i").test(M)){var n=t.pid;R[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else R[e]=function(){};return R[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=g,r.isNull=m,r.isNullOrUndefined=v,r.isNumber=b,r.isString=y,r.isSymbol=w,r.isUndefined=_,r.isRegExp=x,r.isObject=k,r.isDate=E,r.isError=S,r.isFunction=A,r.isPrimitive=C,r.isBuffer=e("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":20,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,inherits:2}],eJOrBi:[function(e,t){var r=e("reconnect-shoe"),n=e("through"),i=e("./lib/browserutil"),o=e("./lib/api.js");t.exports=window.pinoccioAPI=function(e){e=e||{};var t,s=n();s.pending={},s.id=0,s.timeout=1e4,e.cookie=e.cookie||"pinoccio_id",s.token=i.getCookie(e.cookie),s.server=e.server||e.api||i.findAPIScript()||"https://api.pinocc.io",s.account=!1;var a=r().connect(s.server+"/shoe"),u=o(e,a);return s._base=u,s.log=function(){},s.login=function(t,r,n){s.rest({url:"/v1/login",method:"post",data:{email:t,password:r}},function(t,r){return t?n(t):(s.account=r.account,s.token=r.token,i.setCookie(e.cookie,s.token),n(!1,r),void 0)})},s.register=function(t,r){s.rest({url:"/v1/register",method:"post",data:t},function(t,n){return t?r(t):(s.account=n.account,s.token=n.token,i.setCookie(e.cookie,s.token),r(!1,n),void 0)})},s.logout=function(e){s.rest({url:"/v1/logout",method:"post"},function(r,n){s.account=t,e(r,n)})},s.rest=function(e,t){s.log("rest>",e,s.token),s.token&&(e.data||(e.data={}),e.data.token=s.token),e.method||(e.method="get"),u.rest(e,t)},s.sync=function(e){return u.sync(s.token,e)},s.stats=function(e){return u.stats(s.token,e)},s.events=function(){return u.events(s.token)},s}},{"./lib/api.js":24,"./lib/browserutil":25,"reconnect-shoe":40,through:47}],pinoccio:[function(e,t){t.exports=e("eJOrBi")},{}],24:[function(e,t){(function(r){var n=e("through"),i=e("./json"),o=e("./connection"),s=e("repipe");t.exports=function(e,t){function a(e){return t&&!t._bound&&(t._bound=1,t.connected&&(u.connection=o.rpc(t._connection)),t.on("connect",function(e){for(u.connection=o.rpc(e),u.log("bound connection listener!"),u.connection.mdm.on("connection",function(e){u.log("mdm got stream from connection listener",e.meta),e.meta&&"rest-stream"==e.meta.type&&u.expectingStream[e.meta.id]&&(u.expectingStream[e.meta.id](!1,{data:e}),delete u.expectingStream[e.meta.id])});c.length;)c.shift()(!1,u.connection)}).on("disconnect",function(){u.connection=!1,Object.keys(u.expectingStream).forEach(function(e){var t=Error("disconnect before start");t.code="E_DISCONNECT",u.expectingStream[e](t),delete u.expectingStream[e]})})),0!=t.reconnect||t.connection?u.connection?r.nextTick(function(){u.connection?e(!1,u.connection):c.push(e)}):(c.push(e),void 0):r.nextTick(function(){var t=Error("reconnect is off. no new conections will be made.");t.code="E_RECONOFF",e(t)})}var u={reconnect:t,connection:!1,restRetries:e.restRetries||2,restTimeout:e.restTimeout||3e4,expectingStream:{},rest:function(e,t){function r(){--i,a(function(t,r){return t?c(t):(r.rest(e,c),void 0)})}var n,i=this.restRetries,o=this,s=setTimeout(function(){var e=Error("call timedout");e.code="E_TIMEOUT",c(e),n&&delete u.expectingStream[n]},o.restTimeout),c=function(e,a){return u.log("rest response> ",e,a),e&&i>0?r():e?t(e):(a.stream?(o.expectingStream[a.stream]=c,n=a.stream):(t(a.error,a.data),clearTimeout(s)),void 0)};r()},sync:function(e,t){t=t||{},t.token=e;var r={type:"rest",args:{url:"/v1/sync",data:t,method:"get"}},i=n();return s(i,function(e,t,n){return u.log("repipe got error? ",e," should i repipe?"),e&&"E_MDM"!=e.code?n(e):(a(function(e,t){return e?n(e):(n(!1,t.mdm.createReadStream(r)),void 0)}),void 0)}),i.on("data",function(e){r.args.data.start=e.time}),i},stats:function(e,t){t.token=e;var r={type:"rest",args:{url:"/v1/stats",data:t,method:"get"}},i=n();return s(i,function(e,n,i){return e&&"E_MDM"!=e.code?i(e):(n&&(t.start=n.key),a(function(e,t){return e?i(e):(i(!1,t.mdm.createReadStream(r)),void 0)}),void 0)}),i},events:function(){var e=n();return s(e,function(e,t,r){return e&&"E_MDM"!=e.code?r(e):(t&&(u.start=t.key),a(function(e,t){return e?r(e):(r(!1,t.mdm.createReadStream({type:"events"})),void 0)}),void 0)}),e.pipe(n(function(e){e=i(e),e&&this.queue(e)}))},log:function(){}},c=[];return u}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./connection":26,"./json":27,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,repipe:42,through:47}],25:[function(e,t){function r(e){return(s.parse(document.cookie)||{})[e]}function n(e,t){document.cookie=s.serialize(e,t,{expires:new Date(+new Date+2592e6),path:"/"})}function i(e){document.cookie=s.serialize(e,"",{expires:new Date(0),path:"/"})}function o(){for(var e=document.getElementsByTagName("script"),t=0;e.length>t;++t)if((e[t].src||"").indexOf("/pinoccio-api.js")>-1){var r=e[t].src;0===r.indexOf("//")&&(r="http:"+r);var n=a.parse(r);if(n.host)return(n.protocol||"https:")+"//"+n.host}}var s=e("cookie"),a=e("url");t.exports={getCookie:r,setCookie:n,clearCookie:i,findAPIScript:o}},{cookie:34,url:19}],26:[function(e,t){var n=e("rpc-stream"),i=e("mux-demux");t.exports=function(e,t,n){return e(function(){r=o(stream),t(r)}).connect(n)},t.exports.rpc=function o(e){var t=i({error:!0});e.pipe(t).on("error",function(t){console.log("mdm error",t),e.destroy()}).pipe(e);var r=n(),o=r.wrap("rest");r.pipe(t.createStream("rpc")).on("error",function(e){e.code="E_MDM",Object.keys(s._pending).forEach(function(t){s._pending[t](e)})}).pipe(r);var s;return s={_c:0,_pending:{},rest:function(){var e=arguments[arguments.length-1];if("function"==typeof e){var t=++s._c;9007199254740992==t&&(s._c=0),s._pending[t]=arguments[arguments.length-1]=function(){delete s._pending[t],e.apply(this,arguments)}}o.rest.apply(this,arguments)}},e.on("error",function(){t.destroy()}),e.on("end",function(){var e=Error("Stream ended before callback was called.");e.code="E_END",Object.keys(s._pending).forEach(function(t){s._pending[t](e)})}),r.on("end",function(){console.log("RPC> end")}).on("error",function(e){console.log("RPC> error",e)}),s.rpc=r,s.mdm=t,s._stream=e,s}},{"mux-demux":35,"rpc-stream":43}],27:[function(e,t){t.exports=function(e){try{return JSON.parse(e)}catch(t){}}},{}],28:[function(e,t){var r=e("./lib/backoff"),n=e("./lib/strategy/exponential"),i=e("./lib/strategy/fibonacci"),o=e("./lib/function_call.js");t.exports.Backoff=r,t.exports.FunctionCall=o,t.exports.FibonacciStrategy=i,t.exports.ExponentialStrategy=n,t.exports.fibonacci=function(e){return new r(new i(e))},t.exports.exponential=function(e){return new r(new n(e))},t.exports.call=function(e,t,r){var n=Array.prototype.slice.call(arguments);return e=n[0],t=n.slice(1,n.length-1),r=n[n.length-1],new o(e,t,r)}},{"./lib/backoff":29,"./lib/function_call.js":30,"./lib/strategy/exponential":31,"./lib/strategy/fibonacci":32}],29:[function(e,t){function r(e){n.EventEmitter.call(this),this.backoffStrategy_=e,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var n=e("events"),i=e("util");i.inherits(r,n.EventEmitter),r.prototype.failAfter=function(e){if(1>e)throw Error("Maximum number of retry must be greater than 0. Actual: "+e);this.maxNumberOfRetry_=e},r.prototype.backoff=function(e){if(-1!==this.timeoutID_)throw Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e)) | |
},r.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},r.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=r},{events:1,util:21}],30:[function(e,t){function r(e){return"function"==typeof e}function n(e,t,o){if(i.EventEmitter.call(this),!r(e))throw Error("fn should be a function.Actual: "+typeof e);if(!r(o))throw Error("callback should be a function.Actual: "+typeof e);this.function_=e,this.arguments_=t,this.callback_=o,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=n.State_.PENDING}var i=e("events"),o=e("util"),s=e("./backoff"),a=e("./strategy/fibonacci");o.inherits(n,i.EventEmitter),n.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},n.prototype.isPending=function(){return this.state_==n.State_.PENDING},n.prototype.isRunning=function(){return this.state_==n.State_.RUNNING},n.prototype.isCompleted=function(){return this.state_==n.State_.COMPLETED},n.prototype.isAborted=function(){return this.state_==n.State_.ABORTED},n.prototype.setStrategy=function(e){if(!this.isPending())throw Error("FunctionCall in progress.");return this.strategy_=e,this},n.prototype.getResults=function(){return this.results_.concat()},n.prototype.failAfter=function(e){if(!this.isPending())throw Error("FunctionCall in progress.");return this.failAfter_=e,this},n.prototype.abort=function(){if(this.isCompleted())throw Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=n.State_.ABORTED},n.prototype.start=function(e){if(this.isAborted())throw Error("FunctionCall aborted.");if(!this.isPending())throw Error("FunctionCall already started.");var t=this.strategy_||new a;this.backoff_=e?e(t):new s(t),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=n.State_.RUNNING,this.doCall_()},n.prototype.doCall_=function(){var e=["call"].concat(this.arguments_);i.EventEmitter.prototype.emit.apply(this,e);var t=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(t))},n.prototype.doCallback_=function(){var e=this.results_[this.results_.length-1];this.callback_.apply(null,e)},n.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.results_.push(e),i.EventEmitter.prototype.emit.apply(this,["callback"].concat(e)),e[0]?this.backoff_.backoff(e[0]):(this.state_=n.State_.COMPLETED,this.doCallback_())}},n.prototype.handleBackoff_=function(e,t,r){this.emit("backoff",e,t,r)},t.exports=n},{"./backoff":29,"./strategy/fibonacci":32,events:1,util:21}],31:[function(e,t){function r(e){i.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var n=e("util"),i=e("./strategy");n.inherits(r,i),r.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},r.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=r},{"./strategy":33,util:21}],32:[function(e,t){function r(e){i.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var n=e("util"),i=e("./strategy");n.inherits(r,i),r.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},r.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=r},{"./strategy":33,util:21}],33:[function(e,t){function r(e){return void 0!==e&&null!==e}function n(e){if(e=e||{},r(e.initialDelay)&&1>e.initialDelay)throw Error("The initial timeout must be greater than 0.");if(r(e.maxDelay)&&1>e.maxDelay)throw Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw Error("The maximal backoff delay must be greater than the initial backoff delay.");if(r(e.randomisationFactor)&&(0>e.randomisationFactor||e.randomisationFactor>1))throw Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}e("events"),e("util"),n.prototype.getMaxDelay=function(){return this.maxDelay_},n.prototype.getInitialDelay=function(){return this.initialDelay_},n.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_,r=Math.round(e*t);return r},n.prototype.next_=function(){throw Error("BackoffStrategy.next_() unimplemented.")},n.prototype.reset=function(){this.reset_()},n.prototype.reset_=function(){throw Error("BackoffStrategy.reset_() unimplemented.")},t.exports=n},{events:1,util:21}],34:[function(e,t){var r=function(e,t,r){r=r||{};var n=r.encode||i,o=[e+"="+n(t)];if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s))throw Error("maxAge should be a Number");o.push("Max-Age="+s)}return r.domain&&o.push("Domain="+r.domain),r.path&&o.push("Path="+r.path),r.expires&&o.push("Expires="+r.expires.toUTCString()),r.httpOnly&&o.push("HttpOnly"),r.secure&&o.push("Secure"),o.join("; ")},n=function(e,t){t=t||{};var r={},n=e.split(/; */),i=t.decode||o;return n.forEach(function(e){var t=e.indexOf("=");if(!(0>t)){var n=e.substr(0,t).trim(),o=e.substr(++t,e.length).trim();if('"'==o[0]&&(o=o.slice(1,-1)),void 0==r[n])try{r[n]=i(o)}catch(s){r[n]=o}}}),r},i=encodeURIComponent,o=decodeURIComponent;t.exports.serialize=r,t.exports.parse=n},{}],35:[function(e,t){var r=e("./inject"),n=e("stream-serializer");t.exports=r(function(e,t){return n(t&&t.wrapper)(e)})},{"./inject":36,"stream-serializer":38}],36:[function(e,t){"use strict";var r=e("through"),n=e("xtend"),i=e("duplex");t.exports=function(e){function t(t,o){function s(){return Math.random().toString(16).slice(2)+Math.random().toString(16).slice(2)}function a(e){l.removeListener("end",a),l.removeListener("error",a),l.removeListener("close",a);var r=e||Error("unexpected disconnection");for(var n in c){var i=c[n];i.destroyed=!0,t.error!==!0?i.end():(i.emit("error",r),i.destroy())}}function u(e,t,n){f++;var i=r(function(t){if(!this.writable){var r=Error("stream is not writable: "+e);return r.stream=this,h.emit("error",r)}l._data([i.id,"data",t])},function(){l._data([i.id,"end"]),!this.readable||n.allowHalfOpen||this.ended||this.emit("end")});return i.pause=function(){l._data([i.id,"pause"])},i.resume=function(){l._data([i.id,"resume"])},i.error=function(e){l._data([i.id,"error",e])},i.once("close",function(){delete c[e],f--,l._data([i.id,"close"]),0===f&&l.emit("zero")}),i.writable=n.writable,i.readable=n.readable,c[i.id=e]=i,i.meta=t,i}"function"==typeof t&&(o=t,t=null),t=t||{};var c={},f=0,l=i();l.on("_data",function(e){if(Array.isArray(e)&&"string"==typeof e[0]&&"__proto__"!==e[0]&&"string"==typeof e[1]&&"__proto__"!==e[1]){var t=e.shift(),r=e[0],i=c[t];if(i)if("pause"===r)i.paused=!0;else if("resume"===r){var o=i.paused;i.paused=!1,o&&i.emit("drain")}else if("error"===r){var s=e[1];if("string"==typeof s)i.emit("error",Error(s));else if("string"==typeof s.message){var a=Error(s.message);n(a,s),i.emit("error",a)}else i.emit("error",s)}else i.emit.apply(i,e);else{if("close"==r)return;if("new"!=r)return h.emit("unknown",t);l.emit("connection",u(t,e[1].meta,e[1].opts))}}}).on("_end",function(){a(),l._end()});var h=e(l,t);l!==h&&l.on("connection",function(e){h.emit("connection",e)}),h.close=function(e){return l.once("zero",function(){l._end(),e&&e()}),this},o&&h.on("connection",o),h.on("connection",function(e){1===h.listeners("connection").length&&e.error("remote end lacks connection listener "+h.listeners("connection").length)});var d=h.pipe;return h.pipe=function(e,t){return d.call(h,e,t),l.on("end",a),l.on("close",a),l.on("error",a),e},h.createStream=function(e,t){t=t||{},t.writable||t.readable||(t.readable=t.writable=!0);var r=u(s(),e,t),n={writable:t.readable,readable:t.writable};return l._data([r.id,"new",{meta:e,opts:n}]),r},h.createWriteStream=function(e){return h.createStream(e,{writable:!0,readable:!1})},h.createReadStream=function(e){return h.createStream(e,{writable:!1,readable:!0})},h}return t}},{duplex:37,through:47,xtend:39}],37:[function(e,t){(function(r){var n=e("stream");t.exports=function(e,t){var i,o=new n,s=[],a=!1,u=!1;o.writable=o.readable=!0,o.paused=!1,o._paused=!1,o.buffer=s,o.on("pause",function(){o._paused=!0}).on("drain",function(){o._paused=!1}),e&&o.on("_data",e),t&&o.on("_end",t),o.once("end",function(){o.readable=!1,o.writable||r.nextTick(function(){o.destroy()})}),o.once("_end",function(){o.writable=!1,o.readable||o.destroy()}),o._data=function(e){return o.paused||s.length?s.push(e):o.emit("data",e),!(o.paused||s.length)},o._end=function(e){e&&o._data(e),i||(i=!0,o.drain())},o.write=function(e){return o.emit("_data",e),!o._paused},o.end=function(){o.writable=!1,o.ended||(o.ended=!0,o.emit("_end"))},o.drain=function(){if(s.length||i)for(;!o.paused;){if(!s.length)return i&&o.readable?(o.readable=!1,o.emit("end"),void 0):!0;o.emit("data",s.shift()),0==s.length&&o.emit("_drain")}};var c=!1;return o.resume=function(){return c=!0,o.paused=!1,o.drain(),o},o.destroy=function(){u||(u=a=!0,s.length=0,o.emit("close"))},o.pause=function(){return c=!0,o.paused=!0,o.emit("_pause"),o},o._pause=function(){return o._paused||(o._paused=!0,o.emit("pause")),this},o.paused=!0,r.nextTick(function(){c||o.resume()}),o}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,stream:12}],38:[function(e,t,r){var n=e("events").EventEmitter;r=t.exports=function(e){return"function"==typeof e?e:r[e]||r.json},r.json=function(e,t){function r(r){var n;try{n=t.parse(r)}catch(i){return i.line=r,e.emit("error",i)}void 0!==n&&o.call(e,n)}function i(e){var t=(s+e).split("\n");for(s=t.pop();t.length;)r(t.shift())}t=t||JSON;var o=e.write,s="";e.write=i;var a=e.end;return e.end=function(t){return t&&e.write(t),s&&r(s),a.call(e)},e.emit=function(r,i){"data"==r&&(i=t.stringify(i)+"\n"),n.prototype.emit.call(e,r,i)},e},r.raw=function(e){return e}},{events:1}],39:[function(e,t){function r(e){for(var t=1;arguments.length>t;t++)for(var r=arguments[t],n=Object.keys(r),i=0;n.length>i;i++){var o=n[i];e[o]=r[o]}return e}t.exports=r},{}],40:[function(e,t){var r=e("shoe"),n=e("reconnect-core");t.exports=n(function(){var e=Array.prototype.slice.call(arguments);return r.apply(null,e)})},{"reconnect-core":41,shoe:45}],41:[function(e,t){var r=e("events").EventEmitter,n=e("backoff");t.exports=function(e){return function(t,i){function o(r,n){function o(e){if(s.connected=!1,c.removeListener("error",o),c.removeListener("close",o),c.removeListener("end",o),"Request"==c.constructor.name&&c.on("error",function(){}),s.emit("disconnect",e),s.reconnect)try{a.backoff()}catch(t){}}if(!s.connected&&s.reconnect){s.emit("reconnect",r,n);var c=e.apply(null,u);s._connection=c,c.on("error",o).on("close",o).on("end",o),t.immediate||"Request"==c.constructor.name?(s.connected=!0,s.emit("connect",c),s.emit("connection",c),c.once("data",function(){a.reset()})):c.on("connect",function(){a.reset(),s.connected=!0,i&&c.removeListener("connect",i),s.emit("connect",c),s.emit("connection",c)})}}i="function"==typeof t?t:i,t=t||{initialDelay:1e3,maxDelay:3e4},i||(i=t.onConnect);var s=new r;s.connected=!1,s.reconnect=!0,i&&s.on("connection",i);var a=(n[t.type]||n.fibonacci)(t);a.on("backoff",function(e,t){s.emit("backoff",e,t)});var u;return s.connect=s.listen=function(){return this.reconnect=!0,s.connected?void 0:(a.reset(),a.on("ready",o),u=u||[].slice.call(arguments),o(0,0),s)},s.disconnect=function(){return this.reconnect=!1,s._connection&&s._connection.end(),s.emit("disconnect"),s},s}}},{backoff:28,events:1}],42:[function(e,t){function r(e,t){function r(i,o){o=o||{},t(i,o.last,function(t,i){if(t)return e.emit("error",t);if(!i){var s=Error("repipe. no source stream");return s.code="E_REPIPE",e.emit("error",s)}n(o.last,i,e),i.on("error",function(e){r(e,i)}),i.on("disconnect",function(e,t){r(t,i)})})}r()}function n(e,t,r){t.last=e,t.on("data",function(e){t.last=e,r.write(e)});var n=function(){t.pause()},i=function(){t.resume()},o=function(){t.end()},s=function(){r.removeListener("pause",n),r.removeListener("drain",i),r.removeListener("end",o)};return r.on("pause",n),r.on("drain",i),r.on("end",o),t.on("error",function(){t.error=!0,s()}),t.on("end",function(){s(),console.log("end called!",t.error),t.error||(console.log("triggering end"),r.end())}),r}t.exports=r},{}],43:[function(e,t){var r=e("through"),n=e("stream-serializer")();t.exports=function(e,t){function i(e){if(!(e instanceof Error))return e;var t={message:e.message};for(var r in e)t[r]=e[r];return t}function o(e){if(!e||!e.message)return e;var t=Error(e.message);for(var r in e)t[r]=e[r];return t}function s(e){var t=[];for(var r in e)t.push(r);return t}var a={},u=1,c=e||{},f=r(function(t){t=t.slice();var r=t.pop(),n=t.pop(),s=t.pop();if(n[0]&&(n[0]=o(n[0])),null!=s){var u=function(){var e=[].slice.call(arguments);e[0]=i(e[0]),~r&&f.emit("data",[e,r])};try{c[s].call(e,n,u)}catch(l){~r&&f.emit("data",[[i(l)],r])}}else{if(!a[r])return console.error("ERROR: unknown callback id: "+r,t);var u=a[r];delete a[r],u.apply(null,n)}}),l=f.rpc=function(e,t,r){if(r&&(a[++u]=r),"string"!=typeof e)throw Error("name *must* be string");f.emit("data",[e,t,r?u:-1]),r&&9007199254740992==u&&(u=0)};return f.createRemoteCall=function(e){return function(){var t=[].slice.call(arguments),r="function"==typeof t[t.length-1]?t.pop():null;l(e,t,r)}},f.createLocalCall=function(e,t){c[e]=t},f.wrap=function(e,t){t=t||[];var r={};return(Array.isArray(e)?e:"string"==typeof e?[e]:e=s(e)).forEach(function(e){r[e]=f.createRemoteCall(e)}),r},t?f:n(f)}},{"stream-serializer":44,through:47}],44:[function(e,t,r){var n=e("events").EventEmitter;r=t.exports=function(e){return"function"==typeof e?e:r[e]||r.json},r.json=function(e){function t(t){var r;try{r=JSON.parse(t)}catch(n){return e.emit("error",n)}void 0!==r&&i.call(e,r)}function r(e){var r=(o+e).split("\n");for(o=r.pop();r.length;)t(r.shift())}var i=e.write,o="";e.write=r;var s=e.end;return e.end=function(r){return r&&e.write(r),o&&t(o),s.call(e)},e.emit=function(t,r){"data"==t&&(r=JSON.stringify(r)+"\n"),n.prototype.emit.call(e,t,r)},e},r.raw=function(e){return e}},{events:1}],45:[function(e,t){var r=e("stream"),n=e("sockjs-client"),i=e("url").resolve,o=e("url").parse;t.exports=function(e,t){var s=o(e).protocol?e:i(window.location.href,e),a=new r;a.readable=!0,a.writable=!0;var u=!1,c=[],f=n(s);return a.sock=f,a.write=function(e){!u||c.length?c.push(e):f.send(e)},a.end=function(e){return void 0!==e&&a.write(e),u?(a.writable=!1,f.close(),void 0):(a._ended=!0,void 0)},a.destroy=function(){a._ended=!0,a.writable=a.readable=!1,c.length=0,f.close()},f.onopen=function(){"function"==typeof t&&t(),u=!0;for(var e=0;c.length>e;e++)f.send(c[e]);c=[],a.emit("connect"),a._ended&&a.end()},f.onmessage=function(e){a.emit("data",e.data)},f.onclose=function(){a.emit("end"),a.writable=!1,a.readable=!1},a}},{"sockjs-client":46,stream:12,url:19}],46:[function(require,module,exports){var JSON;JSON||(JSON={}),function(){function str(e,t){var r,n,i,o,s,a=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?u+"":"null";case"boolean":case"null":return u+"";case"object":if(!u)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(u)){for(o=u.length,r=0;o>r;r+=1)s[r]=str(r,u)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,r=0;o>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function f(e){return 10>e?"0"+e:e}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,!t||"function"==typeof t||"object"==typeof t&&"number"==typeof t.length)return str("",{"":e});throw Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n=walk(i,r),void 0!==n?i[r]=n:delete i[r]);return reviver.call(e,t,i)}var j;if(text+="",cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();var SockJS=function(){var e=document,t=window,r={},n=function(){};n.prototype.addEventListener=function(e,t){this._listeners||(this._listeners={}),e in this._listeners||(this._listeners[e]=[]);var n=this._listeners[e];-1===r.arrIndexOf(n,t)&&n.push(t)},n.prototype.removeEventListener=function(e,t){if(this._listeners&&e in this._listeners){var n=this._listeners[e],i=r.arrIndexOf(n,t);return-1!==i?(n.length>1?this._listeners[e]=n.slice(0,i).concat(n.slice(i+1)):delete this._listeners[e],void 0):void 0}},n.prototype.dispatchEvent=function(e){var t=e.type,r=Array.prototype.slice.call(arguments,0);if(this["on"+t]&&this["on"+t].apply(this,r),this._listeners&&t in this._listeners)for(var n=0;this._listeners[t].length>n;n++)this._listeners[t][n].apply(this,r)};var i=function(e,t){if(this.type=e,t!==void 0)for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])};i.prototype.toString=function(){var e=[];for(var t in this)if(this.hasOwnProperty(t)){var r=this[t];"function"==typeof r&&(r="[function]"),e.push(t+"="+r)}return"SimpleEvent("+e.join(", ")+")"};var o=function(e){this.events=e||[]};o.prototype.emit=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);!t.nuked&&t["on"+e]&&t["on"+e].apply(t,n),-1===r.arrIndexOf(t.events,e)&&r.log("Event "+JSON.stringify(e)+" not listed "+JSON.stringify(t.events)+" in "+t)},o.prototype.nuke=function(){var e=this;e.nuked=!0;for(var t=0;e.events.length>t;t++)delete e[e.events[t]]};var s="abcdefghijklmnopqrstuvwxyz0123456789_";r.random_string=function(e,t){t=t||s.length;var r,n=[];for(r=0;e>r;r++)n.push(s.substr(Math.floor(Math.random()*t),1));return n.join("")},r.random_number=function(e){return Math.floor(Math.random()*e)},r.random_number_string=function(e){var t=(""+(e-1)).length,n=Array(t+1).join("0");return(n+r.random_number(e)).slice(-t)},r.getOrigin=function(e){e+="/";var t=e.split("/").slice(0,3);return t.join("/")},r.isSameOriginUrl=function(e,r){return r||(r=t.location.href),e.split("/").slice(0,3).join("/")===r.split("/").slice(0,3).join("/")},r.getParentDomain=function(e){if(/^[0-9.]*$/.test(e))return e;if(/^\[/.test(e))return e;if(!/[.]/.test(e))return e;var t=e.split(".").slice(1);return t.join(".")},r.objectExtend=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e};var a="_jp";r.polluteGlobalNamespace=function(){a in t||(t[a]={})},r.closeFrame=function(e,t){return"c"+JSON.stringify([e,t])},r.userSetCode=function(e){return 1e3===e||e>=3e3&&4999>=e},r.countRTO=function(e){var t;return t=e>100?3*e:e+200},r.log=function(){t.console&&console.log&&console.log.apply&&console.log.apply(console,arguments)},r.bind=function(e,t){return e.bind?e.bind(t):function(){return e.apply(t,arguments)}},r.flatUrl=function(e){return-1===e.indexOf("?")&&-1===e.indexOf("#")},r.amendUrl=function(t){var n=e.location;if(!t)throw Error("Wrong url for SockJS");if(!r.flatUrl(t))throw Error("Only basic urls are supported in SockJS");return 0===t.indexOf("//")&&(t=n.protocol+t),0===t.indexOf("/")&&(t=n.protocol+"//"+n.host+t),t=t.replace(/[/]+$/,"")},r.arrIndexOf=function(e,t){for(var r=0;e.length>r;r++)if(e[r]===t)return r;return-1},r.arrSkip=function(e,t){var n=r.arrIndexOf(e,t);if(-1===n)return e.slice();var i=e.slice(0,n);return i.concat(e.slice(n+1))},r.isArray=Array.isArray||function(e){return{}.toString.call(e).indexOf("Array")>=0},r.delay=function(e,t){return"function"==typeof e&&(t=e,e=0),setTimeout(t,e)};var u,c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f={"\0":"\\u0000","":"\\u0001","":"\\u0002","":"\\u0003","":"\\u0004","":"\\u0005","":"\\u0006","":"\\u0007","\b":"\\b"," ":"\\t","\n":"\\n","":"\\u000b","\f":"\\f","\r":"\\r","":"\\u000e","":"\\u000f","":"\\u0010","":"\\u0011","":"\\u0012","":"\\u0013","":"\\u0014","":"\\u0015","":"\\u0016","":"\\u0017","":"\\u0018","":"\\u0019","":"\\u001a","":"\\u001b","":"\\u001c","":"\\u001d","":"\\u001e","":"\\u001f",'"':'\\"',"\\":"\\\\","":"\\u007f","":"\\u0080","":"\\u0081","":"\\u0082","":"\\u0083","":"\\u0084"," ":"\\u0085","":"\\u0086","":"\\u0087","":"\\u0088","":"\\u0089","":"\\u008a","":"\\u008b","":"\\u008c","":"\\u008d","":"\\u008e","":"\\u008f","":"\\u0090","":"\\u0091","":"\\u0092","":"\\u0093","":"\\u0094","":"\\u0095","":"\\u0096","":"\\u0097","":"\\u0098","":"\\u0099","":"\\u009a","":"\\u009b","":"\\u009c","":"\\u009d","":"\\u009e","":"\\u009f","":"\\u00ad","":"\\u0600","":"\\u0601","":"\\u0602","":"\\u0603","":"\\u0604","":"\\u070f","឴":"\\u17b4","឵":"\\u17b5","":"\\u200c","":"\\u200d","":"\\u200e","":"\\u200f","\u2028":"\\u2028","\u2029":"\\u2029","":"\\u202a","":"\\u202b","":"\\u202c","":"\\u202d","":"\\u202e"," ":"\\u202f","":"\\u2060","":"\\u2061","":"\\u2062","":"\\u2063","":"\\u2064","":"\\u2065","":"\\u2066","":"\\u2067","":"\\u2068","":"\\u2069","":"\\u206a","":"\\u206b","":"\\u206c","":"\\u206d","":"\\u206e","":"\\u206f","":"\\ufeff","":"\\ufff0","":"\\ufff1","":"\\ufff2","":"\\ufff3","":"\\ufff4","":"\\ufff5","":"\\ufff6","":"\\ufff7","":"\\ufff8","":"\\ufff9","":"\\ufffa","":"\\ufffb","":"\\ufffc","�":"\\ufffd","":"\\ufffe","":"\\uffff"},l=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,h=JSON&&JSON.stringify||function(e){return c.lastIndex=0,c.test(e)&&(e=e.replace(c,function(e){return f[e]})),'"'+e+'"'},d=function(e){var t,r={},n=[];for(t=0;65536>t;t++)n.push(String.fromCharCode(t));return e.lastIndex=0,n.join("").replace(e,function(e){return r[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""}),e.lastIndex=0,r};r.quote=function(e){var t=h(e);return l.lastIndex=0,l.test(t)?(u||(u=d(l)),t.replace(l,function(e){return u[e]})):t};var p=["websocket","xdr-streaming","xhr-streaming","iframe-eventsource","iframe-htmlfile","xdr-polling","xhr-polling","iframe-xhr-polling","jsonp-polling"];r.probeProtocols=function(){for(var e={},t=0;p.length>t;t++){var r=p[t];e[r]=E[r]&&E[r].enabled()}return e},r.detectProtocols=function(e,t,r){var n={},i=[];t||(t=p);for(var o=0;t.length>o;o++){var s=t[o];n[s]=e[s]}var a=function(e){var t=e.shift();n[t]?i.push(t):e.length>0&&a(e)};return r.websocket!==!1&&a(["websocket"]),n["xhr-streaming"]&&!r.null_origin?i.push("xhr-streaming"):!n["xdr-streaming"]||r.cookie_needed||r.null_origin?a(["iframe-eventsource","iframe-htmlfile"]):i.push("xdr-streaming"),n["xhr-polling"]&&!r.null_origin?i.push("xhr-polling"):!n["xdr-polling"]||r.cookie_needed||r.null_origin?a(["iframe-xhr-polling","jsonp-polling"]):i.push("xdr-polling"),i};var g="_sockjs_global";r.createHook=function(){var e="a"+r.random_string(8);if(!(g in t)){var n={};t[g]=function(e){return e in n||(n[e]={id:e,del:function(){delete n[e]}}),n[e]}}return t[g](e)},r.attachMessage=function(e){r.attachEvent("message",e)},r.attachEvent=function(r,n){t.addEventListener!==void 0?t.addEventListener(r,n,!1):(e.attachEvent("on"+r,n),t.attachEvent("on"+r,n))},r.detachMessage=function(e){r.detachEvent("message",e)},r.detachEvent=function(r,n){t.addEventListener!==void 0?t.removeEventListener(r,n,!1):(e.detachEvent("on"+r,n),t.detachEvent("on"+r,n))};var m={},v=!1,b=function(){for(var e in m)m[e](),delete m[e]},y=function(){v||(v=!0,b())};r.attachEvent("beforeunload",y),r.attachEvent("unload",y),r.unload_add=function(e){var t=r.random_string(8);return m[t]=e,v&&r.delay(b),t},r.unload_del=function(e){e in m&&delete m[e]},r.createIframe=function(t,n){var i,o,s=e.createElement("iframe"),a=function(){clearTimeout(i);try{s.onload=null}catch(e){}s.onerror=null},u=function(){s&&(a(),setTimeout(function(){s&&s.parentNode.removeChild(s),s=null},0),r.unload_del(o))},c=function(e){s&&(u(),n(e))},f=function(e,t){try{s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}catch(r){}};return s.src=t,s.style.display="none",s.style.position="absolute",s.onerror=function(){c("onerror")},s.onload=function(){clearTimeout(i),i=setTimeout(function(){c("onload timeout")},2e3)},e.body.appendChild(s),i=setTimeout(function(){c("timeout")},15e3),o=r.unload_add(u),{post:f,cleanup:u,loaded:a}},r.createHtmlfile=function(e,n){var i,o,s,u=new ActiveXObject("htmlfile"),c=function(){clearTimeout(i)},f=function(){u&&(c(),r.unload_del(o),s.parentNode.removeChild(s),s=u=null,CollectGarbage())},l=function(e){u&&(f(),n(e))},h=function(e,t){try{s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}catch(r){}};u.open(),u.write('<html><script>document.domain="'+document.domain+'";'+"</s"+"cript></html>"),u.close(),u.parentWindow[a]=t[a];var d=u.createElement("div");return u.body.appendChild(d),s=u.createElement("iframe"),d.appendChild(s),s.src=e,i=setTimeout(function(){l("timeout")},15e3),o=r.unload_add(f),{post:h,cleanup:f,loaded:c}};var w=function(){};w.prototype=new o(["chunk","finish"]),w.prototype._start=function(e,n,i,o){var s=this;try{s.xhr=new XMLHttpRequest}catch(a){}if(!s.xhr)try{s.xhr=new t.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}(t.ActiveXObject||t.XDomainRequest)&&(n+=(-1===n.indexOf("?")?"?":"&")+"t="+ +new Date),s.unload_ref=r.unload_add(function(){s._cleanup(!0)});try{s.xhr.open(e,n,!0)}catch(u){return s.emit("finish",0,""),s._cleanup(),void 0}if(o&&o.no_credentials||(s.xhr.withCredentials="true"),o&&o.headers)for(var c in o.headers)s.xhr.setRequestHeader(c,o.headers[c]);s.xhr.onreadystatechange=function(){if(s.xhr){var e=s.xhr;switch(e.readyState){case 3:try{var t=e.status,r=e.responseText}catch(e){}r&&r.length>0&&s.emit("chunk",t,r);break;case 4:s.emit("finish",e.status,e.responseText),s._cleanup(!1)}}},s.xhr.send(i)},w.prototype._cleanup=function(e){var t=this;if(t.xhr){if(r.unload_del(t.unload_ref),t.xhr.onreadystatechange=function(){},e)try{t.xhr.abort()}catch(n){}t.unload_ref=t.xhr=null}},w.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)};var _=r.XHRCorsObject=function(){var e=this,t=arguments;r.delay(function(){e._start.apply(e,t)})};_.prototype=new w;var x=r.XHRLocalObject=function(e,t,n){var i=this;r.delay(function(){i._start(e,t,n,{no_credentials:!0})})};x.prototype=new w;var k=r.XDRObject=function(e,t,n){var i=this;r.delay(function(){i._start(e,t,n)})};k.prototype=new o(["chunk","finish"]),k.prototype._start=function(e,t,n){var i=this,o=new XDomainRequest;t+=(-1===t.indexOf("?")?"?":"&")+"t="+ +new Date;var s=o.ontimeout=o.onerror=function(){i.emit("finish",0,""),i._cleanup(!1)};o.onprogress=function(){i.emit("chunk",200,o.responseText)},o.onload=function(){i.emit("finish",200,o.responseText),i._cleanup(!1)},i.xdr=o,i.unload_ref=r.unload_add(function(){i._cleanup(!0)});try{i.xdr.open(e,t),i.xdr.send(n)}catch(a){s()}},k.prototype._cleanup=function(e){var t=this;if(t.xdr){if(r.unload_del(t.unload_ref),t.xdr.ontimeout=t.xdr.onerror=t.xdr.onprogress=t.xdr.onload=null,e)try{t.xdr.abort()}catch(n){}t.unload_ref=t.xdr=null}},k.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)},r.isXHRCorsCapable=function(){return t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?1:t.XDomainRequest&&e.domain?2:N.enabled()?3:4};var E=function(e,t,n){if(this===window)return new E(e,t,n);var i,o=this;o._options={devel:!1,debug:!1,protocols_whitelist:[],info:void 0,rtt:void 0},n&&r.objectExtend(o._options,n),o._base_url=r.amendUrl(e),o._server=o._options.server||r.random_number_string(1e3),o._options.protocols_whitelist&&o._options.protocols_whitelist.length?i=o._options.protocols_whitelist:(i="string"==typeof t&&t.length>0?[t]:r.isArray(t)?t:null,i&&o._debug('Deprecated API: Use "protocols_whitelist" option instead of supplying protocol list as a second parameter to SockJS constructor.')),o._protocols=[],o.protocol=null,o.readyState=E.CONNECTING,o._ir=J(o._base_url),o._ir.onfinish=function(e,t){o._ir=null,e?(o._options.info&&(e=r.objectExtend(e,o._options.info)),o._options.rtt&&(t=o._options.rtt),o._applyInfo(e,t,i),o._didClose()):o._didClose(1002,"Can't connect to server",!0)}};E.prototype=new n,E.version="0.3.1.7.ga67f.dirty",E.CONNECTING=0,E.OPEN=1,E.CLOSING=2,E.CLOSED=3,E.prototype._debug=function(){this._options.debug&&r.log.apply(r,arguments)},E.prototype._dispatchOpen=function(){var e=this;e.readyState===E.CONNECTING?(e._transport_tref&&(clearTimeout(e._transport_tref),e._transport_tref=null),e.readyState=E.OPEN,e.dispatchEvent(new i("open"))):e._didClose(1006,"Server lost session")},E.prototype._dispatchMessage=function(e){var t=this;t.readyState===E.OPEN&&t.dispatchEvent(new i("message",{data:e}))},E.prototype._dispatchHeartbeat=function(){var e=this;e.readyState===E.OPEN&&e.dispatchEvent(new i("heartbeat",{}))},E.prototype._didClose=function(e,t,n){var o=this;if(o.readyState!==E.CONNECTING&&o.readyState!==E.OPEN&&o.readyState!==E.CLOSING)throw Error("INVALID_STATE_ERR"); | |
o._ir&&(o._ir.nuke(),o._ir=null),o._transport&&(o._transport.doCleanup(),o._transport=null);var s=new i("close",{code:e,reason:t,wasClean:r.userSetCode(e)});if(!r.userSetCode(e)&&o.readyState===E.CONNECTING&&!n){if(o._try_next_protocol(s))return;s=new i("close",{code:2e3,reason:"All transports failed",wasClean:!1,last_event:s})}o.readyState=E.CLOSED,r.delay(function(){o.dispatchEvent(s)})},E.prototype._didMessage=function(e){var t=this,r=e.slice(0,1);switch(r){case"o":t._dispatchOpen();break;case"a":for(var n=JSON.parse(e.slice(1)||"[]"),i=0;n.length>i;i++)t._dispatchMessage(n[i]);break;case"m":var n=JSON.parse(e.slice(1)||"null");t._dispatchMessage(n);break;case"c":var n=JSON.parse(e.slice(1)||"[]");t._didClose(n[0],n[1]);break;case"h":t._dispatchHeartbeat()}},E.prototype._try_next_protocol=function(t){var n=this;for(n.protocol&&(n._debug("Closed transport:",n.protocol,""+t),n.protocol=null),n._transport_tref&&(clearTimeout(n._transport_tref),n._transport_tref=null);;){var i=n.protocol=n._protocols.shift();if(!i)return!1;if(E[i]&&E[i].need_body===!0&&(!e.body||e.readyState!==void 0&&"complete"!==e.readyState))return n._protocols.unshift(i),n.protocol="waiting-for-load",r.attachEvent("load",function(){n._try_next_protocol()}),!0;if(E[i]&&E[i].enabled(n._options)){var o=E[i].roundTrips||1,s=(n._options.rto||0)*o||5e3;n._transport_tref=r.delay(s,function(){n.readyState===E.CONNECTING&&n._didClose(2007,"Transport timeouted")});var a=r.random_string(8),u=n._base_url+"/"+n._server+"/"+a;return n._debug("Opening transport:",i," url:"+u," RTO:"+n._options.rto),n._transport=new E[i](n,u,n._base_url),!0}n._debug("Skipping transport:",i)}},E.prototype.close=function(e,t){var n=this;if(e&&!r.userSetCode(e))throw Error("INVALID_ACCESS_ERR");return n.readyState!==E.CONNECTING&&n.readyState!==E.OPEN?!1:(n.readyState=E.CLOSING,n._didClose(e||1e3,t||"Normal closure"),!0)},E.prototype.send=function(e){var t=this;if(t.readyState===E.CONNECTING)throw Error("INVALID_STATE_ERR");return t.readyState===E.OPEN&&t._transport.doSend(r.quote(""+e)),!0},E.prototype._applyInfo=function(t,n,i){var o=this;o._options.info=t,o._options.rtt=n,o._options.rto=r.countRTO(n),o._options.info.null_origin=!e.domain;var s=r.probeProtocols();o._protocols=r.detectProtocols(s,i,t)};var S=E.websocket=function(e,n){var i=this,o=n+"/websocket";o="https"===o.slice(0,5)?"wss"+o.slice(5):"ws"+o.slice(4),i.ri=e,i.url=o;var s=t.WebSocket||t.MozWebSocket;i.ws=new s(i.url),i.ws.onmessage=function(e){i.ri._didMessage(e.data)},i.unload_ref=r.unload_add(function(){i.ws.close()}),i.ws.onclose=function(){i.ri._didMessage(r.closeFrame(1006,"WebSocket connection broken"))}};S.prototype.doSend=function(e){this.ws.send("["+e+"]")},S.prototype.doCleanup=function(){var e=this,t=e.ws;t&&(t.onmessage=t.onclose=null,t.close(),r.unload_del(e.unload_ref),e.unload_ref=e.ri=e.ws=null)},S.enabled=function(){return!(!t.WebSocket&&!t.MozWebSocket)},S.roundTrips=2;var A=function(){};A.prototype.send_constructor=function(e){var t=this;t.send_buffer=[],t.sender=e},A.prototype.doSend=function(e){var t=this;t.send_buffer.push(e),t.send_stop||t.send_schedule()},A.prototype.send_schedule_wait=function(){var e,t=this;t.send_stop=function(){t.send_stop=null,clearTimeout(e)},e=r.delay(25,function(){t.send_stop=null,t.send_schedule()})},A.prototype.send_schedule=function(){var e=this;if(e.send_buffer.length>0){var t="["+e.send_buffer.join(",")+"]";e.send_stop=e.sender(e.trans_url,t,function(){e.send_stop=null,e.send_schedule_wait()}),e.send_buffer=[]}},A.prototype.send_destructor=function(){var e=this;e._send_stop&&e._send_stop(),e._send_stop=null};var C=function(t,n,i){var o=this;if(!("_send_form"in o)){var s=o._send_form=e.createElement("form"),a=o._send_area=e.createElement("textarea");a.name="d",s.style.display="none",s.style.position="absolute",s.method="POST",s.enctype="application/x-www-form-urlencoded",s.acceptCharset="UTF-8",s.appendChild(a),e.body.appendChild(s)}var s=o._send_form,a=o._send_area,u="a"+r.random_string(8);s.target=u,s.action=t+"/jsonp_send?i="+u;var c;try{c=e.createElement('<iframe name="'+u+'">')}catch(f){c=e.createElement("iframe"),c.name=u}c.id=u,s.appendChild(c),c.style.display="none";try{a.value=n}catch(l){r.log("Your browser is seriously broken. Go home! "+l.message)}s.submit();var h=function(){c.onerror&&(c.onreadystatechange=c.onerror=c.onload=null,r.delay(500,function(){c.parentNode.removeChild(c),c=null}),a.value="",i())};return c.onerror=c.onload=h,c.onreadystatechange=function(){"complete"==c.readyState&&h()},h},j=function(e){return function(t,r,n){var i=new e("POST",t+"/xhr_send",r);return i.onfinish=function(e){n(e)},function(e){n(0,e)}}},L=function(t,n){var i,o,s=e.createElement("script"),a=function(e){o&&(o.parentNode.removeChild(o),o=null),s&&(clearTimeout(i),s.parentNode.removeChild(s),s.onreadystatechange=s.onerror=s.onload=s.onclick=null,s=null,n(e),n=null)},u=!1,c=null;if(s.id="a"+r.random_string(8),s.src=t,s.type="text/javascript",s.charset="UTF-8",s.onerror=function(){c||(c=setTimeout(function(){u||a(r.closeFrame(1006,"JSONP script loaded abnormally (onerror)"))},1e3))},s.onload=function(){a(r.closeFrame(1006,"JSONP script loaded abnormally (onload)"))},s.onreadystatechange=function(){if(/loaded|closed/.test(s.readyState)){if(s&&s.htmlFor&&s.onclick){u=!0;try{s.onclick()}catch(e){}}s&&a(r.closeFrame(1006,"JSONP script loaded abnormally (onreadystatechange)"))}},s.async===void 0&&e.attachEvent)if(/opera/i.test(navigator.userAgent))o=e.createElement("script"),o.text="try{var a = document.getElementById('"+s.id+"'); if(a)a.onerror();}catch(x){};",s.async=o.async=!1;else{try{s.htmlFor=s.id,s.event="onclick"}catch(f){}s.async=!0}s.async!==void 0&&(s.async=!0),i=setTimeout(function(){a(r.closeFrame(1006,"JSONP script loaded abnormally (timeout)"))},35e3);var l=e.getElementsByTagName("head")[0];return l.insertBefore(s,l.firstChild),o&&l.insertBefore(o,l.firstChild),a},O=E["jsonp-polling"]=function(e,t){r.polluteGlobalNamespace();var n=this;n.ri=e,n.trans_url=t,n.send_constructor(C),n._schedule_recv()};O.prototype=new A,O.prototype._schedule_recv=function(){var e=this,t=function(t){e._recv_stop=null,t&&(e._is_closing||e.ri._didMessage(t)),e._is_closing||e._schedule_recv()};e._recv_stop=I(e.trans_url+"/jsonp",L,t)},O.enabled=function(){return!0},O.need_body=!0,O.prototype.doCleanup=function(){var e=this;e._is_closing=!0,e._recv_stop&&e._recv_stop(),e.ri=e._recv_stop=null,e.send_destructor()};var I=function(e,n,i){var o="a"+r.random_string(6),s=e+"?c="+escape(a+"."+o),u=function(e){delete t[a][o],i(e)},c=n(s,u);t[a][o]=c;var f=function(){t[a][o]&&t[a][o](r.closeFrame(1e3,"JSONP user aborted read"))};return f},B=function(){};B.prototype=new A,B.prototype.run=function(e,t,r,n,i){var o=this;o.ri=e,o.trans_url=t,o.send_constructor(j(i)),o.poll=new V(e,n,t+r,i)},B.prototype.doCleanup=function(){var e=this;e.poll&&(e.poll.abort(),e.poll=null)};var M=E["xhr-streaming"]=function(e,t){this.run(e,t,"/xhr_streaming",nt,r.XHRCorsObject)};M.prototype=new B,M.enabled=function(){return t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest&&!/opera/i.test(navigator.userAgent)},M.roundTrips=2,M.need_body=!0;var R=E["xdr-streaming"]=function(e,t){this.run(e,t,"/xhr_streaming",nt,r.XDRObject)};R.prototype=new B,R.enabled=function(){return!!t.XDomainRequest},R.roundTrips=2;var T=E["xhr-polling"]=function(e,t){this.run(e,t,"/xhr",nt,r.XHRCorsObject)};T.prototype=new B,T.enabled=M.enabled,T.roundTrips=2;var D=E["xdr-polling"]=function(e,t){this.run(e,t,"/xhr",nt,r.XDRObject)};D.prototype=new B,D.enabled=R.enabled,D.roundTrips=2;var N=function(){};N.prototype.i_constructor=function(e,t,n){var i=this;i.ri=e,i.origin=r.getOrigin(n),i.base_url=n,i.trans_url=t;var o=n+"/iframe.html";i.ri._options.devel&&(o+="?t="+ +new Date),i.window_id=r.random_string(8),o+="#"+i.window_id,i.iframeObj=r.createIframe(o,function(e){i.ri._didClose(1006,"Unable to load an iframe ("+e+")")}),i.onmessage_cb=r.bind(i.onmessage,i),r.attachMessage(i.onmessage_cb)},N.prototype.doCleanup=function(){var e=this;if(e.iframeObj){r.detachMessage(e.onmessage_cb);try{e.iframeObj.iframe.contentWindow&&e.postMessage("c")}catch(t){}e.iframeObj.cleanup(),e.iframeObj=null,e.onmessage_cb=e.iframeObj=null}},N.prototype.onmessage=function(e){var t=this;if(e.origin===t.origin){var r=e.data.slice(0,8),n=e.data.slice(8,9),i=e.data.slice(9);if(r===t.window_id)switch(n){case"s":t.iframeObj.loaded(),t.postMessage("s",JSON.stringify([E.version,t.protocol,t.trans_url,t.base_url]));break;case"t":t.ri._didMessage(i)}}},N.prototype.postMessage=function(e,t){var r=this;r.iframeObj.post(r.window_id+e+(t||""),r.origin)},N.prototype.doSend=function(e){this.postMessage("m",e)},N.enabled=function(){var e=navigator&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("Konqueror");return("function"==typeof t.postMessage||"object"==typeof t.postMessage)&&!e};var U,P=function(e,n){parent!==t?parent.postMessage(U+e+(n||""),"*"):r.log("Can't postMessage, no parent window.",e,n)},q=function(){};q.prototype._didClose=function(e,t){P("t",r.closeFrame(e,t))},q.prototype._didMessage=function(e){P("t",e)},q.prototype._doSend=function(e){this._transport.doSend(e)},q.prototype._doCleanup=function(){this._transport.doCleanup()},r.parent_origin=void 0,E.bootstrap_iframe=function(){var n;U=e.location.hash.slice(1);var i=function(e){if(e.source===parent&&(r.parent_origin===void 0&&(r.parent_origin=e.origin),e.origin===r.parent_origin)){var i=e.data.slice(0,8),o=e.data.slice(8,9),s=e.data.slice(9);if(i===U)switch(o){case"s":var a=JSON.parse(s),u=a[0],c=a[1],f=a[2],l=a[3];if(u!==E.version&&r.log('Incompatibile SockJS! Main site uses: "'+u+'", the iframe:'+' "'+E.version+'".'),!r.flatUrl(f)||!r.flatUrl(l))return r.log("Only basic urls are supported in SockJS"),void 0;if(!r.isSameOriginUrl(f)||!r.isSameOriginUrl(l))return r.log("Can't connect to different domain from within an iframe. ("+JSON.stringify([t.location.href,f,l])+")"),void 0;n=new q,n._transport=new q[c](n,f,l);break;case"m":n._doSend(s);break;case"c":n&&n._doCleanup(),n=null}}};r.attachMessage(i),P("s")};var F=function(e,t){var n=this;r.delay(function(){n.doXhr(e,t)})};F.prototype=new o(["finish"]),F.prototype.doXhr=function(e,t){var n=this,i=(new Date).getTime(),o=new t("GET",e+"/info"),s=r.delay(8e3,function(){o.ontimeout()});o.onfinish=function(e,t){if(clearTimeout(s),s=null,200===e){var r=(new Date).getTime()-i,o=JSON.parse(t);"object"!=typeof o&&(o={}),n.emit("finish",o,r)}else n.emit("finish")},o.ontimeout=function(){o.close(),n.emit("finish")}};var z=function(t){var n=this,i=function(){var e=new N;e.protocol="w-iframe-info-receiver";var r=function(t){if("string"==typeof t&&"m"===t.substr(0,1)){var r=JSON.parse(t.substr(1)),i=r[0],o=r[1];n.emit("finish",i,o)}else n.emit("finish");e.doCleanup(),e=null},i={_options:{},_didClose:r,_didMessage:r};e.i_constructor(i,t,t)};e.body?i():r.attachEvent("load",i)};z.prototype=new o(["finish"]);var W=function(){var e=this;r.delay(function(){e.emit("finish",{},2e3)})};W.prototype=new o(["finish"]);var J=function(e){if(r.isSameOriginUrl(e))return new F(e,r.XHRLocalObject);switch(r.isXHRCorsCapable()){case 1:return new F(e,r.XHRCorsObject);case 2:return new F(e,r.XDRObject);case 3:return new z(e);default:return new W}},G=q["w-iframe-info-receiver"]=function(e,t,n){var i=new F(n,r.XHRLocalObject);i.onfinish=function(t,r){e._didMessage("m"+JSON.stringify([t,r])),e._didClose()}};G.prototype.doCleanup=function(){};var H=E["iframe-eventsource"]=function(){var e=this;e.protocol="w-iframe-eventsource",e.i_constructor.apply(e,arguments)};H.prototype=new N,H.enabled=function(){return"EventSource"in t&&N.enabled()},H.need_body=!0,H.roundTrips=3;var X=q["w-iframe-eventsource"]=function(e,t){this.run(e,t,"/eventsource",Q,r.XHRLocalObject)};X.prototype=new B;var $=E["iframe-xhr-polling"]=function(){var e=this;e.protocol="w-iframe-xhr-polling",e.i_constructor.apply(e,arguments)};$.prototype=new N,$.enabled=function(){return t.XMLHttpRequest&&N.enabled()},$.need_body=!0,$.roundTrips=3;var Z=q["w-iframe-xhr-polling"]=function(e,t){this.run(e,t,"/xhr",nt,r.XHRLocalObject)};Z.prototype=new B;var K=E["iframe-htmlfile"]=function(){var e=this;e.protocol="w-iframe-htmlfile",e.i_constructor.apply(e,arguments)};K.prototype=new N,K.enabled=function(){return N.enabled()},K.need_body=!0,K.roundTrips=3;var Y=q["w-iframe-htmlfile"]=function(e,t){this.run(e,t,"/htmlfile",rt,r.XHRLocalObject)};Y.prototype=new B;var V=function(e,t,r,n){var i=this;i.ri=e,i.Receiver=t,i.recv_url=r,i.AjaxObject=n,i._scheduleRecv()};V.prototype._scheduleRecv=function(){var e=this,t=e.poll=new e.Receiver(e.recv_url,e.AjaxObject),r=0;t.onmessage=function(t){r+=1,e.ri._didMessage(t.data)},t.onclose=function(r){e.poll=t=t.onmessage=t.onclose=null,e.poll_is_closing||("permanent"===r.reason?e.ri._didClose(1006,"Polling error ("+r.reason+")"):e._scheduleRecv())}},V.prototype.abort=function(){var e=this;e.poll_is_closing=!0,e.poll&&e.poll.abort()};var Q=function(e){var t=this,n=new EventSource(e);n.onmessage=function(e){t.dispatchEvent(new i("message",{data:unescape(e.data)}))},t.es_close=n.onerror=function(e,o){var s=o?"user":2!==n.readyState?"network":"permanent";t.es_close=n.onmessage=n.onerror=null,n.close(),n=null,r.delay(200,function(){t.dispatchEvent(new i("close",{reason:s}))})}};Q.prototype=new n,Q.prototype.abort=function(){var e=this;e.es_close&&e.es_close({},!0)};var et,tt=function(){if(void 0===et)if("ActiveXObject"in t)try{et=!!new ActiveXObject("htmlfile")}catch(e){}else et=!1;return et},rt=function(e){var n=this;r.polluteGlobalNamespace(),n.id="a"+r.random_string(6,26),e+=(-1===e.indexOf("?")?"?":"&")+"c="+escape(a+"."+n.id);var o,s=tt()?r.createHtmlfile:r.createIframe;t[a][n.id]={start:function(){o.loaded()},message:function(e){n.dispatchEvent(new i("message",{data:e}))},stop:function(){n.iframe_close({},"network")}},n.iframe_close=function(e,r){o.cleanup(),n.iframe_close=o=null,delete t[a][n.id],n.dispatchEvent(new i("close",{reason:r}))},o=s(e,function(){n.iframe_close({},"permanent")})};rt.prototype=new n,rt.prototype.abort=function(){var e=this;e.iframe_close&&e.iframe_close({},"user")};var nt=function(e,t){var r=this,n=0;r.xo=new t("POST",e,null),r.xo.onchunk=function(e,t){if(200===e)for(;;){var o=t.slice(n),s=o.indexOf("\n");if(-1===s)break;n+=s+1;var a=o.slice(0,s);r.dispatchEvent(new i("message",{data:a}))}},r.xo.onfinish=function(e,t){r.xo.onchunk(e,t),r.xo=null;var n=200===e?"network":"permanent";r.dispatchEvent(new i("close",{reason:n}))}};return nt.prototype=new n,nt.prototype.abort=function(){var e=this;e.xo&&(e.xo.close(),e.dispatchEvent(new i("close",{reason:"user"})),e.xo=null)},E.getUtils=function(){return r},E.getIframeTransport=function(){return N},E}();"_sockjs_onload"in window&&setTimeout(_sockjs_onload,1),"function"==typeof define&&define.amd&&define("sockjs",[],function(){return SockJS}),"object"==typeof module&&module&&module.exports&&(module.exports=SockJS)},{}],47:[function(e,t,r){(function(n){function i(e,t,r){function i(){for(;c.length&&!l.paused;){var e=c.shift();if(null===e)return l.emit("end");l.emit("data",e)}}function s(){l.writable=!1,t.call(l),!l.readable&&l.autoDestroy&&l.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var a=!1,u=!1,c=[],f=!1,l=new o;return l.readable=l.writable=!0,l.paused=!1,l.autoDestroy=!(r&&r.autoDestroy===!1),l.write=function(t){return e.call(this,t),!l.paused},l.queue=l.push=function(e){return f?l:(null==e&&(f=!0),c.push(e),i(),l)},l.on("end",function(){l.readable=!1,!l.writable&&l.autoDestroy&&n.nextTick(function(){l.destroy()})}),l.end=function(e){return a?void 0:(a=!0,arguments.length&&l.write(e),s(),l)},l.destroy=function(){return u?void 0:(u=!0,a=!0,c.length=0,l.writable=l.readable=!1,l.emit("close"),l)},l.pause=function(){return l.paused?void 0:(l.paused=!0,l)},l.resume=function(){return l.paused&&(l.paused=!1,l.emit("resume")),i(),l.paused||l.emit("drain"),l},l}var o=e("stream");r=t.exports=i,i.through=i}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,stream:12}]},{},[]),require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({1:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],2:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],3:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],"+UWFEP":[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(t);if(0===s.length){if(A(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(E(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return f(t)}var v="",b=!1,w=["{","}"];if(p(t)&&(b=!0,w=["[","]"]),A(t)){var _=t.name?": "+t.name:"";v=" [Function"+_+"]"}if(x(t)&&(v=" "+RegExp.prototype.toString.call(t)),E(t)&&(v=" "+Date.prototype.toUTCString.call(t)),S(t)&&(v=" "+f(t)),0===s.length&&(!b||0==t.length))return w[0]+v+w[1];if(0>n)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=b?l(e,t,n,g,s):s.map(function(r){return h(e,t,n,g,r,b)}),e.seen.pop(),d(k,v,w)}function c(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i){for(var o=[],s=0,a=t.length;a>s;++s)I(t,s+"")?o.push(h(e,t,r,n,s+"",!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}function h(e,t,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),I(n,i)||(s="["+i+"]"),a||(0>e.seen.indexOf(c.value)?(a=m(r)?u(e,c.value,null):u(e,c.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function _(e){return void 0===e}function x(e){return k(e)&&"[object RegExp]"===j(e)}function k(e){return"object"==typeof e&&null!==e}function E(e){return k(e)&&"[object Date]"===j(e)}function S(e){return k(e)&&("[object Error]"===j(e)||e instanceof Error)}function A(e){return"function"==typeof e}function C(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||e===void 0}function j(e){return Object.prototype.toString.call(e)}function L(e){return 10>e?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[L(e.getHours()),L(e.getMinutes()),L(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var B=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;arguments.length>r;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,s=(e+"").replace(B,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return n[r++]+"";case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),a=n[r];o>r;a=n[++r])s+=m(a)||!k(a)?" "+a:" "+i(a);return s},r.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var M,R={};r.debuglog=function(e){if(_(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!R[e])if(RegExp("\\b"+e+"\\b","i").test(M)){var n=t.pid;R[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else R[e]=function(){};return R[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=g,r.isNull=m,r.isNullOrUndefined=v,r.isNumber=b,r.isString=y,r.isSymbol=w,r.isUndefined=_,r.isRegExp=x,r.isObject=k,r.isDate=E,r.isError=S,r.isFunction=A,r.isPrimitive=C,r.isBuffer=e("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":3,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2,inherits:1}],util:[function(e,t){t.exports=e("+UWFEP")},{}]},{},[]),require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({woQU1s:[function(e,t){function r(e,t){var r;for(r in t)i(e,r,t[r])}function n(e,t){return function(r,n){o(r,e,arguments.length>1?n:t)}}function i(e,t,r){e.style[s(t)]=r}function o(e){return 3==arguments.length?i(e,arguments[1],arguments[2]):r(e,arguments[1])}var s=e("to-camel-case");t.exports=o,t.exports.hide=n("display","none"),t.exports.show=n("display","")},{"to-camel-case":3}],"style-dom":[function(e,t){t.exports=e("woQU1s")},{}],3:[function(e,t){t.exports=function(e,t){return e=e.replace(/[_-]([a-z])/g,function(e){return e[1].toUpperCase()}),t&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}},{}]},{},[]),require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({1:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i=typeof e;if("base64"===t&&"string"===i)for(e=j(e);0!==e.length%4;)e+="=";var o;if("number"===i)o=I(e);else if("string"===i)o=n.byteLength(e,t);else{if("object"!==i)throw Error("First argument needs to be a number, array or string.");o=I(e.length)}var s;n._useTypedArrays?s=L(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(n._useTypedArrays&&"function"==typeof Uint8Array&&e instanceof Uint8Array)s._set(e);else if(M(e))for(a=0;o>a;a++)s[a]=n.isBuffer(e)?e.readUInt8(a):e[a];else if("string"===i)s.write(e,0,t);else if("number"===i&&!n._useTypedArrays&&!r)for(a=0;o>a;a++)s[a]=0;return s}function i(e,t,r,i){r=Number(r)||0;var o=e.length-r;i?(i=Number(i),i>o&&(i=o)):i=o;var s=t.length;J(0===s%2,"Invalid hex string"),i>s/2&&(i=s/2);for(var a=0;i>a;a++){var u=parseInt(t.substr(2*a,2),16);J(!isNaN(u),"Invalid hex string"),e[r+a]=u}return n._charsWritten=2*a,a}function o(e,t,r,i){var o=n._charsWritten=P(T(t),e,r,i);return o}function s(e,t,r,i){var o=n._charsWritten=P(D(t),e,r,i);return o}function a(e,t,r,n){return s(e,t,r,n)}function u(e,t,r,i){var o=n._charsWritten=P(U(t),e,r,i);return o}function c(e,t,r,i){var o=n._charsWritten=P(N(t),e,r,i);return o}function f(e,t,r){return 0===t&&r===e.length?G.fromByteArray(e):G.fromByteArray(e.slice(t,r))}function l(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;r>o;o++)127>=e[o]?(n+=q(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+q(i)}function h(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function d(e,t,r){return h(e,t,r)}function p(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=R(e[o]);return i}function g(e,t,r){for(var n=e.slice(t,r),i="",o=0;n.length>o;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function m(e,t,r,n){n||(J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==t&&null!==t,"missing offset"),J(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return r?(o=e[t],i>t+1&&(o|=e[t+1]<<8)):(o=e[t]<<8,i>t+1&&(o|=e[t+1])),o}}function v(e,t,r,n){n||(J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==t&&null!==t,"missing offset"),J(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return r?(i>t+2&&(o=e[t+2]<<16),i>t+1&&(o|=e[t+1]<<8),o|=e[t],i>t+3&&(o+=e[t+3]<<24>>>0)):(i>t+1&&(o=e[t+1]<<16),i>t+2&&(o|=e[t+2]<<8),i>t+3&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}}function b(e,t,r,n){n||(J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==t&&null!==t,"missing offset"),J(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=m(e,t,r,!0),s=32768&o;return s?-1*(65535-o+1):o}}function y(e,t,r,n){n||(J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==t&&null!==t,"missing offset"),J(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=v(e,t,r,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function w(e,t,r,n){return n||(J("boolean"==typeof r,"missing or invalid endian"),J(e.length>t+3,"Trying to read beyond buffer length")),H.read(e,t,r,23,4)}function _(e,t,r,n){return n||(J("boolean"==typeof r,"missing or invalid endian"),J(e.length>t+7,"Trying to read beyond buffer length")),H.read(e,t,r,52,8)}function x(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+1,"trying to write beyond buffer length"),F(t,65535));var o=e.length;if(!(r>=o))for(var s=0,a=Math.min(o-r,2);a>s;s++)e[r+s]=(t&255<<8*(n?s:1-s))>>>8*(n?s:1-s)}function k(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+3,"trying to write beyond buffer length"),F(t,4294967295));var o=e.length;if(!(r>=o))for(var s=0,a=Math.min(o-r,4);a>s;s++)e[r+s]=255&t>>>8*(n?s:3-s)}function E(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+1,"Trying to write beyond buffer length"),z(t,32767,-32768));var o=e.length;r>=o||(t>=0?x(e,t,r,n,i):x(e,65535+t+1,r,n,i))}function S(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+3,"Trying to write beyond buffer length"),z(t,2147483647,-2147483648));var o=e.length;r>=o||(t>=0?k(e,t,r,n,i):k(e,4294967295+t+1,r,n,i))}function A(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+3,"Trying to write beyond buffer length"),W(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;r>=o||H.write(e,t,r,n,23,4)}function C(e,t,r,n,i){i||(J(void 0!==t&&null!==t,"missing value"),J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==r&&null!==r,"missing offset"),J(e.length>r+7,"Trying to write beyond buffer length"),W(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;r>=o||H.write(e,t,r,n,52,8)}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function L(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=X.get,e.set=X.set,e.write=X.write,e.toString=X.toString,e.toLocaleString=X.toString,e.toJSON=X.toJSON,e.copy=X.copy,e.slice=X.slice,e.readUInt8=X.readUInt8,e.readUInt16LE=X.readUInt16LE,e.readUInt16BE=X.readUInt16BE,e.readUInt32LE=X.readUInt32LE,e.readUInt32BE=X.readUInt32BE,e.readInt8=X.readInt8,e.readInt16LE=X.readInt16LE,e.readInt16BE=X.readInt16BE,e.readInt32LE=X.readInt32LE,e.readInt32BE=X.readInt32BE,e.readFloatLE=X.readFloatLE,e.readFloatBE=X.readFloatBE,e.readDoubleLE=X.readDoubleLE,e.readDoubleBE=X.readDoubleBE,e.writeUInt8=X.writeUInt8,e.writeUInt16LE=X.writeUInt16LE,e.writeUInt16BE=X.writeUInt16BE,e.writeUInt32LE=X.writeUInt32LE,e.writeUInt32BE=X.writeUInt32BE,e.writeInt8=X.writeInt8,e.writeInt16LE=X.writeInt16LE,e.writeInt16BE=X.writeInt16BE,e.writeInt32LE=X.writeInt32LE,e.writeInt32BE=X.writeInt32BE,e.writeFloatLE=X.writeFloatLE,e.writeFloatBE=X.writeFloatBE,e.writeDoubleLE=X.writeDoubleLE,e.writeDoubleBE=X.writeDoubleBE,e.fill=X.fill,e.inspect=X.inspect,e.toArrayBuffer=X.toArrayBuffer,e | |
}function O(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function I(e){return e=~~Math.ceil(+e),0>e?0:e}function B(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function M(e){return B(e)||n.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function R(e){return 16>e?"0"+e.toString(16):e.toString(16)}function T(e){for(var t=[],r=0;e.length>r;r++){var n=e.charCodeAt(r);if(127>=n)t.push(e.charCodeAt(r));else{var i=r;n>=55296&&57343>=n&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),s=0;o.length>s;s++)t.push(parseInt(o[s],16))}}return t}function D(e){for(var t=[],r=0;e.length>r;r++)t.push(255&e.charCodeAt(r));return t}function N(e){for(var t,r,n,i=[],o=0;e.length>o;o++)t=e.charCodeAt(o),r=t>>8,n=t%256,i.push(n),i.push(r);return i}function U(e){return G.toByteArray(e)}function P(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}function q(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function F(e,t){J("number"==typeof e,"cannot write a non-number as a number"),J(e>=0,"specified a negative value for writing an unsigned value"),J(t>=e,"value is larger than maximum value for type"),J(Math.floor(e)===e,"value has a fractional component")}function z(e,t,r){J("number"==typeof e,"cannot write a non-number as a number"),J(t>=e,"value larger than maximum allowed value"),J(e>=r,"value smaller than minimum allowed value"),J(Math.floor(e)===e,"value has a fractional component")}function W(e,t,r){J("number"==typeof e,"cannot write a non-number as a number"),J(t>=e,"value larger than maximum allowed value"),J(e>=r,"value smaller than minimum allowed value")}function J(e,t){if(!e)throw Error(t||"Failed assertion")}var G=e("base64-js"),H=e("ieee754");r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192,n._useTypedArrays=function(){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer)return!1;try{var e=new Uint8Array(0);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),n.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},n.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=T(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=U(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw Error("Unknown encoding")}return r},n.concat=function(e,t){if(J(B(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new n(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;e.length>r;r++)t+=e[r].length;var i=new n(t),o=0;for(r=0;e.length>r;r++){var s=e[r];s.copy(i,o),o+=s.length}return i},n.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var f=n;n=t,t=r,r=f}t=Number(t)||0;var l=this.length-t;r?(r=Number(r),r>l&&(r=l)):r=l,n=((n||"utf8")+"").toLowerCase();var h;switch(n){case"hex":h=i(this,e,t,r);break;case"utf8":case"utf-8":h=o(this,e,t,r);break;case"ascii":h=s(this,e,t,r);break;case"binary":h=a(this,e,t,r);break;case"base64":h=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=c(this,e,t,r);break;default:throw Error("Unknown encoding")}return h},n.prototype.toString=function(e,t,r){var n=this;if(e=((e||"utf8")+"").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";var i;switch(e){case"hex":i=p(n,t,r);break;case"utf8":case"utf-8":i=l(n,t,r);break;case"ascii":i=h(n,t,r);break;case"binary":i=d(n,t,r);break;case"base64":i=f(n,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=g(n,t,r);break;default:throw Error("Unknown encoding")}return i},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.copy=function(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){J(n>=r,"sourceEnd < sourceStart"),J(t>=0&&e.length>t,"targetStart out of bounds"),J(r>=0&&i.length>r,"sourceStart out of bounds"),J(n>=0&&i.length>=n,"sourceEnd out of bounds"),n>this.length&&(n=this.length),n-r>e.length-t&&(n=e.length-t+r);for(var o=0;n-r>o;o++)e[o+t]=this[o+r]}},n.prototype.slice=function(e,t){var r=this.length;if(e=O(e,r,0),t=O(t,r,r),n._useTypedArrays)return L(this.subarray(e,t));for(var i=t-e,o=new n(i,void 0,!0),s=0;i>s;s++)o[s]=this[s+e];return o},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.readUInt8=function(e,t){return t||(J(void 0!==e&&null!==e,"missing offset"),J(this.length>e,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},n.prototype.readUInt16LE=function(e,t){return m(this,e,!0,t)},n.prototype.readUInt16BE=function(e,t){return m(this,e,!1,t)},n.prototype.readUInt32LE=function(e,t){return v(this,e,!0,t)},n.prototype.readUInt32BE=function(e,t){return v(this,e,!1,t)},n.prototype.readInt8=function(e,t){if(t||(J(void 0!==e&&null!==e,"missing offset"),J(this.length>e,"Trying to read beyond buffer length")),!(e>=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},n.prototype.readInt16LE=function(e,t){return b(this,e,!0,t)},n.prototype.readInt16BE=function(e,t){return b(this,e,!1,t)},n.prototype.readInt32LE=function(e,t){return y(this,e,!0,t)},n.prototype.readInt32BE=function(e,t){return y(this,e,!1,t)},n.prototype.readFloatLE=function(e,t){return w(this,e,!0,t)},n.prototype.readFloatBE=function(e,t){return w(this,e,!1,t)},n.prototype.readDoubleLE=function(e,t){return _(this,e,!0,t)},n.prototype.readDoubleBE=function(e,t){return _(this,e,!1,t)},n.prototype.writeUInt8=function(e,t,r){r||(J(void 0!==e&&null!==e,"missing value"),J(void 0!==t&&null!==t,"missing offset"),J(this.length>t,"trying to write beyond buffer length"),F(e,255)),t>=this.length||(this[t]=e)},n.prototype.writeUInt16LE=function(e,t,r){x(this,e,t,!0,r)},n.prototype.writeUInt16BE=function(e,t,r){x(this,e,t,!1,r)},n.prototype.writeUInt32LE=function(e,t,r){k(this,e,t,!0,r)},n.prototype.writeUInt32BE=function(e,t,r){k(this,e,t,!1,r)},n.prototype.writeInt8=function(e,t,r){r||(J(void 0!==e&&null!==e,"missing value"),J(void 0!==t&&null!==t,"missing offset"),J(this.length>t,"Trying to write beyond buffer length"),z(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},n.prototype.writeInt16LE=function(e,t,r){E(this,e,t,!0,r)},n.prototype.writeInt16BE=function(e,t,r){E(this,e,t,!1,r)},n.prototype.writeInt32LE=function(e,t,r){S(this,e,t,!0,r)},n.prototype.writeInt32BE=function(e,t,r){S(this,e,t,!1,r)},n.prototype.writeFloatLE=function(e,t,r){A(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){A(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){C(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){C(this,e,t,!1,r)},n.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),J("number"==typeof e&&!isNaN(e),"value is not a number"),J(r>=t,"end < start"),r!==t&&0!==this.length){J(t>=0&&this.length>t,"start out of bounds"),J(r>=0&&this.length>=r,"end out of bounds");for(var n=t;r>n;n++)this[n]=e}},n.prototype.inspect=function(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=R(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},n.prototype.toArrayBuffer=function(){if("function"==typeof Uint8Array){if(n._useTypedArrays)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw Error("Buffer.toArrayBuffer not supported in this browser")};var X=n.prototype},{"base64-js":2,ieee754:3}],2:[function(e,t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(){"use strict";function e(e){var t=e.charCodeAt(0);return t===s?62:t===a?63:u>t?-1:u+10>t?t-u+26+26:f+26>t?t-f:c+26>t?t-c+26:void 0}function n(t){function r(e){c[l++]=e}var n,i,s,a,u,c;if(t.length%4>0)throw Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var l=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===u?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===u&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(255&a>>8),r(255&a)),c}function i(e){function t(e){return r.charAt(e)}function n(e){return t(63&e>>18)+t(63&e>>12)+t(63&e>>6)+t(63&e)}var i,o,s,a=e.length%3,u="";for(i=0,s=e.length-a;s>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=n(o);switch(a){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(63&o<<4),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(63&o>>4),u+=t(63&o<<2),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array;"0".charCodeAt(0);var s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0);t.exports.toByteArray=n,t.exports.fromByteArray=i})()},{}],3:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),1>t*(u=Math.pow(2,-s))&&(s--,u*=2),t+=s+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*g}},{}],4:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,a,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');if(r=this._events[e],s(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:for(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];r.apply(this,a)}else if(o(r)){for(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];for(c=r.slice(),i=c.length,u=0;i>u;u++)c[u].apply(this,a)}return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){i=a;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},{}],5:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],6:[function(e,t){var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],7:[function(e,t){function r(e){return this instanceof r?(s.call(this,e),a.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",n),void 0):new r(e)}function n(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;o(function(){e.end()})}}t.exports=r;var i=e("inherits"),o=e("process/browser.js").nextTick,s=e("./readable.js"),a=e("./writable.js");i(r,s),r.prototype.write=a.prototype.write,r.prototype.end=a.prototype.end,r.prototype._write=a.prototype._write},{"./readable.js":11,"./writable.js":13,inherits:5,"process/browser.js":9}],8:[function(e,t){function r(){n.call(this)}t.exports=r;var n=e("events").EventEmitter,i=e("inherits");i(r,n),r.Readable=e("./readable.js"),r.Writable=e("./writable.js"),r.Duplex=e("./duplex.js"),r.Transform=e("./transform.js"),r.PassThrough=e("./passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function i(){c.readable&&c.resume&&c.resume()}function o(){f||(f=!0,e.end())}function s(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",r),e.removeListener("drain",i),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),e.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",r),e.on("drain",i),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",s));var f=!1;return c.on("error",a),e.on("error",a),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},{"./duplex.js":7,"./passthrough.js":10,"./readable.js":11,"./transform.js":12,"./writable.js":13,events:4,inherits:5}],9:[function(e,t){t.exports=e(6)},{}],10:[function(e,t){function r(e){return this instanceof r?(n.call(this,e),void 0):new r(e)}t.exports=r;var n=e("./transform.js"),i=e("inherits");i(r,n),r.prototype._transform=function(e,t,r){r(null,e)}},{"./transform.js":12,inherits:5}],11:[function(e,t){(function(r){function n(t){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(k||(k=e("string_decoder").StringDecoder),this.decoder=new k(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,S.call(this),void 0):new i(e)}function o(e,t,r,n,i){var o=c(t,r);if(o)e.emit("error",o);else if(null===r||void 0===r)t.reading=!1,t.ended||f(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var a=Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||n||(r=t.decoder.write(r)),t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):(t.reading=!1,t.buffer.push(r)),t.needReadable&&l(e),d(e,t);else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function a(e){if(e>=L)e=L;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=a(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var r=null;return A.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||r||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.length>0?l(e):w(e)}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?C(function(){h(e)}):h(e))}function h(e){e.emit("readable")}function d(e,t){t.readingMore||(t.readingMore=!0,C(function(){p(e,t)}))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&m(e)}}function m(e){function t(e){var t=e.write(r);!1===t&&n.awaitDrain++}var r,n=e._readableState;for(n.awaitDrain=0;n.pipesCount&&null!==(r=e.read());)if(1===n.pipesCount?t(n.pipes,0,null):_(n.pipes,t),e.emit("data",r),n.awaitDrain>0)return;return 0===n.pipesCount?(n.flowing=!1,E.listenerCount(e,"data")>0&&b(e),void 0):(n.ranOut=!0,void 0)}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function b(e,t){var r=e._readableState;if(r.flowing)throw Error("Cannot switch to old mode now.");var n=t||!1,i=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){i=!0;for(var t;!n&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){n=!0,this.emit("pause")},e.resume=function(){n=!1,i?C(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function y(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!e||e>=i)r=o?n.join(""):A.concat(n,i),n.length=0;else if(n[0].length>e){var a=n[0];r=a.slice(0,e),n[0]=a.slice(e)}else if(e===n[0].length)r=n.shift();else{r=o?"":new A(e);for(var u=0,c=0,f=n.length;f>c&&e>u;c++){var a=n[0],l=Math.min(e-u,a.length);o?r+=a.slice(0,l):a.copy(r,u,0,l),a.length>l?n[0]=a.slice(l):n.shift(),u+=l}}return r}function w(e){var t=e._readableState;if(t.length>0)throw Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,C(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function x(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}t.exports=i,i.ReadableState=n;var k,E=e("events").EventEmitter,S=e("./index.js"),A=e("buffer").Buffer,C=e("process/browser.js").nextTick,j=e("inherits");j(i,S),i.prototype.push=function(e,t){var r=this._readableState;return"string"!=typeof e||r.objectMode||(t=t||r.defaultEncoding,t!==r.encoding&&(e=new A(e,t),t="")),o(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){k||(k=e("string_decoder").StringDecoder),this._readableState.decoder=new k(t),this._readableState.encoding=t};var L=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&w(this),null;var n=t.needReadable;t.length-e<=t.highWaterMark&&(n=!0),(t.ended||t.reading)&&(n=!1),n&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=u(r,t));var i;return i=e>0?y(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&w(this),i},i.prototype._read=function(){this.emit("error",Error("not implemented"))},i.prototype.pipe=function(e,t){function n(e){e===f&&o()}function i(){e.end()}function o(){e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){c(),0===b&&0===E.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),c()}function u(){e.removeListener("close",a),c()}function c(){f.unpipe(e)}var f=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,d=h?i:o;l.endEmitted?C(d):f.once("end",d),e.on("unpipe",n);var p=g(f);e.on("drain",p);var b=E.listenerCount(e,"error");return e.once("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",f),l.flowing||(this.on("readable",v),l.flowing=!0,C(function(){m(f)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||b(this),"readable"===e&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&l(this,n):this.read(0))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){b(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){b(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&this[i]===void 0&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(t){e.on(t,function(e){return n.emit.apply(n,t,e)})}),n._read=function(){r&&(r=!1,e.resume())},n},i._fromList=y}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./index.js":8,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,buffer:1,events:4,inherits:5,"process/browser.js":9,string_decoder:14}],12:[function(e,t){function r(e,t){this.afterTransform=function(e,r){return n(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState=new r(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var r=e._writableState;e._readableState;var n=e._transformState;if(r.length)throw Error("calling transform done when ws.length != 0");if(n.transforming)throw Error("calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./duplex.js"),a=e("inherits");a(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(){throw Error("not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(){var e=this._transformState;e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./duplex.js":7,inherits:5}],13:[function(e,t){function r(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function n(e,t){e=e||{};var r=e.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.buffer=[]}function i(e){return this instanceof i||this instanceof x.Duplex?(this._writableState=new n(e,this),this.writable=!0,x.call(this),void 0):new i(e)}function o(e,t,r){var n=Error("write after end");e.emit("error",n),k(function(){r(n)})}function s(e,t,r,n){var i=!0;if(!E.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),k(function(){n(o)}),i=!1}return i}function a(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new E(t,r)),t}function u(e,t,n,i,o){n=a(t,n,i);var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;return t.needDrain=!u,t.writing?t.buffer.push(new r(n,i,o)):c(e,t,s,n,i,o),u}function c(e,t,r,n,i,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,e._write(n,i,t.onwrite),t.sync=!1}function f(e,t,r,n,i){r?k(function(){i(n)}):i(n),e.emit("error",n)}function l(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(l(r),t)f(e,r,n,t,i);else{var o=m(e,r);o||r.bufferProcessing||!r.buffer.length||g(e,r),n?k(function(){d(e,r,o,i)}):d(e,r,o,i)}}function d(e,t,r,n){r||p(e,t),n(),r&&v(e,t)}function p(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){t.bufferProcessing=!0;for(var r=0;t.buffer.length>r;r++){var n=t.buffer[r],i=n.chunk,o=n.encoding,s=n.callback,a=t.objectMode?1:i.length;if(c(e,t,a,i,o,s),t.writing){r++;break}}t.bufferProcessing=!1,t.buffer.length>r?t.buffer=t.buffer.slice(r):t.buffer.length=0}function m(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function v(e,t){var r=m(e,t);return r&&(t.finished=!0,e.emit("finish")),r}function b(e,t,r){t.ending=!0,v(e,t),r&&(t.finished?k(r):e.once("finish",r)),t.ended=!0}t.exports=i,i.WritableState=n;var y="undefined"!=typeof Uint8Array?function(e){return e instanceof Uint8Array}:function(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name},w="undefined"!=typeof ArrayBuffer?function(e){return e instanceof ArrayBuffer}:function(e){return e&&e.constructor&&"ArrayBuffer"===e.constructor.name},_=e("inherits"),x=e("./index.js"),k=e("process/browser.js").nextTick,E=e("buffer").Buffer;_(i,x),i.prototype.pipe=function(){this.emit("error",Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),!E.isBuffer(e)&&y(e)&&(e=new E(e)),w(e)&&"undefined"!=typeof Uint8Array&&(e=new E(new Uint8Array(e))),E.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=function(){}),n.ended?o(this,n,r):s(this,n,e,r)&&(i=u(this,n,e,t,r)),i},i.prototype._write=function(e,t,r){r(Error("not implemented"))},i.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),e!==void 0&&null!==e&&this.write(e,t),n.ending||n.finished||b(this,n,r)}},{"./index.js":8,buffer:1,inherits:5,"process/browser.js":9}],14:[function(e,t,r){function n(e){if(e&&!a.isEncoding(e))throw Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){var t=this.charReceived=e.length%2;return this.charLength=t?2:0,t}function s(e){var t=this.charReceived=e.length%3;return this.charLength=t?3:0,t}var a=e("buffer").Buffer,u=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return this.write=i,void 0}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="",r=0;this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,r,n),this.charReceived+=n-r,r=n,this.charReceived<this.charLength)return""; | |
t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&56319>=i)){if(this.charReceived=this.charLength=0,n==e.length)return t;e=e.slice(n,e.length);break}this.charLength+=this.surrogateSize,t=""}var o=this.detectIncompleteChar(e),s=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-o,s),this.charReceived=o,s-=o),t+=e.toString(this.encoding,0,s);var s=t.length-1,i=t.charCodeAt(s);if(i>=55296&&56319>=i){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),this.charBuffer.write(t.charAt(t.length-1),this.encoding),t.substring(0,s)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&6==r>>5){this.charLength=2;break}if(2>=t&&14==r>>4){this.charLength=3;break}if(3>=t&&30==r>>3){this.charLength=4;break}}return t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:1}],hypernal:[function(e,t){t.exports=e("6Yi6QA")},{}],"6Yi6QA":[function(e,t){"use strict";function r(e){var t=e.getAttribute("style")||"";e.setAttribute("style",t+"overflow-y: auto; /* white-space: pre; */")}function n(e){e&&(e.scrollTop=e.scrollHeight)}var i=e("./term"),o=e("through");t.exports=function(e){var t=new i(e);t.open();var s=o(t.write.bind(t));return s.appendTo=function(e){"string"==typeof e&&(e=document.querySelector(e)),e.appendChild(t.element),r(e),s.container=e,t.element.style.position="relative"},s.writeln=function(e){t.writeln(e),s.tail&&n(s.container)},s.write=function(e){t.write(e),s.tail&&n(s.container)},s.reset=t.reset.bind(t),s.element=t.element,s.term=t,s}},{"./term":44,through:43}],17:[function(e,t){"use strict";t.exports=function(e){e.prototype.blankLine=function(e){for(var t=e?this.curAttr:this.defAttr,r=[t," "],n=[],i=0;this.cols>i;i++)n[i]=r;return n}}},{}],18:[function(e,t){"use strict";t.exports=function(e){e.charsets={},e.charsets.SCLD={"`":"◆",a:"▒",b:" ",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},e.charsets.UK=null,e.charsets.US=null,e.charsets.Dutch=null,e.charsets.Finnish=null,e.charsets.French=null,e.charsets.FrenchCanadian=null,e.charsets.German=null,e.charsets.Italian=null,e.charsets.NorwegianDanish=null,e.charsets.Spanish=null,e.charsets.Swedish=null,e.charsets.Swiss=null,e.charsets.ISOLatin=null}},{}],19:[function(e,t){"use strict";t.exports=function(e){e.colors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],e.colors=function(){function t(e,t,n){i.push("#"+r(e)+r(t)+r(n))}function r(e){return e=e.toString(16),2>e.length?"0"+e:e}var n,i=e.colors,o=[0,95,135,175,215,255];for(n=0;216>n;n++)t(o[0|n/36%6],o[0|n/6%6],o[n%6]);for(n=0;24>n;n++)o=8+10*n,t(o,o,o);return i}(),e.defaultColors={bg:"#000000",fg:"#f0f0f0"},e.colors[256]=e.defaultColors.bg,e.colors[257]=e.defaultColors.fg}},{}],20:[function(e,t){"use strict";t.exports=function(e){e.prototype.charAttributes=function(e){for(var t,r,n,i=e.length,o=0;i>o;o++)if(n=e[o],n>=30&&37>=n)this.curAttr=-261633&this.curAttr|n-30<<9;else if(n>=40&&47>=n)this.curAttr=-512&this.curAttr|n-40;else if(n>=90&&97>=n)n+=8,this.curAttr=-261633&this.curAttr|n-90<<9;else if(n>=100&&107>=n)n+=8,this.curAttr=-512&this.curAttr|n-100;else if(0===n)this.curAttr=this.defAttr;else if(1===n)this.curAttr=this.curAttr|1<<18;else if(4===n)this.curAttr=this.curAttr|2<<18;else if(7===n||27===n){if(7===n){if(4&this.curAttr>>18)continue;this.curAttr=this.curAttr|4<<18}else if(27===n){if(4&~(this.curAttr>>18))continue;this.curAttr=-1048577&this.curAttr}t=511&this.curAttr,r=511&this.curAttr>>9,this.curAttr=-262144&this.curAttr|(t<<9|r)}else if(22===n)this.curAttr=-262145&this.curAttr;else if(24===n)this.curAttr=-524289&this.curAttr;else if(39===n)this.curAttr=-261633&this.curAttr,this.curAttr=this.curAttr|(511&this.defAttr>>9)<<9;else if(49===n)this.curAttr=-512&this.curAttr,this.curAttr=this.curAttr|511&this.defAttr;else if(38===n){if(5!==e[o+1])continue;o+=2,n=255&e[o],this.curAttr=-261633&this.curAttr|n<<9}else if(48===n){if(5!==e[o+1])continue;o+=2,n=255&e[o],this.curAttr=-512&this.curAttr|n}}}},{}],21:[function(e,t){"use strict";t.exports=function(e){e.prototype.saveCursor=function(){this.savedX=this.x,this.savedY=this.y},e.prototype.restoreCursor=function(){this.x=this.savedX||0,this.y=this.savedY||0},e.prototype.cursorUp=function(e){var t=e[0];1>t&&(t=1),this.y-=t,0>this.y&&(this.y=0)},e.prototype.cursorDown=function(e){var t=e[0];1>t&&(t=1),this.y+=t,this.y>=this.rows&&(this.y=this.rows-1)},e.prototype.cursorForward=function(e){var t=e[0];1>t&&(t=1),this.x+=t,this.x>=this.cols&&(this.x=this.cols-1)},e.prototype.cursorBackward=function(e){var t=e[0];1>t&&(t=1),this.x-=t,0>this.x&&(this.x=0)},e.prototype.cursorPos=function(e){var t,r;t=e[0]-1,r=e.length>=2?e[1]-1:0,0>t?t=0:t>=this.rows&&(t=this.rows-1),0>r?r=0:r>=this.cols&&(r=this.cols-1),this.x=r,this.y=t},e.prototype.cursorNextLine=function(e){var t=e[0];1>t&&(t=1),this.y+=t,this.y>=this.rows&&(this.y=this.rows-1),this.x=0},e.prototype.cursorPrecedingLine=function(e){var t=e[0];1>t&&(t=1),this.y-=t,0>this.y&&(this.y=0),this.x=0},e.prototype.cursorCharAbsolute=function(e){var t=e[0];1>t&&(t=1),this.x=t-1},e.prototype.cursorForwardTab=function(e){for(var t=e[0]||1;t--;)this.x=this.nextStop()},e.prototype.cursorBackwardTab=function(e){for(var t=e[0]||1;t--;)this.x=this.prevStop()}}},{}],22:[function(e,t){"use strict";t.exports=function(e){e.prototype.insertChars=function(e){var t,r,n,i;for(t=e[0],1>t&&(t=1),r=this.y+this.ybase,n=this.x,i=[this.curAttr," "];t--&&this.cols>n;)this.lines[r].splice(n++,0,i),this.lines[r].pop()},e.prototype.insertLines=function(e){var t,r,n;for(t=e[0],1>t&&(t=1),r=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n+1;t--;)this.lines.splice(r,0,this.blankLine(!0)),this.lines.splice(n,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},e.prototype.deleteLines=function(e){var t,r,n;for(t=e[0],1>t&&(t=1),r=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n;t--;)this.lines.splice(n+1,0,this.blankLine(!0)),this.lines.splice(r,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},e.prototype.deleteChars=function(e){var t,r,n;for(t=e[0],1>t&&(t=1),r=this.y+this.ybase,n=[this.curAttr," "];t--;)this.lines[r].splice(this.x,1),this.lines[r].push(n)},e.prototype.eraseChars=function(e){var t,r,n,i;for(t=e[0],1>t&&(t=1),r=this.y+this.ybase,n=this.x,i=[this.curAttr," "];t--&&this.cols>n;)this.lines[r][n++]=i}}},{}],23:[function(e,t){"use strict";t.exports=function(e){e.prototype.charPosAbsolute=function(e){var t=e[0];1>t&&(t=1),this.x=t-1,this.x>=this.cols&&(this.x=this.cols-1)},e.prototype.HPositionRelative=function(e){var t=e[0];1>t&&(t=1),this.x+=t,this.x>=this.cols&&(this.x=this.cols-1)},e.prototype.linePosAbsolute=function(e){var t=e[0];1>t&&(t=1),this.y=t-1,this.y>=this.rows&&(this.y=this.rows-1)},e.prototype.VPositionRelative=function(e){var t=e[0];1>t&&(t=1),this.y+=t,this.y>=this.rows&&(this.y=this.rows-1)},e.prototype.HVPosition=function(e){1>e[0]&&(e[0]=1),1>e[1]&&(e[1]=1),this.y=e[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=e[1]-1,this.x>=this.cols&&(this.x=this.cols-1)}}},{}],24:[function(e,t){"use strict";t.exports=function(e){e.prototype.repeatPrecedingCharacter=function(e){for(var t=e[0]||1,r=this.lines[this.ybase+this.y],n=r[this.x-1]||[this.defAttr," "];t--;)r[this.x++]=n}}},{}],25:[function(e,t){"use strict";t.exports=function(e){e.prototype.softReset=function(){this.cursorHidden=!1,this.insertMode=!1,this.originMode=!1,this.wraparoundMode=!1,this.applicationKeypad=!1,this.scrollTop=0,this.scrollBottom=this.rows-1,this.curAttr=this.defAttr,this.x=this.y=0,this.charset=null,this.glevel=0,this.charsets=[null]}}},{}],26:[function(e,t){"use strict";t.exports=function(e){e.prototype.tabClear=function(e){var t=e[0];0>=t?delete this.tabs[this.x]:3===t&&(this.tabs={})}}},{}],27:[function(e,t){"use strict";t.exports=function(e){e.prototype.log=function(){if(e.debug&&window.console&&window.console.log){var t=Array.prototype.slice.call(arguments);window.console.log.apply(window.console,t)}},e.prototype.error=function(){if(e.debug&&window.console&&window.console.error){var t=Array.prototype.slice.call(arguments);window.console.error.apply(window.console,t)}}}},{}],28:[function(e,t){"use strict";t.exports=function(e){e.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){}}}},{}],29:[function(e,t){"use strict";t.exports=function(e){e.prototype.eraseRight=function(e,t){for(var r=this.lines[this.ybase+t],n=[this.curAttr," "];this.cols>e;e++)r[e]=n;this.updateRange(t)},e.prototype.eraseLeft=function(e,t){var r=this.lines[this.ybase+t],n=[this.curAttr," "];for(e++;e--;)r[e]=n;this.updateRange(t)},e.prototype.eraseLine=function(e){this.eraseRight(0,e)},e.prototype.eraseInDisplay=function(e){var t;switch(e[0]){case 0:for(this.eraseRight(this.x,this.y),t=this.y+1;this.rows>t;t++)this.eraseLine(t);break;case 1:for(this.eraseLeft(this.x,this.y),t=this.y;t--;)this.eraseLine(t);break;case 2:for(t=this.rows;t--;)this.eraseLine(t);break;case 3:}},e.prototype.eraseInLine=function(e){switch(e[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}}}},{}],30:[function(e,t){"use strict";var r=e("../states");t.exports=function(e){e.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.state=r.normal},e.prototype.reverseIndex=function(){var e;this.y--,this.y<this.scrollTop&&(this.y++,this.lines.splice(this.y+this.ybase,0,this.blankLine(!0)),e=this.rows-1-this.scrollBottom,this.lines.splice(this.rows-1+this.ybase-e+1,1),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)),this.state=r.normal}}},{"../states":39}],31:[function(e,t){"use strict";t.exports=function(e){e.prototype.reset=function(){e.call(this,this.cols,this.rows),this.refresh(0,this.rows-1)}}},{}],32:[function(e,t){"use strict";var r=e("../states");t.exports=function(e){e.prototype.tabSet=function(){this.tabs[this.x]=!0,this.state=r.normal}}},{"../states":39}],33:[function(e,t){"use strict";function r(){var e=document.createElement("span");e.innerHTML="hello world",document.body.appendChild(e);var t=e.scrollWidth;e.style.fontWeight="bold";var r=e.scrollWidth;return document.body.removeChild(e),t!==r}t.exports=function(e){e.prototype.open=function(){var t,n=0;for(this.element=document.createElement("div"),this.element.className="terminal",this.children=[];this.rows>n;n++)t=document.createElement("div"),this.element.appendChild(t),this.children.push(t);this.refresh(0,this.rows-1),null===e.brokenBold&&(e.brokenBold=r()),this.element.style.backgroundColor=e.defaultColors.bg,this.element.style.color=e.defaultColors.fg}}},{}],34:[function(e,t){"use strict";t.exports=function(e){e.termName="xterm",e.geometry=[80,24],e.cursorBlink=!0,e.visualBell=!1,e.popOnBell=!1,e.scrollback=1e3,e.screenKeys=!1,e.programFeatures=!1,e.debug=!1}},{}],35:[function(e,t){"use strict";function r(){for(;this.y>=this.rows;){this.lines.push(this.blankLine());var e=document.createElement("div");this.element.appendChild(e),this.children.push(e),this.rows++}}t.exports=function(e){e.prototype.updateRange=function(e){this.refreshStart>e&&(this.refreshStart=e),e>this.refreshEnd&&(this.refreshEnd=e),r.bind(this)()},e.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1}}},{}],36:[function(e,t){"use strict";t.exports=function(e){e.prototype.refresh=function(t,r){var n,i,o,s,a,u,c,f,l,h,d,p,g,m;for(c=this.cols,i=t;r>=i;i++){if(g=i+this.ydisp,s=this.lines[g],!s)return this.reset();for(a="",n=i===this.y&&this.cursorState&&this.ydisp===this.ybase&&!this.cursorHidden?this.x:-1,l=this.defAttr,o=0;c>o;o++){switch(f=s[o][0],u=s[o][1],o===n&&(f=-1),f!==l&&(l!==this.defAttr&&(a+="</span>"),f!==this.defAttr&&(-1===f?a+='<span class="reverse-video">':(a+='<span style="',d=511&f,h=511&f>>9,p=f>>18,1&p&&(e.brokenBold||(a+="font-weight:bold;"),8>h&&(h+=8)),2&p&&(a+="text-decoration:underline;"),256!==d&&(a+="background-color:"+e.colors[d]+";"),257!==h&&(a+="color:"+e.colors[h]+";"),a+='">'))),u){case"&":a+="&";break;case"<":a+="<";break;case">":a+=">";break;default:a+=" ">=u?" ":u}l=f}l!==this.defAttr&&(a+="</span>"),this.children[i].innerHTML=a}m&&m.appendChild(this.element)}}},{}],37:[function(e,t){"use strict";t.exports=function(e){e.prototype.setgCharset=function(e,t){this.charsets[e]=t,this.glevel===e&&(this.charset=t)}}},{}],38:[function(e,t){"use strict";t.exports=function(e){e.prototype.setgLevel=function(e){this.glevel=e,this.charset=this.charsets[e]}}},{}],39:[function(e,t){"use strict";t.exports={normal:0,escaped:1,csi:2,osc:3,charset:4,dcs:5,ignore:6}},{}],40:[function(e,t){"use strict";t.exports=function(e){e.prototype.setupStops=function(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);this.cols>e;e+=8)this.tabs[e]=!0},e.prototype.prevStop=function(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this.cols?this.cols-1:0>e?0:e},e.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&this.cols>e;);return e>=this.cols?this.cols-1:0>e?0:e}}},{}],41:[function(e,t){"use strict";t.exports=function(e){e.prototype.ch=function(e){return e?[this.curAttr," "]:[this.defAttr," "]},e.prototype.is=function(t){var r=this.termName||e.termName;return 0===(r+"").indexOf(t)}}},{}],42:[function(e,t){"use strict";function r(e){return e.replace(/([^\r])\n/g,"$1\r\n")}function n(e){return/(^|\n) /.test(e)?e.split("\n").map(function(e){for(var t=0;" "===e.charAt(0);)e=e.slice(1),t++;for(;t--;)e=" "+e;return e}).join("\r\n"):e}var i=e("./states");t.exports=function(e){e.prototype.write=function(t){t=r(t),t=n(t);var o,s,a=t.length,u=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.ybase!==this.ydisp&&(this.ydisp=this.ybase,this.maxRange());a>u;u++)switch(s=t[u],this.state){case i.normal:switch(s){case"":this.bell();break;case"\n":case"":case"\f":this.convertEol&&(this.x=0),this.y++;break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case" ":this.x=this.nextStop();break;case"":this.setgLevel(1);break;case"":this.setgLevel(0);break;case"":this.state=i.escaped;break;default:s>=" "&&(this.charset&&this.charset[s]&&(s=this.charset[s]),this.x>=this.cols&&(this.x=0,this.y++),this.lines[this.y+this.ybase]&&(this.lines[this.y+this.ybase][this.x]=[this.curAttr,s]),this.x++,this.updateRange(this.y))}break;case i.escaped:switch(s){case"[":this.params=[],this.currentParam=0,this.state=i.csi;break;case"]":this.params=[],this.currentParam=0,this.state=i.osc;break;case"P":this.params=[],this.currentParam=0,this.state=i.dcs;break;case"_":this.stateType="apc",this.state=i.ignore;break;case"^":this.stateType="pm",this.state=i.ignore;break;case"c":this.reset();break;case"E":this.x=0;break;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,e.charsets.US),this.state=i.normal,u++;break;case"(":case")":case"*":case"+":case"-":case".":switch(s){case"(":this.gcharset=0;break;case")":this.gcharset=1;break;case"*":this.gcharset=2;break;case"+":this.gcharset=3;break;case"-":this.gcharset=1;break;case".":this.gcharset=2}this.state=i.charset;break;case"/":this.gcharset=3,this.state=i.charset,u--;break;case"N":break;case"O":break;case"n":this.setgLevel(2);break;case"o":this.setgLevel(3);break;case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=i.normal;break;case"8":this.restoreCursor(),this.state=i.normal;break;case"#":this.state=i.normal,u++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.state=i.normal;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.state=i.normal;break;default:this.state=i.normal,this.error("Unknown ESC control: %s.",s)}break;case i.charset:switch(s){case"0":o=e.charsets.SCLD;break;case"A":o=e.charsets.UK;break;case"B":o=e.charsets.US;break;case"4":o=e.charsets.Dutch;break;case"C":case"5":o=e.charsets.Finnish;break;case"R":o=e.charsets.French;break;case"Q":o=e.charsets.FrenchCanadian;break;case"K":o=e.charsets.German;break;case"Y":o=e.charsets.Italian;break;case"E":case"6":o=e.charsets.NorwegianDanish;break;case"Z":o=e.charsets.Spanish;break;case"H":case"7":o=e.charsets.Swedish;break;case"=":o=e.charsets.Swiss;break;case"/":o=e.charsets.ISOLatin,u++;break;default:o=e.charsets.US}this.setgCharset(this.gcharset,o),this.gcharset=null,this.state=i.normal;break;case i.osc:if(""===s||""===s){switch(""===s&&u++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this.params=[],this.currentParam=0,this.state=i.normal}else this.params.length?this.currentParam+=s:s>="0"&&"9">=s?this.currentParam=10*this.currentParam+s.charCodeAt(0)-48:";"===s&&(this.params.push(this.currentParam),this.currentParam="");break;case i.csi:if("?"===s||">"===s||"!"===s){this.prefix=s;break}if(s>="0"&&"9">=s){this.currentParam=10*this.currentParam+s.charCodeAt(0)-48;break}if("$"===s||'"'===s||" "===s||"'"===s){this.postfix=s;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===s)break;switch(this.state=i.normal,s){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.charAttributes(this.params);break;case"n":this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":break;case"l":break;case"r":break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":break;case"T":2>this.params.length&&!this.prefix;break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":switch(this.prefix){case"!":this.softReset(this.params)}break;default:this.error("Unknown CSI code: %s.",s)}this.prefix="",this.postfix="";break;case i.dcs:if(""===s||""===s){switch(""===s&&u++,this.prefix){case"":break;case"$q":var c=this.currentParam;switch(c){case'"q':c='0"q';break;case'"p':c='61"p';break;case"r":c=""+(this.scrollTop+1)+";"+(this.scrollBottom+1)+"r";break;case"m":c="0m";break;default:this.error("Unknown DCS Pt: %s.",c),c=""}break;case"+p":break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=i.normal}else this.currentParam?this.currentParam+=s:this.prefix||"$"===s||"+"===s?2===this.prefix.length?this.currentParam=s:this.prefix+=s:this.currentParam=s;break;case i.ignore:""===s||""===s?(""===s&&u++,this.stateData="",this.state=i.normal):(this.stateData||(this.stateData=""),this.stateData+=s)}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},e.prototype.writeln=function(e){e=e.replace(/ /g," "),this.write(e+" \r\n")}}},{"./states":39}],43:[function(e,t,r){(function(n){function i(e,t,r){function i(){for(;c.length&&!l.paused;){var e=c.shift();if(null===e)return l.emit("end");l.emit("data",e)}}function s(){l.writable=!1,t.call(l),!l.readable&&l.autoDestroy&&l.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var a=!1,u=!1,c=[],f=!1,l=new o;return l.readable=l.writable=!0,l.paused=!1,l.autoDestroy=!(r&&r.autoDestroy===!1),l.write=function(t){return e.call(this,t),!l.paused},l.queue=l.push=function(e){return f?l:(null==e&&(f=!0),c.push(e),i(),l)},l.on("end",function(){l.readable=!1,!l.writable&&l.autoDestroy&&n.nextTick(function(){l.destroy()})}),l.end=function(e){return a?void 0:(a=!0,arguments.length&&l.write(e),s(),l)},l.destroy=function(){return u?void 0:(u=!0,a=!0,c.length=0,l.writable=l.readable=!1,l.emit("close"),l)},l.pause=function(){return l.paused?void 0:(l.paused=!0,l)},l.resume=function(){return l.paused&&(l.paused=!1,l.emit("resume")),i(),l.paused||l.emit("drain"),l},l}var o=e("stream");r=t.exports=i,i.through=i}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,stream:8}],44:[function(e,t){"use strict";function r(e){if(e=e||{},!(this instanceof r))return new r(e);this.cols=e.cols||500,this.rows=e.rows||100,this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol=!1,this.state=n.normal,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.applicationKeypad=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!1,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.lines=[];for(var t=this.rows;t--;)this.lines.push(this.blankLine());this.tabs,this.setupStops()}var n=e("./lib/states");t.exports=r,e("./lib/colors")(r),e("./lib/options")(r),e("./lib/open")(r),e("./lib/destroy")(r),e("./lib/refresh")(r),e("./lib/write")(r),e("./lib/setgLevel"),e("./lib/setgCharset"),e("./lib/debug")(r),e("./lib/stops")(r),e("./lib/erase")(r),e("./lib/blankLine")(r),e("./lib/range")(r),e("./lib/util")(r),e("./lib/esc/index.js")(r),e("./lib/esc/reset.js")(r),e("./lib/esc/tabSet.js")(r),e("./lib/csi/charAttributes")(r),e("./lib/csi/insert-delete")(r),e("./lib/csi/position")(r),e("./lib/csi/cursor")(r),e("./lib/csi/repeatPrecedingCharacter")(r),e("./lib/csi/tabClear")(r),e("./lib/csi/softReset")(r),e("./lib/charsets.js")(r)},{"./lib/blankLine":17,"./lib/charsets.js":18,"./lib/colors":19,"./lib/csi/charAttributes":20,"./lib/csi/cursor":21,"./lib/csi/insert-delete":22,"./lib/csi/position":23,"./lib/csi/repeatPrecedingCharacter":24,"./lib/csi/softReset":25,"./lib/csi/tabClear":26,"./lib/debug":27,"./lib/destroy":28,"./lib/erase":29,"./lib/esc/index.js":30,"./lib/esc/reset.js":31,"./lib/esc/tabSet.js":32,"./lib/open":33,"./lib/options":34,"./lib/range":35,"./lib/refresh":36,"./lib/setgCharset":37,"./lib/setgLevel":38,"./lib/states":39,"./lib/stops":40,"./lib/util":41,"./lib/write":42}]},{},[]),require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({1:[function(e,t,r){(function(e){(function(n){function i(e){throw RangeError(M[e])}function o(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function s(e,t){return o(e.split(B),t).join(".")}function a(e){for(var t,r,n=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function u(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=D(55296|1023&e>>>10),e=56320|1023&e),t+=D(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?T(e/A):e>>1,e+=T(e/t);e>R*E>>1;n+=x)e=T(e/R);return T(n+(R+1)*e/(e+S))}function h(e){var t,r,n,o,s,a,f,h,d,p,g=[],m=e.length,v=0,b=j,y=C;for(r=e.lastIndexOf(L),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&i("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;m>o;){for(s=v,a=1,f=x;o>=m&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=x||h>T((_-v)/a))&&i("overflow"),v+=h*a,d=y>=f?k:f>=y+E?E:f-y,!(d>h);f+=x)p=x-d,a>T(_/p)&&i("overflow"),a*=p;t=g.length+1,y=l(v-s,t,0==s),T(v/t)>_-b&&i("overflow"),b+=T(v/t),v%=t,g.splice(v++,0,b)}return u(g)}function d(e){var t,r,n,o,s,u,c,h,d,p,g,m,v,b,y,w=[];for(e=a(e),m=e.length,t=j,r=0,s=C,u=0;m>u;++u)g=e[u],128>g&&w.push(D(g));for(n=o=w.length,o&&w.push(L);m>n;){for(c=_,u=0;m>u;++u)g=e[u],g>=t&&c>g&&(c=g);for(v=n+1,c-t>T((_-r)/v)&&i("overflow"),r+=(c-t)*v,t=c,u=0;m>u;++u)if(g=e[u],t>g&&++r>_&&i("overflow"),g==t){for(h=r,d=x;p=s>=d?k:d>=s+E?E:d-s,!(p>h);d+=x)y=h-p,b=x-p,w.push(D(f(p+y%b,0))),h=T(y/b);w.push(D(f(h,0))),s=l(r,v,n==o),r=0,++n}++r,++t}return w.join("")}function p(e){return s(e,function(e){return O.test(e)?h(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return I.test(e)?"xn--"+d(e):e})}var m="object"==typeof r&&r,v="object"==typeof t&&t&&t.exports==m&&t,b="object"==typeof e&&e;(b.global===b||b.window===b)&&(n=b);var y,w,_=2147483647,x=36,k=1,E=26,S=38,A=700,C=72,j=128,L="-",O=/^xn--/,I=/[^ -~]/,B=/\x2E|\u3002|\uFF0E|\uFF61/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-k,T=Math.floor,D=String.fromCharCode;if(y={version:"1.2.4",ucs2:{decode:a,encode:u},decode:h,encode:d,toASCII:g,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return y});else if(m&&!m.nodeType)if(v)v.exports=y;else for(w in y)y.hasOwnProperty(w)&&(m[w]=y[w]);else n.punycode=y})(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,i,o){t=t||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;c>f;++f){var l,h,d,p,g=e[f].replace(a,"%20"),m=g.indexOf(i);m>=0?(l=g.substr(0,m),h=g.substr(m+1)):(l=g,h=""),d=decodeURIComponent(l),p=decodeURIComponent(h),r(s,d)?n(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],3:[function(e,t){"use strict";function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;e.length>n;n++)r.push(t(e[n],n));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,s,a){return t=t||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),function(r){var o=encodeURIComponent(n(r))+s;return i(e[r])?e[r].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[r]))}).join(t):a?encodeURIComponent(n(a))+s+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],4:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":2,"./encode":3}],"7gdW4k":[function(e,t,r){(function(){"use strict";function t(e,t,r){if(e&&"object"==typeof e&&e.href)return e;if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i={},o=e;o=o.trim();var c=u.exec(o);if(c){c=c[0];var f=c.toLowerCase();i.protocol=f,o=o.substr(c.length)}if(r||c||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===o.substr(0,2);!l||c&&y[c]||(o=o.substr(2),i.slashes=!0)}if(!y[c]&&(l||c&&!w[c])){var x=o.indexOf("@");if(-1!==x){for(var k=o.slice(0,x),E=!0,S=0,A=p.length;A>S;S++)if(-1!==k.indexOf(p[S])){E=!1;break}E&&(i.auth=decodeURIComponent(k),o=o.substr(x+1))}for(var C=-1,S=0,A=d.length;A>S;S++){var j=o.indexOf(d[S]);-1!==j&&(0>C||C>j)&&(C=j)}-1!==C?(i.host=o.substr(0,C),o=o.substr(C)):(i.host=o,o="");for(var L=s(i.host),O=Object.keys(L),S=0,A=O.length;A>S;S++){var I=O[S];i[I]=L[I]}i.hostname=i.hostname||"";var B="["===i.hostname[0]&&"]"===i.hostname[i.hostname.length-1];if(i.hostname.length>g)i.hostname="";else if(!B)for(var M=i.hostname.split(/\./),S=0,A=M.length;A>S;S++){var R=M[S];if(R&&!R.match(m)){for(var T="",D=0,N=R.length;N>D;D++)T+=R.charCodeAt(D)>127?"x":R[D];if(!T.match(m)){var U=M.slice(0,S),P=M.slice(S+1),q=R.match(v);q&&(U.push(q[1]),P.unshift(q[2])),P.length&&(o="/"+P.join(".")+o),i.hostname=U.join(".");break}}}if(i.hostname=i.hostname.toLowerCase(),!B){for(var F=i.hostname.split("."),z=[],S=0;F.length>S;++S){var W=F[S];z.push(W.match(/[^A-Za-z0-9_-]/)?"xn--"+a.encode(W):W)}i.hostname=z.join(".")}i.host=(i.hostname||"")+(i.port?":"+i.port:""),i.href+=i.host,B&&(i.hostname=i.hostname.substr(1,i.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!b[f])for(var S=0,A=h.length;A>S;S++){var J=h[S],G=encodeURIComponent(J);G===J&&(G=escape(J)),o=o.split(J).join(G)}var H=o.indexOf("#");-1!==H&&(i.hash=o.substr(H),o=o.slice(0,H));var X=o.indexOf("?");return-1!==X?(i.search=o.substr(X),i.query=o.substr(X+1),t&&(i.query=_.parse(i.query)),o=o.slice(0,X)):t&&(i.search="",i.query={}),o&&(i.pathname=o),w[c]&&i.hostname&&!i.pathname&&(i.pathname="/"),(i.pathname||i.search)&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=n(i),i}function n(e){"string"==typeof e&&(e=t(e));var r=e.auth||"";r&&(r=encodeURIComponent(r),r=r.replace(/%3A/i,":"),r+="@");var n=e.protocol||"",i=e.pathname||"",o=e.hash||"",s=!1,a="";void 0!==e.host?s=r+e.host:void 0!==e.hostname&&(s=r+(-1===e.hostname.indexOf(":")?e.hostname:"["+e.hostname+"]"),e.port&&(s+=":"+e.port)),e.query&&"object"==typeof e.query&&Object.keys(e.query).length&&(a=_.stringify(e.query));var u=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||w[n])&&s!==!1?(s="//"+(s||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):s||(s=""),o&&"#"!==o.charAt(0)&&(o="#"+o),u&&"?"!==u.charAt(0)&&(u="?"+u),n+s+i+u+o}function i(e,t){return n(o(e,t))}function o(e,r){if(!e)return r;if(e=t(n(e),!1,!0),r=t(n(r),!1,!0),e.hash=r.hash,""===r.href)return e.href=n(e),e;if(r.slashes&&!r.protocol)return r.protocol=e.protocol,w[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=n(r),r;if(r.protocol&&r.protocol!==e.protocol){if(!w[r.protocol])return r.href=n(r),r;if(e.protocol=r.protocol,!r.host&&!y[r.protocol]){for(var i=(r.pathname||"").split("/");i.length&&!(r.host=i.shift()););r.host||(r.host=""),r.hostname||(r.hostname=""),""!==i[0]&&i.unshift(""),2>i.length&&i.unshift(""),r.pathname=i.join("/")}return e.pathname=r.pathname,e.search=r.search,e.query=r.query,e.host=r.host||"",e.auth=r.auth,e.hostname=r.hostname||r.host,e.port=r.port,(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.slashes=e.slashes||r.slashes,e.href=n(e),e | |
}var o=e.pathname&&"/"===e.pathname.charAt(0),s=void 0!==r.host||r.pathname&&"/"===r.pathname.charAt(0),a=s||o||e.host&&r.pathname,u=a,c=e.pathname&&e.pathname.split("/")||[],i=r.pathname&&r.pathname.split("/")||[],f=e.protocol&&!w[e.protocol];if(f&&(delete e.hostname,delete e.port,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),delete e.host,r.protocol&&(delete r.hostname,delete r.port,r.host&&(""===i[0]?i[0]=r.host:i.unshift(r.host)),delete r.host),a=a&&(""===i[0]||""===c[0])),s)e.host=r.host||""===r.host?r.host:e.host,e.hostname=r.hostname||""===r.hostname?r.hostname:e.hostname,e.search=r.search,e.query=r.query,c=i;else if(i.length)c||(c=[]),c.pop(),c=c.concat(i),e.search=r.search,e.query=r.query;else if("search"in r){if(f){e.hostname=e.host=c.shift();var l=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;l&&(e.auth=l.shift(),e.host=e.hostname=l.shift())}return e.search=r.search,e.query=r.query,(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=n(e),e}if(!c.length)return delete e.pathname,e.search?delete e.path:e.path="/"+e.search,e.href=n(e),e;for(var h=c.slice(-1)[0],d=(e.host||r.host)&&("."===h||".."===h)||""===h,p=0,g=c.length;g>=0;g--)h=c[g],"."==h?c.splice(g,1):".."===h?(c.splice(g,1),p++):p&&(c.splice(g,1),p--);if(!a&&!u)for(;p--;p)c.unshift("..");!a||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),d&&"/"!==c.join("/").substr(-1)&&c.push("");var m=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(f){e.hostname=e.host=m?"":c.length?c.shift():"";var l=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;l&&(e.auth=l.shift(),e.host=e.hostname=l.shift())}return a=a||e.host&&c.length,a&&!m&&c.unshift(""),e.pathname=c.join("/"),(void 0!==e.pathname||void 0!==e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=r.auth||e.auth,e.slashes=e.slashes||r.slashes,e.href=n(e),e}function s(e){var t={},r=c.exec(e);return r&&(r=r[0],":"!==r&&(t.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(t.hostname=e),t}var a=e("punycode");r.parse=t,r.resolve=i,r.resolveObject=o,r.format=n;var u=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","~","`"].concat(f),h=["'"].concat(f),d=["%","/","?",";","#"].concat(l).concat(h),p=["/","@","?","#"].concat(f),g=255,m=/^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/,v=/^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/,b={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=e("querystring")})()},{punycode:1,querystring:4}],url:[function(e,t){t.exports=e("7gdW4k")},{}]},{},[]),require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i}({gHsqXl:[function(e,t,r){function n(e,t){var n;if("console"===r.mode)n={bold:["[1m","[22m"],italic:["[3m","[23m"],underline:["[4m","[24m"],inverse:["[7m","[27m"],strikethrough:["[9m","[29m"],white:["[37m","[39m"],grey:["[90m","[39m"],black:["[30m","[39m"],blue:["[34m","[39m"],cyan:["[36m","[39m"],green:["[32m","[39m"],magenta:["[35m","[39m"],red:["[31m","[39m"],yellow:["[33m","[39m"],whiteBG:["[47m","[49m"],greyBG:["[49;5;8m","[49m"],blackBG:["[40m","[49m"],blueBG:["[44m","[49m"],cyanBG:["[46m","[49m"],greenBG:["[42m","[49m"],magentaBG:["[45m","[49m"],redBG:["[41m","[49m"],yellowBG:["[43m","[49m"]};else if("browser"===r.mode)n={bold:["<b>","</b>"],italic:["<i>","</i>"],underline:["<u>","</u>"],inverse:['<span style="background-color:black;color:white;">',"</span>"],strikethrough:["<del>","</del>"],white:['<span style="color:white;">',"</span>"],grey:['<span style="color:gray;">',"</span>"],black:['<span style="color:black;">',"</span>"],blue:['<span style="color:blue;">',"</span>"],cyan:['<span style="color:cyan;">',"</span>"],green:['<span style="color:green;">',"</span>"],magenta:['<span style="color:magenta;">',"</span>"],red:['<span style="color:red;">',"</span>"],yellow:['<span style="color:yellow;">',"</span>"],whiteBG:['<span style="background-color:white;">',"</span>"],greyBG:['<span style="background-color:gray;">',"</span>"],blackBG:['<span style="background-color:black;">',"</span>"],blueBG:['<span style="background-color:blue;">',"</span>"],cyanBG:['<span style="background-color:cyan;">',"</span>"],greenBG:['<span style="background-color:green;">',"</span>"],magentaBG:['<span style="background-color:magenta;">',"</span>"],redBG:['<span style="background-color:red;">',"</span>"],yellowBG:['<span style="background-color:yellow;">',"</span>"]};else{if("none"===r.mode)return e+"";console.log('unsupported mode, try "browser", "console" or "none"')}return n[t][0]+e+n[t][1]}function i(e){var t=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","charAt","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","charCodeAt","indexOf","lastIndexof","length","localeCompare","match","replace","search","slice","split","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim","trimLeft","trimRight"];Object.keys(e).forEach(function(n){-1!==t.indexOf(n)?console.log("warn: ".red+("String.prototype"+n).magenta+" is probably something you don't want to override. Ignoring style name"):"string"==typeof e[n]?u(n,function(){return r[e[n]](this)}):u(n,function(){for(var t=this,i=0;e[n].length>i;i++)t=r[e[n][i]](t);return t})})}function o(e){return function(){if(!a)return this.replace(/( )/,"$1");var t=this.split("");return t=t.map(e),t.join("")}}function s(e){function t(e){var t=Math.floor(Math.random()*e);return t}function r(e){var t=!1;return o.filter(function(r){t=r===e}),t}function n(e,n){var o,s,a="";n=n||{},n.up=n.up||!0,n.mid=n.mid||!0,n.down=n.down||!0,n.size=n.size||"maxi",e=e.split("");for(s in e)if(!r(s)){switch(a+=e[s],o={up:0,down:0,mid:0},n.size){case"mini":o.up=t(8),o.min=t(2),o.down=t(8);break;case"maxi":o.up=t(16)+3,o.min=t(4)+1,o.down=t(64)+3;break;default:o.up=t(8)+1,o.mid=t(6)/2,o.down=t(8)+1}var u=["up","mid","down"];for(var c in u)for(var f=u[c],l=0;o[f]>=l;l++)n[f]&&(a+=i[f][t(i[f].length)])}return a}var i={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},o=[].concat(i.up,i.down,i.mid);return n(e)}var a=!1;if(t!==void 0&&(a=!0),a)r.mode="console";else{var r={},t={};r.mode="browser"}var u=function(e,t){r[e]=function(e){return t.apply(e)},String.prototype.__defineGetter__(e,t)},c=["bold","underline","strikethrough","italic","inverse","grey","black","yellow","red","green","blue","white","cyan","magenta","greyBG","blackBG","yellowBG","redBG","greenBG","blueBG","whiteBG","cyanBG","magentaBG"];c.forEach(function(e){u(e,function(){return n(this,e)})});var f=function(){var e=["red","yellow","green","blue","magenta"];return function(t,r){return" "===t?t:n(t,e[r++%e.length])}}();r.themes={},r.addSequencer=function(e,t){u(e,o(t))},r.addSequencer("rainbow",f),r.addSequencer("zebra",function(e,t){return 0===t%2?e:e.inverse}),r.setTheme=function(t){if("string"==typeof t)try{return r.themes[t]=e(t),i(r.themes[t]),r.themes[t]}catch(n){return console.log(n),n}else i(t)},u("stripColors",function(){return(""+this).replace(/\x1B\[\d+m/g,"")}),u("zalgo",function(){return s(this)})},{}],colors:[function(e,t){t.exports=e("gHsqXl")},{}]},{},[]);var pinoccio=require("pinoccio"),util=require("util"),style=require("style-dom"),term=require("hypernal")(),url=require("url"),colors=require("colors"),parsed=url.parse(window.location.href,!0),token=(parsed.query||{}).token||"e113fa4270ae050a0c706d29eca5ad25",api=pinoccio();api.token=token;var s=api.sync({stale:1});s.on("data",function(e){term.write(log(e)+"\n")}).on("error",function(e){term.write((e.message||e).red)});var title=document.createElement("h3");title.textContent="GET /v1/sync example",document.body.appendChild(title);var description=document.createElement("div");description.textContent="a real time stream of troop changes and events",document.body.appendChild(description);var el=document.createElement("div");el.id="terminal",document.body.appendChild(el),term.appendTo(el),style(el,{color:"white",background:"black",padding:"15px 20px 15px 20px","border-radius":"15px",border:"2px solid #CEE1F0","font-family":"Monaco","font-size":"16px"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"pinoccio": "0.0.8", | |
"style-dom": "0.0.0", | |
"hypernal": "0.2.7", | |
"colors": "0.6.2" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment