From 576a430fc5a583e5288287e57db6bd02ec23b2f9 Mon Sep 17 00:00:00 2001 From: Maik Hummel Date: Tue, 25 Oct 2016 07:24:18 -0400 Subject: [PATCH] Prepare v1.6.2 --- dist/ng-feathers.standalone.min.js | 10 +++++----- package.json | 2 +- src/ng-feathers.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/ng-feathers.standalone.min.js b/dist/ng-feathers.standalone.min.js index 2db51d9..b466ddb 100644 --- a/dist/ng-feathers.standalone.min.js +++ b/dist/ng-feathers.standalone.min.js @@ -1,8 +1,8 @@ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.io=a()}}(function(){var a;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},d.prototype.cleanup=function(){k("cleanup");for(var a;a=this.subs.shift();)a.destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},d.prototype.close=d.prototype.disconnect=function(){k("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"==this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},d.prototype.onclose=function(a){k("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",a),this._reconnection&&!this.skipReconnect&&this.reconnect()},d.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var a=this;if(this.backoff.attempts>=this._reconnectionAttempts)k("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var b=this.backoff.duration();k("will wait %dms before reconnect attempt",b),this.reconnecting=!0;var c=setTimeout(function(){a.skipReconnect||(k("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(b){b?(k("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",b.data)):(k("reconnect success"),a.onreconnect())}))},b);this.subs.push({destroy:function(){clearTimeout(c)}})}},d.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},{"./on":3,"./socket":4,backo2:8,"component-bind":11,"component-emitter":12,debug:14,"engine.io-client":16,indexof:32,"socket.io-parser":40}],3:[function(a,b,c){function d(a,b,c){return a.on(b,c),{destroy:function(){a.removeListener(b,c)}}}b.exports=d},{}],4:[function(a,b,c){function d(a,b){this.io=a,this.nsp=b,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.io.autoConnect&&this.open()}var e=a("socket.io-parser"),f=a("component-emitter"),g=a("to-array"),h=a("./on"),i=a("component-bind"),j=a("debug")("socket.io-client:socket"),k=a("has-binary");b.exports=c=d;var l={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},m=f.prototype.emit;f(d.prototype),d.prototype.subEvents=function(){if(!this.subs){var a=this.io;this.subs=[h(a,"open",i(this,"onopen")),h(a,"packet",i(this,"onpacket")),h(a,"close",i(this,"onclose"))]}},d.prototype.open=d.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this.emit("connecting"),this)},d.prototype.send=function(){var a=g(arguments);return a.unshift("message"),this.emit.apply(this,a),this},d.prototype.emit=function(a){if(l.hasOwnProperty(a))return m.apply(this,arguments),this;var b=g(arguments),c=e.EVENT;k(b)&&(c=e.BINARY_EVENT);var d={type:c,data:b};return d.options={},d.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof b[b.length-1]&&(j("emitting packet with ack id %d",this.ids),this.acks[this.ids]=b.pop(),d.id=this.ids++),this.connected?this.packet(d):this.sendBuffer.push(d),delete this.flags,this},d.prototype.packet=function(a){a.nsp=this.nsp,this.io.packet(a)},d.prototype.onopen=function(){j("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:e.CONNECT})},d.prototype.onclose=function(a){j("close (%s)",a),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",a)},d.prototype.onpacket=function(a){if(a.nsp==this.nsp)switch(a.type){case e.CONNECT:this.onconnect();break;case e.EVENT:this.onevent(a);break;case e.BINARY_EVENT:this.onevent(a);break;case e.ACK:this.onack(a);break;case e.BINARY_ACK:this.onack(a);break;case e.DISCONNECT:this.ondisconnect();break;case e.ERROR:this.emit("error",a.data)}},d.prototype.onevent=function(a){var b=a.data||[];j("emitting event %j",b),null!=a.id&&(j("attaching ack callback to event"),b.push(this.ack(a.id))),this.connected?m.apply(this,b):this.receiveBuffer.push(b)},d.prototype.ack=function(a){var b=this,c=!1;return function(){if(!c){c=!0;var d=g(arguments);j("sending ack %j",d);var f=k(d)?e.BINARY_ACK:e.ACK;b.packet({type:f,id:a,data:d})}}},d.prototype.onack=function(a){var b=this.acks[a.id];"function"==typeof b?(j("calling ack %s with %j",a.id,a.data),b.apply(this,a.data),delete this.acks[a.id]):j("bad ack %s",a.id)},d.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},d.prototype.emitBuffered=function(){var a;for(a=0;ad&&(c=d),b>=d||b>=c||0===d)return new ArrayBuffer(0);for(var e=new Uint8Array(a),f=new Uint8Array(c-b),g=b,h=0;g0&&a.jitter<=1?a.jitter:0,this.attempts=0}b.exports=d,d.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var b=Math.random(),c=Math.floor(b*this.jitter*a);a=0==(1&Math.floor(10*b))?a-c:a+c}return 0|Math.min(a,this.max)},d.prototype.reset=function(){this.attempts=0},d.prototype.setMin=function(a){this.ms=a},d.prototype.setMax=function(a){this.max=a},d.prototype.setJitter=function(a){this.jitter=a}},{}],9:[function(a,b,c){!function(){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=new Uint8Array(256),d=0;d>2],f+=a[(3&d[c])<<4|d[c+1]>>4],f+=a[(15&d[c+1])<<2|d[c+2]>>6],f+=a[63&d[c+2]];return e%3===2?f=f.substring(0,f.length-1)+"=":e%3===1&&(f=f.substring(0,f.length-2)+"=="),f},c.decode=function(a){var c,d,e,f,g,h=.75*a.length,i=a.length,j=0;"="===a[a.length-1]&&(h--,"="===a[a.length-2]&&h--);var k=new ArrayBuffer(h),l=new Uint8Array(k);for(c=0;c>4,l[j++]=(15&e)<<4|f>>2,l[j++]=(3&f)<<6|63&g;return k}}()},{}],10:[function(a,b,c){(function(a){function c(a){for(var b=0;b=31}function e(){var a=arguments,b=this.useColors;if(a[0]=(b?"%c":"")+this.namespace+(b?" %c":" ")+a[0]+(b?"%c ":" ")+"+"+c.humanize(this.diff),!b)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?c.storage.removeItem("debug"):c.storage.debug=a}catch(a){}}function h(){var a;try{a=c.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}c=b.exports=a("./debug"),c.log=f,c.formatArgs=e,c.save=g,c.load=h,c.useColors=d,c.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),c.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],c.formatters.j=function(a){return JSON.stringify(a)},c.enable(h())},{"./debug":15}],15:[function(a,b,c){function d(){return c.colors[k++%c.colors.length]}function e(a){function b(){}function e(){var a=e,b=+new Date,f=b-(j||b);a.diff=f,a.prev=j,a.curr=b,j=b,null==a.useColors&&(a.useColors=c.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=c.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(b,d){if("%%"===b)return b;h++;var e=c.formatters[d];if("function"==typeof e){var f=g[h];b=e.call(a,f),g.splice(h,1),h--}return b}),"function"==typeof c.formatArgs&&(g=c.formatArgs.apply(a,g));var i=e.log||c.log||console.log.bind(console);i.apply(a,g)}b.enabled=!1,e.enabled=!0;var f=c.enabled(a)?e:b;return f.namespace=a,f}function f(a){c.save(a);for(var b=(a||"").split(/[\s,]+/),d=b.length,e=0;e0&&(this.extraHeaders=b.extraHeaders),this.open()}function e(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=a("./transports"),g=a("component-emitter"),h=a("debug")("engine.io-client:socket"),i=a("indexof"),j=a("engine.io-parser"),k=a("parseuri"),l=a("parsejson"),m=a("parseqs");b.exports=d,d.priorWebsocketSuccess=!1,g(d.prototype),d.protocol=j.protocol,d.Socket=d,d.Transport=a("./transport"),d.transports=a("./transports"),d.parser=a("engine.io-parser"),d.prototype.createTransport=function(a){h('creating transport "%s"',a);var b=e(this.query);b.EIO=j.protocol,b.transport=a,this.id&&(b.sid=this.id);var c=new f[a]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders});return c},d.prototype.open=function(){var a;if(this.rememberUpgrade&&d.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)a="websocket";else{if(0===this.transports.length){var b=this;return void setTimeout(function(){b.emit("error","No transports available")},0)}a=this.transports[0]}this.readyState="opening";try{a=this.createTransport(a)}catch(a){return this.transports.shift(),void this.open()}a.open(),this.setTransport(a)},d.prototype.setTransport=function(a){h("setting transport %s",a.name);var b=this;this.transport&&(h("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",function(){b.onDrain()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})},d.prototype.probe=function(a){function b(){if(m.onlyBinaryUpgrades){var b=!this.supportsBinary&&m.transport.supportsBinary;l=l||b}l||(h('probe transport "%s" opened',a),k.send([{type:"ping",data:"probe"}]),k.once("packet",function(b){if(!l)if("pong"==b.type&&"probe"==b.data){if(h('probe transport "%s" pong',a),m.upgrading=!0,m.emit("upgrading",k),!k)return;d.priorWebsocketSuccess="websocket"==k.name,h('pausing current transport "%s"',m.transport.name),m.transport.pause(function(){l||"closed"!=m.readyState&&(h("changing transport and sending upgrade packet"),j(),m.setTransport(k),k.send([{type:"upgrade"}]),m.emit("upgrade",k),k=null,m.upgrading=!1,m.flush())})}else{h('probe transport "%s" failed',a);var c=new Error("probe error");c.transport=k.name,m.emit("upgradeError",c)}}))}function c(){l||(l=!0,j(),k.close(),k=null)}function e(b){var d=new Error("probe error: "+b);d.transport=k.name,c(),h('probe transport "%s" failed because of error: %s',a,b),m.emit("upgradeError",d)}function f(){e("transport closed")}function g(){e("socket closed")}function i(a){k&&a.name!=k.name&&(h('"%s" works - aborting "%s"',a.name,k.name),c())}function j(){k.removeListener("open",b),k.removeListener("error",e),k.removeListener("close",f),m.removeListener("close",g),m.removeListener("upgrading",i)}h('probing transport "%s"',a);var k=this.createTransport(a,{probe:1}),l=!1,m=this;d.priorWebsocketSuccess=!1,k.once("open",b),k.once("error",e),k.once("close",f),this.once("close",g),this.once("upgrading",i),k.open()},d.prototype.onOpen=function(){if(h("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){h("starting upgrade probes");for(var a=0,b=this.upgrades.length;a';f=document.createElement(a)}catch(a){f=document.createElement("iframe"),f.name=e.iframeId,f.src="javascript:0"}f.id=e.iframeId,e.form.appendChild(f),e.iframe=f}var e=this;if(!this.form){var f,g=document.createElement("form"),h=document.createElement("textarea"),k=this.iframeId="eio_iframe_"+this.index;g.className="socketio",g.style.position="absolute",g.style.top="-1000px",g.style.left="-1000px",g.target=k,g.method="POST",g.setAttribute("accept-charset","utf-8"),h.name="d",g.appendChild(h),document.body.appendChild(g),this.form=g,this.area=h}this.form.action=this.uri(),d(),a=a.replace(j,"\\\n"),this.area.value=a.replace(i,"\\n");try{this.form.submit()}catch(a){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==e.iframe.readyState&&c()}:this.iframe.onload=c}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./polling":23,"component-inherit":13}],22:[function(a,b,c){(function(c){function d(){}function e(a){if(i.call(this,a),c.location){var b="https:"==location.protocol,d=location.port;d||(d=b?443:80),this.xd=a.hostname!=c.location.hostname||d!=a.port,this.xs=a.secure!=b}else this.extraHeaders=a.extraHeaders}function f(a){this.method=a.method||"GET",this.uri=a.uri,this.xd=!!a.xd,this.xs=!!a.xs,this.async=!1!==a.async,this.data=void 0!=a.data?a.data:null,this.agent=a.agent,this.isBinary=a.isBinary,this.supportsBinary=a.supportsBinary,this.enablesXDR=a.enablesXDR,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.extraHeaders=a.extraHeaders,this.create()}function g(){for(var a in f.requests)f.requests.hasOwnProperty(a)&&f.requests[a].abort()}var h=a("xmlhttprequest-ssl"),i=a("./polling"),j=a("component-emitter"),k=a("component-inherit"),l=a("debug")("engine.io-client:polling-xhr");b.exports=e,b.exports.Request=f,k(e,i),e.prototype.supportsBinary=!0,e.prototype.request=function(a){return a=a||{},a.uri=this.uri(),a.xd=this.xd,a.xs=this.xs,a.agent=this.agent||!1,a.supportsBinary=this.supportsBinary,a.enablesXDR=this.enablesXDR,a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized,a.extraHeaders=this.extraHeaders,new f(a)},e.prototype.doWrite=function(a,b){var c="string"!=typeof a&&void 0!==a,d=this.request({method:"POST",data:a,isBinary:c}),e=this;d.on("success",b),d.on("error",function(a){e.onError("xhr post error",a)}),this.sendXhr=d},e.prototype.doPoll=function(){l("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},j(f.prototype),f.prototype.create=function(){var a={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};a.pfx=this.pfx,a.key=this.key,a.passphrase=this.passphrase,a.cert=this.cert,a.ca=this.ca,a.ciphers=this.ciphers,a.rejectUnauthorized=this.rejectUnauthorized;var b=this.xhr=new h(a),d=this;try{l("xhr open %s: %s",this.method,this.uri),b.open(this.method,this.uri,this.async);try{if(this.extraHeaders){b.setDisableHeaderCheck(!0);for(var e in this.extraHeaders)this.extraHeaders.hasOwnProperty(e)&&b.setRequestHeader(e,this.extraHeaders[e])}}catch(a){}if(this.supportsBinary&&(b.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?b.setRequestHeader("Content-type","application/octet-stream"):b.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(a){}"withCredentials"in b&&(b.withCredentials=!0),this.hasXDR()?(b.onload=function(){d.onLoad()},b.onerror=function(){d.onError(b.responseText)}):b.onreadystatechange=function(){4==b.readyState&&(200==b.status||1223==b.status?d.onLoad():setTimeout(function(){d.onError(b.status)},0))},l("xhr data %s",this.data),b.send(this.data)}catch(a){return void setTimeout(function(){d.onError(a)},0)}c.document&&(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(!0)},f.prototype.cleanup=function(a){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=d:this.xhr.onreadystatechange=d,a)try{this.xhr.abort()}catch(a){}c.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var a;try{var b;try{b=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(a){}if("application/octet-stream"===b)a=this.xhr.response;else if(this.supportsBinary)try{a=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(b){for(var c=new Uint8Array(this.xhr.response),d=[],e=0,f=c.length;e1?{type:s[e],data:a.substring(1)}:{type:s[e]}:t}var f=new Uint8Array(a),e=f[0],g=k(a,1);return u&&"blob"===b&&(g=new u([g])),{type:s[e],data:g}},c.decodeBase64Packet=function(a,c){var d=s[a.charAt(0)];if(!b.ArrayBuffer)return{type:d,data:{base64:!0,data:a.substr(1)}};var e=l.decode(a.substr(1));return"blob"===c&&u&&(e=new u([e])),{type:d,data:e}},c.encodePayload=function(a,b,d){function e(a){return a.length+":"+a}function f(a,d){c.encodePacket(a,!!g&&b,!0,function(a){d(null,e(a))})}"function"==typeof b&&(d=b,b=null);var g=j(a);return b&&g?u&&!q?c.encodePayloadAsBlob(a,d):c.encodePayloadAsArrayBuffer(a,d):a.length?void h(a,f,function(a,b){return d(b.join(""))}):d("0:")},c.decodePayload=function(a,b,d){if("string"!=typeof a)return c.decodePayloadAsBinary(a,b,d);"function"==typeof b&&(d=b,b=null);var e;if(""==a)return d(t,0,1);for(var f,g,h="",i=0,j=a.length;i0;){for(var h=new Uint8Array(e),i=0===h[0],j="",l=1;255!=h[l];l++){if(j.length>310){g=!0;break}j+=h[l]}if(g)return d(t,0,1);e=k(e,2+j.length),j=parseInt(j);var m=k(e,0,j);if(i)try{m=String.fromCharCode.apply(null,new Uint8Array(m))}catch(a){var n=new Uint8Array(m);m="";for(var l=0;l1)))/4)-B((a-1901+b)/100)+B((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var c,d,e,f=0;(c=function(){this.valueOf=0}).prototype.valueOf=0,d=new c;for(e in d)o.call(d,e)&&f++;return c=d=null,f?p=2==f?function(a,b){var c,d={},e=s.call(a)==u;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==u;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(d=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var c,e,f=s.call(a)==u,h=!f&&"function"!=typeof a.constructor&&g[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(c in a)f&&"prototype"==c||!h.call(a,c)||b(c);for(e=d.length;c=d[--e];h.call(a,c)&&b(c));}),p(a,b)},!c("json-stringify")){var E={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},F="000000",G=function(a,b){return(F+(b||0)).slice(-a)},H="\\u00",I=function(a){for(var b='"',c=0,d=a.length,e=!A||d>10,f=e&&(A?a.split(""):a);c-1/0&&h<1/0){if(D){for(m=B(h/864e5),j=B(m/365.2425)+1970-1;D(j+1,0)<=m;j++);for(k=B((m-D(j,0))/30.42);D(j,k+1)<=m;k++);m=1+m-D(j,k),n=(h%864e5+864e5)%864e5,r=B(n/36e5)%24,t=B(n/6e4)%60,u=B(n/1e3)%60,A=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),A=h.getUTCMilliseconds();h=(j<=0||j>=1e4?(j<0?"-":"+")+G(6,j<0?-j:j):G(4,j))+"-"+G(2,k+1)+"-"+G(2,m)+"T"+G(2,r)+":"+G(2,t)+":"+G(2,u)+"."+G(3,A)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==z)return""+h;if(i==w)return h>-1/0&&h<1/0?""+h:"null";if(i==x)return I(""+h);if("object"==typeof h){for(H=g.length;H--;)if(g[H]===h)throw l();if(g.push(h),C=[],K=f,f+=e,i==y){for(F=0,H=h.length;F0)for(d="",c>10&&(c=10);d.length=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70||O();a+=M("0x"+f.slice(b,K));break;default:O()}else{if(34==e)break;for(e=f.charCodeAt(K),b=K;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++K);a+=f.slice(b,K)}if(34==f.charCodeAt(K))return K++,a;O();default:if(b=K,45==e&&(d=!0,e=f.charCodeAt(++K)),e>=48&&e<=57){for(48==e&&(e=f.charCodeAt(K+1),e>=48&&e<=57)&&O(),d=!1;K=48&&e<=57);K++);if(46==f.charCodeAt(K)){for(c=++K;c=48&&e<=57);c++);c==K&&O(),K=c}if(e=f.charCodeAt(K),101==e||69==e){for(e=f.charCodeAt(++K),43!=e&&45!=e||K++,c=K;c=48&&e<=57);c++);c==K&&O(),K=c}return+f.slice(b,K)}if(d&&O(),"true"==f.slice(K,K+4))return K+=4,!0;if("false"==f.slice(K,K+5))return K+=5,!1;if("null"==f.slice(K,K+4))return K+=4,null;O()}return"$"},Q=function(a){var b,c;if("$"==a&&O(),"string"==typeof a){if("@"==(A?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=P(),"]"!=a;c||(c=!0))c&&(","==a?(a=P(),"]"==a&&O()):O()),","==a&&O(),b.push(Q(a));return b}if("{"==a){for(b={};a=P(),"}"!=a;c||(c=!0))c&&(","==a?(a=P(),"}"==a&&O()):O()),","!=a&&"string"==typeof a&&"@"==(A?a.charAt(0):a[0])&&":"==P()||O(),b[a.slice(1)]=Q(P());return b}O()}return a},R=function(a,b,c){var d=S(a,b,c);d===q?delete a[b]:a[b]=d},S=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==y)for(d=e.length;d--;)R(e,d,c);else p(e,function(a){R(e,a,c)});return c.call(a,b,e)};b.parse=function(a,b){var c,d;return K=0,L=""+a,c=Q(P()),"$"!=P()&&O(),K=L=null,b&&s.call(b)==u?S((d={},d[""]=c,d),"",b):c}}}return b.runInContext=e,b}var f="function"==typeof a&&a.amd,g={function:!0,object:!0},h=g[typeof d]&&d&&!d.nodeType&&d,i=g[typeof window]&&window||this,j=h&&g[typeof c]&&c&&!c.nodeType&&"object"==typeof b&&b;if(!j||j.global!==j&&j.window!==j&&j.self!==j||(i=j),h&&!f)e(i,h);else{var k=i.JSON,l=i.JSON3,m=!1,n=e(i,i.JSON3={noConflict:function(){return m||(m=!0,i.JSON=k,i.JSON3=l,k=l=null),n}});i.JSON={parse:n.parse,stringify:n.stringify}}f&&a(function(){return n})}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],35:[function(a,b,c){function d(a){if(a=""+a,!(a.length>1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a=55296&&b<=56319&&e65535&&(b-=65536,e+=u(b>>>10&1023|55296),b=56320|1023&b),e+=u(b);return e}function h(a){if(a>=55296&&a<=57343)throw Error("Lone surrogate U+"+a.toString(16).toUpperCase()+" is not a scalar value")}function i(a,b){return u(a>>b&63|128)}function j(a){if(0==(4294967168&a))return u(a);var b="";return 0==(4294965248&a)?b=u(a>>6&31|192):0==(4294901760&a)?(h(a),b=u(a>>12&15|224),b+=i(a,6)):0==(4292870144&a)&&(b=u(a>>18&7|240),b+=i(a,12),b+=i(a,6)),b+=u(63&a|128)}function k(a){for(var b,c=f(a),d=c.length,e=-1,g="";++e=s)throw Error("Invalid byte index");var a=255&r[t];if(t++,128==(192&a))return 63&a;throw Error("Invalid continuation byte")}function m(){var a,b,c,d,e;if(t>s)throw Error("Invalid byte index");if(t==s)return!1;if(a=255&r[t],t++,0==(128&a))return a;if(192==(224&a)){var b=l();if(e=(31&a)<<6|b,e>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&a)){if(b=l(),c=l(),e=(15&a)<<12|b<<6|c,e>=2048)return h(e),e;throw Error("Invalid continuation byte")}if(240==(248&a)&&(b=l(),c=l(),d=l(),e=(15&a)<<18|b<<12|c<<6|d,e>=65536&&e<=1114111))return e;throw Error("Invalid UTF-8 detected")}function n(a){r=f(a),s=r.length,t=0;for(var b,c=[];(b=m())!==!1;)c.push(b);return g(c)}var o="object"==typeof d&&d,p="object"==typeof c&&c&&c.exports==o&&c,q="object"==typeof b&&b;q.global!==q&&q.window!==q||(e=q);var r,s,t,u=String.fromCharCode,v={version:"2.0.0",encode:k,decode:n};if("function"==typeof a&&"object"==typeof a.amd&&a.amd)a(function(){return v});else if(o&&!o.nodeType)if(p)p.exports=v;else{var w={},x=w.hasOwnProperty;for(var y in v)x.call(v,y)&&(o[y]=v[y])}else e.utf8=v}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],45:[function(a,b,c){"use strict";function d(a){var b="";do b=h[a%i]+b,a=Math.floor(a/i);while(a>0);return b}function e(a){var b=0;for(l=0;l=31}function e(){var a=arguments,b=this.useColors;if(a[0]=(b?"%c":"")+this.namespace+(b?" %c":" ")+a[0]+(b?"%c ":" ")+"+"+c.humanize(this.diff),!b)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?c.storage.removeItem("debug"):c.storage.debug=a}catch(a){}}function h(){var a;try{a=c.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}c=b.exports=a("./debug"),c.log=f,c.formatArgs=e,c.save=g,c.load=h,c.useColors=d,c.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),c.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],c.formatters.j=function(a){return JSON.stringify(a)},c.enable(h())},{"./debug":2}],2:[function(a,b,c){function d(){return c.colors[k++%c.colors.length]}function e(a){function b(){}function e(){var a=e,b=+new Date,f=b-(j||b);a.diff=f,a.prev=j,a.curr=b,j=b,null==a.useColors&&(a.useColors=c.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=c.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(b,d){if("%%"===b)return b;h++;var e=c.formatters[d];if("function"==typeof e){var f=g[h];b=e.call(a,f),g.splice(h,1),h--}return b}),"function"==typeof c.formatArgs&&(g=c.formatArgs.apply(a,g));var i=e.log||c.log||console.log.bind(console);i.apply(a,g)}b.enabled=!1,e.enabled=!0;var f=c.enabled(a)?e:b;return f.namespace=a,f}function f(a){c.save(a);for(var b=(a||"").split(/[\s,]+/),d=b.length,e=0;e0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(e(b))return 1;if(b)return b.length}return 0},d.listenerCount=function(a,b){return a.listenerCount(b)}},{}],4:[function(a,b,c){b.exports=a("./lib/client/index")},{"./lib/client/index":6}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(){return function(a){var b=a.app;Object.assign(a.params,{user:b.get("user"),token:b.get("token")})}}function f(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return function(b){b.params.token&&(b.params.headers=Object.assign({},d({},a.header||"authorization",b.params.token),b.params.headers))}}Object.defineProperty(c,"__esModule",{value:!0}),c.populateParams=e,c.populateHeader=f},{}],6:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b.default=a,b}function e(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=Object.assign({},k,a);return function(){var a=this;a.get("storage")||a.set("storage",(0,j.getStorage)(b.storage)),a.authenticate=function(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=this.get("storage"),e=Promise.resolve(c);c.type||(e=(0,j.getJWT)(b.tokenKey,b.cookie,this.get("storage")).then(function(a){return a?{type:"token",token:a}:Promise.reject(new g.default.NotAuthenticated("Could not find stored JWT and no authentication type was given"))}));var f=function(c){return a.set("token",c.token),a.set("user",c.data),Promise.resolve(d.setItem(b.tokenKey,c.token)).then(function(){return c})};return e.then(function(c){var d=void 0;if(c.endpoint)d=c.endpoint;else if("local"===c.type)d=b.localEndpoint;else{if("token"!==c.type)throw new Error("Unsupported authentication 'type': "+c.type);d=b.tokenEndpoint}return(0,j.connected)(a).then(function(b){if(a.rest)return a.service(d).create(c).then(f);var e=a.io?"emit":"send";return(0,j.authenticateSocket)(c,b,e).then(f)})})},a.logout=function(){return a.set("user",null),a.set("token",null),(0,j.clearCookie)(b.cookie),Promise.resolve(a.get("storage").removeItem(b.tokenKey)).then(function(){if(a.io||a.primus){var b=a.io?"emit":"send",c=a.io?a.io:a.primus;return(0,j.logoutSocket)(c,b)}})},a.mixins.push(function(a){if("function"!=typeof a.before||"function"!=typeof a.after)throw new Error("It looks like feathers-hooks isn't configured. It is required before running feathers-authentication.");a.before(i.populateParams(b))}),a.rest&&a.mixins.push(function(a){a.before(i.populateHeader(b))})}};var f=a("feathers-errors"),g=e(f),h=a("./hooks"),i=d(h),j=a("./utils"),k={cookie:"feathers-jwt",tokenKey:"feathers-jwt",localEndpoint:"/auth/local",tokenEndpoint:"/auth/token"};b.exports=c.default},{"./hooks":5,"./utils":7,"feathers-errors":12}],7:[function(a,b,c){"use strict";function d(a){return new Promise(function(b,c){if(a.rest)return b();var d=a.io||a.primus;if(!d)return c(new Error("It looks like no client connection has been configured."));if(d.once("disconnect",c),d.once("close",c),a.io&&!d.connected||a.primus&&3!==d.readyState){var e=a.primus?"open":"connect";d.once(e,function(){return b(d)})}else b(d)})}function e(a,b,c){return new Promise(function(d,e){b.once("unauthorized",e),b.once("authenticated",d),b[c]("authenticate",a)})}function f(a,b){return new Promise(function(c,d){a[b]("logout",function(a){a&&d(a),c()})})}function g(a){if("undefined"!=typeof document){var b="; "+document.cookie,c=b.split("; "+a+"=");if(2===c.length)return c.pop().split(";").shift()}return null}function h(a){return"undefined"!=typeof document&&(document.cookie=a+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}function i(a,b,c){return Promise.resolve(c.getItem(a)).then(function(a){var c=g(b);return c?c:a})}function j(a){return a?a:{store:{},getItem:function(a){return this.store[a]},setItem:function(a,b){return this.store[a]=b},removeItem:function(a){return delete this.store[a],this}}}Object.defineProperty(c,"__esModule",{value:!0}),c.connected=d,c.authenticateSocket=e,c.logoutSocket=f,c.getCookie=g,c.clearCookie=h,c.getJWT=i,c.getStorage=j},{}],8:[function(a,b,c){"use strict";function d(a,b){return k[a](b)}Object.defineProperty(c,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};c.default=d;var f=c.noop=function(){},g=function(a){var b=a[a.length-1];return"function"==typeof b?b:f},h=function(a,b){return"object"===e(a[b])?a[b]:{}},i=function(a){return function(b){var c=b[0],d=b[1],f=g(b),i=h(b,2);if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");if("object"!==("undefined"==typeof d?"undefined":e(d)))throw new Error("No data provided for '"+a+"'");if(b.length>4)throw new Error("Too many arguments for '"+a+"' service method");return[c,d,i,f]}},j=function(a){return function(b){var c=b[0],d=h(b,1),e=g(b);if(b.length>3)throw new Error("Too many arguments for '"+a+"' service method");if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");return[c,d,e]}},k=c.converters={find:function(a){var b=g(a),c=h(a,0);if(a.length>2)throw new Error("Too many arguments for 'find' service method");return[c,b]},create:function(a){var b=a[0],c=h(a,1),d=g(a);if("object"!==("undefined"==typeof b?"undefined":e(b)))throw new Error("First parameter for 'create' must be an object");if(a.length>3)throw new Error("Too many arguments for 'create' service method");return[b,c,d]},update:i("update"),patch:i("patch"),get:j("get"),remove:j("remove")}},{}],9:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a("./arguments"),f=d(e),g=a("./utils"),h=a("./hooks"),i=d(h);c.default={getArguments:f.default,stripSlashes:g.stripSlashes,each:g.each,hooks:i.default,matcher:g.matcher,sorter:g.sorter},b.exports=c.default},{"./arguments":8,"./hooks":10,"./utils":11}],10:[function(a,b,c){"use strict";function d(a){return{id:a[0],params:a[1],callback:a[2]}}function e(a){return{id:a[0],data:a[1],params:a[2],callback:a[3]}}function f(a,b,c){var d=l[a](c);return d.method=a,d.type=b,d}function g(a){var b=[];return"undefined"!=typeof a.id&&b.push(a.id),a.data&&b.push(a.data),b.push(a.params||{}),b.push(a.callback),b}function h(a){return"find"===a.method?[a.params,a.callback]:"get"===a.method||"remove"===a.method?[a.id,a.params,a.callback]:"update"===a.method||"patch"===a.method?[a.id,a.data,a.params,a.callback]:"create"===a.method?[a.data,a.params,a.callback]:g(a)}function i(a){var b={};return Array.isArray(a)?b={all:a}:"object"!==("undefined"==typeof a?"undefined":j(a))?b={all:[a]}:(0,k.each)(a,function(a,c){b[c]=Array.isArray(a)?a:[a]}),b}Object.defineProperty(c,"__esModule",{value:!0});var j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},k=a("./utils"),l={find:function(a){return{params:a[0],callback:a[1]}},create:function(a){return{data:a[0],params:a[1],callback:a[2]}},get:d,remove:d,update:e,patch:e};c.default={hookObject:f,hook:f,converters:l,defaultMakeArguments:g,makeArguments:h,convertHookData:i},b.exports=c.default},{"./utils":11}],11:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);bc[e]&&(d+=1*a)}),d}}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?c-1:0),e=1;eb}},$gte:function(a,b){return function(c){return c[a]>=b}},$ne:function(a,b){return function(c){return c[a]!==b}}}},{}],12:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a){function b(){var b=Reflect.construct(a,Array.from(arguments));return Object.setPrototypeOf(b,Object.getPrototypeOf(this)),b}return b.prototype=Object.create(a.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a,b}function h(a){if(!a)return a;var b=A[a.name],c=b?new b(a.message,a.data):new Error(a.message||a);return"object"===("undefined"==typeof a?"undefined":j(a))&&i(c,a),c}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?c-1:0),e=1;e=400?"string"==typeof e?d(new Error(e)):(e.response=b,d(h(new Error(e.message),e))):void c(e)})})}}]),b}(k.default);c.default=l,b.exports=c.default},{"./base":19}],24:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1?e-1:0),g=1;g1?c-1:0),e=1;e1?b-1:0),d=1;d2?c-2:0),e=2;e1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a1)for(var c=1;c=0&&d.parseArrays&&h<=d.arrayLimit?(e=[],e[h]=a(b,c,d)):e[g]=a(b,c,d)}return e},h=function(a,b,c){if(a){var d=c.allowDots?a.replace(/\.([^\.\[]+)/g,"[$1]"):a,e=/^([^\[\]]*)/,f=/(\[[^\[\]]*\])/g,h=e.exec(d),i=[];if(h[1]){if(!c.plainObjects&&Object.prototype.hasOwnProperty(h[1])&&!c.allowPrototypes)return;i.push(h[1])}for(var j=0;null!==(h=f.exec(d))&&j=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122?c+=b.charAt(e):f<128?c+=d[f]:f<2048?c+=d[192|f>>6]+d[128|63&f]:f<55296||f>=57344?c+=d[224|f>>12]+d[128|f>>6&63]+d[128|63&f]:(e+=1,f=65536+((1023&f)<<10|1023&b.charCodeAt(e)),c+=d[240|f>>18]+d[128|f>>12&63]+d[128|f>>6&63]+d[128|63&f])}return c},c.compact=function(a,b){if("object"!=typeof a||null===a)return a;var d=b||[],e=d.indexOf(a);if(e!==-1)return d[e];if(d.push(a),Array.isArray(a)){for(var f=[],g=0;g25;){var d=a%26;b=c.charAt(d)+b,a=Math.floor(a/26)-1}return b=c.charAt(a)+b},c.makeFakeArgs=function(a){for(var b=[],d=0;d=31}function e(){var a=arguments,c=this.useColors;if(a[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+a[0]+(c?"%c ":" ")+"+"+b.humanize(this.diff),!c)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?b.storage.removeItem("debug"):b.storage.debug=a}catch(a){}}function h(){var a;try{a=b.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}b=a.exports=c(4),b.log=f,b.formatArgs=e,b.save=g,b.load=h,b.useColors=d,b.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),b.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],b.formatters.j=function(a){return JSON.stringify(a)},b.enable(h())},function(a,b,c){function d(){return b.colors[k++%b.colors.length]}function e(a){function c(){}function e(){var a=e,c=+new Date,f=c-(j||c);a.diff=f,a.prev=j,a.curr=c,j=c,null==a.useColors&&(a.useColors=b.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=b.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(c,d){if("%%"===c)return c;h++;var e=b.formatters[d];if("function"==typeof e){var f=g[h];c=e.call(a,f),g.splice(h,1),h--}return c}),"function"==typeof b.formatArgs&&(g=b.formatArgs.apply(a,g));var i=e.log||b.log||console.log.bind(console);i.apply(a,g)}c.enabled=!1,e.enabled=!0;var f=b.enabled(a)?e:c;return f.namespace=a,f}function f(a){b.save(a);for(var c=(a||"").split(/[\s,]+/),d=c.length,e=0;e1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*k;case"days":case"day":case"d":return c*j;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*h;case"seconds":case"second":case"secs":case"sec":case"s":return c*g;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function d(a){return a>=j?Math.round(a/j)+"d":a>=i?Math.round(a/i)+"h":a>=h?Math.round(a/h)+"m":a>=g?Math.round(a/g)+"s":a+"ms"}function e(a){return f(a,j,"day")||f(a,i,"hour")||f(a,h,"minute")||f(a,g,"second")||a+" ms"}function f(a,b,c){if(!(a1)))/4)-B((a-1901+b)/100)+B((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var c,d,e,f=0;(c=function(){this.valueOf=0}).prototype.valueOf=0,d=new c;for(e in d)o.call(d,e)&&f++;return c=d=null,f?p=2==f?function(a,b){var c,d={},e=s.call(a)==u;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==u;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(d=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var c,e,f=s.call(a)==u,h=!f&&"function"!=typeof a.constructor&&g[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(c in a)f&&"prototype"==c||!h.call(a,c)||b(c);for(e=d.length;c=d[--e];h.call(a,c)&&b(c));}),p(a,b)},!c("json-stringify")){var E={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},F="000000",G=function(a,b){return(F+(b||0)).slice(-a)},H="\\u00",I=function(a){for(var b='"',c=0,d=a.length,e=!A||d>10,f=e&&(A?a.split(""):a);c-1/0&&h<1/0){if(D){for(m=B(h/864e5),j=B(m/365.2425)+1970-1;D(j+1,0)<=m;j++);for(k=B((m-D(j,0))/30.42);D(j,k+1)<=m;k++);m=1+m-D(j,k),n=(h%864e5+864e5)%864e5,r=B(n/36e5)%24,t=B(n/6e4)%60,u=B(n/1e3)%60,A=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),A=h.getUTCMilliseconds();h=(j<=0||j>=1e4?(j<0?"-":"+")+G(6,j<0?-j:j):G(4,j))+"-"+G(2,k+1)+"-"+G(2,m)+"T"+G(2,r)+":"+G(2,t)+":"+G(2,u)+"."+G(3,A)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==z)return""+h;if(i==w)return h>-1/0&&h<1/0?""+h:"null";if(i==x)return I(""+h);if("object"==typeof h){for(H=g.length;H--;)if(g[H]===h)throw l();if(g.push(h),C=[],K=f,f+=e,i==y){for(F=0,H=h.length;F0)for(d="",c>10&&(c=10);d.length=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70||O();a+=M("0x"+f.slice(b,K));break;default:O()}else{if(34==e)break;for(e=f.charCodeAt(K),b=K;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++K);a+=f.slice(b,K)}if(34==f.charCodeAt(K))return K++,a;O();default:if(b=K,45==e&&(d=!0,e=f.charCodeAt(++K)),e>=48&&e<=57){for(48==e&&(e=f.charCodeAt(K+1),e>=48&&e<=57)&&O(),d=!1;K=48&&e<=57);K++);if(46==f.charCodeAt(K)){for(c=++K;c=48&&e<=57);c++);c==K&&O(),K=c}if(e=f.charCodeAt(K),101==e||69==e){for(e=f.charCodeAt(++K),43!=e&&45!=e||K++,c=K;c=48&&e<=57);c++);c==K&&O(),K=c}return+f.slice(b,K)}if(d&&O(),"true"==f.slice(K,K+4))return K+=4,!0;if("false"==f.slice(K,K+5))return K+=5,!1;if("null"==f.slice(K,K+4))return K+=4,null;O()}return"$"},Q=function(a){var b,c;if("$"==a&&O(),"string"==typeof a){if("@"==(A?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=P(),"]"!=a;c||(c=!0))c&&(","==a?(a=P(),"]"==a&&O()):O()),","==a&&O(),b.push(Q(a));return b}if("{"==a){for(b={};a=P(),"}"!=a;c||(c=!0))c&&(","==a?(a=P(),"}"==a&&O()):O()),","!=a&&"string"==typeof a&&"@"==(A?a.charAt(0):a[0])&&":"==P()||O(),b[a.slice(1)]=Q(P());return b}O()}return a},R=function(a,b,c){var d=S(a,b,c);d===q?delete a[b]:a[b]=d},S=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==y)for(d=e.length;d--;)R(e,d,c);else p(e,function(a){R(e,a,c)});return c.call(a,b,e)};b.parse=function(a,b){var c,d;return K=0,L=""+a,c=Q(P()),"$"!=P()&&O(),K=L=null,b&&s.call(b)==u?S((d={},d[""]=c,d),"",b):c}}}return b.runInContext=e,b}var f="function"==typeof d&&d.amd,g={function:!0,object:!0},h=g[typeof b]&&b&&!b.nodeType&&b,i=g[typeof window]&&window||this,j=h&&g[typeof a]&&a&&!a.nodeType&&"object"==typeof c&&c;if(!j||j.global!==j&&j.window!==j&&j.self!==j||(i=j),h&&!f)e(i,h);else{var k=i.JSON,l=i.JSON3,m=!1,n=e(i,i.JSON3={noConflict:function(){return m||(m=!0,i.JSON=k,i.JSON3=l,k=l=null),n}});i.JSON={parse:n.parse,stringify:n.stringify}}f&&d(function(){return n})}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},function(a,b){function c(a){if(a)return d(a)}function d(a){for(var b in c.prototype)a[b]=c.prototype[b];return a}a.exports=c,c.prototype.on=c.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},c.prototype.once=function(a,b){function c(){d.off(a,c),b.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},c.fn=b,this.on(a,c),this},c.prototype.off=c.prototype.removeListener=c.prototype.removeAllListeners=c.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;for(var d,e=0;e0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},d.prototype.cleanup=function(){l("cleanup");for(var a=this.subs.length,b=0;b=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var b=this.backoff.duration();l("will wait %dms before reconnect attempt",b),this.reconnecting=!0;var c=setTimeout(function(){a.skipReconnect||(l("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(b){b?(l("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",b.data)):(l("reconnect success"),a.onreconnect())}))},b);this.subs.push({destroy:function(){clearTimeout(c)}})}},d.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},function(a,b,c){a.exports=c(15)},function(a,b,c){a.exports=c(16),a.exports.parser=c(23)},function(a,b,c){(function(b){function d(a,c){if(!(this instanceof d))return new d(a,c);c=c||{},a&&"object"==typeof a&&(c=a,a=null),a?(a=k(a),c.hostname=a.host,c.secure="https"===a.protocol||"wss"===a.protocol,c.port=a.port,a.query&&(c.query=a.query)):c.host&&(c.hostname=k(c.host).host),this.secure=null!=c.secure?c.secure:b.location&&"https:"===location.protocol,c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.agent=c.agent||!1,this.hostname=c.hostname||(b.location?location.hostname:"localhost"),this.port=c.port||(b.location&&location.port?location.port:this.secure?443:80),this.query=c.query||{},"string"==typeof this.query&&(this.query=m.decode(this.query)),this.upgrade=!1!==c.upgrade,this.path=(c.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!c.forceJSONP,this.jsonp=!1!==c.jsonp,this.forceBase64=!!c.forceBase64,this.enablesXDR=!!c.enablesXDR,this.timestampParam=c.timestampParam||"t",this.timestampRequests=c.timestampRequests,this.transports=c.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=c.policyPort||843,this.rememberUpgrade=c.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=c.onlyBinaryUpgrades,this.perMessageDeflate=!1!==c.perMessageDeflate&&(c.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=c.pfx||null,this.key=c.key||null,this.passphrase=c.passphrase||null,this.cert=c.cert||null,this.ca=c.ca||null,this.ciphers=c.ciphers||null,this.rejectUnauthorized=void 0===c.rejectUnauthorized?null:c.rejectUnauthorized;var e="object"==typeof b&&b;e.global===e&&c.extraHeaders&&Object.keys(c.extraHeaders).length>0&&(this.extraHeaders=c.extraHeaders),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function e(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=c(17),g=c(31),h=c(3)("engine.io-client:socket"),i=c(38),j=c(23),k=c(2),l=c(39),m=c(32);a.exports=d,d.priorWebsocketSuccess=!1,g(d.prototype),d.protocol=j.protocol,d.Socket=d,d.Transport=c(22),d.transports=c(17),d.parser=c(23),d.prototype.createTransport=function(a){h('creating transport "%s"',a);var b=e(this.query);b.EIO=j.protocol,b.transport=a,this.id&&(b.sid=this.id);var c=new f[a]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders});return c},d.prototype.open=function(){var a;if(this.rememberUpgrade&&d.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)a="websocket";else{if(0===this.transports.length){var b=this;return void setTimeout(function(){b.emit("error","No transports available")},0)}a=this.transports[0]}this.readyState="opening";try{a=this.createTransport(a)}catch(a){return this.transports.shift(),void this.open()}a.open(),this.setTransport(a)},d.prototype.setTransport=function(a){h("setting transport %s",a.name);var b=this;this.transport&&(h("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",function(){b.onDrain()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})},d.prototype.probe=function(a){function b(){if(m.onlyBinaryUpgrades){var b=!this.supportsBinary&&m.transport.supportsBinary;l=l||b}l||(h('probe transport "%s" opened',a),k.send([{type:"ping",data:"probe"}]),k.once("packet",function(b){if(!l)if("pong"===b.type&&"probe"===b.data){if(h('probe transport "%s" pong',a),m.upgrading=!0,m.emit("upgrading",k),!k)return;d.priorWebsocketSuccess="websocket"===k.name,h('pausing current transport "%s"',m.transport.name),m.transport.pause(function(){l||"closed"!==m.readyState&&(h("changing transport and sending upgrade packet"),j(),m.setTransport(k),k.send([{type:"upgrade"}]),m.emit("upgrade",k),k=null,m.upgrading=!1,m.flush())})}else{h('probe transport "%s" failed',a);var c=new Error("probe error");c.transport=k.name,m.emit("upgradeError",c)}}))}function c(){l||(l=!0,j(),k.close(),k=null)}function e(b){var d=new Error("probe error: "+b);d.transport=k.name,c(),h('probe transport "%s" failed because of error: %s',a,b),m.emit("upgradeError",d)}function f(){e("transport closed")}function g(){e("socket closed")}function i(a){k&&a.name!==k.name&&(h('"%s" works - aborting "%s"',a.name,k.name),c())}function j(){k.removeListener("open",b),k.removeListener("error",e),k.removeListener("close",f),m.removeListener("close",g),m.removeListener("upgrading",i)}h('probing transport "%s"',a);var k=this.createTransport(a,{probe:1}),l=!1,m=this;d.priorWebsocketSuccess=!1,k.once("open",b),k.once("error",e),k.once("close",f),this.once("close",g),this.once("upgrading",i),k.open()},d.prototype.onOpen=function(){if(h("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){h("starting upgrade probes");for(var a=0,b=this.upgrades.length;a1?{type:t[e],data:a.substring(1)}:{type:t[e]}:u}var f=new Uint8Array(a),e=f[0],g=m(a,1);return v&&"blob"===c&&(g=new v([g])),{type:t[e],data:g}},b.decodeBase64Packet=function(a,b){var c=t[a.charAt(0)];if(!j)return{type:c,data:{base64:!0,data:a.substr(1)}};var d=j.decode(a.substr(1));return"blob"===b&&v&&(d=new v([d])),{type:c,data:d}},b.encodePayload=function(a,c,d){function e(a){return a.length+":"+a}function f(a,d){b.encodePacket(a,!!g&&c,!0,function(a){d(null,e(a))})}"function"==typeof c&&(d=c,c=null);var g=l(a);return c&&g?v&&!r?b.encodePayloadAsBlob(a,d):b.encodePayloadAsArrayBuffer(a,d):a.length?void i(a,f,function(a,b){return d(b.join(""))}):d("0:")},b.decodePayload=function(a,c,d){if("string"!=typeof a)return b.decodePayloadAsBinary(a,c,d);"function"==typeof c&&(d=c,c=null);var e;if(""==a)return d(u,0,1);for(var f,g,h="",i=0,j=a.length;i0;){for(var h=new Uint8Array(e),i=0===h[0],j="",k=1;255!=h[k];k++){if(j.length>310){g=!0;break}j+=h[k]}if(g)return d(u,0,1);e=m(e,2+j.length),j=parseInt(j);var l=m(e,0,j);if(i)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(a){var n=new Uint8Array(l);l="";for(var k=0;kd&&(c=d),b>=d||b>=c||0===d)return new ArrayBuffer(0);for(var e=new Uint8Array(a),f=new Uint8Array(c-b),g=b,h=0;g=55296&&b<=56319&&e65535&&(b-=65536,e+=t(b>>>10&1023|55296),b=56320|1023&b),e+=t(b);return e}function i(a,b){return t(a>>b&63|128)}function j(a){if(0==(4294967168&a))return t(a);var b="";return 0==(4294965248&a)?b=t(a>>6&31|192):0==(4294901760&a)?(b=t(a>>12&15|224),b+=i(a,6)):0==(4292870144&a)&&(b=t(a>>18&7|240),b+=i(a,12),b+=i(a,6)),b+=t(63&a|128)}function k(a){for(var b,c=g(a),d=c.length,e=-1,f="";++e=r)throw Error("Invalid byte index");var a=255&q[s];if(s++,128==(192&a))return 63&a;throw Error("Invalid continuation byte")}function m(){var a,b,c,d,e;if(s>r)throw Error("Invalid byte index");if(s==r)return!1;if(a=255&q[s],s++,0==(128&a))return a;if(192==(224&a)){var b=l();if(e=(31&a)<<6|b,e>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&a)){if(b=l(),c=l(),e=(15&a)<<12|b<<6|c,e>=2048)return e;throw Error("Invalid continuation byte")}if(240==(248&a)&&(b=l(),c=l(),d=l(),e=(15&a)<<18|b<<12|c<<6|d,e>=65536&&e<=1114111))return e;throw Error("Invalid WTF-8 detected")}function n(a){q=g(a),r=q.length,s=0;for(var b,c=[];(b=m())!==!1;)c.push(b);return h(c)}var o="object"==typeof b&&b,p=("object"==typeof a&&a&&a.exports==o&&a,"object"==typeof e&&e);p.global!==p&&p.window!==p||(f=p);var q,r,s,t=String.fromCharCode,u={version:"1.0.0",encode:k,decode:n};d=function(){return u}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))}(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){!function(){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Uint8Array(256),d=0;d>2],f+=a[(3&d[c])<<4|d[c+1]>>4],f+=a[(15&d[c+1])<<2|d[c+2]>>6],f+=a[63&d[c+2]];return e%3===2?f=f.substring(0,f.length-1)+"=":e%3===1&&(f=f.substring(0,f.length-2)+"=="),f},b.decode=function(a){var b,d,e,f,g,h=.75*a.length,i=a.length,j=0;"="===a[a.length-1]&&(h--,"="===a[a.length-2]&&h--);var k=new ArrayBuffer(h),l=new Uint8Array(k);for(b=0;b>4,l[j++]=(15&e)<<4|f>>2,l[j++]=(3&f)<<6|63&g;return k}}()},function(a,b){(function(b){function c(a){for(var b=0;b0);return b}function d(a){var b=0;for(k=0;k';f=document.createElement(a)}catch(a){f=document.createElement("iframe"),f.name=e.iframeId,f.src="javascript:0"}f.id=e.iframeId,e.form.appendChild(f),e.iframe=f}var e=this;if(!this.form){var f,g=document.createElement("form"),h=document.createElement("textarea"),k=this.iframeId="eio_iframe_"+this.index;g.className="socketio",g.style.position="absolute",g.style.top="-1000px",g.style.left="-1000px",g.target=k,g.method="POST",g.setAttribute("accept-charset","utf-8"),h.name="d",g.appendChild(h),document.body.appendChild(g),this.form=g,this.area=h}this.form.action=this.uri(),d(),a=a.replace(j,"\\\n"),this.area.value=a.replace(i,"\\n");try{this.form.submit()}catch(a){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===e.iframe.readyState&&c()}:this.iframe.onload=c}}).call(b,function(){return this}())},function(a,b,c){(function(b){function d(a){var b=a&&a.forceBase64;b&&(this.supportsBinary=!1),this.perMessageDeflate=a.perMessageDeflate,e.call(this,a)}var e=c(22),f=c(23),g=c(32),h=c(33),i=c(34),j=c(3)("engine.io-client:websocket"),k=b.WebSocket||b.MozWebSocket,l=k;if(!l&&"undefined"==typeof window)try{l=c(37)}catch(a){}a.exports=d,h(d,e),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var a=this.uri(),b=void 0,c={agent:this.agent,perMessageDeflate:this.perMessageDeflate};c.pfx=this.pfx,c.key=this.key,c.passphrase=this.passphrase,c.cert=this.cert,c.ca=this.ca,c.ciphers=this.ciphers,c.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(c.headers=this.extraHeaders);try{this.ws=k?new l(a):new l(a,b,c)}catch(a){return this.emit("error",a)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var a=this;this.ws.onopen=function(){a.onOpen()},this.ws.onclose=function(){a.onClose()},this.ws.onmessage=function(b){a.onData(b.data)},this.ws.onerror=function(b){a.onError("websocket error",b)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(d.prototype.onData=function(a){var b=this;setTimeout(function(){e.prototype.onData.call(b,a)},0)}),d.prototype.write=function(a){function c(){d.emit("flush"),setTimeout(function(){d.writable=!0,d.emit("drain")},0)}var d=this;this.writable=!1;for(var e=a.length,g=0,h=e;g0&&a.jitter<=1?a.jitter:0,this.attempts=0}a.exports=c,c.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var b=Math.random(),c=Math.floor(b*this.jitter*a);a=0==(1&Math.floor(10*b))?a-c:a+c}return 0|Math.min(a,this.max)},c.prototype.reset=function(){this.attempts=0},c.prototype.setMin=function(a){this.ms=a},c.prototype.setMax=function(a){this.max=a},c.prototype.setJitter=function(a){this.jitter=a}}])}),function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.feathers=a()}}(function(){var define,module,exports;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=31}function e(){var a=arguments,b=this.useColors;if(a[0]=(b?"%c":"")+this.namespace+(b?" %c":" ")+a[0]+(b?"%c ":" ")+"+"+c.humanize(this.diff),!b)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?c.storage.removeItem("debug"):c.storage.debug=a}catch(a){}}function h(){var a;try{a=c.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}c=b.exports=a("./debug"),c.log=f,c.formatArgs=e,c.save=g,c.load=h,c.useColors=d,c.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),c.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],c.formatters.j=function(a){return JSON.stringify(a)},c.enable(h())},{"./debug":2}],2:[function(a,b,c){function d(){return c.colors[k++%c.colors.length]}function e(a){function b(){}function e(){var a=e,b=+new Date,f=b-(j||b);a.diff=f,a.prev=j,a.curr=b,j=b,null==a.useColors&&(a.useColors=c.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=c.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(b,d){if("%%"===b)return b;h++;var e=c.formatters[d];if("function"==typeof e){var f=g[h];b=e.call(a,f),g.splice(h,1),h--}return b}),"function"==typeof c.formatArgs&&(g=c.formatArgs.apply(a,g));var i=e.log||c.log||console.log.bind(console);i.apply(a,g)}b.enabled=!1,e.enabled=!0;var f=c.enabled(a)?e:b;return f.namespace=a,f}function f(a){c.save(a);for(var b=(a||"").split(/[\s,]+/),d=b.length,e=0;e0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(e(b))return 1;if(b)return b.length}return 0},d.listenerCount=function(a,b){return a.listenerCount(b)}},{}],4:[function(a,b,c){b.exports=a("./lib/client/index")},{"./lib/client/index":6}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(){return function(a){var b=a.app;Object.assign(a.params,{user:b.get("user"),token:b.get("token")})}}function f(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return function(b){b.params.token&&(b.params.headers=Object.assign({},d({},a.header||"authorization",b.params.token),b.params.headers))}}Object.defineProperty(c,"__esModule",{value:!0}),c.populateParams=e,c.populateHeader=f},{}],6:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b.default=a,b}function e(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=Object.assign({},k,a);return function(){var a=this;a.get("storage")||a.set("storage",(0,j.getStorage)(b.storage)),a.authenticate=function(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=this.get("storage"),e=Promise.resolve(c);c.type||(e=(0,j.getJWT)(b.tokenKey,b.cookie,this.get("storage")).then(function(a){return a?{type:"token",token:a}:Promise.reject(new g.default.NotAuthenticated("Could not find stored JWT and no authentication type was given"))}));var f=function(c){return a.set("token",c.token),a.set("user",c.data),Promise.resolve(d.setItem(b.tokenKey,c.token)).then(function(){return c})};return e.then(function(c){var d=void 0;if(c.endpoint)d=c.endpoint;else if("local"===c.type)d=b.localEndpoint;else{if("token"!==c.type)throw new Error("Unsupported authentication 'type': "+c.type);d=b.tokenEndpoint}return(0,j.connected)(a).then(function(b){if(a.rest)return a.service(d).create(c).then(f);var e=a.io?"emit":"send";return(0,j.authenticateSocket)(c,b,e).then(f)})})},a.logout=function(){return a.set("user",null),a.set("token",null),(0,j.clearCookie)(b.cookie),Promise.resolve(a.get("storage").removeItem(b.tokenKey)).then(function(){if(a.io||a.primus){var b=a.io?"emit":"send",c=a.io?a.io:a.primus;return(0,j.logoutSocket)(c,b)}})},a.mixins.push(function(a){if("function"!=typeof a.before||"function"!=typeof a.after)throw new Error("It looks like feathers-hooks isn't configured. It is required before running feathers-authentication.");a.before(i.populateParams(b))}),a.rest&&a.mixins.push(function(a){a.before(i.populateHeader(b))})}};var f=a("feathers-errors"),g=e(f),h=a("./hooks"),i=d(h),j=a("./utils"),k={cookie:"feathers-jwt",tokenKey:"feathers-jwt",localEndpoint:"/auth/local",tokenEndpoint:"/auth/token"};b.exports=c.default},{"./hooks":5,"./utils":7,"feathers-errors":12}],7:[function(a,b,c){"use strict";function d(a){return new Promise(function(b,c){if(a.rest)return b();var d=a.io||a.primus;if(!d)return c(new Error("It looks like no client connection has been configured."));if(d.once("disconnect",c),d.once("close",c),a.io&&!d.connected||a.primus&&3!==d.readyState){var e=a.primus?"open":"connect";d.once(e,function(){return b(d)})}else b(d)})}function e(a,b,c){return new Promise(function(d,e){b.once("unauthorized",e),b.once("authenticated",d),b[c]("authenticate",a)})}function f(a,b){return new Promise(function(c,d){a[b]("logout",function(a){a&&d(a),c()})})}function g(a){if("undefined"!=typeof document){var b="; "+document.cookie,c=b.split("; "+a+"=");if(2===c.length)return c.pop().split(";").shift()}return null}function h(a){return"undefined"!=typeof document&&(document.cookie=a+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}function i(a,b,c){return Promise.resolve(c.getItem(a)).then(function(a){var c=g(b);return c?c:a})}function j(a){return a?a:{store:{},getItem:function(a){return this.store[a]},setItem:function(a,b){return this.store[a]=b},removeItem:function(a){return delete this.store[a],this}}}Object.defineProperty(c,"__esModule",{value:!0}),c.connected=d,c.authenticateSocket=e,c.logoutSocket=f,c.getCookie=g,c.clearCookie=h,c.getJWT=i,c.getStorage=j},{}],8:[function(a,b,c){"use strict";function d(a,b){return k[a](b)}Object.defineProperty(c,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};c.default=d;var f=c.noop=function(){},g=function(a){var b=a[a.length-1];return"function"==typeof b?b:f},h=function(a,b){return"object"===e(a[b])?a[b]:{}},i=function(a){return function(b){var c=b[0],d=b[1],f=g(b),i=h(b,2);if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");if("object"!==("undefined"==typeof d?"undefined":e(d)))throw new Error("No data provided for '"+a+"'");if(b.length>4)throw new Error("Too many arguments for '"+a+"' service method");return[c,d,i,f]}},j=function(a){return function(b){var c=b[0],d=h(b,1),e=g(b);if(b.length>3)throw new Error("Too many arguments for '"+a+"' service method");if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");return[c,d,e]}},k=c.converters={find:function(a){var b=g(a),c=h(a,0);if(a.length>2)throw new Error("Too many arguments for 'find' service method");return[c,b]},create:function(a){var b=a[0],c=h(a,1),d=g(a);if("object"!==("undefined"==typeof b?"undefined":e(b)))throw new Error("First parameter for 'create' must be an object");if(a.length>3)throw new Error("Too many arguments for 'create' service method");return[b,c,d]},update:i("update"),patch:i("patch"),get:j("get"),remove:j("remove")}},{}],9:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a("./arguments"),f=d(e),g=a("./utils"),h=a("./hooks"),i=d(h);c.default={getArguments:f.default,stripSlashes:g.stripSlashes,each:g.each,hooks:i.default,matcher:g.matcher,sorter:g.sorter},b.exports=c.default},{"./arguments":8,"./hooks":10,"./utils":11}],10:[function(a,b,c){"use strict";function d(a){return{id:a[0],params:a[1],callback:a[2]}}function e(a){return{id:a[0],data:a[1],params:a[2],callback:a[3]}}function f(a,b,c,d){var e=l[a](c);return e.method=a,e.type=b,d&&(e.app=d),e}function g(a){var b=[];return"undefined"!=typeof a.id&&b.push(a.id),a.data&&b.push(a.data),b.push(a.params||{}),b.push(a.callback),b}function h(a){return"find"===a.method?[a.params,a.callback]:"get"===a.method||"remove"===a.method?[a.id,a.params,a.callback]:"update"===a.method||"patch"===a.method?[a.id,a.data,a.params,a.callback]:"create"===a.method?[a.data,a.params,a.callback]:g(a)}function i(a){var b={};return Array.isArray(a)?b={all:a}:"object"!==("undefined"==typeof a?"undefined":j(a))?b={all:[a]}:(0,k.each)(a,function(a,c){b[c]=Array.isArray(a)?a:[a]}),b}Object.defineProperty(c,"__esModule",{value:!0});var j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},k=a("./utils"),l={find:function(a){return{params:a[0],callback:a[1]}},create:function(a){return{data:a[0],params:a[1],callback:a[2]}},get:d,remove:d,update:e,patch:e};c.default={hookObject:f,hook:f,converters:l,defaultMakeArguments:g,makeArguments:h,convertHookData:i},b.exports=c.default},{"./utils":11}],11:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);bc[e]&&(d+=1*a)}),d}}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?c-1:0),e=1;eb}},$gte:function(a,b){return function(c){return c[a]>=b}},$ne:function(a,b){return function(c){return c[a]!==b}}}},{}],12:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a){function b(){var b=Reflect.construct(a,Array.from(arguments));return Object.setPrototypeOf(b,Object.getPrototypeOf(this)),b}return b.prototype=Object.create(a.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a,b}function h(a){if(!a)return a;var b=A[a.name],c=b?new b(a.message,a.data):new Error(a.message||a);return"object"===("undefined"==typeof a?"undefined":j(a))&&i(c,a),c}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?c-1:0),e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.request({url:this.makeUrl(a.query),method:"GET",headers:g({},a.headers)}).catch(f)}},{key:"get",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request({url:this.makeUrl(b.query,a),method:"GET",headers:g({},b.headers)}).catch(f)}},{key:"create",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request({url:this.makeUrl(b.query),body:a,method:"POST",headers:g({"Content-Type":"application/json"},b.headers)}).catch(f)}},{key:"update",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'update' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(c.query,a),body:b,method:"PUT",headers:g({"Content-Type":"application/json"},c.headers)}).catch(f)}},{key:"patch",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'patch' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(c.query,a),body:b,method:"PATCH",headers:g({"Content-Type":"application/json"},c.headers)}).catch(f)}},{key:"remove",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'remove' can not be undefined, only 'null' when removing multiple entries")):this.request({url:this.makeUrl(b.query,a),method:"DELETE",headers:g({},b.headers)}).catch(f)}}]),a}();c.default=m,b.exports=c.default},{"feathers-commons":9,"feathers-errors":12,qs:41}],20:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=Object.assign||function(a){for(var b=1;b0&&void 0!==arguments[0]?arguments[0]:"",b={};return Object.keys(m).forEach(function(c){var d=m[c];b[c]=function(b){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!b)throw new Error(c+" has to be provided to feathers-rest");var f=function(c){return new d({base:a,name:c,connection:b,options:e})},g=function(){if("function"==typeof this.defaultService)throw new Error("Only one default client provider can be configured");this.rest=b,this.defaultService=f};return g.Service=d,g.service=f,g}}),b};var e=a("./jquery"),f=d(e),g=a("./superagent"),h=d(g),i=a("./request"),j=d(i),k=a("./fetch"),l=d(k),m={jquery:f.default,superagent:h.default,request:j.default,fetch:l.default};b.exports=c.default},{"./fetch":20,"./jquery":22,"./request":23,"./superagent":24}],22:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=Object.assign||function(a){for(var b=1;b=400?"string"==typeof e?d(new Error(e)):(e.response=b,d(h(new Error(e.message),e))):void c(e)})})}}]),b}(k.default);c.default=l,b.exports=c.default},{"./base":19}],24:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1?e-1:0),g=1;g1?c-1:0),e=1;e1?b-1:0),d=1;d2?c-2:0),e=2;e1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a1)for(var c=1;c=0&&d.parseArrays&&h<=d.arrayLimit?(e=[],e[h]=a(b,c,d)):e[g]=a(b,c,d)}return e},h=function(a,b,c){if(a){var d=c.allowDots?a.replace(/\.([^\.\[]+)/g,"[$1]"):a,e=/^([^\[\]]*)/,f=/(\[[^\[\]]*\])/g,h=e.exec(d),i=[];if(h[1]){if(!c.plainObjects&&Object.prototype.hasOwnProperty(h[1])&&!c.allowPrototypes)return;i.push(h[1])}for(var j=0;null!==(h=f.exec(d))&&j=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122?c+=b.charAt(e):f<128?c+=d[f]:f<2048?c+=d[192|f>>6]+d[128|63&f]:f<55296||f>=57344?c+=d[224|f>>12]+d[128|f>>6&63]+d[128|63&f]:(e+=1,f=65536+((1023&f)<<10|1023&b.charCodeAt(e)),c+=d[240|f>>18]+d[128|f>>12&63]+d[128|f>>6&63]+d[128|63&f])}return c},c.compact=function(a,b){if("object"!=typeof a||null===a)return a;var d=b||[],e=d.indexOf(a);if(e!==-1)return d[e]; +if(d.push(a),Array.isArray(a)){for(var f=[],g=0;g25;){var d=a%26;b=c.charAt(d)+b,a=Math.floor(a/26)-1}return b=c.charAt(a)+b},c.makeFakeArgs=function(a){for(var b=[],d=0;d * @license MIT */