w-converhp 1.0.37 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +9 -9
- package/.eslintignore +3 -3
- package/.eslintrc.js +18 -17
- package/.github/workflows/ci-test.yml +1 -1
- package/README.md +2 -1
- package/babel.config.js +1 -0
- package/dist/w-converhp-client.umd.js +2 -2
- package/dist/w-converhp-client.umd.js.map +1 -1
- package/dist/w-converhp-server.umd.js +2 -2
- package/dist/w-converhp-server.umd.js.map +1 -1
- package/docs/WConverhpClient.html +65 -63
- package/docs/WConverhpClient.mjs.html +6 -3
- package/docs/WConverhpServer.html +99 -98
- package/docs/WConverhpServer.mjs.html +8 -5
- package/docs/index.html +4 -1
- package/docs/scripts/collapse.js +19 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/search.js +16 -0
- package/docs/styles/jsdoc.css +13 -2
- package/docs/styles/prettify.css +1 -0
- package/package.json +7 -7
- package/src/WConverhpClient.mjs +2 -2
- package/src/WConverhpServer.mjs +4 -4
- package/srv.mjs +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-converhp-server v1.0.
|
|
2
|
+
* w-converhp-server v1.0.39
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("@hapi/hapi"),require("@hapi/inert"),require("events"),require("stream"),require("crypto")):"function"==typeof define&&define.amd?define(["@hapi/hapi","@hapi/inert","events","stream","crypto"],r):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-converhp-server"]=r(t["@hapi/hapi"],t["@hapi/inert"],t.events,t.stream,t.crypto)}(this,(function(t,r,e,n,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=i(t),u=i(r),c=i(e),f=i(n),s=i(o);function l(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function v(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function a(t){l(i,n,o,a,u,"next",t)}function u(t){l(i,n,o,a,u,"throw",t)}a(void 0)}))}}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(t){var r={exports:{}};return t(r,r.exports),r.exports}var d=y((function(t){var r=function(t){var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function f(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),a=new B(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return k()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=S(a,e);if(u){if(u===d)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var c=s(t,r,e);if("normal"===c.type){if(n=e.done?y:v,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=y,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",v="suspendedYield",h="executing",y="completed",d={};function b(){}function g(){}function j(){}var w={};c(w,i,(function(){return this}));var _=Object.getPrototypeOf,m=_&&_(_(U([])));m&&m!==e&&n.call(m,i)&&(w=m);var O=j.prototype=b.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"===p(l)&&n.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}}function S(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,S(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function U(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:r,done:!0}}return g.prototype=j,c(O,"constructor",j),c(j,"constructor",g),g.displayName=c(j,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,c(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},A(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new x(f(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(O),c(O,u,"Generator"),c(O,i,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=U,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:U(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":p(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}})),b=d,g=Array.isArray,j="object"==p(h)&&h&&h.Object===Object&&h,w="object"==("undefined"==typeof self?"undefined":p(self))&&self&&self.Object===Object&&self,_=j||w||Function("return this")(),m=_.Symbol,O=Object.prototype,A=O.hasOwnProperty,x=O.toString,S=m?m.toStringTag:void 0;var E=function(t){var r=A.call(t,S),e=t[S];try{t[S]=void 0;var n=!0}catch(t){}var o=x.call(t);return n&&(r?t[S]=e:delete t[S]),o},L=Object.prototype.toString;var B=function(t){return L.call(t)},U=m?m.toStringTag:void 0;var k=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":U&&U in Object(t)?E(t):B(t)};var N=function(t){return null!=t&&"object"==p(t)};var P=function(t){return"symbol"==p(t)||N(t)&&"[object Symbol]"==k(t)},z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/;var M=function(t,r){if(g(t))return!1;var e=p(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!P(t))||(I.test(t)||!z.test(t)||null!=r&&t in Object(r))};var T=function(t){var r=p(t);return null!=t&&("object"==r||"function"==r)};var C,F=function(t){if(!T(t))return!1;var r=k(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},R=_["__core-js_shared__"],D=(C=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var $=function(t){return!!D&&D in t},G=Function.prototype.toString;var H=function(t){if(null!=t){try{return G.call(t)}catch(t){}try{return t+""}catch(t){}}return""},q=/^\[object .+?Constructor\]$/,V=Function.prototype,W=Object.prototype,J=V.toString,Y=W.hasOwnProperty,K=RegExp("^"+J.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(t){return!(!T(t)||$(t))&&(F(t)?K:q).test(H(t))};var X=function(t,r){return null==t?void 0:t[r]};var Z=function(t,r){var e=X(t,r);return Q(e)?e:void 0},tt=Z(Object,"create");var rt=function(){this.__data__=tt?tt(null):{},this.size=0};var et=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},nt=Object.prototype.hasOwnProperty;var ot=function(t){var r=this.__data__;if(tt){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return nt.call(r,t)?r[t]:void 0},it=Object.prototype.hasOwnProperty;var at=function(t){var r=this.__data__;return tt?void 0!==r[t]:it.call(r,t)};var ut=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=tt&&void 0===r?"__lodash_hash_undefined__":r,this};function ct(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}ct.prototype.clear=rt,ct.prototype.delete=et,ct.prototype.get=ot,ct.prototype.has=at,ct.prototype.set=ut;var ft=ct;var st=function(){this.__data__=[],this.size=0};var lt=function(t,r){return t===r||t!=t&&r!=r};var vt=function(t,r){for(var e=t.length;e--;)if(lt(t[e][0],r))return e;return-1},pt=Array.prototype.splice;var ht=function(t){var r=this.__data__,e=vt(r,t);return!(e<0)&&(e==r.length-1?r.pop():pt.call(r,e,1),--this.size,!0)};var yt=function(t){var r=this.__data__,e=vt(r,t);return e<0?void 0:r[e][1]};var dt=function(t){return vt(this.__data__,t)>-1};var bt=function(t,r){var e=this.__data__,n=vt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function gt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}gt.prototype.clear=st,gt.prototype.delete=ht,gt.prototype.get=yt,gt.prototype.has=dt,gt.prototype.set=bt;var jt=gt,wt=Z(_,"Map");var _t=function(){this.size=0,this.__data__={hash:new ft,map:new(wt||jt),string:new ft}};var mt=function(t){var r=p(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var Ot=function(t,r){var e=t.__data__;return mt(r)?e["string"==typeof r?"string":"hash"]:e.map};var At=function(t){var r=Ot(this,t).delete(t);return this.size-=r?1:0,r};var xt=function(t){return Ot(this,t).get(t)};var St=function(t){return Ot(this,t).has(t)};var Et=function(t,r){var e=Ot(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function Lt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Lt.prototype.clear=_t,Lt.prototype.delete=At,Lt.prototype.get=xt,Lt.prototype.has=St,Lt.prototype.set=Et;var Bt=Lt;function Ut(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function e(){var n=arguments,o=r?r.apply(this,n):n[0],i=e.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return e.cache=i.set(o,a)||i,a};return e.cache=new(Ut.Cache||Bt),e}Ut.Cache=Bt;var kt=Ut;var Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/\\(\\)?/g,zt=function(t){var r=kt(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(Nt,(function(t,e,n,o){r.push(n?o.replace(Pt,"$1"):e||t)})),r}));var It=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o},Mt=m?m.prototype:void 0,Tt=Mt?Mt.toString:void 0;var Ct=function t(r){if("string"==typeof r)return r;if(g(r))return It(r,t)+"";if(P(r))return Tt?Tt.call(r):"";var e=r+"";return"0"==e&&1/r==-Infinity?"-0":e};var Ft=function(t){return null==t?"":Ct(t)};var Rt=function(t,r){return g(t)?t:M(t,r)?[t]:zt(Ft(t))};var Dt=function(t){if("string"==typeof t||P(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r};var $t=function(t,r){for(var e=0,n=(r=Rt(r,t)).length;null!=t&&e<n;)t=t[Dt(r[e++])];return e&&e==n?t:void 0};var Gt=function(t,r,e){var n=null==t?void 0:$t(t,r);return void 0===n?e:n};var Ht=function(){this.__data__=new jt,this.size=0};var qt=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var Vt=function(t){return this.__data__.get(t)};var Wt=function(t){return this.__data__.has(t)};var Jt=function(t,r){var e=this.__data__;if(e instanceof jt){var n=e.__data__;if(!wt||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Bt(n)}return e.set(t,r),this.size=e.size,this};function Yt(t){var r=this.__data__=new jt(t);this.size=r.size}Yt.prototype.clear=Ht,Yt.prototype.delete=qt,Yt.prototype.get=Vt,Yt.prototype.has=Wt,Yt.prototype.set=Jt;var Kt=Yt;var Qt=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Xt=function(t){return this.__data__.has(t)};function Zt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new Bt;++r<e;)this.add(t[r])}Zt.prototype.add=Zt.prototype.push=Qt,Zt.prototype.has=Xt;var tr=Zt;var rr=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1};var er=function(t,r){return t.has(r)};var nr=function(t,r,e,n,o,i){var a=1&e,u=t.length,c=r.length;if(u!=c&&!(a&&c>u))return!1;var f=i.get(t),s=i.get(r);if(f&&s)return f==r&&s==t;var l=-1,v=!0,p=2&e?new tr:void 0;for(i.set(t,r),i.set(r,t);++l<u;){var h=t[l],y=r[l];if(n)var d=a?n(y,h,l,r,t,i):n(h,y,l,t,r,i);if(void 0!==d){if(d)continue;v=!1;break}if(p){if(!rr(r,(function(t,r){if(!er(p,r)&&(h===t||o(h,t,e,n,i)))return p.push(r)}))){v=!1;break}}else if(h!==y&&!o(h,y,e,n,i)){v=!1;break}}return i.delete(t),i.delete(r),v},or=_.Uint8Array;var ir=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e};var ar=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e},ur=m?m.prototype:void 0,cr=ur?ur.valueOf:void 0;var fr=function(t,r,e,n,o,i,a){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!i(new or(t),new or(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var u=ir;case"[object Set]":var c=1&n;if(u||(u=ar),t.size!=r.size&&!c)return!1;var f=a.get(t);if(f)return f==r;n|=2,a.set(t,r);var s=nr(u(t),u(r),n,o,i,a);return a.delete(t),s;case"[object Symbol]":if(cr)return cr.call(t)==cr.call(r)}return!1};var sr=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t};var lr=function(t,r,e){var n=r(t);return g(t)?n:sr(n,e(t))};var vr=function(t,r){for(var e=-1,n=null==t?0:t.length,o=0,i=[];++e<n;){var a=t[e];r(a,e,t)&&(i[o++]=a)}return i};var pr=function(){return[]},hr=Object.prototype.propertyIsEnumerable,yr=Object.getOwnPropertySymbols,dr=yr?function(t){return null==t?[]:(t=Object(t),vr(yr(t),(function(r){return hr.call(t,r)})))}:pr;var br=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n};var gr=function(t){return N(t)&&"[object Arguments]"==k(t)},jr=Object.prototype,wr=jr.hasOwnProperty,_r=jr.propertyIsEnumerable,mr=gr(function(){return arguments}())?gr:function(t){return N(t)&&wr.call(t,"callee")&&!_r.call(t,"callee")},Or=mr;var Ar=function(){return!1},xr=y((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?_.Buffer:void 0,i=(o?o.isBuffer:void 0)||Ar;t.exports=i})),Sr=/^(?:0|[1-9]\d*)$/;var Er=function(t,r){var e=p(t);return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&Sr.test(t))&&t>-1&&t%1==0&&t<r};var Lr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Br={};Br["[object Float32Array]"]=Br["[object Float64Array]"]=Br["[object Int8Array]"]=Br["[object Int16Array]"]=Br["[object Int32Array]"]=Br["[object Uint8Array]"]=Br["[object Uint8ClampedArray]"]=Br["[object Uint16Array]"]=Br["[object Uint32Array]"]=!0,Br["[object Arguments]"]=Br["[object Array]"]=Br["[object ArrayBuffer]"]=Br["[object Boolean]"]=Br["[object DataView]"]=Br["[object Date]"]=Br["[object Error]"]=Br["[object Function]"]=Br["[object Map]"]=Br["[object Number]"]=Br["[object Object]"]=Br["[object RegExp]"]=Br["[object Set]"]=Br["[object String]"]=Br["[object WeakMap]"]=!1;var Ur=function(t){return N(t)&&Lr(t.length)&&!!Br[k(t)]};var kr=function(t){return function(r){return t(r)}},Nr=y((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&j.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),Pr=Nr&&Nr.isTypedArray,zr=Pr?kr(Pr):Ur,Ir=Object.prototype.hasOwnProperty;var Mr=function(t,r){var e=g(t),n=!e&&Or(t),o=!e&&!n&&xr(t),i=!e&&!n&&!o&&zr(t),a=e||n||o||i,u=a?br(t.length,String):[],c=u.length;for(var f in t)!r&&!Ir.call(t,f)||a&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Er(f,c))||u.push(f);return u},Tr=Object.prototype;var Cr=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||Tr)};var Fr=function(t,r){return function(e){return t(r(e))}},Rr=Fr(Object.keys,Object),Dr=Object.prototype.hasOwnProperty;var $r=function(t){if(!Cr(t))return Rr(t);var r=[];for(var e in Object(t))Dr.call(t,e)&&"constructor"!=e&&r.push(e);return r};var Gr=function(t){return null!=t&&Lr(t.length)&&!F(t)};var Hr=function(t){return Gr(t)?Mr(t):$r(t)};var qr=function(t){return lr(t,Hr,dr)},Vr=Object.prototype.hasOwnProperty;var Wr=function(t,r,e,n,o,i){var a=1&e,u=qr(t),c=u.length;if(c!=qr(r).length&&!a)return!1;for(var f=c;f--;){var s=u[f];if(!(a?s in r:Vr.call(r,s)))return!1}var l=i.get(t),v=i.get(r);if(l&&v)return l==r&&v==t;var p=!0;i.set(t,r),i.set(r,t);for(var h=a;++f<c;){var y=t[s=u[f]],d=r[s];if(n)var b=a?n(d,y,s,r,t,i):n(y,d,s,t,r,i);if(!(void 0===b?y===d||o(y,d,e,n,i):b)){p=!1;break}h||(h="constructor"==s)}if(p&&!h){var g=t.constructor,j=r.constructor;g==j||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof j&&j instanceof j||(p=!1)}return i.delete(t),i.delete(r),p},Jr=Z(_,"DataView"),Yr=Z(_,"Promise"),Kr=Z(_,"Set"),Qr=Z(_,"WeakMap"),Xr="[object Map]",Zr="[object Promise]",te="[object Set]",re="[object WeakMap]",ee="[object DataView]",ne=H(Jr),oe=H(wt),ie=H(Yr),ae=H(Kr),ue=H(Qr),ce=k;(Jr&&ce(new Jr(new ArrayBuffer(1)))!=ee||wt&&ce(new wt)!=Xr||Yr&&ce(Yr.resolve())!=Zr||Kr&&ce(new Kr)!=te||Qr&&ce(new Qr)!=re)&&(ce=function(t){var r=k(t),e="[object Object]"==r?t.constructor:void 0,n=e?H(e):"";if(n)switch(n){case ne:return ee;case oe:return Xr;case ie:return Zr;case ae:return te;case ue:return re}return r});var fe=ce,se="[object Arguments]",le="[object Array]",ve="[object Object]",pe=Object.prototype.hasOwnProperty;var he=function(t,r,e,n,o,i){var a=g(t),u=g(r),c=a?le:fe(t),f=u?le:fe(r),s=(c=c==se?ve:c)==ve,l=(f=f==se?ve:f)==ve,v=c==f;if(v&&xr(t)){if(!xr(r))return!1;a=!0,s=!1}if(v&&!s)return i||(i=new Kt),a||zr(t)?nr(t,r,e,n,o,i):fr(t,r,c,e,n,o,i);if(!(1&e)){var p=s&&pe.call(t,"__wrapped__"),h=l&&pe.call(r,"__wrapped__");if(p||h){var y=p?t.value():t,d=h?r.value():r;return i||(i=new Kt),o(y,d,e,n,i)}}return!!v&&(i||(i=new Kt),Wr(t,r,e,n,o,i))};var ye=function t(r,e,n,o,i){return r===e||(null==r||null==e||!N(r)&&!N(e)?r!=r&&e!=e:he(r,e,n,o,t,i))};var de=function(t,r,e,n){var o=e.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=e[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=e[o])[0],f=t[c],s=u[1];if(a&&u[2]){if(void 0===f&&!(c in t))return!1}else{var l=new Kt;if(n)var v=n(f,s,c,t,r,l);if(!(void 0===v?ye(s,f,3,n,l):v))return!1}}return!0};var be=function(t){return t==t&&!T(t)};var ge=function(t){for(var r=Hr(t),e=r.length;e--;){var n=r[e],o=t[n];r[e]=[n,o,be(o)]}return r};var je=function(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}};var we=function(t){var r=ge(t);return 1==r.length&&r[0][2]?je(r[0][0],r[0][1]):function(e){return e===t||de(e,t,r)}};var _e=function(t,r){return null!=t&&r in Object(t)};var me=function(t,r,e){for(var n=-1,o=(r=Rt(r,t)).length,i=!1;++n<o;){var a=Dt(r[n]);if(!(i=null!=t&&e(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Lr(o)&&Er(a,o)&&(g(t)||Or(t))};var Oe=function(t,r){return null!=t&&me(t,r,_e)};var Ae=function(t,r){return M(t)&&be(r)?je(Dt(t),r):function(e){var n=Gt(e,t);return void 0===n&&n===r?Oe(e,t):ye(r,n,3)}};var xe=function(t){return t};var Se=function(t){return function(r){return null==r?void 0:r[t]}};var Ee=function(t){return function(r){return $t(r,t)}};var Le=function(t){return M(t)?Se(Dt(t)):Ee(t)};var Be=function(t){return"function"==typeof t?t:null==t?xe:"object"==p(t)?g(t)?Ae(t[0],t[1]):we(t):Le(t)};var Ue=function(t){return function(r,e,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var c=a[t?u:++o];if(!1===e(i[c],c,i))break}return r}}();var ke=function(t,r){return function(e,n){if(null==e)return e;if(!Gr(e))return t(e,n);for(var o=e.length,i=r?o:-1,a=Object(e);(r?i--:++i<o)&&!1!==n(a[i],i,a););return e}}((function(t,r){return t&&Ue(t,r,Hr)}));var Ne=function(t,r){var e=-1,n=Gr(t)?Array(t.length):[];return ke(t,(function(t,o,i){n[++e]=r(t,o,i)})),n};var Pe=function(t,r){return(g(t)?It:Ne)(t,Be(r))};var ze=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););return t};var Ie=function(t){return"function"==typeof t?t:xe};var Me=function(t,r){return(g(t)?ze:ke)(t,Ie(r))},Te=function(){try{var t=Z(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Ce=function(t,r,e){"__proto__"==r&&Te?Te(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e},Fe=Object.prototype.hasOwnProperty;var Re=function(t,r,e){var n=t[r];Fe.call(t,r)&<(n,e)&&(void 0!==e||r in t)||Ce(t,r,e)};var De=function(t,r,e,n){var o=!e;e||(e={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),o?Ce(e,u,c):Re(e,u,c)}return e};var $e=function(t,r){return t&&De(r,Hr(r),t)};var Ge=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r},He=Object.prototype.hasOwnProperty;var qe=function(t){if(!T(t))return Ge(t);var r=Cr(t),e=[];for(var n in t)("constructor"!=n||!r&&He.call(t,n))&&e.push(n);return e};var Ve=function(t){return Gr(t)?Mr(t,!0):qe(t)};var We=function(t,r){return t&&De(r,Ve(r),t)},Je=y((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?_.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=i?i(e):new t.constructor(e);return t.copy(n),n}}));var Ye=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r};var Ke=function(t,r){return De(t,dr(t),r)},Qe=Fr(Object.getPrototypeOf,Object),Xe=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)sr(r,dr(t)),t=Qe(t);return r}:pr;var Ze=function(t,r){return De(t,Xe(t),r)};var tn=function(t){return lr(t,Ve,Xe)},rn=Object.prototype.hasOwnProperty;var en=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&rn.call(t,"index")&&(e.index=t.index,e.input=t.input),e};var nn=function(t){var r=new t.constructor(t.byteLength);return new or(r).set(new or(t)),r};var on=function(t,r){var e=r?nn(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)},an=/\w*$/;var un=function(t){var r=new t.constructor(t.source,an.exec(t));return r.lastIndex=t.lastIndex,r},cn=m?m.prototype:void 0,fn=cn?cn.valueOf:void 0;var sn=function(t){return fn?Object(fn.call(t)):{}};var ln=function(t,r){var e=r?nn(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var vn=function(t,r,e){var n=t.constructor;switch(r){case"[object ArrayBuffer]":return nn(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return on(t,e);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ln(t,e);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return un(t);case"[object Symbol]":return sn(t)}},pn=Object.create,hn=function(){function t(){}return function(r){if(!T(r))return{};if(pn)return pn(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();var yn=function(t){return"function"!=typeof t.constructor||Cr(t)?{}:hn(Qe(t))};var dn=function(t){return N(t)&&"[object Map]"==fe(t)},bn=Nr&&Nr.isMap,gn=bn?kr(bn):dn;var jn=function(t){return N(t)&&"[object Set]"==fe(t)},wn=Nr&&Nr.isSet,_n=wn?kr(wn):jn,mn="[object Arguments]",On="[object Function]",An="[object Object]",xn={};xn[mn]=xn["[object Array]"]=xn["[object ArrayBuffer]"]=xn["[object DataView]"]=xn["[object Boolean]"]=xn["[object Date]"]=xn["[object Float32Array]"]=xn["[object Float64Array]"]=xn["[object Int8Array]"]=xn["[object Int16Array]"]=xn["[object Int32Array]"]=xn["[object Map]"]=xn["[object Number]"]=xn[An]=xn["[object RegExp]"]=xn["[object Set]"]=xn["[object String]"]=xn["[object Symbol]"]=xn["[object Uint8Array]"]=xn["[object Uint8ClampedArray]"]=xn["[object Uint16Array]"]=xn["[object Uint32Array]"]=!0,xn["[object Error]"]=xn[On]=xn["[object WeakMap]"]=!1;var Sn=function t(r,e,n,o,i,a){var u,c=1&e,f=2&e,s=4&e;if(n&&(u=i?n(r,o,i,a):n(r)),void 0!==u)return u;if(!T(r))return r;var l=g(r);if(l){if(u=en(r),!c)return Ye(r,u)}else{var v=fe(r),p=v==On||"[object GeneratorFunction]"==v;if(xr(r))return Je(r,c);if(v==An||v==mn||p&&!i){if(u=f||p?{}:yn(r),!c)return f?Ze(r,We(u,r)):Ke(r,$e(u,r))}else{if(!xn[v])return i?r:{};u=vn(r,v,c)}}a||(a=new Kt);var h=a.get(r);if(h)return h;a.set(r,u),_n(r)?r.forEach((function(o){u.add(t(o,e,n,o,r,a))})):gn(r)&&r.forEach((function(o,i){u.set(i,t(o,e,n,i,r,a))}));var y=l?void 0:(s?f?tn:qr:f?Ve:Hr)(r);return ze(y||r,(function(o,i){y&&(o=r[i=o]),Re(u,i,t(o,e,n,i,r,a))})),u};var En=function(t){return Sn(t,5)};function Ln(){var t,r,e=new Promise((function(){t=arguments[0],r=arguments[1]}));return e.resolve=t,e.reject=r,e}var Bn=function(t){return"string"==typeof t||!g(t)&&N(t)&&"[object String]"==k(t)},Un=Se("length"),kn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Nn=function(t){return kn.test(t)},Pn="\\ud800-\\udfff",zn="["+Pn+"]",In="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Mn="\\ud83c[\\udffb-\\udfff]",Tn="[^"+Pn+"]",Cn="(?:\\ud83c[\\udde6-\\uddff]){2}",Fn="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="(?:"+In+"|"+Mn+")"+"?",Dn="[\\ufe0e\\ufe0f]?",$n=Dn+Rn+("(?:\\u200d(?:"+[Tn,Cn,Fn].join("|")+")"+Dn+Rn+")*"),Gn="(?:"+[Tn+In+"?",In,Cn,Fn,zn].join("|")+")",Hn=RegExp(Mn+"(?="+Mn+")|"+Gn+$n,"g");var qn=function(t){for(var r=Hn.lastIndex=0;Hn.test(t);)++r;return r};var Vn=function(t){return Nn(t)?qn(t):Un(t)};var Wn=function(t){if(null==t)return 0;if(Gr(t))return Bn(t)?Vn(t):t.length;var r=fe(t);return"[object Map]"==r||"[object Set]"==r?t.size:$r(t).length},Jn=y((function(t){var r=Object.prototype.hasOwnProperty,e="~";function n(){}function o(t,r,e){this.fn=t,this.context=r,this.once=e||!1}function i(t,r,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new o(n,i||t,a),c=e?e+r:r;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],u]:t._events[c].push(u):(t._events[c]=u,t._eventsCount++),t}function a(t,r){0==--t._eventsCount?t._events=new n:delete t._events[r]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(e=!1)),u.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)r.call(t,n)&&o.push(e?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},u.prototype.listeners=function(t){var r=e?e+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},u.prototype.listenerCount=function(t){var r=e?e+t:t,n=this._events[r];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,r,n,o,i,a){var u=e?e+t:t;if(!this._events[u])return!1;var c,f,s=this._events[u],l=arguments.length;if(s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,r),!0;case 3:return s.fn.call(s.context,r,n),!0;case 4:return s.fn.call(s.context,r,n,o),!0;case 5:return s.fn.call(s.context,r,n,o,i),!0;case 6:return s.fn.call(s.context,r,n,o,i,a),!0}for(f=1,c=new Array(l-1);f<l;f++)c[f-1]=arguments[f];s.fn.apply(s.context,c)}else{var v,p=s.length;for(f=0;f<p;f++)switch(s[f].once&&this.removeListener(t,s[f].fn,void 0,!0),l){case 1:s[f].fn.call(s[f].context);break;case 2:s[f].fn.call(s[f].context,r);break;case 3:s[f].fn.call(s[f].context,r,n);break;case 4:s[f].fn.call(s[f].context,r,n,o);break;default:if(!c)for(v=1,c=new Array(l-1);v<l;v++)c[v-1]=arguments[v];s[f].fn.apply(s[f].context,c)}}return!0},u.prototype.on=function(t,r,e){return i(this,t,r,e,!1)},u.prototype.once=function(t,r,e){return i(this,t,r,e,!0)},u.prototype.removeListener=function(t,r,n,o){var i=e?e+t:t;if(!this._events[i])return this;if(!r)return a(this,i),this;var u=this._events[i];if(u.fn)u.fn!==r||o&&!u.once||n&&u.context!==n||a(this,i);else{for(var c=0,f=[],s=u.length;c<s;c++)(u[c].fn!==r||o&&!u[c].once||n&&u[c].context!==n)&&f.push(u[c]);f.length?this._events[i]=1===f.length?f[0]:f:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var r;return t?(r=e?e+t:t,this._events[r]&&a(this,r)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=e,u.EventEmitter=u,t.exports=u}));function Yn(){return new Jn}var Kn=/\s/;var Qn=function(t){for(var r=t.length;r--&&Kn.test(t.charAt(r)););return r},Xn=/^\s+/;var Zn=function(t){return t?t.slice(0,Qn(t)+1).replace(Xn,""):t},to=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,eo=/^0o[0-7]+$/i,no=parseInt;var oo=function(t){if("number"==typeof t)return t;if(P(t))return NaN;if(T(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=T(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=Zn(t);var e=ro.test(t);return e||eo.test(t)?no(t.slice(2),e?2:8):to.test(t)?NaN:+t},io=1/0;var ao=function(t){return t?(t=oo(t))===io||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var uo=function(t){var r=ao(t),e=r%1;return r==r?e?r-e:r:0};var co=function(t){return"number"==typeof t&&t==uo(t)};function fo(t){return"[object String]"===Object.prototype.toString.call(t)}function so(t){return!(!fo(t)||""===t)}function lo(t){var r=!1;return so(t)?r=!isNaN(Number(t)):function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)&&(r=!0),r}function vo(t){return lo(t)?ao(t):0}function po(t){return!!lo(t)&&(t=vo(t),co(t))}var ho=_.isFinite,yo=Math.min;var bo=function(t){var r=Math[t];return function(t,e){if(t=oo(t),(e=null==e?0:yo(uo(e),292))&&ho(t)){var n=(Ft(t)+"e").split("e"),o=r(n[0]+"e"+(+n[1]+e));return+((n=(Ft(o)+"e").split("e"))[0]+"e"+(+n[1]-e))}return r(t)}}("round");function go(t){if(!lo(t))return 0;t=vo(t);var r=bo(t);return"0"===String(r)?0:r}function jo(t){return!!po(t)&&go(t)>0}function wo(t){return"[object Object]"===Object.prototype.toString.call(t)}function _o(t){if(wo(t)){for(var r in t)return!0;return!1}return!1}function mo(t,r){return!!wo(t)&&(!(!so(r)&&!lo(r))&&r in t)}function Oo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Yn(),e={},n=null,o=Gt(t,"timeAlive");jo(o)||(o=1e4),o=go(o);var i=Gt(t,"timeDetect");function a(){null===n&&(n=setInterval((function(){Me(e,(function(t,n){if(Date.now()-t.time>o){var i=En(e[n]);delete e[n],r.emit("message",{eventName:"leave",key:n,data:i.data,now:Wn(e)})}})),_o(e)||(clearInterval(n),n=null)}),i))}function u(t,n){so(t)?(mo(e,t)||setTimeout((function(){r.emit("message",{eventName:"enter",key:t,data:n,now:Wn(e)})}),1),e[t]={data:n,time:Date.now()},a()):console.log("trigger need key")}function c(){var t=[];return Me(e,(function(r,e){t.push({key:e,data:r.data})})),t=En(t)}return jo(i)||(i=50),i=go(i),r.trigger=u,r.get=c,r}function Ao(t){return"[object Array]"===Object.prototype.toString.call(t)}function xo(t){if(wo(t)){for(var r in t)return!1;return!0}return!1}function So(t){return!!function(t){return"[object Undefined]"===Object.prototype.toString.call(t)}(t)||(!!function(t){return"[object Null]"===Object.prototype.toString.call(t)}(t)||(!!xo(t)||(!!function(t){return!(!fo(t)||""!==t)}(t)||!!function(t){return!!Ao(t)&&0===t.length}(t))))}function Eo(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function Lo(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function Bo(t){return"[object Uint16Array]"===Object.prototype.toString.call(t)}function Uo(t){if(!(Eo(t)||(r=t,"[object Blob]"===Object.prototype.toString.call(r))||Lo(t)||Bo(t)))return null;var r;try{if(t.byteLength)return t.byteLength}catch(t){}try{if(t.length)return t.length}catch(t){}try{if(t.size)return t.size}catch(t){}return null}var ko=Function.prototype,No=Object.prototype,Po=ko.toString,zo=No.hasOwnProperty,Io=Po.call(Object);var Mo=function(t){if(!N(t)||"[object Object]"!=k(t))return!1;var r=Qe(t);if(null===r)return!0;var e=zo.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&Po.call(e)==Io};var To=function(t){if(!N(t))return!1;var r=k(t);return"[object Error]"==r||"[object DOMException]"==r||"string"==typeof t.message&&"string"==typeof t.name&&!Mo(t)};var Co=y((function(t,r){var e;t.exports=(e=e||function(t,r){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),"undefined"!=typeof self&&self.crypto&&(e=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(e=globalThis.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&void 0!==h&&h.crypto&&(e=h.crypto),!e)try{e=s.default}catch(t){}var n=function(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),i={},a=i.lib={},u=a.Base={extend:function(t){var r=o(this);return t&&r.mixIn(t),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=r?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var r=this.words,e=t.words,n=this.sigBytes,o=t.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=e[i>>>2]>>>24-i%4*8&255;r[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var u=0;u<o;u+=4)r[n+u>>>2]=e[u>>>2];return this.sigBytes+=o,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var r=[],e=0;e<t;e+=4)r.push(n());return new c.init(r,t)}}),f=i.enc={},l=f.Hex={stringify:function(t){for(var r=t.words,e=t.sigBytes,n=[],o=0;o<e;o++){var i=r[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var r=t.length,e=[],n=0;n<r;n+=2)e[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(e,r/2)}},v=f.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,n=[],o=0;o<e;o++){var i=r[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(t){for(var r=t.length,e=[],n=0;n<r;n++)e[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(e,r)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(v.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return v.parse(unescape(encodeURIComponent(t)))}},y=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,u=i/(4*a),f=(u=r?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*a,s=t.min(4*f,i);if(f){for(var l=0;l<f;l+=a)this._doProcessBlock(o,l);e=o.splice(0,f),n.sigBytes-=s}return new c.init(e,s)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=y.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(r,e){return new t.init(e).finalize(r)}},_createHmacHelper:function(t){return function(r,e){return new d.HMAC.init(t,e).finalize(r)}}});var d=i.algo={};return i}(Math),e)})),Fo=y((function(t,r){t.exports=Co.enc.Utf8})),Ro=y((function(t,r){var e;t.exports=(e=Co,function(){var t=e,r=t.lib.WordArray;function n(t,e,n){for(var o=[],i=0,a=0;a<e;a++)if(a%4){var u=n[t.charCodeAt(a-1)]<<a%4*2|n[t.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=u<<24-i%4*8,i++}return r.create(o,i)}t.enc.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,n=this._map;t.clamp();for(var o=[],i=0;i<e;i+=3)for(var a=(r[i>>>2]>>>24-i%4*8&255)<<16|(r[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|r[i+2>>>2]>>>24-(i+2)%4*8&255,u=0;u<4&&i+.75*u<e;u++)o.push(n.charAt(a>>>6*(3-u)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t){var r=t.length,e=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<e.length;i++)o[e.charCodeAt(i)]=i}var a=e.charAt(64);if(a){var u=t.indexOf(a);-1!==u&&(r=u)}return n(t,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)}));function Do(t){if(!so(t))return new Uint8Array;var r;try{r=function(t){if(!fo(t))return new Uint8Array;for(var r=Ro.parse(t),e=r.words,n=r.sigBytes,o=new Uint8Array(n),i=0;i<n;i++){var a=e[i>>>2]>>>24-i%4*8&255;o[i]=a}return o}(function(t){if(!so(t))return"";var r=Fo.parse(t);return Ro.stringify(r)}(t))}catch(t){return new Uint8Array}return r}var $o=function(t){return!0===t||!1===t||N(t)&&"[object Boolean]"==k(t)};function Go(t){return $o(t)}function Ho(t,r,e,n,o,i){if(!lo(t))return null;if(!Lo(r))return null;if(!po(e))return null;if(!Go(n))return null;if(!po(o))return null;if(!po(i))return null;var a,u,c;t=vo(t);var f=8*i-o-1,s=(1<<f)-1,l=s>>1,v=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?i-1:0,h=n?-1:1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=s):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?v/c:v*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=s?(u=0,a=s):a+l>=1?(u=(t*c-1)*Math.pow(2,o),a+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;r[e+p]=255&u,p+=h,u/=256,o-=8);for(a=a<<o|u,f+=o;f>0;r[e+p]=255&a,p+=h,a/=256,f-=8);return r[e+p-h]|=128*y,null}function qo(t){var r,e=[],n=[];if((!Ao(r=t)||0===r.length||1===r.length&&So(r[0]))&&!_o(t))return null;var o=[],i=[];function a(t){o.push(Uo(t)),i.push(t)}try{var u=function(t){if(!wo(t))return{results:"",binarys:[]};if(xo(t))return{results:"",binarys:[]};var r="",e=[];try{var n=-1;r=JSON.stringify(t,(function(t,r){if(Lo(r)){var o="[Uint8Array]::".concat(n+=1);return e.push(r),o}if(Bo(r)){var i="[Uint16Array]::".concat(n+=1);return e.push(r),i}if(Eo(r)){var a="[ArrayBuffer]::".concat(n+=1);return e.push(r),a}return To(r)&&(r=r.toString()),r}))}catch(t){}return{results:r,binarys:e}}(t);a(Do(u.results)),Me(u.binarys,(function(t){a(t)}));var c=o,f=Do(JSON.stringify(c)),s=new Uint8Array(8);!function(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:52,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;Ho(t,r,e,n,o,i)}(Uo(f),s),e.push(s),e.push(f),Me(i,(function(t){e.push(t)})),Me(e,(function(t){n=function(t,r){var e=Uo(t),n=Uo(r),o=new Uint8Array(e+n);return o.set(new Uint8Array(t),0),o.set(new Uint8Array(r),e),o}(n,t)}))}catch(t){return null}return n}function Vo(t,r,e,n,o){if(!Lo(t))return null;if(!po(r))return null;if(!Go(e))return null;if(!po(n))return null;if(!po(o))return null;var i,a,u=8*o-n-1,c=(1<<u)-1,f=c>>1,s=-7,l=e?0:o-1,v=e?1:-1,p=t[r+l];for(l+=v,i=p&(1<<-s)-1,p>>=-s,s+=u;s>0;i=256*i+t[r+l],l+=v,s-=8);for(a=i&(1<<-s)-1,i>>=-s,s+=n;s>0;a=256*a+t[r+l],l+=v,s-=8);if(0===i)i=1-f;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=f}return(p?-1:1)*a*Math.pow(2,i-n)}var Wo=y((function(t,r){var e;t.exports=(e=Co,function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,r=t.init,n=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,n=[],o=0;o<e;o++)n[o>>>2]|=t[o]<<24-o%4*8;r.call(this,n,e)}else r.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray)}));function Jo(t){if(!Lo(t))return"";var r,e;try{e=function(t){return Lo(t)?Wo.create(t).toString(Ro):""}(t),r=so(e)?Ro.parse(e).toString(Fo):""}catch(t){return""}return r}function Yo(t){var r=null;if(!Lo(t))return null;try{var e=t.slice(0,8),n=t.slice(8,Uo(t)),o=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:52,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:8;return Vo(t,r,e,n,o)}(e),i=n.slice(0,o),a=n.slice(o,Uo(n)),u=Jo(i),c=function(t,r){var e=0,n=0,o=[];return Me(r,(function(r){n=e+r;var i=t.slice(e,n);e=n,o.push(i)})),o}(a,JSON.parse(u));r=function(t){if(!_o(t))return{};var r=t.results,e=t.binarys;if(!so(r))return{};if(!Ao(e))return{};var n={};try{n=JSON.parse(r,(function(t,r){if(so(r)){if(r.indexOf("[Uint8Array]::")>=0){var n=go(r.replace("[Uint8Array]::",""));return e[n]}if(r.indexOf("[Uint16Array]::")>=0){var o=go(r.replace("[Uint16Array]::",""));return e[o]}if(r.indexOf("[ArrayBuffer]::")>=0){var i=go(r.replace("[ArrayBuffer]::",""));return e[i]}}return r}))}catch(t){}return n}({results:Jo(c.shift()),binarys:c})}catch(t){}return r}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={};t.port||(t.port=8080),t.apiName||(t.apiName="api");var e,n=new c.default.EventEmitter,o=Oo();function i(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];setTimeout((function(){n.emit.apply(n,[t].concat(e))}),1)}function s(){i("open")}function l(t,r){i("error",{msg:t,err:r})}function p(t){return h.apply(this,arguments)}function h(){return(h=v(b.mark((function t(e){var n,o,a,u,c,f,s,v;return b.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ln(),o=Ln(),a=Gt(e,"_mode",""),o.then((function(t){e.output=t,delete e.input,n.resolve(e)})).catch((function(t){n.reject(t)})),"execute"===a?(u=Gt(e,"func",""),c=Gt(e,"input",null),i("execute",u,c,o)):"broadcast"===a?(i("broadcast",Gt(e,"input",null)),o.resolve("ok")):"deliver"===a?(i("deliver",Gt(e,"input",null)),o.resolve("ok")):"polling"===a?(f=Gt(e,"clientId",""),s=Gt(r,f,[]),s=En(s),r[f]=[],o.resolve(s)):(l(v="can not find _mode in data",e),n.reject(v),o.reject()),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}setInterval((function(){var t=o.get(),e=Pe(t,"key"),n={};Me(e,(function(t){n[t]=Gt(r,t,[])})),r=n}),1e3),e=t.serverHapi?t.serverHapi:a.default.server({port:t.port,routes:{cors:{origin:["*"]}}}),s(),o.on("message",(function(t){var r=t.eventName,e=t.key,n=t.data,o=t.now;"enter"===r?i("clientEnter",e,n):"leave"===r&&i("clientLeave",e,n),i("clientChange",o)}));var y,d={path:"/"+t.apiName,method:"POST",options:{payload:{maxBytes:1073741824,timeout:18e4,multipart:!0},timeout:{socket:3e5}},handler:(y=v(b.mark((function t(r,e){var n,a,u,c,s,l,v,h,y,d;return b.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_o(n=Gt(r,"headers"))?n:"",a=_o(a=Gt(r,"query"))?a:"",i("handler",{headers:n,query:a}),fo(u=Gt(r,"payload.bb",null))&&(u=Buffer.from(u,"utf8")),c=new Uint8Array(u),s=Yo(c),l=Gt(s,"clientId"),v={headers:r.headers,info:r.info},o.trigger(l,v),h={},t.next=15,p(s).then((function(t){h.success=t})).catch((function(t){h.error=t}));case 15:return y=qo(h),(d=new f.default.Readable)._read=function(){},d.push(y),d.push(null),t.abrupt("return",e.response(d).header("Cache-Control","no-cache, no-store, must-revalidate").header("Content-Type","application/octet-stream").header("Content-Length",d.readableLength));case 21:case"end":return t.stop()}}),t)}))),function(t,r){return y.apply(this,arguments)})};function g(){return j.apply(this,arguments)}function j(){return(j=v(b.mark((function t(){var r;return b.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.register(u.default);case 2:return r={method:"GET",path:"/{file*}",handler:{directory:{path:"./"}}},e.route([r,d]),t.next=6,e.start();case 6:console.log("Server running at: ".concat(e.info.uri));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return n.broadcast=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(!So(r)){var n={};Me(r,(function(r,e){r.push({mode:"broadcast",data:t}),n[e]=r})),r=n,e(100)}},n.deliver=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=Gt(r,t,[]);o.push({mode:"deliver",data:e}),r[t]=o,n(100)},t.serverHapi?t.serverHapi.route(d):g(),n}}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@hapi/hapi"),require("@hapi/inert"),require("events"),require("stream")):"function"==typeof define&&define.amd?define(["@hapi/hapi","@hapi/inert","events","stream"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-converhp-server"]=e(t["@hapi/hapi"],t["@hapi/inert"],t.events,t.stream)}(this,(function(t,e,r,n){"use strict";var o=Array.isArray,i="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,a=i||u||Function("return this")(),c=a.Symbol,f=Object.prototype,s=f.hasOwnProperty,l=f.toString,p=c?c.toStringTag:void 0;var h=Object.prototype.toString;var v="[object Null]",y="[object Undefined]",d=c?c.toStringTag:void 0;function b(t){return null==t?void 0===t?y:v:d&&d in Object(t)?function(t){var e=s.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=l.call(t);return n&&(e?t[p]=r:delete t[p]),o}(t):function(t){return h.call(t)}(t)}function g(t){return null!=t&&"object"==typeof t}var j="[object Symbol]";function _(t){return"symbol"==typeof t||g(t)&&b(t)==j}var w=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;function A(t,e){if(o(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!_(t))||(m.test(t)||!w.test(t)||null!=e&&t in Object(e))}function O(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var x="[object AsyncFunction]",S="[object Function]",B="[object GeneratorFunction]",U="[object Proxy]";function z(t){if(!O(t))return!1;var e=b(t);return e==S||e==B||e==x||e==U}var M,C=a["__core-js_shared__"],E=(M=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var N=Function.prototype.toString;function P(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var k=/^\[object .+?Constructor\]$/,I=Function.prototype,T=Object.prototype,L=I.toString,F=T.hasOwnProperty,$=RegExp("^"+L.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(t){return!(!O(t)||(e=t,E&&E in e))&&(z(t)?$:k).test(P(t));var e}function R(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return D(r)?r:void 0}var H=R(Object,"create");var q=Object.prototype.hasOwnProperty;var V=Object.prototype.hasOwnProperty;function W(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function J(t,e){return t===e||t!=t&&e!=e}function G(t,e){for(var r=t.length;r--;)if(J(t[r][0],e))return r;return-1}W.prototype.clear=function(){this.__data__=H?H(null):{},this.size=0},W.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},W.prototype.get=function(t){var e=this.__data__;if(H){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(e,t)?e[t]:void 0},W.prototype.has=function(t){var e=this.__data__;return H?void 0!==e[t]:V.call(e,t)},W.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=H&&void 0===e?"__lodash_hash_undefined__":e,this};var K=Array.prototype.splice;function Q(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Q.prototype.clear=function(){this.__data__=[],this.size=0},Q.prototype.delete=function(t){var e=this.__data__,r=G(e,t);return!(r<0)&&(r==e.length-1?e.pop():K.call(e,r,1),--this.size,!0)},Q.prototype.get=function(t){var e=this.__data__,r=G(e,t);return r<0?void 0:e[r][1]},Q.prototype.has=function(t){return G(this.__data__,t)>-1},Q.prototype.set=function(t,e){var r=this.__data__,n=G(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var X=R(a,"Map");function Y(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Z(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Z.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(X||Q),string:new W}},Z.prototype.delete=function(t){var e=Y(this,t).delete(t);return this.size-=e?1:0,e},Z.prototype.get=function(t){return Y(this,t).get(t)},Z.prototype.has=function(t){return Y(this,t).has(t)},Z.prototype.set=function(t,e){var r=Y(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var tt="Expected a function";function et(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(tt);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(et.Cache||Z),r}et.Cache=Z;var rt,nt,ot,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ut=/\\(\\)?/g,at=(rt=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(it,(function(t,r,n,o){e.push(n?o.replace(ut,"$1"):r||t)})),e},nt=et(rt,(function(t){return 500===ot.size&&ot.clear(),t})),ot=nt.cache,nt),ct=at;function ft(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var st=1/0,lt=c?c.prototype:void 0,pt=lt?lt.toString:void 0;function ht(t){if("string"==typeof t)return t;if(o(t))return ft(t,ht)+"";if(_(t))return pt?pt.call(t):"";var e=t+"";return"0"==e&&1/t==-st?"-0":e}function vt(t){return null==t?"":ht(t)}function yt(t,e){return o(t)?t:A(t,e)?[t]:ct(vt(t))}var dt=1/0;function bt(t){if("string"==typeof t||_(t))return t;var e=t+"";return"0"==e&&1/t==-dt?"-0":e}function gt(t,e){for(var r=0,n=(e=yt(e,t)).length;null!=t&&r<n;)t=t[bt(e[r++])];return r&&r==n?t:void 0}function jt(t,e,r){var n=null==t?void 0:gt(t,e);return void 0===n?r:n}function _t(t){var e=this.__data__=new Q(t);this.size=e.size}_t.prototype.clear=function(){this.__data__=new Q,this.size=0},_t.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},_t.prototype.get=function(t){return this.__data__.get(t)},_t.prototype.has=function(t){return this.__data__.has(t)},_t.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Q){var n=r.__data__;if(!X||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Z(n)}return r.set(t,e),this.size=r.size,this};function wt(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Z;++e<r;)this.add(t[e])}function mt(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function At(t,e){return t.has(e)}wt.prototype.add=wt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},wt.prototype.has=function(t){return this.__data__.has(t)};var Ot=1,xt=2;function St(t,e,r,n,o,i){var u=r&Ot,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var f=i.get(t),s=i.get(e);if(f&&s)return f==e&&s==t;var l=-1,p=!0,h=r&xt?new wt:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var v=t[l],y=e[l];if(n)var d=u?n(y,v,l,e,t,i):n(v,y,l,t,e,i);if(void 0!==d){if(d)continue;p=!1;break}if(h){if(!mt(e,(function(t,e){if(!At(h,e)&&(v===t||o(v,t,r,n,i)))return h.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p}var Bt=a.Uint8Array;function Ut(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function zt(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var Mt=1,Ct=2,Et="[object Boolean]",Nt="[object Date]",Pt="[object Error]",kt="[object Map]",It="[object Number]",Tt="[object RegExp]",Lt="[object Set]",Ft="[object String]",$t="[object Symbol]",Dt="[object ArrayBuffer]",Rt="[object DataView]",Ht=c?c.prototype:void 0,qt=Ht?Ht.valueOf:void 0;function Vt(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Wt(t,e,r){var n=e(t);return o(t)?n:Vt(n,r(t))}function Jt(){return[]}var Gt=Object.prototype.propertyIsEnumerable,Kt=Object.getOwnPropertySymbols,Qt=Kt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}(Kt(t),(function(e){return Gt.call(t,e)})))}:Jt,Xt=Qt;function Yt(t){return g(t)&&"[object Arguments]"==b(t)}var Zt=Object.prototype,te=Zt.hasOwnProperty,ee=Zt.propertyIsEnumerable,re=Yt(function(){return arguments}())?Yt:function(t){return g(t)&&te.call(t,"callee")&&!ee.call(t,"callee")},ne=re;var oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,ie=oe&&"object"==typeof module&&module&&!module.nodeType&&module,ue=ie&&ie.exports===oe?a.Buffer:void 0,ae=(ue?ue.isBuffer:void 0)||function(){return!1},ce=9007199254740991,fe=/^(?:0|[1-9]\d*)$/;function se(t,e){var r=typeof t;return!!(e=null==e?ce:e)&&("number"==r||"symbol"!=r&&fe.test(t))&&t>-1&&t%1==0&&t<e}var le=9007199254740991;function pe(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=le}var he={};function ve(t){return function(e){return t(e)}}he["[object Float32Array]"]=he["[object Float64Array]"]=he["[object Int8Array]"]=he["[object Int16Array]"]=he["[object Int32Array]"]=he["[object Uint8Array]"]=he["[object Uint8ClampedArray]"]=he["[object Uint16Array]"]=he["[object Uint32Array]"]=!0,he["[object Arguments]"]=he["[object Array]"]=he["[object ArrayBuffer]"]=he["[object Boolean]"]=he["[object DataView]"]=he["[object Date]"]=he["[object Error]"]=he["[object Function]"]=he["[object Map]"]=he["[object Number]"]=he["[object Object]"]=he["[object RegExp]"]=he["[object Set]"]=he["[object String]"]=he["[object WeakMap]"]=!1;var ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,de=ye&&"object"==typeof module&&module&&!module.nodeType&&module,be=de&&de.exports===ye&&i.process,ge=function(){try{var t=de&&de.require&&de.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),je=ge&&ge.isTypedArray,_e=je?ve(je):function(t){return g(t)&&pe(t.length)&&!!he[b(t)]},we=Object.prototype.hasOwnProperty;function me(t,e){var r=o(t),n=!r&&ne(t),i=!r&&!n&&ae(t),u=!r&&!n&&!i&&_e(t),a=r||n||i||u,c=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],f=c.length;for(var s in t)!e&&!we.call(t,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||u&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||se(s,f))||c.push(s);return c}var Ae=Object.prototype;function Oe(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ae)}function xe(t,e){return function(r){return t(e(r))}}var Se=xe(Object.keys,Object),Be=Object.prototype.hasOwnProperty;function Ue(t){if(!Oe(t))return Se(t);var e=[];for(var r in Object(t))Be.call(t,r)&&"constructor"!=r&&e.push(r);return e}function ze(t){return null!=t&&pe(t.length)&&!z(t)}function Me(t){return ze(t)?me(t):Ue(t)}function Ce(t){return Wt(t,Me,Xt)}var Ee=1,Ne=Object.prototype.hasOwnProperty;var Pe=R(a,"DataView"),ke=R(a,"Promise"),Ie=R(a,"Set"),Te=R(a,"WeakMap"),Le="[object Map]",Fe="[object Promise]",$e="[object Set]",De="[object WeakMap]",Re="[object DataView]",He=P(Pe),qe=P(X),Ve=P(ke),We=P(Ie),Je=P(Te),Ge=b;(Pe&&Ge(new Pe(new ArrayBuffer(1)))!=Re||X&&Ge(new X)!=Le||ke&&Ge(ke.resolve())!=Fe||Ie&&Ge(new Ie)!=$e||Te&&Ge(new Te)!=De)&&(Ge=function(t){var e=b(t),r="[object Object]"==e?t.constructor:void 0,n=r?P(r):"";if(n)switch(n){case He:return Re;case qe:return Le;case Ve:return Fe;case We:return $e;case Je:return De}return e});var Ke=Ge,Qe=1,Xe="[object Arguments]",Ye="[object Array]",Ze="[object Object]",tr=Object.prototype.hasOwnProperty;function er(t,e,r,n,i,u){var a=o(t),c=o(e),f=a?Ye:Ke(t),s=c?Ye:Ke(e),l=(f=f==Xe?Ze:f)==Ze,p=(s=s==Xe?Ze:s)==Ze,h=f==s;if(h&&ae(t)){if(!ae(e))return!1;a=!0,l=!1}if(h&&!l)return u||(u=new _t),a||_e(t)?St(t,e,r,n,i,u):function(t,e,r,n,o,i,u){switch(r){case Rt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Dt:return!(t.byteLength!=e.byteLength||!i(new Bt(t),new Bt(e)));case Et:case Nt:case It:return J(+t,+e);case Pt:return t.name==e.name&&t.message==e.message;case Tt:case Ft:return t==e+"";case kt:var a=Ut;case Lt:var c=n&Mt;if(a||(a=zt),t.size!=e.size&&!c)return!1;var f=u.get(t);if(f)return f==e;n|=Ct,u.set(t,e);var s=St(a(t),a(e),n,o,i,u);return u.delete(t),s;case $t:if(qt)return qt.call(t)==qt.call(e)}return!1}(t,e,f,r,n,i,u);if(!(r&Qe)){var v=l&&tr.call(t,"__wrapped__"),y=p&&tr.call(e,"__wrapped__");if(v||y){var d=v?t.value():t,b=y?e.value():e;return u||(u=new _t),i(d,b,r,n,u)}}return!!h&&(u||(u=new _t),function(t,e,r,n,o,i){var u=r&Ee,a=Ce(t),c=a.length;if(c!=Ce(e).length&&!u)return!1;for(var f=c;f--;){var s=a[f];if(!(u?s in e:Ne.call(e,s)))return!1}var l=i.get(t),p=i.get(e);if(l&&p)return l==e&&p==t;var h=!0;i.set(t,e),i.set(e,t);for(var v=u;++f<c;){var y=t[s=a[f]],d=e[s];if(n)var b=u?n(d,y,s,e,t,i):n(y,d,s,t,e,i);if(!(void 0===b?y===d||o(y,d,r,n,i):b)){h=!1;break}v||(v="constructor"==s)}if(h&&!v){var g=t.constructor,j=e.constructor;g==j||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof j&&j instanceof j||(h=!1)}return i.delete(t),i.delete(e),h}(t,e,r,n,i,u))}function rr(t,e,r,n,o){return t===e||(null==t||null==e||!g(t)&&!g(e)?t!=t&&e!=e:er(t,e,r,n,rr,o))}var nr=1,or=2;function ir(t){return t==t&&!O(t)}function ur(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}function ar(t){var e=function(t){for(var e=Me(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,ir(o)]}return e}(t);return 1==e.length&&e[0][2]?ur(e[0][0],e[0][1]):function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,u=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=r[o])[0],f=t[c],s=a[1];if(u&&a[2]){if(void 0===f&&!(c in t))return!1}else{var l=new _t;if(n)var p=n(f,s,c,t,e,l);if(!(void 0===p?rr(s,f,nr|or,n,l):p))return!1}}return!0}(r,t,e)}}function cr(t,e){return null!=t&&e in Object(t)}function fr(t,e){return null!=t&&function(t,e,r){for(var n=-1,i=(e=yt(e,t)).length,u=!1;++n<i;){var a=bt(e[n]);if(!(u=null!=t&&r(t,a)))break;t=t[a]}return u||++n!=i?u:!!(i=null==t?0:t.length)&&pe(i)&&se(a,i)&&(o(t)||ne(t))}(t,e,cr)}var sr=1,lr=2;function pr(t){return t}function hr(t){return function(e){return null==e?void 0:e[t]}}function vr(t){return A(t)?hr(bt(t)):function(t){return function(e){return gt(e,t)}}(t)}function yr(t){return"function"==typeof t?t:null==t?pr:"object"==typeof t?o(t)?(e=t[0],r=t[1],A(e)&&ir(r)?ur(bt(e),r):function(t){var n=jt(t,e);return void 0===n&&n===r?fr(t,e):rr(r,n,sr|lr)}):ar(t):vr(t);var e,r}var dr,br=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),u=i.length;u--;){var a=i[dr?u:++n];if(!1===e(o[a],a,o))break}return t};var gr=function(t,e){return function(r,n){if(null==r)return r;if(!ze(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Object(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}((function(t,e){return t&&br(t,e,Me)})),jr=gr;function _r(t,e){var r=-1,n=ze(t)?Array(t.length):[];return jr(t,(function(t,o,i){n[++r]=e(t,o,i)})),n}function wr(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function mr(t,e){var r;return(o(t)?wr:jr)(t,"function"==typeof(r=e)?r:pr)}var Ar=function(){try{var t=R(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Or=Ar;function xr(t,e,r){"__proto__"==e&&Or?Or(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Sr=Object.prototype.hasOwnProperty;function Br(t,e,r){var n=t[e];Sr.call(t,e)&&J(n,r)&&(void 0!==r||e in t)||xr(t,e,r)}function Ur(t,e,r,n){var o=!r;r||(r={});for(var i=-1,u=e.length;++i<u;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),o?xr(r,a,c):Br(r,a,c)}return r}var zr=Object.prototype.hasOwnProperty;function Mr(t){if(!O(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Oe(t),r=[];for(var n in t)("constructor"!=n||!e&&zr.call(t,n))&&r.push(n);return r}function Cr(t){return ze(t)?me(t,!0):Mr(t)}var Er="object"==typeof exports&&exports&&!exports.nodeType&&exports,Nr=Er&&"object"==typeof module&&module&&!module.nodeType&&module,Pr=Nr&&Nr.exports===Er?a.Buffer:void 0,kr=Pr?Pr.allocUnsafe:void 0;var Ir=xe(Object.getPrototypeOf,Object),Tr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Vt(e,Xt(t)),t=Ir(t);return e}:Jt,Lr=Tr;function Fr(t){return Wt(t,Cr,Lr)}var $r=Object.prototype.hasOwnProperty;function Dr(t){var e=new t.constructor(t.byteLength);return new Bt(e).set(new Bt(t)),e}var Rr=/\w*$/;var Hr=c?c.prototype:void 0,qr=Hr?Hr.valueOf:void 0;var Vr="[object Boolean]",Wr="[object Date]",Jr="[object Map]",Gr="[object Number]",Kr="[object RegExp]",Qr="[object Set]",Xr="[object String]",Yr="[object Symbol]",Zr="[object ArrayBuffer]",tn="[object DataView]",en="[object Float32Array]",rn="[object Float64Array]",nn="[object Int8Array]",on="[object Int16Array]",un="[object Int32Array]",an="[object Uint8Array]",cn="[object Uint8ClampedArray]",fn="[object Uint16Array]",sn="[object Uint32Array]";function ln(t,e,r){var n,o=t.constructor;switch(e){case Zr:return Dr(t);case Vr:case Wr:return new o(+t);case tn:return function(t,e){var r=e?Dr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case en:case rn:case nn:case on:case un:case an:case cn:case fn:case sn:return function(t,e){var r=e?Dr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case Jr:return new o;case Gr:case Xr:return new o(t);case Kr:return function(t){var e=new t.constructor(t.source,Rr.exec(t));return e.lastIndex=t.lastIndex,e}(t);case Qr:return new o;case Yr:return n=t,qr?Object(qr.call(n)):{}}}var pn=Object.create,hn=function(){function t(){}return function(e){if(!O(e))return{};if(pn)return pn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),vn=hn;var yn=ge&&ge.isMap,dn=yn?ve(yn):function(t){return g(t)&&"[object Map]"==Ke(t)};var bn=ge&&ge.isSet,gn=bn?ve(bn):function(t){return g(t)&&"[object Set]"==Ke(t)},jn=1,_n=2,wn=4,mn="[object Arguments]",An="[object Function]",On="[object GeneratorFunction]",xn="[object Object]",Sn={};function Bn(t,e,r,n,i,u){var a,c=e&jn,f=e&_n,s=e&wn;if(r&&(a=i?r(t,n,i,u):r(t)),void 0!==a)return a;if(!O(t))return t;var l=o(t);if(l){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&$r.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(t,a)}else{var p=Ke(t),h=p==An||p==On;if(ae(t))return function(t,e){if(e)return t.slice();var r=t.length,n=kr?kr(r):new t.constructor(r);return t.copy(n),n}(t,c);if(p==xn||p==mn||h&&!i){if(a=f||h?{}:function(t){return"function"!=typeof t.constructor||Oe(t)?{}:vn(Ir(t))}(t),!c)return f?function(t,e){return Ur(t,Lr(t),e)}(t,function(t,e){return t&&Ur(e,Cr(e),t)}(a,t)):function(t,e){return Ur(t,Xt(t),e)}(t,function(t,e){return t&&Ur(e,Me(e),t)}(a,t))}else{if(!Sn[p])return i?t:{};a=ln(t,p,c)}}u||(u=new _t);var v=u.get(t);if(v)return v;u.set(t,a),gn(t)?t.forEach((function(n){a.add(Bn(n,e,r,n,t,u))})):dn(t)&&t.forEach((function(n,o){a.set(o,Bn(n,e,r,o,t,u))}));var y=l?void 0:(s?f?Fr:Ce:f?Cr:Me)(t);return wr(y||t,(function(n,o){y&&(n=t[o=n]),Br(a,o,Bn(n,e,r,o,t,u))})),a}Sn[mn]=Sn["[object Array]"]=Sn["[object ArrayBuffer]"]=Sn["[object DataView]"]=Sn["[object Boolean]"]=Sn["[object Date]"]=Sn["[object Float32Array]"]=Sn["[object Float64Array]"]=Sn["[object Int8Array]"]=Sn["[object Int16Array]"]=Sn["[object Int32Array]"]=Sn["[object Map]"]=Sn["[object Number]"]=Sn[xn]=Sn["[object RegExp]"]=Sn["[object Set]"]=Sn["[object String]"]=Sn["[object Symbol]"]=Sn["[object Uint8Array]"]=Sn["[object Uint8ClampedArray]"]=Sn["[object Uint16Array]"]=Sn["[object Uint32Array]"]=!0,Sn["[object Error]"]=Sn[An]=Sn["[object WeakMap]"]=!1;var Un=1,zn=4;function Mn(t){return Bn(t,Un|zn)}function Cn(){let t,e,r=new Promise((function(){t=arguments[0],e=arguments[1]}));return r.resolve=t,r.reject=e,r}var En="[object String]";var Nn=hr("length"),Pn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var kn="\\ud800-\\udfff",In="["+kn+"]",Tn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ln="\\ud83c[\\udffb-\\udfff]",Fn="[^"+kn+"]",$n="(?:\\ud83c[\\udde6-\\uddff]){2}",Dn="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="(?:"+Tn+"|"+Ln+")"+"?",Hn="[\\ufe0e\\ufe0f]?",qn=Hn+Rn+("(?:\\u200d(?:"+[Fn,$n,Dn].join("|")+")"+Hn+Rn+")*"),Vn="(?:"+[Fn+Tn+"?",Tn,$n,Dn,In].join("|")+")",Wn=RegExp(Ln+"(?="+Ln+")|"+Vn+qn,"g");function Jn(t){return function(t){return Pn.test(t)}(t)?function(t){for(var e=Wn.lastIndex=0;Wn.test(t);)++e;return e}(t):Nn(t)}var Gn="[object Map]",Kn="[object Set]";function Qn(t){if(null==t)return 0;if(ze(t))return"string"==typeof(e=t)||!o(e)&&g(e)&&b(e)==En?Jn(t):t.length;var e,r=Ke(t);return r==Gn||r==Kn?t.size:Ue(t).length}var Xn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yn={};!function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,n,i,u){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||t,u),c=r?r+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],a]:t._events[c].push(a):(t._events[c]=a,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,u=new Array(i);o<i;o++)u[o]=n[o].fn;return u},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,o,i,u){var a=r?r+t:t;if(!this._events[a])return!1;var c,f,s=this._events[a],l=arguments.length;if(s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,e),!0;case 3:return s.fn.call(s.context,e,n),!0;case 4:return s.fn.call(s.context,e,n,o),!0;case 5:return s.fn.call(s.context,e,n,o,i),!0;case 6:return s.fn.call(s.context,e,n,o,i,u),!0}for(f=1,c=new Array(l-1);f<l;f++)c[f-1]=arguments[f];s.fn.apply(s.context,c)}else{var p,h=s.length;for(f=0;f<h;f++)switch(s[f].once&&this.removeListener(t,s[f].fn,void 0,!0),l){case 1:s[f].fn.call(s[f].context);break;case 2:s[f].fn.call(s[f].context,e);break;case 3:s[f].fn.call(s[f].context,e,n);break;case 4:s[f].fn.call(s[f].context,e,n,o);break;default:if(!c)for(p=1,c=new Array(l-1);p<l;p++)c[p-1]=arguments[p];s[f].fn.apply(s[f].context,c)}}return!0},a.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,o){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return u(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||o&&!a.once||n&&a.context!==n||u(this,i);else{for(var c=0,f=[],s=a.length;c<s;c++)(a[c].fn!==e||o&&!a[c].once||n&&a[c].context!==n)&&f.push(a[c]);f.length?this._events[i]=1===f.length?f[0]:f:u(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&u(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a}({get exports(){return Yn},set exports(t){Yn=t}});var Zn=Yn;var to=/\s/;var eo=/^\s+/;function ro(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&to.test(t.charAt(e)););return e}(t)+1).replace(eo,""):t}var no=NaN,oo=/^[-+]0x[0-9a-f]+$/i,io=/^0b[01]+$/i,uo=/^0o[0-7]+$/i,ao=parseInt;function co(t){if("number"==typeof t)return t;if(_(t))return no;if(O(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=O(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ro(t);var r=io.test(t);return r||uo.test(t)?ao(t.slice(2),r?2:8):oo.test(t)?no:+t}var fo=1/0,so=17976931348623157e292;function lo(t){return t?(t=co(t))===fo||t===-fo?(t<0?-1:1)*so:t==t?t:0:0===t?t:0}function po(t){var e=lo(t),r=e%1;return e==e?r?e-r:e:0}function ho(t){return"[object String]"===Object.prototype.toString.call(t)}function vo(t){return!(!ho(t)||""===t)}function yo(t){return t!=t}function bo(t){let e=!1;if(vo(t))e=!isNaN(Number(t));else if(function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)){if(yo(t))return!1;e=!0}return e}function go(t){if(!bo(t))return 0;return lo(t)}function jo(t){return!!bo(t)&&(t=go(t),"number"==typeof(e=t)&&e==po(e));var e}var _o=a.isFinite,wo=Math.min;var mo=function(t){var e=Math[t];return function(t,r){if(t=co(t),(r=null==r?0:wo(po(r),292))&&_o(t)){var n=(vt(t)+"e").split("e");return+((n=(vt(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}("round"),Ao=mo;function Oo(t){if(!bo(t))return 0;t=go(t);let e=Ao(t);return"0"===String(e)?0:e}function xo(t){if(!jo(t))return!1;return Oo(t)>0}function So(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bo(t){if(So(t)){for(let e in t)return!0;return!1}return!1}function Uo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new Zn,r={},n=null,o=jt(t,"timeAlive");xo(o)||(o=1e4),o=Oo(o);let i=jt(t,"timeDetect");return xo(i)||(i=50),i=Oo(i),e.trigger=function(t,u){vo(t)?(function(t,e){return!!So(t)&&!(!vo(e)&&!bo(e))&&e in t}(r,t)||setTimeout((()=>{e.emit("message",{eventName:"enter",key:t,data:u,now:Qn(r)})}),1),r[t]={data:u,time:Date.now()},null===n&&(n=setInterval((()=>{mr(r,((t,n)=>{if(Date.now()-t.time>o){let t=Mn(r[n]);delete r[n],e.emit("message",{eventName:"leave",key:n,data:t.data,now:Qn(r)})}})),Bo(r)||(clearInterval(n),n=null)}),i))):console.log("trigger need key")},e.get=function(){let t=[];return mr(r,((e,r)=>{t.push({key:r,data:e.data})})),t=Mn(t),t},e}function zo(t){return"[object Array]"===Object.prototype.toString.call(t)}function Mo(t){if(So(t)){for(let e in t)return!1;return!0}return!1}function Co(t){return!!function(t){return"[object Undefined]"===Object.prototype.toString.call(t)}(t)||(!!function(t){return"[object Null]"===Object.prototype.toString.call(t)}(t)||(!!Mo(t)||(!!function(t){return!(!ho(t)||""!==t)}(t)||(!!function(t){return!!zo(t)&&0===t.length}(t)||!!yo(t)))))}function Eo(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function No(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function Po(t){return"[object Uint16Array]"===Object.prototype.toString.call(t)}function ko(t){if(!(Eo(t)||(e=t,"[object Blob]"===Object.prototype.toString.call(e))||No(t)||Po(t)))return null;var e;try{if(t.byteLength)return t.byteLength}catch(t){}try{if(t.length)return t.length}catch(t){}try{if(t.size)return t.size}catch(t){}return null}var Io="[object Object]",To=Function.prototype,Lo=Object.prototype,Fo=To.toString,$o=Lo.hasOwnProperty,Do=Fo.call(Object);var Ro="[object DOMException]",Ho="[object Error]";function qo(t){if(!g(t))return!1;var e=b(t);return e==Ho||e==Ro||"string"==typeof t.message&&"string"==typeof t.name&&!function(t){if(!g(t)||b(t)!=Io)return!1;var e=Ir(t);if(null===e)return!0;var r=$o.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Fo.call(r)==Do}(t)}var Vo={};var Wo,Jo={},Go={get exports(){return Jo},set exports(t){Jo=t}};function Ko(){return Wo||(Wo=1,function(t,e){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==Xn&&Xn.crypto&&(r=Xn.crypto),!r)try{r=require("crypto")}catch(t){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),i={},u=i.lib={},a=u.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=u.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||s).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,o=t.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var u=r[i>>>2]>>>24-i%4*8&255;e[n+i>>>2]|=u<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)e[n+a>>>2]=r[a>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(n());return new c.init(e,t)}}),f=i.enc={},s=f.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(r,e/2)}},l=f.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(r,e)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},h=u.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,o=n.words,i=n.sigBytes,u=this.blockSize,a=i/(4*u),f=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*u,s=t.min(4*f,i);if(f){for(var l=0;l<f;l+=u)this._doProcessBlock(o,l);r=o.splice(0,f),n.sigBytes-=s}return new c.init(r,s)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});u.Hasher=h.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new v.HMAC.init(t,r).finalize(e)}}});var v=i.algo={};return i}(Math),r)}(Go)),Jo}!function(t,e){t.exports=Ko().enc.Utf8}({get exports(){return Vo},set exports(t){Vo=t}});var Qo=Vo,Xo={};!function(t,e){var r;t.exports=(r=Ko(),function(){var t=r,e=t.lib.WordArray;function n(t,r,n){for(var o=[],i=0,u=0;u<r;u++)if(u%4){var a=n[t.charCodeAt(u-1)]<<u%4*2|n[t.charCodeAt(u)]>>>6-u%4*2;o[i>>>2]|=a<<24-i%4*8,i++}return e.create(o,i)}t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var o=[],i=0;i<r;i+=3)for(var u=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(u>>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t){var e=t.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var u=r.charAt(64);if(u){var a=t.indexOf(u);-1!==a&&(e=a)}return n(t,e,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)}({get exports(){return Xo},set exports(t){Xo=t}});var Yo=Xo;function Zo(t){if(!vo(t))return new Uint8Array;let e;try{e=function(t){if(!ho(t))return new Uint8Array;let e=Yo.parse(t),r=e.words,n=e.sigBytes,o=new Uint8Array(n);for(let t=0;t<n;t++){let e=r[t>>>2]>>>24-t%4*8&255;o[t]=e}return o}(function(t){if(!vo(t))return"";let e=Qo.parse(t);return Yo.stringify(e)}(t))}catch(t){return new Uint8Array}return e}var ti="[object Boolean]";function ei(t){return!0===(e=t)||!1===e||g(e)&&b(e)==ti;var e}function ri(t,e){return function(t,e,r,n,o,i){if(!bo(t))return null;if(!No(e))return null;if(!jo(r))return null;if(!ei(n))return null;if(!jo(o))return null;if(!jo(i))return null;let u,a,c;t=go(t);let f=8*i-o-1,s=(1<<f)-1,l=s>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?i-1:0,v=n?-1:1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=s):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),(t+=u+l>=1?p/c:p*Math.pow(2,1-l))*c>=2&&(u++,c/=2),u+l>=s?(a=0,u=s):u+l>=1?(a=(t*c-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[r+h]=255&a,h+=v,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;e[r+h]=255&u,h+=v,u/=256,f-=8);return e[r+h-v]|=128*y,null}(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!(arguments.length>3&&void 0!==arguments[3])||arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:52,arguments.length>5&&void 0!==arguments[5]?arguments[5]:8)}function ni(t){let e=[],r=[];if((!zo(n=t)||0===n.length||1===n.length&&Co(n[0]))&&!Bo(t))return null;var n;let o=[],i=[];function u(t){o.push(ko(t)),i.push(t)}try{let n=function(t){if(!So(t))return{results:"",binarys:[]};if(Mo(t))return{results:"",binarys:[]};let e="",r=[];try{let n=-1;e=JSON.stringify(t,(function(t,e){if(No(e)){n+=1;let t=`[Uint8Array]::${n}`;return r.push(e),t}if(Po(e)){n+=1;let t=`[Uint16Array]::${n}`;return r.push(e),t}if(Eo(e)){n+=1;let t=`[ArrayBuffer]::${n}`;return r.push(e),t}return qo(e)&&(e=e.toString()),e}))}catch(t){}return{results:e,binarys:r}}(t);u(Zo(n.results)),mr(n.binarys,(t=>{u(t)}));let a=o,c=Zo(JSON.stringify(a)),f=new Uint8Array(8);ri(ko(c),f),e.push(f),e.push(c),mr(i,(t=>{e.push(t)})),mr(e,(t=>{r=function(t,e){let r=ko(t),n=ko(e),o=new Uint8Array(r+n);return o.set(new Uint8Array(t),0),o.set(new Uint8Array(e),r),o}(r,t)}))}catch(t){return null}return r}function oi(t){return function(t,e,r,n,o){if(!No(t))return null;if(!jo(e))return null;if(!ei(r))return null;if(!jo(n))return null;if(!jo(o))return null;let i,u,a=8*o-n-1,c=(1<<a)-1,f=c>>1,s=-7,l=r?0:o-1,p=r?1:-1,h=t[e+l];for(l+=p,i=h&(1<<-s)-1,h>>=-s,s+=a;s>0;i=256*i+t[e+l],l+=p,s-=8);for(u=i&(1<<-s)-1,i>>=-s,s+=n;s>0;u=256*u+t[e+l],l+=p,s-=8);if(0===i)i=1-f;else{if(i===c)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,n),i-=f}return(h?-1:1)*u*Math.pow(2,i-n)}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!(arguments.length>2&&void 0!==arguments[2])||arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:52,arguments.length>4&&void 0!==arguments[4]?arguments[4]:8)}var ii={};!function(t,e){var r;t.exports=(r=Ko(),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,e=t.init,n=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,n=[],o=0;o<r;o++)n[o>>>2]|=t[o]<<24-o%4*8;e.call(this,n,r)}else e.apply(this,arguments)};n.prototype=t}}(),r.lib.WordArray)}({get exports(){return ii},set exports(t){ii=t}});var ui=ii;function ai(t){if(!No(t))return"";let e;try{r=function(t){return No(t)?ui.create(t).toString(Yo):""}(t),e=vo(r)?Yo.parse(r).toString(Qo):""}catch(t){return""}var r;return e}function ci(t){let e=null;if(!No(t))return null;try{let r=8,n=t.slice(0,r),o=t.slice(r,ko(t)),i=oi(n),u=o.slice(0,i),a=o.slice(i,ko(o)),c=ai(u),f=function(t,e){let r=0,n=0,o=[];return mr(e,(e=>{n=r+e;let i=t.slice(r,n);r=n,o.push(i)})),o}(a,JSON.parse(c));e=function(t){if(!Bo(t))return{};let{results:e,binarys:r}=t;if(!vo(e))return{};if(!zo(r))return{};let n={};try{n=JSON.parse(e,(function(t,e){if(vo(e)){if(e.indexOf("[Uint8Array]::")>=0){let t=Oo(e.replace("[Uint8Array]::",""));return r[t]}if(e.indexOf("[Uint16Array]::")>=0){let t=Oo(e.replace("[Uint16Array]::",""));return r[t]}if(e.indexOf("[ArrayBuffer]::")>=0){let t=Oo(e.replace("[ArrayBuffer]::",""));return r[t]}}return e}))}catch(t){}return n}({results:ai(f.shift()),binarys:f})}catch(t){}return e}return function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u={};i.port||(i.port=8080),i.apiName||(i.apiName="api");let a,c=new r.EventEmitter,f=Uo();function s(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];setTimeout((()=>{c.emit(t,...r)}),1)}async function l(t){let e=Cn(),r=Cn(),n=jt(t,"_mode","");if(r.then((r=>{t.output=r,delete t.input,e.resolve(t)})).catch((t=>{e.reject(t)})),"execute"===n){s("execute",jt(t,"func",""),jt(t,"input",null),r)}else if("broadcast"===n){s("broadcast",jt(t,"input",null)),r.resolve("ok")}else if("deliver"===n){s("deliver",jt(t,"input",null)),r.resolve("ok")}else if("polling"===n){let e=jt(t,"clientId",""),n=jt(u,e,[]);n=Mn(n),u[e]=[],r.resolve(n)}else{let n="can not find _mode in data";!function(t,e){s("error",{msg:t,err:e})}(n,t),e.reject(n),r.reject()}return e}setInterval((()=>{let t=f.get(),e=(n="key",(o(r=t)?ft:_r)(r,yr(n)));var r,n;let i={};mr(e,(t=>{i[t]=jt(u,t,[])})),u=i}),1e3),a=i.serverHapi?i.serverHapi:t.server({port:i.port,routes:{cors:{origin:["*"]}}}),s("open"),f.on("message",(function(t){let{eventName:e,key:r,data:n,now:o}=t;"enter"===e?s("clientEnter",r,n):"leave"===e&&s("clientLeave",r,n),s("clientChange",o)}));let p={path:"/"+i.apiName,method:"POST",options:{payload:{maxBytes:1073741824,timeout:18e4,multipart:!0},timeout:{socket:3e5}},handler:async function(t,e){let r=jt(t,"headers");r=Bo(r)?r:"";let o=jt(t,"query");o=Bo(o)?o:"",s("handler",{headers:r,query:o});let i=jt(t,"payload.bb",null);ho(i)&&(i=Buffer.from(i,"utf8"));let u=ci(new Uint8Array(i)),a=jt(u,"clientId"),c={headers:t.headers,info:t.info};f.trigger(a,c);let p={};await l(u).then((function(t){p.success=t})).catch((function(t){p.error=t}));let h=ni(p),v=new n.Readable;return v._read=()=>{},v.push(h),v.push(null),e.response(v).header("Cache-Control","no-cache, no-store, must-revalidate").header("Content-Type","application/octet-stream").header("Content-Length",v.readableLength)}};return c.broadcast=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(Co(u))return;let r={};mr(u,((e,n)=>{e.push({mode:"broadcast",data:t}),r[n]=e})),u=r,e(100)},c.deliver=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=jt(u,t,[]);n.push({mode:"deliver",data:e}),u[t]=n,r(100)},i.serverHapi?i.serverHapi.route(p):async function(){await a.register(e),a.route([{method:"GET",path:"/{file*}",handler:{directory:{path:"./"}}},p]),await a.start(),console.log(`Server running at: ${a.info.uri}`)}(),c}}));
|
|
7
7
|
//# sourceMappingURL=w-converhp-server.umd.js.map
|