Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update dist scripts

  • Loading branch information...
commit b58142621b6175afb327fc97874c465dc3cbd242 1 parent b62c247
@ramitos authored
Showing with 239 additions and 318 deletions.
  1. +182 −260 dist/restio.js
  2. +57 −58 dist/restio.min.js
View
442 dist/restio.js
@@ -185,157 +185,7 @@ require.relative = function(parent) {
};
return fn;
-};require.register("component-emitter/index.js", function(module, exports, require){
-
-/**
- * Expose `Emitter`.
- */
-
-module.exports = Emitter;
-
-/**
- * Initialize a new `Emitter`.
- *
- * @api public
- */
-
-function Emitter(obj) {
- if (obj) return mixin(obj);
-};
-
-/**
- * Mixin the emitter properties.
- *
- * @param {Object} obj
- * @return {Object}
- * @api private
- */
-
-function mixin(obj) {
- for (var key in Emitter.prototype) {
- obj[key] = Emitter.prototype[key];
- }
- return obj;
-}
-
-/**
- * Listen on the given `event` with `fn`.
- *
- * @param {String} event
- * @param {Function} fn
- * @return {Emitter}
- * @api public
- */
-
-Emitter.prototype.on = function(event, fn){
- this._callbacks = this._callbacks || {};
- (this._callbacks[event] = this._callbacks[event] || [])
- .push(fn);
- return this;
-};
-
-/**
- * Adds an `event` listener that will be invoked a single
- * time then automatically removed.
- *
- * @param {String} event
- * @param {Function} fn
- * @return {Emitter}
- * @api public
- */
-
-Emitter.prototype.once = function(event, fn){
- var self = this;
- this._callbacks = this._callbacks || {};
-
- function on() {
- self.off(event, on);
- fn.apply(this, arguments);
- }
-
- fn._off = on;
- this.on(event, on);
- return this;
-};
-
-/**
- * Remove the given callback for `event` or all
- * registered callbacks.
- *
- * @param {String} event
- * @param {Function} fn
- * @return {Emitter}
- * @api public
- */
-
-Emitter.prototype.off = function(event, fn){
- this._callbacks = this._callbacks || {};
- var callbacks = this._callbacks[event];
- if (!callbacks) return this;
-
- // remove all handlers
- if (1 == arguments.length) {
- delete this._callbacks[event];
- return this;
- }
-
- // remove specific handler
- var i = callbacks.indexOf(fn._off || fn);
- if (~i) callbacks.splice(i, 1);
- return this;
-};
-
-/**
- * Emit `event` with the given args.
- *
- * @param {String} event
- * @param {Mixed} ...
- * @return {Emitter}
- */
-
-Emitter.prototype.emit = function(event){
- this._callbacks = this._callbacks || {};
- var args = [].slice.call(arguments, 1)
- , callbacks = this._callbacks[event];
-
- if (callbacks) {
- callbacks = callbacks.slice(0);
- for (var i = 0, len = callbacks.length; i < len; ++i) {
- callbacks[i].apply(this, args);
- }
- }
-
- return this;
-};
-
-/**
- * Return array of callbacks for `event`.
- *
- * @param {String} event
- * @return {Array}
- * @api public
- */
-
-Emitter.prototype.listeners = function(event){
- this._callbacks = this._callbacks || {};
- return this._callbacks[event] || [];
-};
-
-/**
- * Check if this emitter has `event` handlers.
- *
- * @param {String} event
- * @return {Boolean}
- * @api public
- */
-
-Emitter.prototype.hasListeners = function(event){
- return !! this.listeners(event).length;
-};
-
-
-});
-require.register("visionmedia-debug/index.js", function(module, exports, require){
+};require.register("visionmedia-debug/index.js", function(module, exports, require){
if ('undefined' == typeof window) {
module.exports = require('./lib/debug');
} else {
@@ -549,7 +399,7 @@ exports.decodePacket = function (data) {
/**
* Encodes multiple messages (payload).
- *
+ *
* <length>:data
*
* Example:
@@ -2900,7 +2750,7 @@ require.register("redventures-reduce/index.js", function(module, exports, requir
* TODO: combatible error handling?
*/
-module.exports = function(arr, fn, initial){
+module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
@@ -2910,7 +2760,7 @@ module.exports = function(arr, fn, initial){
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}
-
+
return curr;
};
});
@@ -3041,7 +2891,7 @@ module.exports = function (req, routes, callback) {
var value = null;
var mroute = '';
-
+
if(routes[method]) Object.keys(routes[method]).forEach(function (route) {
var keys = new Array();
var rexp = regex(route, keys, false, false);
@@ -3060,6 +2910,156 @@ module.exports = function (req, routes, callback) {
callback(value, mroute, params, query);
};
});
+require.register("component-emitter/index.js", function(module, exports, require){
+
+/**
+ * Expose `Emitter`.
+ */
+
+module.exports = Emitter;
+
+/**
+ * Initialize a new `Emitter`.
+ *
+ * @api public
+ */
+
+function Emitter(obj) {
+ if (obj) return mixin(obj);
+};
+
+/**
+ * Mixin the emitter properties.
+ *
+ * @param {Object} obj
+ * @return {Object}
+ * @api private
+ */
+
+function mixin(obj) {
+ for (var key in Emitter.prototype) {
+ obj[key] = Emitter.prototype[key];
+ }
+ return obj;
+}
+
+/**
+ * Listen on the given `event` with `fn`.
+ *
+ * @param {String} event
+ * @param {Function} fn
+ * @return {Emitter}
+ * @api public
+ */
+
+Emitter.prototype.on = function(event, fn){
+ this._callbacks = this._callbacks || {};
+ (this._callbacks[event] = this._callbacks[event] || [])
+ .push(fn);
+ return this;
+};
+
+/**
+ * Adds an `event` listener that will be invoked a single
+ * time then automatically removed.
+ *
+ * @param {String} event
+ * @param {Function} fn
+ * @return {Emitter}
+ * @api public
+ */
+
+Emitter.prototype.once = function(event, fn){
+ var self = this;
+ this._callbacks = this._callbacks || {};
+
+ function on() {
+ self.off(event, on);
+ fn.apply(this, arguments);
+ }
+
+ fn._off = on;
+ this.on(event, on);
+ return this;
+};
+
+/**
+ * Remove the given callback for `event` or all
+ * registered callbacks.
+ *
+ * @param {String} event
+ * @param {Function} fn
+ * @return {Emitter}
+ * @api public
+ */
+
+Emitter.prototype.off = function(event, fn){
+ this._callbacks = this._callbacks || {};
+ var callbacks = this._callbacks[event];
+ if (!callbacks) return this;
+
+ // remove all handlers
+ if (1 == arguments.length) {
+ delete this._callbacks[event];
+ return this;
+ }
+
+ // remove specific handler
+ var i = callbacks.indexOf(fn._off || fn);
+ if (~i) callbacks.splice(i, 1);
+ return this;
+};
+
+/**
+ * Emit `event` with the given args.
+ *
+ * @param {String} event
+ * @param {Mixed} ...
+ * @return {Emitter}
+ */
+
+Emitter.prototype.emit = function(event){
+ this._callbacks = this._callbacks || {};
+ var args = [].slice.call(arguments, 1)
+ , callbacks = this._callbacks[event];
+
+ if (callbacks) {
+ callbacks = callbacks.slice(0);
+ for (var i = 0, len = callbacks.length; i < len; ++i) {
+ callbacks[i].apply(this, args);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Return array of callbacks for `event`.
+ *
+ * @param {String} event
+ * @return {Array}
+ * @api public
+ */
+
+Emitter.prototype.listeners = function(event){
+ this._callbacks = this._callbacks || {};
+ return this._callbacks[event] || [];
+};
+
+/**
+ * Check if this emitter has `event` handlers.
+ *
+ * @param {String} event
+ * @return {Boolean}
+ * @api public
+ */
+
+Emitter.prototype.hasListeners = function(event){
+ return !! this.listeners(event).length;
+};
+
+
+});
require.register("component-type/index.js", function(module, exports, require){
/**
@@ -3098,26 +3098,26 @@ var map = require('./map');
module.exports.timestamp = function (from) {
if(!from) from = 1328054400000; //2012/1/1
-
+
var timestamp = (new Date().getTime() - from).toString().split('');
var elements = [];
var hash = '';
-
+
for(var i = 0; i < timestamp.length; i += 1) {
if(i%2 === 0) elements.push(timestamp[i]);
else elements[elements.length -1] += timestamp[i];
}
-
+
for(var y = 0; y < elements.length; y += 1) {
hash += map[elements[y]];
}
-
+
return hash;
}
module.exports.random = function (length) {
if(!length) length = 6;
-
+
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.split('');
var hash = [];
@@ -3241,112 +3241,35 @@ module.exports = {
"09": "ba"
}
});
-require.register("component-stack/index.js", function(module, exports, require){
-
-/**
- * Expose `stack()`.
- */
-
-module.exports = stack;
-
-/**
- * Return the stack.
- *
- * @return {Array}
- * @api public
- */
-
-function stack() {
- var orig = Error.prepareStackTrace;
- Error.prepareStackTrace = function(_, stack){ return stack; };
- var err = new Error;
- Error.captureStackTrace(err, arguments.callee);
- var stack = err.stack;
- Error.prepareStackTrace = orig;
- return stack;
-}
-});
-require.register("component-assert/index.js", function(module, exports, require){
-
-/**
- * Module dependencies.
- */
-
-var stack = require('stack');
-
-/**
- * Load contents of `script`.
- *
- * @param {String} script
- * @return {String}
- * @api private
- */
-
-function getScript(script) {
- var xhr = new XMLHttpRequest;
- xhr.open('GET', script, false);
- xhr.send(null);
- return xhr.responseText;
-}
-
-/**
- * Assert `expr` with optional failure `msg`.
- *
- * @param {Mixed} expr
- * @param {String} [msg]
- * @api public
- */
-
-module.exports = function(expr, msg){
- if (expr) return;
- if (!msg) {
- if (Error.captureStackTrace) {
- var callsite = stack()[1];
- var fn = callsite.fun.toString();
- var file = callsite.getFileName();
- var line = callsite.getLineNumber() - 1;
- var col = callsite.getColumnNumber() - 1;
- var src = getScript(file);
- line = src.split('\n')[line].slice(col);
- expr = line.match(/assert\((.*)\)/)[1].trim();
- msg = expr;
- } else {
- msg = 'assertion failed';
- }
- }
-
- throw new Error(msg);
-};
-});
require.register("restio/src/client/restio.js", function(module, exports, require){
var methods = require('../methods'),
packet = require('../packet'),
setup = require('../setup'),
mr = require('match-route'),
eio = require('engine.io'),
- getOn = require('../on');
+ getOn = require('../on'),
+ ev = require('emitter');
module.exports.connect = function (addr, callback) {
var socket = new eio.Socket(addr);
var callbacks = {};
- var io = {on: {}};
+ var io = new ev();
var routes = {};
-
+
methods.forEach(function (method) {
setup.methods(method, callbacks, routes);
setup.request(method, io, socket, callbacks);
setup.on(method, io, routes);
});
-
+
var on = getOn(socket, callbacks, routes);
-
- on.error = function (e) {
- throw e;
- };
-
+
socket.on('message', on.message);
- socket.on('error', on.error);
-
+
+ socket.on('error', function (e) {
+ io.emit('error', e);
+ });
+
socket.on('open', function () {
callback(io);
});
@@ -3389,10 +3312,10 @@ module.exports.request = function (method, io, socket, callbacks) {
io[method] = function () {
var args = parseArgs(arguments)
var id = sgen.timestamp();
-
+
socket.send(packet.parse(method, args.data, args.url, id, false));
callbacks[method][id] = args.callback;
-
+
args.callback.tm = setTimeout(function () {
clearTimeout(callbacks[method][id].tm);
callbacks[method][id] = undefined;
@@ -3402,7 +3325,7 @@ module.exports.request = function (method, io, socket, callbacks) {
module.exports.server = function (arg) {
assert(type(arg) == 'string' || type(arg) == 'object');
-
+
if(type(arg) == 'string') return engine.listen(arg);
else return engine.attach(arg)
};
@@ -3416,7 +3339,7 @@ var isNode = function () {
var parseArgs = function (args) {
args = Array.prototype.slice.call(args);
var returns = {};
-
+
if(!args.length) {
assert(args.length >= 1);
} else if(args.length == 1) {
@@ -3445,7 +3368,7 @@ var parseArgs = function (args) {
returns.data = args.shift();
returns.callback = args.shift();
}
-
+
return returns;
};
});
@@ -3462,19 +3385,19 @@ var platform = require('./platform'),
module.exports = function (socket, callbacks, routes) {
var on = {};
-
+
on.message = function (msg) {
msg = JSON.parse(msg)
if(msg.rsp && callbacks[msg.method][msg.id]) on.response(msg);
else if(!msg.rsp) on.request(msg);
};
-
+
on.response = function (res) {
clearTimeout(callbacks[res.method][res.id].tm);
callbacks[res.method][res.id](res.data);
callbacks[res.method][res.id] = undefined;
};
-
+
on.request = function (req) {
mr(req, routes, function (callback, route, params, query) {
callback({
@@ -3487,7 +3410,7 @@ module.exports = function (socket, callbacks, routes) {
});
});
};
-
+
return on;
};
@@ -3522,15 +3445,14 @@ require.alias("redventures-reduce/index.js", "component-querystring/deps/reduce/
require.alias("component-url/index.js", "ramitos-match-route/deps/url/index.js");
+require.alias("component-emitter/index.js", "restio/deps/emitter/index.js");
+
require.alias("component-type/index.js", "restio/deps/type/index.js");
require.alias("ramitos-sgen/src/sgen.js", "restio/deps/sgen/src/sgen.js");
require.alias("ramitos-sgen/src/map.js", "restio/deps/sgen/src/map.js");
require.alias("ramitos-sgen/src/sgen.js", "restio/deps/sgen/index.js");
-require.alias("component-assert/index.js", "restio/deps/assert/index.js");
-require.alias("component-stack/index.js", "component-assert/deps/stack/index.js");
-
require.alias("restio/src/client/restio.js", "restio/index.js");
if ("undefined" == typeof module) {
window.restio = require("restio");
View
115 dist/restio.min.js
@@ -1,69 +1,68 @@
-;(function(){function d(f,c,a){var b=d.resolve(f),g=d.modules[b];if(null==b)throw Error('failed to require "'+(a||f)+'" from "'+(c||"root")+'"');g.exports||(g.exports={},g.client=g.component=!0,g.call(this,g,g.exports,d.relative(b)));return g.exports}d.modules={};d.aliases={};d.resolve=function(f){var c=f+".js",a=f+".json",b=f+"/index.js",g=f+"/index.json";return d.modules[c]&&c||d.modules[a]&&a||d.modules[b]&&b||d.modules[g]&&g||d.modules[f]&&f||d.aliases[b]};d.normalize=function(f,c){var a=[];if("."!=
-c.charAt(0))return c;for(var f=f.split("/"),c=c.split("/"),b=0;b<c.length;++b)".."==c[b]?f.pop():"."!=c[b]&&""!=c[b]&&a.push(c[b]);return f.concat(a).join("/")};d.register=function(f,c){d.modules[f]=c};d.alias=function(f,c){if(!d.modules[f])throw Error('failed to alias "'+f+'", it does not exist');d.aliases[c]=f};d.relative=function(f){function c(b){var a=b,b=c.resolve(b);return d(b,f,a)}var a=d.normalize(f,"..");c.resolve=function(b){if("."!=b.charAt(0)){var c=f.split("/"),e;a:{for(e=c.length;e--;)if("deps"===
-c[e])break a;e=-1}(e+=1)||(e=0);return b=c.slice(0,e+1).join("/")+"/deps/"+b}return d.normalize(a,b)};c.exists=function(b){return!!d.modules[c.resolve(b)]};return c};d.register("component-emitter/index.js",function(f){function c(a){if(a){for(var b in c.prototype)a[b]=c.prototype[b];return a}}f.exports=c;c.prototype.on=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};c.prototype.once=function(a,b){function c(){e.off(a,c);b.apply(this,
-arguments)}var e=this;this._callbacks=this._callbacks||{};b._off=c;this.on(a,c);return this};c.prototype.off=function(a,b){this._callbacks=this._callbacks||{};var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;var e=c.indexOf(b._off||b);~e&&c.splice(e,1);return this};c.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c)for(var c=c.slice(0),e=0,h=c.length;e<h;++e)c[e].apply(this,
-b);return this};c.prototype.listeners=function(a){this._callbacks=this._callbacks||{};return this._callbacks[a]||[]};c.prototype.hasListeners=function(a){return!!this.listeners(a).length}});d.register("visionmedia-debug/index.js",function(f,c,a){f.exports="undefined"==typeof window?a("./lib/debug"):a("./debug")});d.register("visionmedia-debug/debug.js",function(f){function c(a){return!c.enabled(a)?function(){}:function(b){var g=new Date,e=g-(c[a]||g);c[a]=g;b=a+" "+b+" +"+c.humanize(e);window.console&&
-console.log&&Function.prototype.apply.call(console.log,console,arguments)}}f.exports=c;c.names=[];c.skips=[];c.enable=function(a){localStorage.debug=a;for(var b=(a||"").split(/[\s,]+/),g=b.length,e=0;e<g;e++)a=b[e].replace("*",".*?"),"-"===a[0]?c.skips.push(RegExp("^"+a.substr(1)+"$")):c.names.push(RegExp("^"+a+"$"))};c.disable=function(){c.enable("")};c.humanize=function(a){return 36E5<=a?(a/36E5).toFixed(1)+"h":6E4<=a?(a/6E4).toFixed(1)+"m":1E3<=a?(a/1E3|0)+"s":a+"ms"};c.enabled=function(a){for(var b=
-0,g=c.skips.length;b<g;b++)if(c.skips[b].test(a))return!1;b=0;for(g=c.names.length;b<g;b++)if(c.names[b].test(a))return!0;return!1};window.localStorage&&c.enable(localStorage.debug)});d.register("LearnBoost-engine.io-client/lib/index.js",function(f,c,a){f.exports=a("./socket")});d.register("LearnBoost-engine.io-client/lib/parser.js",function(f,c,a){var f=a("./util"),b=c.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=f.keys(b),e={type:"error",data:"parser error"};c.encodePacket=
-function(a){var c=b[a.type];void 0!==a.data&&(c+=String(a.data));return""+c};c.decodePacket=function(b){var a=b.charAt(0);return Number(a)!=a||!g[a]?e:1<b.length?{type:g[a],data:b.substring(1)}:{type:g[a]}};c.encodePayload=function(b){if(!b.length)return"0:";for(var a="",i,k=0,j=b.length;k<j;k++)i=c.encodePacket(b[k]),a+=i.length+":"+i;return a};c.decodePayload=function(b){if(""==b)return[e];for(var a=[],i="",k,j,m=0,g=b.length;m<g;m++)if(j=b.charAt(m),":"!=j)i+=j;else{if(""==i||i!=(k=Number(i)))return[e];
-j=b.substr(m+1,k);if(i!=j.length)return[e];if(j.length){i=c.decodePacket(j);if(e.type==i.type&&e.data==i.data)return[e];a.push(i)}m+=k;i=""}return""!=i?[e]:a}});d.register("LearnBoost-engine.io-client/lib/socket.js",function(f,c,a){function b(a,c){if(!(this instanceof b))return new b(a);if("string"==typeof a){var j=g.parseUri(a),a=c||{};a.host=j.host;a.secure="https"==j.protocol||"wss"==j.protocol;a.port=j.port}a=a||{};this.secure=null!=a.secure?a.secure:d.location&&"https:"==location.protocol;this.host=
-a.host||a.hostname||(d.location?location.hostname:"localhost");this.port=a.port||(d.location&&location.port?location.port:this.secure?443:80);this.query=a.query||{};this.query.uid=String(Math.random()).substr(5)+String(Math.random()).substr(5);this.upgrade=!1!==a.upgrade;this.resource=a.resource||"default";this.path=(a.path||"/engine.io").replace(/\/$/,"");this.path+="/"+this.resource+"/";this.forceJSONP=!!a.forceJSONP;this.timestampParam=a.timestampParam||"t";this.timestampRequests=!!a.timestampRequests;
-this.flashPath=a.flashPath||"";this.transports=a.transports||["polling","websocket","flashsocket"];this.readyState="";this.writeBuffer=[];this.policyPort=a.policyPort||843;this.open();b.sockets.push(this);b.sockets.evs.emit("add",this)}var g=a("./util"),e=a("./transports"),c=a("./emitter"),h=a("debug")("engine-client:socket");f.exports=b;var d="undefined"!=typeof window?window:d;c(b.prototype);b.protocol=1;b.sockets=[];b.sockets.evs=new c;b.Socket=b;b.Transport=a("./transport");b.Emitter=a("./emitter");
-b.transports=a("./transports");b.util=a("./util");b.parser=a("./parser");b.prototype.createTransport=function(a){h('creating transport "%s"',a);var b=this.query,c={},m;for(m in b)b.hasOwnProperty(m)&&(c[m]=b[m]);c.transport=a;this.id&&(c.sid=this.id);return new e[a]({host:this.host,port:this.port,secure:this.secure,path:this.path,query:c,forceJSONP:this.forceJSONP,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,flashPath:this.flashPath,policyPort:this.policyPort})};b.prototype.open=
-function(){this.readyState="opening";var a=this.createTransport(this.transports[0]);a.open();this.setTransport(a)};b.prototype.setTransport=function(a){var b=this;this.transport&&(h("clearing existing transport"),this.transport.removeAllListeners());this.transport=a;a.on("drain",function(){b.flush()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})};b.prototype.probe=function(a){function b(k){if(!e){e=!0;var f=Error("probe error: "+
-k);f.transport=c.name;c.close();c=null;h('probe transport "%s" failed because of error: %s',a,k);g.emit("error",f)}}h('probing transport "%s"',a);var c=this.createTransport(a,{probe:1}),e=!1,g=this;c.once("open",function(){e||(h('probe transport "%s" opened',a),c.send([{type:"ping",data:"probe"}]),c.once("packet",function(f){e||("pong"==f.type&&"probe"==f.data?(h('probe transport "%s" pong',a),g.upgrading=!0,g.emit("upgrading",c),h('pausing current transport "%s"',g.transport.name),g.transport.pause(function(){if(!e&&
-!("closed"==g.readyState||"closing"==g.readyState))h("changing transport and sending upgrade packet"),c.removeListener("error",b),g.emit("upgrade",c),g.setTransport(c),c.send([{type:"upgrade"}]),c=null,g.upgrading=!1,g.flush()})):(h('probe transport "%s" failed',a),f=Error("probe error"),f.transport=c.name,g.emit("error",f)))}))});c.once("error",b);c.open();this.once("close",function(){c&&(h("socket closed prematurely - aborting probe"),e=!0,c.close(),c=null)});this.once("upgrading",function(a){c&&
+;(function(){function d(g,c,a){var b=d.resolve(g),e=d.modules[b];if(null==b)throw Error('failed to require "'+(a||g)+'" from "'+(c||"root")+'"');e.exports||(e.exports={},e.client=e.component=!0,e.call(this,e,e.exports,d.relative(b)));return e.exports}d.modules={};d.aliases={};d.resolve=function(g){var c=g+".js",a=g+".json",b=g+"/index.js",e=g+"/index.json";return d.modules[c]&&c||d.modules[a]&&a||d.modules[b]&&b||d.modules[e]&&e||d.modules[g]&&g||d.aliases[b]};d.normalize=function(g,c){var a=[];if("."!=
+c.charAt(0))return c;for(var g=g.split("/"),c=c.split("/"),b=0;b<c.length;++b)".."==c[b]?g.pop():"."!=c[b]&&""!=c[b]&&a.push(c[b]);return g.concat(a).join("/")};d.register=function(g,c){d.modules[g]=c};d.alias=function(g,c){if(!d.modules[g])throw Error('failed to alias "'+g+'", it does not exist');d.aliases[c]=g};d.relative=function(g){function c(b){var a=b,b=c.resolve(b);return d(b,g,a)}var a=d.normalize(g,"..");c.resolve=function(b){if("."!=b.charAt(0)){var c=g.split("/"),f;a:{for(f=c.length;f--;)if("deps"===
+c[f])break a;f=-1}(f+=1)||(f=0);return b=c.slice(0,f+1).join("/")+"/deps/"+b}return d.normalize(a,b)};c.exists=function(b){return!!d.modules[c.resolve(b)]};return c};d.register("visionmedia-debug/index.js",function(g,c,a){g.exports="undefined"==typeof window?a("./lib/debug"):a("./debug")});d.register("visionmedia-debug/debug.js",function(g){function c(a){return!c.enabled(a)?function(){}:function(b){var e=new Date,f=e-(c[a]||e);c[a]=e;b=a+" "+b+" +"+c.humanize(f);window.console&&console.log&&Function.prototype.apply.call(console.log,
+console,arguments)}}g.exports=c;c.names=[];c.skips=[];c.enable=function(a){localStorage.debug=a;for(var b=(a||"").split(/[\s,]+/),e=b.length,f=0;f<e;f++)a=b[f].replace("*",".*?"),"-"===a[0]?c.skips.push(RegExp("^"+a.substr(1)+"$")):c.names.push(RegExp("^"+a+"$"))};c.disable=function(){c.enable("")};c.humanize=function(a){return 36E5<=a?(a/36E5).toFixed(1)+"h":6E4<=a?(a/6E4).toFixed(1)+"m":1E3<=a?(a/1E3|0)+"s":a+"ms"};c.enabled=function(a){for(var b=0,e=c.skips.length;b<e;b++)if(c.skips[b].test(a))return!1;
+b=0;for(e=c.names.length;b<e;b++)if(c.names[b].test(a))return!0;return!1};window.localStorage&&c.enable(localStorage.debug)});d.register("LearnBoost-engine.io-client/lib/index.js",function(g,c,a){g.exports=a("./socket")});d.register("LearnBoost-engine.io-client/lib/parser.js",function(g,c,a){var g=a("./util"),b=c.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},e=g.keys(b),f={type:"error",data:"parser error"};c.encodePacket=function(a){var c=b[a.type];void 0!==a.data&&(c+=String(a.data));
+return""+c};c.decodePacket=function(b){var a=b.charAt(0);return Number(a)!=a||!e[a]?f:1<b.length?{type:e[a],data:b.substring(1)}:{type:e[a]}};c.encodePayload=function(b){if(!b.length)return"0:";for(var a="",i,l=0,j=b.length;l<j;l++)i=c.encodePacket(b[l]),a+=i.length+":"+i;return a};c.decodePayload=function(b){if(""==b)return[f];for(var a=[],i="",l,j,m=0,e=b.length;m<e;m++)if(j=b.charAt(m),":"!=j)i+=j;else{if(""==i||i!=(l=Number(i)))return[f];j=b.substr(m+1,l);if(i!=j.length)return[f];if(j.length){i=
+c.decodePacket(j);if(f.type==i.type&&f.data==i.data)return[f];a.push(i)}m+=l;i=""}return""!=i?[f]:a}});d.register("LearnBoost-engine.io-client/lib/socket.js",function(g,c,a){function b(a,c){if(!(this instanceof b))return new b(a);if("string"==typeof a){var j=e.parseUri(a),a=c||{};a.host=j.host;a.secure="https"==j.protocol||"wss"==j.protocol;a.port=j.port}a=a||{};this.secure=null!=a.secure?a.secure:d.location&&"https:"==location.protocol;this.host=a.host||a.hostname||(d.location?location.hostname:
+"localhost");this.port=a.port||(d.location&&location.port?location.port:this.secure?443:80);this.query=a.query||{};this.query.uid=String(Math.random()).substr(5)+String(Math.random()).substr(5);this.upgrade=!1!==a.upgrade;this.resource=a.resource||"default";this.path=(a.path||"/engine.io").replace(/\/$/,"");this.path+="/"+this.resource+"/";this.forceJSONP=!!a.forceJSONP;this.timestampParam=a.timestampParam||"t";this.timestampRequests=!!a.timestampRequests;this.flashPath=a.flashPath||"";this.transports=
+a.transports||["polling","websocket","flashsocket"];this.readyState="";this.writeBuffer=[];this.policyPort=a.policyPort||843;this.open();b.sockets.push(this);b.sockets.evs.emit("add",this)}var e=a("./util"),f=a("./transports"),c=a("./emitter"),h=a("debug")("engine-client:socket");g.exports=b;var d="undefined"!=typeof window?window:d;c(b.prototype);b.protocol=1;b.sockets=[];b.sockets.evs=new c;b.Socket=b;b.Transport=a("./transport");b.Emitter=a("./emitter");b.transports=a("./transports");b.util=a("./util");
+b.parser=a("./parser");b.prototype.createTransport=function(a){h('creating transport "%s"',a);var b=this.query,j={},c;for(c in b)b.hasOwnProperty(c)&&(j[c]=b[c]);j.transport=a;this.id&&(j.sid=this.id);return new f[a]({host:this.host,port:this.port,secure:this.secure,path:this.path,query:j,forceJSONP:this.forceJSONP,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,flashPath:this.flashPath,policyPort:this.policyPort})};b.prototype.open=function(){this.readyState="opening";
+var a=this.createTransport(this.transports[0]);a.open();this.setTransport(a)};b.prototype.setTransport=function(a){var b=this;this.transport&&(h("clearing existing transport"),this.transport.removeAllListeners());this.transport=a;a.on("drain",function(){b.flush()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})};b.prototype.probe=function(a){function b(l){if(!f){f=!0;var g=Error("probe error: "+l);g.transport=c.name;
+c.close();c=null;h('probe transport "%s" failed because of error: %s',a,l);e.emit("error",g)}}h('probing transport "%s"',a);var c=this.createTransport(a,{probe:1}),f=!1,e=this;c.once("open",function(){f||(h('probe transport "%s" opened',a),c.send([{type:"ping",data:"probe"}]),c.once("packet",function(g){f||("pong"==g.type&&"probe"==g.data?(h('probe transport "%s" pong',a),e.upgrading=!0,e.emit("upgrading",c),h('pausing current transport "%s"',e.transport.name),e.transport.pause(function(){if(!f&&
+!("closed"==e.readyState||"closing"==e.readyState))h("changing transport and sending upgrade packet"),c.removeListener("error",b),e.emit("upgrade",c),e.setTransport(c),c.send([{type:"upgrade"}]),c=null,e.upgrading=!1,e.flush()})):(h('probe transport "%s" failed',a),g=Error("probe error"),g.transport=c.name,e.emit("error",g)))}))});c.once("error",b);c.open();this.once("close",function(){c&&(h("socket closed prematurely - aborting probe"),f=!0,c.close(),c=null)});this.once("upgrading",function(a){c&&
a.name!=c.name&&(h('"%s" works - aborting "%s"',a.name,c.name),c.close(),c=null)})};b.prototype.onOpen=function(){h("socket open");this.readyState="open";this.emit("open");this.onopen&&this.onopen.call(this);this.flush();if("open"==this.readyState&&this.upgrade&&this.transport.pause){h("starting upgrade probes");for(var a=0,b=this.upgrades.length;a<b;a++)this.probe(this.upgrades[a])}};b.prototype.onPacket=function(a){if("opening"==this.readyState||"open"==this.readyState)switch(h('socket receive: type "%s", data "%s"',
-a.type,a.data),this.emit("packet",a),this.emit("heartbeat"),a.type){case "open":this.onHandshake(g.parseJSON(a.data));break;case "pong":this.ping();break;case "error":var b=Error("server error");b.code=a.data;this.emit("error",b);break;case "message":this.emit("message",a.data),b={data:a.data,toString:function(){return a.data}},this.onmessage&&this.onmessage.call(this,b)}else h('packet received with socket readyState "%s"',this.readyState)};b.prototype.onHandshake=function(a){this.emit("handshake",
+a.type,a.data),this.emit("packet",a),this.emit("heartbeat"),a.type){case "open":this.onHandshake(e.parseJSON(a.data));break;case "pong":this.ping();break;case "error":var b=Error("server error");b.code=a.data;this.emit("error",b);break;case "message":this.emit("message",a.data),b={data:a.data,toString:function(){return a.data}},this.onmessage&&this.onmessage.call(this,b)}else h('packet received with socket readyState "%s"',this.readyState)};b.prototype.onHandshake=function(a){this.emit("handshake",
a);this.id=a.sid;this.transport.query.sid=a.sid;this.upgrades=a.upgrades;this.pingInterval=a.pingInterval;this.pingTimeout=a.pingTimeout;this.onOpen();this.ping();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)};b.prototype.onHeartbeat=function(a){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){if("closed"!=b.readyState)b.onClose("ping timeout")},a||b.pingInterval+b.pingTimeout)};b.prototype.ping=function(){var a=this;
clearTimeout(a.pingIntervalTimer);a.pingIntervalTimer=setTimeout(function(){h("writing ping packet - expecting pong within %sms",a.pingTimeout);a.sendPacket("ping");a.onHeartbeat(a.pingTimeout)},a.pingInterval)};b.prototype.flush=function(){"closed"!=this.readyState&&(this.transport.writable&&!this.upgrading&&this.writeBuffer.length)&&(h("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.writeBuffer=[])};b.prototype.write=b.prototype.send=function(a){this.sendPacket("message",
a);return this};b.prototype.sendPacket=function(a,b){var c={type:a,data:b};this.emit("packetCreate",c);this.writeBuffer.push(c);this.flush()};b.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState)this.onClose("forced close"),h("socket closing - telling transport to close"),this.transport.close(),this.transport.removeAllListeners();return this};b.prototype.onError=function(a){this.emit("error",a);this.onClose("transport error",a)};b.prototype.onClose=function(a,b){"closed"!=
-this.readyState&&(h('socket close with reason: "%s"',a),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.readyState="closed",this.emit("close",a,b),this.onclose&&this.onclose.call(this),this.id=null)}});d.register("LearnBoost-engine.io-client/lib/transport.js",function(f,c,a){function b(a){this.path=a.path;this.host=a.host;this.port=a.port;this.secure=a.secure;this.query=a.query;this.timestampParam=a.timestampParam;this.timestampRequests=a.timestampRequests;this.readyState=
-""}a("./util");var g=a("./parser"),c=a("./emitter");f.exports=b;c(b.prototype);b.prototype.onError=function(a,b){var c=Error(a);c.type="TransportError";c.description=b;this.emit("error",c);return this};b.prototype.open=function(){if("closed"==this.readyState||""==this.readyState)this.readyState="opening",this.doOpen();return this};b.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState)this.doClose(),this.onClose();return this};b.prototype.send=function(a){if("open"==this.readyState)this.write(a);
-else throw Error("Transport not open");};b.prototype.onOpen=function(){this.readyState="open";this.writable=!0;this.emit("open")};b.prototype.onData=function(a){this.onPacket(g.decodePacket(a))};b.prototype.onPacket=function(a){this.emit("packet",a)};b.prototype.onClose=function(){this.readyState="closed";this.emit("close")}});d.register("LearnBoost-engine.io-client/lib/emitter.js",function(f,c,a){var b;try{b=a("emitter")}catch(g){b=a("emitter-component")}f.exports=b;b.prototype.addEventListener=
-b.prototype.on;b.prototype.removeEventListener=b.prototype.off;b.prototype.removeListener=b.prototype.off;b.prototype.removeAllListeners=function(){this._callbacks={}}});d.register("LearnBoost-engine.io-client/lib/util.js",function(f,c,a){var b=!1,g="undefined"!=typeof window?window:g;c.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c};c.keys=Object.keys||function(a){var b=[],c=Object.prototype.hasOwnProperty,e;for(e in a)c.call(a,e)&&b.push(e);return b};c.on=function(a,
-b,c,e){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener&&a.addEventListener(b,c,e)};c.load=function(a){if(g.document&&"complete"===document.readyState||b)return a();c.on(g,"load",a,!1)};"undefined"!=typeof window&&c.load(function(){b=!0});c.defer=function(a){if(!c.ua.webkit||"undefined"!=typeof importScripts)return a();c.load(function(){setTimeout(a,100)})};var e=/^[\],:{}\s]*$/,h=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=
-/(?:^|:|,)(?:\s*\[)+/g,k=/^\s+/,j=/\s+$/;c.parseJSON=function(a){if("string"!=typeof a||!a)return null;a=a.replace(k,"").replace(j,"");if(g.JSON&&JSON.parse)return JSON.parse(a);if(e.test(a.replace(h,"@").replace(d,"]").replace(i,"")))return(new Function("return "+a))()};c.ua={};var f=c.ua,m;if(m="undefined"!=typeof XMLHttpRequest)a:{try{var n=new XMLHttpRequest}catch(p){m=!1;break a}m=void 0!=n.withCredentials}f.hasCORS=m;c.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent);
+this.readyState&&(h('socket close with reason: "%s"',a),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.readyState="closed",this.emit("close",a,b),this.onclose&&this.onclose.call(this),this.id=null)}});d.register("LearnBoost-engine.io-client/lib/transport.js",function(g,c,a){function b(a){this.path=a.path;this.host=a.host;this.port=a.port;this.secure=a.secure;this.query=a.query;this.timestampParam=a.timestampParam;this.timestampRequests=a.timestampRequests;this.readyState=
+""}a("./util");var e=a("./parser"),c=a("./emitter");g.exports=b;c(b.prototype);b.prototype.onError=function(a,b){var c=Error(a);c.type="TransportError";c.description=b;this.emit("error",c);return this};b.prototype.open=function(){if("closed"==this.readyState||""==this.readyState)this.readyState="opening",this.doOpen();return this};b.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState)this.doClose(),this.onClose();return this};b.prototype.send=function(a){if("open"==this.readyState)this.write(a);
+else throw Error("Transport not open");};b.prototype.onOpen=function(){this.readyState="open";this.writable=!0;this.emit("open")};b.prototype.onData=function(a){this.onPacket(e.decodePacket(a))};b.prototype.onPacket=function(a){this.emit("packet",a)};b.prototype.onClose=function(){this.readyState="closed";this.emit("close")}});d.register("LearnBoost-engine.io-client/lib/emitter.js",function(g,c,a){var b;try{b=a("emitter")}catch(e){b=a("emitter-component")}g.exports=b;b.prototype.addEventListener=
+b.prototype.on;b.prototype.removeEventListener=b.prototype.off;b.prototype.removeListener=b.prototype.off;b.prototype.removeAllListeners=function(){this._callbacks={}}});d.register("LearnBoost-engine.io-client/lib/util.js",function(g,c,a){var b=!1,e="undefined"!=typeof window?window:e;c.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c};c.keys=Object.keys||function(a){var b=[],c=Object.prototype.hasOwnProperty,e;for(e in a)c.call(a,e)&&b.push(e);return b};c.on=function(a,
+b,c,e){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener&&a.addEventListener(b,c,e)};c.load=function(a){if(e.document&&"complete"===document.readyState||b)return a();c.on(e,"load",a,!1)};"undefined"!=typeof window&&c.load(function(){b=!0});c.defer=function(a){if(!c.ua.webkit||"undefined"!=typeof importScripts)return a();c.load(function(){setTimeout(a,100)})};var f=/^[\],:{}\s]*$/,h=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=
+/(?:^|:|,)(?:\s*\[)+/g,l=/^\s+/,j=/\s+$/;c.parseJSON=function(a){if("string"!=typeof a||!a)return null;a=a.replace(l,"").replace(j,"");if(e.JSON&&JSON.parse)return JSON.parse(a);if(f.test(a.replace(h,"@").replace(d,"]").replace(i,"")))return(new Function("return "+a))()};c.ua={};var g=c.ua,m;if(m="undefined"!=typeof XMLHttpRequest)a:{try{var n=new XMLHttpRequest}catch(p){m=!1;break a}m=void 0!=n.withCredentials}g.hasCORS=m;c.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent);
c.ua.gecko="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);c.ua.android="undefined"!=typeof navigator&&/android/i.test(navigator.userAgent);c.ua.ios="undefined"!=typeof navigator&&/^(iPad|iPhone|iPod)$/.test(navigator.platform);c.ua.ios6=c.ua.ios&&/OS 6_/.test(navigator.userAgent);c.request=function(b){if("undefined"!=typeof process){var e=a("xmlhttprequest").XMLHttpRequest;return new e}if(b&&"undefined"!=typeof XDomainRequest&&!c.ua.hasCORS)return new XDomainRequest;try{if("undefined"!=
-typeof e&&(!b||c.ua.hasCORS))return new e}catch(k){}if(!b)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(j){}};var q=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r="source protocol authority userInfo user password host port relative path directory file query anchor".split(" ");c.parseUri=function(a){for(var a=q.exec(a||""),b={},c=14;c--;)b[r[c]]=
-a[c]||"";return b};c.qs=function(a){var b="",c;for(c in a)a.hasOwnProperty(c)&&(b.length&&(b+="&"),b+=c+"="+encodeURIComponent(a[c]));return b}});d.register("LearnBoost-engine.io-client/lib/transports/index.js",function(f,c,a){var b=a("./polling-xhr"),g=a("./polling-jsonp"),f=a("./websocket"),e=a("./flashsocket"),h=a("../util");c.polling=function(a){var c,e=c=!1;d.location&&(e="https:"==location.protocol,c=location.port,Number(c)!=c&&(c=e?443:80),c=a.host!=location.hostname||c!=a.port,e=a.secure!=
-e);c=h.request(c);return e&&d.XDomainRequest&&c instanceof d.XDomainRequest?new g(a):c&&!a.forceJSONP?new b(a):new g(a)};c.websocket=f;c.flashsocket=e;var d="undefined"!=typeof window?window:d});d.register("LearnBoost-engine.io-client/lib/transports/polling.js",function(f,c,a){function b(a){g.call(this,a)}var g=a("../transport"),e=a("../util"),d=a("../parser"),l=a("debug")("engine.io-client:polling");f.exports=b;var i="undefined"!=typeof window?window:i;e.inherits(b,g);b.prototype.name="polling";
-b.prototype.doOpen=function(){this.poll()};b.prototype.pause=function(a){function b(){l("paused");c.readyState="paused";a()}var c=this;this.readyState="pausing";if(this.polling||!this.writable){var e=0;this.polling&&(l("we are currently polling - waiting to pause"),e++,this.once("pollComplete",function(){l("pre-pause polling complete");--e||b()}));this.writable||(l("we are currently writing - waiting to pause"),e++,this.once("drain",function(){l("pre-pause writing complete");--e||b()}))}else b()};
-b.prototype.poll=function(){l("polling");this.polling=!0;this.doPoll();this.emit("poll")};b.prototype.onData=function(a){l("polling got data %s",a);for(var a=d.decodePayload(a),b=0,c=a.length;b<c;b++){if("opening"==this.readyState)this.onOpen();if("close"==a[b].type){this.onClose();return}this.onPacket(a[b])}this.polling=!1;this.emit("pollComplete");"open"==this.readyState?this.poll():l('ignoring poll - transport state "%s"',this.readyState)};b.prototype.doClose=function(){l("sending close packet");
-this.send([{type:"close"}])};b.prototype.write=function(a){var b=this;this.writable=!1;this.doWrite(d.encodePayload(a),function(){b.writable=!0;b.emit("drain")})};b.prototype.uri=function(){var a=this.query||{},b=this.secure?"https":"http",c="";if(i.ActiveXObject||e.ua.android||e.ua.ios6||this.timestampRequests)a[this.timestampParam]=+new Date;a=e.qs(a);if(this.port&&("https"==b&&443!=this.port||"http"==b&&80!=this.port))c=":"+this.port;a.length&&(a="?"+a);return b+"://"+this.host+c+this.path+a}});
-d.register("LearnBoost-engine.io-client/lib/transports/polling-xhr.js",function(f,c,a){function b(){}function g(a){d.call(this,a);k.location&&(this.xd=a.host!=k.location.hostname||k.location.port!=a.port)}function e(a){this.method=a.method||"GET";this.uri=a.uri;this.xd=!!a.xd;this.async=!1!==a.async;this.data=void 0!=a.data?a.data:null;this.create()}var d=a("./polling"),l=a("../util"),c=a("../emitter"),i=a("debug")("engine.io-client:polling-xhr");f.exports=g;f.exports.Request=e;var k="undefined"!=
-typeof window?window:k,j=k[["Active"].concat("Object").join("X")];l.inherits(g,d);g.prototype.doOpen=function(){var a=this;l.defer(function(){d.prototype.doOpen.call(a)})};g.prototype.request=function(a){a=a||{};a.uri=this.uri();a.xd=this.xd;return new e(a)};g.prototype.doWrite=function(a,b){var c=this.request({method:"POST",data:a}),e=this;c.on("success",b);c.on("error",function(a){e.onError("xhr post error",a)});this.sendXhr=c};g.prototype.doPoll=function(){i("xhr poll");var a=this.request(),b=
-this;a.on("data",function(a){b.onData(a)});a.on("error",function(a){b.onError("xhr poll error",a)});this.pollXhr=a};c(e.prototype);e.prototype.create=function(){var a=this.xhr=l.request(this.xd),c=this;a.open(this.method,this.uri,this.async);if("POST"==this.method)try{a.setRequestHeader?a.setRequestHeader("Content-type","text/plain;charset=UTF-8"):a.contentType="text/plain"}catch(g){}this.xd&&k.XDomainRequest&&a instanceof XDomainRequest?(a.onerror=function(a){c.onError(a)},a.onload=function(){c.onData(a.responseText)},
-a.onprogress=b):("withCredentials"in a&&(a.withCredentials=!0),a.onreadystatechange=function(){var b;try{if(4!=a.readyState)return;if(200==a.status||1223==a.status)b=a.responseText;else c.onError(a.status)}catch(e){c.onError(e)}if(void 0!==b)c.onData(b)});i("sending xhr with url %s | data %s",this.uri,this.data);a.send(this.data);j&&(this.index=e.requestsCount++,e.requests[this.index]=this)};e.prototype.onSuccess=function(){this.emit("success");this.cleanup()};e.prototype.onData=function(a){this.emit("data",
-a);this.onSuccess()};e.prototype.onError=function(a){this.emit("error",a);this.cleanup()};e.prototype.cleanup=function(){this.xhr.onreadystatechange=b;this.xhr.onload=this.xhr.onerror=b;try{this.xhr.abort()}catch(a){}j&&delete e.requests[this.index];this.xhr=null};e.prototype.abort=function(){this.cleanup()};j&&(e.requestsCount=0,e.requests={},k.attachEvent("onunload",function(){for(var a in e.requests)e.requests.hasOwnProperty(a)&&e.requests[a].abort()}))});d.register("LearnBoost-engine.io-client/lib/transports/polling-jsonp.js",
-function(d,c,a){function b(a){g.call(this,a);i||(h.___eio||(h.___eio=[]),i=h.___eio);this.index=i.length;var b=this;i.push(function(a){b.onData(a)});this.query.j=this.index}var g=a("./polling"),e=a("../util");d.exports=b;var h="undefined"!=typeof window?window:h,l=/\n/g,i;e.inherits(b,g);b.prototype.doOpen=function(){var a=this;e.defer(function(){g.prototype.doOpen.call(a)})};b.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);this.form&&
-(this.form.parentNode.removeChild(this.form),this.form=null);g.prototype.doClose.call(this)};b.prototype.doPoll=function(){var a=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);a.async=!0;a.src=this.uri();var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.script=a;e.ua.gecko&&setTimeout(function(){var a=document.createElement("iframe");document.body.appendChild(a);document.body.removeChild(a)},100)};
-b.prototype.doWrite=function(a,b){function c(){e();b()}function e(){g.iframe&&g.form.removeChild(g.iframe);try{i=document.createElement('<iframe name="'+g.iframeId+'">')}catch(a){i=document.createElement("iframe"),i.name=g.iframeId}i.id=g.iframeId;g.form.appendChild(i);g.iframe=i}var g=this;if(!this.form){var d=document.createElement("form"),f=document.createElement("textarea"),h=this.iframeId="eio_iframe_"+this.index,i;d.className="socketio";d.style.position="absolute";d.style.top="-1000px";d.style.left=
-"-1000px";d.target=h;d.method="POST";d.setAttribute("accept-charset","utf-8");f.name="d";d.appendChild(f);document.body.appendChild(d);this.form=d;this.area=f}this.form.action=this.uri();e();this.area.value=a.replace(l,"\\n");try{this.form.submit()}catch(s){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==g.iframe.readyState&&c()}:this.iframe.onload=c}});d.register("LearnBoost-engine.io-client/lib/transports/websocket.js",function(d,c,a){function b(a){e.call(this,a)}
-function g(){return"undefined"!=typeof process?a("ws"):i.WebSocket||i.MozWebSocket}var e=a("../transport"),h=a("../parser"),l=a("../util");a("debug")("engine.io-client:websocket");d.exports=b;var i="undefined"!=typeof window?window:i;l.inherits(b,e);b.prototype.name="websocket";b.prototype.doOpen=function(){if(this.check()){var a=this;this.socket=new (g())(this.uri());this.socket.onopen=function(){a.onOpen()};this.socket.onclose=function(){a.onClose()};this.socket.onmessage=function(b){a.onData(b.data)};
-this.socket.onerror=function(b){a.onError("websocket error",b)}}};b.prototype.write=function(a){for(var b=0,c=a.length;b<c;b++)this.socket.send(h.encodePacket(a[b]))};b.prototype.doClose=function(){"undefined"!==typeof this.socket&&this.socket.close()};b.prototype.uri=function(){var a=this.query||{},b=this.secure?"wss":"ws",c="";if(this.port&&("wss"==b&&443!=this.port||"ws"==b&&80!=this.port))c=":"+this.port;this.timestampRequests&&(a[this.timestampParam]=+new Date);a=l.qs(a);a.length&&(a="?"+a);
-return b+"://"+this.host+c+this.path+a};b.prototype.check=function(){var a=g();return!!a&&!("__initialize"in a&&this.name===b.prototype.name)}});d.register("LearnBoost-engine.io-client/lib/transports/flashsocket.js",function(d,c,a){function b(a){g.call(this,a);this.flashPath=a.flashPath;this.policyPort=a.policyPort}var g=a("./websocket"),e=a("../util"),h=a("debug")("engine.io-client:flashsocket");d.exports=b;var l="undefined"!=typeof window?window:l,i=l[["Active"].concat("Object").join("X")];e.inherits(b,
-g);b.prototype.name="flashsocket";b.prototype.doOpen=function(){function a(b){return function(){var a=Array.prototype.join.call(arguments," ");h("[websocketjs %s] %s",b,a)}}if(this.check()){WEB_SOCKET_LOGGER={log:a("debug"),error:a("error")};WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR=!0;"undefined"==typeof WEB_SOCKET_SWF_LOCATION&&(WEB_SOCKET_SWF_LOCATION=this.flashPath+"WebSocketMainInsecure.swf");var b=[this.flashPath+"web_socket.js"];"undefined"==typeof swfobject&&
-b.unshift(this.flashPath+"swfobject.js");var c=this,e=function(a){if(b[a]){var d=b[a];if(k[d])e(++a);else{var f=document.createElement("script"),j=!1;h('loading "%s"',d);f.onload=f.onreadystatechange=function(){if(!j&&!k[d]){var b=f.readyState;if(!b||"loaded"==b||"complete"==b)h('loaded "%s"',d),f.onload=f.onreadystatechange=null,j=!0,k[d]=!0,e(++a)}};f.async=1;f.src=d;var i=document.getElementsByTagName("head")[0];i.insertBefore(f,i.firstChild)}}else c.ready(function(){WebSocket.__addTask(function(){g.prototype.doOpen.call(c)})})};
-e(0)}};b.prototype.doClose=function(){if(this.socket){var a=this;WebSocket.__addTask(function(){g.prototype.doClose.call(a)})}};b.prototype.write=function(){var a=this,b=arguments;WebSocket.__addTask(function(){g.prototype.write.apply(a,b)})};b.prototype.ready=function(a){function c(){b.loaded||(843!=d.policyPort&&WebSocket.loadFlashPolicyFile("xmlsocket://"+d.host+":"+d.policyPort),WebSocket.__initialize(),b.loaded=!0);a.call(d)}if(!("undefined"==typeof WebSocket||!("__initialize"in WebSocket)||
-!swfobject)&&!(10>swfobject.getFlashPlayerVersion().major)){var d=this;if(document.body)return c();e.load(c)}};b.prototype.check=function(){if("undefined"!=typeof process||"undefined"!=typeof WebSocket&&!("__initialize"in WebSocket))return!1;if(i){var a=null;try{a=new i("ShockwaveFlash.ShockwaveFlash")}catch(b){}if(a)return!0}else for(var a=0,c=navigator.plugins.length;a<c;a++)for(var e=0,d=navigator.plugins[a].length;e<d;e++)if("Shockwave Flash"==navigator.plugins[a][e].description)return!0;return!1};
-var k={}});d.register("component-path-to-regexp/index.js",function(d){d.exports=function(c,a,b){var b=b||{},d=b.sensitive,b=b.strict,a=a||[];if(c instanceof RegExp)return c;c instanceof Array&&(c="("+c.join("|")+")");c=c.concat(b?"":"/?").replace(/\/\(/g,"(?:/").replace(/\+/g,"__plus__").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,function(b,c,d,g,f,j){a.push({name:g,optional:!!j});c=c||"";return""+(j?"":c)+"(?:"+(j?c:"")+(d||"")+(f||d&&"([^/.]+?)"||"([^/]+?)")+")"+(j||"")}).replace(/([\/.])/g,
-"\\$1").replace(/__plus__/g,"(.+)").replace(/\*/g,"(.*)");return RegExp("^"+c+"$",d?"":"i")}});d.register("component-trim/index.js",function(d,c){c=d.exports=function(a){return a.replace(/^\s*|\s*$/g,"")};c.left=function(a){return a.replace(/^\s*/,"")};c.right=function(a){return a.replace(/\s*$/,"")}});d.register("redventures-reduce/index.js",function(d){d.exports=function(c,a,b){for(var d=0,e=c.length,f=3==arguments.length?b:c[d++];d<e;)f=a.call(null,f,c[d],++d,c);return f}});d.register("component-querystring/index.js",
-function(d,c,a){var b=a("trim"),g=a("reduce");c.parse=function(a){if("string"!=typeof a)return{};a=b(a);return""==a?{}:g(a.split("&"),function(a,b){var c=b.split("=");a[c[0]]=null==c[1]?"":decodeURIComponent(c[1]);return a},{})};c.stringify=function(a){if(!a)return"";var b=[],c;for(c in a)b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")}});d.register("component-url/index.js",function(d,c){c.parse=function(a){var b=document.createElement("a");b.href=a;return{href:b.href,
+typeof e&&(!b||c.ua.hasCORS))return new e}catch(j){}if(!b)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}};var q=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r="source protocol authority userInfo user password host port relative path directory file query anchor".split(" ");c.parseUri=function(a){for(var a=q.exec(a||""),b={},c=14;c--;)b[r[c]]=
+a[c]||"";return b};c.qs=function(a){var b="",c;for(c in a)a.hasOwnProperty(c)&&(b.length&&(b+="&"),b+=c+"="+encodeURIComponent(a[c]));return b}});d.register("LearnBoost-engine.io-client/lib/transports/index.js",function(g,c,a){var b=a("./polling-xhr"),e=a("./polling-jsonp"),g=a("./websocket"),f=a("./flashsocket"),h=a("../util");c.polling=function(a){var c,j=c=!1;d.location&&(j="https:"==location.protocol,c=location.port,Number(c)!=c&&(c=j?443:80),c=a.host!=location.hostname||c!=a.port,j=a.secure!=
+j);c=h.request(c);return j&&d.XDomainRequest&&c instanceof d.XDomainRequest?new e(a):c&&!a.forceJSONP?new b(a):new e(a)};c.websocket=g;c.flashsocket=f;var d="undefined"!=typeof window?window:d});d.register("LearnBoost-engine.io-client/lib/transports/polling.js",function(g,c,a){function b(a){e.call(this,a)}var e=a("../transport"),f=a("../util"),d=a("../parser"),k=a("debug")("engine.io-client:polling");g.exports=b;var i="undefined"!=typeof window?window:i;f.inherits(b,e);b.prototype.name="polling";
+b.prototype.doOpen=function(){this.poll()};b.prototype.pause=function(a){function b(){k("paused");c.readyState="paused";a()}var c=this;this.readyState="pausing";if(this.polling||!this.writable){var e=0;this.polling&&(k("we are currently polling - waiting to pause"),e++,this.once("pollComplete",function(){k("pre-pause polling complete");--e||b()}));this.writable||(k("we are currently writing - waiting to pause"),e++,this.once("drain",function(){k("pre-pause writing complete");--e||b()}))}else b()};
+b.prototype.poll=function(){k("polling");this.polling=!0;this.doPoll();this.emit("poll")};b.prototype.onData=function(a){k("polling got data %s",a);for(var a=d.decodePayload(a),b=0,c=a.length;b<c;b++){if("opening"==this.readyState)this.onOpen();if("close"==a[b].type){this.onClose();return}this.onPacket(a[b])}this.polling=!1;this.emit("pollComplete");"open"==this.readyState?this.poll():k('ignoring poll - transport state "%s"',this.readyState)};b.prototype.doClose=function(){k("sending close packet");
+this.send([{type:"close"}])};b.prototype.write=function(a){var b=this;this.writable=!1;this.doWrite(d.encodePayload(a),function(){b.writable=!0;b.emit("drain")})};b.prototype.uri=function(){var a=this.query||{},b=this.secure?"https":"http",c="";if(i.ActiveXObject||f.ua.android||f.ua.ios6||this.timestampRequests)a[this.timestampParam]=+new Date;a=f.qs(a);if(this.port&&("https"==b&&443!=this.port||"http"==b&&80!=this.port))c=":"+this.port;a.length&&(a="?"+a);return b+"://"+this.host+c+this.path+a}});
+d.register("LearnBoost-engine.io-client/lib/transports/polling-xhr.js",function(g,c,a){function b(){}function e(a){d.call(this,a);l.location&&(this.xd=a.host!=l.location.hostname||l.location.port!=a.port)}function f(a){this.method=a.method||"GET";this.uri=a.uri;this.xd=!!a.xd;this.async=!1!==a.async;this.data=void 0!=a.data?a.data:null;this.create()}var d=a("./polling"),k=a("../util"),c=a("../emitter"),i=a("debug")("engine.io-client:polling-xhr");g.exports=e;g.exports.Request=f;var l="undefined"!=
+typeof window?window:l,j=l[["Active"].concat("Object").join("X")];k.inherits(e,d);e.prototype.doOpen=function(){var a=this;k.defer(function(){d.prototype.doOpen.call(a)})};e.prototype.request=function(a){a=a||{};a.uri=this.uri();a.xd=this.xd;return new f(a)};e.prototype.doWrite=function(a,b){var c=this.request({method:"POST",data:a}),e=this;c.on("success",b);c.on("error",function(a){e.onError("xhr post error",a)});this.sendXhr=c};e.prototype.doPoll=function(){i("xhr poll");var a=this.request(),b=
+this;a.on("data",function(a){b.onData(a)});a.on("error",function(a){b.onError("xhr poll error",a)});this.pollXhr=a};c(f.prototype);f.prototype.create=function(){var a=this.xhr=k.request(this.xd),c=this;a.open(this.method,this.uri,this.async);if("POST"==this.method)try{a.setRequestHeader?a.setRequestHeader("Content-type","text/plain;charset=UTF-8"):a.contentType="text/plain"}catch(e){}this.xd&&l.XDomainRequest&&a instanceof XDomainRequest?(a.onerror=function(a){c.onError(a)},a.onload=function(){c.onData(a.responseText)},
+a.onprogress=b):("withCredentials"in a&&(a.withCredentials=!0),a.onreadystatechange=function(){var b;try{if(4!=a.readyState)return;if(200==a.status||1223==a.status)b=a.responseText;else c.onError(a.status)}catch(e){c.onError(e)}if(void 0!==b)c.onData(b)});i("sending xhr with url %s | data %s",this.uri,this.data);a.send(this.data);j&&(this.index=f.requestsCount++,f.requests[this.index]=this)};f.prototype.onSuccess=function(){this.emit("success");this.cleanup()};f.prototype.onData=function(a){this.emit("data",
+a);this.onSuccess()};f.prototype.onError=function(a){this.emit("error",a);this.cleanup()};f.prototype.cleanup=function(){this.xhr.onreadystatechange=b;this.xhr.onload=this.xhr.onerror=b;try{this.xhr.abort()}catch(a){}j&&delete f.requests[this.index];this.xhr=null};f.prototype.abort=function(){this.cleanup()};j&&(f.requestsCount=0,f.requests={},l.attachEvent("onunload",function(){for(var a in f.requests)f.requests.hasOwnProperty(a)&&f.requests[a].abort()}))});d.register("LearnBoost-engine.io-client/lib/transports/polling-jsonp.js",
+function(d,c,a){function b(a){e.call(this,a);i||(h.___eio||(h.___eio=[]),i=h.___eio);this.index=i.length;var b=this;i.push(function(a){b.onData(a)});this.query.j=this.index}var e=a("./polling"),f=a("../util");d.exports=b;var h="undefined"!=typeof window?window:h,k=/\n/g,i;f.inherits(b,e);b.prototype.doOpen=function(){var a=this;f.defer(function(){e.prototype.doOpen.call(a)})};b.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);this.form&&
+(this.form.parentNode.removeChild(this.form),this.form=null);e.prototype.doClose.call(this)};b.prototype.doPoll=function(){var a=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);a.async=!0;a.src=this.uri();var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.script=a;f.ua.gecko&&setTimeout(function(){var a=document.createElement("iframe");document.body.appendChild(a);document.body.removeChild(a)},100)};
+b.prototype.doWrite=function(a,b){function c(){e();b()}function e(){f.iframe&&f.form.removeChild(f.iframe);try{i=document.createElement('<iframe name="'+f.iframeId+'">')}catch(a){i=document.createElement("iframe"),i.name=f.iframeId}i.id=f.iframeId;f.form.appendChild(i);f.iframe=i}var f=this;if(!this.form){var d=document.createElement("form"),g=document.createElement("textarea"),h=this.iframeId="eio_iframe_"+this.index,i;d.className="socketio";d.style.position="absolute";d.style.top="-1000px";d.style.left=
+"-1000px";d.target=h;d.method="POST";d.setAttribute("accept-charset","utf-8");g.name="d";d.appendChild(g);document.body.appendChild(d);this.form=d;this.area=g}this.form.action=this.uri();e();this.area.value=a.replace(k,"\\n");try{this.form.submit()}catch(s){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==f.iframe.readyState&&c()}:this.iframe.onload=c}});d.register("LearnBoost-engine.io-client/lib/transports/websocket.js",function(d,c,a){function b(a){f.call(this,a)}
+function e(){return"undefined"!=typeof process?a("ws"):i.WebSocket||i.MozWebSocket}var f=a("../transport"),h=a("../parser"),k=a("../util");a("debug")("engine.io-client:websocket");d.exports=b;var i="undefined"!=typeof window?window:i;k.inherits(b,f);b.prototype.name="websocket";b.prototype.doOpen=function(){if(this.check()){var a=this;this.socket=new (e())(this.uri());this.socket.onopen=function(){a.onOpen()};this.socket.onclose=function(){a.onClose()};this.socket.onmessage=function(b){a.onData(b.data)};
+this.socket.onerror=function(b){a.onError("websocket error",b)}}};b.prototype.write=function(a){for(var b=0,c=a.length;b<c;b++)this.socket.send(h.encodePacket(a[b]))};b.prototype.doClose=function(){"undefined"!==typeof this.socket&&this.socket.close()};b.prototype.uri=function(){var a=this.query||{},b=this.secure?"wss":"ws",c="";if(this.port&&("wss"==b&&443!=this.port||"ws"==b&&80!=this.port))c=":"+this.port;this.timestampRequests&&(a[this.timestampParam]=+new Date);a=k.qs(a);a.length&&(a="?"+a);
+return b+"://"+this.host+c+this.path+a};b.prototype.check=function(){var a=e();return!!a&&!("__initialize"in a&&this.name===b.prototype.name)}});d.register("LearnBoost-engine.io-client/lib/transports/flashsocket.js",function(d,c,a){function b(a){e.call(this,a);this.flashPath=a.flashPath;this.policyPort=a.policyPort}var e=a("./websocket"),f=a("../util"),h=a("debug")("engine.io-client:flashsocket");d.exports=b;var k="undefined"!=typeof window?window:k,i=k[["Active"].concat("Object").join("X")];f.inherits(b,
+e);b.prototype.name="flashsocket";b.prototype.doOpen=function(){function a(b){return function(){var a=Array.prototype.join.call(arguments," ");h("[websocketjs %s] %s",b,a)}}if(this.check()){WEB_SOCKET_LOGGER={log:a("debug"),error:a("error")};WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR=!0;"undefined"==typeof WEB_SOCKET_SWF_LOCATION&&(WEB_SOCKET_SWF_LOCATION=this.flashPath+"WebSocketMainInsecure.swf");var b=[this.flashPath+"web_socket.js"];"undefined"==typeof swfobject&&
+b.unshift(this.flashPath+"swfobject.js");var c=this,f=function(a){if(b[a]){var d=b[a];if(l[d])f(++a);else{var g=document.createElement("script"),j=!1;h('loading "%s"',d);g.onload=g.onreadystatechange=function(){if(!j&&!l[d]){var b=g.readyState;if(!b||"loaded"==b||"complete"==b)h('loaded "%s"',d),g.onload=g.onreadystatechange=null,j=!0,l[d]=!0,f(++a)}};g.async=1;g.src=d;var i=document.getElementsByTagName("head")[0];i.insertBefore(g,i.firstChild)}}else c.ready(function(){WebSocket.__addTask(function(){e.prototype.doOpen.call(c)})})};
+f(0)}};b.prototype.doClose=function(){if(this.socket){var a=this;WebSocket.__addTask(function(){e.prototype.doClose.call(a)})}};b.prototype.write=function(){var a=this,b=arguments;WebSocket.__addTask(function(){e.prototype.write.apply(a,b)})};b.prototype.ready=function(a){function c(){b.loaded||(843!=e.policyPort&&WebSocket.loadFlashPolicyFile("xmlsocket://"+e.host+":"+e.policyPort),WebSocket.__initialize(),b.loaded=!0);a.call(e)}if(!("undefined"==typeof WebSocket||!("__initialize"in WebSocket)||
+!swfobject)&&!(10>swfobject.getFlashPlayerVersion().major)){var e=this;if(document.body)return c();f.load(c)}};b.prototype.check=function(){if("undefined"!=typeof process||"undefined"!=typeof WebSocket&&!("__initialize"in WebSocket))return!1;if(i){var a=null;try{a=new i("ShockwaveFlash.ShockwaveFlash")}catch(b){}if(a)return!0}else for(var a=0,c=navigator.plugins.length;a<c;a++)for(var e=0,f=navigator.plugins[a].length;e<f;e++)if("Shockwave Flash"==navigator.plugins[a][e].description)return!0;return!1};
+var l={}});d.register("component-path-to-regexp/index.js",function(d){d.exports=function(c,a,b){var b=b||{},e=b.sensitive,b=b.strict,a=a||[];if(c instanceof RegExp)return c;c instanceof Array&&(c="("+c.join("|")+")");c=c.concat(b?"":"/?").replace(/\/\(/g,"(?:/").replace(/\+/g,"__plus__").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,function(b,c,e,d,g,j){a.push({name:d,optional:!!j});c=c||"";return""+(j?"":c)+"(?:"+(j?c:"")+(e||"")+(g||e&&"([^/.]+?)"||"([^/]+?)")+")"+(j||"")}).replace(/([\/.])/g,
+"\\$1").replace(/__plus__/g,"(.+)").replace(/\*/g,"(.*)");return RegExp("^"+c+"$",e?"":"i")}});d.register("component-trim/index.js",function(d,c){c=d.exports=function(a){return a.replace(/^\s*|\s*$/g,"")};c.left=function(a){return a.replace(/^\s*/,"")};c.right=function(a){return a.replace(/\s*$/,"")}});d.register("redventures-reduce/index.js",function(d){d.exports=function(c,a,b){for(var e=0,f=c.length,d=3==arguments.length?b:c[e++];e<f;)d=a.call(null,d,c[e],++e,c);return d}});d.register("component-querystring/index.js",
+function(d,c,a){var b=a("trim"),e=a("reduce");c.parse=function(a){if("string"!=typeof a)return{};a=b(a);return""==a?{}:e(a.split("&"),function(a,b){var c=b.split("=");a[c[0]]=null==c[1]?"":decodeURIComponent(c[1]);return a},{})};c.stringify=function(a){if(!a)return"";var b=[],c;for(c in a)b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")}});d.register("component-url/index.js",function(d,c){c.parse=function(a){var b=document.createElement("a");b.href=a;return{href:b.href,
host:b.host||location.host,port:b.port||location.port,hash:b.hash,hostname:b.hostname||location.hostname,pathname:b.pathname,protocol:!b.protocol||":"==b.protocol?location.protocol:b.protocol,search:b.search,query:b.search.slice(1)}};c.isAbsolute=function(a){return 0==a.indexOf("//")||!!~a.indexOf("://")};c.isRelative=function(a){return!c.isAbsolute(a)};c.isCrossDomain=function(a){a=c.parse(a);return a.hostname!==location.hostname||a.port!==location.port||a.protocol!==location.protocol}});d.register("ramitos-match-route/src/match-route.js",
-function(d,c,a){var b=a("path-to-regexp"),g=a("querystring"),e=a("url");d.exports=function(a,c,d){var f=a.method.toLowerCase(),a=e.parse(a.url),j=g.parse(a.query),m=a.pathname,n={},p=null,q="";c[f]&&Object.keys(c[f]).forEach(function(a){var d=[],e=b(a,d,!1,!1);if(e=m.match(e))e.shift(),p=c[f][a],q=a,e.forEach(function(a,b){n[d[b].name]=a})});d(p,q,n,j)}});d.register("component-type/index.js",function(d){var c=Object.prototype.toString;d.exports=function(a){switch(c.call(a)){case "[object Function]":return"function";
-case "[object Date]":return"date";case "[object RegExp]":return"regexp";case "[object Arguments]":return"arguments";case "[object Array]":return"array"}return null===a?"null":void 0===a?"undefined":a===Object(a)?"object":typeof a}});d.register("ramitos-sgen/src/sgen.js",function(d,c,a){var b=a("./map");d.exports.timestamp=function(a){a||(a=13280544E5);for(var c=((new Date).getTime()-a).toString().split(""),a=[],d="",f=0;f<c.length;f+=1)0===f%2?a.push(c[f]):a[a.length-1]+=c[f];for(c=0;c<a.length;c+=
+function(d,c,a){var b=a("path-to-regexp"),e=a("querystring"),f=a("url");d.exports=function(a,c,d){var g=a.method.toLowerCase(),a=f.parse(a.url),j=e.parse(a.query),m=a.pathname,n={},p=null,q="";c[g]&&Object.keys(c[g]).forEach(function(a){var e=[],d=b(a,e,!1,!1);if(d=m.match(d))d.shift(),p=c[g][a],q=a,d.forEach(function(a,b){n[e[b].name]=a})});d(p,q,n,j)}});d.register("component-emitter/index.js",function(d){function c(a){if(a){for(var b in c.prototype)a[b]=c.prototype[b];return a}}d.exports=c;c.prototype.on=
+function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};c.prototype.once=function(a,b){function c(){d.off(a,c);b.apply(this,arguments)}var d=this;this._callbacks=this._callbacks||{};b._off=c;this.on(a,c);return this};c.prototype.off=function(a,b){this._callbacks=this._callbacks||{};var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;var d=c.indexOf(b._off||b);~d&&c.splice(d,1);return this};
+c.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c)for(var c=c.slice(0),d=0,g=c.length;d<g;++d)c[d].apply(this,b);return this};c.prototype.listeners=function(a){this._callbacks=this._callbacks||{};return this._callbacks[a]||[]};c.prototype.hasListeners=function(a){return!!this.listeners(a).length}});d.register("component-type/index.js",function(d){var c=Object.prototype.toString;d.exports=function(a){switch(c.call(a)){case "[object Function]":return"function";
+case "[object Date]":return"date";case "[object RegExp]":return"regexp";case "[object Arguments]":return"arguments";case "[object Array]":return"array"}return null===a?"null":void 0===a?"undefined":a===Object(a)?"object":typeof a}});d.register("ramitos-sgen/src/sgen.js",function(d,c,a){var b=a("./map");d.exports.timestamp=function(a){a||(a=13280544E5);for(var c=((new Date).getTime()-a).toString().split(""),a=[],d="",g=0;g<c.length;g+=1)0===g%2?a.push(c[g]):a[a.length-1]+=c[g];for(c=0;c<a.length;c+=
1)d+=b[a[c]];return d};d.exports.random=function(a){a||(a=6);for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),c=[],d=0;d<a;d+=1)c.push(b[Math.floor(62*Math.random())]);return c.join("")}});d.register("ramitos-sgen/src/map.js",function(d){d.exports={"0":"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"a",11:"b",12:"c",13:"d",14:"e",15:"f",16:"g",17:"h",18:"i",19:"j",20:"k",21:"l",22:"m",23:"n",24:"o",25:"p",26:"q",27:"r",28:"s",29:"t",30:"u",31:"v",
32:"w",33:"x",34:"y",35:"z",36:"0a",37:"1b",38:"2c",39:"3d",40:"4e",41:"5f",42:"6g",43:"7h",44:"8i",45:"9j",46:"ak",47:"bl",48:"cm",49:"dn",50:"eo",51:"fp",52:"gq",53:"hr",54:"is",55:"jt",56:"ku",57:"lv",58:"mw",59:"nx",60:"oy",61:"pz",62:"q0",63:"r1",64:"s2",65:"t3",66:"u4",67:"v5",68:"w6",69:"x7",70:"y8",71:"z9",72:"0z",73:"1y",74:"2x",75:"3w",76:"4v",77:"5u",78:"6t",79:"7s",80:"8r",81:"9q",82:"ap",83:"bo",84:"cn",85:"dm",86:"el",87:"fk",88:"gj",89:"hi",90:"ih",91:"jg",92:"kf",93:"le",94:"md",95:"nc",
-96:"ob",97:"pa",98:"q9",99:"r8","01":"s7","02":"t6","03":"u5","04":"v4","05":"x3","06":"y2","07":"z1","08":"a0","09":"ba"}});d.register("component-stack/index.js",function(d){d.exports=function(){var c=Error.prepareStackTrace;Error.prepareStackTrace=function(a,c){return c};var a=Error();Error.captureStackTrace(a,arguments.callee);a=a.stack;Error.prepareStackTrace=c;return a}});d.register("component-assert/index.js",function(d,c,a){var b=a("stack");d.exports=function(a,c){if(!a){if(!c)if(Error.captureStackTrace){var d=
-b()[1],f=d.getFileName(),i=d.getLineNumber()-1,d=d.getColumnNumber()-1,k=new XMLHttpRequest;k.open("GET",f,!1);k.send(null);i=k.responseText.split("\n")[i].slice(d);c=a=i.match(/assert\((.*)\)/)[1].trim()}else c="assertion failed";throw Error(c);}}});d.register("restio/src/client/restio.js",function(d,c,a){var b=a("../methods");a("../packet");var g=a("../setup");a("match-route");var e=a("engine.io"),h=a("../on");d.exports.connect=function(a,c){var d=new e.Socket(a),f={},m={on:{}},n={};b.forEach(function(a){g.methods(a,
-f,n);g.request(a,m,d,f);g.on(a,m,n)});var p=h(d,f,n);p.error=function(a){throw a;};d.on("message",p.message);d.on("error",p.error);d.on("open",function(){c(m)})}});d.register("restio/src/platform.js",function(d){d.exports="undefined"==typeof window?"node":"browser"});d.register("restio/src/methods.js",function(d){d.exports=["get","post","put","delete"]});d.register("restio/src/packet.js",function(d){d.exports.parse=function(c,a,b,d,e){return JSON.stringify({method:c,data:a,url:b,id:d,rsp:e})}});d.register("restio/src/setup.js",
-function(d,c,a){a("./methods");var b=a("engine.io"),g=a("./packet"),e=a("assert"),h=a("./type"),l=a("sgen"),i=function(){};d.exports.methods=function(a,b,c){b[a]={};c[a]={}};d.exports.on=function(a,b,c){b.on[a]=function(b,d){e("string"==h(b));e("function"==h(d));c[a][b]=d}};d.exports.request=function(a,b,c,d){b[a]=function(){var b;b=arguments;b=Array.prototype.slice.call(b);var f={};b.length?1==b.length?(e("string"==h(b[0])),f.url=b.shift(),f.callback=i,f.data={}):2==b.length&&"function"==h(b[1])?
-(e("string"==h(b[0])),f.url=b.shift(),f.callback=b.shift(),f.data={}):2==b.length&&"object"==h(b[1])?(e("string"==h(b[0])),f.url=b.shift(),f.callback=i,f.data=b.shift()):2==b.length?(e("object"==h(b[1])||"function"==h(b[1])),e("string"==h(b[0]))):(e("function"==h(b[2])),e("object"==h(b[1])),e("string"==h(b[0])),f.url=b.shift(),f.data=b.shift(),f.callback=b.shift()):e(1<=b.length);b=f;var j=l.timestamp();c.send(g.parse(a,b.data,b.url,j,!1));d[a][j]=b.callback;b.callback.tm=setTimeout(function(){clearTimeout(d[a][j].tm);
-d[a][j]=void 0},36E5)}};d.exports.server=function(a){e("string"==h(a)||"object"==h(a));return"string"==h(a)?b.listen(a):b.attach(a)}});d.register("restio/src/type.js",function(d,c,a){c=a("./platform");d.exports="browser"==c?a("type"):a("type-component")});d.register("restio/src/on.js",function(d,c,a){var b=a("./platform"),g=a("./packet"),e=a("match-route");a("./type");d.exports=function(a,c,d){var f={message:function(a){a=JSON.parse(a);a.rsp&&c[a.method][a.id]?f.response(a):a.rsp||f.request(a)},response:function(a){clearTimeout(c[a.method][a.id].tm);
-c[a.method][a.id](a.data);c[a.method][a.id]=void 0},request:function(c){e(c,d,function(d,e,f,i){d({socket:"node"==b?a:void 0,params:f,body:c.data,query:i},function(b){a.send(g.parse(c.method,b,c.url,c.id,!0))})})}};return f}});d.alias("LearnBoost-engine.io-client/lib/index.js","restio/deps/engine.io/lib/index.js");d.alias("LearnBoost-engine.io-client/lib/parser.js","restio/deps/engine.io/lib/parser.js");d.alias("LearnBoost-engine.io-client/lib/socket.js","restio/deps/engine.io/lib/socket.js");d.alias("LearnBoost-engine.io-client/lib/transport.js",
+96:"ob",97:"pa",98:"q9",99:"r8","01":"s7","02":"t6","03":"u5","04":"v4","05":"x3","06":"y2","07":"z1","08":"a0","09":"ba"}});d.register("restio/src/client/restio.js",function(d,c,a){var b=a("../methods");a("../packet");var e=a("../setup");a("match-route");var f=a("engine.io"),h=a("../on"),k=a("emitter");d.exports.connect=function(a,c){var d=new f.Socket(a),g={},n=new k,p={};b.forEach(function(a){e.methods(a,g,p);e.request(a,n,d,g);e.on(a,n,p)});var q=h(d,g,p);d.on("message",q.message);d.on("error",
+function(a){n.emit("error",a)});d.on("open",function(){c(n)})}});d.register("restio/src/platform.js",function(d){d.exports="undefined"==typeof window?"node":"browser"});d.register("restio/src/methods.js",function(d){d.exports=["get","post","put","delete"]});d.register("restio/src/packet.js",function(d){d.exports.parse=function(c,a,b,d,f){return JSON.stringify({method:c,data:a,url:b,id:d,rsp:f})}});d.register("restio/src/setup.js",function(d,c,a){a("./methods");var b=a("engine.io"),e=a("./packet"),
+f=a("assert"),h=a("./type"),k=a("sgen"),i=function(){};d.exports.methods=function(a,b,c){b[a]={};c[a]={}};d.exports.on=function(a,b,c){b.on[a]=function(b,d){f("string"==h(b));f("function"==h(d));c[a][b]=d}};d.exports.request=function(a,b,c,d){b[a]=function(){var b;b=arguments;b=Array.prototype.slice.call(b);var g={};b.length?1==b.length?(f("string"==h(b[0])),g.url=b.shift(),g.callback=i,g.data={}):2==b.length&&"function"==h(b[1])?(f("string"==h(b[0])),g.url=b.shift(),g.callback=b.shift(),g.data={}):
+2==b.length&&"object"==h(b[1])?(f("string"==h(b[0])),g.url=b.shift(),g.callback=i,g.data=b.shift()):2==b.length?(f("object"==h(b[1])||"function"==h(b[1])),f("string"==h(b[0]))):(f("function"==h(b[2])),f("object"==h(b[1])),f("string"==h(b[0])),g.url=b.shift(),g.data=b.shift(),g.callback=b.shift()):f(1<=b.length);b=g;var j=k.timestamp();c.send(e.parse(a,b.data,b.url,j,!1));d[a][j]=b.callback;b.callback.tm=setTimeout(function(){clearTimeout(d[a][j].tm);d[a][j]=void 0},36E5)}};d.exports.server=function(a){f("string"==
+h(a)||"object"==h(a));return"string"==h(a)?b.listen(a):b.attach(a)}});d.register("restio/src/type.js",function(d,c,a){c=a("./platform");d.exports="browser"==c?a("type"):a("type-component")});d.register("restio/src/on.js",function(d,c,a){var b=a("./platform"),e=a("./packet"),f=a("match-route");a("./type");d.exports=function(a,c,d){var g={message:function(a){a=JSON.parse(a);a.rsp&&c[a.method][a.id]?g.response(a):a.rsp||g.request(a)},response:function(a){clearTimeout(c[a.method][a.id].tm);c[a.method][a.id](a.data);
+c[a.method][a.id]=void 0},request:function(c){f(c,d,function(d,g,f,i){d({socket:"node"==b?a:void 0,params:f,body:c.data,query:i},function(b){a.send(e.parse(c.method,b,c.url,c.id,!0))})})}};return g}});d.alias("LearnBoost-engine.io-client/lib/index.js","restio/deps/engine.io/lib/index.js");d.alias("LearnBoost-engine.io-client/lib/parser.js","restio/deps/engine.io/lib/parser.js");d.alias("LearnBoost-engine.io-client/lib/socket.js","restio/deps/engine.io/lib/socket.js");d.alias("LearnBoost-engine.io-client/lib/transport.js",
"restio/deps/engine.io/lib/transport.js");d.alias("LearnBoost-engine.io-client/lib/emitter.js","restio/deps/engine.io/lib/emitter.js");d.alias("LearnBoost-engine.io-client/lib/util.js","restio/deps/engine.io/lib/util.js");d.alias("LearnBoost-engine.io-client/lib/transports/index.js","restio/deps/engine.io/lib/transports/index.js");d.alias("LearnBoost-engine.io-client/lib/transports/polling.js","restio/deps/engine.io/lib/transports/polling.js");d.alias("LearnBoost-engine.io-client/lib/transports/polling-xhr.js",
"restio/deps/engine.io/lib/transports/polling-xhr.js");d.alias("LearnBoost-engine.io-client/lib/transports/polling-jsonp.js","restio/deps/engine.io/lib/transports/polling-jsonp.js");d.alias("LearnBoost-engine.io-client/lib/transports/websocket.js","restio/deps/engine.io/lib/transports/websocket.js");d.alias("LearnBoost-engine.io-client/lib/transports/flashsocket.js","restio/deps/engine.io/lib/transports/flashsocket.js");d.alias("LearnBoost-engine.io-client/lib/index.js","restio/deps/engine.io/index.js");
d.alias("component-emitter/index.js","LearnBoost-engine.io-client/deps/emitter/index.js");d.alias("visionmedia-debug/index.js","LearnBoost-engine.io-client/deps/debug/index.js");d.alias("visionmedia-debug/debug.js","LearnBoost-engine.io-client/deps/debug/debug.js");d.alias("ramitos-match-route/src/match-route.js","restio/deps/match-route/src/match-route.js");d.alias("ramitos-match-route/src/match-route.js","restio/deps/match-route/index.js");d.alias("component-path-to-regexp/index.js","ramitos-match-route/deps/path-to-regexp/index.js");
-d.alias("component-querystring/index.js","ramitos-match-route/deps/querystring/index.js");d.alias("component-trim/index.js","component-querystring/deps/trim/index.js");d.alias("redventures-reduce/index.js","component-querystring/deps/reduce/index.js");d.alias("component-url/index.js","ramitos-match-route/deps/url/index.js");d.alias("component-type/index.js","restio/deps/type/index.js");d.alias("ramitos-sgen/src/sgen.js","restio/deps/sgen/src/sgen.js");d.alias("ramitos-sgen/src/map.js","restio/deps/sgen/src/map.js");
-d.alias("ramitos-sgen/src/sgen.js","restio/deps/sgen/index.js");d.alias("component-assert/index.js","restio/deps/assert/index.js");d.alias("component-stack/index.js","component-assert/deps/stack/index.js");d.alias("restio/src/client/restio.js","restio/index.js");"undefined"==typeof module?window.restio=d("restio"):module.exports=d("restio")})();
+d.alias("component-querystring/index.js","ramitos-match-route/deps/querystring/index.js");d.alias("component-trim/index.js","component-querystring/deps/trim/index.js");d.alias("redventures-reduce/index.js","component-querystring/deps/reduce/index.js");d.alias("component-url/index.js","ramitos-match-route/deps/url/index.js");d.alias("component-emitter/index.js","restio/deps/emitter/index.js");d.alias("component-type/index.js","restio/deps/type/index.js");d.alias("ramitos-sgen/src/sgen.js","restio/deps/sgen/src/sgen.js");
+d.alias("ramitos-sgen/src/map.js","restio/deps/sgen/src/map.js");d.alias("ramitos-sgen/src/sgen.js","restio/deps/sgen/index.js");d.alias("restio/src/client/restio.js","restio/index.js");"undefined"==typeof module?window.restio=d("restio"):module.exports=d("restio")})();
Please sign in to comment.
Something went wrong with that request. Please try again.