Socket
Socket
Sign inDemoInstall

futoin-executor

Package Overview
Dependencies
64
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.3 to 2.3.4

3

CHANGELOG.txt

@@ -0,1 +1,4 @@

=== 2.3.4 (2020-05-18) ===
CHANGED: dependency maintenance
=== 2.3.3 (2020-03-15) ===

@@ -2,0 +5,0 @@ CHANGED: dependency maintenance

2

dist/futoin-executor.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("futoin-asyncsteps"),require("futoin-invoker"),require("futoin-asyncevent")):"function"==typeof define&&define.amd?define(["futoin-asyncsteps","futoin-invoker","futoin-asyncevent"],t):"object"==typeof exports?exports["futoin-executor"]=t(require("futoin-asyncsteps"),require("futoin-invoker"),require("futoin-asyncevent")):e.FutoInExecutor=t(e.$as,e.FutoInInvoker,e.$asyncevent)}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(29),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(24),i=n(41),c=n(4).AsyncTool,u=c.cancelCall,a=c.callLater,s={SL_ANONYMOUS:"Anonymous",SL_INFO:"Info",SL_SAFE_OPS:"SafeOps",SL_SAFEOPS:"SafeOps",SL_PRIVILEGED_OPS:"PrivilegedOps",SL_EXCEPTIONAL_OPS:"ExceptionalOps",SL_SYSTEM:"System",INFO_X509_CN:"X509_CN",INFO_PUBKEY:"PUBKEY",INFO_CLIENT_ADDR:"CLIENT_ADDR",INFO_SECURE_CHANNEL:"SECURE_CHANNEL",INFO_REQUEST_TIME_FLOAT:"REQUEST_TIME_FLOAT",INFO_SECURITY_LEVEL:"SECURITY_LEVEL",INFO_USER_INFO:"USER_INFO",INFO_RAW_REQUEST:"RAW_REQUEST",INFO_RAW_RESPONSE:"RAW_RESPONSE",INFO_DERIVED_KEY:"DERIVED_KEY",INFO_HAVE_RAW_UPLOAD:"HAVE_RAW_UPLOAD",INFO_HAVE_RAW_RESULT:"HAVE_RAW_RESULT",INFO_CHANNEL_CONTEXT:"CHANNEL_CONTEXT"},f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._executor=t,this._rawinp=null,this._rawout=null,this._as=null,"string"==typeof n&&(n=JSON.parse(n)),this._rawreq=n;var r={r:{}};"rid"in n&&(r.rid=n.rid),this._rawrsp=r;var o=function(){return this.info};this.info=o,o.X509_CN=null,o.PUBKEY=null,o.CLIENT_ADDR=null,o.SECURE_CHANNEL=!1,o.SECURITY_LEVEL=this.SL_ANONYMOUS,o.USER_INFO=null,o.RAW_REQUEST=n,o.RAW_RESPONSE=r,o.DERIVED_KEY=null,o.HAVE_RAW_UPLOAD=!1,o.HAVE_RAW_RESULT=!1,o.CHANNEL_CONTEXT=null,o.REQUEST_TIME_FLOAT=i()}var t,n,o;return t=e,(n=[{key:"params",value:function(){return this._rawreq.p}},{key:"result",value:function(e){return e&&(this._rawrsp.r=e),this._rawrsp.r}},{key:"rawInput",value:function(){var e=this._rawinp;if(!e&&(this.info.HAVE_RAW_UPLOAD&&null!==this.info.CHANNEL_CONTEXT&&(e=this.info.CHANNEL_CONTEXT._openRawInput(),this._rawinp=e),!e))throw new Error("RawInputError");return e}},{key:"rawOutput",value:function(){var e=this._rawout;if(!e&&(this.info.HAVE_RAW_RESULT&&null!==this.info.CHANNEL_CONTEXT&&(e=this.info.CHANNEL_CONTEXT._openRawOutput(),this._rawout=e),!e))throw new Error("RawOutputError");return e}},{key:"executor",value:function(){return this._executor}},{key:"ccm",value:function(){return this._executor.ccm()}},{key:"channel",value:function(){return this.info.CHANNEL_CONTEXT}},{key:"cancelAfter",value:function(e){var t=this;this._cancelAfter&&(u(this._cancelAfter),this._cancelAfter=null),e>0&&this._as&&(this._cancelAfter=a((function(){t._as.cancel()}),e))}},{key:"_cleanup",value:function(){var e=this.info;if(this.cancelAfter(0),this._as=null,this.info=null,e){var t=e.CHANNEL_CONTEXT;t&&!t.isStateful()&&t._cleanup();var n=e.USER_INFO;n&&n._cleanup()}}}])&&r(t.prototype,n),o&&r(t,o),e}();o(f,s),o(f.prototype,s),e.exports=f},function(e,t,n){var r=n(28),o=n(54),i=n(55),c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(65),o=n(72),i=n(19);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(85),o=n(86),i=n(87),c=n(88),u=n(89);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(2);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(16)(Object,"create");e.exports=r},function(e,t,n){var r=n(104);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._executor=t,this._ifaces={},this.state=function(){return this.state}}var t,n,o;return t=e,(n=[{key:"type",value:function(){return null}},{key:"isStateful",value:function(){return!1}},{key:"onInvokerAbort",value:function(e,t){}},{key:"_openRawInput",value:function(){return null}},{key:"_openRawOutput",value:function(){return null}},{key:"register",value:function(e,t,n){var r=this;this.isStateful()||e.error("InvokerError","Not stateful channel"),"sendOnBehalfOf"in(n=n||{})||(n.sendOnBehalfOf=!1),"limitZone"in n||(n.limitZone="unlimited"),"secureChannel"in n||(n.secureChannel=this._executor._is_secure_channel),this._executor.ccm().register(e,null,t,this._getPerformRequest(),null,n),e.add((function(e,n,o){r._ifaces[t]=o}))}},{key:"iface",value:function(e){return this._ifaces[e]}},{key:"_getPerformRequest",value:function(){return null}},{key:"_cleanup",value:function(){this._executor=null,this._ifaces=null,this.state=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){var r=n(27);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(53),o=n(59);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(8),o=n(0);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(31),o=n(60),i=n(61);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null===t&&(t="string"!=typeof n?"LOCAL":n.match(/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)?"IPv4":"IPv6"),this.type=t,this.host=n,this.port=r}var t,n,o;return t=e,(n=[{key:"asString",value:function(){return"LOCAL"===this.type?"LOCAL:".concat(this.port):"IPv6"===this.type?"IPv6:[".concat(this.host,"]:").concat(this.port):"".concat(this.type,":").concat(this.host,":").concat(this.port)}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(24),i={INFO_Login:"Login",INFO_Nick:"Nick",INFO_FirstName:"FirstName",INFO_FullName:"FullName",INFO_DateOfBirth:"DateOfBirth",INFO_TimeOfBirth:"TimeOfBirth",INFO_ContactEmail:"ContactEmail",INFO_ContactPhone:"ContactPhone",INFO_HomeAddress:"HomeAddress",INFO_WorkAddress:"WorkAddress",INFO_Citizenship:"Citizenship",INFO_GovernmentRegID:"GovernmentRegID",INFO_AvatarURL:"AvatarURL"},c=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._ccm=t,this._local_id=n,this._global_id=r,this._details=o}var t,n,o;return t=e,(n=[{key:"localID",value:function(){return this._local_id}},{key:"globalID",value:function(){return this._global_id}},{key:"details",value:function(e,t){var n=this._details;if(n)return e.add((function(e){return e.success(n)})),e;var r=this._ccm.iface("#basicauth");return r.call(e,"getUserDetails",{local_id:this._local_id,fields:t||{}}),e.add((function(e,t){var n=t.details;r._details=n,e.success(n)})),e}},{key:"_cleanup",value:function(){this._ccm=null}}])&&r(t.prototype,n),o&&r(t,o),e}();o(c,i),o(c.prototype,i),e.exports=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(7),i=n(21),c=n(4).Errors.NotImplemented,u=n(5).SpecTools.normalizeURLParams,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,a;return t=e,(n=[{key:"checkAuth",value:function(e,t,n,r){e.error(c,"Authentication is not enabled")}},{key:"signAuto",value:function(e,t,n){return!1}},{key:"isSigned",value:function(e){return!1}},{key:"checkAccess",value:function(e,t,n){e.error(c,"Access Control is not enabled")}},{key:"_setUser",value:function(e,t,n,r){var c=r.local_id,u=r.global_id,a=r.details,s=void 0===a?null:a,f=t.info,l=f.RAW_REQUEST.obf;l&&n&&n===o.SL_SYSTEM?(f.SECURITY_LEVEL=l.slvl,f.USER_INFO=new i(this._ccm,l.lid,l.gid,s)):(f.SECURITY_LEVEL=n,f.USER_INFO=new i(this._ccm,c,u,s))}},{key:"_normalizeQueryParams",value:function(e,t){var n=t.info;if(n._from_query_string){try{t.executor()._getInfo(e,t)}catch(e){return}var r=n._iface_info,o=n._func,i=n.RAW_REQUEST;u(r,o,i),n._from_query_string=!1}}}])&&r(t.prototype,n),a&&r(t,a),e}();e.exports=a},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function a(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=n(75),v=n(5),h=n(4),y=n(76),d=n(14),b=n(20),g=n(7),E=n(21),m=n(22),O=v.SpecTools,x=O.checkRequestMessage,A=O.checkResponseMessage,S=O.normalizeURLParams,w=O.STANDARD_ERRORS,R=O._ifacever_pattern,k=O.loadIface,I=O.globalLoadCache,N=h.Errors,j=N.CommError,C=N.InternalError,T=N.NotImplemented,P=N.InvalidRequest,L=N.UnknownInterface,U=N.NotSupportedVersion,F=N.SecurityError,D=N.PleaseReauth,q=Object.freeze({Anonymous:1,Info:2,SafeOps:3,PrivilegedOps:4,ExceptionalOps:5,System:6}),M=function(e){function t(){var e,n;i(this,t);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=a(this,(e=s(t)).call.apply(e,[this].concat(o))),Object.seal(f(n)),n}return l(t,e),u(t,[{key:"type",value:function(){return"CALLBACK"}},{key:"isStateful",value:function(){return!0}}]),t}(d),H=function(e){function t(e,n){var r;return i(this,t),(r=a(this,s(t).call(this,e)))._invoker_executor=n,Object.seal(f(r)),r}return l(t,e),u(t,[{key:"type",value:function(){return"INTERNAL"}},{key:"isStateful",value:function(){return!0}},{key:"_getPerformRequest",value:function(){var e=this._invoker_executor;return e?function(t,n,r){e.onInternalRequest(t,n.info,r)}:this._commError}},{key:"_commError",value:function(e){e.error(j,"No Invoker's Executor for internal call")}},{key:"onInvokerAbort",value:function(e,t){this._invoker_executor.once("close",(function(){return e(t)}))}}]),t}(d),z={messageSniffer:function(){},specDirs:[],prodMode:!1,reqTimeout:5e3,heavyReqTimeout:6e4,securityProvider:null};Object.freeze(z);var W=function(){function e(t,n){var r=this;i(this,e),y(this,["ready","request","response","notExpected","close"]),this._ccm=t,this._ifaces={},this._impls={};var o=(n=_({},n,z)).specDirs;o instanceof Array||(o=[o]),this._specdirs=o,this._dev_checks=!n.prodMode,this._msg_sniffer=n.messageSniffer,this._request_timeout=n.reqTimeout,this._heavy_timeout=n.heavyReqTimeout,this._maxReqSize=this.SAFE_PAYLOAD_LIMIT,this._maxRspSize=this.SAFE_PAYLOAD_LIMIT,this._maxAnySize=this.SAFE_PAYLOAD_LIMIT,this._secprov=n.securityProvider||new m;var c=function(){return r.close};t.once("close",c),this.once("close",(function(){return t.off("close",c)}))}return u(e,[{key:"ccm",value:function(){return this._ccm}},{key:"register",value:function(e,t,n,r){var o=this,i=t.match(R);null===i&&e.error(C,"Invalid ifacever: ".concat(t));var c=i[1],u=i[4],a=i[5],s=i[6],f=this._ifaces;c in f&&a in f[c]&&e.error(C,"Already registered: ".concat(t));var l={iface:c,version:u,mjrver:a,mnrver:s,derived:void 0};k(e,l,r||this._specdirs,I());var p=this._impls;e.add((function(e){c in f||(f[c]={},p[c]={}),f[c][a]=l,p[c][a]=n;for(var t=l.inherits,r=t.length-1;r>=0;--r){var i=t[r].match(R),u=i[1],s=i[4],_=i[5],v={iface:u,version:s,mjrver:_,mnrver:i[6],derived:l};u in f&&_ in f[u]&&(delete f[c][a],e.error(C,"Conflict with inherited interfaces: ".concat(i[0]))),u in f||(f[u]={}),f[u][_]=v}var h=o._maxReqSize,y=o._maxRspSize;for(var d in l.funcs)d=l.funcs[d],h=Math.max(h,d._max_req_size),y=Math.max(y,d._max_rsp_size);o._maxReqSize=h,o._maxRspSize=y,o._maxAnySize=Math.max(h,y)}))}},{key:"onEndpointRequest",value:function(e,t,n){var r=this,o=e._callback_context;o||(o=new M(this),e._callback_context=o);var i=new g(this,t),c=new b(o.type(),null,e.regname),u=i.info;u.CHANNEL_CONTEXT=o,u.CLIENT_ADDR=c,u.SECURE_CHANNEL=e.secure_channel;var a=h();i._as=a,a.add((function(e){e.setCancel((function(e){var t={rid:i._rawreq.rid,e:"InternalError"};i._cleanup(),n(t)})),e.state.reqinfo=i,r.process(e),e.add((function(e){var t=u.RAW_RESPONSE;i._cleanup(),null!==t&&n(t)}))}),(function(e,t){var n=e.state,o=n.error_info,c=n.last_exception,u=n.async_stack;r.emit("notExpected",t,o,c,u),i._cleanup()})).execute()}},{key:"onInternalRequest",value:function(e,t,n,r,o){var i=this,c=t._server_executor_context;c||(c=new H(this,t.options.executor),t._server_executor_context=c);var u=new g(this,n),a=new b(c.type(),null,null),s=u.info;s.CHANNEL_CONTEXT=c,s.CLIENT_ADDR=a,s.SECURE_CHANNEL=!0,r&&(s.HAVE_RAW_UPLOAD=!0,u._rawinp=r),o&&(u._rawout=o),e.add((function(e){var t=h();u._as=t,t.add((function(t){t.setCancel((function(t){if(u._cleanup(),!t.state._orig_as_cancel)try{e.error(C,"Executor canceled")}catch(e){}})),t.state.reqinfo=u,i.process(t),t.add((function(t){var n=s.RAW_RESPONSE;u._cleanup(),null!==n?e.success(n,!0):e.success()}))}),(function(e,t){var n=e.state,r=n.error_info,o=n.last_exception,c=n.async_stack;i.emit("notExpected",t,r,o,c),u._cleanup()})).execute(),e.setCancel((function(e){t.state._orig_as_cancel=!0,t.cancel()}))}))}},{key:"process",value:function(e){var t=this,n=e.state.reqinfo,i=n.info;(!n||"_func_info"in i)&&e.error(C,"Invalid process() invocation"),e.add((function(e){var c=i.RAW_REQUEST;t.emit("request",n,c),n.cancelAfter(t._request_timeout);var u=c.sec;"string"==typeof u&&("-internal"===(u=u.split(":"))[0]?t._checkInternalAuth(e,n,u):t._secprov.checkAuth(e,n,c,u)),e.add((function(e){t._getInfo(e,n),t._checkConstraints(e,n),t._checkParams(e,n);var r=i._func,o=t._getImpl(e,n);r in o||e.error(C,"Missing function implementation"),i._func_info.heavy&&n.cancelAfter(t._heavy_timeout);var c=o[r](e,n);void 0!==c&&(i.RAW_RESPONSE.r=c)})),e.add((function(e,c){c&&("object"===o(c)?r(i.RAW_RESPONSE.r,c):i.RAW_RESPONSE.r=c),t._checkResponse(e,n),e.success(n)}))}),(function(e,n){var r=e.state,o=r.reqinfo,c=r.error_info;n in w||i._func_info&&n in i._func_info.throws||(t.emit("notExpected",n,c,r.last_exception,r.async_stack),n=C,c="Not expected error");var u=i.RAW_RESPONSE;u.e=n,delete u.r,c&&(u.edesc=c),e.success(o)})),e.add((function(e,n){return t._signResponse(e,n)}),(function(e,n){var r=e.state;t.emit("notExpected",n,r.aserror_info,r.last_exception,r.async_stack)}))}},{key:"checkAccess",value:function(e,t){this._secprov.checkAccess(e,e.state.reqinfo,t)}},{key:"initFromCache",value:function(e){e.error(T,"Caching is not supported yet")}},{key:"cacheInit",value:function(e){e.error(T,"Caching is not supported yet")}},{key:"_getInfo",value:function(e,t){var n=t.info;if(!n._iface_info){var r=n.RAW_REQUEST.f;"string"!=typeof r&&e.error(P,"Missing req.f"),3!==(r=r.split(":")).length&&e.error(P,"Invalid req.f");var o=r[0],i=r[2],c=r[1].split(".");2!==c.length&&e.error(P,"Invalid req.f (version)");var u,a=this._ifaces[o];a||e.error(L,"Unknown interface: ".concat(o));try{var s=c[0],f=c[1];(u=a[s])||e.error(U,"Different major version: ".concat(o,":").concat(s)),u.mnrver<f&&e.error(U,"Iface version is too old: ".concat(o,":").concat(s,".").concat(f));var l=u.derived;l&&(u=l);var p=u.funcs[i];p||e.error(P,"Unknown interface function: ".concat(i)),n._iface_info=u,n._func=i,n._func_info=p,p.rawresult&&(n.HAVE_RAW_RESULT=!0)}catch(t){if(n.USER_INFO||u&&"AllowAnonymous"in u.constraints)throw t;e.error(L,"Unknown interface: ".concat(o))}}}},{key:"_checkInternalAuth",value:function(e,t){var n=t.info;"INTERNAL"!==n.CHANNEL_CONTEXT.type()&&e.error(F,"Not internal channel");var r=n.RAW_REQUEST.obf;r?(n.SECURITY_LEVEL=r.slvl,n.USER_INFO=new E(this._ccm,r.lid,r.gid,null)):(n.SECURITY_LEVEL=g.SL_SYSTEM,n.USER_INFO=new E(this._ccm,"-internal","-internal",null))}},{key:"_checkConstraints",value:function(e,t){var n=t.info,r=n._iface_info.constraints,o=n._func_info,i=n.CHANNEL_CONTEXT;if("SecureChannel"in r&&!n.SECURE_CHANNEL&&e.error(F,"Insecure channel"),"MessageSignature"in r&&!this._secprov.isSigned(t)&&"INTERNAL"!==i.type()&&e.error(F,"Message Signature is required"),"AllowAnonymous"in r||n.USER_INFO||e.error(F,"Anonymous not allowed"),!("BiDirectChannel"in r)||i&&i.isStateful()||e.error(P,"Bi-Direct Channel is required"),o.seclvl){var c=q[o.seclvl],u=q[n.SECURITY_LEVEL];(!c||u<c)&&e.error(D,o.seclvl)}}},{key:"_checkParams",value:function(e,t){var n=t.info,r=n.RAW_REQUEST,o=n._func_info;t.HAVE_RAW_UPLOAD&&!o.rawupload&&e.error(P,"Raw upload is not allowed: ".concat(n._func));var i=n._iface_info,c=n._func;n._from_query_string&&(S(i,c,r),n._from_query_string=!1),x(e,i,c,r)}},{key:"_getImpl",value:function(e,t){var n=t.info,r=n._iface_info,i=r.iface,c=r.mjrver,u=this._impls[i][c];return"object"!==o(u)&&("function"==typeof u?u=u(u,this):e.error(C,"Invalid implementation type: ".concat(n._func,"()")),"object"!==o(u)&&e.error(C,"Implementation does not implement "+"InterfaceImplementation: ".concat(i,":").concat(c)),this._impls[i][c]=u),u}},{key:"_checkResponse",value:function(e,t){var n=t.info,r=n.RAW_RESPONSE,i=n._func_info;if(i.rawresult)return n.RAW_RESPONSE=null,void(("object"!==o(r.r)||Object.keys(r.r).length>0)&&e.error(C,"Raw result is expected: ".concat(n._func,"()")));i.expect_result||!0===n.RAW_REQUEST.forcersp?this._dev_checks&&A(e,n._iface_info,n._func,r):n.RAW_RESPONSE=null}},{key:"_signResponse",value:function(e,t){var n=this,r=t.info.RAW_RESPONSE;r&&this._secprov.signAuto(e,t,r)?e.add((function(e){n.emit("response",t,r)})):this.emit("response",t,r)}},{key:"close",value:function(e){e&&this.once("close",e),this.emit("close")}},{key:"packPayload",value:function(e,t){var n=e.encode(t);if("string"==typeof n&&(n=Buffer.from(n)),n.length>this.SAFE_PAYLOAD_LIMIT)throw this.emit("notExpected",C,"Response size has exceeded safety limit",null,null),new Error(C);return n}},{key:"SAFE_PAYLOAD_LIMIT",get:function(){return 65536}}]),e}();e.exports=W},function(e,t,n){e.exports=n(52)},function(e,t,n){var r=n(26),o=n(15);e.exports=function(e,t,n,i){var c=!n;n||(n={});for(var u=-1,a=t.length;++u<a;){var s=t[u],f=i?i(n[s],e[s],s,n,e):void 0;void 0===f&&(f=e[s]),c?o(n,s,f):r(n,s,f)}return n}},function(e,t,n){var r=n(15),o=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var c=e[t];i.call(e,t)&&o(c,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(16),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t){var n="object"==typeof global&&global&&global.Object===Object&&global;e.exports=n},function(e,t,n){var r=n(18),o=n(33);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,c=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(c=e.length>3&&"function"==typeof c?(i--,c):void 0,u&&o(n[0],n[1],u)&&(c=i<3?void 0:c,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,c)}return t}))}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(2),o=n(19),i=n(35),c=n(0);e.exports=function(e,t,n){if(!c(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(67),o=n(3),i=Object.prototype,c=i.hasOwnProperty,u=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return o(e)&&c.call(e,"callee")&&!u.call(e,"callee")};e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){(function(e){var r=n(1),o=n(68),i=t&&!t.nodeType&&t,c=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=c&&c.exports===i?r.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;e.exports=a}).call(this,n(6)(e))},function(e,t,n){var r=n(69),o=n(70),i=n(71),c=i&&i.isTypedArray,u=c?o(c):r;e.exports=u},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t){(function(){var t,n,r,o,i,c;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},n=process.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),c=1e9*process.uptime(),i=o-c):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){function t(){return o(this,t),c(this,u(t).apply(this,arguments))}var n,r,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,e),n=t,s=[{key:"register",value:function(e,t,n,r,o){var i=(o=o||{}).version||"0.1",c=this.spec(i);o.nativeImpl=this,o.specDirs=[c],t.register(e,"#basicauth",c.iface+":"+c.version,n,r,o)}}],(r=null)&&i(n.prototype,r),s&&i(n,s),t}(n(5).NativeIface);e.exports=s,(s._specs={})[.1]={iface:"futoin.basicauth",version:"0.1",ftn3rev:"1.1",funcs:{auth:{params:{user:{type:"string",desc:"User name"},pwd:{type:"string",desc:"User password"},client_addr:{type:"string",desc:"Client's source address"},is_secure:{type:"boolean",desc:"Is secure channel?"}},result:{local_id:{type:"integer",desc:"Local user ID"},global_id:{type:"string",desc:"Global user ID"},details:{type:"map",desc:"User details"},seclvl:{type:"string",desc:"Security level"}},throws:["AuthenticationFailure"],desc:"Try to authenticate user with provided credentials"},checkHMAC:{params:{msg:{type:"map",desc:"Message object"},user:{type:"string",desc:"User name"},algo:{type:"string",desc:"HMAC algorithm"},sig:{type:"string",desc:"Request signature"},client_addr:{type:"string",desc:"Client's source address"},is_secure:{type:"boolean",desc:"Is secure channel?"}},result:{local_id:{type:"integer",desc:"Local user ID"},global_id:{type:"string",desc:"Global user ID"},details:{type:"map",desc:"User details"},seclvl:{type:"string",desc:"Security level"}},throws:["AuthenticationFailure"],desc:"Try to authenticate user with provided credentials"},genHMAC:{params:{msg:{type:"map",desc:"Message object"},user:{type:"string",desc:"User name"},algo:{type:"string",desc:"HMAC algorithm"}},result:{sig:{type:"string",desc:"Global user ID"}},throws:["InvalidUser"],desc:"Try to authenticate user with provided credentials"},getUserDetails:{params:{local_id:{type:"integer",desc:"Local user ID"},fields:{type:"map",default:{},desc:"List of field to retrieve, default - all"}},result:{details:{type:"map",desc:"User details"}},throws:["InvalidUser"],desc:"Try to authenticate user with provided credentials"}},requires:["SecureChannel","AllowAnonymous"],desc:"Basic Auth interface"}},function(e,t,n){var r=n(84),o=n(45),i=n(108),c=n(110),u=n(0),a=n(9),s=n(47);e.exports=function e(t,n,f,l,p){t!==n&&i(n,(function(i,a){if(p||(p=new r),u(i))c(t,n,a,f,e,l,p);else{var _=l?l(s(t,a),i,a+"",t,n,p):void 0;void 0===_&&(_=i),o(t,a,_)}}),a)}},function(e,t,n){var r=n(16)(n(1),"Map");e.exports=r},function(e,t,n){var r=n(15),o=n(2);e.exports=function(e,t,n){(void 0===n||o(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(118)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.Executor){var o=n(49);t.FutoInExecutor=o,r.Executor=o,t.FutoIn=r,t.futoin=r,t.BrowserExecutor=o.BrowserExecutor}e.exports=r.Executor}(window)},function(e,t,n){"use strict";(function(e){var r="undefined"==typeof window&&n(50);t.ChannelContext=n(14),t.DerivedKey=n(51),t.RequestInfo=n(7),t.SourceAddress=n(20),t.UserInfo=n(21),t.SecurityProvider=n(22),t.LegacySecurityProvider=n(74),t.PingService=n(78);var o=n(23);if(t.Executor=o,t.ClientExecutor=o,r){var i=e;t.NodeExecutor=i.require("../NodeExecutor")}else t.BrowserExecutor=n(79)}).call(this,n(6)(e))},function(e,t){e.exports=!1},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._ccm=t,this._base_id=n,this._sequence_id=r}var t,n,o;return t=e,(n=[{key:"baseID",value:function(){return this._base_id}},{key:"sequenceID",value:function(){return this._sequence_id}},{key:"encrypt",value:function(e,t){return e.error("NotImplemented","Derived key encryption is not supported yet"),null}},{key:"decrypt",value:function(e,t){return e.error("NotImplemented","Derived key decryption is not supported yet"),null}},{key:"_cleanup",value:function(){this._ccm=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){var r=n(25),o=n(30),i=n(9),c=o((function(e,t){r(t,i(t),e)}));e.exports=c},function(e,t,n){var r=n(17),o=n(56),i=n(0),c=n(58),u=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,f=a.toString,l=s.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:u).test(c(e))}},function(e,t,n){var r=n(28),o=Object.prototype,i=o.hasOwnProperty,c=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=c.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(57),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(32),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,c=-1,u=o(i.length-t,0),a=Array(u);++c<u;)a[c]=i[t+c];c=-1;for(var s=Array(t+1);++c<t;)s[c]=i[c];return s[t]=n(a),r(e,this,s)}}},function(e,t,n){var r=n(62),o=n(64)(r);e.exports=o},function(e,t,n){var r=n(63),o=n(27),i=n(31),c=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=c},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(66),o=n(36),i=n(37),c=n(38),u=n(35),a=n(39),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),f=!n&&o(e),l=!n&&!f&&c(e),p=!n&&!f&&!l&&a(e),_=n||f||l||p,v=_?r(e.length,String):[],h=v.length;for(var y in e)!t&&!s.call(e,y)||_&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,h))||v.push(y);return v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),o=n(34),i=n(3),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!c[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(29),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||c&&c.binding&&c.binding("util")}catch(e){}}();e.exports=u}).call(this,n(6)(e))},function(e,t,n){var r=n(0),o=n(40),i=n(73),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&c.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=n(23),l=n(22),p=n(4).Errors.SecurityError,_=n(77),v=n(42),h=Symbol("HMAC_USER"),y=Symbol("HMAC_ALGO"),d=function(e){function t(e,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,t),(r=u(this,a(t).call(this)))._ccm=n,r._secprov=o||new l;var c=new f(n);return r._auth_svc=_.register(e,c),v.register(e,n,c),n.once("close",(function(){return c.close()})),r}var n,r,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"addUser",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._auth_svc.addUser(e,t,n,r)}},{key:"checkAuth",value:function(e,t,n,r){"-hmac"===r[0]?this._checkMAC(e,t,{user:r[1],algo:r[2],sig:r[3]}):2===r.length&&22!==r[0].length?this._checkBasicAuth(e,t,{user:r[0],pwd:r[1]}):this._secprov.checkAuth(e,t,n,r)}},{key:"signAuto",value:function(e,t,n){return t.info[h]?(this._signHMAC(e,t,n),!0):this._secprov.signAuto(e,t,n)}},{key:"isSigned",value:function(e){return e.info[h]||this._secprov.isSigned(e)}},{key:"_checkBasicAuth",value:function(e,t,n){var r=this,o=n.user,i=n.pwd;e.add((function(e){var n=r._ccm.iface("#basicauth"),c=t.info;n.call(e,"auth",{user:o,pwd:i,client_addr:c.CLIENT_ADDR.asString(),is_secure:c.SECURE_CHANNEL}),e.add((function(e,n){r._setUser(e,t,n.seclvl,n)}))}),(function(e,t){e.error(p,"Basic Auth Verification Failed")}))}},{key:"_checkMAC",value:function(e,t,n){var r=this,i=n.user,c=n.algo,u=n.sig;this._normalizeQueryParams(e,t),e.add((function(e){var n=r._ccm.iface("#basicauth"),a=t.info,s=o({},t.info.RAW_REQUEST);n.call(e,"checkHMAC",{msg:s,user:i,algo:c,sig:u,client_addr:a.CLIENT_ADDR.asString(),is_secure:a.SECURE_CHANNEL}),e.add((function(e,n){r._setUser(e,t,n.seclvl,n),a[y]=c,a[h]=i}))}),(function(e,t){e.error(p,"Legacy Signature Verification Failed")}))}},{key:"_signHMAC",value:function(e,t,n){var r=this._ccm.iface("#basicauth"),o=t.info;r.call(e,"genHMAC",{msg:n,user:o[h],algo:o[y]}),e.add((function(e,t){var r=t.sig;n.sec=r}))}}])&&c(n.prototype,r),d&&c(n,d),t}(l);e.exports=d},function(e,t,n){var r=n(18),o=n(2),i=n(33),c=n(9),u=Object.prototype,a=u.hasOwnProperty,s=r((function(e,t){e=Object(e);var n=-1,r=t.length,s=r>2?t[2]:void 0;for(s&&i(t[0],t[1],s)&&(r=1);++n<r;)for(var f=t[n],l=c(f),p=-1,_=l.length;++p<_;){var v=l[p],h=e[v];(void 0===h||o(h,u[v])&&!a.call(e,v))&&(e[v]=f[v])}return e}));e.exports=s},function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(42),i=n(5).SpecTools,c=i.genHMACRaw,u=i.getRawAlgo,a=i.checkHMAC,s=i.secureEquals,f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._user_list={},this._user_ids={},this._next_id=1}var t,n,i;return t=e,i=[{key:"register",value:function(e,t){var n=o.spec("0.1"),r=n.iface+":"+n.version,i=new this;return t.register(e,r,i,[n]),i}}],(n=[{key:"addUser",value:function(e,t,n,r){var o=this._next_id++;(n=n||{}).Login=e;var i={secret:t,info:{local_id:o,global_id:"G"+o,details:n},system_user:r||!1};this._user_list[e]=i,this._user_ids[o]=i}},{key:"_getUser",value:function(e,t){var n=this._user_list[t];e.add((function(e){return e.success(n)}))}},{key:"_getUserByID",value:function(e,t){var n=this._user_ids[t];e.add((function(e){return e.success(n)}))}},{key:"auth",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){r&&s(r.secret,n.pwd)?(t.result().seclvl=r.system_user?t.SL_SYSTEM:t.SL_SAFE_OPS,e.success(r.info)):e.error("AuthenticationFailure")}))}},{key:"checkHMAC",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){if(r){var o=u(e,n.algo),i=c(o,r.secret,n.msg),s=new Buffer(n.sig,"base64");if(a(i,s))return t.result().seclvl=r.system_user?t.SL_SYSTEM:t.SL_PRIVILEGED_OPS,void e.success(r.info)}e.error("AuthenticationFailure")}))}},{key:"genHMAC",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){if(r){var o=u(e,n.algo),i=c(o,r.secret,n.msg);t.result().sig=i.toString("base64")}else e.error("InvalidUser")}))}},{key:"getUserDetails",value:function(e,t){var n=t.params();this._getUserByID(e,n.local_id),e.add((function(e,n){n?t.result().details=n.info.details:e.error("InvalidUser")}))}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=f},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(5).PingFace,i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"register",value:function(e,t){var n=o.spec("1.0"),r=n.iface+":"+n.version,i=new this;return t.register(e,r,i,[n]),i}}],(n=[{key:"ping",value:function(e,t){t.result().echo=t.params().echo}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function a(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=n(80),v=n(82),h=n(4),y=n(41),d=window,b=n(23),g=n(14),E=n(20),m=n(7),O=function(e){function t(e,n){var r;return i(this,t),(r=a(this,f(t).call(this,e)))._event_origin=n.origin,r._event_source=n.source,r._last_used=y(),r._is_secure_channel=!0,r}return l(t,e),u(t,[{key:"type",value:function(){return"BROWSER"}},{key:"isStateful",value:function(){return!0}},{key:"_getPerformRequest",value:function(){var e=this._event_origin,t=this._event_source,n=this._executor._reverse_requests,r=this._executor._msg_sniffer;return function(o,i,c){o.add((function(o){var u="S"+n.rid++;if(c.rid=u,i.expect_response){var a=n.sentreqs;a[u]={reqas:o,evt_origin:e,evt_source:t},o.setCancel((function(e){delete a[u]}))}r(e,c,!1),t.postMessage(c,e)}))}}}]),t}(g),x={clientTimeoutMS:600,allowedOrigins:[]};Object.freeze(x.allowedOrigins),Object.freeze(x);var A=function(e){function t(e,n){var r;i(this,t),r=a(this,f(t).call(this,e,n)),n=v({},n,x),r._msg_sniffer=n.messageSniffer,r._contexts=[],r._reverse_requests={rid:1,sentreqs:{}};var o=n.allowedOrigins||{};o instanceof Array&&(o=_(o,o)),r.allowed_origins=o;var c=n.clientTimeoutMS;return function e(){for(var t=r._contexts,n=y()-c,o=t.length-1;o>=0;--o){var i=t[o];i._last_used<n&&(i._cleanup(),t.splice(o,1))}setTimeout(e,1e3*c)}(),r._event_listener=function(e){return r.handleMessage(e)},d.addEventListener("message",r._event_listener),Object.seal(s(r)),r}return l(t,e),u(t,[{key:"handleMessage",value:function(e){var t=this;this._msg_sniffer(e,e.data,!0);var n=e.data,r=e.source,i=e.origin;if("object"===o(n)&&"rid"in n){var c=n.rid;if(!("f"in n)&&"S"===c.charAt(0)){var u=this._reverse_requests.sentreqs,a=u[c];return a&&r===a.evt_source&&i===a.evt_origin&&(a.reqas.success(n,"application/futoin+json"),delete u[c]),void(e.stopPropagation&&e.stopPropagation())}if("f"in n&&"C"===c.charAt(0)&&i in this.allowed_origins){for(var s=null,f=this._contexts,l=0,p=f.length;l<p;++l){var _=f[l];if(_._event_source===r&&_._event_origin===i){s=_;break}}s?s._last_used=y():(s=new O(this,e),f.push(s));var v=new E("LOCAL",r,i),d=new m(this,n),b=d.info;b.CHANNEL_CONTEXT=s,b.CLIENT_ADDR=v,b.SECURE_CHANNEL=this._is_secure_channel;var g=h();g.state.reqinfo=d,d._as=g;var x=function(n){d._cleanup();var r={e:"InternalError",rid:c};t._msg_sniffer(e,r,!1),s._event_source.postMessage(r,s._event_origin)};g.add((function(n){n.setCancel(x),t.process(n),n.add((function(n){var r=b.RAW_RESPONSE;d._cleanup(),null!==r&&(t._msg_sniffer(e,r,!1),s._event_source.postMessage(r,s._event_origin))}))})),g.execute(),e.stopPropagation&&e.stopPropagation()}}}},{key:"close",value:function(e){d.removeEventListener("message",this._event_listener),r(f(t.prototype),"close",this).call(this,e)}}]),t}(b);e.exports=A},function(e,t,n){var r=n(26),o=n(81);e.exports=function(e,t){return o(e||[],t||[],r)}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=e.length,i=t.length,c={};++r<o;){var u=r<i?t[r]:void 0;n(c,e[r],u)}return c}},function(e,t,n){var r=n(32),o=n(18),i=n(83),c=n(122),u=o((function(e){return e.push(void 0,i),r(c,void 0,e)}));e.exports=u},function(e,t,n){var r=n(43),o=n(0);e.exports=function e(t,n,i,c,u,a){return o(t)&&o(n)&&(a.set(n,t),r(t,n,void 0,e,a),a.delete(n)),t}},function(e,t,n){var r=n(10),o=n(90),i=n(91),c=n(92),u=n(93),a=n(94);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=c,s.prototype.has=u,s.prototype.set=a,e.exports=s},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(11),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(11);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(11);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(11);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(10);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(10),o=n(44),i=n(95);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!o||c.length<199)return c.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(c)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(96),o=n(103),i=n(105),c=n(106),u=n(107);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(97),o=n(10),i=n(44);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(98),o=n(99),i=n(100),c=n(101),u=n(102);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(12);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(12),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(12),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(13);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(13);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(13);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(109)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),c=r(t),u=c.length;u--;){var a=c[e?u:++o];if(!1===n(i[a],a,i))break}return t}}},function(e,t,n){var r=n(45),o=n(111),i=n(112),c=n(115),u=n(116),a=n(36),s=n(37),f=n(119),l=n(38),p=n(17),_=n(0),v=n(120),h=n(39),y=n(47),d=n(121);e.exports=function(e,t,n,b,g,E,m){var O=y(e,n),x=y(t,n),A=m.get(x);if(A)r(e,n,A);else{var S=E?E(O,x,n+"",e,t,m):void 0,w=void 0===S;if(w){var R=s(x),k=!R&&l(x),I=!R&&!k&&h(x);S=x,R||k||I?s(O)?S=O:f(O)?S=c(O):k?(w=!1,S=o(x,!0)):I?(w=!1,S=i(x,!0)):S=[]:v(x)||a(x)?(S=O,a(O)?S=d(O):_(O)&&!p(O)||(S=u(x))):w=!1}w&&(m.set(x,S),g(S,x,b,E,m),m.delete(x)),r(e,n,S)}}},function(e,t,n){(function(e){var r=n(1),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===o?r.Buffer:void 0,u=c?c.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(6)(e))},function(e,t,n){var r=n(113);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(114);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(1).Uint8Array;e.exports=r},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(117),o=n(46),i=n(40);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(0),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(19),o=n(3);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(8),o=n(46),i=n(3),c=Function.prototype,u=Object.prototype,a=c.toString,s=u.hasOwnProperty,f=a.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==f}},function(e,t,n){var r=n(25),o=n(9);e.exports=function(e){return r(e,o(e))}},function(e,t,n){var r=n(43),o=n(30)((function(e,t,n,o){r(e,t,n,o)}));e.exports=o}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("futoin-asyncsteps"),require("futoin-invoker"),require("futoin-asyncevent")):"function"==typeof define&&define.amd?define(["futoin-asyncsteps","futoin-invoker","futoin-asyncevent"],t):"object"==typeof exports?exports["futoin-executor"]=t(require("futoin-asyncsteps"),require("futoin-invoker"),require("futoin-asyncevent")):e.FutoInExecutor=t(e.$as,e.FutoInInvoker,e.$asyncevent)}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(29),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(24),i=n(41),c=n(4).AsyncTool,u=c.cancelCall,a=c.callLater,s={SL_ANONYMOUS:"Anonymous",SL_INFO:"Info",SL_SAFE_OPS:"SafeOps",SL_SAFEOPS:"SafeOps",SL_PRIVILEGED_OPS:"PrivilegedOps",SL_EXCEPTIONAL_OPS:"ExceptionalOps",SL_SYSTEM:"System",INFO_X509_CN:"X509_CN",INFO_PUBKEY:"PUBKEY",INFO_CLIENT_ADDR:"CLIENT_ADDR",INFO_SECURE_CHANNEL:"SECURE_CHANNEL",INFO_REQUEST_TIME_FLOAT:"REQUEST_TIME_FLOAT",INFO_SECURITY_LEVEL:"SECURITY_LEVEL",INFO_USER_INFO:"USER_INFO",INFO_RAW_REQUEST:"RAW_REQUEST",INFO_RAW_RESPONSE:"RAW_RESPONSE",INFO_DERIVED_KEY:"DERIVED_KEY",INFO_HAVE_RAW_UPLOAD:"HAVE_RAW_UPLOAD",INFO_HAVE_RAW_RESULT:"HAVE_RAW_RESULT",INFO_CHANNEL_CONTEXT:"CHANNEL_CONTEXT"},f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._executor=t,this._rawinp=null,this._rawout=null,this._as=null,"string"==typeof n&&(n=JSON.parse(n)),this._rawreq=n;var r={r:{}};"rid"in n&&(r.rid=n.rid),this._rawrsp=r;var o=function(){return this.info};this.info=o,o.X509_CN=null,o.PUBKEY=null,o.CLIENT_ADDR=null,o.SECURE_CHANNEL=!1,o.SECURITY_LEVEL=this.SL_ANONYMOUS,o.USER_INFO=null,o.RAW_REQUEST=n,o.RAW_RESPONSE=r,o.DERIVED_KEY=null,o.HAVE_RAW_UPLOAD=!1,o.HAVE_RAW_RESULT=!1,o.CHANNEL_CONTEXT=null,o.REQUEST_TIME_FLOAT=i()}var t,n,o;return t=e,(n=[{key:"params",value:function(){return this._rawreq.p}},{key:"result",value:function(e){return e&&(this._rawrsp.r=e),this._rawrsp.r}},{key:"rawInput",value:function(){var e=this._rawinp;if(!e&&(this.info.HAVE_RAW_UPLOAD&&null!==this.info.CHANNEL_CONTEXT&&(e=this.info.CHANNEL_CONTEXT._openRawInput(),this._rawinp=e),!e))throw new Error("RawInputError");return e}},{key:"rawOutput",value:function(){var e=this._rawout;if(!e&&(this.info.HAVE_RAW_RESULT&&null!==this.info.CHANNEL_CONTEXT&&(e=this.info.CHANNEL_CONTEXT._openRawOutput(),this._rawout=e),!e))throw new Error("RawOutputError");return e}},{key:"executor",value:function(){return this._executor}},{key:"ccm",value:function(){return this._executor.ccm()}},{key:"channel",value:function(){return this.info.CHANNEL_CONTEXT}},{key:"cancelAfter",value:function(e){var t=this;this._cancelAfter&&(u(this._cancelAfter),this._cancelAfter=null),e>0&&this._as&&(this._cancelAfter=a((function(){t._as.cancel()}),e))}},{key:"_cleanup",value:function(){var e=this.info;if(this.cancelAfter(0),this._as=null,this.info=null,e){var t=e.CHANNEL_CONTEXT;t&&!t.isStateful()&&t._cleanup();var n=e.USER_INFO;n&&n._cleanup()}}}])&&r(t.prototype,n),o&&r(t,o),e}();o(f,s),o(f.prototype,s),e.exports=f},function(e,t,n){var r=n(28),o=n(54),i=n(55),c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(65),o=n(72),i=n(19);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(85),o=n(86),i=n(87),c=n(88),u=n(89);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(2);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(16)(Object,"create");e.exports=r},function(e,t,n){var r=n(104);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._executor=t,this._ifaces={},this.state=function(){return this.state}}var t,n,o;return t=e,(n=[{key:"type",value:function(){return null}},{key:"isStateful",value:function(){return!1}},{key:"onInvokerAbort",value:function(e,t){}},{key:"_openRawInput",value:function(){return null}},{key:"_openRawOutput",value:function(){return null}},{key:"register",value:function(e,t,n){var r=this;this.isStateful()||e.error("InvokerError","Not stateful channel"),"sendOnBehalfOf"in(n=n||{})||(n.sendOnBehalfOf=!1),"limitZone"in n||(n.limitZone="unlimited"),"secureChannel"in n||(n.secureChannel=this._executor._is_secure_channel),this._executor.ccm().register(e,null,t,this._getPerformRequest(),null,n),e.add((function(e,n,o){r._ifaces[t]=o}))}},{key:"iface",value:function(e){return this._ifaces[e]}},{key:"_getPerformRequest",value:function(){return null}},{key:"_cleanup",value:function(){this._executor=null,this._ifaces=null,this.state=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){var r=n(27);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(53),o=n(59);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(8),o=n(0);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(31),o=n(60),i=n(61);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null===t&&(t="string"!=typeof n?"LOCAL":n.match(/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)?"IPv4":"IPv6"),this.type=t,this.host=n,this.port=r}var t,n,o;return t=e,(n=[{key:"asString",value:function(){return"LOCAL"===this.type?"LOCAL:".concat(this.port):"IPv6"===this.type?"IPv6:[".concat(this.host,"]:").concat(this.port):"".concat(this.type,":").concat(this.host,":").concat(this.port)}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(24),i={INFO_Login:"Login",INFO_Nick:"Nick",INFO_FirstName:"FirstName",INFO_FullName:"FullName",INFO_DateOfBirth:"DateOfBirth",INFO_TimeOfBirth:"TimeOfBirth",INFO_ContactEmail:"ContactEmail",INFO_ContactPhone:"ContactPhone",INFO_HomeAddress:"HomeAddress",INFO_WorkAddress:"WorkAddress",INFO_Citizenship:"Citizenship",INFO_GovernmentRegID:"GovernmentRegID",INFO_AvatarURL:"AvatarURL"},c=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._ccm=t,this._local_id=n,this._global_id=r,this._details=o}var t,n,o;return t=e,(n=[{key:"localID",value:function(){return this._local_id}},{key:"globalID",value:function(){return this._global_id}},{key:"details",value:function(e,t){var n=this._details;if(n)return e.add((function(e){return e.success(n)})),e;var r=this._ccm.iface("#basicauth");return r.call(e,"getUserDetails",{local_id:this._local_id,fields:t||{}}),e.add((function(e,t){var n=t.details;r._details=n,e.success(n)})),e}},{key:"_cleanup",value:function(){this._ccm=null}}])&&r(t.prototype,n),o&&r(t,o),e}();o(c,i),o(c.prototype,i),e.exports=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(7),i=n(21),c=n(4).Errors.NotImplemented,u=n(5).SpecTools.normalizeURLParams,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,a;return t=e,(n=[{key:"checkAuth",value:function(e,t,n,r){e.error(c,"Authentication is not enabled")}},{key:"signAuto",value:function(e,t,n){return!1}},{key:"isSigned",value:function(e){return!1}},{key:"checkAccess",value:function(e,t,n){e.error(c,"Access Control is not enabled")}},{key:"_setUser",value:function(e,t,n,r){var c=r.local_id,u=r.global_id,a=r.details,s=void 0===a?null:a,f=t.info,l=f.RAW_REQUEST.obf;l&&n&&n===o.SL_SYSTEM?(f.SECURITY_LEVEL=l.slvl,f.USER_INFO=new i(this._ccm,l.lid,l.gid,s)):(f.SECURITY_LEVEL=n,f.USER_INFO=new i(this._ccm,c,u,s))}},{key:"_normalizeQueryParams",value:function(e,t){var n=t.info;if(n._from_query_string){try{t.executor()._getInfo(e,t)}catch(e){return}var r=n._iface_info,o=n._func,i=n.RAW_REQUEST;u(r,o,i),n._from_query_string=!1}}}])&&r(t.prototype,n),a&&r(t,a),e}();e.exports=a},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=n(75),h=n(5),y=n(4),d=n(76),g=n(14),b=n(20),m=n(7),E=n(21),O=n(22),x=h.SpecTools,S=x.checkRequestMessage,A=x.checkResponseMessage,w=x.normalizeURLParams,R=x.STANDARD_ERRORS,k=x._ifacever_pattern,I=x.loadIface,N=x.globalLoadCache,j=y.Errors,C=j.CommError,T=j.InternalError,P=j.NotImplemented,L=j.InvalidRequest,U=j.UnknownInterface,D=j.NotSupportedVersion,F=j.SecurityError,q=j.PleaseReauth,M=Object.freeze({Anonymous:1,Info:2,SafeOps:3,PrivilegedOps:4,ExceptionalOps:5,System:6}),H=function(e){a(n,e);var t=f(n);function n(){var e;i(this,n);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return e=t.call.apply(t,[this].concat(o)),Object.seal(p(e)),e}return u(n,[{key:"type",value:function(){return"CALLBACK"}},{key:"isStateful",value:function(){return!0}}]),n}(g),z=function(e){a(n,e);var t=f(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e))._invoker_executor=r,Object.seal(p(o)),o}return u(n,[{key:"type",value:function(){return"INTERNAL"}},{key:"isStateful",value:function(){return!0}},{key:"_getPerformRequest",value:function(){var e=this._invoker_executor;return e?function(t,n,r){e.onInternalRequest(t,n.info,r)}:this._commError}},{key:"_commError",value:function(e){e.error(C,"No Invoker's Executor for internal call")}},{key:"onInvokerAbort",value:function(e,t){this._invoker_executor.once("close",(function(){return e(t)}))}}]),n}(g),W={messageSniffer:function(){},specDirs:[],prodMode:!1,reqTimeout:5e3,heavyReqTimeout:6e4,securityProvider:null};Object.freeze(W);var B=function(){function e(t,n){var r=this;i(this,e),d(this,["ready","request","response","notExpected","close"]),this._ccm=t,this._ifaces={},this._impls={};var o=(n=v({},n,W)).specDirs;o instanceof Array||(o=[o]),this._specdirs=o,this._dev_checks=!n.prodMode,this._msg_sniffer=n.messageSniffer,this._request_timeout=n.reqTimeout,this._heavy_timeout=n.heavyReqTimeout,this._maxReqSize=this.SAFE_PAYLOAD_LIMIT,this._maxRspSize=this.SAFE_PAYLOAD_LIMIT,this._maxAnySize=this.SAFE_PAYLOAD_LIMIT,this._secprov=n.securityProvider||new O;var c=function(){return r.close};t.once("close",c),this.once("close",(function(){return t.off("close",c)}))}return u(e,[{key:"ccm",value:function(){return this._ccm}},{key:"register",value:function(e,t,n,r){var o=this,i=t.match(k);null===i&&e.error(T,"Invalid ifacever: ".concat(t));var c=i[1],u=i[4],a=i[5],s=i[6],f=this._ifaces;c in f&&a in f[c]&&e.error(T,"Already registered: ".concat(t));var l={iface:c,version:u,mjrver:a,mnrver:s,derived:void 0};I(e,l,r||this._specdirs,N());var p=this._impls;e.add((function(e){c in f||(f[c]={},p[c]={}),f[c][a]=l,p[c][a]=n;for(var t=l.inherits,r=t.length-1;r>=0;--r){var i=t[r].match(k),u=i[1],s=i[4],_=i[5],v={iface:u,version:s,mjrver:_,mnrver:i[6],derived:l};u in f&&_ in f[u]&&(delete f[c][a],e.error(T,"Conflict with inherited interfaces: ".concat(i[0]))),u in f||(f[u]={}),f[u][_]=v}var h=o._maxReqSize,y=o._maxRspSize;for(var d in l.funcs)d=l.funcs[d],h=Math.max(h,d._max_req_size),y=Math.max(y,d._max_rsp_size);o._maxReqSize=h,o._maxRspSize=y,o._maxAnySize=Math.max(h,y)}))}},{key:"onEndpointRequest",value:function(e,t,n){var r=this,o=e._callback_context;o||(o=new H(this),e._callback_context=o);var i=new m(this,t),c=new b(o.type(),null,e.regname),u=i.info;u.CHANNEL_CONTEXT=o,u.CLIENT_ADDR=c,u.SECURE_CHANNEL=e.secure_channel;var a=y();i._as=a,a.add((function(e){e.setCancel((function(e){var t={rid:i._rawreq.rid,e:"InternalError"};i._cleanup(),n(t)})),e.state.reqinfo=i,r.process(e),e.add((function(e){var t=u.RAW_RESPONSE;i._cleanup(),null!==t&&n(t)}))}),(function(e,t){var n=e.state,o=n.error_info,c=n.last_exception,u=n.async_stack;r.emit("notExpected",t,o,c,u),i._cleanup()})).execute()}},{key:"onInternalRequest",value:function(e,t,n,r,o){var i=this,c=t._server_executor_context;c||(c=new z(this,t.options.executor),t._server_executor_context=c);var u=new m(this,n),a=new b(c.type(),null,null),s=u.info;s.CHANNEL_CONTEXT=c,s.CLIENT_ADDR=a,s.SECURE_CHANNEL=!0,r&&(s.HAVE_RAW_UPLOAD=!0,u._rawinp=r),o&&(u._rawout=o),e.add((function(e){var t=y();u._as=t,t.add((function(t){t.setCancel((function(t){if(u._cleanup(),!t.state._orig_as_cancel)try{e.error(T,"Executor canceled")}catch(e){}})),t.state.reqinfo=u,i.process(t),t.add((function(t){var n=s.RAW_RESPONSE;u._cleanup(),null!==n?e.success(n,!0):e.success()}))}),(function(e,t){var n=e.state,r=n.error_info,o=n.last_exception,c=n.async_stack;i.emit("notExpected",t,r,o,c),u._cleanup()})).execute(),e.setCancel((function(e){t.state._orig_as_cancel=!0,t.cancel()}))}))}},{key:"process",value:function(e){var t=this,n=e.state.reqinfo,i=n.info;n&&!("_func_info"in i)||e.error(T,"Invalid process() invocation"),e.add((function(e){var c=i.RAW_REQUEST;t.emit("request",n,c),n.cancelAfter(t._request_timeout);var u=c.sec;"string"==typeof u&&("-internal"===(u=u.split(":"))[0]?t._checkInternalAuth(e,n,u):t._secprov.checkAuth(e,n,c,u)),e.add((function(e){t._getInfo(e,n),t._checkConstraints(e,n),t._checkParams(e,n);var r=i._func,o=t._getImpl(e,n);r in o||e.error(T,"Missing function implementation"),i._func_info.heavy&&n.cancelAfter(t._heavy_timeout);var c=o[r](e,n);void 0!==c&&(i.RAW_RESPONSE.r=c)})),e.add((function(e,c){c&&("object"===o(c)?r(i.RAW_RESPONSE.r,c):i.RAW_RESPONSE.r=c),t._checkResponse(e,n),e.success(n)}))}),(function(e,n){var r=e.state,o=r.reqinfo,c=r.error_info;n in R||i._func_info&&n in i._func_info.throws||(t.emit("notExpected",n,c,r.last_exception,r.async_stack),n=T,c="Not expected error");var u=i.RAW_RESPONSE;u.e=n,delete u.r,c&&(u.edesc=c),e.success(o)})),e.add((function(e,n){return t._signResponse(e,n)}),(function(e,n){var r=e.state;t.emit("notExpected",n,r.aserror_info,r.last_exception,r.async_stack)}))}},{key:"checkAccess",value:function(e,t){this._secprov.checkAccess(e,e.state.reqinfo,t)}},{key:"initFromCache",value:function(e){e.error(P,"Caching is not supported yet")}},{key:"cacheInit",value:function(e){e.error(P,"Caching is not supported yet")}},{key:"_getInfo",value:function(e,t){var n=t.info;if(!n._iface_info){var r=n.RAW_REQUEST.f;"string"!=typeof r&&e.error(L,"Missing req.f"),3!==(r=r.split(":")).length&&e.error(L,"Invalid req.f");var o=r[0],i=r[2],c=r[1].split(".");2!==c.length&&e.error(L,"Invalid req.f (version)");var u,a=this._ifaces[o];a||e.error(U,"Unknown interface: ".concat(o));try{var s=c[0],f=c[1];(u=a[s])||e.error(D,"Different major version: ".concat(o,":").concat(s)),u.mnrver<f&&e.error(D,"Iface version is too old: ".concat(o,":").concat(s,".").concat(f));var l=u.derived;l&&(u=l);var p=u.funcs[i];p||e.error(L,"Unknown interface function: ".concat(i)),n._iface_info=u,n._func=i,n._func_info=p,p.rawresult&&(n.HAVE_RAW_RESULT=!0)}catch(t){if(n.USER_INFO||u&&"AllowAnonymous"in u.constraints)throw t;e.error(U,"Unknown interface: ".concat(o))}}}},{key:"_checkInternalAuth",value:function(e,t){var n=t.info;"INTERNAL"!==n.CHANNEL_CONTEXT.type()&&e.error(F,"Not internal channel");var r=n.RAW_REQUEST.obf;r?(n.SECURITY_LEVEL=r.slvl,n.USER_INFO=new E(this._ccm,r.lid,r.gid,null)):(n.SECURITY_LEVEL=m.SL_SYSTEM,n.USER_INFO=new E(this._ccm,"-internal","-internal",null))}},{key:"_checkConstraints",value:function(e,t){var n=t.info,r=n._iface_info.constraints,o=n._func_info,i=n.CHANNEL_CONTEXT;if("SecureChannel"in r&&!n.SECURE_CHANNEL&&e.error(F,"Insecure channel"),"MessageSignature"in r&&!this._secprov.isSigned(t)&&"INTERNAL"!==i.type()&&e.error(F,"Message Signature is required"),"AllowAnonymous"in r||n.USER_INFO||e.error(F,"Anonymous not allowed"),!("BiDirectChannel"in r)||i&&i.isStateful()||e.error(L,"Bi-Direct Channel is required"),o.seclvl){var c=M[o.seclvl],u=M[n.SECURITY_LEVEL];(!c||u<c)&&e.error(q,o.seclvl)}}},{key:"_checkParams",value:function(e,t){var n=t.info,r=n.RAW_REQUEST,o=n._func_info;t.HAVE_RAW_UPLOAD&&!o.rawupload&&e.error(L,"Raw upload is not allowed: ".concat(n._func));var i=n._iface_info,c=n._func;n._from_query_string&&(w(i,c,r),n._from_query_string=!1),S(e,i,c,r)}},{key:"_getImpl",value:function(e,t){var n=t.info,r=n._iface_info,i=r.iface,c=r.mjrver,u=this._impls[i][c];return"object"!==o(u)&&("function"==typeof u?u=u(u,this):e.error(T,"Invalid implementation type: ".concat(n._func,"()")),"object"!==o(u)&&e.error(T,"Implementation does not implement "+"InterfaceImplementation: ".concat(i,":").concat(c)),this._impls[i][c]=u),u}},{key:"_checkResponse",value:function(e,t){var n=t.info,r=n.RAW_RESPONSE,i=n._func_info;if(i.rawresult)return n.RAW_RESPONSE=null,void(("object"!==o(r.r)||Object.keys(r.r).length>0)&&e.error(T,"Raw result is expected: ".concat(n._func,"()")));i.expect_result||!0===n.RAW_REQUEST.forcersp?this._dev_checks&&A(e,n._iface_info,n._func,r):n.RAW_RESPONSE=null}},{key:"_signResponse",value:function(e,t){var n=this,r=t.info.RAW_RESPONSE;r&&this._secprov.signAuto(e,t,r)?e.add((function(e){n.emit("response",t,r)})):this.emit("response",t,r)}},{key:"close",value:function(e){e&&this.once("close",e),this.emit("close")}},{key:"packPayload",value:function(e,t){var n=e.encode(t);if("string"==typeof n&&(n=Buffer.from(n)),n.length>this.SAFE_PAYLOAD_LIMIT)throw this.emit("notExpected",T,"Response size has exceeded safety limit",null,null),new Error(T);return n}},{key:"SAFE_PAYLOAD_LIMIT",get:function(){return 65536}}]),e}();e.exports=B},function(e,t,n){e.exports=n(52)},function(e,t,n){var r=n(26),o=n(15);e.exports=function(e,t,n,i){var c=!n;n||(n={});for(var u=-1,a=t.length;++u<a;){var s=t[u],f=i?i(n[s],e[s],s,n,e):void 0;void 0===f&&(f=e[s]),c?o(n,s,f):r(n,s,f)}return n}},function(e,t,n){var r=n(15),o=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var c=e[t];i.call(e,t)&&o(c,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(16),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t){var n="object"==typeof global&&global&&global.Object===Object&&global;e.exports=n},function(e,t,n){var r=n(18),o=n(33);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,c=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(c=e.length>3&&"function"==typeof c?(i--,c):void 0,u&&o(n[0],n[1],u)&&(c=i<3?void 0:c,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,c)}return t}))}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(2),o=n(19),i=n(35),c=n(0);e.exports=function(e,t,n){if(!c(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(67),o=n(3),i=Object.prototype,c=i.hasOwnProperty,u=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return o(e)&&c.call(e,"callee")&&!u.call(e,"callee")};e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){(function(e){var r=n(1),o=n(68),i=t&&!t.nodeType&&t,c=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=c&&c.exports===i?r.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;e.exports=a}).call(this,n(6)(e))},function(e,t,n){var r=n(69),o=n(70),i=n(71),c=i&&i.isTypedArray,u=c?o(c):r;e.exports=u},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t){(function(){var t,n,r,o,i,c;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},n=process.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),c=1e9*process.uptime(),i=o-c):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e);var t,n,r,a=u(s);function s(){return o(this,s),a.apply(this,arguments)}return t=s,r=[{key:"register",value:function(e,t,n,r,o){var i=(o=o||{}).version||"0.1",c=this.spec(i);o.nativeImpl=this,o.specDirs=[c],t.register(e,"#basicauth",c.iface+":"+c.version,n,r,o)}}],(n=null)&&i(t.prototype,n),r&&i(t,r),s}(n(5).NativeIface);e.exports=f,(f._specs={})[.1]={iface:"futoin.basicauth",version:"0.1",ftn3rev:"1.1",funcs:{auth:{params:{user:{type:"string",desc:"User name"},pwd:{type:"string",desc:"User password"},client_addr:{type:"string",desc:"Client's source address"},is_secure:{type:"boolean",desc:"Is secure channel?"}},result:{local_id:{type:"integer",desc:"Local user ID"},global_id:{type:"string",desc:"Global user ID"},details:{type:"map",desc:"User details"},seclvl:{type:"string",desc:"Security level"}},throws:["AuthenticationFailure"],desc:"Try to authenticate user with provided credentials"},checkHMAC:{params:{msg:{type:"map",desc:"Message object"},user:{type:"string",desc:"User name"},algo:{type:"string",desc:"HMAC algorithm"},sig:{type:"string",desc:"Request signature"},client_addr:{type:"string",desc:"Client's source address"},is_secure:{type:"boolean",desc:"Is secure channel?"}},result:{local_id:{type:"integer",desc:"Local user ID"},global_id:{type:"string",desc:"Global user ID"},details:{type:"map",desc:"User details"},seclvl:{type:"string",desc:"Security level"}},throws:["AuthenticationFailure"],desc:"Try to authenticate user with provided credentials"},genHMAC:{params:{msg:{type:"map",desc:"Message object"},user:{type:"string",desc:"User name"},algo:{type:"string",desc:"HMAC algorithm"}},result:{sig:{type:"string",desc:"Global user ID"}},throws:["InvalidUser"],desc:"Try to authenticate user with provided credentials"},getUserDetails:{params:{local_id:{type:"integer",desc:"Local user ID"},fields:{type:"map",default:{},desc:"List of field to retrieve, default - all"}},result:{details:{type:"map",desc:"User details"}},throws:["InvalidUser"],desc:"Try to authenticate user with provided credentials"}},requires:["SecureChannel","AllowAnonymous"],desc:"Basic Auth interface"}},function(e,t,n){var r=n(84),o=n(45),i=n(108),c=n(110),u=n(0),a=n(9),s=n(47);e.exports=function e(t,n,f,l,p){t!==n&&i(n,(function(i,a){if(p||(p=new r),u(i))c(t,n,a,f,e,l,p);else{var _=l?l(s(t,a),i,a+"",t,n,p):void 0;void 0===_&&(_=i),o(t,a,_)}}),a)}},function(e,t,n){var r=n(16)(n(1),"Map");e.exports=r},function(e,t,n){var r=n(15),o=n(2);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},function(e,t,n){var r=n(118)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.Executor){var o=n(49);t.FutoInExecutor=o,r.Executor=o,t.FutoIn=r,t.futoin=r,t.BrowserExecutor=o.BrowserExecutor}e.exports=r.Executor}(window)},function(e,t,n){"use strict";(function(e){var r="undefined"==typeof window&&n(50);t.ChannelContext=n(14),t.DerivedKey=n(51),t.RequestInfo=n(7),t.SourceAddress=n(20),t.UserInfo=n(21),t.SecurityProvider=n(22),t.LegacySecurityProvider=n(74),t.PingService=n(78);var o=n(23);if(t.Executor=o,t.ClientExecutor=o,r){var i=e;t.NodeExecutor=i.require("../NodeExecutor")}else t.BrowserExecutor=n(79)}).call(this,n(6)(e))},function(e,t){e.exports=!1},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._ccm=t,this._base_id=n,this._sequence_id=r}var t,n,o;return t=e,(n=[{key:"baseID",value:function(){return this._base_id}},{key:"sequenceID",value:function(){return this._sequence_id}},{key:"encrypt",value:function(e,t){return e.error("NotImplemented","Derived key encryption is not supported yet"),null}},{key:"decrypt",value:function(e,t){return e.error("NotImplemented","Derived key decryption is not supported yet"),null}},{key:"_cleanup",value:function(){this._ccm=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=o},function(e,t,n){var r=n(25),o=n(30),i=n(9),c=o((function(e,t){r(t,i(t),e)}));e.exports=c},function(e,t,n){var r=n(17),o=n(56),i=n(0),c=n(58),u=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,f=a.toString,l=s.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:u).test(c(e))}},function(e,t,n){var r=n(28),o=Object.prototype,i=o.hasOwnProperty,c=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=c.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(57),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(32),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,c=-1,u=o(i.length-t,0),a=Array(u);++c<u;)a[c]=i[t+c];c=-1;for(var s=Array(t+1);++c<t;)s[c]=i[c];return s[t]=n(a),r(e,this,s)}}},function(e,t,n){var r=n(62),o=n(64)(r);e.exports=o},function(e,t,n){var r=n(63),o=n(27),i=n(31),c=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=c},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(66),o=n(36),i=n(37),c=n(38),u=n(35),a=n(39),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),f=!n&&o(e),l=!n&&!f&&c(e),p=!n&&!f&&!l&&a(e),_=n||f||l||p,v=_?r(e.length,String):[],h=v.length;for(var y in e)!t&&!s.call(e,y)||_&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,h))||v.push(y);return v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),o=n(34),i=n(3),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!c[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(29),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||c&&c.binding&&c.binding("util")}catch(e){}}();e.exports=u}).call(this,n(6)(e))},function(e,t,n){var r=n(0),o=n(40),i=n(73),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&c.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=n(23),p=n(22),_=n(4).Errors.SecurityError,v=n(77),h=n(42),y=Symbol("HMAC_USER"),d=Symbol("HMAC_ALGO"),g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(f,e);var t,n,r,s=a(f);function f(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,f),(n=s.call(this))._ccm=t,n._secprov=r||new p;var o=new l(t);return n._auth_svc=v.register(e,o),h.register(e,t,o),t.once("close",(function(){return o.close()})),n}return t=f,(n=[{key:"addUser",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._auth_svc.addUser(e,t,n,r)}},{key:"checkAuth",value:function(e,t,n,r){"-hmac"===r[0]?this._checkMAC(e,t,{user:r[1],algo:r[2],sig:r[3]}):2===r.length&&22!==r[0].length?this._checkBasicAuth(e,t,{user:r[0],pwd:r[1]}):this._secprov.checkAuth(e,t,n,r)}},{key:"signAuto",value:function(e,t,n){return t.info[y]?(this._signHMAC(e,t,n),!0):this._secprov.signAuto(e,t,n)}},{key:"isSigned",value:function(e){return e.info[y]||this._secprov.isSigned(e)}},{key:"_checkBasicAuth",value:function(e,t,n){var r=this,o=n.user,i=n.pwd;e.add((function(e){var n=r._ccm.iface("#basicauth"),c=t.info;n.call(e,"auth",{user:o,pwd:i,client_addr:c.CLIENT_ADDR.asString(),is_secure:c.SECURE_CHANNEL}),e.add((function(e,n){r._setUser(e,t,n.seclvl,n)}))}),(function(e,t){e.error(_,"Basic Auth Verification Failed")}))}},{key:"_checkMAC",value:function(e,t,n){var r=this,i=n.user,c=n.algo,u=n.sig;this._normalizeQueryParams(e,t),e.add((function(e){var n=r._ccm.iface("#basicauth"),a=t.info,s=o({},t.info.RAW_REQUEST);n.call(e,"checkHMAC",{msg:s,user:i,algo:c,sig:u,client_addr:a.CLIENT_ADDR.asString(),is_secure:a.SECURE_CHANNEL}),e.add((function(e,n){r._setUser(e,t,n.seclvl,n),a[d]=c,a[y]=i}))}),(function(e,t){e.error(_,"Legacy Signature Verification Failed")}))}},{key:"_signHMAC",value:function(e,t,n){var r=this._ccm.iface("#basicauth"),o=t.info;r.call(e,"genHMAC",{msg:n,user:o[y],algo:o[d]}),e.add((function(e,t){var r=t.sig;n.sec=r}))}}])&&c(t.prototype,n),r&&c(t,r),f}(p);e.exports=g},function(e,t,n){var r=n(18),o=n(2),i=n(33),c=n(9),u=Object.prototype,a=u.hasOwnProperty,s=r((function(e,t){e=Object(e);var n=-1,r=t.length,s=r>2?t[2]:void 0;for(s&&i(t[0],t[1],s)&&(r=1);++n<r;)for(var f=t[n],l=c(f),p=-1,_=l.length;++p<_;){var v=l[p],h=e[v];(void 0===h||o(h,u[v])&&!a.call(e,v))&&(e[v]=f[v])}return e}));e.exports=s},function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(42),i=n(5).SpecTools,c=i.genHMACRaw,u=i.getRawAlgo,a=i.checkHMAC,s=i.secureEquals,f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._user_list={},this._user_ids={},this._next_id=1}var t,n,i;return t=e,i=[{key:"register",value:function(e,t){var n=o.spec("0.1"),r=n.iface+":"+n.version,i=new this;return t.register(e,r,i,[n]),i}}],(n=[{key:"addUser",value:function(e,t,n,r){var o=this._next_id++;(n=n||{}).Login=e;var i={secret:t,info:{local_id:o,global_id:"G"+o,details:n},system_user:r||!1};this._user_list[e]=i,this._user_ids[o]=i}},{key:"_getUser",value:function(e,t){var n=this._user_list[t];e.add((function(e){return e.success(n)}))}},{key:"_getUserByID",value:function(e,t){var n=this._user_ids[t];e.add((function(e){return e.success(n)}))}},{key:"auth",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){r&&s(r.secret,n.pwd)?(t.result().seclvl=r.system_user?t.SL_SYSTEM:t.SL_SAFE_OPS,e.success(r.info)):e.error("AuthenticationFailure")}))}},{key:"checkHMAC",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){if(r){var o=u(e,n.algo),i=c(o,r.secret,n.msg),s=new Buffer(n.sig,"base64");if(a(i,s))return t.result().seclvl=r.system_user?t.SL_SYSTEM:t.SL_PRIVILEGED_OPS,void e.success(r.info)}e.error("AuthenticationFailure")}))}},{key:"genHMAC",value:function(e,t){var n=t.params();this._getUser(e,n.user),e.add((function(e,r){if(r){var o=u(e,n.algo),i=c(o,r.secret,n.msg);t.result().sig=i.toString("base64")}else e.error("InvalidUser")}))}},{key:"getUserDetails",value:function(e,t){var n=t.params();this._getUserByID(e,n.local_id),e.add((function(e,n){n?t.result().details=n.info.details:e.error("InvalidUser")}))}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=f},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(5).PingFace,i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"register",value:function(e,t){var n=o.spec("1.0"),r=n.iface+":"+n.version,i=new this;return t.register(e,r,i,[n]),i}}],(n=[{key:"ping",value:function(e,t){t.result().echo=t.params().echo}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=n(80),h=n(82),y=n(4),d=n(41),g=window,b=n(23),m=n(14),E=n(20),O=n(7),x=function(e){a(n,e);var t=f(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e))._event_origin=r.origin,o._event_source=r.source,o._last_used=d(),o._is_secure_channel=!0,o}return u(n,[{key:"type",value:function(){return"BROWSER"}},{key:"isStateful",value:function(){return!0}},{key:"_getPerformRequest",value:function(){var e=this._event_origin,t=this._event_source,n=this._executor._reverse_requests,r=this._executor._msg_sniffer;return function(o,i,c){o.add((function(o){var u="S"+n.rid++;if(c.rid=u,i.expect_response){var a=n.sentreqs;a[u]={reqas:o,evt_origin:e,evt_source:t},o.setCancel((function(e){delete a[u]}))}r(e,c,!1),t.postMessage(c,e)}))}}}]),n}(m),S={clientTimeoutMS:600,allowedOrigins:[]};Object.freeze(S.allowedOrigins),Object.freeze(S);var A=function(e){a(n,e);var t=f(n);function n(e,r){var o;i(this,n),o=t.call(this,e,r),r=h({},r,S),o._msg_sniffer=r.messageSniffer,o._contexts=[],o._reverse_requests={rid:1,sentreqs:{}};var c=r.allowedOrigins||{};c instanceof Array&&(c=v(c,c)),o.allowed_origins=c;var u=r.clientTimeoutMS;return function e(){for(var t=o._contexts,n=d()-u,r=t.length-1;r>=0;--r){var i=t[r];i._last_used<n&&(i._cleanup(),t.splice(r,1))}setTimeout(e,1e3*u)}(),o._event_listener=function(e){return o.handleMessage(e)},g.addEventListener("message",o._event_listener),Object.seal(p(o)),o}return u(n,[{key:"handleMessage",value:function(e){var t=this;this._msg_sniffer(e,e.data,!0);var n=e.data,r=e.source,i=e.origin;if("object"===o(n)&&"rid"in n){var c=n.rid;if(!("f"in n)&&"S"===c.charAt(0)){var u=this._reverse_requests.sentreqs,a=u[c];return a&&r===a.evt_source&&i===a.evt_origin&&(a.reqas.success(n,"application/futoin+json"),delete u[c]),void(e.stopPropagation&&e.stopPropagation())}if("f"in n&&"C"===c.charAt(0)&&i in this.allowed_origins){for(var s=null,f=this._contexts,l=0,p=f.length;l<p;++l){var _=f[l];if(_._event_source===r&&_._event_origin===i){s=_;break}}s?s._last_used=d():(s=new x(this,e),f.push(s));var v=new E("LOCAL",r,i),h=new O(this,n),g=h.info;g.CHANNEL_CONTEXT=s,g.CLIENT_ADDR=v,g.SECURE_CHANNEL=this._is_secure_channel;var b=y();b.state.reqinfo=h,h._as=b;var m=function(n){h._cleanup();var r={e:"InternalError",rid:c};t._msg_sniffer(e,r,!1),s._event_source.postMessage(r,s._event_origin)};b.add((function(n){n.setCancel(m),t.process(n),n.add((function(n){var r=g.RAW_RESPONSE;h._cleanup(),null!==r&&(t._msg_sniffer(e,r,!1),s._event_source.postMessage(r,s._event_origin))}))})),b.execute(),e.stopPropagation&&e.stopPropagation()}}}},{key:"close",value:function(e){g.removeEventListener("message",this._event_listener),r(_(n.prototype),"close",this).call(this,e)}}]),n}(b);e.exports=A},function(e,t,n){var r=n(26),o=n(81);e.exports=function(e,t){return o(e||[],t||[],r)}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=e.length,i=t.length,c={};++r<o;){var u=r<i?t[r]:void 0;n(c,e[r],u)}return c}},function(e,t,n){var r=n(32),o=n(18),i=n(83),c=n(122),u=o((function(e){return e.push(void 0,i),r(c,void 0,e)}));e.exports=u},function(e,t,n){var r=n(43),o=n(0);e.exports=function e(t,n,i,c,u,a){return o(t)&&o(n)&&(a.set(n,t),r(t,n,void 0,e,a),a.delete(n)),t}},function(e,t,n){var r=n(10),o=n(90),i=n(91),c=n(92),u=n(93),a=n(94);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=c,s.prototype.has=u,s.prototype.set=a,e.exports=s},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(11),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(11);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(11);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(11);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(10);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(10),o=n(44),i=n(95);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!o||c.length<199)return c.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(c)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(96),o=n(103),i=n(105),c=n(106),u=n(107);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(97),o=n(10),i=n(44);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(98),o=n(99),i=n(100),c=n(101),u=n(102);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=u,e.exports=a},function(e,t,n){var r=n(12);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(12),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(12),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(13);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(13);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(13);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(109)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),c=r(t),u=c.length;u--;){var a=c[e?u:++o];if(!1===n(i[a],a,i))break}return t}}},function(e,t,n){var r=n(45),o=n(111),i=n(112),c=n(115),u=n(116),a=n(36),s=n(37),f=n(119),l=n(38),p=n(17),_=n(0),v=n(120),h=n(39),y=n(47),d=n(121);e.exports=function(e,t,n,g,b,m,E){var O=y(e,n),x=y(t,n),S=E.get(x);if(S)r(e,n,S);else{var A=m?m(O,x,n+"",e,t,E):void 0,w=void 0===A;if(w){var R=s(x),k=!R&&l(x),I=!R&&!k&&h(x);A=x,R||k||I?s(O)?A=O:f(O)?A=c(O):k?(w=!1,A=o(x,!0)):I?(w=!1,A=i(x,!0)):A=[]:v(x)||a(x)?(A=O,a(O)?A=d(O):_(O)&&!p(O)||(A=u(x))):w=!1}w&&(E.set(x,A),b(A,x,g,m,E),E.delete(x)),r(e,n,A)}}},function(e,t,n){(function(e){var r=n(1),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===o?r.Buffer:void 0,u=c?c.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(6)(e))},function(e,t,n){var r=n(113);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(114);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(1).Uint8Array;e.exports=r},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(117),o=n(46),i=n(40);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(0),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(19),o=n(3);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(8),o=n(46),i=n(3),c=Function.prototype,u=Object.prototype,a=c.toString,s=u.hasOwnProperty,f=a.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==f}},function(e,t,n){var r=n(25),o=n(9);e.exports=function(e){return r(e,o(e))}},function(e,t,n){var r=n(43),o=n(30)((function(e,t,n,o){r(e,t,n,o)}));e.exports=o}])}));

@@ -29,2 +29,8 @@ 'use strict';

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -34,8 +40,6 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var _require = require('futoin-invoker'),

@@ -52,6 +56,8 @@ NativeIface = _require.NativeIface;

var _super = _createSuper(BasicAuthFace);
function BasicAuthFace() {
_classCallCheck(this, BasicAuthFace);
return _possibleConstructorReturn(this, _getPrototypeOf(BasicAuthFace).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -58,0 +64,0 @@

@@ -33,2 +33,8 @@ "use strict";

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -38,8 +44,6 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var _zipObject = require('lodash/zipObject');

@@ -73,2 +77,4 @@

var _super = _createSuper(BrowserChannelContext);
function BrowserChannelContext(executor, event) {

@@ -79,3 +85,3 @@ var _this;

_this = _possibleConstructorReturn(this, _getPrototypeOf(BrowserChannelContext).call(this, executor));
_this = _super.call(this, executor);
_this._event_origin = event.origin;

@@ -171,2 +177,4 @@ _this._event_source = event.source;

var _super2 = _createSuper(BrowserExecutor);
function BrowserExecutor(ccm, opts) {

@@ -177,3 +185,3 @@ var _this2;

_this2 = _possibleConstructorReturn(this, _getPrototypeOf(BrowserExecutor).call(this, ccm, opts));
_this2 = _super2.call(this, ccm, opts);
opts = _defaultsDeep({}, opts, BrowserExecutorOptions);

@@ -180,0 +188,0 @@ _this2._msg_sniffer = opts.messageSniffer;

@@ -31,11 +31,15 @@ "use strict";

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

@@ -90,5 +94,5 @@ var _defaults = require('lodash/defaults');

var _super = _createSuper(CallbackChannelContext);
function CallbackChannelContext() {
var _getPrototypeOf2;
var _this;

@@ -102,3 +106,3 @@

_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CallbackChannelContext)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this = _super.call.apply(_super, [this].concat(args));
Object.seal(_assertThisInitialized(_this));

@@ -127,2 +131,4 @@ return _this;

var _super2 = _createSuper(InternalChannelContext);
function InternalChannelContext(executor, invoker_executor) {

@@ -133,3 +139,3 @@ var _this2;

_this2 = _possibleConstructorReturn(this, _getPrototypeOf(InternalChannelContext).call(this, executor));
_this2 = _super2.call(this, executor);
_this2._invoker_executor = invoker_executor;

@@ -136,0 +142,0 @@ Object.seal(_assertThisInitialized(_this2));

@@ -31,2 +31,8 @@ 'use strict';

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -36,8 +42,6 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Executor = require('./Executor');

@@ -64,2 +68,4 @@

var _super = _createSuper(LegacySecurityProvider);
/**

@@ -78,3 +84,3 @@ * C-tor

_this = _possibleConstructorReturn(this, _getPrototypeOf(LegacySecurityProvider).call(this));
_this = _super.call(this);
_this._ccm = ccm;

@@ -81,0 +87,0 @@ _this._secprov = secprov || new SecurityProvider();

@@ -35,11 +35,15 @@ "use strict";

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

@@ -92,2 +96,4 @@ var _defaultsDeep = require('lodash/defaultsDeep');

var _super = _createSuper(HTTPChannelContext);
function HTTPChannelContext(executor, req, rsp) {

@@ -98,3 +104,3 @@ var _this;

_this = _possibleConstructorReturn(this, _getPrototypeOf(HTTPChannelContext).call(this, executor));
_this = _super.call(this, executor);
_this._http_req = req;

@@ -190,2 +196,4 @@ _this._http_rsp = rsp;

var _super2 = _createSuper(WSChannelContext);
function WSChannelContext(executor, conn) {

@@ -196,3 +204,3 @@ var _this2;

_this2 = _possibleConstructorReturn(this, _getPrototypeOf(WSChannelContext).call(this, executor));
_this2 = _super2.call(this, executor);
_this2._ws_conn = conn;

@@ -313,2 +321,4 @@ _this2._is_secure_channel = false;

var _super3 = _createSuper(ExecutorLimiter);
function ExecutorLimiter(options, stale_ms) {

@@ -319,3 +329,3 @@ var _this4;

_this4 = _possibleConstructorReturn(this, _getPrototypeOf(ExecutorLimiter).call(this, options));
_this4 = _super3.call(this, options);
_this4._stale_ms = Math.max((options.period_ms || 1e3) * 3, stale_ms);

@@ -476,2 +486,4 @@

var _super4 = _createSuper(NodeExecutor);
function NodeExecutor(ccm, opts) {

@@ -482,3 +494,3 @@ var _this5;

_this5 = _possibleConstructorReturn(this, _getPrototypeOf(NodeExecutor).call(this, ccm, opts));
_this5 = _super4.call(this, ccm, opts);
_this5._closing = false;

@@ -485,0 +497,0 @@ _this5._ws_contexts = new Set();

@@ -11,2 +11,8 @@ "use strict";

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -16,8 +22,6 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
require('./prepare');

@@ -70,6 +74,8 @@

var _super = _createSuper(TestMasterAuth);
function TestMasterAuth() {
_classCallCheck(this, TestMasterAuth);
return _possibleConstructorReturn(this, _getPrototypeOf(TestMasterAuth).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -98,6 +104,8 @@

var _super2 = _createSuper(TestSecurityProvider);
function TestSecurityProvider() {
_classCallCheck(this, TestSecurityProvider);
return _possibleConstructorReturn(this, _getPrototypeOf(TestSecurityProvider).apply(this, arguments));
return _super2.apply(this, arguments);
}

@@ -104,0 +112,0 @@

@@ -11,6 +11,2 @@ 'use strict';

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

@@ -20,4 +16,2 @@

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

@@ -27,2 +21,12 @@

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
require('./prepare');

@@ -86,5 +90,5 @@

var _super = _createSuper(DelayedPingService);
function DelayedPingService() {
var _getPrototypeOf2;
var _this;

@@ -98,3 +102,3 @@

_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DelayedPingService)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this = _super.call.apply(_super, [this].concat(args));
_this._curr = 0;

@@ -101,0 +105,0 @@ _this._max = 0;

{
"name": "futoin-executor",
"version": "2.3.3",
"version": "2.3.4",
"vcs": "git",

@@ -5,0 +5,0 @@ "rms": "npm",

{
"name": "futoin-executor",
"version": "2.3.3",
"version": "2.3.4",
"description": "FutoIn Service base with strict API definition for Node and Browser",

@@ -29,3 +29,3 @@ "main": "lib/main.js",

"engines": {
"node": ">=8"
"node": ">=10"
},

@@ -59,3 +59,3 @@ "scripts": {

"dependencies": {
"cookie": "^0.4.0",
"cookie": "^0.4.1",
"detect-node": "^2.0.4",

@@ -67,31 +67,31 @@ "futoin-asyncevent": "^2.3.4",

"performance-now": "^2.1.0",
"ws": "^7.2.3"
"ws": "^7.3.0"
},
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/core": "^7.9.6",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/preset-env": "^7.8.7",
"babel-loader": "^8.0.6",
"@babel/preset-env": "^7.9.6",
"babel-loader": "^8.1.0",
"chai": "^4.2.0",
"core-js": "^3.6.4",
"eslint": "^6.8.0",
"core-js": "^3.6.5",
"eslint": "^7.0.0",
"futoin-asyncsteps": "^2.5.1",
"futoin-invoker": "^2.4.2",
"grunt": "^1.0.4",
"futoin-invoker": "^2.4.3",
"grunt": "^1.1.0",
"grunt-babel": "^8.0.0",
"grunt-eslint": "^22.0.0",
"grunt-jsdoc-to-markdown": "^5.0.0",
"grunt-karma": "^3.0.2",
"grunt-karma": "^4.0.0",
"grunt-simple-nyc": "^3.0.1",
"grunt-text-replace": "^0.4.0",
"grunt-webpack": "^3.1.3",
"karma": "^4.4.1",
"karma": "^5.0.7",
"karma-firefox-launcher": "^1.3.0",
"karma-mocha": "^1.3.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"memorystream": "^0.3.1",
"minimist": "^1.2.5",
"mocha": "^7.1.0",
"mocha": "^7.1.2",
"request": "^2.88.2",
"webpack": "4.42.0"
"webpack": "4.43.0"
},

@@ -98,0 +98,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc